Template base para proyectos SaaS multi-tenant. Estructura inicial: - apps/backend (NestJS API) - apps/frontend (React/Vite) - apps/database (PostgreSQL DDL) - docs/ (Documentación) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
31 lines
1.3 KiB
TypeScript
31 lines
1.3 KiB
TypeScript
import { Type } from '@nestjs/common';
|
|
import { EnumSchemaAttributes } from './enum-schema-attributes.interface';
|
|
import { ReferenceObject, SchemaObject } from './open-api-spec.interface';
|
|
export type EnumAllowedTypes = any[] | Record<string, any> | (() => any[] | Record<string, any>);
|
|
interface SchemaObjectCommonMetadata extends Omit<SchemaObject, 'type' | 'required' | 'properties' | 'enum'> {
|
|
isArray?: boolean;
|
|
name?: string;
|
|
enum?: EnumAllowedTypes;
|
|
}
|
|
export type SchemaObjectMetadata = (SchemaObjectCommonMetadata & {
|
|
type?: Type<unknown> | Function | [Function] | 'array' | 'string' | 'number' | 'boolean' | 'integer' | 'file' | 'null';
|
|
required?: boolean;
|
|
}) | ({
|
|
type?: Type<unknown> | Function | [Function] | Record<string, any>;
|
|
required?: boolean;
|
|
enumName: string;
|
|
enumSchema?: EnumSchemaAttributes;
|
|
} & SchemaObjectCommonMetadata) | ({
|
|
type: 'object';
|
|
properties: Record<string, SchemaObjectMetadata>;
|
|
required?: string[];
|
|
selfRequired?: boolean;
|
|
} & SchemaObjectCommonMetadata) | ({
|
|
type: 'object';
|
|
properties?: Record<string, SchemaObjectMetadata>;
|
|
additionalProperties: SchemaObject | ReferenceObject | boolean;
|
|
required?: string[];
|
|
selfRequired?: boolean;
|
|
} & SchemaObjectCommonMetadata);
|
|
export {};
|