mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-24 22:04:56 +00:00
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:
@@ -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 {
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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> => {
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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> => {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
export function cleanExpired(store: any): void {
|
||||
// TODO: Implement clean expired sessions logic
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,11 +5,13 @@
|
||||
|
||||
export interface CreateSessionInput {
|
||||
userId: string;
|
||||
token: string;
|
||||
expiresAt?: Date;
|
||||
}
|
||||
|
||||
export interface UpdateSessionInput {
|
||||
userId?: string;
|
||||
token?: string;
|
||||
expiresAt?: Date;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user