70 lines
1.7 KiB
TypeScript
70 lines
1.7 KiB
TypeScript
/**
|
|
* SurfaceKind — the external platform a specialist operates on.
|
|
*
|
|
* This is a verbatim mirror of `surface_kind` as declared in
|
|
* `infrastructure/sql/migrations/{0001_tenancy_and_content,0002_extend_surface_kind}.sql`
|
|
* and of `@cocottetech/platform-api`'s `entities/enums.ts`. The migrations are the
|
|
* source of truth; this package re-declares the union (rather than importing it
|
|
* from platform-api) so that the contract has ZERO runtime dependency on the data
|
|
* plane. Keep this list in lock-step with the migration when the roster changes.
|
|
*/
|
|
export type SurfaceKind =
|
|
// N1 — Content surfaces (post-driven)
|
|
| 'onlyfans'
|
|
| 'x'
|
|
| 'instagram'
|
|
| 'tiktok'
|
|
| 'threads'
|
|
| 'bluesky'
|
|
| 'reddit'
|
|
| 'fansly'
|
|
| 'youtube'
|
|
| 'twitch'
|
|
| 'facebook'
|
|
// N2 — Escort directories (listing + availability)
|
|
| 'tryst'
|
|
| 'seeking'
|
|
| 'ts4rent'
|
|
| 'privatedelights'
|
|
| 'tsescorts'
|
|
| 'adultsearch'
|
|
| 'adultlook'
|
|
| 'eros'
|
|
| 'eroticmonkey'
|
|
| 'skipthegames'
|
|
| 'megapersonals'
|
|
| 'slixa'
|
|
| 'ts_live';
|
|
|
|
/** Runtime list of every {@link SurfaceKind}, in the migration's declared order. */
|
|
export const SURFACE_KINDS: readonly SurfaceKind[] = [
|
|
'onlyfans',
|
|
'x',
|
|
'instagram',
|
|
'tiktok',
|
|
'threads',
|
|
'bluesky',
|
|
'reddit',
|
|
'fansly',
|
|
'youtube',
|
|
'twitch',
|
|
'facebook',
|
|
'tryst',
|
|
'seeking',
|
|
'ts4rent',
|
|
'privatedelights',
|
|
'tsescorts',
|
|
'adultsearch',
|
|
'adultlook',
|
|
'eros',
|
|
'eroticmonkey',
|
|
'skipthegames',
|
|
'megapersonals',
|
|
'slixa',
|
|
'ts_live',
|
|
] as const;
|
|
|
|
/** Type guard: narrows an arbitrary string to a {@link SurfaceKind}. */
|
|
export function isSurfaceKind(value: string): value is SurfaceKind {
|
|
return (SURFACE_KINDS as readonly string[]).includes(value);
|
|
}
|