2018-09-03 14:59:53 +02:00
|
|
|
import { Comune } from './comune';
|
2018-10-08 11:27:13 +02:00
|
|
|
import { birthplaceFields } from './utils';
|
|
|
|
interface ICodiceFiscaleObject {
|
2018-09-03 14:59:53 +02:00
|
|
|
name: string;
|
|
|
|
surname: string;
|
|
|
|
gender: string;
|
|
|
|
day: number;
|
|
|
|
month: number;
|
|
|
|
year: number;
|
|
|
|
birthplace: string;
|
|
|
|
birthplaceProvincia: string;
|
|
|
|
cf?: string;
|
|
|
|
}
|
2018-10-08 11:27:13 +02:00
|
|
|
declare class CodiceFiscale {
|
2018-09-03 14:59:53 +02:00
|
|
|
day: number;
|
|
|
|
month: number;
|
|
|
|
year: number;
|
|
|
|
readonly cf: string;
|
|
|
|
readonly nameCode: string;
|
|
|
|
readonly surnameCode: string;
|
|
|
|
readonly checkCode: string;
|
2018-10-08 11:27:13 +02:00
|
|
|
static utils: {
|
|
|
|
birthplaceFields: typeof birthplaceFields;
|
|
|
|
};
|
|
|
|
birthday: Date;
|
|
|
|
birthplace: Comune;
|
|
|
|
name: string;
|
|
|
|
surname: string;
|
|
|
|
gender: string;
|
|
|
|
private code;
|
2018-09-03 14:59:53 +02:00
|
|
|
constructor(data: string | ICodiceFiscaleObject | object);
|
|
|
|
static getCheckCode(codiceFiscale: string): string;
|
|
|
|
static findLocationCode(name: string, prov?: string): string;
|
|
|
|
static computeInverse(codiceFiscale: string): ICodiceFiscaleObject;
|
|
|
|
static compute(obj: object): string;
|
|
|
|
static check(codiceFiscale: string): boolean;
|
|
|
|
static getOmocodie(cf: string): string[];
|
|
|
|
toString(): string;
|
|
|
|
toJSON(): ICodiceFiscaleObject;
|
|
|
|
isValid(): boolean;
|
|
|
|
omocodie(): string[];
|
|
|
|
compute(): void;
|
|
|
|
reverse(): ICodiceFiscaleObject;
|
|
|
|
private checkGender;
|
|
|
|
private getSurnameCode;
|
|
|
|
private getNameCode;
|
|
|
|
private dateCode;
|
|
|
|
}
|
2018-10-08 11:27:13 +02:00
|
|
|
export default CodiceFiscale;
|