Skip to main content

DTO Reference

This page documents all Data Transfer Objects (DTOs) in the agent package. DTOs define the shape of data exchanged between the API layer and the agent services. They use class-validator for validation and class-transformer for input sanitization.

Source: packages/agent/src/dto/

Work DTOs

CreateWorkDto

Used when creating a new work.

Source: dto/create-work.dto.ts

FieldTypeRequiredValidationDescription
slugstringYesLowercase alphanumeric + hyphens, regex: /^[a-z0-9]+(?:-[a-z0-9]+)*$/URL-friendly identifier
namestringYesMax 100 chars, sanitized via sanitizeName()Display name
descriptionstringYesMax 500 chars, sanitized via sanitizeDescription()Brief description
ownerstringNoTrimmedUsername or organization for repo ownership
organizationbooleanYes--Whether the owner is an organization
gitProviderstringNoTrimmed, lowercased, default: 'github'Git provider plugin ID
deployProviderstringNoTrimmed, lowercasedDeploy provider (e.g., 'vercel')
readmeConfigMarkdownReadmeConfigDtoNoNested validationCustom README header/footer

MarkdownReadmeConfigDto

Nested configuration for README customization.

FieldTypeRequiredDescription
headerstringNoCustom header content (preserves newlines)
overwriteDefaultHeaderbooleanNoReplace default header entirely (default: false)
footerstringNoCustom footer content (preserves newlines)
overwriteDefaultFooterbooleanNoReplace default footer entirely (default: false)

UpdateWorkDto

Used when updating an existing work.

Source: dto/update-work.dto.ts

FieldTypeRequiredDescription
namestringNoUpdated display name (max 100 chars)
descriptionstringNoUpdated description (max 500 chars)
ownerstringNoUpdated repo owner
organizationbooleanNoUpdated organization flag
deployProviderstringNoUpdated deploy provider
readmeConfigMarkdownReadmeConfigDtoNoUpdated README configuration
websiteTemplateAutoUpdatebooleanNoToggle auto-update for website template
websiteTemplateUseBetabooleanNoToggle beta branch for website template
communityPrEnabledbooleanNoEnable community PR processing
communityPrAutoClosebooleanNoAuto-close community PRs

Import DTOs

ImportWorkDto

Used when importing a work from an external repository.

Source: dto/import-work.dto.ts

FieldTypeRequiredDescription
sourceUrlstringYesRepository URL to import from
sourceTypeImportSourceTypeEnumYesdata_repo, awesome_readme, or link_existing
namestringYesWork name (max 100 chars)
ownerstringNoRepo owner override
organizationbooleanNoOrganization flag
createMissingReposbooleanNoCreate repos that do not exist
syncbooleanNoEnable ongoing sync from source
gitProviderstringYesGit provider plugin ID
deployProviderstringNoDeploy provider
providersImportProvidersDtoNoAI provider override for import

AnalyzeRepositoryDto

Used to analyze a repository before importing.

FieldTypeRequiredDescription
sourceUrlstringYesRepository URL to analyze
gitProviderstringNoGit provider plugin ID

AnalyzeRepositoryResponseDto

Response from repository analysis.

FieldTypeDescription
sourceUrlstringAnalyzed URL
ownerstringRepository owner
repostringRepository name
detectedTypeImportSourceTypeDetected import type
isPublicbooleanRepository visibility
requiresAuthbooleanWhether auth is needed
structureobjectRepository structure analysis
slugConflictobjectSlug conflict information

GetUserRepositoriesDto

Used to list repositories from a Git provider.

FieldTypeRequiredDescription
gitProviderstringYesGit provider plugin ID
pagenumberNoPage number (min: 1)
perPagenumberNoResults per page (min: 1)
searchstringNoSearch filter
ownerstringNoFilter by owner
type'user' | 'org'NoFilter by owner type

Schedule DTOs

UpdateWorkScheduleDto

Used to create or update a work schedule.

Source: dto/work-schedule.dto.ts

