feat(dbal): add lua-script and package entity types with validation

This commit is contained in:
2025-12-30 20:33:55 +00:00
parent e9d59f34dd
commit 79a00e49fa
10 changed files with 135 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
/**
* @file in-memory-store.ts
* @description In-memory store interface for Lua script operations (stub)
*/
export interface InMemoryStore {
luaScripts: Map<string, any>;
generateId(entityType: string): string;
}

View File

@@ -0,0 +1,30 @@
/**
* @file types.ts
* @description Type definitions for Lua script operations (stub)
*/
export interface CreateLuaScriptInput {
name: string;
code: string;
description?: string;
isActive?: boolean;
}
export interface LuaScriptView {
id: string;
name: string;
code: string;
description?: string;
isActive: boolean;
createdAt: Date;
updatedAt: Date;
}
export interface Result<T> {
success: boolean;
data?: T;
error?: {
code: string;
message: string;
};
}

View File

@@ -0,0 +1,10 @@
/**
* @file in-memory-store.ts
* @description In-memory store interface for package operations (stub)
*/
export interface InMemoryStore {
packages: Map<string, any>;
packageIds: Map<string, string>;
generateId(entityType: string): string;
}

View File

@@ -0,0 +1,32 @@
/**
* @file types.ts
* @description Type definitions for package operations (stub)
*/
export interface CreatePackageInput {
packageId: string;
name: string;
version?: string;
description?: string;
isPublished?: boolean;
}
export interface Package {
id: string;
packageId: string;
name: string;
version?: string;
description?: string;
isPublished: boolean;
createdAt: Date;
updatedAt: Date;
}
export interface Result<T> {
success: boolean;
data?: T;
error?: {
code: string;
message: string;
};
}

View File

@@ -0,0 +1,9 @@
/**
* @file validate-id.ts
* @description ID validation (stub)
*/
export const validateId = (input: any): string[] => {
// Stub validation that always returns empty errors
return [];
};

View File

@@ -0,0 +1,9 @@
/**
* @file validate-package-create.ts
* @description Package creation validation (stub)
*/
export const validatePackageCreate = (input: any): string[] => {
// Stub validation that always returns empty errors
return [];
};

View File

@@ -0,0 +1,9 @@
/**
* @file validate-package-update.ts
* @description Package update validation (stub)
*/
export const validatePackageUpdate = (input: any): string[] => {
// Stub validation that always returns empty errors
return [];
};

View File

@@ -0,0 +1,9 @@
/**
* @file validate-id.ts
* @description ID validation (stub)
*/
export const validateId = (input: any): string[] => {
// Stub validation that always returns empty errors
return [];
};

View File

@@ -0,0 +1,9 @@
/**
* @file validate-user-create.ts
* @description User creation validation (stub)
*/
export const validateUserCreate = (input: any): string[] => {
// Stub validation that always returns empty errors
return [];
};

View File

@@ -0,0 +1,9 @@
/**
* @file validate-user-update.ts
* @description User update validation (stub)
*/
export const validateUserUpdate = (input: any): string[] => {
// Stub validation that always returns empty errors
return [];
};