"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateDtoTypes = generateDtoTypes;
function generateDtoTypes(context) {
    const idType = context.dto.idType.name;
    const genericModel = context.dto.genericModel.name;
    return /* ts */ `
  export type ${idType} = number | string | boolean

export type ${genericModel}<ID extends ${idType}> = Record<string, unknown> & { id: ID }

/**
 * A generic DTO for creating a new item.
 */
export type ${context.dto.create.name}<Model extends ${genericModel}<ID>, ID extends ${idType}> = Omit<
  Model,
  'id' | 'createdAt' | 'updatedAt'
> &
  Partial<${genericModel}<ID>>

/**
 * A generic DTO for updating an existing item.
 */
export type ${context.dto.update.name}<Model extends ${genericModel}<ID>, ID extends ${idType}> = Partial<Omit<Model, 'id'>> & { id: ID }

/**
 * A generic DTO for upserting an item.
 */
export type ${context.dto.upsert.name}<Model extends ${genericModel}<ID>, ID extends ${idType}> = CreateDto<Model, ID> | UpdateDto<Model, ID>
  `;
}
//# sourceMappingURL=dto-types.generator.js.map