Some checks failed
CD Preprod / Unit Tests (${{ matrix.app }}) (backend) (push) Blocked by required conditions
CD Preprod / Unit Tests (${{ matrix.app }}) (frontend) (push) Blocked by required conditions
CD Preprod / Integration Tests (push) Blocked by required conditions
CD Preprod / Build & Push Backend (push) Blocked by required conditions
CD Preprod / Build & Push Frontend (push) Blocked by required conditions
CD Preprod / Deploy to Preprod (push) Blocked by required conditions
CD Preprod / Smoke Tests (push) Blocked by required conditions
CD Preprod / Deployment Summary (push) Blocked by required conditions
CD Preprod / Notify Success (push) Blocked by required conditions
CD Preprod / Notify Failure (push) Blocked by required conditions
CD Preprod / Quality (${{ matrix.app }}) (backend) (push) Has been cancelled
CD Preprod / Quality (${{ matrix.app }}) (frontend) (push) Has been cancelled
Aligns preprod with the complete application codebase (cicd branch). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
/**
|
|
* InvitationToken Repository Port
|
|
*
|
|
* Defines the interface for InvitationToken persistence operations.
|
|
* This is a secondary port (output port) in hexagonal architecture.
|
|
*/
|
|
|
|
import { InvitationToken } from '../../entities/invitation-token.entity';
|
|
|
|
export const INVITATION_TOKEN_REPOSITORY = 'InvitationTokenRepository';
|
|
|
|
export interface InvitationTokenRepository {
|
|
/**
|
|
* Save an invitation token entity
|
|
*/
|
|
save(invitationToken: InvitationToken): Promise<InvitationToken>;
|
|
|
|
/**
|
|
* Find invitation token by token string
|
|
*/
|
|
findByToken(token: string): Promise<InvitationToken | null>;
|
|
|
|
/**
|
|
* Find invitation token by email (only non-used, non-expired)
|
|
*/
|
|
findActiveByEmail(email: string): Promise<InvitationToken | null>;
|
|
|
|
/**
|
|
* Find all invitation tokens by organization
|
|
*/
|
|
findByOrganization(organizationId: string): Promise<InvitationToken[]>;
|
|
|
|
/**
|
|
* Delete expired invitation tokens
|
|
*/
|
|
deleteExpired(): Promise<number>;
|
|
|
|
/**
|
|
* Delete an invitation by id
|
|
*/
|
|
deleteById(id: string): Promise<void>;
|
|
|
|
/**
|
|
* Update an invitation token
|
|
*/
|
|
update(invitationToken: InvitationToken): Promise<InvitationToken>;
|
|
}
|