50 lines
1.5 KiB
C#
50 lines
1.5 KiB
C#
|
|
using RealCV.Application.Models;
|
||
|
|
|
||
|
|
namespace RealCV.Application.Interfaces;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Service for verifying international companies via OpenCorporates
|
||
|
|
/// </summary>
|
||
|
|
public interface IInternationalCompanyVerifierService
|
||
|
|
{
|
||
|
|
/// <summary>
|
||
|
|
/// Verify an international company
|
||
|
|
/// </summary>
|
||
|
|
Task<InternationalCompanyResult> VerifyCompanyAsync(
|
||
|
|
string companyName,
|
||
|
|
string? jurisdiction = null,
|
||
|
|
DateOnly? claimedStartDate = null,
|
||
|
|
DateOnly? claimedEndDate = null);
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Search for companies across all jurisdictions
|
||
|
|
/// </summary>
|
||
|
|
Task<List<OpenCorporatesSearchResult>> SearchCompaniesAsync(
|
||
|
|
string query,
|
||
|
|
string? jurisdiction = null);
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Get list of supported jurisdictions
|
||
|
|
/// </summary>
|
||
|
|
Task<List<JurisdictionInfo>> GetJurisdictionsAsync();
|
||
|
|
}
|
||
|
|
|
||
|
|
public sealed record OpenCorporatesSearchResult
|
||
|
|
{
|
||
|
|
public required string CompanyName { get; init; }
|
||
|
|
public required string CompanyNumber { get; init; }
|
||
|
|
public required string Jurisdiction { get; init; }
|
||
|
|
public string? JurisdictionCode { get; init; }
|
||
|
|
public string? Status { get; init; }
|
||
|
|
public DateOnly? IncorporationDate { get; init; }
|
||
|
|
public string? OpenCorporatesUrl { get; init; }
|
||
|
|
public double? MatchScore { get; init; }
|
||
|
|
}
|
||
|
|
|
||
|
|
public sealed record JurisdictionInfo
|
||
|
|
{
|
||
|
|
public required string Code { get; init; }
|
||
|
|
public required string Name { get; init; }
|
||
|
|
public string? Country { get; init; }
|
||
|
|
}
|