Files
vercel/packages/cli/src/util/domains/get-domain-registrar.ts
Ethan Arrowood af239b5fa5 [internals] Create @vercel-internals/types (#9608)
Moves the type file out of the cli package and into its own standalone
package. utilizes `@vercel/style-guide` too for typescript config,
eslint, and prettier.
2023-03-07 08:44:25 -07:00

16 lines
384 B
TypeScript

import { Domain } from '@vercel-internals/types';
export type DomainRegistrar = 'Vercel' | 'Purchase in Process' | 'Third Party';
export function getDomainRegistrar(domain: Domain): DomainRegistrar {
if (domain.boughtAt) {
return 'Vercel';
}
if (typeof domain.orderedAt === 'number' && !domain.boughtAt) {
return 'Purchase in Process';
}
return 'Third Party';
}