feat: we have a functional prototype

This commit is contained in:
2025-02-17 02:43:15 -08:00
parent 107f54d269
commit 2f08f1ed18
142 changed files with 12012 additions and 96 deletions
+5
View File
@@ -0,0 +1,5 @@
import NaomisConfig from "@nhcarrigan/eslint-config";
export default [
...NaomisConfig,
]
+23
View File
@@ -0,0 +1,23 @@
{
"name": "@repo/types",
"version": "0.0.0",
"private": true,
"description": "Type-definitions shared between client and server.",
"type": "module",
"main": "prod/index.js",
"scripts": {
"build": "tsc",
"lint": "eslint src --max-warnings 0",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "See License in LICENSE.md",
"devDependencies": {
"@nhcarrigan/eslint-config": "5.2.0",
"@nhcarrigan/typescript-config": "4.0.0",
"@types/node": "22.13.4",
"eslint": "9.20.1",
"typescript": "5.7.3"
}
}
+25
View File
@@ -0,0 +1,25 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import type { Platform } from "../unions/platform.js";
import type { Sanction } from "../unions/sanction.js";
export interface Appeal {
consent: boolean;
email: string;
firstName: string;
lastName: string;
understandBinding: boolean;
sanctionType: Sanction;
caseNumber: number;
sanctionPlatform: Platform;
platformUsername: string;
sanctionReason: string;
sanctionFair: string;
behaviourViolation: string;
appealReason: string;
behaviourImprove: string;
}
+14
View File
@@ -0,0 +1,14 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
export interface Commission {
consent: boolean;
email: string;
firstName: string;
lastName: string;
companyName: string;
request: string;
}
+14
View File
@@ -0,0 +1,14 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
export interface Contact {
consent: boolean;
email: string;
firstName: string;
lastName: string;
companyName: string;
request: string;
}
+21
View File
@@ -0,0 +1,21 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
export interface Event {
consent: boolean;
email: string;
firstName: string;
lastName: string;
companyName: string;
eventDescription: string;
eventTopic: string;
eventLocation: string;
eventDate: string;
eventBudget: string;
travelCovered: boolean;
lodgingCovered: boolean;
foodCovered: boolean;
}
+18
View File
@@ -0,0 +1,18 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import type { SessionLength } from "../unions/session.js";
export interface Meeting {
consent: boolean;
email: string;
firstName: string;
lastName: string;
companyName: string;
sessionLength: SessionLength;
sessionGoal: string;
paymentUnderstanding: boolean;
}
+16
View File
@@ -0,0 +1,16 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
export interface Mentorship {
consent: boolean;
email: string;
firstName: string;
lastName: string;
companyName: string;
mentorshipGoal: string;
currentFocus: string;
paymentUnderstanding: boolean;
}
+24
View File
@@ -0,0 +1,24 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import type { Platform } from "../unions/platform.js";
export interface Staff {
consent: boolean;
email: string;
firstName: string;
lastName: string;
understandVolunteer: boolean;
platform: Platform;
platformUsername: string;
whyJoin: string;
currentBehaviour: string;
priorExperience: string;
internalConflict: string;
handlingTrauma: string;
difficultSituation: string;
leadershipSituation: string;
}
+31
View File
@@ -0,0 +1,31 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
import type { Appeal } from "./forms/appeal.js";
import type { Commission } from "./forms/commission.js";
import type { Contact } from "./forms/contact.js";
import type { Event } from "./forms/event.js";
import type { Meeting } from "./forms/meeting.js";
import type { Mentorship } from "./forms/mentorship.js";
import type { Staff } from "./forms/staff.js";
import type { ReviewRequest } from "./requests/review.js";
import type { DataResponse } from "./responses/data.js";
import type { ErrorResponse } from "./responses/error.js";
import type { SuccessResponse } from "./responses/success.js";
export type {
Appeal,
Commission,
Contact,
Event,
Meeting,
Mentorship,
Staff,
ReviewRequest,
DataResponse,
ErrorResponse,
SuccessResponse,
};
+8
View File
@@ -0,0 +1,8 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
export interface ReviewRequest {
submissionId: string;
}
+8
View File
@@ -0,0 +1,8 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
export interface DataResponse {
data: unknown;
}
+8
View File
@@ -0,0 +1,8 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
export interface ErrorResponse {
error: string;
}
+8
View File
@@ -0,0 +1,8 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
export interface SuccessResponse {
success: true;
}
+7
View File
@@ -0,0 +1,7 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
export type Platform = "Forum" | "IRC" | "Matrix" | "Gitea" | "Fediverse";
+7
View File
@@ -0,0 +1,7 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
export type Sanction = "reminder" | "warning" | "temporary" | "permanent";
+7
View File
@@ -0,0 +1,7 @@
/**
* @copyright nhcarrigan
* @license Naomi's Public License
* @author Naomi Carrigan
*/
export type SessionLength = 15 | 30 | 60;
+8
View File
@@ -0,0 +1,8 @@
{
"extends": "@nhcarrigan/typescript-config",
"compilerOptions": {
"rootDir": "./src",
"outDir": "./prod",
"declaration": true,
},
}