From 8ec41f87bdcffdbf5c1e55a0584ce906daa84205 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 02:06:10 +0000 Subject: [PATCH] Add missing properties to entity types and create validation stubs Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com> --- .../blob/providers/tenant-aware-storage/context.ts | 2 +- .../blob/providers/tenant-aware-storage/index.ts | 2 +- .../tenant-aware-storage/tenant-context.ts | 2 +- .../bridges/websocket-bridge/connection-manager.ts | 2 +- .../src/bridges/websocket-bridge/message-router.ts | 2 +- .../src/bridges/websocket-bridge/rpc.ts | 2 +- .../src/core/entities/lua-script/types.ts | 4 ++++ .../entities/operations/system/package/batch.ts | 2 +- .../entities/operations/system/package/index.ts | 2 +- .../operations/system/package/mutations.ts | 2 +- .../entities/operations/system/package/publish.ts | 2 +- .../entities/operations/system/package/reads.ts | 2 +- .../operations/system/package/unpublish.ts | 2 +- .../core/entities/package/crud/create-package.ts | 2 +- .../core/entities/package/crud/update-package.ts | 2 +- .../package/validation/validate-package-create.ts | 14 +++++--------- .../package/validation/validate-package-update.ts | 14 +++++--------- .../src/core/entities/page/crud/create-page.ts | 2 +- .../src/core/entities/page/crud/update-page.ts | 2 +- .../page/validation/validate-page-create.ts | 14 +++++--------- .../page/validation/validate-page-update.ts | 14 +++++--------- .../core/entities/session/crud/clean-expired.ts | 3 +++ .../core/entities/session/crud/create-session.ts | 2 +- .../core/entities/session/crud/update-session.ts | 2 +- .../development/src/core/entities/session/types.ts | 2 ++ .../session/validation/validate-session-create.ts | 14 +++++--------- .../session/validation/validate-session-update.ts | 14 +++++--------- .../src/core/entities/workflow/types.ts | 6 ++++++ 28 files changed, 63 insertions(+), 72 deletions(-) create mode 100644 dbal/development/src/core/entities/session/crud/clean-expired.ts diff --git a/dbal/development/src/blob/providers/tenant-aware-storage/context.ts b/dbal/development/src/blob/providers/tenant-aware-storage/context.ts index bbb8f8f2b..18fa65cab 100644 --- a/dbal/development/src/blob/providers/tenant-aware-storage/context.ts +++ b/dbal/development/src/blob/providers/tenant-aware-storage/context.ts @@ -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 { diff --git a/dbal/development/src/blob/providers/tenant-aware-storage/index.ts b/dbal/development/src/blob/providers/tenant-aware-storage/index.ts index 758c5fe93..56307986f 100644 --- a/dbal/development/src/blob/providers/tenant-aware-storage/index.ts +++ b/dbal/development/src/blob/providers/tenant-aware-storage/index.ts @@ -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' diff --git a/dbal/development/src/blob/providers/tenant-aware-storage/tenant-context.ts b/dbal/development/src/blob/providers/tenant-aware-storage/tenant-context.ts index 5bc2c9411..114c27452 100644 --- a/dbal/development/src/blob/providers/tenant-aware-storage/tenant-context.ts +++ b/dbal/development/src/blob/providers/tenant-aware-storage/tenant-context.ts @@ -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 => { diff --git a/dbal/development/src/bridges/websocket-bridge/connection-manager.ts b/dbal/development/src/bridges/websocket-bridge/connection-manager.ts index 30efc1695..2e39d36a4 100644 --- a/dbal/development/src/bridges/websocket-bridge/connection-manager.ts +++ b/dbal/development/src/bridges/websocket-bridge/connection-manager.ts @@ -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' diff --git a/dbal/development/src/bridges/websocket-bridge/message-router.ts b/dbal/development/src/bridges/websocket-bridge/message-router.ts index 684e3bd6b..0603f2a2a 100644 --- a/dbal/development/src/bridges/websocket-bridge/message-router.ts +++ b/dbal/development/src/bridges/websocket-bridge/message-router.ts @@ -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' diff --git a/dbal/development/src/bridges/websocket-bridge/rpc.ts b/dbal/development/src/bridges/websocket-bridge/rpc.ts index e34d38088..3de06a550 100644 --- a/dbal/development/src/bridges/websocket-bridge/rpc.ts +++ b/dbal/development/src/bridges/websocket-bridge/rpc.ts @@ -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' diff --git a/dbal/development/src/core/entities/lua-script/types.ts b/dbal/development/src/core/entities/lua-script/types.ts index cc84f4c5c..58f5a7e1e 100644 --- a/dbal/development/src/core/entities/lua-script/types.ts +++ b/dbal/development/src/core/entities/lua-script/types.ts @@ -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 { diff --git a/dbal/development/src/core/entities/operations/system/package/batch.ts b/dbal/development/src/core/entities/operations/system/package/batch.ts index 913503996..d8ed71426 100644 --- a/dbal/development/src/core/entities/operations/system/package/batch.ts +++ b/dbal/development/src/core/entities/operations/system/package/batch.ts @@ -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' diff --git a/dbal/development/src/core/entities/operations/system/package/index.ts b/dbal/development/src/core/entities/operations/system/package/index.ts index b70a4a145..3ccdd144f 100644 --- a/dbal/development/src/core/entities/operations/system/package/index.ts +++ b/dbal/development/src/core/entities/operations/system/package/index.ts @@ -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' diff --git a/dbal/development/src/core/entities/operations/system/package/mutations.ts b/dbal/development/src/core/entities/operations/system/package/mutations.ts index b7f8bdef4..dd7b5647f 100644 --- a/dbal/development/src/core/entities/operations/system/package/mutations.ts +++ b/dbal/development/src/core/entities/operations/system/package/mutations.ts @@ -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' diff --git a/dbal/development/src/core/entities/operations/system/package/publish.ts b/dbal/development/src/core/entities/operations/system/package/publish.ts index f59f721ae..024a3134b 100644 --- a/dbal/development/src/core/entities/operations/system/package/publish.ts +++ b/dbal/development/src/core/entities/operations/system/package/publish.ts @@ -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' diff --git a/dbal/development/src/core/entities/operations/system/package/reads.ts b/dbal/development/src/core/entities/operations/system/package/reads.ts index 169c923c3..b44003ea0 100644 --- a/dbal/development/src/core/entities/operations/system/package/reads.ts +++ b/dbal/development/src/core/entities/operations/system/package/reads.ts @@ -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' diff --git a/dbal/development/src/core/entities/operations/system/package/unpublish.ts b/dbal/development/src/core/entities/operations/system/package/unpublish.ts index 27a5da97f..e6ff44a04 100644 --- a/dbal/development/src/core/entities/operations/system/package/unpublish.ts +++ b/dbal/development/src/core/entities/operations/system/package/unpublish.ts @@ -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 => { diff --git a/dbal/development/src/core/entities/package/crud/create-package.ts b/dbal/development/src/core/entities/package/crud/create-package.ts index 23e1c9668..e763ed16f 100644 --- a/dbal/development/src/core/entities/package/crud/create-package.ts +++ b/dbal/development/src/core/entities/package/crud/create-package.ts @@ -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 diff --git a/dbal/development/src/core/entities/package/crud/update-package.ts b/dbal/development/src/core/entities/package/crud/update-package.ts index f744b7624..c9754d8cc 100644 --- a/dbal/development/src/core/entities/package/crud/update-package.ts +++ b/dbal/development/src/core/entities/package/crud/update-package.ts @@ -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 diff --git a/dbal/development/src/core/entities/package/validation/validate-package-create.ts b/dbal/development/src/core/entities/package/validation/validate-package-create.ts index a7b5f6cd2..0801c1aa7 100644 --- a/dbal/development/src/core/entities/package/validation/validate-package-create.ts +++ b/dbal/development/src/core/entities/package/validation/validate-package-create.ts @@ -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; +} diff --git a/dbal/development/src/core/entities/package/validation/validate-package-update.ts b/dbal/development/src/core/entities/package/validation/validate-package-update.ts index dfe4ce6b3..b4d8dea29 100644 --- a/dbal/development/src/core/entities/package/validation/validate-package-update.ts +++ b/dbal/development/src/core/entities/package/validation/validate-package-update.ts @@ -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; +} diff --git a/dbal/development/src/core/entities/page/crud/create-page.ts b/dbal/development/src/core/entities/page/crud/create-page.ts index 8e3246bfd..1869f09ce 100644 --- a/dbal/development/src/core/entities/page/crud/create-page.ts +++ b/dbal/development/src/core/entities/page/crud/create-page.ts @@ -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 diff --git a/dbal/development/src/core/entities/page/crud/update-page.ts b/dbal/development/src/core/entities/page/crud/update-page.ts index cc6a0dc12..2becc5352 100644 --- a/dbal/development/src/core/entities/page/crud/update-page.ts +++ b/dbal/development/src/core/entities/page/crud/update-page.ts @@ -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 diff --git a/dbal/development/src/core/entities/page/validation/validate-page-create.ts b/dbal/development/src/core/entities/page/validation/validate-page-create.ts index f2cf26617..0b40207a4 100644 --- a/dbal/development/src/core/entities/page/validation/validate-page-create.ts +++ b/dbal/development/src/core/entities/page/validation/validate-page-create.ts @@ -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; +} diff --git a/dbal/development/src/core/entities/page/validation/validate-page-update.ts b/dbal/development/src/core/entities/page/validation/validate-page-update.ts index afce6196d..4dbe9fc2d 100644 --- a/dbal/development/src/core/entities/page/validation/validate-page-update.ts +++ b/dbal/development/src/core/entities/page/validation/validate-page-update.ts @@ -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; +} diff --git a/dbal/development/src/core/entities/session/crud/clean-expired.ts b/dbal/development/src/core/entities/session/crud/clean-expired.ts new file mode 100644 index 000000000..2aaa82807 --- /dev/null +++ b/dbal/development/src/core/entities/session/crud/clean-expired.ts @@ -0,0 +1,3 @@ +export function cleanExpired(store: any): void { + // TODO: Implement clean expired sessions logic +} diff --git a/dbal/development/src/core/entities/session/crud/create-session.ts b/dbal/development/src/core/entities/session/crud/create-session.ts index 71191d162..46e9747ee 100644 --- a/dbal/development/src/core/entities/session/crud/create-session.ts +++ b/dbal/development/src/core/entities/session/crud/create-session.ts @@ -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 diff --git a/dbal/development/src/core/entities/session/crud/update-session.ts b/dbal/development/src/core/entities/session/crud/update-session.ts index ebbeb7b03..a0ee55054 100644 --- a/dbal/development/src/core/entities/session/crud/update-session.ts +++ b/dbal/development/src/core/entities/session/crud/update-session.ts @@ -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 diff --git a/dbal/development/src/core/entities/session/types.ts b/dbal/development/src/core/entities/session/types.ts index b0241f694..312b28ff3 100644 --- a/dbal/development/src/core/entities/session/types.ts +++ b/dbal/development/src/core/entities/session/types.ts @@ -5,11 +5,13 @@ export interface CreateSessionInput { userId: string; + token: string; expiresAt?: Date; } export interface UpdateSessionInput { userId?: string; + token?: string; expiresAt?: Date; } diff --git a/dbal/development/src/core/entities/session/validation/validate-session-create.ts b/dbal/development/src/core/entities/session/validation/validate-session-create.ts index b08a54bd5..405592e37 100644 --- a/dbal/development/src/core/entities/session/validation/validate-session-create.ts +++ b/dbal/development/src/core/entities/session/validation/validate-session-create.ts @@ -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; +} diff --git a/dbal/development/src/core/entities/session/validation/validate-session-update.ts b/dbal/development/src/core/entities/session/validation/validate-session-update.ts index 0248e389d..6c5210a64 100644 --- a/dbal/development/src/core/entities/session/validation/validate-session-update.ts +++ b/dbal/development/src/core/entities/session/validation/validate-session-update.ts @@ -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; +} diff --git a/dbal/development/src/core/entities/workflow/types.ts b/dbal/development/src/core/entities/workflow/types.ts index 0f722874a..5930ff0ea 100644 --- a/dbal/development/src/core/entities/workflow/types.ts +++ b/dbal/development/src/core/entities/workflow/types.ts @@ -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; }