diff --git a/app/auth.d.ts b/app/auth.d.ts new file mode 100644 index 00000000..fc4226ee --- /dev/null +++ b/app/auth.d.ts @@ -0,0 +1,7 @@ +import type { Admin } from '~~/server/db/schema'; + +declare module '#auth-utils' { + interface User extends Admin {} +} + +export {}; diff --git a/app/components/HandleFlexStrip.vue b/app/components/HandleFlexStrip.vue deleted file mode 100644 index 7a5dfc50..00000000 --- a/app/components/HandleFlexStrip.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - diff --git a/app/components/Onboarding/KeyInput.vue b/app/components/Onboarding/KeyInput.vue index 4b62b6a8..2e64afd7 100644 --- a/app/components/Onboarding/KeyInput.vue +++ b/app/components/Onboarding/KeyInput.vue @@ -1,6 +1,6 @@ + + + + + + + + + + + + + + + + + + + + {{ register ? 'Save' : 'Continue' }} + + + + diff --git a/app/components/admin/ApplicationRow.vue b/app/components/admin/ApplicationRow.vue index fa6481c8..c79682b9 100644 --- a/app/components/admin/ApplicationRow.vue +++ b/app/components/admin/ApplicationRow.vue @@ -4,46 +4,29 @@ const props = defineProps<{ application: Application; }>(); -const user = props.applicant.user; -const resume = props.applicant.handles.find((h) => h.key == 'resume')?.value; -const isResumeAvailable = Boolean(resume); +const candidate = props.applicant.candidate; - - - - - - {{ user.firstName + ' ' + user.lastName }} - {{ user.email }} - + + + {{ candidate.firstName + ' ' + candidate.lastName }} + + + {{ candidate.email }} - - - {{ timeAgo(new Date(application.createdAt)) }} - - View Resume - diff --git a/app/components/admin/MemberCard.vue b/app/components/admin/MemberCard.vue index d85a64e0..0dc561d9 100644 --- a/app/components/admin/MemberCard.vue +++ b/app/components/admin/MemberCard.vue @@ -1,12 +1,12 @@ + + + + diff --git a/app/components/admin/ReviewTag/View.vue b/app/components/admin/ReviewTag/View.vue new file mode 100644 index 00000000..d52848f2 --- /dev/null +++ b/app/components/admin/ReviewTag/View.vue @@ -0,0 +1,114 @@ + + + + + + + + Manage Tags + + + + + + + New Review Tag + + + + + {{ errors['parent'] }} + + + + {{ errors['title'] }} + + Create + + + + + {{ reviewTagGroupVsIndex[i] }} Tags + + + + + {{ tag.title }} + + + + + + + Delete? + + + + + + + + diff --git a/app/composables/applications.ts b/app/composables/applications.ts index 6d107a50..9cd9034e 100644 --- a/app/composables/applications.ts +++ b/app/composables/applications.ts @@ -1,6 +1,6 @@ -import { type User, type UserHandle } from '~~/server/db/schema'; +import { type Candidate } from '~~/server/db/schema'; -export type Applicant = { user: User; handles: UserHandle[] }; +export type Applicant = { candidate: Candidate }; export type Applicants = Record; // applicantId <> applicant export type Application = { createdAt: Date; @@ -55,11 +55,3 @@ export function useApplications() { applications, }; } - -export function useApplicationStatus(postingId: string) { - const auth = useAuth(); - return useFetch('/api/application-status', { - query: { postingId }, - immediate: auth.isSignedIn.value, - }); -} diff --git a/app/composables/auth.ts b/app/composables/auth.ts index e875a9ea..1b7d6449 100644 --- a/app/composables/auth.ts +++ b/app/composables/auth.ts @@ -1,28 +1,24 @@ -export function useAuth() { - const session = useSessionState(); - const isSignedIn = computed(() => !!session.value?.profile); - const profile = computed(() => session.value?.profile); - - return { - session, - profile, - isSignedIn, - }; -} - -export function useSafeRedirectToLogin() { +export function useSafeRedirectToLogin(route: ReturnType) { const nextURLCookie = useCookie('oauth_next_url'); const redirectToLogin = (toPath: string | null = null) => { let nextURL = toPath; if (!toPath) { - const route = useRoute(); nextURL = route.fullPath; } nextURLCookie.value = nextURL; - return navigateTo('/login', { external: true }); + return navigateTo('/login'); + }; + + const redirectPostLogin = () => { + const nextURL = nextURLCookie.value; + nextURLCookie.value = undefined; // del cookie + if (nextURL) { + return navigateTo(nextURL); + } + return navigateTo('/admin/dashboard'); }; - return { redirectToLogin }; + return { redirectToLogin, redirectPostLogin }; } diff --git a/app/composables/members.ts b/app/composables/members.ts index 95519025..427ee487 100644 --- a/app/composables/members.ts +++ b/app/composables/members.ts @@ -1,6 +1,6 @@ import type { z } from 'zod'; import type { addMemberSchema, removeMemberSchema } from '~~/shared/schemas/setting'; -import type { User } from '~~/server/db/schema'; +import type { Admin } from '~~/server/db/schema'; type CreateMember = z.infer; type RemoveMember = z.infer; @@ -10,7 +10,7 @@ export function useMembersState() { } export async function useMembersRepository() { - return useObjectRepository({ + return useObjectRepository({ key: 'settings-members', fetchURL: '/api/settings/members', postURL: '/api/settings/members', diff --git a/app/composables/onboarding.ts b/app/composables/onboarding.ts index 14cd5ee6..7d5c6c17 100644 --- a/app/composables/onboarding.ts +++ b/app/composables/onboarding.ts @@ -3,16 +3,21 @@ import type { Step } from '~~/shared/types/general'; const steps: Step[] = [ { step: 1, + title: 'Personal Details', + icon: 'mdi:user-outline', + }, + { + step: 2, title: 'Logo', icon: 'octicon:upload-16', }, { - step: 2, + step: 3, title: 'Career Site', icon: 'icon-park-outline:config', }, { - step: 3, + step: 4, title: 'Done!', icon: 'mingcute:celebrate-line', }, diff --git a/app/composables/shortlisting.ts b/app/composables/shortlisting.ts new file mode 100644 index 00000000..7fac0393 --- /dev/null +++ b/app/composables/shortlisting.ts @@ -0,0 +1,31 @@ +import type { z } from 'zod'; +import type { ReviewTag } from '~~/server/db/schema'; +import type { + createReviewTagSchema, + deleteReviewTagSchema, + updateReviewTagSchema, +} from '~~/shared/schemas/review-tags'; + +type UpdateReviewTag = z.infer; +type CreateReviewTag = z.infer; +type DeleteReviewTag = z.infer; +export function useReviewTagsRepository() { + return useObjectRepository({ + key: 'review-tags', + fetchURL: '/api/review-tags', + postURL: '/api/review-tag', + updateURL: '/api/review-tag', + deleteURL: '/api/review-tag', + initFn: () => [], + }); +} + +// export function useReviewTagService() { +// const changing = ref(false); +// const updateReviewTag = async (options: ) => { +// try { +// changing.value = true; +// await +// } catch (error) {} +// }; +// } diff --git a/app/composables/state.ts b/app/composables/state.ts index d9af970b..fad8fac8 100644 --- a/app/composables/state.ts +++ b/app/composables/state.ts @@ -1,9 +1,4 @@ import { type CareerSiteConfig, type SEOConfig } from '~~/shared/schemas/setting'; -import type { Session } from '~~/shared/types/profile-types'; - -export function useSessionState() { - return useState('oauth_session'); -} export function useRemoteAssetBaseState() { return useState('remote-asset-base-url'); diff --git a/app/middleware/00.is-onboarded.global.ts b/app/middleware/00.is-onboarded.global.ts new file mode 100644 index 00000000..3d866d7c --- /dev/null +++ b/app/middleware/00.is-onboarded.global.ts @@ -0,0 +1,14 @@ +export default defineNuxtRouteMiddleware((to) => { + const onboardingStatus = useOnboardingStatus(); + const { redirectPostLogin } = useSafeRedirectToLogin(to); + + if (to.path.startsWith('/onboarding')) { + if (onboardingStatus.value) { + return redirectPostLogin(); + } + } else { + if (!onboardingStatus.value) { + return navigateTo('/onboarding'); + } + } +}); diff --git a/app/middleware/01.admin-auth.global.ts b/app/middleware/01.admin-auth.global.ts new file mode 100644 index 00000000..a30544f4 --- /dev/null +++ b/app/middleware/01.admin-auth.global.ts @@ -0,0 +1,23 @@ +const WHITELISTED_PATHS = ['/admin/login']; + +export default defineNuxtRouteMiddleware(async (to) => { + if (!to.path.startsWith('/admin')) return; + if (WHITELISTED_PATHS.includes(to.path)) return; + + console.log(to.path); + + const { redirectToLogin } = useSafeRedirectToLogin(to); + const { loggedIn } = useUserSession(); + + if (!loggedIn.value) { + return redirectToLogin(); + } + + const { user } = useUserSession(); + if (!user.value) { + throw createError({ + statusCode: 500, + message: 'User not available. Internal Error.', + }); + } +}); diff --git a/app/middleware/admin-auth.ts b/app/middleware/admin-auth.ts deleted file mode 100644 index d707200a..00000000 --- a/app/middleware/admin-auth.ts +++ /dev/null @@ -1,12 +0,0 @@ -export default defineNuxtRouteMiddleware(async (to) => { - const { profile, isSignedIn } = useAuth(); - const { redirectToLogin } = useSafeRedirectToLogin(); - - if (!isSignedIn.value) { - return redirectToLogin(to.fullPath); - } - - if (!profile.value?.isAdmin) { - return navigateTo('/'); - } -}); diff --git a/app/middleware/auth.ts b/app/middleware/auth.ts deleted file mode 100644 index 206899d1..00000000 --- a/app/middleware/auth.ts +++ /dev/null @@ -1,8 +0,0 @@ -export default defineNuxtRouteMiddleware((to) => { - const auth = useAuth(); - const { redirectToLogin } = useSafeRedirectToLogin(); - - if (!auth.isSignedIn) { - return redirectToLogin(to.fullPath); - } -}); diff --git a/app/middleware/is-onboarded.global.ts b/app/middleware/is-onboarded.global.ts deleted file mode 100644 index 0b892cd7..00000000 --- a/app/middleware/is-onboarded.global.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * If on onboarding page, - * - if onboarded, go to home - * - else do nothing, - * Else, - * - If not signed in, redirect to sign in - * - Else, navigate to onboarding page. - */ -export default defineNuxtRouteMiddleware((to) => { - const onboardingStatus = useOnboardingStatus(); - const auth = useAuth(); - const { redirectToLogin } = useSafeRedirectToLogin(); - - if (to.path.startsWith('/onboarding')) { - if (!auth.isSignedIn.value) { - return redirectToLogin(to.fullPath); - } - if (onboardingStatus.value) { - return navigateTo('/'); - } - return; - } - if (!onboardingStatus.value) { - return navigateTo('/onboarding'); - } -}); diff --git a/app/pages/admin/applications.vue b/app/pages/admin/applications.vue index 1acceb0f..3b088a8a 100644 --- a/app/pages/admin/applications.vue +++ b/app/pages/admin/applications.vue @@ -1,7 +1,6 @@ diff --git a/app/pages/admin/index.vue b/app/pages/admin/index.vue index 2d3d0323..f375db98 100644 --- a/app/pages/admin/index.vue +++ b/app/pages/admin/index.vue @@ -1,7 +1,4 @@ diff --git a/app/pages/admin/integrations.vue b/app/pages/admin/integrations.vue index c9f9b557..de9a62c7 100644 --- a/app/pages/admin/integrations.vue +++ b/app/pages/admin/integrations.vue @@ -1,7 +1,6 @@ + + + + + + + Login + | + + + + + + + + Login + + + Don't have an account? + Register + + + + + diff --git a/app/pages/admin/postings/edit.vue b/app/pages/admin/postings/edit.vue index 89b5e22d..260c313f 100644 --- a/app/pages/admin/postings/edit.vue +++ b/app/pages/admin/postings/edit.vue @@ -4,7 +4,6 @@ import { updateJobPostingSchema } from '~~/shared/schemas/posting'; definePageMeta({ layout: 'admin', - middleware: 'admin-auth', }); const route = useRoute(); diff --git a/app/pages/admin/postings/new.vue b/app/pages/admin/postings/new.vue index 08179359..9f20097c 100644 --- a/app/pages/admin/postings/new.vue +++ b/app/pages/admin/postings/new.vue @@ -3,7 +3,6 @@ import { createJobPostingSchema } from '~~/shared/schemas/posting'; definePageMeta({ layout: 'admin', - middleware: 'admin-auth', }); useHead({ diff --git a/app/pages/admin/settings.vue b/app/pages/admin/settings.vue index e018f6b7..4884841c 100644 --- a/app/pages/admin/settings.vue +++ b/app/pages/admin/settings.vue @@ -1,7 +1,6 @@ @@ -93,10 +72,7 @@ onMounted(async () => { - + Applied @@ -142,10 +118,7 @@ onMounted(async () => { - + Applied @@ -159,14 +132,4 @@ onMounted(async () => { - - - - - Powered By - - - - - diff --git a/app/plugins/auth.ts b/app/plugins/auth.ts deleted file mode 100644 index 8cdc24a8..00000000 --- a/app/plugins/auth.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { Session } from '~~/shared/types/profile-types'; - -export default defineNuxtPlugin(async () => { - const session = useSessionState(); - const requestFetch = useRequestFetch(); - try { - const res = await useAsyncData('oauth-sess-fetch', () => requestFetch('/api/userinfo')); - const fetchedSession = res.data.value; - session.value = fetchedSession as Session; // it's ok if data not present. - } catch (e) { - console.error('Error while fetching session', e); - } -}); diff --git a/app/utils/handles.ts b/app/utils/handles.ts deleted file mode 100644 index b42c2e36..00000000 --- a/app/utils/handles.ts +++ /dev/null @@ -1,222 +0,0 @@ -import type { Handle } from '~~/shared/types/handle-types'; - -export const getAllHandles = () => { - return handles; -}; - -export const getHandle = (id: string) => { - return handles.find((handle) => handle.id === id); -}; - -const handles: Handle[] = [ - { - id: 'github', - name: 'GitHub', - description: 'GitHub is a web-based handle for version control and collaboration in software development.', - logo: '/assets/handles/gh-logo.png', - icon: 'mdi:github', - cover: '/assets/handles/gh-cover.jpeg', - links: { - site: 'https://github.com', - linkedin: 'https://www.linkedin.com/company/github/', - twitter: 'https://twitter.com/github', - }, - verificationDto: 'oauth', - preview: '', - }, - { - id: 'stackoverflow', - name: 'Stack Overflow', - description: 'Stack Overflow empowers the world to develop technology through collective knowledge.', - logo: '/assets/handles/stackoverflow-logo.png', - icon: 'mdi:stackoverflow', - cover: '/assets/handles/stackoverflow-cover.png', - links: { - site: 'https://stackoverflow.com', - linkedin: 'https://www.linkedin.com/company/stack-overflow/', - twitter: 'https://twitter.com/stackoverflow', - }, - verificationDto: 'link', - preview: 'https://stackoverflow.com/users/123456/dumbledore', - helpText: [ - '- Go to your Stack Overflow profile', - '- Make sure you have added SAME Github ID which is connected here.', - '- If not, add it first.', - '- Copy Profile URL & paste here.', - ], - }, - // { - // id: "leetcode", - // name: "LeetCode", - // description: "LeetCode is the best platform to help you enhance your skills, expand your knowledge and prepare for technical interviews.", - // logo: "/assets/handles/leetcode-logo.jpeg", - // cover: "/assets/handles/leetcode-cover.jpeg", - // links: { - // site: "https://leetcode.com", - // linkedin: "https://www.linkedin.com/company/leetcode/", - // twitter: "https://twitter.com/LeetCode", - // }, - // verificationDto: 'username', - // preview: 'severus-snape' - // }, - { - id: 'dribble', - name: 'Dribble', - description: 'Dribbble is the world’s leading community for creatives to share, grow, and get hired.', - logo: '/assets/handles/dribble-logo.jpeg', - icon: 'mdi:dribbble', - cover: '/assets/handles/dribble-cover.jpeg', - links: { - site: 'https://dribbble.com', - linkedin: 'https://www.linkedin.com/company/dribbble/', - twitter: 'https://twitter.com/dribbble', - }, - verificationDto: 'username', - preview: 'arthur-weasley', - helpText: [ - '- Go to your Dribble profile', - '- Make sure you have added SAME Github ID which is connected here.', - '- If not, add it first.', - '- Copy Username & paste here.', - ], - }, - // { - // id: "codeforces", - // name: "Codeforces", - // description: "Codeforces is a website that hosts competitive programming contests. It is maintained by a group of competitive programmers.", - // logo: "/assets/handles/codeforces-logo.jpeg", - // cover: "/assets/handles/placeholder.jpeg", - // links: { - // site: "https://codeforces.com", - // linkedin: "https://www.linkedin.com/company/codeforces01/", - // twitter: "https://twitter.com/codeforces", - // }, - // verificationDto: 'api-key-username', - // preview: '', - // }, - { - id: 'gitlab', - name: 'Gitlab', - description: - 'GitLab is a complete DevOps platform, delivered as a single application, fundamentally changing the way Development teams collaborate.', - logo: '/assets/handles/gitlab-logo.jpeg', - icon: 'mdi:gitlab', - cover: '/assets/handles/gitlab-cover.jpeg', - links: { - site: 'https://gitlab.com', - linkedin: 'https://www.linkedin.com/company/gitlab-com/', - twitter: 'https://twitter.com/gitlab', - }, - verificationDto: 'oauth', - preview: '', - }, - { - id: 'kaggle', - name: 'Kaggle', - description: - 'Kaggle is the world’s largest data science community with powerful tools and resources to help you achieve your data science goals.', - logo: '/assets/handles/kaggle-logo.jpeg', - icon: 'cib:kaggle', - cover: '/assets/handles/kaggle-cover.jpeg', - links: { - site: 'https://kaggle.com', - linkedin: 'https://www.linkedin.com/company/kaggle/', - twitter: 'https://twitter.com/kaggle', - }, - verificationDto: 'username', - preview: 'albus-dumbledore', - helpText: [ - '- Go to your Kaggle profile', - '- Make sure you have added SAME Github ID which is connected here.', - '- If not, add it first.', - '- Copy Username & paste here.', - ], - }, - { - id: 'producthunt', - name: 'Product Hunt', - description: 'Product Hunt is a curation of the best new products, every day.', - logo: '/assets/handles/producthunt-logo.jpeg', - icon: 'tabler:brand-producthunt', - cover: '/assets/handles/producthunt-cover.jpeg', - links: { - site: 'https://www.producthunt.com', - linkedin: 'https://www.linkedin.com/company/product-hunt/', - twitter: 'https://twitter.com/producthunt', - }, - verificationDto: 'username', - preview: 'albus-dumbledore', - helpText: [ - '- Go to your Product Hunt profile', - '- Make sure you have added SAME Github ID which is connected here.', - '- If not, add it first.', - '- Copy Username & paste here.', - ], - }, - { - id: 'devpost', - name: 'Devpost', - description: - 'Participate in online virtual and in-person hackathons to build products, practice skills and grow your network.', - logo: '/assets/handles/devpost-logo.jpeg', - icon: 'simple-icons:devpost', - cover: '/assets/handles/devpost-cover.jpeg', - links: { - site: 'https://www.devpost.com', - linkedin: 'https://br.linkedin.com/company/devpost/', - twitter: 'https://twitter.com/devpost', - }, - verificationDto: 'username', - preview: 'albus-dumbledore', - helpText: [ - '- Go to your Devpost profile', - '- Make sure you have added SAME Github ID which is connected here.', - '- If not, add it first.', - '- Copy Username & paste here.', - ], - }, - { - id: 'devto', - name: 'DEV.to', - description: - 'A constructive and inclusive social network for software developers. Open source and radically transparent.', - logo: '/assets/handles/devto-logo.jpeg', - icon: 'skill-icons:devto-light', - cover: '/assets/handles/devto-cover.jpeg', - links: { - site: 'https://www.dev.to', - linkedin: 'https://www.linkedin.com/showcase/dev-a-forem-community/', - twitter: 'https://twitter.com/ThePracticalDev', - }, - verificationDto: 'username', - preview: 'albus-dumbledore', - helpText: [ - '- Go to your Dev.to profile', - '- Make sure you have added SAME Github ID which is connected here.', - '- If not, add it first.', - '- Copy Username & paste here.', - ], - }, - { - id: 'hashnode', - name: 'Hashnode', - description: - 'The easiest way to start a blog on your personal domain 🌎 for free & connect with the readers through our dev community', - logo: '/assets/handles/hashnode-logo.jpeg', - icon: 'skill-icons:devto-light', - cover: '/assets/handles/hashnode-cover.jpeg', - links: { - site: 'https://www.hashnode.com', - linkedin: 'https://www.linkedin.com/company/hashnode', - twitter: 'https://twitter.com/hashnode', - }, - verificationDto: 'username', - preview: 'albus-dumbledore', - helpText: [ - '- Go to your Hashnode profile (NOT THE BLOG, PROFILE!)', - '- Make sure you have added SAME Github ID which is connected here.', - '- If not, add it first.', - '- Copy Username & paste here.', - ], - }, -]; diff --git a/nuxt.config.ts b/nuxt.config.ts index c90c495b..ad1cf546 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -34,6 +34,7 @@ export default defineNuxtConfig({ '@nuxtjs/google-fonts', 'nuxt-cropper', 'radix-vue/nuxt', + 'nuxt-auth-utils', ], googleFonts: { families: { diff --git a/package.json b/package.json index 2bf5fef5..d79ca614 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vidur", "description": "A truely composable, open source, recruiting software.", - "version": "1.1.0", + "version": "0.0.3", "repository": "https://github.com/profilecity/vidur", "private": true, "scripts": { @@ -42,6 +42,7 @@ "jsonwebtoken": "^9.0.2", "jwks-rsa": "^3.1.0", "nuxt": "^3.13.2", + "nuxt-auth-utils": "^0.5.7", "nuxt-cropper": "^0.0.4", "nuxt-icon": "^0.6.10", "pg": "^8.13.0", diff --git a/public/vidur-small.svg b/public/vidur-small.svg new file mode 100644 index 00000000..07e8613e --- /dev/null +++ b/public/vidur-small.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/server/api/analytics/stats.get.ts b/server/api/analytics/stats.get.ts index 50f9ca6d..5a438749 100644 --- a/server/api/analytics/stats.get.ts +++ b/server/api/analytics/stats.get.ts @@ -1,5 +1,5 @@ import { count, eq, not } from 'drizzle-orm'; -import { jobPostingsTable, usersTable } from '~~/server/db/schema'; +import { jobPostingsTable, adminsTable } from '~~/server/db/schema'; import authenticateAdminRequest from '~~/server/utils/admin'; export type Stats = { @@ -24,13 +24,7 @@ export default defineEventHandler(async (event) => { totalActiveApplicants += p.totalApplicants; }); - const totalApplicants = - ( - await db - .select({ count: count() }) - .from(usersTable) - .where(not(eq(usersTable.isAdmin, true))) - )[0]?.count || 0; + const totalApplicants = (await db.select({ count: count() }).from(adminsTable))[0]?.count || 0; const stats = { totalActivePostings, diff --git a/server/api/application/index.post.ts b/server/api/application/index.post.ts index d2da71af..e191115e 100644 --- a/server/api/application/index.post.ts +++ b/server/api/application/index.post.ts @@ -83,7 +83,6 @@ export default defineEventHandler(async (event) => { payload: { applicantId: session.user.id, postingId: body.postingId, - bearerToken: session.accessToken, }, }); diff --git a/server/api/application/index.put.ts b/server/api/application/index.put.ts new file mode 100644 index 00000000..8452254f --- /dev/null +++ b/server/api/application/index.put.ts @@ -0,0 +1,23 @@ +import { postingApplicantsTable } from '~~/server/db/schema'; +import authenticateAdminRequest from '~~/server/utils/admin'; +// import { applicationUpdateSchema } from '~~/shared/schemas/application'; + +export default defineEventHandler(async (event) => { + await authenticateAdminRequest(event); + + const body = await readBody(event); + + // TODO: fix typing + const updateApplicationRequest: any = { + id: body.id, + }; + + if (body.reviewTagId) { + updateApplicationRequest.status = body.reviewTagId; + } + + const db = await useDatabase(); + await db.update(postingApplicantsTable).set(updateApplicationRequest); + + return sendNoContent(event); +}); diff --git a/server/api/applications.get.ts b/server/api/applications.get.ts index 754712fd..538d72da 100644 --- a/server/api/applications.get.ts +++ b/server/api/applications.get.ts @@ -1,5 +1,5 @@ -import { eq, inArray } from 'drizzle-orm'; -import { postingApplicantsTable, type User, type UserHandle, userHandlesTable, usersTable } from '../db/schema'; +import { inArray } from 'drizzle-orm'; +import { postingApplicantsTable, type Candidate, candidatesTable } from '../db/schema'; import authenticateAdminRequest from '../utils/admin'; import { applicationsLookupSchema } from '~~/shared/schemas/application'; @@ -48,26 +48,19 @@ export default defineEventHandler(async (event) => { const applicantRecords = applicantIds.length > 0 ? await db - .select({ user: usersTable, handle: userHandlesTable }) - .from(usersTable) - .leftJoin(userHandlesTable, eq(usersTable.id, userHandlesTable.userId)) - .where(inArray(usersTable.id, applicantIds)) + .select({ candidate: candidatesTable }) + .from(candidatesTable) + .where(inArray(candidatesTable.id, applicantIds)) : []; - const applicants: Record = {}; + const applicants: Record = {}; applicantRecords.forEach((a) => { - applicants[a.user.id] = { - user: a.user, - handles: [], + applicants[a.candidate.id] = { + candidate: a.candidate, }; }); - applicantRecords.forEach((a) => { - if (!a.handle) return; - applicants[a.user.id]?.handles.push(a.handle); - }); - // Final validation: all candidates should be present; applicationRecords.forEach((a) => { if (!applicants[a.candidateId]) { diff --git a/server/api/login.post.ts b/server/api/login.post.ts new file mode 100644 index 00000000..704e842a --- /dev/null +++ b/server/api/login.post.ts @@ -0,0 +1,26 @@ +import { loginSchema } from '~~/shared/schemas/authentication'; +import { adminsTable } from '../db/schema'; +import { eq } from 'drizzle-orm'; + +export default defineEventHandler(async (event) => { + const body = await readValidatedBody(event, loginSchema.parse); + + const db = await useDatabase(); + + const users = await db.select().from(adminsTable).where(eq(adminsTable.email, body.email)); + + if (users.length === 1) { + const admin = users[0]!; + const isPasswordCorrect = await verifyPassword(admin.password, body.password); + if (isPasswordCorrect) { + await setUserSession(event, { + user: admin, + }); + return sendNoContent(event); + } + } + throw createError({ + statusCode: 401, + message: 'Invalid credentials', + }); +}); diff --git a/server/api/onboarding/validate-key.post.ts b/server/api/onboarding/validate-key.post.ts index 027e8f81..4efca04f 100644 --- a/server/api/onboarding/validate-key.post.ts +++ b/server/api/onboarding/validate-key.post.ts @@ -1,9 +1,7 @@ -import { eq } from 'drizzle-orm'; -import { usersTable } from '~~/server/db/schema'; -import authenticateRequest from '~~/server/utils/auth'; +import { count } from 'drizzle-orm'; +import { adminsTable } from '~~/server/db/schema'; export default defineEventHandler(async (event) => { - const session = await authenticateRequest(event); const body = await readBody(event); if (!body.key) { return createError({ @@ -16,11 +14,12 @@ export default defineEventHandler(async (event) => { if (inputKey === actualKey) { const db = await useDatabase(); - await db.update(usersTable).set({ isAdmin: true }).where(eq(usersTable.id, session.user.id)); + const registrationNeeded = (await db.select({ count: count() }).from(adminsTable))[0]!.count == 0; return { result: true, + registrationNeeded, }; } - return { result: false }; + return { result: false, registrationNeeded: false }; }); diff --git a/server/api/register.post.ts b/server/api/register.post.ts new file mode 100644 index 00000000..fe276c7f --- /dev/null +++ b/server/api/register.post.ts @@ -0,0 +1,53 @@ +import { registerSchema } from '~~/shared/schemas/authentication'; +import { adminsTable } from '../db/schema'; +import { eq } from 'drizzle-orm'; + +export default defineEventHandler(async (event) => { + const body = await readValidatedBody(event, registerSchema.parse); + + const onboardingToken = getHeader(event, 'X-Onboarding-Token'); + if (!onboardingToken) { + console.log('Here 1'); + throw createUnauthorisedError(); + } + + const actualOnboardingToken = await general_memoryStorage.getItem('firstSetupAccessKey'); + if (onboardingToken !== actualOnboardingToken) { + throw createUnauthorisedError(); + } + + const db = await useDatabase(); + + const users = await db.select({ id: adminsTable.id }).from(adminsTable).where(eq(adminsTable.email, body.email)); + const user = users && users.length === 1 ? users[0] : undefined; + + if (user) { + throw createError({ + statusCode: 400, + message: 'Email is already taken', + }); + } + + const insertedUsers = await db + .insert(adminsTable) + .values({ + firstName: body.firstName, + lastName: body.lastName, + email: body.email, + password: await hashPassword(body.password), + }) + .returning(); + + if (insertedUsers && insertedUsers.length === 1) { + const user = insertedUsers[0]!; + await setUserSession(event, { + user, + }); + return sendNoContent(event); + } + + throw createError({ + statusCode: 500, + message: 'User not created', + }); +}); diff --git a/server/api/review-tag/index.delete.ts b/server/api/review-tag/index.delete.ts index 994e6890..9c418f07 100644 --- a/server/api/review-tag/index.delete.ts +++ b/server/api/review-tag/index.delete.ts @@ -1,6 +1,6 @@ import { eq } from 'drizzle-orm'; import { z } from 'zod'; -import { ReviewTag, reviewTagsTable } from '~~/server/db/schema'; +import { type ReviewTag, reviewTagsTable } from '~~/server/db/schema'; import authenticateAdminRequest from '~~/server/utils/admin'; import { deleteReviewTagSchema } from '~~/shared/schemas/review-tags'; diff --git a/server/api/review-tag/index.post.ts b/server/api/review-tag/index.post.ts index b9bf3e7e..091329ea 100644 --- a/server/api/review-tag/index.post.ts +++ b/server/api/review-tag/index.post.ts @@ -1,4 +1,4 @@ -import { ReviewTag, reviewTagsTable } from '~~/server/db/schema'; +import { type ReviewTag, reviewTagsTable } from '~~/server/db/schema'; import authenticateAdminRequest from '~~/server/utils/admin'; import { createReviewTagSchema } from '~~/shared/schemas/review-tags'; @@ -14,7 +14,7 @@ export default defineEventHandler(async (event) => { const db = await useDatabase(); const reviewTag = ( await db.insert(reviewTagsTable).values({ title: reviewTagInput.title, parent: reviewTagInput.parent }).returning() - )[0]; + )[0]!; const reviewTags = (await general_memoryStorage.getItem('reviewTags')) || []; diff --git a/server/api/settings/members.delete.ts b/server/api/settings/members.delete.ts index 040d0656..a27c4dfa 100644 --- a/server/api/settings/members.delete.ts +++ b/server/api/settings/members.delete.ts @@ -1,7 +1,7 @@ import { eq } from 'drizzle-orm'; import { removeMemberSchema } from '~~/shared/schemas/setting'; -import { usersTable } from '~~/server/db/schema'; import authenticateAdminRequest from '~~/server/utils/admin'; +import { adminsTable } from '~~/server/db/schema'; export default defineEventHandler(async (event) => { await authenticateAdminRequest(event); @@ -10,5 +10,5 @@ export default defineEventHandler(async (event) => { const db = await useDatabase(); - await db.update(usersTable).set({ isAdmin: false }).where(eq(usersTable.id, request.id)); + await db.update(adminsTable).set({ isDeleted: true }).where(eq(adminsTable.id, request.id)); }); diff --git a/server/api/settings/members.get.ts b/server/api/settings/members.get.ts index 51b43606..ee9d4e50 100644 --- a/server/api/settings/members.get.ts +++ b/server/api/settings/members.get.ts @@ -1,12 +1,11 @@ -import { eq } from 'drizzle-orm'; -import { usersTable } from '~~/server/db/schema'; +import { adminsTable } from '~~/server/db/schema'; import authenticateAdminRequest from '~~/server/utils/admin'; export default defineEventHandler(async (event) => { await authenticateAdminRequest(event); const db = await useDatabase(); - const members = await db.select().from(usersTable).where(eq(usersTable.isAdmin, true)); + const members = await db.select().from(adminsTable); if (IS_DEV) { console.log(members.length, 'members found'); diff --git a/server/api/settings/members.post.ts b/server/api/settings/members.post.ts index ba191434..f9b0cfae 100644 --- a/server/api/settings/members.post.ts +++ b/server/api/settings/members.post.ts @@ -1,6 +1,5 @@ -import { eq } from 'drizzle-orm'; import { addMemberSchema } from '~~/shared/schemas/setting'; -import { usersTable } from '~~/server/db/schema'; +import { adminsTable } from '~~/server/db/schema'; import authenticateAdminRequest from '~~/server/utils/admin'; export default defineEventHandler(async (event) => { @@ -10,5 +9,5 @@ export default defineEventHandler(async (event) => { const db = await useDatabase(); - await db.update(usersTable).set({ isAdmin: true }).where(eq(usersTable.id, request.id)); + // await db.update(usersTable).set({ isAdmin: true }).where(eq(usersTable.id, request.id)); }); diff --git a/server/api/user/lookup.get.ts b/server/api/user/lookup.get.ts index 0e5b890c..80ce4189 100644 --- a/server/api/user/lookup.get.ts +++ b/server/api/user/lookup.get.ts @@ -1,5 +1,5 @@ import { and, eq, ilike, or } from 'drizzle-orm'; -import { usersTable } from '~~/server/db/schema'; +import { adminsTable } from '~~/server/db/schema'; import authenticateAdminRequest from '~~/server/utils/admin'; export default defineEventHandler(async (event) => { @@ -21,11 +21,10 @@ export default defineEventHandler(async (event) => { const users = await db .select() - .from(usersTable) + .from(adminsTable) .where( and( - or(ilike(usersTable.firstName, looseQ), ilike(usersTable.lastName, looseQ), ilike(usersTable.email, looseQ)), - eq(usersTable.isAdmin, false) // Only lookup for non-admins; + or(ilike(adminsTable.firstName, looseQ), ilike(adminsTable.lastName, looseQ), ilike(adminsTable.email, looseQ)) ) ); diff --git a/server/api/userinfo.ts b/server/api/userinfo.ts deleted file mode 100644 index ce01e578..00000000 --- a/server/api/userinfo.ts +++ /dev/null @@ -1,23 +0,0 @@ -import authenticateRequest from '../utils/auth'; - -export default defineEventHandler(async (event) => { - try { - const { user: profile } = await authenticateRequest(event); - const bypassAdmin = useRuntimeConfig().bypassAdmin; - - const session = { - profile: { - ...profile, - isAdmin: profile.isAdmin || bypassAdmin, - }, - }; - - return session; - } catch (e) { - // @ts-expect-error - if (e.statusCode !== 401) { - console.error(e); - } - throw e; - } -}); diff --git a/server/db/migrations/0000_adorable_annihilus.sql b/server/db/migrations/0000_adorable_annihilus.sql deleted file mode 100644 index 802ce913..00000000 --- a/server/db/migrations/0000_adorable_annihilus.sql +++ /dev/null @@ -1,53 +0,0 @@ -CREATE TABLE IF NOT EXISTS "admins" ( - "id" uuid PRIMARY KEY NOT NULL, - "name" varchar(50) NOT NULL, - "password" char(256) NOT NULL, - "permission" integer DEFAULT 0 NOT NULL, - "user_id" uuid -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "job_postings" ( - "id" uuid PRIMARY KEY NOT NULL, - "title" varchar(150) NOT NULL, - "contents" text, - "owner_id" uuid, - "is_published" boolean DEFAULT false NOT NULL, - "total_applicants" integer DEFAULT 0 NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL, - "updated_at" timestamp DEFAULT now() NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "user_handles" ( - "user_id" uuid, - "key" varchar(15) NOT NULL, - "value" text NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "users" ( - "id" uuid PRIMARY KEY NOT NULL, - "first_name" varchar(50), - "last_name" varchar(50), - "picture" text, - "email" varchar(255) NOT NULL, - "top_5_skills_csv" text, - "is_admin" boolean DEFAULT false NOT NULL, - CONSTRAINT "users_email_unique" UNIQUE("email") -); ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "admins" ADD CONSTRAINT "admins_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE set null ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "job_postings" ADD CONSTRAINT "job_postings_owner_id_admins_id_fk" FOREIGN KEY ("owner_id") REFERENCES "admins"("id") ON DELETE set null ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "user_handles" ADD CONSTRAINT "user_handles_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE cascade ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; diff --git a/server/db/migrations/0000_faithful_the_initiative.sql b/server/db/migrations/0000_faithful_the_initiative.sql new file mode 100644 index 00000000..3120490c --- /dev/null +++ b/server/db/migrations/0000_faithful_the_initiative.sql @@ -0,0 +1,83 @@ +CREATE TABLE IF NOT EXISTS "admins" ( + "id" uuid PRIMARY KEY NOT NULL, + "first_name" varchar(50) NOT NULL, + "last_name" varchar(50), + "picture" text, + "email" varchar(255) NOT NULL, + "password" char(133) NOT NULL, + "is_admin" boolean DEFAULT false NOT NULL, + "permission" integer DEFAULT 0 NOT NULL, + CONSTRAINT "admins_email_unique" UNIQUE("email") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "candidate_pool" ( + "id" uuid PRIMARY KEY NOT NULL, + "first_name" varchar(50) NOT NULL, + "last_name" varchar(50), + "email" varchar(255) NOT NULL, + CONSTRAINT "candidate_pool_email_unique" UNIQUE("email") +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "hooks" ( + "id" uuid PRIMARY KEY NOT NULL, + "title" varchar(40) NOT NULL, + "url" varchar(255) NOT NULL, + "prefs" integer DEFAULT 0 NOT NULL, + "last_executed_at" timestamp, + "created_at" timestamp DEFAULT now() NOT NULL, + "updated_at" timestamp DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "job_postings" ( + "id" uuid PRIMARY KEY NOT NULL, + "title" varchar(150) NOT NULL, + "contents" text, + "tags_csv" text, + "owner_id" uuid, + "is_published" boolean DEFAULT false NOT NULL, + "total_applicants" integer DEFAULT 0 NOT NULL, + "is_expired" boolean DEFAULT false NOT NULL, + "valid_till" date, + "created_at" timestamp DEFAULT now() NOT NULL, + "updated_at" timestamp DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "metadata_entries" ( + "key" varchar(48) PRIMARY KEY NOT NULL, + "value" text, + "created_at" timestamp DEFAULT now() NOT NULL, + "updated_at" timestamp DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "posting_applicants" ( + "id" uuid PRIMARY KEY NOT NULL, + "candidate_id" uuid NOT NULL, + "job_id" uuid NOT NULL, + "status_id" integer DEFAULT -1, + "status_type" smallint DEFAULT 0, + "created_at" timestamp DEFAULT now() NOT NULL +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "review_tags" ( + "id" serial PRIMARY KEY NOT NULL, + "title" varchar(32) NOT NULL, + "parent" smallint NOT NULL +); +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "job_postings" ADD CONSTRAINT "job_postings_owner_id_admins_id_fk" FOREIGN KEY ("owner_id") REFERENCES "public"."admins"("id") ON DELETE set null ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "posting_applicants" ADD CONSTRAINT "posting_applicants_candidate_id_candidate_pool_id_fk" FOREIGN KEY ("candidate_id") REFERENCES "public"."candidate_pool"("id") ON DELETE cascade ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "posting_applicants" ADD CONSTRAINT "posting_applicants_job_id_job_postings_id_fk" FOREIGN KEY ("job_id") REFERENCES "public"."job_postings"("id") ON DELETE cascade ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; diff --git a/server/db/migrations/0001_groovy_slapstick.sql b/server/db/migrations/0001_groovy_slapstick.sql deleted file mode 100644 index 9050fe1f..00000000 --- a/server/db/migrations/0001_groovy_slapstick.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "job_postings" ADD COLUMN "tags_csv" text; \ No newline at end of file diff --git a/server/db/migrations/0002_shocking_daredevil.sql b/server/db/migrations/0002_shocking_daredevil.sql deleted file mode 100644 index 70bab375..00000000 --- a/server/db/migrations/0002_shocking_daredevil.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "admins" DROP COLUMN IF EXISTS "password"; \ No newline at end of file diff --git a/server/db/migrations/0003_purple_cannonball.sql b/server/db/migrations/0003_purple_cannonball.sql deleted file mode 100644 index 28795639..00000000 --- a/server/db/migrations/0003_purple_cannonball.sql +++ /dev/null @@ -1,9 +0,0 @@ -ALTER TABLE "job_postings" DROP CONSTRAINT "job_postings_owner_id_admins_id_fk"; ---> statement-breakpoint -DROP TABLE "admins";--> statement-breakpoint -ALTER TABLE "users" ADD COLUMN "permission" integer DEFAULT 0 NOT NULL;--> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "job_postings" ADD CONSTRAINT "job_postings_owner_id_users_id_fk" FOREIGN KEY ("owner_id") REFERENCES "users"("id") ON DELETE set null ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; diff --git a/server/db/migrations/0004_empty_molecule_man.sql b/server/db/migrations/0004_empty_molecule_man.sql deleted file mode 100644 index 31d11c7a..00000000 --- a/server/db/migrations/0004_empty_molecule_man.sql +++ /dev/null @@ -1,18 +0,0 @@ -CREATE TABLE IF NOT EXISTS "posting_applicants" ( - "id" uuid PRIMARY KEY NOT NULL, - "owner_id" uuid, - "job_id" uuid, - "created_at" timestamp DEFAULT now() NOT NULL -); ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "posting_applicants" ADD CONSTRAINT "posting_applicants_owner_id_users_id_fk" FOREIGN KEY ("owner_id") REFERENCES "users"("id") ON DELETE set null ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "posting_applicants" ADD CONSTRAINT "posting_applicants_job_id_job_postings_id_fk" FOREIGN KEY ("job_id") REFERENCES "job_postings"("id") ON DELETE cascade ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; diff --git a/server/db/migrations/0005_overconfident_wendell_rand.sql b/server/db/migrations/0005_overconfident_wendell_rand.sql deleted file mode 100644 index cc18ff3a..00000000 --- a/server/db/migrations/0005_overconfident_wendell_rand.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE IF NOT EXISTS "hooks" ( - "id" uuid PRIMARY KEY NOT NULL, - "url" varchar(255) NOT NULL, - "prefs" integer DEFAULT 0 NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL -); diff --git a/server/db/migrations/0006_breezy_purifiers.sql b/server/db/migrations/0006_breezy_purifiers.sql deleted file mode 100644 index 6c3d3d38..00000000 --- a/server/db/migrations/0006_breezy_purifiers.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE "hooks" ADD COLUMN "title" varchar(40) NOT NULL;--> statement-breakpoint -ALTER TABLE "hooks" ADD COLUMN "last_executed_at" timestamp; -ALTER TABLE "hooks" ADD COLUMN "updated_at" timestamp DEFAULT now() NOT NULL; \ No newline at end of file diff --git a/server/db/migrations/0007_daily_owl.sql b/server/db/migrations/0007_daily_owl.sql deleted file mode 100644 index 5fef89ab..00000000 --- a/server/db/migrations/0007_daily_owl.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE IF NOT EXISTS "metadata_entries" ( - "key" varchar(48) PRIMARY KEY NOT NULL, - "value" text, - "created_at" timestamp DEFAULT now() NOT NULL, - "updated_at" timestamp DEFAULT now() NOT NULL -); diff --git a/server/db/migrations/0008_open_quentin_quire.sql b/server/db/migrations/0008_open_quentin_quire.sql deleted file mode 100644 index c9adbed2..00000000 --- a/server/db/migrations/0008_open_quentin_quire.sql +++ /dev/null @@ -1,15 +0,0 @@ -CREATE TABLE IF NOT EXISTS "review_tags" ( - "id" serial PRIMARY KEY NOT NULL, - "title" varchar(8) NOT NULL, - "parent" smallint NOT NULL -); ---> statement-breakpoint -ALTER TABLE "posting_applicants" DROP CONSTRAINT "posting_applicants_owner_id_users_id_fk"; ---> statement-breakpoint -ALTER TABLE "posting_applicants" ALTER COLUMN "owner_id" SET NOT NULL;--> statement-breakpoint -ALTER TABLE "posting_applicants" ALTER COLUMN "job_id" SET NOT NULL;--> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "posting_applicants" ADD CONSTRAINT "posting_applicants_owner_id_users_id_fk" FOREIGN KEY ("owner_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; diff --git a/server/db/migrations/0009_luxuriant_purifiers.sql b/server/db/migrations/0009_luxuriant_purifiers.sql deleted file mode 100644 index 8d682421..00000000 --- a/server/db/migrations/0009_luxuriant_purifiers.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "review_tags" ALTER COLUMN "title" SET DATA TYPE varchar(32); \ No newline at end of file diff --git a/server/db/migrations/0010_amused_hairball.sql b/server/db/migrations/0010_amused_hairball.sql deleted file mode 100644 index 583447c4..00000000 --- a/server/db/migrations/0010_amused_hairball.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "posting_applicants" ADD COLUMN "status_id" integer DEFAULT -1;--> statement-breakpoint -ALTER TABLE "posting_applicants" ADD COLUMN "status_type" smallint DEFAULT 0; \ No newline at end of file diff --git a/server/db/migrations/0011_clever_spiral.sql b/server/db/migrations/0011_clever_spiral.sql deleted file mode 100644 index 2537681e..00000000 --- a/server/db/migrations/0011_clever_spiral.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "job_postings" ADD COLUMN "is_expired" boolean DEFAULT false NOT NULL;--> statement-breakpoint -ALTER TABLE "job_postings" ADD COLUMN "valid_till" date; \ No newline at end of file diff --git a/server/db/migrations/meta/0000_snapshot.json b/server/db/migrations/meta/0000_snapshot.json index 5539a73c..16238c53 100644 --- a/server/db/migrations/meta/0000_snapshot.json +++ b/server/db/migrations/meta/0000_snapshot.json @@ -1,4 +1,6 @@ { + "id": "d0b4a1ee-e3db-4ace-8b49-a109e258b6c7", + "prevId": "00000000-0000-0000-0000-000000000000", "version": "7", "dialect": "postgresql", "tables": { @@ -12,44 +14,154 @@ "primaryKey": true, "notNull": true }, - "name": { - "name": "name", + "first_name": { + "name": "first_name", "type": "varchar(50)", "primaryKey": false, "notNull": true }, + "last_name": { + "name": "last_name", + "type": "varchar(50)", + "primaryKey": false, + "notNull": false + }, + "picture": { + "name": "picture", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "email": { + "name": "email", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, "password": { "name": "password", - "type": "char(256)", + "type": "char(133)", "primaryKey": false, "notNull": true }, + "is_admin": { + "name": "is_admin", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, "permission": { "name": "permission", "type": "integer", "primaryKey": false, "notNull": true, "default": 0 - }, - "user_id": { - "name": "user_id", + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "admins_email_unique": { + "name": "admins_email_unique", + "nullsNotDistinct": false, + "columns": ["email"] + } + } + }, + "public.candidate_pool": { + "name": "candidate_pool", + "schema": "", + "columns": { + "id": { + "name": "id", "type": "uuid", + "primaryKey": true, + "notNull": true + }, + "first_name": { + "name": "first_name", + "type": "varchar(50)", + "primaryKey": false, + "notNull": true + }, + "last_name": { + "name": "last_name", + "type": "varchar(50)", "primaryKey": false, "notNull": false + }, + "email": { + "name": "email", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true } }, "indexes": {}, - "foreignKeys": { - "admins_user_id_users_id_fk": { - "name": "admins_user_id_users_id_fk", - "tableFrom": "admins", - "columnsFrom": ["user_id"], - "tableTo": "users", - "columnsTo": ["id"], - "onUpdate": "no action", - "onDelete": "set null" + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "candidate_pool_email_unique": { + "name": "candidate_pool_email_unique", + "nullsNotDistinct": false, + "columns": ["email"] + } + } + }, + "public.hooks": { + "name": "hooks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar(40)", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "prefs": { + "name": "prefs", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "last_executed_at": { + "name": "last_executed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" } }, + "indexes": {}, + "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, @@ -75,6 +187,12 @@ "primaryKey": false, "notNull": false }, + "tags_csv": { + "name": "tags_csv", + "type": "text", + "primaryKey": false, + "notNull": false + }, "owner_id": { "name": "owner_id", "type": "uuid", @@ -95,6 +213,19 @@ "notNull": true, "default": 0 }, + "is_expired": { + "name": "is_expired", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "valid_till": { + "name": "valid_till", + "type": "date", + "primaryKey": false, + "notNull": false + }, "created_at": { "name": "created_at", "type": "timestamp", @@ -115,56 +246,54 @@ "job_postings_owner_id_admins_id_fk": { "name": "job_postings_owner_id_admins_id_fk", "tableFrom": "job_postings", - "columnsFrom": ["owner_id"], "tableTo": "admins", + "columnsFrom": ["owner_id"], "columnsTo": ["id"], - "onUpdate": "no action", - "onDelete": "set null" + "onDelete": "set null", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "public.user_handles": { - "name": "user_handles", + "public.metadata_entries": { + "name": "metadata_entries", "schema": "", "columns": { - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, "key": { "name": "key", - "type": "varchar(15)", - "primaryKey": false, + "type": "varchar(48)", + "primaryKey": true, "notNull": true }, "value": { "name": "value", "type": "text", "primaryKey": false, - "notNull": true + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" } }, "indexes": {}, - "foreignKeys": { - "user_handles_user_id_users_id_fk": { - "name": "user_handles_user_id_users_id_fk", - "tableFrom": "user_handles", - "columnsFrom": ["user_id"], - "tableTo": "users", - "columnsTo": ["id"], - "onUpdate": "no action", - "onDelete": "cascade" - } - }, + "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "public.users": { - "name": "users", + "public.posting_applicants": { + "name": "posting_applicants", "schema": "", "columns": { "id": { @@ -173,63 +302,99 @@ "primaryKey": true, "notNull": true }, - "first_name": { - "name": "first_name", - "type": "varchar(50)", + "candidate_id": { + "name": "candidate_id", + "type": "uuid", "primaryKey": false, - "notNull": false + "notNull": true }, - "last_name": { - "name": "last_name", - "type": "varchar(50)", + "job_id": { + "name": "job_id", + "type": "uuid", "primaryKey": false, - "notNull": false + "notNull": true }, - "picture": { - "name": "picture", - "type": "text", + "status_id": { + "name": "status_id", + "type": "integer", "primaryKey": false, - "notNull": false + "notNull": false, + "default": -1 }, - "email": { - "name": "email", - "type": "varchar(255)", + "status_type": { + "name": "status_type", + "type": "smallint", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "posting_applicants_candidate_id_candidate_pool_id_fk": { + "name": "posting_applicants_candidate_id_candidate_pool_id_fk", + "tableFrom": "posting_applicants", + "tableTo": "candidate_pool", + "columnsFrom": ["candidate_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "posting_applicants_job_id_job_postings_id_fk": { + "name": "posting_applicants_job_id_job_postings_id_fk", + "tableFrom": "posting_applicants", + "tableTo": "job_postings", + "columnsFrom": ["job_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.review_tags": { + "name": "review_tags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, "notNull": true }, - "top_5_skills_csv": { - "name": "top_5_skills_csv", - "type": "text", + "title": { + "name": "title", + "type": "varchar(32)", "primaryKey": false, - "notNull": false + "notNull": true }, - "is_admin": { - "name": "is_admin", - "type": "boolean", + "parent": { + "name": "parent", + "type": "smallint", "primaryKey": false, - "notNull": true, - "default": false + "notNull": true } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, - "uniqueConstraints": { - "users_email_unique": { - "name": "users_email_unique", - "columns": ["email"], - "nullsNotDistinct": false - } - } + "uniqueConstraints": {} } }, "enums": {}, "schemas": {}, + "sequences": {}, "_meta": { + "columns": {}, "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "ca834831-e699-4acf-b597-ecbefb0d8fee", - "prevId": "00000000-0000-0000-0000-000000000000" + "tables": {} + } } diff --git a/server/db/migrations/meta/0001_snapshot.json b/server/db/migrations/meta/0001_snapshot.json deleted file mode 100644 index 076e1f33..00000000 --- a/server/db/migrations/meta/0001_snapshot.json +++ /dev/null @@ -1,241 +0,0 @@ -{ - "version": "7", - "dialect": "postgresql", - "tables": { - "public.admins": { - "name": "admins", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "password": { - "name": "password", - "type": "char(256)", - "primaryKey": false, - "notNull": true - }, - "permission": { - "name": "permission", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "admins_user_id_users_id_fk": { - "name": "admins_user_id_users_id_fk", - "tableFrom": "admins", - "columnsFrom": ["user_id"], - "tableTo": "users", - "columnsTo": ["id"], - "onUpdate": "no action", - "onDelete": "set null" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.job_postings": { - "name": "job_postings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(150)", - "primaryKey": false, - "notNull": true - }, - "contents": { - "name": "contents", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "tags_csv": { - "name": "tags_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "is_published": { - "name": "is_published", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "total_applicants": { - "name": "total_applicants", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "job_postings_owner_id_admins_id_fk": { - "name": "job_postings_owner_id_admins_id_fk", - "tableFrom": "job_postings", - "columnsFrom": ["owner_id"], - "tableTo": "admins", - "columnsTo": ["id"], - "onUpdate": "no action", - "onDelete": "set null" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.user_handles": { - "name": "user_handles", - "schema": "", - "columns": { - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "key": { - "name": "key", - "type": "varchar(15)", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "user_handles_user_id_users_id_fk": { - "name": "user_handles_user_id_users_id_fk", - "tableFrom": "user_handles", - "columnsFrom": ["user_id"], - "tableTo": "users", - "columnsTo": ["id"], - "onUpdate": "no action", - "onDelete": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "first_name": { - "name": "first_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "last_name": { - "name": "last_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "picture": { - "name": "picture", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "top_5_skills_csv": { - "name": "top_5_skills_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "users_email_unique": { - "name": "users_email_unique", - "columns": ["email"], - "nullsNotDistinct": false - } - } - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "7767cef5-43b3-4b6d-b2fe-048654cfd771", - "prevId": "ca834831-e699-4acf-b597-ecbefb0d8fee" -} diff --git a/server/db/migrations/meta/0002_snapshot.json b/server/db/migrations/meta/0002_snapshot.json deleted file mode 100644 index 51fda747..00000000 --- a/server/db/migrations/meta/0002_snapshot.json +++ /dev/null @@ -1,235 +0,0 @@ -{ - "version": "7", - "dialect": "postgresql", - "tables": { - "public.admins": { - "name": "admins", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "permission": { - "name": "permission", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "admins_user_id_users_id_fk": { - "name": "admins_user_id_users_id_fk", - "tableFrom": "admins", - "columnsFrom": ["user_id"], - "tableTo": "users", - "columnsTo": ["id"], - "onUpdate": "no action", - "onDelete": "set null" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.job_postings": { - "name": "job_postings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(150)", - "primaryKey": false, - "notNull": true - }, - "contents": { - "name": "contents", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "tags_csv": { - "name": "tags_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "is_published": { - "name": "is_published", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "total_applicants": { - "name": "total_applicants", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "job_postings_owner_id_admins_id_fk": { - "name": "job_postings_owner_id_admins_id_fk", - "tableFrom": "job_postings", - "columnsFrom": ["owner_id"], - "tableTo": "admins", - "columnsTo": ["id"], - "onUpdate": "no action", - "onDelete": "set null" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.user_handles": { - "name": "user_handles", - "schema": "", - "columns": { - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "key": { - "name": "key", - "type": "varchar(15)", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "user_handles_user_id_users_id_fk": { - "name": "user_handles_user_id_users_id_fk", - "tableFrom": "user_handles", - "columnsFrom": ["user_id"], - "tableTo": "users", - "columnsTo": ["id"], - "onUpdate": "no action", - "onDelete": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "first_name": { - "name": "first_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "last_name": { - "name": "last_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "picture": { - "name": "picture", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "top_5_skills_csv": { - "name": "top_5_skills_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "users_email_unique": { - "name": "users_email_unique", - "columns": ["email"], - "nullsNotDistinct": false - } - } - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "9e1715aa-8648-4033-85ab-cdfe573e5da3", - "prevId": "7767cef5-43b3-4b6d-b2fe-048654cfd771" -} diff --git a/server/db/migrations/meta/0003_snapshot.json b/server/db/migrations/meta/0003_snapshot.json deleted file mode 100644 index f905d1d4..00000000 --- a/server/db/migrations/meta/0003_snapshot.json +++ /dev/null @@ -1,197 +0,0 @@ -{ - "version": "7", - "dialect": "postgresql", - "tables": { - "public.job_postings": { - "name": "job_postings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(150)", - "primaryKey": false, - "notNull": true - }, - "contents": { - "name": "contents", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "tags_csv": { - "name": "tags_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "is_published": { - "name": "is_published", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "total_applicants": { - "name": "total_applicants", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "job_postings_owner_id_users_id_fk": { - "name": "job_postings_owner_id_users_id_fk", - "tableFrom": "job_postings", - "columnsFrom": ["owner_id"], - "tableTo": "users", - "columnsTo": ["id"], - "onUpdate": "no action", - "onDelete": "set null" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.user_handles": { - "name": "user_handles", - "schema": "", - "columns": { - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "key": { - "name": "key", - "type": "varchar(15)", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "user_handles_user_id_users_id_fk": { - "name": "user_handles_user_id_users_id_fk", - "tableFrom": "user_handles", - "columnsFrom": ["user_id"], - "tableTo": "users", - "columnsTo": ["id"], - "onUpdate": "no action", - "onDelete": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "first_name": { - "name": "first_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "last_name": { - "name": "last_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "picture": { - "name": "picture", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "permission": { - "name": "permission", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "top_5_skills_csv": { - "name": "top_5_skills_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "users_email_unique": { - "name": "users_email_unique", - "columns": ["email"], - "nullsNotDistinct": false - } - } - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "1825d2bc-dbf4-4e6b-9b27-58f538c8c4b3", - "prevId": "9e1715aa-8648-4033-85ab-cdfe573e5da3" -} diff --git a/server/db/migrations/meta/0004_snapshot.json b/server/db/migrations/meta/0004_snapshot.json deleted file mode 100644 index 587e1a13..00000000 --- a/server/db/migrations/meta/0004_snapshot.json +++ /dev/null @@ -1,251 +0,0 @@ -{ - "version": "7", - "dialect": "postgresql", - "tables": { - "public.job_postings": { - "name": "job_postings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(150)", - "primaryKey": false, - "notNull": true - }, - "contents": { - "name": "contents", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "tags_csv": { - "name": "tags_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "is_published": { - "name": "is_published", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "total_applicants": { - "name": "total_applicants", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "job_postings_owner_id_users_id_fk": { - "name": "job_postings_owner_id_users_id_fk", - "tableFrom": "job_postings", - "columnsFrom": ["owner_id"], - "tableTo": "users", - "columnsTo": ["id"], - "onUpdate": "no action", - "onDelete": "set null" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posting_applicants": { - "name": "posting_applicants", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "job_id": { - "name": "job_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "posting_applicants_owner_id_users_id_fk": { - "name": "posting_applicants_owner_id_users_id_fk", - "tableFrom": "posting_applicants", - "columnsFrom": ["owner_id"], - "tableTo": "users", - "columnsTo": ["id"], - "onUpdate": "no action", - "onDelete": "set null" - }, - "posting_applicants_job_id_job_postings_id_fk": { - "name": "posting_applicants_job_id_job_postings_id_fk", - "tableFrom": "posting_applicants", - "columnsFrom": ["job_id"], - "tableTo": "job_postings", - "columnsTo": ["id"], - "onUpdate": "no action", - "onDelete": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.user_handles": { - "name": "user_handles", - "schema": "", - "columns": { - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "key": { - "name": "key", - "type": "varchar(15)", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "user_handles_user_id_users_id_fk": { - "name": "user_handles_user_id_users_id_fk", - "tableFrom": "user_handles", - "columnsFrom": ["user_id"], - "tableTo": "users", - "columnsTo": ["id"], - "onUpdate": "no action", - "onDelete": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "first_name": { - "name": "first_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "last_name": { - "name": "last_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "picture": { - "name": "picture", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "permission": { - "name": "permission", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "top_5_skills_csv": { - "name": "top_5_skills_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "users_email_unique": { - "name": "users_email_unique", - "columns": ["email"], - "nullsNotDistinct": false - } - } - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - }, - "id": "b705efcd-5081-4704-96f5-4ef08e956763", - "prevId": "1825d2bc-dbf4-4e6b-9b27-58f538c8c4b3" -} diff --git a/server/db/migrations/meta/0005_snapshot.json b/server/db/migrations/meta/0005_snapshot.json deleted file mode 100644 index 5a8d55fa..00000000 --- a/server/db/migrations/meta/0005_snapshot.json +++ /dev/null @@ -1,287 +0,0 @@ -{ - "id": "35b40820-ea3c-4cc4-ab68-289c6cb405c8", - "prevId": "b705efcd-5081-4704-96f5-4ef08e956763", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.hooks": { - "name": "hooks", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "url": { - "name": "url", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "prefs": { - "name": "prefs", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.job_postings": { - "name": "job_postings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(150)", - "primaryKey": false, - "notNull": true - }, - "contents": { - "name": "contents", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "tags_csv": { - "name": "tags_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "is_published": { - "name": "is_published", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "total_applicants": { - "name": "total_applicants", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "job_postings_owner_id_users_id_fk": { - "name": "job_postings_owner_id_users_id_fk", - "tableFrom": "job_postings", - "tableTo": "users", - "columnsFrom": ["owner_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posting_applicants": { - "name": "posting_applicants", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "job_id": { - "name": "job_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "posting_applicants_owner_id_users_id_fk": { - "name": "posting_applicants_owner_id_users_id_fk", - "tableFrom": "posting_applicants", - "tableTo": "users", - "columnsFrom": ["owner_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - }, - "posting_applicants_job_id_job_postings_id_fk": { - "name": "posting_applicants_job_id_job_postings_id_fk", - "tableFrom": "posting_applicants", - "tableTo": "job_postings", - "columnsFrom": ["job_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.user_handles": { - "name": "user_handles", - "schema": "", - "columns": { - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "key": { - "name": "key", - "type": "varchar(15)", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "user_handles_user_id_users_id_fk": { - "name": "user_handles_user_id_users_id_fk", - "tableFrom": "user_handles", - "tableTo": "users", - "columnsFrom": ["user_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "first_name": { - "name": "first_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "last_name": { - "name": "last_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "picture": { - "name": "picture", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "permission": { - "name": "permission", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "top_5_skills_csv": { - "name": "top_5_skills_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "users_email_unique": { - "name": "users_email_unique", - "nullsNotDistinct": false, - "columns": ["email"] - } - } - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/server/db/migrations/meta/0006_snapshot.json b/server/db/migrations/meta/0006_snapshot.json deleted file mode 100644 index 7b420572..00000000 --- a/server/db/migrations/meta/0006_snapshot.json +++ /dev/null @@ -1,306 +0,0 @@ -{ - "id": "3662bd88-5b68-4cea-88b7-7bc8ae8eb461", - "prevId": "35b40820-ea3c-4cc4-ab68-289c6cb405c8", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.hooks": { - "name": "hooks", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(40)", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "prefs": { - "name": "prefs", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_executed_at": { - "name": "last_executed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.job_postings": { - "name": "job_postings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(150)", - "primaryKey": false, - "notNull": true - }, - "contents": { - "name": "contents", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "tags_csv": { - "name": "tags_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "is_published": { - "name": "is_published", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "total_applicants": { - "name": "total_applicants", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "job_postings_owner_id_users_id_fk": { - "name": "job_postings_owner_id_users_id_fk", - "tableFrom": "job_postings", - "tableTo": "users", - "columnsFrom": ["owner_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posting_applicants": { - "name": "posting_applicants", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "job_id": { - "name": "job_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "posting_applicants_owner_id_users_id_fk": { - "name": "posting_applicants_owner_id_users_id_fk", - "tableFrom": "posting_applicants", - "tableTo": "users", - "columnsFrom": ["owner_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - }, - "posting_applicants_job_id_job_postings_id_fk": { - "name": "posting_applicants_job_id_job_postings_id_fk", - "tableFrom": "posting_applicants", - "tableTo": "job_postings", - "columnsFrom": ["job_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.user_handles": { - "name": "user_handles", - "schema": "", - "columns": { - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "key": { - "name": "key", - "type": "varchar(15)", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "user_handles_user_id_users_id_fk": { - "name": "user_handles_user_id_users_id_fk", - "tableFrom": "user_handles", - "tableTo": "users", - "columnsFrom": ["user_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "first_name": { - "name": "first_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "last_name": { - "name": "last_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "picture": { - "name": "picture", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "permission": { - "name": "permission", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "top_5_skills_csv": { - "name": "top_5_skills_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "users_email_unique": { - "name": "users_email_unique", - "nullsNotDistinct": false, - "columns": ["email"] - } - } - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/server/db/migrations/meta/0007_snapshot.json b/server/db/migrations/meta/0007_snapshot.json deleted file mode 100644 index 6a9d7057..00000000 --- a/server/db/migrations/meta/0007_snapshot.json +++ /dev/null @@ -1,342 +0,0 @@ -{ - "id": "cc4af3d8-c8e8-4adf-b145-bd61742066c3", - "prevId": "3662bd88-5b68-4cea-88b7-7bc8ae8eb461", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.hooks": { - "name": "hooks", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(40)", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "prefs": { - "name": "prefs", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_executed_at": { - "name": "last_executed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.job_postings": { - "name": "job_postings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(150)", - "primaryKey": false, - "notNull": true - }, - "contents": { - "name": "contents", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "tags_csv": { - "name": "tags_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "is_published": { - "name": "is_published", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "total_applicants": { - "name": "total_applicants", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "job_postings_owner_id_users_id_fk": { - "name": "job_postings_owner_id_users_id_fk", - "tableFrom": "job_postings", - "tableTo": "users", - "columnsFrom": ["owner_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.metadata_entries": { - "name": "metadata_entries", - "schema": "", - "columns": { - "key": { - "name": "key", - "type": "varchar(48)", - "primaryKey": true, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posting_applicants": { - "name": "posting_applicants", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "job_id": { - "name": "job_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "posting_applicants_owner_id_users_id_fk": { - "name": "posting_applicants_owner_id_users_id_fk", - "tableFrom": "posting_applicants", - "tableTo": "users", - "columnsFrom": ["owner_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - }, - "posting_applicants_job_id_job_postings_id_fk": { - "name": "posting_applicants_job_id_job_postings_id_fk", - "tableFrom": "posting_applicants", - "tableTo": "job_postings", - "columnsFrom": ["job_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.user_handles": { - "name": "user_handles", - "schema": "", - "columns": { - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "key": { - "name": "key", - "type": "varchar(15)", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "user_handles_user_id_users_id_fk": { - "name": "user_handles_user_id_users_id_fk", - "tableFrom": "user_handles", - "tableTo": "users", - "columnsFrom": ["user_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "first_name": { - "name": "first_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "last_name": { - "name": "last_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "picture": { - "name": "picture", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "permission": { - "name": "permission", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "top_5_skills_csv": { - "name": "top_5_skills_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "users_email_unique": { - "name": "users_email_unique", - "nullsNotDistinct": false, - "columns": ["email"] - } - } - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/server/db/migrations/meta/0008_snapshot.json b/server/db/migrations/meta/0008_snapshot.json deleted file mode 100644 index 730b42a4..00000000 --- a/server/db/migrations/meta/0008_snapshot.json +++ /dev/null @@ -1,371 +0,0 @@ -{ - "id": "36dac6d2-f744-494c-9e0c-652d8efceccf", - "prevId": "cc4af3d8-c8e8-4adf-b145-bd61742066c3", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.hooks": { - "name": "hooks", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(40)", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "prefs": { - "name": "prefs", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_executed_at": { - "name": "last_executed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.job_postings": { - "name": "job_postings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(150)", - "primaryKey": false, - "notNull": true - }, - "contents": { - "name": "contents", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "tags_csv": { - "name": "tags_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "is_published": { - "name": "is_published", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "total_applicants": { - "name": "total_applicants", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "job_postings_owner_id_users_id_fk": { - "name": "job_postings_owner_id_users_id_fk", - "tableFrom": "job_postings", - "tableTo": "users", - "columnsFrom": ["owner_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.metadata_entries": { - "name": "metadata_entries", - "schema": "", - "columns": { - "key": { - "name": "key", - "type": "varchar(48)", - "primaryKey": true, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posting_applicants": { - "name": "posting_applicants", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "job_id": { - "name": "job_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "posting_applicants_owner_id_users_id_fk": { - "name": "posting_applicants_owner_id_users_id_fk", - "tableFrom": "posting_applicants", - "tableTo": "users", - "columnsFrom": ["owner_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "posting_applicants_job_id_job_postings_id_fk": { - "name": "posting_applicants_job_id_job_postings_id_fk", - "tableFrom": "posting_applicants", - "tableTo": "job_postings", - "columnsFrom": ["job_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.review_tags": { - "name": "review_tags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(8)", - "primaryKey": false, - "notNull": true - }, - "parent": { - "name": "parent", - "type": "smallint", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.user_handles": { - "name": "user_handles", - "schema": "", - "columns": { - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "key": { - "name": "key", - "type": "varchar(15)", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "user_handles_user_id_users_id_fk": { - "name": "user_handles_user_id_users_id_fk", - "tableFrom": "user_handles", - "tableTo": "users", - "columnsFrom": ["user_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "first_name": { - "name": "first_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "last_name": { - "name": "last_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "picture": { - "name": "picture", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "permission": { - "name": "permission", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "top_5_skills_csv": { - "name": "top_5_skills_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "users_email_unique": { - "name": "users_email_unique", - "nullsNotDistinct": false, - "columns": ["email"] - } - } - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/server/db/migrations/meta/0009_snapshot.json b/server/db/migrations/meta/0009_snapshot.json deleted file mode 100644 index 7584320b..00000000 --- a/server/db/migrations/meta/0009_snapshot.json +++ /dev/null @@ -1,371 +0,0 @@ -{ - "id": "1c9c0011-c57e-4840-ab36-a39bb4ba0e5c", - "prevId": "36dac6d2-f744-494c-9e0c-652d8efceccf", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.hooks": { - "name": "hooks", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(40)", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "prefs": { - "name": "prefs", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_executed_at": { - "name": "last_executed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.job_postings": { - "name": "job_postings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(150)", - "primaryKey": false, - "notNull": true - }, - "contents": { - "name": "contents", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "tags_csv": { - "name": "tags_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "is_published": { - "name": "is_published", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "total_applicants": { - "name": "total_applicants", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "job_postings_owner_id_users_id_fk": { - "name": "job_postings_owner_id_users_id_fk", - "tableFrom": "job_postings", - "tableTo": "users", - "columnsFrom": ["owner_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.metadata_entries": { - "name": "metadata_entries", - "schema": "", - "columns": { - "key": { - "name": "key", - "type": "varchar(48)", - "primaryKey": true, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posting_applicants": { - "name": "posting_applicants", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "job_id": { - "name": "job_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "posting_applicants_owner_id_users_id_fk": { - "name": "posting_applicants_owner_id_users_id_fk", - "tableFrom": "posting_applicants", - "tableTo": "users", - "columnsFrom": ["owner_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "posting_applicants_job_id_job_postings_id_fk": { - "name": "posting_applicants_job_id_job_postings_id_fk", - "tableFrom": "posting_applicants", - "tableTo": "job_postings", - "columnsFrom": ["job_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.review_tags": { - "name": "review_tags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(32)", - "primaryKey": false, - "notNull": true - }, - "parent": { - "name": "parent", - "type": "smallint", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.user_handles": { - "name": "user_handles", - "schema": "", - "columns": { - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "key": { - "name": "key", - "type": "varchar(15)", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "user_handles_user_id_users_id_fk": { - "name": "user_handles_user_id_users_id_fk", - "tableFrom": "user_handles", - "tableTo": "users", - "columnsFrom": ["user_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "first_name": { - "name": "first_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "last_name": { - "name": "last_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "picture": { - "name": "picture", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "permission": { - "name": "permission", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "top_5_skills_csv": { - "name": "top_5_skills_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "users_email_unique": { - "name": "users_email_unique", - "nullsNotDistinct": false, - "columns": ["email"] - } - } - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/server/db/migrations/meta/0010_snapshot.json b/server/db/migrations/meta/0010_snapshot.json deleted file mode 100644 index 791a17a8..00000000 --- a/server/db/migrations/meta/0010_snapshot.json +++ /dev/null @@ -1,385 +0,0 @@ -{ - "id": "da7c8cd2-dd89-4312-9ba2-1d15bd5e13c0", - "prevId": "1c9c0011-c57e-4840-ab36-a39bb4ba0e5c", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.hooks": { - "name": "hooks", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(40)", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "prefs": { - "name": "prefs", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_executed_at": { - "name": "last_executed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.job_postings": { - "name": "job_postings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(150)", - "primaryKey": false, - "notNull": true - }, - "contents": { - "name": "contents", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "tags_csv": { - "name": "tags_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "is_published": { - "name": "is_published", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "total_applicants": { - "name": "total_applicants", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "job_postings_owner_id_users_id_fk": { - "name": "job_postings_owner_id_users_id_fk", - "tableFrom": "job_postings", - "tableTo": "users", - "columnsFrom": ["owner_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.metadata_entries": { - "name": "metadata_entries", - "schema": "", - "columns": { - "key": { - "name": "key", - "type": "varchar(48)", - "primaryKey": true, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posting_applicants": { - "name": "posting_applicants", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "job_id": { - "name": "job_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "status_id": { - "name": "status_id", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": -1 - }, - "status_type": { - "name": "status_type", - "type": "smallint", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "posting_applicants_owner_id_users_id_fk": { - "name": "posting_applicants_owner_id_users_id_fk", - "tableFrom": "posting_applicants", - "tableTo": "users", - "columnsFrom": ["owner_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "posting_applicants_job_id_job_postings_id_fk": { - "name": "posting_applicants_job_id_job_postings_id_fk", - "tableFrom": "posting_applicants", - "tableTo": "job_postings", - "columnsFrom": ["job_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.review_tags": { - "name": "review_tags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(32)", - "primaryKey": false, - "notNull": true - }, - "parent": { - "name": "parent", - "type": "smallint", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.user_handles": { - "name": "user_handles", - "schema": "", - "columns": { - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "key": { - "name": "key", - "type": "varchar(15)", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "user_handles_user_id_users_id_fk": { - "name": "user_handles_user_id_users_id_fk", - "tableFrom": "user_handles", - "tableTo": "users", - "columnsFrom": ["user_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "first_name": { - "name": "first_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "last_name": { - "name": "last_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "picture": { - "name": "picture", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "permission": { - "name": "permission", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "top_5_skills_csv": { - "name": "top_5_skills_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "users_email_unique": { - "name": "users_email_unique", - "nullsNotDistinct": false, - "columns": ["email"] - } - } - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/server/db/migrations/meta/0011_snapshot.json b/server/db/migrations/meta/0011_snapshot.json deleted file mode 100644 index 3a0a5015..00000000 --- a/server/db/migrations/meta/0011_snapshot.json +++ /dev/null @@ -1,398 +0,0 @@ -{ - "id": "ab765067-c75f-42f2-9143-e65b3a254f1a", - "prevId": "da7c8cd2-dd89-4312-9ba2-1d15bd5e13c0", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.hooks": { - "name": "hooks", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(40)", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "prefs": { - "name": "prefs", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_executed_at": { - "name": "last_executed_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.job_postings": { - "name": "job_postings", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(150)", - "primaryKey": false, - "notNull": true - }, - "contents": { - "name": "contents", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "tags_csv": { - "name": "tags_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "is_published": { - "name": "is_published", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "total_applicants": { - "name": "total_applicants", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "is_expired": { - "name": "is_expired", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "valid_till": { - "name": "valid_till", - "type": "date", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "job_postings_owner_id_users_id_fk": { - "name": "job_postings_owner_id_users_id_fk", - "tableFrom": "job_postings", - "tableTo": "users", - "columnsFrom": ["owner_id"], - "columnsTo": ["id"], - "onDelete": "set null", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.metadata_entries": { - "name": "metadata_entries", - "schema": "", - "columns": { - "key": { - "name": "key", - "type": "varchar(48)", - "primaryKey": true, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posting_applicants": { - "name": "posting_applicants", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "owner_id": { - "name": "owner_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "job_id": { - "name": "job_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "status_id": { - "name": "status_id", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": -1 - }, - "status_type": { - "name": "status_type", - "type": "smallint", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "posting_applicants_owner_id_users_id_fk": { - "name": "posting_applicants_owner_id_users_id_fk", - "tableFrom": "posting_applicants", - "tableTo": "users", - "columnsFrom": ["owner_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - }, - "posting_applicants_job_id_job_postings_id_fk": { - "name": "posting_applicants_job_id_job_postings_id_fk", - "tableFrom": "posting_applicants", - "tableTo": "job_postings", - "columnsFrom": ["job_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.review_tags": { - "name": "review_tags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(32)", - "primaryKey": false, - "notNull": true - }, - "parent": { - "name": "parent", - "type": "smallint", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.user_handles": { - "name": "user_handles", - "schema": "", - "columns": { - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "key": { - "name": "key", - "type": "varchar(15)", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "user_handles_user_id_users_id_fk": { - "name": "user_handles_user_id_users_id_fk", - "tableFrom": "user_handles", - "tableTo": "users", - "columnsFrom": ["user_id"], - "columnsTo": ["id"], - "onDelete": "cascade", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true - }, - "first_name": { - "name": "first_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "last_name": { - "name": "last_name", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "picture": { - "name": "picture", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "permission": { - "name": "permission", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "top_5_skills_csv": { - "name": "top_5_skills_csv", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "users_email_unique": { - "name": "users_email_unique", - "nullsNotDistinct": false, - "columns": ["email"] - } - } - } - }, - "enums": {}, - "schemas": {}, - "sequences": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} diff --git a/server/db/migrations/meta/_journal.json b/server/db/migrations/meta/_journal.json index 60516e8b..941979e8 100644 --- a/server/db/migrations/meta/_journal.json +++ b/server/db/migrations/meta/_journal.json @@ -1,89 +1,12 @@ { - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "entries": [ { "idx": 0, - "version": "5", - "when": 1715598248945, - "tag": "0000_adorable_annihilus", - "breakpoints": true - }, - { - "idx": 1, - "version": "5", - "when": 1716047207372, - "tag": "0001_groovy_slapstick", - "breakpoints": true - }, - { - "idx": 2, - "version": "5", - "when": 1716047417642, - "tag": "0002_shocking_daredevil", - "breakpoints": true - }, - { - "idx": 3, - "version": "5", - "when": 1716047668431, - "tag": "0003_purple_cannonball", - "breakpoints": true - }, - { - "idx": 4, - "version": "5", - "when": 1716885070928, - "tag": "0004_empty_molecule_man", - "breakpoints": true - }, - { - "idx": 5, - "version": "7", - "when": 1718890472241, - "tag": "0005_overconfident_wendell_rand", - "breakpoints": true - }, - { - "idx": 6, - "version": "7", - "when": 1718898680134, - "tag": "0006_breezy_purifiers", - "breakpoints": true - }, - { - "idx": 7, - "version": "7", - "when": 1719494926824, - "tag": "0007_daily_owl", - "breakpoints": true - }, - { - "idx": 8, - "version": "7", - "when": 1726152541712, - "tag": "0008_open_quentin_quire", - "breakpoints": true - }, - { - "idx": 9, - "version": "7", - "when": 1726223608639, - "tag": "0009_luxuriant_purifiers", - "breakpoints": true - }, - { - "idx": 10, - "version": "7", - "when": 1726641900159, - "tag": "0010_amused_hairball", - "breakpoints": true - }, - { - "idx": 11, "version": "7", - "when": 1727798369507, - "tag": "0011_clever_spiral", + "when": 1734775561688, + "tag": "0000_faithful_the_initiative", "breakpoints": true } ] diff --git a/server/db/schema.ts b/server/db/schema.ts index 97c3c5f7..1c5e1ab3 100644 --- a/server/db/schema.ts +++ b/server/db/schema.ts @@ -1,5 +1,17 @@ import { sql } from 'drizzle-orm'; -import { boolean, integer, pgTable, text, timestamp, uuid, varchar, smallint, serial, date } from 'drizzle-orm/pg-core'; +import { + boolean, + integer, + pgTable, + text, + timestamp, + uuid, + varchar, + smallint, + serial, + date, + char, +} from 'drizzle-orm/pg-core'; const defaultUuidPkField = () => uuid('id') @@ -10,31 +22,18 @@ const defaultSerialPkField = () => serial('id').primaryKey(); //---------------**************---------------- -export const usersTable = pgTable('users', { +export const adminsTable = pgTable('admins', { id: defaultUuidPkField(), - firstName: varchar('first_name', { length: 50 }), + firstName: varchar('first_name', { length: 50 }).notNull(), lastName: varchar('last_name', { length: 50 }), picture: text('picture'), email: varchar('email', { length: 255 }).unique().notNull(), + password: char('password', { length: 133 }).notNull(), // length of adonis scrypt output + isDeleted: boolean('is_admin').default(false).notNull(), permission: integer('permission').default(0).notNull(), - top5SkillsCSV: text('top_5_skills_csv'), - - isAdmin: boolean('is_admin').default(false).notNull(), -}); - -export type User = typeof usersTable.$inferSelect; - -//---------------**************---------------- - -export const userHandlesTable = pgTable('user_handles', { - userId: uuid('user_id').references(() => usersTable.id, { - onDelete: 'cascade', - }), - key: varchar('key', { length: 15 }).notNull(), - value: text('value').notNull(), }); -export type UserHandle = typeof userHandlesTable.$inferSelect; +export type Admin = typeof adminsTable.$inferSelect; //---------------**************---------------- @@ -43,7 +42,7 @@ export const jobPostingsTable = pgTable('job_postings', { title: varchar('title', { length: 150 }).notNull(), contents: text('contents'), tagsCSV: text('tags_csv'), - owner: uuid('owner_id').references(() => usersTable.id, { + owner: uuid('owner_id').references(() => adminsTable.id, { onDelete: 'set null', }), isPublished: boolean('is_published').default(false).notNull(), @@ -58,10 +57,21 @@ export type JobPosting = typeof jobPostingsTable.$inferSelect; //---------------**************---------------- +export const candidatesTable = pgTable('candidate_pool', { + id: defaultUuidPkField(), + firstName: varchar('first_name', { length: 50 }).notNull(), + lastName: varchar('last_name', { length: 50 }), + email: varchar('email', { length: 255 }).unique().notNull(), +}); + +export type Candidate = typeof candidatesTable.$inferSelect; + +//---------------**************---------------- + export const postingApplicantsTable = pgTable('posting_applicants', { id: defaultUuidPkField(), - candidateId: uuid('owner_id') - .references(() => usersTable.id, { + candidateId: uuid('candidate_id') + .references(() => candidatesTable.id, { onDelete: 'cascade', }) .notNull(), diff --git a/server/routes/login.ts b/server/routes/login.ts deleted file mode 100644 index fd66704a..00000000 --- a/server/routes/login.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { generateRandomString, getChallengeFromVerifier } from '~/utils/oauth-support'; -import authenticateRequest from '../utils/auth'; -import { sendRedirectToLoginPage, sendRedirectToNextPage } from '../utils/redirect'; - -interface AccessToken { - access_token: string; - token_type: string; - expires_in: number; - refresh_token: string; - scope: string; -} - -export default defineEventHandler(async (event) => { - try { - await authenticateRequest(event); - return sendRedirectToNextPage(event); - } catch (error) { - // @ts-expect-error Throw error if issue other than 401. - if (!error.statusCode || error.statusCode !== 401) { - console.error('Error while introspecting token.', error); - throw createError({ - statusCode: 500, - message: 'Error extracting token', - }); - } - } - - const runtimeConfig = useRuntimeConfig(event); - - const query = getQuery<{ - code: string | undefined; - state: string | undefined; - }>(event); - - if (query.code) { - const code = query.code; - - const stateFromQuery = query.state; - const stateFromCookie = getCookie(event, 'oauth_state'); - - if (!(stateFromQuery || stateFromCookie) || stateFromCookie !== stateFromQuery) { - // State mismatch. - if (IS_DEV) { - console.error('State mismatch.'); - } - return sendRedirectToLoginPage(event); - } - - const codeVerifier = getCookie(event, 'oauth_code_verifier'); - - if (!codeVerifier) { - console.error('Missing code verifier.', event); - return sendRedirectToLoginPage(event); - } - - const formData = new FormData(); - formData.append('grant_type', 'authorization_code'); - formData.append('client_id', runtimeConfig.oauth.clientId); - formData.append('redirect_uri', runtimeConfig.public.origin + '/login'); - formData.append('code_verifier', codeVerifier); - formData.append('code', code); - - try { - const response = await $fetch('/oauth2/token', { - method: 'POST', - baseURL: runtimeConfig.services.atlas, - body: formData, - }); - - if (!(response && response.access_token)) { - throw new Error('Invalid response data: ' + response); - } - - setCookie(event, 'oauth_access_token', response.access_token); - - return sendRedirectToNextPage(event); - } catch (error) { - console.error('Error fetching access token.', error); - return sendRedirect(event, '/'); - } - } else { - const oauthState = generateRandomString(); - const codeVerifier = generateRandomString(); - - setCookie(event, 'oauth_state', oauthState); - setCookie(event, 'oauth_code_verifier', codeVerifier); - - const codeVerifierChallenge = await getChallengeFromVerifier(codeVerifier); - - const oauthParams = new URLSearchParams({ - client_id: runtimeConfig.oauth.clientId, - redirect_uri: runtimeConfig.public.origin + '/login', - response_type: 'code', - scope: 'openid', - state: oauthState, - code_challenge_method: 'S256', - code_challenge: codeVerifierChallenge, - }); - - const urlParams = oauthParams.toString(); - - return sendRedirect(event, `${runtimeConfig.services.atlas}/oauth2/authorize?${urlParams}`); - } -}); diff --git a/server/tasks/hooks/application-create.ts b/server/tasks/hooks/application-create.ts index ba83b80e..1ca0b3cc 100644 --- a/server/tasks/hooks/application-create.ts +++ b/server/tasks/hooks/application-create.ts @@ -1,5 +1,5 @@ import { eq, inArray } from 'drizzle-orm'; -import { hooksTable, jobPostingsTable, usersTable } from '~~/server/db/schema'; +import { hooksTable, jobPostingsTable, adminsTable } from '~~/server/db/schema'; export default defineTask({ meta: { @@ -29,13 +29,13 @@ export default defineTask({ const applicantResult = await db .select({ - id: usersTable.id, - firstName: usersTable.firstName, - lastName: usersTable.lastName, - email: usersTable.email, + id: adminsTable.id, + firstName: adminsTable.firstName, + lastName: adminsTable.lastName, + email: adminsTable.email, }) - .from(usersTable) - .where(eq(usersTable.id, applicantId)); + .from(adminsTable) + .where(eq(adminsTable.id, applicantId)); if (!(Array.isArray(applicantResult) && applicantResult.length == 1)) { console.error('hooks:application-create', 'no applicant found. applicant id', applicantId); diff --git a/server/utils/admin.ts b/server/utils/admin.ts index 96f55b69..9a8f39f6 100644 --- a/server/utils/admin.ts +++ b/server/utils/admin.ts @@ -11,12 +11,5 @@ export default async function authenticateAdminRequest(event: H3Event) { return session; } - if (!session.user.isAdmin) { - throw createError({ - statusCode: 401, - message: 'User is not an admin', - }); - } - return session; } diff --git a/server/utils/auth.ts b/server/utils/auth.ts index eb2c17e8..1510d3e7 100644 --- a/server/utils/auth.ts +++ b/server/utils/auth.ts @@ -1,59 +1,42 @@ import { H3Event } from 'h3'; -import type { User } from '../db/schema'; -import { getToken } from './jwt'; +import { adminsTable, type Admin } from '../db/schema'; +import { eq } from 'drizzle-orm'; export type Credentials = { token: string; tokenType: string; }; -export default async function authenticateRequest( - event: H3Event, - options: { useTokenFromHeader?: boolean } = { useTokenFromHeader: false } -): Promise<{ user: User; accessToken: string }> { - try { - const config = useRuntimeConfig(); - - if (!config.services.profileCity) { - throw new Error('profileCity service URL is required to authenticate'); - } +export function createUnauthorisedError() { + return createError({ + statusCode: 401, + message: 'Session not authenticated', + }); +} - const accessToken = await getToken(event, options); +export default async function authenticateRequest(event: H3Event): Promise<{ user: Admin }> { + const session = await getUserSession(event); - let user: User | null | undefined = null; + if (IS_DEV) { + console.log('Authenticating Admin', session.user!.id); + } - let verifiedDetails; - try { - verifiedDetails = await decodeAndValidate(accessToken); - } catch (error: any) { - throw createError({ - statusCode: 401, - message: 'Error decoding JWT, most likely expired', - }); + if (session && session.user) { + const db = await useDatabase(); + const users = await db.select().from(adminsTable).where(eq(adminsTable.id, session.user.id)); + if (!users || !users.length) { + throw createUnauthorisedError(); } - if (!verifiedDetails) { - throw createError({ - statusCode: 401, - message: 'Invalid Details from Token', - }); - } - user = await getOrCreateUser(verifiedDetails, accessToken); + const user = users[0]!; - if (!user) { - throw createError({ - statusCode: 400, - message: 'Bad Request: Invalid User', - }); - } - return { - user, - accessToken, - }; - } catch (e) { - // @ts-expect-error - if (e.statusCode === 401) { - deleteCookie(event, 'oauth_access_token'); + if (user.isDeleted) { + throw createUnauthorisedError(); } - throw e; + + // @ts-expect-error password deleted, but type says otherwise. + delete user.password; + return { user }; + } else { + throw createUnauthorisedError(); } } diff --git a/server/utils/user.ts b/server/utils/user.ts deleted file mode 100644 index 8cafc8a1..00000000 --- a/server/utils/user.ts +++ /dev/null @@ -1,102 +0,0 @@ -import type { BasicProfile } from '~~/shared/types/profile-types'; -import { userHandlesTable, usersTable, type User, type UserHandle } from '../db/schema'; -import { eq } from 'drizzle-orm'; -import type { H3Event } from 'h3'; -import { getToken } from './jwt'; - -export type OnboardingStatus = { onboardingURL: string | null }; - -export async function getUserOnboardStatus(event: H3Event): Promise { - const config = useRuntimeConfig(); - const accessToken = await getToken(event); - - const res = await $fetch('/user/onboard', { - baseURL: config.services.profileCity, - headers: { - Authorization: `Bearer ${accessToken}`, - }, - }); - - return res; -} - -export async function getOrCreateUser(verifiedDetails: { email: string }, token: string): Promise { - if (IS_DEV) { - console.log('getOrCreateUser called'); - } - const db = await useDatabase(); - const config = useRuntimeConfig(); - - const result = await db.select().from(usersTable).where(eq(usersTable.email, verifiedDetails.email)); - - if (result && result.length > 0) { - return result[0] as (typeof result)[number]; - } - - let userBasicProfile: BasicProfile | null = null; - try { - if (IS_DEV) { - console.log('Calling userBasicProfile'); - } - userBasicProfile = await $fetch('/user/basic-profile', { - baseURL: config.services.profileCity, - headers: { - Accept: 'application/json', - Authorization: `Bearer ${token}`, - }, - }); - - if (IS_DEV) { - console.log(userBasicProfile); - } - } catch (e: any) { - if (e.statusCode !== 401) console.error('Error fetching `basic-profile`', e); - throw createError({ - statusCode: 401, - statusMessage: 'Unable to use existing token, expired maybe', - }); - } - - if (userBasicProfile == null) { - throw createError({ - statusCode: 400, - message: "Bad Request: Insufficient privilages to fetch user's information", - }); - } - - const user = await db.transaction(async (tx) => { - const top5SkillsCSV = userBasicProfile.resume?.top5Skills?.map((s: string) => s.trim()).join(','); - - const user = ( - await tx - .insert(usersTable) - .values({ - id: userBasicProfile.id, - ...userBasicProfile.profile, - top5SkillsCSV, - }) - .returning() - )[0]; - - if (!user) throw new Error('User object not returned'); - - const userId = user.id; - const handles: UserHandle[] = Object.keys(userBasicProfile.handles).map((key) => { - const value = userBasicProfile.handles[key]; - if (!value) throw new Error('Value of handle not found for key ' + key); - return { - key, - value, - userId, - }; - }); - - if (handles.length > 0) { - await tx.insert(userHandlesTable).values(handles); - } - - return user; - }); - - return user; -} diff --git a/shared/schemas/authentication.ts b/shared/schemas/authentication.ts new file mode 100644 index 00000000..fac3a1ac --- /dev/null +++ b/shared/schemas/authentication.ts @@ -0,0 +1,21 @@ +import { z } from 'zod'; + +export const passwordSchema = z + .string() + .regex(/^.{8,}$/, 'Password must be at least 8 characters long.') + .regex(/(?=(.*[a-z]){3,})/, 'Password must contain at least 3 lowercase letters.') + .regex(/(?=(.*[A-Z]){2,})/, 'Password must contain at least 2 uppercase letters.') + .regex(/(?=(.*[0-9]){2,})/, 'Password must contain at least 2 numbers.') + .regex(/(?=(.*[!@#$%^&*()\-__+.]){1,})/, 'Password must contain at least 1 special character.'); + +export const loginSchema = z.object({ + email: z.string().email(), + password: z.string(), +}); + +export const registerSchema = z.object({ + firstName: z.string(), + lastName: z.string().optional().nullable(), + email: z.string().email(), + password: passwordSchema, +}); diff --git a/shared/types/handle-types.d.ts b/shared/types/handle-types.d.ts deleted file mode 100644 index 08657924..00000000 --- a/shared/types/handle-types.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -export type Handle = { - id: string; - name: string; - description: string; - logo: string; - icon: string; - cover: string; - links: { - site: string; - linkedin: string; - twitter: string; - }; - helpText?: string[]; - verificationDto?: 'username' | 'link' | 'api-key-username' | 'oauth'; - ssoUrl?: string; - preview: string; -}; diff --git a/shared/types/profile-types.ts b/shared/types/profile-types.ts index 5f00db7b..52b3ca7e 100644 --- a/shared/types/profile-types.ts +++ b/shared/types/profile-types.ts @@ -1,22 +1 @@ -export type Profile = { - id: string; - firstName: string | null; - lastName: string | null; - picture: string | null; - email: string; - top5SkillsCSV: string | null; - isAdmin: boolean; -}; - -export type Session = { - profile: Profile; -}; - -export type BasicProfile = { - id: string; - profile: Omit; - handles: Record; - resume: { - top5Skills: string[]; - }; -}; +export type UserRole = 'admin' | 'user'; diff --git a/yarn.lock b/yarn.lock index 539cb0dd..4b294828 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,14 @@ # yarn lockfile v1 +"@adonisjs/hash@^9.0.5": + version "9.0.5" + resolved "https://registry.yarnpkg.com/@adonisjs/hash/-/hash-9.0.5.tgz#c7bd391c91ba3268808ffd835a5e96e4145d7894" + integrity sha512-oY8PafBrdGsr5UY8cAzzxPCtehZDW7KsPcI47dZpjydOdL/PQrT4liX+cGujL6mSbi3JEgQLBgBs/+SlPFvCrg== + dependencies: + "@phc/format" "^1.0.0" + "@poppinss/utils" "^6.8.3" + "@alloc/quick-lru@^5.2.0": version "5.2.0" resolved "https://registry.yarnpkg.com/@alloc/quick-lru/-/quick-lru-5.2.0.tgz#7bf68b20c0a350f936915fcae06f58e32007ce30" @@ -28,11 +36,25 @@ "@babel/highlight" "^7.24.7" picocolors "^1.0.0" +"@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0", "@babel/code-frame@^7.26.2": + version "7.26.2" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.26.2.tgz#4b5fab97d33338eff916235055f0ebc21e573a85" + integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== + dependencies: + "@babel/helper-validator-identifier" "^7.25.9" + js-tokens "^4.0.0" + picocolors "^1.0.0" + "@babel/compat-data@^7.25.2": version "7.25.2" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.2.tgz#e41928bd33475305c586f6acbbb7e3ade7a6f7f5" integrity sha512-bYcppcpKBvX4znYaPEeFau03bp89ShqNMLs+rmdptMw+heSZh9+z84d2YG+K7cYLbWwzdjtDoW/uqZmPjulClQ== +"@babel/compat-data@^7.25.9": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.26.3.tgz#99488264a56b2aded63983abd6a417f03b92ed02" + integrity sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g== + "@babel/core@^7.23.0", "@babel/core@^7.23.7", "@babel/core@^7.24.7": version "7.25.2" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.25.2.tgz#ed8eec275118d7613e77a352894cd12ded8eba77" @@ -54,6 +76,27 @@ json5 "^2.2.3" semver "^6.3.1" +"@babel/core@^7.25.7": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.26.0.tgz#d78b6023cc8f3114ccf049eb219613f74a747b40" + integrity sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.26.0" + "@babel/generator" "^7.26.0" + "@babel/helper-compilation-targets" "^7.25.9" + "@babel/helper-module-transforms" "^7.26.0" + "@babel/helpers" "^7.26.0" + "@babel/parser" "^7.26.0" + "@babel/template" "^7.25.9" + "@babel/traverse" "^7.25.9" + "@babel/types" "^7.26.0" + convert-source-map "^2.0.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.3" + semver "^6.3.1" + "@babel/generator@^7.25.0": version "7.25.0" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.0.tgz#f858ddfa984350bc3d3b7f125073c9af6988f18e" @@ -64,6 +107,17 @@ "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" +"@babel/generator@^7.26.0", "@babel/generator@^7.26.3": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.26.3.tgz#ab8d4360544a425c90c248df7059881f4b2ce019" + integrity sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ== + dependencies: + "@babel/parser" "^7.26.3" + "@babel/types" "^7.26.3" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^3.0.2" + "@babel/helper-annotate-as-pure@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz#5373c7bc8366b12a033b4be1ac13a206c6656aab" @@ -82,6 +136,17 @@ lru-cache "^5.1.1" semver "^6.3.1" +"@babel/helper-compilation-targets@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz#55af025ce365be3cdc0c1c1e56c6af617ce88875" + integrity sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ== + dependencies: + "@babel/compat-data" "^7.25.9" + "@babel/helper-validator-option" "^7.25.9" + browserslist "^4.24.0" + lru-cache "^5.1.1" + semver "^6.3.1" + "@babel/helper-create-class-features-plugin@^7.24.7", "@babel/helper-create-class-features-plugin@^7.25.0": version "7.25.0" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.0.tgz#a109bf9c3d58dfed83aaf42e85633c89f43a6253" @@ -111,6 +176,14 @@ "@babel/traverse" "^7.24.7" "@babel/types" "^7.24.7" +"@babel/helper-module-imports@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz#e7f8d20602ebdbf9ebbea0a0751fb0f2a4141715" + integrity sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw== + dependencies: + "@babel/traverse" "^7.25.9" + "@babel/types" "^7.25.9" + "@babel/helper-module-imports@~7.22.15": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0" @@ -128,6 +201,15 @@ "@babel/helper-validator-identifier" "^7.24.7" "@babel/traverse" "^7.25.2" +"@babel/helper-module-transforms@^7.26.0": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz#8ce54ec9d592695e58d84cd884b7b5c6a2fdeeae" + integrity sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw== + dependencies: + "@babel/helper-module-imports" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" + "@babel/traverse" "^7.25.9" + "@babel/helper-optimise-call-expression@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz#8b0a0456c92f6b323d27cfd00d1d664e76692a0f" @@ -170,16 +252,31 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d" integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ== +"@babel/helper-string-parser@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz#1aabb72ee72ed35789b4bbcad3ca2862ce614e8c" + integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA== + "@babel/helper-validator-identifier@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== +"@babel/helper-validator-identifier@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz#24b64e2c3ec7cd3b3c547729b8d16871f22cbdc7" + integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ== + "@babel/helper-validator-option@^7.24.8": version "7.24.8" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz#3725cdeea8b480e86d34df15304806a06975e33d" integrity sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q== +"@babel/helper-validator-option@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz#86e45bd8a49ab7e03f276577f96179653d41da72" + integrity sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw== + "@babel/helpers@^7.25.0": version "7.25.0" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.0.tgz#e69beb7841cb93a6505531ede34f34e6a073650a" @@ -188,6 +285,14 @@ "@babel/template" "^7.25.0" "@babel/types" "^7.25.0" +"@babel/helpers@^7.26.0": + version "7.26.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.26.0.tgz#30e621f1eba5aa45fe6f4868d2e9154d884119a4" + integrity sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw== + dependencies: + "@babel/template" "^7.25.9" + "@babel/types" "^7.26.0" + "@babel/highlight@^7.24.7": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" @@ -212,6 +317,13 @@ dependencies: "@babel/types" "^7.25.6" +"@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.3": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.26.3.tgz#8c51c5db6ddf08134af1ddbacf16aaab48bac234" + integrity sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA== + dependencies: + "@babel/types" "^7.26.3" + "@babel/plugin-proposal-decorators@^7.23.0": version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.24.7.tgz#7e2dcfeda4a42596b57c4c9de1f5176bbfc532e3" @@ -272,6 +384,11 @@ resolved "https://registry.yarnpkg.com/@babel/standalone/-/standalone-7.25.3.tgz#da5eaa9e0b0c2da360fe033eb580400739b03bb9" integrity sha512-uR+EoBqIIIvKGCG7fOj7HKupu3zVObiMfdEwoPZfVCPpcWJaZ1PkshaP5/6cl6BKAm1Zcv25O1rf+uoQ7V8nqA== +"@babel/standalone@^7.25.7": + version "7.26.4" + resolved "https://registry.yarnpkg.com/@babel/standalone/-/standalone-7.26.4.tgz#440d8046929174b463e2c6294fc8f6d49fdea550" + integrity sha512-SF+g7S2mhTT1b7CHyfNjDkPU1corxg4LPYsyP0x5KuCl+EbtBQHRLqr9N3q7e7+x7NQ5LYxQf8mJ2PmzebLr0A== + "@babel/template@^7.23.9", "@babel/template@^7.25.0": version "7.25.0" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.0.tgz#e733dc3134b4fede528c15bc95e89cb98c52592a" @@ -281,6 +398,15 @@ "@babel/parser" "^7.25.0" "@babel/types" "^7.25.0" +"@babel/template@^7.25.9": + version "7.25.9" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.9.tgz#ecb62d81a8a6f5dc5fe8abfc3901fc52ddf15016" + integrity sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg== + dependencies: + "@babel/code-frame" "^7.25.9" + "@babel/parser" "^7.25.9" + "@babel/types" "^7.25.9" + "@babel/traverse@^7.23.9", "@babel/traverse@^7.24.7", "@babel/traverse@^7.24.8", "@babel/traverse@^7.25.0", "@babel/traverse@^7.25.2": version "7.25.3" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.3.tgz#f1b901951c83eda2f3e29450ce92743783373490" @@ -294,6 +420,19 @@ debug "^4.3.1" globals "^11.1.0" +"@babel/traverse@^7.25.9": + version "7.26.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.4.tgz#ac3a2a84b908dde6d463c3bfa2c5fdc1653574bd" + integrity sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w== + dependencies: + "@babel/code-frame" "^7.26.2" + "@babel/generator" "^7.26.3" + "@babel/parser" "^7.26.3" + "@babel/template" "^7.25.9" + "@babel/types" "^7.26.3" + debug "^4.3.1" + globals "^11.1.0" + "@babel/types@^7.22.15", "@babel/types@^7.23.6", "@babel/types@^7.23.9", "@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.25.0", "@babel/types@^7.25.2": version "7.25.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.2.tgz#55fb231f7dc958cd69ea141a4c2997e819646125" @@ -312,6 +451,14 @@ "@babel/helper-validator-identifier" "^7.24.7" to-fast-properties "^2.0.0" +"@babel/types@^7.25.7", "@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.3": + version "7.26.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.26.3.tgz#37e79830f04c2b5687acc77db97fbc75fb81f3c0" + integrity sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA== + dependencies: + "@babel/helper-string-parser" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" + "@cloudflare/kv-asset-handler@^0.3.4": version "0.3.4" resolved "https://registry.yarnpkg.com/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.3.4.tgz#5cc152847c8ae4d280ec5d7f4f6ba8c976b585c3" @@ -1079,6 +1226,11 @@ resolved "https://registry.yarnpkg.com/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz#8ace5259254426ccef57f3175bc64ed7095ed919" integrity sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw== +"@lukeed/ms@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@lukeed/ms/-/ms-2.0.2.tgz#07f09e59a74c52f4d88c6db5c1054e819538e2a8" + integrity sha512-9I2Zn6+NJLfaGoz9jN3lpwDgAYvfGeNYdbAIjJOqzs4Tpc+VU3Jqq4IofSUBKajiDS8k9fZIg18/z13mpk1bsA== + "@mapbox/node-pre-gyp@^1.0.5": version "1.0.11" resolved "https://registry.yarnpkg.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz#417db42b7f5323d79e93b34a6d7a2a12c0df43fa" @@ -1243,6 +1395,32 @@ unimport "^3.12.0" untyped "^1.4.2" +"@nuxt/kit@^3.14.1592": + version "3.14.1592" + resolved "https://registry.yarnpkg.com/@nuxt/kit/-/kit-3.14.1592.tgz#f959a269424c1ee313585a46112e474b6ccab3bc" + integrity sha512-r9r8bISBBisvfcNgNL3dSIQHSBe0v5YkX5zwNblIC2T0CIEgxEVoM5rq9O5wqgb5OEydsHTtT2hL57vdv6VT2w== + dependencies: + "@nuxt/schema" "3.14.1592" + c12 "^2.0.1" + consola "^3.2.3" + defu "^6.1.4" + destr "^2.0.3" + globby "^14.0.2" + hash-sum "^2.0.0" + ignore "^6.0.2" + jiti "^2.4.0" + klona "^2.0.6" + knitwork "^1.1.0" + mlly "^1.7.3" + pathe "^1.1.2" + pkg-types "^1.2.1" + scule "^1.3.0" + semver "^7.6.3" + ufo "^1.5.4" + unctx "^2.3.1" + unimport "^3.13.2" + untyped "^1.5.1" + "@nuxt/schema@3.13.2", "@nuxt/schema@^3.12.3", "@nuxt/schema@^3.13.2": version "3.13.2" resolved "https://registry.yarnpkg.com/@nuxt/schema/-/schema-3.13.2.tgz#4c1011ebf9fd5f821900bbfc50fd5eff2e663e9b" @@ -1261,6 +1439,25 @@ unimport "^3.12.0" untyped "^1.4.2" +"@nuxt/schema@3.14.1592": + version "3.14.1592" + resolved "https://registry.yarnpkg.com/@nuxt/schema/-/schema-3.14.1592.tgz#38c5c0af51d0b95e011db6c332f578aac97c8c82" + integrity sha512-A1d/08ueX8stTXNkvGqnr1eEXZgvKn+vj6s7jXhZNWApUSqMgItU4VK28vrrdpKbjIPwq2SwhnGOHUYvN9HwCQ== + dependencies: + c12 "^2.0.1" + compatx "^0.1.8" + consola "^3.2.3" + defu "^6.1.4" + hookable "^5.5.3" + pathe "^1.1.2" + pkg-types "^1.2.1" + scule "^1.3.0" + std-env "^3.8.0" + ufo "^1.5.4" + uncrypto "^0.1.3" + unimport "^3.13.2" + untyped "^1.5.1" + "@nuxt/telemetry@^2.6.0": version "2.6.0" resolved "https://registry.yarnpkg.com/@nuxt/telemetry/-/telemetry-2.6.0.tgz#f8b06aa804c8224bbd0762a765363df1968dd01c" @@ -1443,6 +1640,11 @@ "@parcel/watcher-win32-ia32" "2.4.1" "@parcel/watcher-win32-x64" "2.4.1" +"@phc/format@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@phc/format/-/format-1.0.0.tgz#b5627003b3216dc4362125b13f48a4daa76680e4" + integrity sha512-m7X9U6BG2+J+R1lSOdCiITLLrxm+cWlNI3HUFA92oLO77ObGNzaKdh8pMLqdZcshtkKuV84olNNXDfMc4FezBQ== + "@pkgjs/parseargs@^0.11.0": version "0.11.0" resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" @@ -1458,6 +1660,24 @@ resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f" integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A== +"@poppinss/utils@^6.8.3": + version "6.8.3" + resolved "https://registry.yarnpkg.com/@poppinss/utils/-/utils-6.8.3.tgz#dfef2358fc8702b0e3a048d157c718c353717e2c" + integrity sha512-YGeH7pIUm9ExONURNH3xN61dBZ0SXgVuPA9E76t7EHeZHXPNrmR8TlbXQaka6kd5n+cpBNcHG4VsVfYf59bZ7g== + dependencies: + "@lukeed/ms" "^2.0.2" + "@types/bytes" "^3.1.4" + "@types/pluralize" "^0.0.33" + bytes "^3.1.2" + case-anything "^3.1.0" + flattie "^1.1.1" + pluralize "^8.0.0" + safe-stable-stringify "^2.5.0" + secure-json-parse "^2.7.0" + slash "^5.1.0" + slugify "^1.6.6" + truncatise "^0.0.8" + "@profilecity/unstorage-s3-driver@^0.0.3": version "0.0.3" resolved "https://registry.yarnpkg.com/@profilecity/unstorage-s3-driver/-/unstorage-s3-driver-0.0.3.tgz#509a900931cd4960a5d501dad091e31ffae41cd9" @@ -1557,6 +1777,15 @@ estree-walker "^2.0.2" picomatch "^2.3.1" +"@rollup/pluginutils@^5.1.3": + version "5.1.3" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.1.3.tgz#3001bf1a03f3ad24457591f2c259c8e514e0dbdf" + integrity sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A== + dependencies: + "@types/estree" "^1.0.0" + estree-walker "^2.0.2" + picomatch "^4.0.2" + "@rollup/rollup-android-arm-eabi@4.20.0": version "4.20.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.20.0.tgz#c3f5660f67030c493a981ac1d34ee9dfe1d8ec0f" @@ -1944,6 +2173,11 @@ "@types/connect" "*" "@types/node" "*" +"@types/bytes@^3.1.4": + version "3.1.5" + resolved "https://registry.yarnpkg.com/@types/bytes/-/bytes-3.1.5.tgz#22fb92839f37bd5490e0dcd411999bb1c16ddaa0" + integrity sha512-VgZkrJckypj85YxEsEavcMmmSOIzkUHqWmM4CCyia5dc54YwsXzJ5uT4fYxBQNEXx+oF1krlhgCbvfubXqZYsQ== + "@types/connect@*": version "3.4.38" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" @@ -2034,6 +2268,11 @@ pg-protocol "*" pg-types "^4.0.1" +"@types/pluralize@^0.0.33": + version "0.0.33" + resolved "https://registry.yarnpkg.com/@types/pluralize/-/pluralize-0.0.33.tgz#8ad9018368c584d268667dd9acd5b3b806e8c82a" + integrity sha512-JOqsl+ZoCpP4e8TDke9W79FDcSgPAR0l6pixx2JHkhnRjvShyYiAYw2LVsnA7K08Y6DeOnaU6ujmENO4os/cYg== + "@types/qs@*": version "6.9.15" resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.15.tgz#adde8a060ec9c305a82de1babc1056e73bd64dce" @@ -2468,6 +2707,11 @@ acorn@8.12.1, acorn@^8.11.3, acorn@^8.12.1, acorn@^8.6.0, acorn@^8.8.2: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248" integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg== +acorn@^8.14.0: + version "8.14.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" + integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== + agent-base@6: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -2721,6 +2965,16 @@ browserslist@^4.0.0, browserslist@^4.23.1, browserslist@^4.23.3: node-releases "^2.0.18" update-browserslist-db "^1.1.0" +browserslist@^4.24.0: + version "4.24.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.3.tgz#5fc2725ca8fb3c1432e13dac278c7cc103e026d2" + integrity sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA== + dependencies: + caniuse-lite "^1.0.30001688" + electron-to-chromium "^1.5.73" + node-releases "^2.0.19" + update-browserslist-db "^1.1.1" + buffer-crc32@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-1.0.0.tgz#a10993b9055081d55304bd9feb4a072de179f405" @@ -2756,6 +3010,11 @@ bundle-name@^4.1.0: dependencies: run-applescript "^7.0.0" +bytes@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" + integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== + c12@^1.11.1, c12@^1.11.2: version "1.11.2" resolved "https://registry.yarnpkg.com/c12/-/c12-1.11.2.tgz#f8a1e30c10f4b273894a1bcb6944f76c15b56717" @@ -2774,6 +3033,24 @@ c12@^1.11.1, c12@^1.11.2: pkg-types "^1.2.0" rc9 "^2.1.2" +c12@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/c12/-/c12-2.0.1.tgz#5702d280b31a08abba39833494c9b1202f0f5aec" + integrity sha512-Z4JgsKXHG37C6PYUtIxCfLJZvo6FyhHJoClwwb9ftUkLpPSkuYqn6Tr+vnaN8hymm0kIbcg6Ey3kv/Q71k5w/A== + dependencies: + chokidar "^4.0.1" + confbox "^0.1.7" + defu "^6.1.4" + dotenv "^16.4.5" + giget "^1.2.3" + jiti "^2.3.0" + mlly "^1.7.1" + ohash "^1.1.4" + pathe "^1.1.2" + perfect-debounce "^1.0.0" + pkg-types "^1.2.0" + rc9 "^2.1.2" + cac@^6.7.14: version "6.7.14" resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" @@ -2812,6 +3089,16 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001646: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz#52de59529e8b02b1aedcaaf5c05d9e23c0c28138" integrity sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg== +caniuse-lite@^1.0.30001688: + version "1.0.30001688" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001688.tgz#f9d3ede749f083ce0db4c13db9d828adaf2e8d0a" + integrity sha512-Nmqpru91cuABu/DTCXbM2NSRHzM2uVHfPnhJ/1zEAJx/ILBRVmz3pzH4N7DZqbdG0gWClsCC05Oj0mJ/1AWMbA== + +case-anything@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/case-anything/-/case-anything-3.1.0.tgz#43ba878c2381b2d28e6dead4548c94878d0d66c4" + integrity sha512-rRYnn5Elur8RuNHKoJ2b0tgn+pjYxL7BzWom+JZ7NKKn1lt/yGV/tUNwOovxYa9l9VL5hnXQdMc+mENbhJzosQ== + chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -2869,6 +3156,13 @@ chokidar@^3.5.1, chokidar@^3.5.3, chokidar@^3.6.0: optionalDependencies: fsevents "~2.3.2" +chokidar@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-4.0.1.tgz#4a6dff66798fb0f72a94f616abbd7e1a19f31d41" + integrity sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA== + dependencies: + readdirp "^4.0.1" + chownr@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" @@ -3056,6 +3350,11 @@ confbox@^0.1.7: resolved "https://registry.yarnpkg.com/confbox/-/confbox-0.1.7.tgz#ccfc0a2bcae36a84838e83a3b7f770fb17d6c579" integrity sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA== +confbox@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/confbox/-/confbox-0.1.8.tgz#820d73d3b3c82d9bd910652c5d4d599ef8ff8b06" + integrity sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w== + consola@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/consola/-/consola-3.2.3.tgz#0741857aa88cfa0d6fd53f1cff0375136e98502f" @@ -3155,6 +3454,13 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" +"crossws@>=0.2.0 <0.4.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/crossws/-/crossws-0.3.1.tgz#7980e0b6688fe23286661c3ab8deeccbaa05ca86" + integrity sha512-HsZgeVYaG+b5zA+9PbIPGq4+J/CJynJuearykPsXx4V/eMhyQ5EDVg3Ak2FBZtVXCiOLu/U7IiwDHTr9MA+IKw== + dependencies: + uncrypto "^0.1.3" + crossws@^0.2.0, crossws@^0.2.4: version "0.2.4" resolved "https://registry.yarnpkg.com/crossws/-/crossws-0.2.4.tgz#82a8b518bff1018ab1d21ced9e35ffbe1681ad03" @@ -3486,6 +3792,11 @@ electron-to-chromium@^1.5.4: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.6.tgz#c81d9938b5a877314ad370feb73b4e5409b36abd" integrity sha512-jwXWsM5RPf6j9dPYzaorcBSUg6AiqocPEyMpkchkvntaH9HGfOOMZwxMJjDY/XEs3T5dM7uyH1VhRMkqUU9qVw== +electron-to-chromium@^1.5.73: + version "1.5.73" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.73.tgz#f32956ce40947fa3c8606726a96cd8fb5bb5f720" + integrity sha512-8wGNxG9tAG5KhGd3eeA0o6ixhiNdgr0DcHWm85XPCphwZgD1lIEoi6t3VERayWao7SF7AAZTw6oARGJeVjH8Kg== + emoji-regex@^10.3.0: version "10.4.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.4.0.tgz#03553afea80b3975749cfcb36f776ca268e413d4" @@ -3691,6 +4002,11 @@ escalade@^3.1.1, escalade@^3.1.2: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== +escalade@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + escape-html@^1.0.3, escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -3843,6 +4159,11 @@ flatted@^3.3.1: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== +flattie@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/flattie/-/flattie-1.1.1.tgz#88182235723113667d36217fec55359275d6fe3d" + integrity sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ== + foreground-child@^3.1.0: version "3.3.0" resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.0.tgz#0ac8644c06e431439f8561db8ecf29a7b5519c77" @@ -4099,6 +4420,22 @@ h3@^1.10.2, h3@^1.12.0: uncrypto "^0.1.3" unenv "^1.9.0" +h3@^1.13.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/h3/-/h3-1.13.0.tgz#b5347a8936529794b6754b440e26c0ab8a60dceb" + integrity sha512-vFEAu/yf8UMUcB4s43OaDaigcqpQd14yanmOsn+NcRX3/guSKncyE2rOYhq8RIchgJrPSs/QiIddnTTR1ddiAg== + dependencies: + cookie-es "^1.2.2" + crossws ">=0.2.0 <0.4.0" + defu "^6.1.4" + destr "^2.0.3" + iron-webcrypto "^1.2.1" + ohash "^1.1.4" + radix3 "^1.1.2" + ufo "^1.5.4" + uncrypto "^0.1.3" + unenv "^1.10.0" + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -4236,6 +4573,11 @@ ignore@^5.2.4, ignore@^5.3.2: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5" integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== +ignore@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-6.0.2.tgz#77cccb72a55796af1b6d2f9eb14fa326d24f4283" + integrity sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A== + image-meta@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/image-meta/-/image-meta-0.2.1.tgz#3a9eb9f0bfd2f767ca2b0720623c2e03742aa29f" @@ -4295,7 +4637,7 @@ ioredis@^5.4.1: redis-parser "^3.0.0" standard-as-callback "^2.1.0" -iron-webcrypto@^1.1.1: +iron-webcrypto@^1.1.1, iron-webcrypto@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz#aa60ff2aa10550630f4c0b11fd2442becdb35a6f" integrity sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg== @@ -4471,11 +4813,21 @@ jiti@^1.21.0, jiti@^1.21.6: resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.21.6.tgz#6c7f7398dd4b3142767f9a168af2f317a428d268" integrity sha512-2yTgeWTWzMWkHu6Jp9NKgePDaYHbntiwvYuuJLbbN9vl7DC9DvXKOB2BC3ZZ92D3cvV/aflH0osDfwpHepQ53w== +jiti@^2.3.0, jiti@^2.3.1, jiti@^2.4.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-2.4.1.tgz#4de9766ccbfa941d9b6390d2b159a4b295a52e6b" + integrity sha512-yPBThwecp1wS9DmoA4x4KR2h3QoslacnDR8ypuFM962kI4/456Iy1oHx2RAgh4jfZNdn0bctsdadceiBUgpU1g== + jose@^4.14.6: version "4.15.9" resolved "https://registry.yarnpkg.com/jose/-/jose-4.15.9.tgz#9b68eda29e9a0614c042fa29387196c7dd800100" integrity sha512-1vUQX+IdDMVPj4k8kOxgUqlcK518yluMuGZwqlr44FS1ppZB/5GWh4rZG89erpOBOJjU/OBsnCVFfapsRz6nEA== +jose@^5.9.6: + version "5.9.6" + resolved "https://registry.yarnpkg.com/jose/-/jose-5.9.6.tgz#77f1f901d88ebdc405e57cce08d2a91f47521883" + integrity sha512-AMlnetc9+CV9asI19zHmrgS/WYsWUwCn2R7RzlbJWD7F9eWYUTGyBmU9o6PxngtLGOiDGPRu+Uc4fhKzbpteZQ== + js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -4486,6 +4838,11 @@ js-tokens@^9.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-9.0.0.tgz#0f893996d6f3ed46df7f0a3b12a03f5fd84223c1" integrity sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ== +js-tokens@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-9.0.1.tgz#2ec43964658435296f6761b34e10671c2d9527f4" + integrity sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ== + js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" @@ -4498,6 +4855,11 @@ jsesc@^2.5.1: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== +jsesc@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.1.0.tgz#74d335a234f67ed19907fdadfac7ccf9d409825d" + integrity sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA== + json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" @@ -4750,6 +5112,14 @@ local-pkg@^0.5.0: mlly "^1.4.2" pkg-types "^1.0.3" +local-pkg@^0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.5.1.tgz#69658638d2a95287534d4c2fff757980100dbb6d" + integrity sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ== + dependencies: + mlly "^1.7.3" + pkg-types "^1.2.1" + lodash.clonedeep@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" @@ -4872,6 +5242,13 @@ magic-string@^0.30.0, magic-string@^0.30.10, magic-string@^0.30.11, magic-string dependencies: "@jridgewell/sourcemap-codec" "^1.5.0" +magic-string@^0.30.14: + version "0.30.15" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.15.tgz#d5474a2c4c5f35f041349edaba8a5cb02733ed3c" + integrity sha512-zXeaYRgZ6ldS1RJJUrMrYgNJ4fdwnyI6tVqoiIhyCyv5IVTK9BU8Ic2l253GGETQHxI4HNUwhJ3fjDhKqEoaAw== + dependencies: + "@jridgewell/sourcemap-codec" "^1.5.0" + magicast@^0.3.5: version "0.3.5" resolved "https://registry.yarnpkg.com/magicast/-/magicast-0.3.5.tgz#8301c3c7d66704a0771eb1bad74274f0ec036739" @@ -5071,6 +5448,16 @@ mlly@^1.3.0, mlly@^1.4.2, mlly@^1.6.1, mlly@^1.7.1: pkg-types "^1.1.1" ufo "^1.5.3" +mlly@^1.7.2, mlly@^1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.7.3.tgz#d86c0fcd8ad8e16395eb764a5f4b831590cee48c" + integrity sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A== + dependencies: + acorn "^8.14.0" + pathe "^1.1.2" + pkg-types "^1.2.1" + ufo "^1.5.4" + mri@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b" @@ -5239,6 +5626,11 @@ node-releases@^2.0.18: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== +node-releases@^2.0.19: + version "2.0.19" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.19.tgz#9e445a52950951ec4d177d843af370b411caf314" + integrity sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw== + nopt@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/nopt/-/nopt-5.0.0.tgz#530942bb58a512fccafe53fe210f13a25355dc88" @@ -5294,6 +5686,23 @@ nuxi@^3.13.2: optionalDependencies: fsevents "~2.3.3" +nuxt-auth-utils@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/nuxt-auth-utils/-/nuxt-auth-utils-0.5.7.tgz#0c19c95426a4c83bd0e0efabc3452e3ac896b4f7" + integrity sha512-e9k39JgbjwRicmTolr1tVuKJJbHx5DZv4Ztvtopig/zO6h5n4IaCzsaM7jZta6ijGaTv2+Dyci+Pn1LRQUJZCA== + dependencies: + "@adonisjs/hash" "^9.0.5" + "@nuxt/kit" "^3.14.1592" + defu "^6.1.4" + h3 "^1.13.0" + hookable "^5.5.3" + ofetch "^1.4.1" + ohash "^1.1.4" + openid-client "^6.1.7" + pathe "^1.1.2" + scule "^1.3.0" + uncrypto "^0.1.3" + nuxt-cropper@^0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/nuxt-cropper/-/nuxt-cropper-0.0.4.tgz#f207dae7a5b8c98be03b8c401b34d4746aba6db9" @@ -5394,6 +5803,11 @@ nypm@^0.3.11, nypm@^0.3.8: pkg-types "^1.2.0" ufo "^1.5.4" +oauth4webapi@^3.1.4: + version "3.1.4" + resolved "https://registry.yarnpkg.com/oauth4webapi/-/oauth4webapi-3.1.4.tgz#50695385cea8e7a43f3e2e23bc33ea27faece4a7" + integrity sha512-eVfN3nZNbok2s/ROifO0UAc5G8nRoLSbrcKJ09OqmucgnhXEfdIQOR4gq1eJH1rN3gV7rNw62bDEgftsgFtBEg== + object-assign@^4.0.1, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -5418,6 +5832,15 @@ ofetch@^1.3.4: node-fetch-native "^1.6.3" ufo "^1.5.3" +ofetch@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/ofetch/-/ofetch-1.4.1.tgz#b6bf6b0d75ba616cef6519dd8b6385a8bae480ec" + integrity sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw== + dependencies: + destr "^2.0.3" + node-fetch-native "^1.6.4" + ufo "^1.5.4" + ohash@^1.1.3, ohash@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/ohash/-/ohash-1.1.4.tgz#ae8d83014ab81157d2c285abf7792e2995fadd72" @@ -5495,6 +5918,14 @@ openapi-typescript@^6.7.6: undici "^5.28.4" yargs-parser "^21.1.1" +openid-client@^6.1.7: + version "6.1.7" + resolved "https://registry.yarnpkg.com/openid-client/-/openid-client-6.1.7.tgz#cb23cbfc1a37690ae553ab72505605d8660da057" + integrity sha512-JfY/KvQgOutmG2P+oVNKInE7zIh+im1MQOaO7g5CtNnTWMociA563WweiEMKfR9ry9XG3K2HGvj9wEqhCQkPMg== + dependencies: + jose "^5.9.6" + oauth4webapi "^3.1.4" + orderedmap@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/orderedmap/-/orderedmap-2.1.1.tgz#61481269c44031c449915497bf5a4ad273c512d2" @@ -5713,6 +6144,20 @@ pkg-types@^1.0.3, pkg-types@^1.1.1, pkg-types@^1.2.0: mlly "^1.7.1" pathe "^1.1.2" +pkg-types@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.2.1.tgz#6ac4e455a5bb4b9a6185c1c79abd544c901db2e5" + integrity sha512-sQoqa8alT3nHjGuTjuKgOnvjo4cljkufdtLMnO2LBP/wRwuDlo1tkaEdMxCRhyGRPacv/ztlZgDPm2b7FAmEvw== + dependencies: + confbox "^0.1.8" + mlly "^1.7.2" + pathe "^1.1.2" + +pluralize@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1" + integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA== + portfinder@^1.0.26: version "1.0.32" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.32.tgz#2fe1b9e58389712429dc2bea5beb2146146c7f81" @@ -6358,6 +6803,11 @@ readdir-glob@^1.1.2: dependencies: minimatch "^5.1.0" +readdirp@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-4.0.2.tgz#388fccb8b75665da3abffe2d8f8ed59fe74c230a" + integrity sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA== + readdirp@~3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" @@ -6530,6 +6980,11 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== +safe-stable-stringify@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz#4ca2f8e385f2831c432a719b108a3bf7af42a1dd" + integrity sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA== + sax@>=0.6.0: version "1.4.1" resolved "https://registry.yarnpkg.com/sax/-/sax-1.4.1.tgz#44cc8988377f126304d3b3fc1010c733b929ef0f" @@ -6540,6 +6995,11 @@ scule@^1.2.0, scule@^1.3.0: resolved "https://registry.yarnpkg.com/scule/-/scule-1.3.0.tgz#6efbd22fd0bb801bdcc585c89266a7d2daa8fbd3" integrity sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g== +secure-json-parse@^2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/secure-json-parse/-/secure-json-parse-2.7.0.tgz#5a5f9cd6ae47df23dba3151edd06855d47e09862" + integrity sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw== + semver@^6.0.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" @@ -6684,6 +7144,11 @@ slice-ansi@^7.1.0: ansi-styles "^6.2.1" is-fullwidth-code-point "^5.0.0" +slugify@^1.6.6: + version "1.6.6" + resolved "https://registry.yarnpkg.com/slugify/-/slugify-1.6.6.tgz#2d4ac0eacb47add6af9e04d3be79319cbcc7924b" + integrity sha512-h+z7HKHYXj6wJU+AnS/+IH8Uh9fdcX1Lrhg1/VMdf9PwoBQXFcXiAdsy2tSK0P6gKwJLXp02r90ahUCqHk9rrw== + smob@^1.0.0: version "1.5.0" resolved "https://registry.yarnpkg.com/smob/-/smob-1.5.0.tgz#85d79a1403abf128d24d3ebc1cdc5e1a9548d3ab" @@ -6747,6 +7212,11 @@ std-env@^3.7.0: resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.7.0.tgz#c9f7386ced6ecf13360b6c6c55b8aaa4ef7481d2" integrity sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg== +std-env@^3.8.0: + version "3.8.0" + resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.8.0.tgz#b56ffc1baf1a29dcc80a3bdf11d7fca7c315e7d5" + integrity sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w== + streamx@^2.15.0: version "2.18.0" resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.18.0.tgz#5bc1a51eb412a667ebfdcd4e6cf6a6fc65721ac7" @@ -6763,16 +7233,7 @@ string-argv@~0.3.2: resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -6813,14 +7274,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -6846,6 +7300,13 @@ strip-literal@^2.1.0: dependencies: js-tokens "^9.0.0" +strip-literal@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/strip-literal/-/strip-literal-2.1.1.tgz#26906e65f606d49f748454a08084e94190c2e5ad" + integrity sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q== + dependencies: + js-tokens "^9.0.1" + stylehacks@^7.0.4: version "7.0.4" resolved "https://registry.yarnpkg.com/stylehacks/-/stylehacks-7.0.4.tgz#9c21f7374f4bccc0082412b859b3c89d77d3277c" @@ -7072,6 +7533,11 @@ tr46@~0.0.3: resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== +truncatise@^0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/truncatise/-/truncatise-0.0.8.tgz#06514a0e98c57924f0c2d4ebaf7ff7a5f16ef39a" + integrity sha512-cXzueh9pzBCsLzhToB4X4gZCb3KYkrsAcBAX97JnazE74HOl3cpBJYEV7nabHeG/6/WXCU5Yujlde/WPBUwnsg== + ts-interface-checker@^0.1.9: version "0.1.13" resolved "https://registry.yarnpkg.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz#784fd3d679722bc103b1b4b8030bcddb5db2a699" @@ -7202,6 +7668,26 @@ unimport@^3.12.0, unimport@^3.7.2: strip-literal "^2.1.0" unplugin "^1.14.1" +unimport@^3.13.2: + version "3.14.5" + resolved "https://registry.yarnpkg.com/unimport/-/unimport-3.14.5.tgz#6433dd21423edad6e225e61fbf8ea969bcc8bde1" + integrity sha512-tn890SwFFZxqaJSKQPPd+yygfKSATbM8BZWW1aCR2TJBTs1SDrmLamBueaFtYsGjHtQaRgqEbQflOjN2iW12gA== + dependencies: + "@rollup/pluginutils" "^5.1.3" + acorn "^8.14.0" + escape-string-regexp "^5.0.0" + estree-walker "^3.0.3" + fast-glob "^3.3.2" + local-pkg "^0.5.1" + magic-string "^0.30.14" + mlly "^1.7.3" + pathe "^1.1.2" + picomatch "^4.0.2" + pkg-types "^1.2.1" + scule "^1.3.0" + strip-literal "^2.1.1" + unplugin "^1.16.0" + universalify@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d" @@ -7235,6 +7721,14 @@ unplugin@^1.10.0, unplugin@^1.12.2, unplugin@^1.14.1, unplugin@^1.3.1: acorn "^8.12.1" webpack-virtual-modules "^0.6.2" +unplugin@^1.16.0: + version "1.16.0" + resolved "https://registry.yarnpkg.com/unplugin/-/unplugin-1.16.0.tgz#ca0f248bf8798cd752dd02e5b381223b737cef72" + integrity sha512-5liCNPuJW8dqh3+DM6uNM2EI3MLLpCKp/KY+9pB5M2S2SR2qvvDHhKgBOaTWEbZTAws3CXfB0rKTIolWKL05VQ== + dependencies: + acorn "^8.14.0" + webpack-virtual-modules "^0.6.2" + unstorage@^1.10.2, unstorage@^1.12.0: version "1.12.0" resolved "https://registry.yarnpkg.com/unstorage/-/unstorage-1.12.0.tgz#a215895dfdef01ffb8ff529bb3869dbf947d8498" @@ -7273,6 +7767,19 @@ untyped@^1.4.2: mri "^1.2.0" scule "^1.2.0" +untyped@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/untyped/-/untyped-1.5.1.tgz#2ccf3ee09419d59a44c21a192877ab45aa98361a" + integrity sha512-reBOnkJBFfBZ8pCKaeHgfZLcehXtM6UTxc+vqs1JvCps0c4amLNp3fhdGBZwYp+VLyoY9n3X5KOP7lCyWBUX9A== + dependencies: + "@babel/core" "^7.25.7" + "@babel/standalone" "^7.25.7" + "@babel/types" "^7.25.7" + defu "^6.1.4" + jiti "^2.3.1" + mri "^1.2.0" + scule "^1.3.0" + unwasm@^0.3.9: version "0.3.9" resolved "https://registry.yarnpkg.com/unwasm/-/unwasm-0.3.9.tgz#01eca80a1cf2133743bc1bf5cfa749cc145beea0" @@ -7293,6 +7800,14 @@ update-browserslist-db@^1.1.0: escalade "^3.1.2" picocolors "^1.0.1" +update-browserslist-db@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz#80846fba1d79e82547fb661f8d141e0945755fe5" + integrity sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A== + dependencies: + escalade "^3.2.0" + picocolors "^1.1.0" + uqr@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/uqr/-/uqr-0.1.2.tgz#5c6cd5dcff9581f9bb35b982cb89e2c483a41d7d" @@ -7549,16 +8064,7 @@ wide-align@^1.1.2: dependencies: string-width "^1.0.2 || 2 || 3 || 4" -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Powered By