Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge dev into main #447

Merged
merged 9 commits into from
Jan 25, 2025
17 changes: 15 additions & 2 deletions scripts/generateQuestsForEventRegistrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ const QUEST_CONNECT_TEN_H = "QUEST_CONNECT_TEN_H";
const QUEST_BT_BOOTH_H = "QUEST_BT_BOOTH_H";
const QUEST_CONNECT_EXEC_H = "QUEST_CONNECT_EXEC_H";

const QUEST_WORKSHOP_TWO_PARTICIPANT = "QUEST_WORKSHOP_TWO_PARTICIPANT";

const QUESTS = [
[QUEST_CONNECT_ONE, 1, "First Impressionist", "Make your first connection!"],
[QUEST_CONNECT_FOUR, 4, "Networking Pro", "Make 4 connections."],
Expand All @@ -41,8 +43,19 @@ const QUESTS = [
[QUEST_SNACK, 1, "Snack Seeker", "Grab some food."],
[QUEST_BOOTH_STARTUP, 1, "Startup Explorer", "Visit a startup booth."],
[QUEST_BIGTECH, 1, "Big League Scout", "Visit a big company booth."],
[QUEST_WORKSHOP, 1, "Workshop Wonder", "Attend Workshop 2."],
[QUEST_PHOTOBOOTH, 1, "Memory Maker", "Take a photo to reminisce."]
[QUEST_PHOTOBOOTH, 1, "Memory Maker", "Take a photo to reminisce."],
[
QUEST_WORKSHOP,
1,
"Interview Ace",
"Complete our challenge at workshop two."
],
[
QUEST_WORKSHOP_TWO_PARTICIPANT,
1,
"Bold Brilliance",
"Brave a on-stage 1-on-1 interview with a recruiter."
]
];

const create = async (item, table) => {
Expand Down
26 changes: 24 additions & 2 deletions services/interactions/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,31 @@ export const QUEST_CONNECT_FOUR = "QUEST_CONNECT_FOUR";
export const QUEST_BT_BOOTH_H = "QUEST_BT_BOOTH_H";
export const QUEST_CONNECT_TEN_H = "QUEST_CONNECT_TEN_H";
export const QUEST_CONNECT_EXEC_H = "QUEST_CONNECT_EXEC_H";
export const QUEST_WORKSHOP_TWO_PARTICIPANT = "QUEST_WORKSHOP_TWO_PARTICIPANT";

export const WORKSHOP_TWO = "WORKSHOP_TWO";
export const WORKSHOP_TWO_PARTICIPANT = "WORKSHOP_TWO_PARTICIPANT";

export const BIGTECH = ["Meta", "Google"]; // incomplete, check with partnerships
export const STARTUPS = ["Perplexity", "InternInside", "Xpress"];
export const BIGTECH = [
"aws",
"spotify",
"meta",
"google",
"slack",
"googlecloud",
"amazon",
"stripe",
"microsoft",
"perplexity"
];
export const STARTUPS = [
"futurpreneur",
"internalautomations",
"redpilllabs",
"techcareernorth",
"xpressselect",
"wonsulting",
"thecreativesolution",
"interninsider"
];
export const PHOTOBOOTH = "PHOTO";
48 changes: 28 additions & 20 deletions services/interactions/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ import db from "../../lib/db";
import docClient from "../../lib/docClient";
import handlerHelpers from "../../lib/handlerHelpers";
import helpers from "../../lib/handlerHelpers";
import { CURRENT_EVENT } from "./constants";
import { handleBooth, handleConnection, handleWorkshop } from "./helpers";
import { QueryCommand } from "@aws-sdk/lib-dynamodb";
import {
CURRENT_EVENT
} from "./constants";
import {
handleBooth, handleConnection, handleWorkshop
} from "./helpers";
import {
QueryCommand
} from "@aws-sdk/lib-dynamodb";

const CONNECTION = "CONNECTION";
const WORK = "WORKSHOP";
Expand Down Expand Up @@ -37,27 +43,29 @@ export const postInteraction = async (event, ctx, callback) => {
}

const timestamp = new Date().getTime();
const { userID, eventType, eventParam } = data;
const {
userID, eventType, eventParam
} = data;

let response;

switch (eventType) {
case CONNECTION:
response = await handleConnection(userID, eventParam, timestamp);
break;

case WORK:
response = await handleWorkshop(userID, eventParam, timestamp);
break;

case BOOTH:
response = await handleBooth(userID, eventParam, timestamp);
break;

default:
throw handlerHelpers.createResponse(400, {
message: "interactionType argument does not match known case"
});
case CONNECTION:
response = await handleConnection(userID, eventParam, timestamp);
break;

case WORK:
response = await handleWorkshop(userID, eventParam, timestamp);
break;

case BOOTH:
response = await handleBooth(userID, eventParam, timestamp);
break;

default:
throw handlerHelpers.createResponse(400, {
message: "interactionType argument does not match known case"
});
}

callback(null, response);
Expand Down
Loading
Loading