| 1 | import { createZodDto } from '@yikart/common' |
| 2 | import { z } from 'zod' |
| 3 | import { createPlatformConfigSchema } from '../platforms.config' |
| 4 | import { PlatformStatus } from '../platforms.interface' |
| 5 | |
| 6 | const tiktokAvailableConfigSchema = z.object({ |
| 7 | status: z.literal(PlatformStatus.Available), |
| 8 | clientId: z.string(), |
| 9 | clientSecret: z.string(), |
| 10 | redirectUri: z.string(), |
| 11 | logoUrl: z.url(), |
| 12 | scopes: z.array(z.string()).default([]), |
| 13 | pullFromUrlAllowedPrefixes: z.array(z.string()).default([]), |
| 14 | }) |
| 15 | |
| 16 | export const tiktokConfigSchema = createPlatformConfigSchema(tiktokAvailableConfigSchema) |
| 17 | |
| 18 | export class TiktokConfig extends createZodDto(tiktokAvailableConfigSchema) {} |
| 19 |