Fix remaining DBAL imports and add AWS SDK stub types

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-06 02:01:55 +00:00
parent 1a421ea2da
commit 5de31cd740
52 changed files with 83 additions and 45 deletions

View File

@@ -0,0 +1,24 @@
declare module '@aws-sdk/client-s3' {
export class S3Client {
constructor(config: any);
send(command: any): Promise<any>;
}
export class GetObjectCommand {
constructor(input: any);
}
export class PutObjectCommand {
constructor(input: any);
}
export class DeleteObjectCommand {
constructor(input: any);
}
export class HeadObjectCommand {
constructor(input: any);
}
export class ListObjectsV2Command {
constructor(input: any);
}
export class CopyObjectCommand {
constructor(input: any);
}
}

View File

@@ -0,0 +1,6 @@
declare module '@aws-sdk/lib-storage' {
export class Upload {
constructor(options: any);
done(): Promise<any>;
}
}

View File

@@ -0,0 +1,3 @@
declare module '@aws-sdk/s3-request-presigner' {
export function getSignedUrl(client: any, command: any, options?: any): Promise<string>;
}

View File

@@ -1,7 +1,7 @@
import { promises as fs, createReadStream } from 'fs'
import type { ReadStreamOptions } from 'fs'
import type { DownloadOptions } from '../../../blob-storage'
import { DBALError } from '../../../core/foundation/errors'
import { DBALError } from '../../../../core/foundation/errors'
import type { FilesystemContext } from '../context'
import { buildFullPath } from '../paths'

View File

@@ -1,7 +1,7 @@
import { promises as fs } from 'fs'
import path from 'path'
import type { BlobListOptions, BlobListResult, BlobMetadata } from '../../../blob-storage'
import { DBALError } from '../../../core/foundation/errors'
import { DBALError } from '../../../../core/foundation/errors'
import type { FilesystemContext } from '../context'
import { buildFullPath } from '../paths'
import { readMetadata } from './metadata'

View File

@@ -1,7 +1,7 @@
import { promises as fs } from 'fs'
import path from 'path'
import type { BlobMetadata } from '../../../blob-storage'
import { DBALError } from '../../../core/foundation/errors'
import { DBALError } from '../../../../core/foundation/errors'
import type { FilesystemContext } from '../context'
import { buildFullPath, buildMetadataPath } from '../paths'
import { readMetadata } from './metadata'

View File

@@ -1,7 +1,7 @@
import { promises as fs } from 'fs'
import { createHash } from 'crypto'
import type { BlobMetadata } from '../../../blob-storage'
import { DBALError } from '../../../core/foundation/errors'
import { DBALError } from '../../../../core/foundation/errors'
import type { FilesystemContext } from '../context'
import { buildFullPath, buildMetadataPath } from '../paths'

View File

@@ -2,7 +2,7 @@ import { promises as fs, createWriteStream } from 'fs'
import path from 'path'
import { pipeline } from 'stream/promises'
import type { BlobMetadata, UploadOptions } from '../../../blob-storage'
import { DBALError } from '../../../core/foundation/errors'
import { DBALError } from '../../../../core/foundation/errors'
import type { FilesystemContext } from '../context'
import { buildFullPath, buildMetadataPath } from '../paths'
import { generateEtag, writeMetadata } from './metadata'

View File

@@ -1,5 +1,5 @@
import type { DownloadOptions } from '../../../blob-storage'
import { DBALError } from '../../../core/foundation/errors'
import { DBALError } from '../../../../core/foundation/errors'
import { buildRangeHeader } from '../range'
import type { S3Context } from '../client'

View File

