feat(laws,opendata): add local law storage and migrate OpenData persistence to smartdb-backed local storage
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
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[];
|
||||
}
|
||||
Reference in New Issue
Block a user