1 import type { UseCaseInterface } from '../Domain/UseCase/UseCaseInterface'
2 import type { Result } from '@proton/docs-shared'
3 import type { DecryptedCommit } from '../Models/DecryptedCommit'
4 import type { VerifyMessages } from './VerifyMessages'
5 import type { VerificationUsecaseResult } from './VerifyUpdatesResult'
7 export class VerifyCommit implements UseCaseInterface<VerificationUsecaseResult> {
8 constructor(private verifyMessages: VerifyMessages) {}
10 async execute(dto: { commit: DecryptedCommit }): Promise<Result<VerificationUsecaseResult>> {
11 const result = await this.verifyMessages.execute({
12 messages: dto.commit.updates,