@@ -1,5 +1,5 @@
import type { BlobListOptions, BlobListResult, BlobMetadata } from '../../../blob-storage'
import { DBALError } from '../../../core/foundation/errors'
import { DBALError } from '../../../../core/foundation/errors'
import type { S3Context } from '../client'
export async function listBlobs(

View File

@@ -1,5 +1,5 @@
import type { BlobMetadata } from '../../../blob-storage'
import { DBALError } from '../../../core/foundation/errors'
import { DBALError } from '../../../../core/foundation/errors'
import type { S3Context } from '../client'
import { getMetadata } from './metadata'

View File

@@ -1,5 +1,5 @@
import type { BlobMetadata } from '../../../blob-storage'
import { DBALError } from '../../../core/foundation/errors'
import { DBALError } from '../../../../core/foundation/errors'
import type { S3Context } from '../client'
export async function getMetadata(

View File

@@ -1,5 +1,5 @@
import type { BlobMetadata, UploadOptions } from '../../../blob-storage'
import { DBALError } from '../../../core/foundation/errors'
import { DBALError } from '../../../../core/foundation/errors'
import type { S3Context } from '../client'
export async function uploadBuffer(

View File

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

View File

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

View File

@@ -1,5 +1,5 @@
import { DBALError } from '../../../core/foundation/errors'
import type { BlobMetadata } from '../blob-storage'
import type { BlobMetadata } from '../../blob-storage'
import { auditCopy, auditDeletion } from './audit-hooks'
import type { TenantAwareDeps } from './context'
import { scopeKey } from './context'

View File

@@ -1,4 +1,4 @@
import type { DownloadOptions, BlobMetadata, BlobListOptions, BlobListResult } from '../blob-storage'
import type { DownloadOptions, BlobMetadata, BlobListOptions, BlobListResult } from '../../blob-storage'
import type { TenantAwareDeps } from './context'
import { scopeKey, unscopeKey } from './context'
import { ensurePermission, resolveTenantContext } from './tenant-context'

View File

@@ -3,7 +3,7 @@ import { auditUpload } from './audit-hooks'
import type { TenantAwareDeps } from './context'
import { scopeKey } from './context'
import { ensurePermission, resolveTenantContext } from './tenant-context'
import type { UploadOptions, BlobMetadata } from '../blob-storage'
import type { UploadOptions, BlobMetadata } from '../../blob-storage'
export const uploadBuffer = async (
deps: TenantAwareDeps,

View File

@@ -2,7 +2,7 @@
* @file create-lua-script.ts
* @description Create Lua script operation
*/
import type { CreateLuaScriptInput, LuaScript, Result } from '../../types'
import type { CreateLuaScriptInput, LuaScript, Result } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateLuaScriptCreate } from '../../../validation/entities/lua-script/validate-lua-script-create'

View File

@@ -2,7 +2,7 @@
* @file delete-lua-script.ts
* @description Delete Lua script operation
*/
import type { Result } from '../../types'
import type { Result } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateId } from '../../../validation/entities/validate-id'

View File

@@ -2,7 +2,7 @@
* @file get-lua-script.ts
* @description Get Lua script by ID operation
*/
import type { LuaScript, Result } from '../../types'
import type { LuaScript, Result } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateId } from '../../../validation/entities/validate-id'

View File

@@ -2,7 +2,7 @@
* @file list-lua-scripts.ts
* @description List Lua scripts with filtering and pagination
*/
import type { ListOptions, LuaScript, Result } from '../../types'
import type { ListOptions, LuaScript, Result } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
/**

View File

@@ -2,7 +2,7 @@
* @file update-lua-script.ts
* @description Update Lua script operation
*/
import type { LuaScript, Result, UpdateLuaScriptInput } from '../../types'
import type { LuaScript, Result, UpdateLuaScriptInput } from '../types'
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'

View File

@@ -5,5 +5,6 @@
export interface InMemoryStore {
luaScripts: Map<string, any>;
luaScriptNames: Map<string, string>;
generateId(entityType: string): string;
}

View File

@@ -2,7 +2,7 @@
* @file create-package.ts
* @description Create package operation
*/
import type { CreatePackageInput, Package, Result } from '../../types'
import type { CreatePackageInput, Package, Result } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validatePackageCreate } from '../../validation/validate-package-create'

View File

@@ -2,7 +2,7 @@
* @file delete-package.ts
* @description Delete package operation
*/
import type { Result } from '../../types'
import type { Result } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateId } from '../validation/validate-id'

View File

@@ -2,7 +2,7 @@
* @file get-package.ts
* @description Get package operations
*/
import type { Package, Result } from '../../types'
import type { Package, Result } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateId } from '../validation/validate-id'

View File

@@ -2,7 +2,7 @@
* @file list-packages.ts
* @description List packages with filtering and pagination
*/
import type { ListOptions, Package, Result } from '../../types'
import type { ListOptions, Package, Result } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
/**

View File

@@ -2,7 +2,7 @@
* @file update-package.ts
* @description Update package operation
*/
import type { Package, Result, UpdatePackageInput } from '../../types'
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'

View File

@@ -6,5 +6,6 @@
export interface InMemoryStore {
packages: Map<string, any>;
packageIds: Map<string, string>;
packageKeys: Map<string, string>;
generateId(entityType: string): string;
}

View File

@@ -2,7 +2,7 @@
* @file create-page.ts
* @description Create page operation
*/
import type { CreatePageInput, PageView, Result } from '../../types'
import type { CreatePageInput, PageView, Result } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validatePageCreate } from '../../validation/validate-page-create'

View File

@@ -2,7 +2,7 @@
* @file delete-page.ts
* @description Delete page operation
*/
import type { Result } from '../../types'
import type { Result } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateId } from '../validation/validate-id'

View File

@@ -2,7 +2,7 @@
* @file get-page.ts
* @description Get page operations
*/
import type { PageView, Result } from '../../types'
import type { PageView, Result } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateId } from '../validation/validate-id'

