Add missing properties to entity types and create validation stubs

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-06 02:06:10 +00:00
parent 5de31cd740
commit 8ec41f87bd
28 changed files with 63 additions and 72 deletions

View File

@@ -1,4 +1,4 @@
import type { TenantManager } from '../../core/foundation/tenant-context'
import type { TenantManager } from '../../../core/foundation/tenant-context'
import type { BlobStorage } from '../../blob-storage'
export interface TenantAwareDeps {

View File

@@ -1,5 +1,5 @@
import type { BlobListOptions, BlobListResult, BlobMetadata, BlobStorage, DownloadOptions, UploadOptions } from '../../blob-storage'
import type { TenantManager } from '../../core/foundation/tenant-context'
import type { TenantManager } from '../../../core/foundation/tenant-context'
import type { TenantAwareDeps } from './context'
import { deleteBlob, exists, copyBlob, getStats } from './mutations'
import { downloadBuffer, downloadStream, generatePresignedUrl, getMetadata, listBlobs } from './reads'

View File

@@ -1,5 +1,5 @@
import { DBALError } from '../../../core/foundation/errors'
import type { TenantContext } from '../../core/foundation/tenant-context'
import type { TenantContext } from '../../../core/foundation/tenant-context'
import type { TenantAwareDeps } from './context'
export const resolveTenantContext = async ({ tenantManager, tenantId, userId }: TenantAwareDeps): Promise<TenantContext> => {

View File

@@ -1,4 +1,4 @@
import { DBALError } from '../../../core/foundation/errors'
import { DBALError } from '../../core/foundation/errors'
import type { RPCMessage } from '../utils/rpc-types'
import type { BridgeState } from './state'
import type { MessageRouter } from './message-router'

View File

@@ -1,4 +1,4 @@
import { DBALError } from '../../../core/foundation/errors'
import { DBALError } from '../../core/foundation/errors'
import type { RPCResponse } from '../utils/rpc-types'
import type { BridgeState } from './state'

View File

@@ -1,4 +1,4 @@
import { DBALError } from '../../../core/foundation/errors'
import { DBALError } from '../../core/foundation/errors'
import { generateRequestId } from '../utils/generate-request-id'
import type { RPCMessage } from '../utils/rpc-types'
import type { ConnectionManager } from './connection-manager'

View File

@@ -8,6 +8,8 @@ export interface CreateLuaScriptInput {
code: string;
description?: string;
isActive?: boolean;
isSandboxed?: boolean;
timeoutMs?: number;
}
export interface UpdateLuaScriptInput {
@@ -15,6 +17,8 @@ export interface UpdateLuaScriptInput {
code?: string;
description?: string;
isActive?: boolean;
isSandboxed?: boolean;
timeoutMs?: number;
}
export interface LuaScript {

View File

@@ -1,4 +1,4 @@
import type { DBALAdapter } from '../../../../adapters/adapter'
import type { DBALAdapter } from '../../../../../adapters/adapter'
import type { Package } from '../../../../foundation/types'
import { DBALError } from '../../../../foundation/errors'
import { validatePackageCreate, validatePackageUpdate } from '../../../../foundation/validation'

View File

@@ -1,4 +1,4 @@
import type { DBALAdapter } from '../../../../adapters/adapter'
import type { DBALAdapter } from '../../../../../adapters/adapter'
import type { Package, ListOptions, ListResult } from '../../../../foundation/types'
import { createManyPackages, deleteManyPackages, updateManyPackages } from './batch'
import { createPackage, deletePackage, updatePackage } from './mutations'

View File

@@ -1,4 +1,4 @@
import type { DBALAdapter } from '../../../../adapters/adapter'
import type { DBALAdapter } from '../../../../../adapters/adapter'
import type { Package } from '../../../../foundation/types'
import { DBALError } from '../../../../foundation/errors'
import { validatePackageCreate, validatePackageUpdate, validateId } from '../../../../foundation/validation'

View File

@@ -1,4 +1,4 @@
import type { DBALAdapter } from '../../../../adapters/adapter'
import type { DBALAdapter } from '../../../../../adapters/adapter'
import type { Package } from '../../../../foundation/types'
import { createPackage } from './mutations'

View File

@@ -1,4 +1,4 @@
import type { DBALAdapter } from '../../../../adapters/adapter'
import type { DBALAdapter } from '../../../../../adapters/adapter'
import type { Package, ListOptions, ListResult } from '../../../../foundation/types'
import { DBALError } from '../../../../foundation/errors'
import { validateId } from '../../../../foundation/validation'

View File

@@ -1,4 +1,4 @@
import type { DBALAdapter } from '../../../../adapters/adapter'
import type { DBALAdapter } from '../../../../../adapters/adapter'
import { deletePackage } from './mutations'
export const unpublishPackage = (adapter: DBALAdapter, id: string): Promise<boolean> => {

View File

@@ -4,7 +4,7 @@
*/
import type { CreatePackageInput, Package, Result } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validatePackageCreate } from '../../validation/validate-package-create'
import { validatePackageCreate } from '../validation/validate-package-create'
/**
* Create a new package in the store

View File

@@ -5,7 +5,7 @@
import type { Package, Result, UpdatePackageInput } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateId } from '../validation/validate-id'
import { validatePackageUpdate } from '../../validation/validate-package-update'
import { validatePackageUpdate } from '../validation/validate-package-update'
/**
* Update an existing package

View File

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

View File

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

View File

@@ -4,7 +4,7 @@
*/
import type { CreatePageInput, PageView, Result } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validatePageCreate } from '../../validation/validate-page-create'
import { validatePageCreate } from '../validation/validate-page-create'
/**
* Create a new page in the store

View File

@@ -5,7 +5,7 @@
import type { PageView, Result, UpdatePageInput } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateId } from '../validation/validate-id'
import { validatePageUpdate } from '../../validation/validate-page-update'
import { validatePageUpdate } from '../validation/validate-page-update'
/**
* Update an existing page

View File

@@ -1,9 +1,5 @@
/**
* @file validate-page-create.ts
* @description Page creation validation (stub)
*/
export const validatePageCreate = (input: any): string[] => {
// Stub validation that always returns empty errors
return [];
};
export function validatePageCreate(input: any): string[] {
const errors: string[] = [];
// TODO: Add validation logic
return errors;
}

View File

@@ -1,9 +1,5 @@
/**
* @file validate-page-update.ts
* @description Page update validation (stub)
*/
export const validatePageUpdate = (input: any): string[] => {
// Stub validation that always returns empty errors
return [];
};
export function validatePageUpdate(input: any): string[] {
const errors: string[] = [];
// TODO: Add validation logic
return errors;
}

View File

@@ -0,0 +1,3 @@
export function cleanExpired(store: any): void {
// TODO: Implement clean expired sessions logic
}

View File

@@ -4,7 +4,7 @@
*/
import type { CreateSessionInput, Result, Session } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateSessionCreate } from '../../validation/validate-session-create'
import { validateSessionCreate } from '../validation/validate-session-create'
/**
* Create a new session in the store

View File

@@ -5,7 +5,7 @@
import type { Result, Session, UpdateSessionInput } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateId } from '../validation/validate-id'
import { validateSessionUpdate } from '../../validation/validate-session-update'
import { validateSessionUpdate } from '../validation/validate-session-update'
/**
* Update an existing session

View File

@@ -5,11 +5,13 @@
export interface CreateSessionInput {
userId: string;
token: string;
expiresAt?: Date;
}
export interface UpdateSessionInput {
userId?: string;
token?: string;
expiresAt?: Date;
}

View File

@@ -1,9 +1,5 @@
/**
* @file validate-session-create.ts
* @description Session creation validation (stub)
*/
export const validateSessionCreate = (input: any): string[] => {
// Stub validation that always returns empty errors
return [];
};
export function validateSessionCreate(input: any): string[] {
const errors: string[] = [];
// TODO: Add validation logic
return errors;
}

View File

@@ -1,9 +1,5 @@
/**
* @file validate-session-update.ts
* @description Session update validation (stub)
*/
export const validateSessionUpdate = (input: any): string[] => {
// Stub validation that always returns empty errors
return [];
};
export function validateSessionUpdate(input: any): string[] {
const errors: string[] = [];
// TODO: Add validation logic
return errors;
}

View File

@@ -8,6 +8,8 @@ export interface CreateWorkflowInput {
description?: string;
definition?: any;
isActive?: boolean;
trigger?: string;
triggerConfig?: any;
}
export interface UpdateWorkflowInput {
@@ -15,6 +17,8 @@ export interface UpdateWorkflowInput {
description?: string;
definition?: any;
isActive?: boolean;
trigger?: string;
triggerConfig?: any;
}
export interface Workflow {
@@ -23,6 +27,8 @@ export interface Workflow {
description?: string;
definition?: any;
isActive: boolean;
trigger?: string;
triggerConfig?: any;
createdAt: Date;
updatedAt: Date;
}