49 lines
1000 B
TypeScript
49 lines
1000 B
TypeScript
export type TJurisdiction = 'de' | 'eu' | 'us';
|
|
|
|
export type TLawSource =
|
|
| 'gesetze-im-internet'
|
|
| 'eur-lex'
|
|
| 'law-cornell-lii'
|
|
| 'govinfo-plaw'
|
|
| 'govinfo-uscode';
|
|
|
|
export type TRawLawFormat = 'xml' | 'html' | 'text' | 'json';
|
|
|
|
export type TUsLawCollection = 'PLAW' | 'USCODE';
|
|
|
|
export interface ILawServiceConfig {
|
|
dbFolderPath?: string;
|
|
dbName?: string;
|
|
govInfoApiKey?: string;
|
|
}
|
|
|
|
export interface ILawLookupRequest {
|
|
jurisdiction: TJurisdiction;
|
|
identifier: string;
|
|
language?: string;
|
|
usCollection?: TUsLawCollection;
|
|
forceSync?: boolean;
|
|
}
|
|
|
|
export interface ILawSyncRequest {
|
|
jurisdiction: TJurisdiction;
|
|
limit?: number;
|
|
offset?: number;
|
|
language?: string;
|
|
govInfoApiKey?: string;
|
|
usCollection?: TUsLawCollection;
|
|
since?: Date;
|
|
}
|
|
|
|
export interface ILawSearchRequest {
|
|
query: string;
|
|
jurisdiction?: TJurisdiction;
|
|
limit?: number;
|
|
}
|
|
|
|
export interface ILawSyncResult {
|
|
jurisdiction: TJurisdiction;
|
|
syncedCount: number;
|
|
identifiers: string[];
|
|
}
|