View File

@@ -2,7 +2,7 @@
* @file list-pages.ts
* @description List pages with filtering and pagination
*/
import type { ListOptions, PageView, Result } from '../../types'
import type { ListOptions, PageView, Result } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
/**

View File

@@ -2,7 +2,7 @@
* @file update-page.ts
* @description Update page operation
*/
import type { PageView, Result, UpdatePageInput } from '../../types'
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'

View File

@@ -2,7 +2,7 @@
* @file create-session.ts
* @description Create session operation
*/
import type { CreateSessionInput, Result, Session } from '../../types'
import type { CreateSessionInput, Result, Session } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateSessionCreate } from '../../validation/validate-session-create'

View File

@@ -2,7 +2,7 @@
* @file delete-session.ts
* @description Delete session operation
*/
import type { Result } from '../../types'
import type { Result } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateId } from '../validation/validate-id'

View File

@@ -2,7 +2,7 @@
* @file get-session.ts
* @description Get session operations
*/
import type { Result, Session } from '../../types'
import type { Result, Session } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateId } from '../validation/validate-id'

View File

@@ -2,7 +2,7 @@
* @file list-sessions.ts
* @description List sessions with filtering and pagination
*/
import type { ListOptions, Result, Session } from '../../types'
import type { ListOptions, Result, Session } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { cleanExpiredSessions } from './clean-expired'

View File

@@ -2,7 +2,7 @@
* @file update-session.ts
* @description Update session operation
*/
import type { Result, Session, UpdateSessionInput } from '../../types'
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'

View File

@@ -2,7 +2,7 @@
* @file create-user.ts
* @description Create user operation
*/
import type { CreateUserInput, Result, User } from '../../types'
import type { CreateUserInput, Result, User } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateUserCreate } from '../../validation/validate-user-create'

View File

@@ -2,7 +2,7 @@
* @file delete-user.ts
* @description Delete user operation
*/
import type { Result } from '../../types'
import type { Result } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateId } from '../validation/validate-id'

View File

@@ -2,7 +2,7 @@
* @file get-user.ts
* @description Get user operations
*/
import type { Result, User } from '../../types'
import type { Result, User } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateId } from '../validation/validate-id'

View File

@@ -2,7 +2,7 @@
* @file list-users.ts
* @description List users with filtering and pagination
*/
import type { ListOptions, Result, User } from '../../types'
import type { ListOptions, Result, User } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
/**

View File

@@ -2,7 +2,7 @@
* @file update-user.ts
* @description Update user operation
*/
import type { Result, UpdateUserInput, User } from '../../types'
import type { Result, UpdateUserInput, User } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateId } from '../validation/validate-id'
import { validateUserUpdate } from '../../validation/validate-user-update'

View File

@@ -7,5 +7,7 @@ export interface InMemoryStore {
users: Map<string, any>;
userEmails: Map<string, string>;
usernames: Map<string, string>;
usersByEmail: Map<string, string>;
usersByUsername: Map<string, string>;
generateId(entityType: string): string;
}

View File

@@ -2,7 +2,7 @@
* @file create-workflow.ts
* @description Create workflow operation
*/
import type { CreateWorkflowInput, Result, Workflow } from '../../types'
import type { CreateWorkflowInput, Result, Workflow } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateWorkflowCreate } from '../../validation/validate-workflow-create'

View File

@@ -2,7 +2,7 @@
* @file delete-workflow.ts
* @description Delete workflow operation
*/
import type { Result } from '../../types'
import type { Result } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateId } from '../validation/validate-id'

View File

@@ -2,7 +2,7 @@
* @file get-workflow.ts
* @description Get workflow operation
*/
import type { Result, Workflow } from '../../types'
import type { Result, Workflow } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateId } from '../validation/validate-id'

View File

@@ -2,7 +2,7 @@
* @file list-workflows.ts
* @description List workflows with filtering and pagination
*/
import type { ListOptions, Result, Workflow } from '../../types'
import type { ListOptions, Result, Workflow } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
/**

View File

@@ -2,7 +2,7 @@
* @file update-workflow.ts
* @description Update workflow operation
*/
import type { Result, UpdateWorkflowInput, Workflow } from '../../types'
import type { Result, UpdateWorkflowInput, Workflow } from '../types'
import type { InMemoryStore } from '../store/in-memory-store'
import { validateId } from '../validation/validate-id'
import { validateWorkflowUpdate } from '../../validation/validate-workflow-update'

View File

@@ -5,5 +5,6 @@
export interface InMemoryStore {
workflows: Map<string, any>;
workflowNames: Map<string, string>;
generateId(entityType: string): string;
}