diff --git a/dbal/development/src/core/entities/lua-script/crud/create-lua-script.ts b/dbal/development/src/core/entities/lua-script/crud/create-lua-script.ts index 810eabc89..dc01d3eb0 100644 --- a/dbal/development/src/core/entities/lua-script/crud/create-lua-script.ts +++ b/dbal/development/src/core/entities/lua-script/crud/create-lua-script.ts @@ -3,7 +3,7 @@ * @description Create Lua script operation */ import type { CreateLuaScriptInput, LuaScript, Result } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' +import type { InMemoryStore } from '../store/in-memory-store' import { validateLuaScriptCreate } from '../../../validation/entities/lua-script/validate-lua-script-create' /** diff --git a/dbal/development/src/core/entities/lua-script/crud/delete-lua-script.ts b/dbal/development/src/core/entities/lua-script/crud/delete-lua-script.ts index b5bade92c..f5643c095 100644 --- a/dbal/development/src/core/entities/lua-script/crud/delete-lua-script.ts +++ b/dbal/development/src/core/entities/lua-script/crud/delete-lua-script.ts @@ -3,7 +3,7 @@ * @description Delete Lua script operation */ import type { Result } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' +import type { InMemoryStore } from '../store/in-memory-store' import { validateId } from '../../../validation/entities/validate-id' /** diff --git a/dbal/development/src/core/entities/lua-script/crud/get-lua-script.ts b/dbal/development/src/core/entities/lua-script/crud/get-lua-script.ts index 4cb466888..e504802fc 100644 --- a/dbal/development/src/core/entities/lua-script/crud/get-lua-script.ts +++ b/dbal/development/src/core/entities/lua-script/crud/get-lua-script.ts @@ -3,7 +3,7 @@ * @description Get Lua script by ID operation */ import type { LuaScript, Result } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' +import type { InMemoryStore } from '../store/in-memory-store' import { validateId } from '../../../validation/entities/validate-id' /** diff --git a/dbal/development/src/core/entities/lua-script/crud/list-lua-scripts.ts b/dbal/development/src/core/entities/lua-script/crud/list-lua-scripts.ts index eb67c3469..82e87a5b9 100644 --- a/dbal/development/src/core/entities/lua-script/crud/list-lua-scripts.ts +++ b/dbal/development/src/core/entities/lua-script/crud/list-lua-scripts.ts @@ -3,7 +3,7 @@ * @description List Lua scripts with filtering and pagination */ import type { ListOptions, LuaScript, Result } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' +import type { InMemoryStore } from '../store/in-memory-store' /** * List Lua scripts with filtering and pagination diff --git a/dbal/development/src/core/entities/lua-script/crud/update-lua-script.ts b/dbal/development/src/core/entities/lua-script/crud/update-lua-script.ts index 57f566ec9..8f825913a 100644 --- a/dbal/development/src/core/entities/lua-script/crud/update-lua-script.ts +++ b/dbal/development/src/core/entities/lua-script/crud/update-lua-script.ts @@ -3,7 +3,7 @@ * @description Update Lua script operation */ import type { LuaScript, Result, UpdateLuaScriptInput } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' +import type { InMemoryStore } from '../store/in-memory-store' import { validateId } from '../../../validation/entities/validate-id' import { validateLuaScriptUpdate } from '../../../validation/entities/lua-script/validate-lua-script-update' diff --git a/dbal/development/src/core/entities/lua-script/types.ts b/dbal/development/src/core/entities/lua-script/types.ts index 0e1afaede..cc84f4c5c 100644 --- a/dbal/development/src/core/entities/lua-script/types.ts +++ b/dbal/development/src/core/entities/lua-script/types.ts @@ -10,6 +10,25 @@ export interface CreateLuaScriptInput { isActive?: boolean; } +export interface UpdateLuaScriptInput { + name?: string; + code?: string; + description?: string; + isActive?: boolean; +} + +export interface LuaScript { + id: string; + name: string; + code: string; + description?: string; + isActive: boolean; + isSandboxed: boolean; + timeoutMs: number; + createdAt: Date; + updatedAt: Date; +} + export interface LuaScriptView { id: string; name: string; diff --git a/dbal/development/src/core/entities/operations/core/user/batch.ts b/dbal/development/src/core/entities/operations/core/user/batch.ts index b95e02b7c..4ae97eb3b 100644 --- a/dbal/development/src/core/entities/operations/core/user/batch.ts +++ b/dbal/development/src/core/entities/operations/core/user/batch.ts @@ -1,7 +1,7 @@ -import type { DBALAdapter } from '../../../../adapters/adapter' -import type { User } from '../../../../foundation/types' -import { DBALError } from '../../../../foundation/errors' -import { validateUserCreate, validateUserUpdate } from '../../../../foundation/validation' +import type { DBALAdapter } from '../../../../../adapters/adapter' +import type { User } from '../../../../../core/foundation/types' +import { DBALError } from '../../../../../core/foundation/errors' +import { validateUserCreate, validateUserUpdate } from '../../../../../core/foundation/validation' export const createManyUsers = async ( adapter: DBALAdapter, diff --git a/dbal/development/src/core/entities/operations/core/user/create.ts b/dbal/development/src/core/entities/operations/core/user/create.ts index 4543fe4e2..f962eeb15 100644 --- a/dbal/development/src/core/entities/operations/core/user/create.ts +++ b/dbal/development/src/core/entities/operations/core/user/create.ts @@ -1,6 +1,6 @@ -import type { DBALAdapter } from '../../../../adapters/adapter' -import { DBALError } from '../../../../foundation/errors' -import type { User } from '../../../../foundation/types' +import type { DBALAdapter } from '../../../../../adapters/adapter' +import { DBALError } from '../../../../../core/foundation/errors' +import type { User } from '../../../../../core/foundation/types' import { assertValidUserCreate } from './validation' export const createUser = async ( diff --git a/dbal/development/src/core/entities/operations/core/user/delete.ts b/dbal/development/src/core/entities/operations/core/user/delete.ts index 07484d1a6..efd1971e9 100644 --- a/dbal/development/src/core/entities/operations/core/user/delete.ts +++ b/dbal/development/src/core/entities/operations/core/user/delete.ts @@ -1,5 +1,5 @@ -import type { DBALAdapter } from '../../../../adapters/adapter' -import { DBALError } from '../../../../foundation/errors' +import type { DBALAdapter } from '../../../../../adapters/adapter' +import { DBALError } from '../../../../../core/foundation/errors' import { assertValidUserId } from './validation' export const deleteUser = async (adapter: DBALAdapter, id: string): Promise => { diff --git a/dbal/development/src/core/entities/operations/core/user/index.ts b/dbal/development/src/core/entities/operations/core/user/index.ts index 30abea055..e4da30706 100644 --- a/dbal/development/src/core/entities/operations/core/user/index.ts +++ b/dbal/development/src/core/entities/operations/core/user/index.ts @@ -1,6 +1,6 @@ // TODO: Implement user operations -// import type { DBALAdapter } from '../../../../adapters/adapter' -// import type { User, ListOptions, ListResult } from '../../../../foundation/types' +// import type { DBALAdapter } from '../../../../../adapters/adapter' +// import type { User, ListOptions, ListResult } from '../../../../../core/foundation/types' // import { createUser } from './create' // import { deleteUser } from './delete' // import { updateUser } from './update' diff --git a/dbal/development/src/core/entities/operations/core/user/reads.ts b/dbal/development/src/core/entities/operations/core/user/reads.ts index 9fdcb2a72..d37a9fd5f 100644 --- a/dbal/development/src/core/entities/operations/core/user/reads.ts +++ b/dbal/development/src/core/entities/operations/core/user/reads.ts @@ -1,7 +1,7 @@ -import type { DBALAdapter } from '../../../../adapters/adapter' -import type { User, ListOptions, ListResult } from '../../../../foundation/types' -import { DBALError } from '../../../../foundation/errors' -import { validateId } from '../../../../foundation/validation' +import type { DBALAdapter } from '../../../../../adapters/adapter' +import type { User, ListOptions, ListResult } from '../../../../../core/foundation/types' +import { DBALError } from '../../../../../core/foundation/errors' +import { validateId } from '../../../../../core/foundation/validation' export const readUser = async (adapter: DBALAdapter, id: string): Promise => { const validationErrors = validateId(id) diff --git a/dbal/development/src/core/entities/operations/core/user/update.ts b/dbal/development/src/core/entities/operations/core/user/update.ts index ca0ae185d..e1cc54816 100644 --- a/dbal/development/src/core/entities/operations/core/user/update.ts +++ b/dbal/development/src/core/entities/operations/core/user/update.ts @@ -1,6 +1,6 @@ -import type { DBALAdapter } from '../../../../adapters/adapter' -import { DBALError } from '../../../../foundation/errors' -import type { User } from '../../../../foundation/types' +import type { DBALAdapter } from '../../../../../adapters/adapter' +import { DBALError } from '../../../../../core/foundation/errors' +import type { User } from '../../../../../core/foundation/types' import { assertValidUserId, assertValidUserUpdate } from './validation' export const updateUser = async ( diff --git a/dbal/development/src/core/entities/operations/core/user/validation.ts b/dbal/development/src/core/entities/operations/core/user/validation.ts index 0b57322d5..533f565bb 100644 --- a/dbal/development/src/core/entities/operations/core/user/validation.ts +++ b/dbal/development/src/core/entities/operations/core/user/validation.ts @@ -1,6 +1,6 @@ -import { DBALError } from '../../../../foundation/errors' -import type { User } from '../../../../foundation/types' -import { validateId, validateUserCreate, validateUserUpdate } from '../../../../foundation/validation' +import { DBALError } from '../../../../../core/foundation/errors' +import type { User } from '../../../../../core/foundation/types' +import { validateId, validateUserCreate, validateUserUpdate } from '../../../../../core/foundation/validation' export const assertValidUserId = (id: string): void => { const validationErrors = validateId(id) 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 c33abf49e..18f48d5ce 100644 --- a/dbal/development/src/core/entities/package/crud/create-package.ts +++ b/dbal/development/src/core/entities/package/crud/create-package.ts @@ -3,7 +3,7 @@ * @description Create package operation */ import type { CreatePackageInput, Package, Result } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' +import type { InMemoryStore } from '../store/in-memory-store' import { validatePackageCreate } from '../../validation/validate-package-create' /** diff --git a/dbal/development/src/core/entities/package/crud/delete-package.ts b/dbal/development/src/core/entities/package/crud/delete-package.ts index f15ce3838..2d2ee9330 100644 --- a/dbal/development/src/core/entities/package/crud/delete-package.ts +++ b/dbal/development/src/core/entities/package/crud/delete-package.ts @@ -3,8 +3,8 @@ * @description Delete package operation */ import type { Result } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' -import { validateId } from '../../validation/validate-id' +import type { InMemoryStore } from '../store/in-memory-store' +import { validateId } from '../validation/validate-id' /** * Delete a package by ID diff --git a/dbal/development/src/core/entities/package/crud/get-package.ts b/dbal/development/src/core/entities/package/crud/get-package.ts index 03d98b01e..06cd6c0d0 100644 --- a/dbal/development/src/core/entities/package/crud/get-package.ts +++ b/dbal/development/src/core/entities/package/crud/get-package.ts @@ -3,8 +3,8 @@ * @description Get package operations */ import type { Package, Result } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' -import { validateId } from '../../validation/validate-id' +import type { InMemoryStore } from '../store/in-memory-store' +import { validateId } from '../validation/validate-id' /** * Get a package by ID diff --git a/dbal/development/src/core/entities/package/crud/list-packages.ts b/dbal/development/src/core/entities/package/crud/list-packages.ts index 9867592eb..066b22134 100644 --- a/dbal/development/src/core/entities/package/crud/list-packages.ts +++ b/dbal/development/src/core/entities/package/crud/list-packages.ts @@ -3,7 +3,7 @@ * @description List packages with filtering and pagination */ import type { ListOptions, Package, Result } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' +import type { InMemoryStore } from '../store/in-memory-store' /** * List packages with filtering and pagination 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 29f94bfd8..8756df5f6 100644 --- a/dbal/development/src/core/entities/package/crud/update-package.ts +++ b/dbal/development/src/core/entities/package/crud/update-package.ts @@ -3,8 +3,8 @@ * @description Update package operation */ import type { Package, Result, UpdatePackageInput } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' -import { validateId } from '../../validation/validate-id' +import type { InMemoryStore } from '../store/in-memory-store' +import { validateId } from '../validation/validate-id' import { validatePackageUpdate } from '../../validation/validate-package-update' /** diff --git a/dbal/development/src/core/entities/package/types.ts b/dbal/development/src/core/entities/package/types.ts index c942729fe..383b1e331 100644 --- a/dbal/development/src/core/entities/package/types.ts +++ b/dbal/development/src/core/entities/package/types.ts @@ -11,6 +11,13 @@ export interface CreatePackageInput { isPublished?: boolean; } +export interface UpdatePackageInput { + name?: string; + version?: string; + description?: string; + isPublished?: boolean; +} + export interface Package { id: string; packageId: string; 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 a5e093b04..a49016bfb 100644 --- a/dbal/development/src/core/entities/page/crud/create-page.ts +++ b/dbal/development/src/core/entities/page/crud/create-page.ts @@ -3,7 +3,7 @@ * @description Create page operation */ import type { CreatePageInput, PageView, Result } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' +import type { InMemoryStore } from '../store/in-memory-store' import { validatePageCreate } from '../../validation/validate-page-create' /** diff --git a/dbal/development/src/core/entities/page/crud/delete-page.ts b/dbal/development/src/core/entities/page/crud/delete-page.ts index a8ea5c998..6fe02cffb 100644 --- a/dbal/development/src/core/entities/page/crud/delete-page.ts +++ b/dbal/development/src/core/entities/page/crud/delete-page.ts @@ -3,8 +3,8 @@ * @description Delete page operation */ import type { Result } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' -import { validateId } from '../../validation/validate-id' +import type { InMemoryStore } from '../store/in-memory-store' +import { validateId } from '../validation/validate-id' /** * Delete a page by ID diff --git a/dbal/development/src/core/entities/page/crud/get-page.ts b/dbal/development/src/core/entities/page/crud/get-page.ts index f71c985ed..228bcdf0c 100644 --- a/dbal/development/src/core/entities/page/crud/get-page.ts +++ b/dbal/development/src/core/entities/page/crud/get-page.ts @@ -3,8 +3,8 @@ * @description Get page operations */ import type { PageView, Result } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' -import { validateId } from '../../validation/validate-id' +import type { InMemoryStore } from '../store/in-memory-store' +import { validateId } from '../validation/validate-id' /** * Get a page by ID diff --git a/dbal/development/src/core/entities/page/crud/list-pages.ts b/dbal/development/src/core/entities/page/crud/list-pages.ts index 3b16ecb19..631ee9697 100644 --- a/dbal/development/src/core/entities/page/crud/list-pages.ts +++ b/dbal/development/src/core/entities/page/crud/list-pages.ts @@ -3,7 +3,7 @@ * @description List pages with filtering and pagination */ import type { ListOptions, PageView, Result } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' +import type { InMemoryStore } from '../store/in-memory-store' /** * List pages with filtering and pagination 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 ca99f20aa..50bd2f397 100644 --- a/dbal/development/src/core/entities/page/crud/update-page.ts +++ b/dbal/development/src/core/entities/page/crud/update-page.ts @@ -3,8 +3,8 @@ * @description Update page operation */ import type { PageView, Result, UpdatePageInput } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' -import { validateId } from '../../validation/validate-id' +import type { InMemoryStore } from '../store/in-memory-store' +import { validateId } from '../validation/validate-id' import { validatePageUpdate } from '../../validation/validate-page-update' /** diff --git a/dbal/development/src/core/entities/page/types.ts b/dbal/development/src/core/entities/page/types.ts index e9175eba8..810cbc0f6 100644 --- a/dbal/development/src/core/entities/page/types.ts +++ b/dbal/development/src/core/entities/page/types.ts @@ -12,6 +12,27 @@ export interface CreatePageInput { isActive?: boolean; } +export interface UpdatePageInput { + slug?: string; + title?: string; + description?: string; + level?: string; + layout?: string; + isActive?: boolean; +} + +export interface Page { + id: string; + slug: string; + title: string; + description?: string; + level?: string; + layout?: string; + isActive: boolean; + createdAt: Date; + updatedAt: Date; +} + export interface PageView { id: string; slug: string; 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 648dd276a..422836e36 100644 --- a/dbal/development/src/core/entities/session/crud/create-session.ts +++ b/dbal/development/src/core/entities/session/crud/create-session.ts @@ -3,7 +3,7 @@ * @description Create session operation */ import type { CreateSessionInput, Result, Session } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' +import type { InMemoryStore } from '../store/in-memory-store' import { validateSessionCreate } from '../../validation/validate-session-create' /** diff --git a/dbal/development/src/core/entities/session/crud/delete-session.ts b/dbal/development/src/core/entities/session/crud/delete-session.ts index c83adb467..0f00c2584 100644 --- a/dbal/development/src/core/entities/session/crud/delete-session.ts +++ b/dbal/development/src/core/entities/session/crud/delete-session.ts @@ -3,8 +3,8 @@ * @description Delete session operation */ import type { Result } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' -import { validateId } from '../../validation/validate-id' +import type { InMemoryStore } from '../store/in-memory-store' +import { validateId } from '../validation/validate-id' /** * Delete a session by ID diff --git a/dbal/development/src/core/entities/session/crud/get-session.ts b/dbal/development/src/core/entities/session/crud/get-session.ts index e7d8a8e13..13e8f21bc 100644 --- a/dbal/development/src/core/entities/session/crud/get-session.ts +++ b/dbal/development/src/core/entities/session/crud/get-session.ts @@ -3,8 +3,8 @@ * @description Get session operations */ import type { Result, Session } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' -import { validateId } from '../../validation/validate-id' +import type { InMemoryStore } from '../store/in-memory-store' +import { validateId } from '../validation/validate-id' /** * Get a session by ID diff --git a/dbal/development/src/core/entities/session/crud/list-sessions.ts b/dbal/development/src/core/entities/session/crud/list-sessions.ts index d1582d627..9522d7d3c 100644 --- a/dbal/development/src/core/entities/session/crud/list-sessions.ts +++ b/dbal/development/src/core/entities/session/crud/list-sessions.ts @@ -3,7 +3,7 @@ * @description List sessions with filtering and pagination */ import type { ListOptions, Result, Session } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' +import type { InMemoryStore } from '../store/in-memory-store' import { cleanExpiredSessions } from './clean-expired' /** 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 7cbd9050f..17fe5e135 100644 --- a/dbal/development/src/core/entities/session/crud/update-session.ts +++ b/dbal/development/src/core/entities/session/crud/update-session.ts @@ -3,8 +3,8 @@ * @description Update session operation */ import type { Result, Session, UpdateSessionInput } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' -import { validateId } from '../../validation/validate-id' +import type { InMemoryStore } from '../store/in-memory-store' +import { validateId } from '../validation/validate-id' import { validateSessionUpdate } from '../../validation/validate-session-update' /** diff --git a/dbal/development/src/core/entities/session/types.ts b/dbal/development/src/core/entities/session/types.ts index 1cf4499a2..b0241f694 100644 --- a/dbal/development/src/core/entities/session/types.ts +++ b/dbal/development/src/core/entities/session/types.ts @@ -8,6 +8,11 @@ export interface CreateSessionInput { expiresAt?: Date; } +export interface UpdateSessionInput { + userId?: string; + expiresAt?: Date; +} + export interface Session { id: string; token: string; diff --git a/dbal/development/src/core/entities/user/crud/create-user.ts b/dbal/development/src/core/entities/user/crud/create-user.ts index c18035fb2..dd3c8f1bb 100644 --- a/dbal/development/src/core/entities/user/crud/create-user.ts +++ b/dbal/development/src/core/entities/user/crud/create-user.ts @@ -3,7 +3,7 @@ * @description Create user operation */ import type { CreateUserInput, Result, User } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' +import type { InMemoryStore } from '../store/in-memory-store' import { validateUserCreate } from '../../validation/validate-user-create' /** diff --git a/dbal/development/src/core/entities/user/crud/delete-user.ts b/dbal/development/src/core/entities/user/crud/delete-user.ts index f09fc0ba7..3bff8d0ad 100644 --- a/dbal/development/src/core/entities/user/crud/delete-user.ts +++ b/dbal/development/src/core/entities/user/crud/delete-user.ts @@ -3,8 +3,8 @@ * @description Delete user operation */ import type { Result } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' -import { validateId } from '../../validation/validate-id' +import type { InMemoryStore } from '../store/in-memory-store' +import { validateId } from '../validation/validate-id' /** * Delete a user by ID diff --git a/dbal/development/src/core/entities/user/crud/get-user.ts b/dbal/development/src/core/entities/user/crud/get-user.ts index d23ffa603..0f8b6ca40 100644 --- a/dbal/development/src/core/entities/user/crud/get-user.ts +++ b/dbal/development/src/core/entities/user/crud/get-user.ts @@ -3,8 +3,8 @@ * @description Get user operations */ import type { Result, User } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' -import { validateId } from '../../validation/validate-id' +import type { InMemoryStore } from '../store/in-memory-store' +import { validateId } from '../validation/validate-id' /** * Get a user by ID diff --git a/dbal/development/src/core/entities/user/crud/list-users.ts b/dbal/development/src/core/entities/user/crud/list-users.ts index 45731e637..55288b17b 100644 --- a/dbal/development/src/core/entities/user/crud/list-users.ts +++ b/dbal/development/src/core/entities/user/crud/list-users.ts @@ -3,7 +3,7 @@ * @description List users with filtering and pagination */ import type { ListOptions, Result, User } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' +import type { InMemoryStore } from '../store/in-memory-store' /** * List users with filtering and pagination diff --git a/dbal/development/src/core/entities/user/crud/update-user.ts b/dbal/development/src/core/entities/user/crud/update-user.ts index ea85af7d0..2ce5d6193 100644 --- a/dbal/development/src/core/entities/user/crud/update-user.ts +++ b/dbal/development/src/core/entities/user/crud/update-user.ts @@ -3,8 +3,8 @@ * @description Update user operation */ import type { Result, UpdateUserInput, User } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' -import { validateId } from '../../validation/validate-id' +import type { InMemoryStore } from '../store/in-memory-store' +import { validateId } from '../validation/validate-id' import { validateUserUpdate } from '../../validation/validate-user-update' /** diff --git a/dbal/development/src/core/entities/user/types.ts b/dbal/development/src/core/entities/user/types.ts index c9446c5ca..4be3c790b 100644 --- a/dbal/development/src/core/entities/user/types.ts +++ b/dbal/development/src/core/entities/user/types.ts @@ -10,6 +10,22 @@ export interface CreateUserInput { isActive?: boolean; } +export interface UpdateUserInput { + username?: string; + email?: string; + password?: string; + isActive?: boolean; +} + +export interface User { + id: string; + username: string; + email: string; + isActive: boolean; + createdAt: Date; + updatedAt: Date; +} + export interface UserView { id: string; username: string; diff --git a/dbal/development/src/core/entities/workflow/crud/create-workflow.ts b/dbal/development/src/core/entities/workflow/crud/create-workflow.ts index 86207a4cc..417dee370 100644 --- a/dbal/development/src/core/entities/workflow/crud/create-workflow.ts +++ b/dbal/development/src/core/entities/workflow/crud/create-workflow.ts @@ -3,7 +3,7 @@ * @description Create workflow operation */ import type { CreateWorkflowInput, Result, Workflow } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' +import type { InMemoryStore } from '../store/in-memory-store' import { validateWorkflowCreate } from '../../validation/validate-workflow-create' /** diff --git a/dbal/development/src/core/entities/workflow/crud/delete-workflow.ts b/dbal/development/src/core/entities/workflow/crud/delete-workflow.ts index 8c941b90b..5ba60bcb9 100644 --- a/dbal/development/src/core/entities/workflow/crud/delete-workflow.ts +++ b/dbal/development/src/core/entities/workflow/crud/delete-workflow.ts @@ -3,8 +3,8 @@ * @description Delete workflow operation */ import type { Result } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' -import { validateId } from '../../validation/validate-id' +import type { InMemoryStore } from '../store/in-memory-store' +import { validateId } from '../validation/validate-id' /** * Delete a workflow by ID diff --git a/dbal/development/src/core/entities/workflow/crud/get-workflow.ts b/dbal/development/src/core/entities/workflow/crud/get-workflow.ts index 5bc19408f..b48b02c9b 100644 --- a/dbal/development/src/core/entities/workflow/crud/get-workflow.ts +++ b/dbal/development/src/core/entities/workflow/crud/get-workflow.ts @@ -3,8 +3,8 @@ * @description Get workflow operation */ import type { Result, Workflow } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' -import { validateId } from '../../validation/validate-id' +import type { InMemoryStore } from '../store/in-memory-store' +import { validateId } from '../validation/validate-id' /** * Get a workflow by ID diff --git a/dbal/development/src/core/entities/workflow/crud/list-workflows.ts b/dbal/development/src/core/entities/workflow/crud/list-workflows.ts index cca064e70..1eae04080 100644 --- a/dbal/development/src/core/entities/workflow/crud/list-workflows.ts +++ b/dbal/development/src/core/entities/workflow/crud/list-workflows.ts @@ -3,7 +3,7 @@ * @description List workflows with filtering and pagination */ import type { ListOptions, Result, Workflow } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' +import type { InMemoryStore } from '../store/in-memory-store' /** * List workflows with filtering and pagination diff --git a/dbal/development/src/core/entities/workflow/crud/update-workflow.ts b/dbal/development/src/core/entities/workflow/crud/update-workflow.ts index b03329dd3..90b1c1ddd 100644 --- a/dbal/development/src/core/entities/workflow/crud/update-workflow.ts +++ b/dbal/development/src/core/entities/workflow/crud/update-workflow.ts @@ -3,8 +3,8 @@ * @description Update workflow operation */ import type { Result, UpdateWorkflowInput, Workflow } from '../../types' -import type { InMemoryStore } from '../../store/in-memory-store' -import { validateId } from '../../validation/validate-id' +import type { InMemoryStore } from '../store/in-memory-store' +import { validateId } from '../validation/validate-id' import { validateWorkflowUpdate } from '../../validation/validate-workflow-update' /** diff --git a/dbal/development/src/core/entities/workflow/types.ts b/dbal/development/src/core/entities/workflow/types.ts index 298677656..0f722874a 100644 --- a/dbal/development/src/core/entities/workflow/types.ts +++ b/dbal/development/src/core/entities/workflow/types.ts @@ -10,6 +10,23 @@ export interface CreateWorkflowInput { isActive?: boolean; } +export interface UpdateWorkflowInput { + name?: string; + description?: string; + definition?: any; + isActive?: boolean; +} + +export interface Workflow { + id: string; + name: string; + description?: string; + definition?: any; + isActive: boolean; + createdAt: Date; + updatedAt: Date; +} + export interface WorkflowView { id: string; name: string;