Skip to content
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
eb765ee
base stuff
devksingh4 Mar 28, 2025
54fb945
basic room requests setup
devksingh4 Mar 31, 2025
1bc763c
basic updates to support viewing later
devksingh4 Mar 31, 2025
58f50df
update schema
devksingh4 Mar 31, 2025
5695268
basic put item integration done
devksingh4 Mar 31, 2025
cf614dc
remove dynamo table
devksingh4 Mar 31, 2025
eb61649
new table definition
devksingh4 Mar 31, 2025
3f16c35
new API
devksingh4 Mar 31, 2025
50b812c
status updates
devksingh4 Mar 31, 2025
7ec5ade
fix cfn
devksingh4 Mar 31, 2025
20e5352
get room requests
devksingh4 Mar 31, 2025
58eea5a
updates to status
devksingh4 Mar 31, 2025
a3228ae
comment out the table so we can remake it
devksingh4 Mar 31, 2025
dc1253a
recreate status table
devksingh4 Mar 31, 2025
0583032
basics
devksingh4 Mar 31, 2025
5b54aba
clean up the status
devksingh4 Mar 31, 2025
cfd23ab
remove unused imports
devksingh4 Mar 31, 2025
c67119b
add ability to select the semester
devksingh4 Mar 31, 2025
c68c6fb
fix UI papercuts
devksingh4 Mar 31, 2025
a50bda4
fix IAM roles
devksingh4 Mar 31, 2025
1834252
update IAM permissions
devksingh4 Mar 31, 2025
684af34
fix IAM permission
devksingh4 Apr 1, 2025
62c8ca8
new email notifications function
devksingh4 Apr 1, 2025
17c249f
updates
devksingh4 Apr 1, 2025
e780a9c
ability to update status in the UI
devksingh4 Apr 1, 2025
08d820c
update string
devksingh4 Apr 1, 2025
82d47be
update
devksingh4 Apr 2, 2025
9adb649
fix types
devksingh4 Apr 2, 2025
93d049d
basic compatiblity updates
devksingh4 Apr 2, 2025
ce234db
fixes part 3
devksingh4 Apr 2, 2025
414f982
more data
devksingh4 Apr 2, 2025
eb267a2
fix imports
devksingh4 Apr 2, 2025
d7bb3bc
fix rendering and notifications
devksingh4 Apr 2, 2025
933361f
super basic UI test
devksingh4 Apr 2, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions cloudformation/iam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@ Resources:
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-stripe-links
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-membership-provisioning
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-membership-external
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-room-requests
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-room-requests-status
# Index accesses
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-stripe-links/index/*
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-events/index/*
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-merchstore-purchase-history/index/*
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-room-requests/index/*
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-room-requests-status/index/*

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

- Sid: DynamoDBIndexAccess
Effect: Allow
Action:
- dynamodb:Query
Resource:
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-stripe-links/index/*
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-core-api-events/index/*
- Fn::Sub: arn:aws:dynamodb:${AWS::Region}:${AWS::AccountId}:table/infra-merchstore-purchase-history/index/*

- Sid: DynamoDBStreamAccess
Effect: Allow
Action:
Expand Down Expand Up @@ -211,6 +210,19 @@ Resources:
ForAllValues:StringLike:
ses:Recipients:
- "*@illinois.edu"
- PolicyName: ses-notifications
PolicyDocument:
Version: "2012-10-17"
Statement:
- Action:
- ses:SendEmail
- ses:SendRawEmail
Effect: Allow
Resource: "*"
Condition:
StringEquals:
ses:FromAddress:
Fn::Sub: "notifications@${SesEmailDomain}"
- PolicyName: ses-sales
PolicyDocument:
Version: "2012-10-17"
Expand Down
64 changes: 64 additions & 0 deletions cloudformation/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,70 @@ Resources:
- AttributeName: netid_list
KeyType: HASH

RoomRequestsTable:
Type: "AWS::DynamoDB::Table"
DeletionPolicy: "Retain"
UpdateReplacePolicy: "Retain"
Properties:
BillingMode: "PAY_PER_REQUEST"
TableName: infra-core-api-room-requests
DeletionProtectionEnabled: true
PointInTimeRecoverySpecification:
PointInTimeRecoveryEnabled: !If [IsProd, true, false]
AttributeDefinitions:
- AttributeName: userId#requestId
AttributeType: S
- AttributeName: requestId
AttributeType: S
- AttributeName: semesterId
AttributeType: S
KeySchema:
- AttributeName: semesterId
KeyType: HASH
- AttributeName: userId#requestId
KeyType: RANGE
GlobalSecondaryIndexes:
- IndexName: RequestIdIndex
KeySchema:
- AttributeName: requestId
KeyType: HASH
Projection:
ProjectionType: ALL

RoomRequestUpdatesTable:
Type: "AWS::DynamoDB::Table"
DeletionPolicy: "Retain"
UpdateReplacePolicy: "Retain"
Properties:
BillingMode: "PAY_PER_REQUEST"
TableName: infra-core-api-room-requests-status
DeletionProtectionEnabled: true
PointInTimeRecoverySpecification:
PointInTimeRecoveryEnabled: !If [IsProd, true, false]
AttributeDefinitions:
- AttributeName: requestId
AttributeType: S
- AttributeName: semesterId
AttributeType: S
- AttributeName: createdAt#status
AttributeType: S
KeySchema:
- AttributeName: requestId
KeyType: HASH
- AttributeName: createdAt#status
KeyType: RANGE
GlobalSecondaryIndexes:
- IndexName: SemesterId
KeySchema:
- AttributeName: semesterId
KeyType: HASH
- AttributeName: requestId
KeyType: RANGE
Projection:
ProjectionType: ALL



IamGroupRolesTable:
Type: "AWS::DynamoDB::Table"
DeletionPolicy: "Retain"
Expand Down
2 changes: 2 additions & 0 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import mobileWalletRoute from "./routes/mobileWallet.js";
import stripeRoutes from "./routes/stripe.js";
import membershipPlugin from "./routes/membership.js";
import path from "path"; // eslint-disable-line import/no-nodejs-modules
import roomRequestRoutes from "./routes/roomRequests.js";

dotenv.config();

Expand Down Expand Up @@ -133,6 +134,7 @@ async function init(prettyPrint: boolean = false) {
api.register(ticketsPlugin, { prefix: "/tickets" });
api.register(mobileWalletRoute, { prefix: "/mobileWallet" });
api.register(stripeRoutes, { prefix: "/stripe" });
api.register(roomRequestRoutes, { prefix: "/roomRequests" });
if (app.runEnvironment === "dev") {
api.register(vendingPlugin, { prefix: "/vending" });
}
Expand Down
Loading
Loading