[INIT] Initial Project Structure
Some checks failed
Deploy Edge / deploy-edge (push) Failing after 2s
S3 Repo Backup / s3-repo-backup (push) Failing after 2s

This commit is contained in:
Dunemask 2024-08-24 12:41:04 -06:00
commit 0fc5f05b6a
105 changed files with 10448 additions and 0 deletions

25
lib/vix/ClientErrors.ts Normal file
View file

@ -0,0 +1,25 @@
import { ClientError } from "@dunemask/vix/bridge";
export class AuthErrors {
static readonly UnauthorizedRequiredProject = new ClientError(401, "Project required!");
static readonly UnauthorizedRequiredToken = new ClientError(401, "Token required!");
static readonly UnauthorizedRequiredUser = new ClientError(401, "User not set!");
static readonly UnauthorizedRole = new ClientError(403, "Insufficient Privileges");
static readonly UnauthorizedRequest = new ClientError(401, "Unauthorized!");
static readonly ForbiddenPermissions = new ClientError(403, "Insufficient privileges!");
}
export class UserErrors {
static readonly ConflictIdentityTaken = new ClientError(409, "Identity taken!");
}
export class ProjectErrors {
static readonly BadRequestSlugInvalid = new ClientError(400, "Project slug invalid!");
static readonly BadRequestProjectIncomplete = new ClientError(400, "Project incomplete!");
static readonly UnexpectedRootUserError = new ClientError(500, "Error creating root user!");
static readonly ConflictNonUnique = new ClientError(409, "Slug already taken!");
}
export class KeyPairErrors {
static readonly NotFoundKeypair = new ClientError(400, "Keypair not found!");
}