FieldTypeRequiredValidationDescription
enablebooleanNo--Activate or deactivate the schedule
cadenceWorkScheduleCadenceNoEnum: hourly, daily, weekly, monthlyUpdate frequency
billingModeWorkScheduleBillingModeNoEnum: subscription, usageHow runs are billed
maxFailureBeforePausenumberNoInteger, min: 1, max: 10Consecutive failures before auto-pause
alwaysCreatePullRequestbooleanNo--Force PR creation on scheduled runs
providerOverridesProvidersDto | nullNoNested validationOverride providers for scheduled runs

Generation History DTOs

WorkGenerationHistoryDto

Source: dto/work-generation-history.dto.ts

FieldTypeDescription
idstringRecord UUID
statusGenerateStatusTypeGENERATING, GENERATED, or ERROR
generationMethodGenerationMethod | nullCREATE_UPDATE or RECREATE
startedAtstring | nullISO 8601 start time
finishedAtstring | nullISO 8601 end time
durationInSecondsnumber | nullElapsed wall-clock time
newItemsCountnumberItems created in this run
updatedItemsCountnumberItems updated in this run
totalItemsCountnumberTotal items after this run
metricsGenerationMetrics | nullDetailed pipeline metrics
errorMessagestring | nullError message if failed
parametersRecord<string, any> | nullGeneration parameters
createdAtstringRecord creation time
updatedAtstringLast update time
triggerRunIdstringBackground task run ID

WorkGenerationHistoryListDto

interface WorkGenerationHistoryListDto {
history: WorkGenerationHistoryDto[];
total: number;
limit: number;
offset: number;
}

Taxonomy DTOs

Category DTOs

Source: dto/taxonomy.dto.ts

DTOFieldsDescription
CreateCategoryDtoname (required, max 100), description (max 500), icon_url (max 500), priority (min 0)Create a category
UpdateCategoryDtoSame fields as create, all optionalUpdate a category

Collection DTOs

DTOFieldsDescription
CreateCollectionDtoname (required, max 100), description (max 500), icon_url (max 500), priority (min 0)Create a collection
UpdateCollectionDtoSame fields as create, all optionalUpdate a collection

Tag DTOs

DTOFieldsDescription
CreateTagDtoname (required, max 50)Create a tag
UpdateTagDtoname (optional, max 50)Update a tag

Website Settings DTOs

Source: dto/website-settings.dto.ts

UpdateWebsiteSettingsDto

FieldTypeDescription
company_namestringBrand name (max 100)
company_websitestringCompany URL (max 200)
categories_enabledbooleanShow categories section
collections_enabledbooleanShow collections section
companies_enabledbooleanShow companies section
tags_enabledbooleanShow tags section
surveys_enabledbooleanShow surveys section
comparisons_enabledbooleanShow comparisons section
headerSettingsHeaderDtoHeader configuration
homepageSettingsHomepageDtoHomepage configuration
footerSettingsFooterDtoFooter configuration
custom_menuCustomMenuDtoCustom navigation links

SettingsHeaderDto

FieldTypeDescription
submit_enabledbooleanShow submit button
pricing_enabledbooleanShow pricing link
layout_enabledbooleanShow layout toggle
language_enabledbooleanShow language selector
theme_enabledbooleanShow theme toggle
layout_defaultstringDefault layout (max 20)
pagination_defaultstringDefault pagination (max 20)
theme_defaultstringDefault theme: light, dark, or system

SettingsHomepageDto

FieldTypeDescription
hero_enabledbooleanShow hero section
search_enabledbooleanShow search bar
default_viewstringDefault view mode (max 20)
default_sortstringDefault sort order (max 20)

CustomMenuItemDto

FieldTypeValidationDescription
labelstringMax 50 charsDisplay text
pathstringMax 200 charsLink path or URL
targetstring_self or _blankLink target
iconstringMax 50 charsIcon identifier

Custom menus support up to 10 items each for header and footer.