mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-26 06:44:58 +00:00
feat(dbal): add lua-script and package entity types with validation
This commit is contained in:
@@ -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;
|
||||
}
|
||||
30
dbal/development/src/core/entities/lua-script/types.ts
Normal file
30
dbal/development/src/core/entities/lua-script/types.ts
Normal 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;
|
||||
};
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
32
dbal/development/src/core/entities/package/types.ts
Normal file
32
dbal/development/src/core/entities/package/types.ts
Normal 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;
|
||||
};
|
||||
}
|
||||
@@ -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 [];
|
||||
};
|
||||
@@ -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 [];
|
||||
};
|
||||
@@ -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 [];
|
||||
};
|
||||
@@ -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 [];
|
||||
};
|
||||
@@ -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 [];
|
||||
};
|
||||
@@ -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 [];
|
||||
};
|
||||
Reference in New Issue
Block a user