| 47 | export type SyncedMetadata = Omit<z.infer<typeof ModelMetadata>, "id">; |
| 48 | |
| 49 | export interface SyncProvider<SourceModel> { |
| 50 | id: string; |
| 51 | name: string; |
| 52 | modelsDir: string; |
| 53 | metadataNamespace?: string; |
| 54 | skipCreates?: boolean; |
| 55 | deleteMissing?: boolean; |
| 56 | preserveSymlinks?: boolean; |
| 57 | preserveBaseModels?: boolean; |
| 58 | sameModel?(current: ExistingModel, desired: SyncedModel): boolean; |
| 59 | missingNotice?(paths: string[]): string[]; |
| 60 | sourceID?(model: SourceModel): string; |
| 61 | skippedNotice?(ids: string[]): string[]; |
| 62 | fetchModels(): Promise<unknown>; |
| 63 | parseModels(raw: unknown): SourceModel[]; |
| 64 | translateModel( |
| 65 | model: SourceModel, |
| 66 | context: { |
| 67 | existing(id: string): ExistingModel | undefined; |
| 68 | authored(id: string): ExistingModel | undefined; |
| 69 | }, |
| 70 | ): { id: string; model: SyncedModel; metadata?: { id: string; model: SyncedMetadata } } | undefined; |
| 71 | } |
| 72 | |
| 73 | export interface SyncResult { |
| 74 | id: string; |
no outgoing calls
no test coverage detected