diff --git a/components/Event/Event.tsx b/components/Event/Event.tsx index a8dc75ba..0c5ce49a 100644 --- a/components/Event/Event.tsx +++ b/components/Event/Event.tsx @@ -1,4 +1,4 @@ -import { QueriedVolunteerEventData } from 'bookem-shared/src/types/database'; +import { QueriedVolunteerEventDTO } from 'bookem-shared/src/types/database'; import React, { useState } from 'react'; import Header from '@/components/Event/Header'; import BookIcon from '@/components/Event/BookIcon'; @@ -21,7 +21,7 @@ import { BOOKEM_THEME } from '@/utils/constants'; * Event Detail * @param event Data about the event */ -const Event = ({ event }: { event: QueriedVolunteerEventData }) => { +const Event = ({ event }: { event: QueriedVolunteerEventDTO }) => { /** * True: display About * False: display Contact diff --git a/components/Event/EventName.tsx b/components/Event/EventName.tsx index 2c66df15..f10c0d57 100644 --- a/components/Event/EventName.tsx +++ b/components/Event/EventName.tsx @@ -1,4 +1,4 @@ -import { QueriedVolunteerEventData } from 'bookem-shared/src/types/database'; +import { QueriedVolunteerEventDTO } from 'bookem-shared/src/types/database'; import React, { useEffect } from 'react'; import { EventNameBox, @@ -15,7 +15,7 @@ import Image from 'next/image'; * Calculate the length of the event volunteers * If event.volunteers is undefined, return 0 */ -export const getEventLength = (event: QueriedVolunteerEventData) => { +export const getEventLength = (event: QueriedVolunteerEventDTO) => { if (event.volunteers && event.volunteers.length) return event.volunteers.length; else return 0; @@ -33,7 +33,7 @@ const EventName = ({ }: { signedUp: boolean; setSignedUp: (signedUp: boolean) => void; - event: QueriedVolunteerEventData; + event: QueriedVolunteerEventDTO; signUpEvent: () => void; }) => { const { data: session } = useSession(); @@ -54,7 +54,7 @@ const EventName = ({ {event.name} - {event.tags.length > 0 &&

({event.program.tagName})

} + {event.tags.length > 0 &&

({event.program?.name})

}
{getEventLength(event)}/{event.maxSpot} spots filled
@@ -66,7 +66,7 @@ const EventName = ({ {/* Mobile */} - {event.name} ({event.program?.tagName}) + {event.name} ({event.program?.name})
diff --git a/components/Event/Footer.tsx b/components/Event/Footer.tsx index d8fb7ff1..68d06d9f 100644 --- a/components/Event/Footer.tsx +++ b/components/Event/Footer.tsx @@ -1,5 +1,5 @@ import { SignupButton } from '@/styles/components/Event/event.styles'; -import { QueriedVolunteerEventData } from 'bookem-shared/src/types/database'; +import { QueriedVolunteerEventDTO } from 'bookem-shared/src/types/database'; import { useSession } from 'next-auth/react'; import React, { useEffect } from 'react'; import { getEventLength } from '@/components/Event/EventName'; @@ -20,7 +20,7 @@ const Footer = ({ }: { signedUp: boolean; setSignedUp: (signedUp: boolean) => void; - event: QueriedVolunteerEventData; + event: QueriedVolunteerEventDTO; signUpEvent: () => void; }) => { // Get user id in session diff --git a/components/Home/PastActivity.tsx b/components/Home/PastActivity.tsx index 95d552c4..4ba9cc9d 100644 --- a/components/Home/PastActivity.tsx +++ b/components/Home/PastActivity.tsx @@ -30,10 +30,7 @@ const dummyEventData: QueriedVolunteerEventData = { }, phone: '123-456-7890', email: 'test_user@bookem.com', - program: { - _id: new mongoose.Types.ObjectId(), - tagName: 'BNFK', - }, + program: new mongoose.Types.ObjectId(), requireApplication: true, volunteers: [], tags: [], diff --git a/package-lock.json b/package-lock.json index 242b3482..16a054f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -188,16 +188,16 @@ "optional": true }, "node_modules/@aws-sdk/client-cognito-identity": { - "version": "3.441.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.441.0.tgz", - "integrity": "sha512-0BYe2YAoAIF2GdonU6IcrUb/r2pYJHICzqOCi85ixAiGKYokBSl53P7x17DkA7J2mjLWTv+S9nvuVa2RG/L7bA==", + "version": "3.445.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.445.0.tgz", + "integrity": "sha512-9+RX5yaSZH1IvzExpI4rmaWxm/BHKoNERmzZDGor7tasi3XH5iz3OPSd9OC+SFcBmxGa6C/hqoJK/xqhr5V16A==", "optional": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/client-sts": "3.441.0", - "@aws-sdk/core": "3.441.0", - "@aws-sdk/credential-provider-node": "3.441.0", + "@aws-sdk/client-sts": "3.445.0", + "@aws-sdk/core": "3.445.0", + "@aws-sdk/credential-provider-node": "3.445.0", "@aws-sdk/middleware-host-header": "3.433.0", "@aws-sdk/middleware-logger": "3.433.0", "@aws-sdk/middleware-recursion-detection": "3.433.0", @@ -238,14 +238,14 @@ } }, "node_modules/@aws-sdk/client-sso": { - "version": "3.441.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.441.0.tgz", - "integrity": "sha512-gndGymu4cEIN7WWhQ67RO0JMda09EGBlay2L8IKCHBK/65Y34FHUX1tCNbO2qezEzsi6BPW5o2n53Rd9QqpHUw==", + "version": "3.445.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.445.0.tgz", + "integrity": "sha512-me4LvqNnu6kxi+sW7t0AgMv1Yi64ikas0x2+5jv23o6Csg32w0S0xOjCTKQYahOA5CMFunWvlkFIfxbqs+Uo7w==", "optional": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/core": "3.441.0", + "@aws-sdk/core": "3.445.0", "@aws-sdk/middleware-host-header": "3.433.0", "@aws-sdk/middleware-logger": "3.433.0", "@aws-sdk/middleware-recursion-detection": "3.433.0", @@ -285,15 +285,15 @@ } }, "node_modules/@aws-sdk/client-sts": { - "version": "3.441.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.441.0.tgz", - "integrity": "sha512-GL0Cw2v7XL1cn0T+Sk5VHLlgBJoUdMsysXsHa1mFdk0l6XHMAAnwXVXiNnjmoDSPrG0psz7dL2AKzPVRXbIUjA==", + "version": "3.445.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.445.0.tgz", + "integrity": "sha512-ogbdqrS8x9O5BTot826iLnTQ6i4/F5BSi/74gycneCxYmAnYnyUBNOWVnynv6XZiEWyDJQCU2UtMd52aNGW1GA==", "optional": true, "dependencies": { "@aws-crypto/sha256-browser": "3.0.0", "@aws-crypto/sha256-js": "3.0.0", - "@aws-sdk/core": "3.441.0", - "@aws-sdk/credential-provider-node": "3.441.0", + "@aws-sdk/core": "3.445.0", + "@aws-sdk/credential-provider-node": "3.445.0", "@aws-sdk/middleware-host-header": "3.433.0", "@aws-sdk/middleware-logger": "3.433.0", "@aws-sdk/middleware-recursion-detection": "3.433.0", @@ -336,24 +336,25 @@ } }, "node_modules/@aws-sdk/core": { - "version": "3.441.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.441.0.tgz", - "integrity": "sha512-gV0eQwR0VnSPUYAbgDkbBtfXbSpZgl/K6UB13DP1IFFjQYbF/BxYwvcQe4jHoPOBifSgjEbl8MfOOeIyI7k9vg==", + "version": "3.445.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.445.0.tgz", + "integrity": "sha512-6GYLElUG1QTOdmXG8zXa+Ull9IUeSeItKDYHKzHYfIkbsagMfYlf7wm9XIYlatjtgodNfZ3gPHAJfRyPmwKrsg==", "optional": true, "dependencies": { - "@smithy/smithy-client": "^2.1.12" + "@smithy/smithy-client": "^2.1.12", + "tslib": "^2.5.0" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@aws-sdk/credential-provider-cognito-identity": { - "version": "3.441.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.441.0.tgz", - "integrity": "sha512-mIs5vI3zcN/iVyUwpVdEhmFsUFX0x95aGErVh1ratX7fHdtENdSt0X5Bn3yQowze1DRUJBahqsPZuxe35gUt8w==", + "version": "3.445.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.445.0.tgz", + "integrity": "sha512-IREle9ULafOYK5sjzA+pbxKqn/0G+bnf7mVwRhFPtmz/7/cTLCdbHyw2c1A8DXBwZw1CW30JOA+YUZbZXYJJ/g==", "optional": true, "dependencies": { - "@aws-sdk/client-cognito-identity": "3.441.0", + "@aws-sdk/client-cognito-identity": "3.445.0", "@aws-sdk/types": "3.433.0", "@smithy/property-provider": "^2.0.0", "@smithy/types": "^2.4.0", @@ -399,14 +400,14 @@ } }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.441.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.441.0.tgz", - "integrity": "sha512-SQipQYxYqDUuSOfIhDmaTdwPTcndGQotGZXWJl56mMWqAhU8MkwjK+oMf3VgRt/umJC0QwUCF5HUHIj7gSB1JA==", + "version": "3.445.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.445.0.tgz", + "integrity": "sha512-R7IYSGjNZ5KKJwQJ2HNPemjpAMWvdce91i8w+/aHfqeGfTXrmYJu99PeGRyyBTKEumBaojyjTRvmO8HzS+/l7g==", "optional": true, "dependencies": { "@aws-sdk/credential-provider-env": "3.433.0", "@aws-sdk/credential-provider-process": "3.433.0", - "@aws-sdk/credential-provider-sso": "3.441.0", + "@aws-sdk/credential-provider-sso": "3.445.0", "@aws-sdk/credential-provider-web-identity": "3.433.0", "@aws-sdk/types": "3.433.0", "@smithy/credential-provider-imds": "^2.0.0", @@ -420,15 +421,15 @@ } }, "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.441.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.441.0.tgz", - "integrity": "sha512-WB9p37yHq6fGJt6Vll29ijHbkh9VDbPM/n5ns73bTAgFD7R0ht5kPmdmHGQA6m3RKjcHLPbymQ3lXykkMwWf/Q==", + "version": "3.445.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.445.0.tgz", + "integrity": "sha512-zI4k4foSjQRKNEsouculRcz7IbLfuqdFxypDLYwn+qPNMqJwWJ7VxOOeBSPUpHFcd7CLSfbHN2JAhQ7M02gPTA==", "optional": true, "dependencies": { "@aws-sdk/credential-provider-env": "3.433.0", - "@aws-sdk/credential-provider-ini": "3.441.0", + "@aws-sdk/credential-provider-ini": "3.445.0", "@aws-sdk/credential-provider-process": "3.433.0", - "@aws-sdk/credential-provider-sso": "3.441.0", + "@aws-sdk/credential-provider-sso": "3.445.0", "@aws-sdk/credential-provider-web-identity": "3.433.0", "@aws-sdk/types": "3.433.0", "@smithy/credential-provider-imds": "^2.0.0", @@ -458,12 +459,12 @@ } }, "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.441.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.441.0.tgz", - "integrity": "sha512-pTg16G+62mWCE8yGKuQnEBqPdpG5g71remf2jUqXaI1c7GCzbnkQDV9eD4DaAGOvzIs0wo9zAQnS2kVDPFlCYA==", + "version": "3.445.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.445.0.tgz", + "integrity": "sha512-gJz7kAiDecdhtApgXnxfZsXKsww8BnifDF9MAx9Dr4X6no47qYsCCS3XPuEyRiF9VebXvHOH0H260Zp3bVyniQ==", "optional": true, "dependencies": { - "@aws-sdk/client-sso": "3.441.0", + "@aws-sdk/client-sso": "3.445.0", "@aws-sdk/token-providers": "3.438.0", "@aws-sdk/types": "3.433.0", "@smithy/property-provider": "^2.0.0", @@ -491,21 +492,21 @@ } }, "node_modules/@aws-sdk/credential-providers": { - "version": "3.441.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.441.0.tgz", - "integrity": "sha512-DLx7s9/YR1CwWSjVmDMKLhyWrBXOFY3RtDLXh7AD4CAEGjhNr9mYWILMk4E6RtXl1ZhRKTMlkrUQnxNTwmct1w==", + "version": "3.445.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.445.0.tgz", + "integrity": "sha512-EyIlOSfBiDDhXrWfVUcUZjU1kFDRL1ccOiSYnP9aOg/vxtzOhsSGyfU6JVMMLFGhv/tdiqJXjCHiyZj2qddYiA==", "optional": true, "dependencies": { - "@aws-sdk/client-cognito-identity": "3.441.0", - "@aws-sdk/client-sso": "3.441.0", - "@aws-sdk/client-sts": "3.441.0", - "@aws-sdk/credential-provider-cognito-identity": "3.441.0", + "@aws-sdk/client-cognito-identity": "3.445.0", + "@aws-sdk/client-sso": "3.445.0", + "@aws-sdk/client-sts": "3.445.0", + "@aws-sdk/credential-provider-cognito-identity": "3.445.0", "@aws-sdk/credential-provider-env": "3.433.0", "@aws-sdk/credential-provider-http": "3.435.0", - "@aws-sdk/credential-provider-ini": "3.441.0", - "@aws-sdk/credential-provider-node": "3.441.0", + "@aws-sdk/credential-provider-ini": "3.445.0", + "@aws-sdk/credential-provider-node": "3.445.0", "@aws-sdk/credential-provider-process": "3.433.0", - "@aws-sdk/credential-provider-sso": "3.441.0", + "@aws-sdk/credential-provider-sso": "3.445.0", "@aws-sdk/credential-provider-web-identity": "3.433.0", "@aws-sdk/types": "3.433.0", "@smithy/credential-provider-imds": "^2.0.0", @@ -834,30 +835,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz", - "integrity": "sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.3.tgz", + "integrity": "sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ==", "peer": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.2.tgz", - "integrity": "sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.3.tgz", + "integrity": "sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==", "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", + "@babel/generator": "^7.23.3", "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-module-transforms": "^7.23.0", + "@babel/helper-module-transforms": "^7.23.3", "@babel/helpers": "^7.23.2", - "@babel/parser": "^7.23.0", + "@babel/parser": "^7.23.3", "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.2", - "@babel/types": "^7.23.0", + "@babel/traverse": "^7.23.3", + "@babel/types": "^7.23.3", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -882,11 +883,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", - "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.3.tgz", + "integrity": "sha512-keeZWAV4LU3tW0qRi19HRpabC/ilM0HRBBzf9/k8FFiG4KVpiv0FIy4hHfLfFQZNhziCTPTmd59zoyv6DNISzg==", "dependencies": { - "@babel/types": "^7.23.0", + "@babel/types": "^7.23.3", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -989,9 +990,9 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz", - "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", "peer": true, "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", @@ -1155,9 +1156,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.3.tgz", + "integrity": "sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw==", "bin": { "parser": "bin/babel-parser.js" }, @@ -1166,9 +1167,9 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz", - "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz", + "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==", "dependencies": { "@babel/helper-plugin-utils": "^7.22.5" }, @@ -1204,18 +1205,18 @@ } }, "node_modules/@babel/traverse": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", - "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.3.tgz", + "integrity": "sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ==", "dependencies": { "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", + "@babel/generator": "^7.23.3", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.0", - "@babel/types": "^7.23.0", + "@babel/parser": "^7.23.3", + "@babel/types": "^7.23.3", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1232,9 +1233,9 @@ } }, "node_modules/@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.3.tgz", + "integrity": "sha512-OZnvoH2l8PK5eUvEcUyCt/sXgr/h+UWpVuBbOljwcrAgUl6lpchoQ++PHGyQy1AtYnVA6CEq3y5xeEI10brpXw==", "dependencies": { "@babel/helper-string-parser": "^7.22.5", "@babel/helper-validator-identifier": "^7.22.20", @@ -1747,12 +1748,12 @@ } }, "node_modules/@smithy/config-resolver": { - "version": "2.0.16", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.16.tgz", - "integrity": "sha512-1k+FWHQDt2pfpXhJsOmNMmlAZ3NUQ98X5tYsjQhVGq+0X6cOBMhfh6Igd0IX3Ut6lEO6DQAdPMI/blNr3JZfMQ==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.17.tgz", + "integrity": "sha512-iQ8Q8ojqiPqRKdybDI1g7HvG8EcnekRnH3DYeNTrT26vDuPq2nomyMCc0DZnPW+uAUcLCGZpAmGTAvEOYX55wA==", "optional": true, "dependencies": { - "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-config-provider": "^2.1.4", "@smithy/types": "^2.4.0", "@smithy/util-config-provider": "^2.0.0", "@smithy/util-middleware": "^2.0.5", @@ -1763,12 +1764,12 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.0.18.tgz", - "integrity": "sha512-QnPBi6D2zj6AHJdUTo5zXmk8vwHJ2bNevhcVned1y+TZz/OI5cizz5DsYNkqFUIDn8tBuEyKNgbmKVNhBbuY3g==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.1.0.tgz", + "integrity": "sha512-amqeueHM3i02S6z35WlXp7gejBnRloT5ctR/mQLlg/6LWGd70Avc2epzuuWtCptNg2ak5/yODD1fAVs9NPCyqg==", "optional": true, "dependencies": { - "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-config-provider": "^2.1.4", "@smithy/property-provider": "^2.0.13", "@smithy/types": "^2.4.0", "@smithy/url-parser": "^2.0.12", @@ -1855,14 +1856,14 @@ } }, "node_modules/@smithy/middleware-endpoint": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.1.3.tgz", - "integrity": "sha512-ZrQ0/YX6hNVTxqMEHtEaDbDv6pNeEji/a5Vk3HuFC5R3ZY8lfoATyxmOGxBVYnF3NUvZLNC7umEv1WzWGWvCGQ==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.1.4.tgz", + "integrity": "sha512-fNUTsdTkM/RUu77AljH7fD3O0sFKDPNn1dFMR1oLAuJLOq4r6yjnL7Uc/F7wOgzgw1KRqqEnqAZccyAX2iEa4Q==", "optional": true, "dependencies": { "@smithy/middleware-serde": "^2.0.12", - "@smithy/node-config-provider": "^2.1.3", - "@smithy/shared-ini-file-loader": "^2.2.2", + "@smithy/node-config-provider": "^2.1.4", + "@smithy/shared-ini-file-loader": "^2.2.3", "@smithy/types": "^2.4.0", "@smithy/url-parser": "^2.0.12", "@smithy/util-middleware": "^2.0.5", @@ -1873,12 +1874,12 @@ } }, "node_modules/@smithy/middleware-retry": { - "version": "2.0.18", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.18.tgz", - "integrity": "sha512-VyrHQRldGSb3v9oFOB5yPxmLT7U2sQic2ytylOnYlnsmVOLlFIaI6sW22c+w2675yq+XZ6HOuzV7x2OBYCWRNA==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.19.tgz", + "integrity": "sha512-VMS1GHxLpRnuLHrPTj/nb9aD99jJsNzWX07F00fIuV9lkz3lWP7RUM7P1aitm0+4YfhShPn+Wri8/CuoqPOziA==", "optional": true, "dependencies": { - "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-config-provider": "^2.1.4", "@smithy/protocol-http": "^3.0.8", "@smithy/service-error-classification": "^2.0.5", "@smithy/types": "^2.4.0", @@ -1927,13 +1928,13 @@ } }, "node_modules/@smithy/node-config-provider": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.3.tgz", - "integrity": "sha512-J6lXvRHGVnSX3n1PYi+e1L5HN73DkkJpUviV3Ebf+8wSaIjAf+eVNbzyvh/S5EQz7nf4KVfwbD5vdoZMAthAEQ==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.4.tgz", + "integrity": "sha512-kROLnHFatpimtmZ8YefsRRb5OJ8LVIVNhUWp67KHL4D2Vjd+WpIHMzWtkLLV4p0qXpY+IxmwcL2d2XMPn8ppsQ==", "optional": true, "dependencies": { "@smithy/property-provider": "^2.0.13", - "@smithy/shared-ini-file-loader": "^2.2.2", + "@smithy/shared-ini-file-loader": "^2.2.3", "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, @@ -2023,9 +2024,9 @@ } }, "node_modules/@smithy/shared-ini-file-loader": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.2.tgz", - "integrity": "sha512-noyQUPn7b1M8uB0GEXc/Zyxq+5K2b7aaqWnLp+hgJ7+xu/FCvtyWy5eWLDjQEsHnAet2IZhS5QF8872OR69uNg==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.3.tgz", + "integrity": "sha512-VDyhCNycPbNkPidMnBgYQeSwJkoATRFm5VrveVqIPAjsdGutf7yZpPycuDWW9bRFnuuwaBhCC0pA7KCH0+2wrg==", "optional": true, "dependencies": { "@smithy/types": "^2.4.0", @@ -2168,14 +2169,14 @@ } }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "2.0.21", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.21.tgz", - "integrity": "sha512-cUEsttVZ79B7Al2rWK2FW03HBpD9LyuqFtm+1qFty5u9sHSdesr215gS2Ln53fTopNiPgeXpdoM3IgjvIO0rJw==", + "version": "2.0.22", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.22.tgz", + "integrity": "sha512-4nNsNBi4pj8nQX/cbRPzomyU/cptFr1OJckxo+nlRZdTZlj+raA8NI5sNF1kD4pyGyARuqDtWc9+xMhFHXIJmw==", "optional": true, "dependencies": { - "@smithy/config-resolver": "^2.0.16", - "@smithy/credential-provider-imds": "^2.0.18", - "@smithy/node-config-provider": "^2.1.3", + "@smithy/config-resolver": "^2.0.17", + "@smithy/credential-provider-imds": "^2.1.0", + "@smithy/node-config-provider": "^2.1.4", "@smithy/property-provider": "^2.0.13", "@smithy/smithy-client": "^2.1.12", "@smithy/types": "^2.4.0", @@ -2186,12 +2187,12 @@ } }, "node_modules/@smithy/util-endpoints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.0.2.tgz", - "integrity": "sha512-QEdq+sP68IJHAMVB2ugKVVZEWeKQtZLuf+akHzc8eTVElsZ2ZdVLWC6Cp+uKjJ/t4yOj1qu6ZzyxJQEQ8jdEjg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.0.3.tgz", + "integrity": "sha512-rMYXLMdAMVbJAEHhNlCSJsAxo3NG3lcPja7WmesjAbNrMSyYZ6FnHHTy8kzRhddn4eAtLvPBSO6LiBB21gCoHQ==", "optional": true, "dependencies": { - "@smithy/node-config-provider": "^2.1.3", + "@smithy/node-config-provider": "^2.1.4", "@smithy/types": "^2.4.0", "tslib": "^2.5.0" }, @@ -2345,15 +2346,15 @@ } }, "node_modules/@types/aria-query": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.3.tgz", - "integrity": "sha512-0Z6Tr7wjKJIk4OUEjVUQMtyunLDy339vcMaj38Kpj6jM2OE1p3S4kXExKZ7a3uXQAPCoy3sbrP1wibDKaf39oA==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz", + "integrity": "sha512-rfT93uj5s0PRL7EzccGMs3brplhcrghnDoV26NqKhCAS1hVo+WdNsPvE/yb6ilfr5hi2MEk6d5EWJTKdxg8jVw==", "dev": true }, "node_modules/@types/bcrypt": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@types/bcrypt/-/bcrypt-5.0.1.tgz", - "integrity": "sha512-dIIrEsLV1/v0AUNI8oHMaRRTSeVjoy5ID8oclJavtPj8CwPJoD1eFoNXEypuu6k091brEzBeOo3LlxeAH9zRZg==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@types/bcrypt/-/bcrypt-5.0.2.tgz", + "integrity": "sha512-6atioO8Y75fNcbmj0G7UjI9lXN2pQ/IGJ2FWT4a/btd0Lk9lQalHLKhkgKVZ3r+spnmWUKfbMi1GEe9wyHQfNQ==", "dev": true, "dependencies": { "@types/node": "*" @@ -2369,9 +2370,9 @@ } }, "node_modules/@types/hoist-non-react-statics": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.4.tgz", - "integrity": "sha512-ZchYkbieA+7tnxwX/SCBySx9WwvWR8TaP5tb2jRAzwvLb/rWchGw3v0w3pqUbUvj0GCwW2Xz/AVPSk6kUGctXQ==", + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz", + "integrity": "sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg==", "dev": true, "dependencies": { "@types/react": "*", @@ -2390,9 +2391,9 @@ "integrity": "sha512-uGwPWlE0Hj972KkHtCDVwZ8O39GmyjfMane1Z3GUBGGnkZ2USDq7SxLpVIiIHpweY9DS0QTDH0Nw7RNBsAAZ5A==" }, "node_modules/@types/prop-types": { - "version": "15.7.9", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.9.tgz", - "integrity": "sha512-n1yyPsugYNSmHgxDFjicaI2+gCNjsBck8UX9kuofAKlc0h1bL+20oSF72KeNaW2DUlesbEVCFgyV2dPGTiY42g==", + "version": "15.7.10", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.10.tgz", + "integrity": "sha512-mxSnDQxPqsZxmeShFH+uwQ4kO4gcJcGahjjMFeLbKE95IAZiiZyiEepGZjtXJ7hN/yfu0bu9xN2ajcU0JcxX6A==", "dev": true }, "node_modules/@types/react": { @@ -2416,9 +2417,9 @@ } }, "node_modules/@types/scheduler": { - "version": "0.16.5", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.5.tgz", - "integrity": "sha512-s/FPdYRmZR8SjLWGMCuax7r3qCWQw9QKHzXVukAuuIJkXkDRwp+Pu5LMIVFi0Fxbav35WURicYr8u1QsoybnQw==", + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.6.tgz", + "integrity": "sha512-Vlktnchmkylvc9SnwwwozTv04L/e1NykF5vgoQ0XTmI8DD+wxfjQuHuvHS3p0r2jz2x2ghPs2h1FVeDirIteWA==", "dev": true }, "node_modules/@types/sinonjs__fake-timers": { @@ -2428,15 +2429,15 @@ "dev": true }, "node_modules/@types/sizzle": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.5.tgz", - "integrity": "sha512-tAe4Q+OLFOA/AMD+0lq8ovp8t3ysxAOeaScnfNdZpUxaGl51ZMDEITxkvFl1STudQ58mz6gzVGl9VhMKhwRnZQ==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.6.tgz", + "integrity": "sha512-m04Om5Gz6kbjUwAQ7XJJQ30OdEFsSmAVsvn4NYwcTRyMVpKKa1aPuESw1n2CxS5fYkOQv3nHgDKeNa8e76fUkw==", "dev": true }, "node_modules/@types/styled-components": { - "version": "5.1.29", - "resolved": "https://registry.npmjs.org/@types/styled-components/-/styled-components-5.1.29.tgz", - "integrity": "sha512-5h/ah9PAblggQ6Laa4peplT4iY5ddA8qM1LMD4HzwToUWs3hftfy0fayeRgbtH1JZUdw5CCaowmz7Lnb8SjIxQ==", + "version": "5.1.30", + "resolved": "https://registry.npmjs.org/@types/styled-components/-/styled-components-5.1.30.tgz", + "integrity": "sha512-xxJqw0s1myRTgrzHgG5tKHS9hK+KNhjbKMXDWlHRo9eDNVVUqf147QUGYUqwyCDkFyGr2pi1qJKFMEy0ACZb0A==", "dev": true, "dependencies": { "@types/hoist-non-react-statics": "*", @@ -2445,9 +2446,9 @@ } }, "node_modules/@types/webidl-conversions": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.2.tgz", - "integrity": "sha512-uNv6b/uGRLlCVmelat2rA8bcVd3k/42mV2EmjhPh6JLkd35T5bgwR/t6xy7a9MWhd9sixIeBUzhBenvk3NO+DQ==" + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", + "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==" }, "node_modules/@types/whatwg-url": { "version": "8.2.2", @@ -2459,9 +2460,9 @@ } }, "node_modules/@types/yauzl": { - "version": "2.10.2", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.2.tgz", - "integrity": "sha512-Km7XAtUIduROw7QPgvcft0lIupeG8a8rdKL8RiSyKvlE7dYY31fEn41HVuQsRFDuROA8tA4K2UVL+WdfFmErBA==", + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", "dev": true, "optional": true, "dependencies": { @@ -2469,15 +2470,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.9.1.tgz", - "integrity": "sha512-C7AK2wn43GSaCUZ9do6Ksgi2g3mwFkMO3Cis96kzmgudoVaKyt62yNzJOktP0HDLb/iO2O0n2lBOzJgr6Q/cyg==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.10.0.tgz", + "integrity": "sha512-+sZwIj+s+io9ozSxIWbNB5873OSdfeBEH/FR0re14WLI6BaKuSOnnwCJ2foUiu8uXf4dRp1UqHP0vrZ1zXGrog==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.9.1", - "@typescript-eslint/types": "6.9.1", - "@typescript-eslint/typescript-estree": "6.9.1", - "@typescript-eslint/visitor-keys": "6.9.1", + "@typescript-eslint/scope-manager": "6.10.0", + "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/typescript-estree": "6.10.0", + "@typescript-eslint/visitor-keys": "6.10.0", "debug": "^4.3.4" }, "engines": { @@ -2497,13 +2498,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.9.1.tgz", - "integrity": "sha512-38IxvKB6NAne3g/+MyXMs2Cda/Sz+CEpmm+KLGEM8hx/CvnSRuw51i8ukfwB/B/sESdeTGet1NH1Wj7I0YXswg==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz", + "integrity": "sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.9.1", - "@typescript-eslint/visitor-keys": "6.9.1" + "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/visitor-keys": "6.10.0" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2514,9 +2515,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.9.1.tgz", - "integrity": "sha512-BUGslGOb14zUHOUmDB2FfT6SI1CcZEJYfF3qFwBeUrU6srJfzANonwRYHDpLBuzbq3HaoF2XL2hcr01c8f8OaQ==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.10.0.tgz", + "integrity": "sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -2527,13 +2528,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.1.tgz", - "integrity": "sha512-U+mUylTHfcqeO7mLWVQ5W/tMLXqVpRv61wm9ZtfE5egz7gtnmqVIw9ryh0mgIlkKk9rZLY3UHygsBSdB9/ftyw==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz", + "integrity": "sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.9.1", - "@typescript-eslint/visitor-keys": "6.9.1", + "@typescript-eslint/types": "6.10.0", + "@typescript-eslint/visitor-keys": "6.10.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -2554,12 +2555,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.1.tgz", - "integrity": "sha512-MUaPUe/QRLEffARsmNfmpghuQkW436DvESW+h+M52w0coICHRfD6Np9/K6PdACwnrq1HmuLl+cSPZaJmeVPkSw==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz", + "integrity": "sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.9.1", + "@typescript-eslint/types": "6.10.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -2962,9 +2963,9 @@ } }, "node_modules/aws-sdk": { - "version": "2.1488.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1488.0.tgz", - "integrity": "sha512-rRsOrIyqb/11T9VT65WSkTGC4yjI9z9IWKrwaZBhsqYJmqD2tj02CT9e1J6VNHqQbd+/rbKTddSKOWLjyjLXBQ==", + "version": "2.1493.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1493.0.tgz", + "integrity": "sha512-fnOoakH7HUHWDPjnXuCoy3KR+4Fn+Z76ZZjLUbsljzOdy1aBiN5C+cnrEnV8wWKI1dUjU6C1nwEystzi50HHyA==", "dependencies": { "buffer": "4.9.2", "events": "1.1.1", @@ -3006,9 +3007,9 @@ } }, "node_modules/axios": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", - "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", + "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -3132,7 +3133,7 @@ }, "node_modules/bookem-shared": { "version": "1.0.0", - "resolved": "git+ssh://git@github.com/ChangePlusPlusVandy/bookem-shared.git#5d3ea9b9fabcff503fe40dec39737eb1d6ecb6f1", + "resolved": "git+ssh://git@github.com/ChangePlusPlusVandy/bookem-shared.git#06fb012e7a795a6ce40ecebac8643f0b5c0e9aa9", "license": "ISC", "dependencies": { "mongoose": "^6.8.3" @@ -3637,9 +3638,9 @@ } }, "node_modules/cypress/node_modules/@types/node": { - "version": "16.18.60", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.60.tgz", - "integrity": "sha512-ZUGPWx5vKfN+G2/yN7pcSNLkIkXEvlwNaJEd4e0ppX7W2S8XAkdc/37hM4OUNJB9sa0p12AOvGvxL4JCPiz9DA==", + "version": "16.18.61", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.61.tgz", + "integrity": "sha512-k0N7BqGhJoJzdh6MuQg1V1ragJiXTh8VUBAZTWjJ9cUq23SG0F0xavOwZbhiP4J3y20xd6jxKx+xNUhkMAi76Q==", "dev": true }, "node_modules/cypress/node_modules/buffer": { @@ -3742,15 +3743,15 @@ } }, "node_modules/deep-equal": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.2.tgz", - "integrity": "sha512-xjVyBf0w5vH0I42jdAZzOKVldmPgSulmiyPRywoyq7HXC9qdgo17kxJE+rdnif5Tz6+pIrpJI8dCpMNLIGkUiA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", + "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", "dev": true, "dependencies": { "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", + "call-bind": "^1.0.5", "es-get-iterator": "^1.1.3", - "get-intrinsic": "^1.2.1", + "get-intrinsic": "^1.2.2", "is-arguments": "^1.1.1", "is-array-buffer": "^3.0.2", "is-date-object": "^1.0.5", @@ -3760,11 +3761,14 @@ "object-is": "^1.1.5", "object-keys": "^1.1.1", "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.0", + "regexp.prototype.flags": "^1.5.1", "side-channel": "^1.0.4", "which-boxed-primitive": "^1.0.2", "which-collection": "^1.0.1", - "which-typed-array": "^1.1.9" + "which-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3923,9 +3927,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.576", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.576.tgz", - "integrity": "sha512-yXsZyXJfAqzWk1WKryr0Wl0MN2D47xodPvEEwlVePBnhU5E7raevLQR+E6b9JAD3GfL/7MbAL9ZtWQQPcLx7wA==", + "version": "1.4.580", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.580.tgz", + "integrity": "sha512-T5q3pjQon853xxxHUq3ZP68ZpvJHuSMY2+BZaW3QzjS4HvNuvsMmZ/+lU+nCrftre1jFZ+OSlExynXWBihnXzw==", "peer": true }, "node_modules/emoji-regex": { @@ -4709,9 +4713,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -6922,9 +6926,9 @@ } }, "node_modules/mongoose": { - "version": "6.12.2", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.12.2.tgz", - "integrity": "sha512-3XXhSAB4PcJBd0sfqyi+LdVb3brVoIFh5kB/gpnrKcD54tmWdEI4Y8xjiiBx773U9IV3Mv4GxFVCy9/lvXMMyg==", + "version": "6.12.3", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.12.3.tgz", + "integrity": "sha512-MNJymaaXali7w7rHBxVUoQ3HzHHMk/7I/+yeeoSa4rUzdjZwIWQznBNvVgc0A8ghuJwsuIkb5LyLV6gSjGjWyQ==", "dependencies": { "bson": "^4.7.2", "kareem": "2.5.1", @@ -6972,9 +6976,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "funding": [ { "type": "github", diff --git a/pages/api/scripts/02-insert-tags-programs.ts b/pages/api/scripts/02-insert-tags-programs.ts new file mode 100644 index 00000000..9a061ce0 --- /dev/null +++ b/pages/api/scripts/02-insert-tags-programs.ts @@ -0,0 +1,51 @@ +import dbConnect from '@/lib/dbConnect'; +import { NextApiRequest, NextApiResponse } from 'next'; +import Tags from 'bookem-shared/src/models/Tags'; +import VolunteerPrograms from 'bookem-shared/src/models/VolunteerPrograms'; +import { INSERTED_PROGRAMS, INSERTED_TAGS } from './constants'; +import { generateProgram, generateTag } from './helper-functions'; + +export default async function handler( + req: NextApiRequest, + res: NextApiResponse +) { + switch (req.method) { + case 'GET': + try { + // Connect to the database + await dbConnect(); + + // TODO: + // delete all tags + await Tags.deleteMany({}); + + // delete all programs + await VolunteerPrograms.deleteMany({}); + + // Generate programs + INSERTED_PROGRAMS.forEach(async program => { + const generatedProgram = generateProgram(program); + await VolunteerPrograms.insertMany(generatedProgram); + }); + + // Generate tags + INSERTED_TAGS.forEach(async tag => { + const genratedTag = generateTag(tag); + await Tags.insertMany(genratedTag); + }); + + res.status(200).json({ + success: true, + message: 'Inserted fake tags and program data', + }); + } catch (error: any) { + res.status(500).json({ success: false, error: error.message }); + } + + break; + + default: + res.status(400).json({ success: false }); + break; + } +} diff --git a/pages/api/scripts/02-insert-events.ts b/pages/api/scripts/03-insert-events.ts similarity index 53% rename from pages/api/scripts/02-insert-events.ts rename to pages/api/scripts/03-insert-events.ts index bce1d5bc..d598812e 100644 --- a/pages/api/scripts/02-insert-events.ts +++ b/pages/api/scripts/03-insert-events.ts @@ -1,8 +1,23 @@ import dbConnect from '@/lib/dbConnect'; import VolunteerEvents from 'bookem-shared/src/models/VolunteerEvents'; import { NextApiRequest, NextApiResponse } from 'next'; -import { generateEvent } from '@/pages/api/scripts/helper-functions'; -import { EventStatus } from '@/pages/api/scripts/constants'; +import { + fillProgramEvents, + generateEvent, + generateProgram, + generateTag, +} from '@/pages/api/scripts/helper-functions'; +import { + INSERTED_PROGRAMS, + INSERTED_TAGS, +} from '@/pages/api/scripts/constants'; +import Tags from 'bookem-shared/src/models/Tags'; +import VolunteerPrograms from 'bookem-shared/src/models/VolunteerPrograms'; +import { + QueriedTagData, + QueriedVolunteerEventData, + QueriedVolunteerProgramData, +} from 'bookem-shared/src/types/database'; export default async function handler( req: NextApiRequest, @@ -17,19 +32,34 @@ export default async function handler( // delete all events await VolunteerEvents.deleteMany({}); + // get all tags + const tags = await Tags.find({}); + + // get all programs + const programs = await VolunteerPrograms.find({}); + // create a bulk operation to minimize the number of db calls const bulkEvents = VolunteerEvents.collection.initializeUnorderedBulkOp(); // insert a bunch of equally distributed events for (let i = 0; i < 100; i++) { - const event = generateEvent(i); + const event = generateEvent( + i, + tags as QueriedTagData[], + programs as QueriedVolunteerProgramData[] + ); bulkEvents.insert(event); } // execute the bulk operation await bulkEvents.execute(); + // Query them back to update program + const events = await VolunteerEvents.find({ program: { $ne: null } }); + // Update programs so that programs contain their corresponding events + await fillProgramEvents(events); + res.status(200).json({ success: true, message: diff --git a/pages/api/scripts/constants.ts b/pages/api/scripts/constants.ts index a9e44083..2b6ab235 100644 --- a/pages/api/scripts/constants.ts +++ b/pages/api/scripts/constants.ts @@ -8,55 +8,58 @@ export const GENDERS = ['male', 'female']; // ------------------ CONFIGURATIONS ------------------ export const EVENTS: { name: string; - tag: string; + program: string; isMultipleDays: boolean; requireApplication: boolean; + tags?: string[]; }[] = [ { name: 'Distribute books', - tag: 'BFNK', + program: 'BFNK', isMultipleDays: false, requireApplication: false, }, { name: 'Reading role model', - tag: 'RFR', + program: 'RFR', isMultipleDays: true, requireApplication: true, }, { name: 'Book drive', - tag: '', + program: '', isMultipleDays: false, requireApplication: false, }, { name: 'Special event', - tag: '', + program: '', isMultipleDays: false, requireApplication: false, }, { name: 'Interactive reading', - tag: 'RIF', + program: 'RIF', isMultipleDays: true, requireApplication: true, }, { name: 'Book sort, clean, process', - tag: '', + program: '', isMultipleDays: false, requireApplication: false, }, { name: 'Office work', - tag: '', + program: '', + tags: ['saved'], isMultipleDays: false, requireApplication: false, }, { name: 'Book bus', - tag: '', + program: '', + tags: ['hidden'], isMultipleDays: false, requireApplication: false, }, @@ -64,24 +67,27 @@ export const EVENTS: { export const INSERTED_TAGS = [ { - _id: new mongoose.Types.ObjectId('642a4dec74c697623278344d'), - tagName: 'RIF', + _id: new mongoose.Types.ObjectId('642a4e0a74c6976232783450'), + tagName: 'saved', }, { - _id: new mongoose.Types.ObjectId('642a4dfc74c697623278344e'), - tagName: 'RFR', + _id: new mongoose.Types.ObjectId('642a4e1274c6976232783451'), + tagName: 'hidden', }, +]; + +export const INSERTED_PROGRAMS = [ { - _id: new mongoose.Types.ObjectId('642a4e0474c697623278344f'), - tagName: 'BFNK', + _id: new mongoose.Types.ObjectId('642a4dec74c697623278344d'), + name: 'RIF', }, { - _id: new mongoose.Types.ObjectId('642a4e0a74c6976232783450'), - tagName: 'saved', + _id: new mongoose.Types.ObjectId('642a4dfc74c697623278344e'), + name: 'RFR', }, { - _id: new mongoose.Types.ObjectId('642a4e1274c6976232783451'), - tagName: 'hidden', + _id: new mongoose.Types.ObjectId('642a4e0474c697623278344f'), + name: 'BFNK', }, ]; diff --git a/pages/api/scripts/helper-functions.ts b/pages/api/scripts/helper-functions.ts index ba8b4738..00607cf6 100644 --- a/pages/api/scripts/helper-functions.ts +++ b/pages/api/scripts/helper-functions.ts @@ -3,7 +3,11 @@ import { hash } from 'bcrypt'; import { AdminStatus, QueriedTagData, + QueriedVolunteerEventData, + QueriedVolunteerProgramData, + TagData, VolunteerEventData, + VolunteerProgramData, } from 'bookem-shared/src/types/database'; import { AdminData, UserData } from 'bookem-shared/src/types/database'; import { @@ -13,6 +17,8 @@ import { INSERTED_TAGS, SOURCES, } from '@/pages/api/scripts/constants'; +import Tags from 'bookem-shared/src/models/Tags'; +import VolunteerPrograms from 'bookem-shared/src/models/VolunteerPrograms'; const generatePhone = (): string => { const phone = `(${faker.random.numeric(3)}) ${faker.random.numeric( @@ -52,7 +58,8 @@ export const generateUser = async ({ expirationDate: new Date(), }, events: [], - tags: [], + programs: [], + // tags: [], }); export const generateAdmin = async (): Promise => ({ @@ -65,7 +72,11 @@ export const generateAdmin = async (): Promise => ({ }); // ------------------ insert-events.ts ------------------ -export const generateEvent = (i: number): VolunteerEventData => { +export const generateEvent = ( + i: number, + tags: QueriedTagData[], + programs: QueriedVolunteerProgramData[] +): VolunteerEventData => { // get index of event const indexOfEvent = i % EVENTS.length; @@ -74,11 +85,18 @@ export const generateEvent = (i: number): VolunteerEventData => { // get an array containing just the tag id of this event const tagIds = ( - INSERTED_TAGS.filter(tag => - chosenEvent.tag.includes(tag.tagName) + tags.filter( + tag => chosenEvent.tags && chosenEvent.tags.includes(tag.tagName) ) as QueriedTagData[] ).map(tag => tag._id); + // get an array containing just the program id of this event + const programIds = ( + programs.filter( + program => chosenEvent.program && chosenEvent.program === program.name + ) as QueriedVolunteerProgramData[] + ).map(program => program._id); + // get the start and end dates let startDate, endDate; if (chosenEvent.isMultipleDays) { @@ -103,9 +121,33 @@ export const generateEvent = (i: number): VolunteerEventData => { }, phone: generatePhone(), email: faker.internet.email(), - program: tagIds[0] || null, + program: programIds[0] || null, requireApplication: chosenEvent.requireApplication, tags: tagIds, volunteers: [], }; }; + +export const generateProgram = (program: any): VolunteerProgramData => { + return { + name: program.name, + events: [], + volunteers: [], + }; +}; + +export const fillProgramEvents = async (events: any) => { + for (const event of events) { + const program = await VolunteerPrograms.findById(event.program); + if (program) { + program.events.unshift(event._id); + await program.save(); + } + } +}; + +export const generateTag = (tag: any): TagData => { + return { + tagName: tag.tagName, + }; +}; diff --git a/pages/api/users/create.ts b/pages/api/users/create.ts index 920041a9..cac93406 100644 --- a/pages/api/users/create.ts +++ b/pages/api/users/create.ts @@ -60,7 +60,7 @@ export default async function handler( sourceHeardFrom: user.sourceHeardFrom, ethnicity: user.ethnicity, gender: user.gender, - tags: user.tags, + programs: [], events: user.events, }; diff --git a/pages/event/[pid].tsx b/pages/event/[pid].tsx index 283ad57d..f2e936bc 100644 --- a/pages/event/[pid].tsx +++ b/pages/event/[pid].tsx @@ -1,6 +1,6 @@ import Event from '@/components/Event/Event'; import { fetchData } from '@/utils/utils'; -import { QueriedVolunteerEventData } from 'bookem-shared/src/types/database'; +import { QueriedVolunteerEventDTO } from 'bookem-shared/src/types/database'; import { useRouter } from 'next/router'; import { useEffect, useState } from 'react'; @@ -12,7 +12,7 @@ const EventDetail = () => { const router = useRouter(); const { pid } = router.query; - const [event, setEvent] = useState(); + const [event, setEvent] = useState(); const [error, setError] = useState(); // use simple fetch to fetch when component is mounted diff --git a/pages/register.tsx b/pages/register.tsx index dcae5ed1..c0d9747b 100644 --- a/pages/register.tsx +++ b/pages/register.tsx @@ -133,7 +133,7 @@ const RegisterPage = () => { sourceHeardFrom: data.sourceHeardFrom, ethnicity: userEthnicity, gender: userGender, - tags: [], + programs: [], events: [], };