This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

feat: implement missing methods in InMemoryAtUriResolutionService

Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat>

+31
+31
src/modules/cards/tests/utils/InMemoryAtUriResolutionService.ts
··· 5 5 AtUriResolutionResult, 6 6 } from '../../domain/services/IAtUriResolutionService'; 7 7 import { CollectionId } from '../../domain/value-objects/CollectionId'; 8 + import { CardId } from '../../domain/value-objects/CardId'; 8 9 import { InMemoryCollectionRepository } from './InMemoryCollectionRepository'; 9 10 10 11 export class InMemoryAtUriResolutionService implements IAtUriResolutionService { ··· 46 47 } 47 48 48 49 return ok(result.value.id as CollectionId); 50 + } 51 + 52 + async resolveCardId(atUri: string): Promise<Result<CardId | null>> { 53 + const result = await this.resolveAtUri(atUri); 54 + 55 + if (result.isErr()) { 56 + return err(result.error); 57 + } 58 + 59 + if (!result.value || result.value.type !== AtUriResourceType.CARD) { 60 + return ok(null); 61 + } 62 + 63 + return ok(result.value.id as CardId); 64 + } 65 + 66 + async resolveCollectionLinkId( 67 + atUri: string 68 + ): Promise<Result<{collectionId: CollectionId, cardId: CardId} | null>> { 69 + const result = await this.resolveAtUri(atUri); 70 + 71 + if (result.isErr()) { 72 + return err(result.error); 73 + } 74 + 75 + if (!result.value || result.value.type !== AtUriResourceType.COLLECTION_LINK) { 76 + return ok(null); 77 + } 78 + 79 + return ok(result.value.id as {collectionId: CollectionId, cardId: CardId}); 49 80 } 50 81 }