@budiauktioner/buildi-primitives 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +51 -0
- package/LICENSE +21 -0
- package/README.md +253 -0
- package/THIRD_PARTY_NOTICES.md +52 -0
- package/dist/banking/index.cjs +6491 -0
- package/dist/banking/index.cjs.map +1 -0
- package/dist/banking/index.d.cts +58 -0
- package/dist/banking/index.d.ts +58 -0
- package/dist/banking/index.js +6464 -0
- package/dist/banking/index.js.map +1 -0
- package/dist/contact/index.cjs +6678 -0
- package/dist/contact/index.cjs.map +1 -0
- package/dist/contact/index.d.cts +709 -0
- package/dist/contact/index.d.ts +709 -0
- package/dist/contact/index.js +6586 -0
- package/dist/contact/index.js.map +1 -0
- package/dist/country-BhD51LDL.d.cts +433 -0
- package/dist/country-p0n0EVQ9.d.ts +433 -0
- package/dist/finance/index.cjs +3592 -0
- package/dist/finance/index.cjs.map +1 -0
- package/dist/finance/index.d.cts +83 -0
- package/dist/finance/index.d.ts +83 -0
- package/dist/finance/index.js +3584 -0
- package/dist/finance/index.js.map +1 -0
- package/dist/geography/index.cjs +4227 -0
- package/dist/geography/index.cjs.map +1 -0
- package/dist/geography/index.d.cts +34 -0
- package/dist/geography/index.d.ts +34 -0
- package/dist/geography/index.js +4202 -0
- package/dist/geography/index.js.map +1 -0
- package/dist/index.cjs +14087 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +75 -0
- package/dist/index.d.ts +75 -0
- package/dist/index.js +13868 -0
- package/dist/index.js.map +1 -0
- package/dist/isin-EeVPpNWu.d.ts +39 -0
- package/dist/isin-ZlQLBVm8.d.cts +39 -0
- package/dist/organization/index.cjs +2376 -0
- package/dist/organization/index.cjs.map +1 -0
- package/dist/organization/index.d.cts +117 -0
- package/dist/organization/index.d.ts +117 -0
- package/dist/organization/index.js +2346 -0
- package/dist/organization/index.js.map +1 -0
- package/dist/person/index.cjs +1144 -0
- package/dist/person/index.cjs.map +1 -0
- package/dist/person/index.d.cts +60 -0
- package/dist/person/index.d.ts +60 -0
- package/dist/person/index.js +1125 -0
- package/dist/person/index.js.map +1 -0
- package/dist/person-full-name-Cmc9Ynuc.d.cts +82 -0
- package/dist/person-full-name-D6Hbsab6.d.ts +82 -0
- package/dist/phone-number-C24--ggy.d.ts +139 -0
- package/dist/phone-number-DZ-YxCQQ.d.cts +139 -0
- package/dist/property/index.cjs +487 -0
- package/dist/property/index.cjs.map +1 -0
- package/dist/property/index.d.cts +56 -0
- package/dist/property/index.d.ts +56 -0
- package/dist/property/index.js +480 -0
- package/dist/property/index.js.map +1 -0
- package/dist/sample-data/index.cjs +12310 -0
- package/dist/sample-data/index.cjs.map +1 -0
- package/dist/sample-data/index.d.cts +260 -0
- package/dist/sample-data/index.d.ts +260 -0
- package/dist/sample-data/index.js +12302 -0
- package/dist/sample-data/index.js.map +1 -0
- package/dist/swedish-address-DNC3ftRF.d.cts +297 -0
- package/dist/swedish-address-GMzjqgxb.d.ts +297 -0
- package/dist/swedish-bank-account-holder-name-BFJ8h1aO.d.cts +45 -0
- package/dist/swedish-bank-account-holder-name-CAAru07F.d.ts +45 -0
- package/dist/swedish-municipality-DlUS7g7h.d.cts +87 -0
- package/dist/swedish-municipality-nDRHYRAd.d.ts +87 -0
- package/dist/swedish-organization-name-D7NvERxA.d.cts +33 -0
- package/dist/swedish-organization-name-rR0Q836C.d.ts +33 -0
- package/dist/swedish-organization-number-Bcj7V_lh.d.cts +130 -0
- package/dist/swedish-organization-number-DM8dpXwR.d.ts +130 -0
- package/dist/swedish-organization-type-CZOdETwG.d.cts +29 -0
- package/dist/swedish-organization-type-CZOdETwG.d.ts +29 -0
- package/dist/swedish-personal-identity-number-BiIg4io3.d.ts +149 -0
- package/dist/swedish-personal-identity-number-Cp9Coz55.d.cts +149 -0
- package/dist/swedish-property-designation-BM-gdd9x.d.ts +46 -0
- package/dist/swedish-property-designation-BaHXufqV.d.cts +46 -0
- package/dist/swedish-sni-code-Ccsswpni.d.ts +53 -0
- package/dist/swedish-sni-code-CuJFyM6l.d.cts +53 -0
- package/dist/swedish-swish-number-CL6Gx_h3.d.cts +397 -0
- package/dist/swedish-swish-number-DDG3mNDg.d.ts +397 -0
- package/dist/text-candidate-qg2bD9PY.d.cts +110 -0
- package/dist/text-candidate-qg2bD9PY.d.ts +110 -0
- package/dist/text-scanning/index.cjs +10414 -0
- package/dist/text-scanning/index.cjs.map +1 -0
- package/dist/text-scanning/index.d.cts +153 -0
- package/dist/text-scanning/index.d.ts +153 -0
- package/dist/text-scanning/index.js +10406 -0
- package/dist/text-scanning/index.js.map +1 -0
- package/dist/validation/index.cjs +83 -0
- package/dist/validation/index.cjs.map +1 -0
- package/dist/validation/index.d.cts +63 -0
- package/dist/validation/index.d.ts +63 -0
- package/dist/validation/index.js +79 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/web/index.cjs +3994 -0
- package/dist/web/index.cjs.map +1 -0
- package/dist/web/index.d.cts +203 -0
- package/dist/web/index.d.ts +203 -0
- package/dist/web/index.js +3987 -0
- package/dist/web/index.js.map +1 -0
- package/package.json +211 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { P as PrimitiveTypeInfo, T as TextCandidate } from './text-candidate-qg2bD9PY.cjs';
|
|
2
|
+
import { G as GeoCoordinate } from './country-BhD51LDL.cjs';
|
|
3
|
+
|
|
4
|
+
/** A Swedish county (`län`), keyed by SCB's 2-digit county code. */
|
|
5
|
+
declare class SwedishCounty {
|
|
6
|
+
static readonly typeInfo: PrimitiveTypeInfo;
|
|
7
|
+
readonly code: string;
|
|
8
|
+
readonly localizedName: string;
|
|
9
|
+
readonly englishName: string;
|
|
10
|
+
readonly coordinate: GeoCoordinate;
|
|
11
|
+
private constructor();
|
|
12
|
+
get latitude(): number;
|
|
13
|
+
get longitude(): number;
|
|
14
|
+
get displayName(): string;
|
|
15
|
+
static tryParse(input: string | null | undefined): SwedishCounty | null;
|
|
16
|
+
static parse(input: string): SwedishCounty;
|
|
17
|
+
static isValid(input: string | null | undefined): boolean;
|
|
18
|
+
static format(input: string | null | undefined, options?: {
|
|
19
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
20
|
+
}): string | null;
|
|
21
|
+
static normalize(input: string | null | undefined, options?: {
|
|
22
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
23
|
+
}): string | null;
|
|
24
|
+
static isNormalized(input: string | null | undefined): boolean;
|
|
25
|
+
/** All 21 Swedish counties. */
|
|
26
|
+
static get all(): readonly SwedishCounty[];
|
|
27
|
+
static findCandidatesInText(text: string): readonly TextCandidate<SwedishCounty>[];
|
|
28
|
+
/** Distance in kilometers between two counties (by county seat). */
|
|
29
|
+
static distanceKilometers(a: SwedishCounty, b: SwedishCounty): number;
|
|
30
|
+
distanceKilometersTo(other: SwedishCounty | GeoCoordinate): number;
|
|
31
|
+
toNormalizedString(): string;
|
|
32
|
+
toString(): string;
|
|
33
|
+
toDisplayString(): string;
|
|
34
|
+
toEnglishString(): string;
|
|
35
|
+
toLocalString(): string;
|
|
36
|
+
equals(other: SwedishCounty | null | undefined): boolean;
|
|
37
|
+
compareTo(other: SwedishCounty | null | undefined): number;
|
|
38
|
+
/** @internal */
|
|
39
|
+
static _new(code: string, sv: string, en: string, c: GeoCoordinate): SwedishCounty;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
interface MunicipalityDistance {
|
|
43
|
+
readonly municipality: SwedishMunicipality;
|
|
44
|
+
readonly distanceKilometers: number;
|
|
45
|
+
}
|
|
46
|
+
/** A Swedish municipality (`kommun`), keyed by SCB's 4-digit municipality code. */
|
|
47
|
+
declare class SwedishMunicipality {
|
|
48
|
+
static readonly typeInfo: PrimitiveTypeInfo;
|
|
49
|
+
readonly code: string;
|
|
50
|
+
readonly localizedName: string;
|
|
51
|
+
readonly englishName: string;
|
|
52
|
+
readonly county: SwedishCounty;
|
|
53
|
+
readonly coordinate: GeoCoordinate;
|
|
54
|
+
private constructor();
|
|
55
|
+
get countyCode(): string;
|
|
56
|
+
get latitude(): number;
|
|
57
|
+
get longitude(): number;
|
|
58
|
+
get displayName(): string;
|
|
59
|
+
static tryParse(input: string | null | undefined): SwedishMunicipality | null;
|
|
60
|
+
static parse(input: string): SwedishMunicipality;
|
|
61
|
+
static isValid(input: string | null | undefined): boolean;
|
|
62
|
+
static format(input: string | null | undefined, options?: {
|
|
63
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
64
|
+
}): string | null;
|
|
65
|
+
static normalize(input: string | null | undefined, options?: {
|
|
66
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
67
|
+
}): string | null;
|
|
68
|
+
static isNormalized(input: string | null | undefined): boolean;
|
|
69
|
+
/** All 290 Swedish municipalities, ordered by code. */
|
|
70
|
+
static get all(): readonly SwedishMunicipality[];
|
|
71
|
+
static findCandidatesInText(text: string): readonly TextCandidate<SwedishMunicipality>[];
|
|
72
|
+
static distanceKilometers(a: SwedishMunicipality, b: SwedishMunicipality): number;
|
|
73
|
+
distanceKilometersTo(other: SwedishMunicipality | GeoCoordinate): number;
|
|
74
|
+
findNeighbors(radiusKm: number): readonly MunicipalityDistance[];
|
|
75
|
+
static findNeighbors(coordinate: GeoCoordinate, radiusKm: number): readonly MunicipalityDistance[];
|
|
76
|
+
toNormalizedString(): string;
|
|
77
|
+
toString(): string;
|
|
78
|
+
toDisplayString(): string;
|
|
79
|
+
toEnglishString(): string;
|
|
80
|
+
toLocalString(): string;
|
|
81
|
+
equals(other: SwedishMunicipality | null | undefined): boolean;
|
|
82
|
+
compareTo(other: SwedishMunicipality | null | undefined): number;
|
|
83
|
+
/** @internal */
|
|
84
|
+
static _new(code: string, sv: string, en: string, county: SwedishCounty, coord: GeoCoordinate): SwedishMunicipality;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { type MunicipalityDistance as M, SwedishCounty as S, SwedishMunicipality as a };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { P as PrimitiveTypeInfo, T as TextCandidate } from './text-candidate-qg2bD9PY.js';
|
|
2
|
+
import { G as GeoCoordinate } from './country-p0n0EVQ9.js';
|
|
3
|
+
|
|
4
|
+
/** A Swedish county (`län`), keyed by SCB's 2-digit county code. */
|
|
5
|
+
declare class SwedishCounty {
|
|
6
|
+
static readonly typeInfo: PrimitiveTypeInfo;
|
|
7
|
+
readonly code: string;
|
|
8
|
+
readonly localizedName: string;
|
|
9
|
+
readonly englishName: string;
|
|
10
|
+
readonly coordinate: GeoCoordinate;
|
|
11
|
+
private constructor();
|
|
12
|
+
get latitude(): number;
|
|
13
|
+
get longitude(): number;
|
|
14
|
+
get displayName(): string;
|
|
15
|
+
static tryParse(input: string | null | undefined): SwedishCounty | null;
|
|
16
|
+
static parse(input: string): SwedishCounty;
|
|
17
|
+
static isValid(input: string | null | undefined): boolean;
|
|
18
|
+
static format(input: string | null | undefined, options?: {
|
|
19
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
20
|
+
}): string | null;
|
|
21
|
+
static normalize(input: string | null | undefined, options?: {
|
|
22
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
23
|
+
}): string | null;
|
|
24
|
+
static isNormalized(input: string | null | undefined): boolean;
|
|
25
|
+
/** All 21 Swedish counties. */
|
|
26
|
+
static get all(): readonly SwedishCounty[];
|
|
27
|
+
static findCandidatesInText(text: string): readonly TextCandidate<SwedishCounty>[];
|
|
28
|
+
/** Distance in kilometers between two counties (by county seat). */
|
|
29
|
+
static distanceKilometers(a: SwedishCounty, b: SwedishCounty): number;
|
|
30
|
+
distanceKilometersTo(other: SwedishCounty | GeoCoordinate): number;
|
|
31
|
+
toNormalizedString(): string;
|
|
32
|
+
toString(): string;
|
|
33
|
+
toDisplayString(): string;
|
|
34
|
+
toEnglishString(): string;
|
|
35
|
+
toLocalString(): string;
|
|
36
|
+
equals(other: SwedishCounty | null | undefined): boolean;
|
|
37
|
+
compareTo(other: SwedishCounty | null | undefined): number;
|
|
38
|
+
/** @internal */
|
|
39
|
+
static _new(code: string, sv: string, en: string, c: GeoCoordinate): SwedishCounty;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
interface MunicipalityDistance {
|
|
43
|
+
readonly municipality: SwedishMunicipality;
|
|
44
|
+
readonly distanceKilometers: number;
|
|
45
|
+
}
|
|
46
|
+
/** A Swedish municipality (`kommun`), keyed by SCB's 4-digit municipality code. */
|
|
47
|
+
declare class SwedishMunicipality {
|
|
48
|
+
static readonly typeInfo: PrimitiveTypeInfo;
|
|
49
|
+
readonly code: string;
|
|
50
|
+
readonly localizedName: string;
|
|
51
|
+
readonly englishName: string;
|
|
52
|
+
readonly county: SwedishCounty;
|
|
53
|
+
readonly coordinate: GeoCoordinate;
|
|
54
|
+
private constructor();
|
|
55
|
+
get countyCode(): string;
|
|
56
|
+
get latitude(): number;
|
|
57
|
+
get longitude(): number;
|
|
58
|
+
get displayName(): string;
|
|
59
|
+
static tryParse(input: string | null | undefined): SwedishMunicipality | null;
|
|
60
|
+
static parse(input: string): SwedishMunicipality;
|
|
61
|
+
static isValid(input: string | null | undefined): boolean;
|
|
62
|
+
static format(input: string | null | undefined, options?: {
|
|
63
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
64
|
+
}): string | null;
|
|
65
|
+
static normalize(input: string | null | undefined, options?: {
|
|
66
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
67
|
+
}): string | null;
|
|
68
|
+
static isNormalized(input: string | null | undefined): boolean;
|
|
69
|
+
/** All 290 Swedish municipalities, ordered by code. */
|
|
70
|
+
static get all(): readonly SwedishMunicipality[];
|
|
71
|
+
static findCandidatesInText(text: string): readonly TextCandidate<SwedishMunicipality>[];
|
|
72
|
+
static distanceKilometers(a: SwedishMunicipality, b: SwedishMunicipality): number;
|
|
73
|
+
distanceKilometersTo(other: SwedishMunicipality | GeoCoordinate): number;
|
|
74
|
+
findNeighbors(radiusKm: number): readonly MunicipalityDistance[];
|
|
75
|
+
static findNeighbors(coordinate: GeoCoordinate, radiusKm: number): readonly MunicipalityDistance[];
|
|
76
|
+
toNormalizedString(): string;
|
|
77
|
+
toString(): string;
|
|
78
|
+
toDisplayString(): string;
|
|
79
|
+
toEnglishString(): string;
|
|
80
|
+
toLocalString(): string;
|
|
81
|
+
equals(other: SwedishMunicipality | null | undefined): boolean;
|
|
82
|
+
compareTo(other: SwedishMunicipality | null | undefined): number;
|
|
83
|
+
/** @internal */
|
|
84
|
+
static _new(code: string, sv: string, en: string, county: SwedishCounty, coord: GeoCoordinate): SwedishMunicipality;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export { type MunicipalityDistance as M, SwedishCounty as S, SwedishMunicipality as a };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { P as PrimitiveTypeInfo } from './text-candidate-qg2bD9PY.cjs';
|
|
2
|
+
import { S as SwedishOrganizationType } from './swedish-organization-type-CZOdETwG.cjs';
|
|
3
|
+
|
|
4
|
+
/** A Swedish organization name (`organisationsnamn` / `företagsnamn`). */
|
|
5
|
+
declare class SwedishOrganizationName {
|
|
6
|
+
static readonly typeInfo: PrimitiveTypeInfo;
|
|
7
|
+
readonly value: string;
|
|
8
|
+
readonly casingNormalizedValue: string;
|
|
9
|
+
readonly hasOrganizationIndicators: boolean;
|
|
10
|
+
readonly inferredSwedishOrganizationType: SwedishOrganizationType;
|
|
11
|
+
private constructor();
|
|
12
|
+
static tryParse(input: string | null | undefined): SwedishOrganizationName | null;
|
|
13
|
+
static parse(input: string): SwedishOrganizationName;
|
|
14
|
+
static isValid(input: string | null | undefined): boolean;
|
|
15
|
+
static isKnownGovernmentAgency(name: string | null | undefined): boolean;
|
|
16
|
+
static inferSwedishOrganizationType(name: string | null | undefined): SwedishOrganizationType;
|
|
17
|
+
static normalizeCasing(name: string): string;
|
|
18
|
+
static format(input: string | null | undefined, options?: {
|
|
19
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
20
|
+
}): string | null;
|
|
21
|
+
static normalize(input: string | null | undefined, options?: {
|
|
22
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
23
|
+
}): string | null;
|
|
24
|
+
static isNormalized(input: string | null | undefined): boolean;
|
|
25
|
+
toNormalizedString(): string;
|
|
26
|
+
toString(): string;
|
|
27
|
+
equals(other: SwedishOrganizationName | null | undefined): boolean;
|
|
28
|
+
compareTo(other: SwedishOrganizationName | null | undefined): number;
|
|
29
|
+
}
|
|
30
|
+
/** Mask an organization name, keeping only the first letter of each word, e.g. `Volvo AB` -> `V**** A*`. */
|
|
31
|
+
declare function maskSwedishOrganizationName(value: SwedishOrganizationName): string;
|
|
32
|
+
|
|
33
|
+
export { SwedishOrganizationName as S, maskSwedishOrganizationName as m };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { P as PrimitiveTypeInfo } from './text-candidate-qg2bD9PY.js';
|
|
2
|
+
import { S as SwedishOrganizationType } from './swedish-organization-type-CZOdETwG.js';
|
|
3
|
+
|
|
4
|
+
/** A Swedish organization name (`organisationsnamn` / `företagsnamn`). */
|
|
5
|
+
declare class SwedishOrganizationName {
|
|
6
|
+
static readonly typeInfo: PrimitiveTypeInfo;
|
|
7
|
+
readonly value: string;
|
|
8
|
+
readonly casingNormalizedValue: string;
|
|
9
|
+
readonly hasOrganizationIndicators: boolean;
|
|
10
|
+
readonly inferredSwedishOrganizationType: SwedishOrganizationType;
|
|
11
|
+
private constructor();
|
|
12
|
+
static tryParse(input: string | null | undefined): SwedishOrganizationName | null;
|
|
13
|
+
static parse(input: string): SwedishOrganizationName;
|
|
14
|
+
static isValid(input: string | null | undefined): boolean;
|
|
15
|
+
static isKnownGovernmentAgency(name: string | null | undefined): boolean;
|
|
16
|
+
static inferSwedishOrganizationType(name: string | null | undefined): SwedishOrganizationType;
|
|
17
|
+
static normalizeCasing(name: string): string;
|
|
18
|
+
static format(input: string | null | undefined, options?: {
|
|
19
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
20
|
+
}): string | null;
|
|
21
|
+
static normalize(input: string | null | undefined, options?: {
|
|
22
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
23
|
+
}): string | null;
|
|
24
|
+
static isNormalized(input: string | null | undefined): boolean;
|
|
25
|
+
toNormalizedString(): string;
|
|
26
|
+
toString(): string;
|
|
27
|
+
equals(other: SwedishOrganizationName | null | undefined): boolean;
|
|
28
|
+
compareTo(other: SwedishOrganizationName | null | undefined): number;
|
|
29
|
+
}
|
|
30
|
+
/** Mask an organization name, keeping only the first letter of each word, e.g. `Volvo AB` -> `V**** A*`. */
|
|
31
|
+
declare function maskSwedishOrganizationName(value: SwedishOrganizationName): string;
|
|
32
|
+
|
|
33
|
+
export { SwedishOrganizationName as S, maskSwedishOrganizationName as m };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { P as PrimitiveTypeInfo, T as TextCandidate } from './text-candidate-qg2bD9PY.cjs';
|
|
2
|
+
import { ValidationResult } from './validation/index.cjs';
|
|
3
|
+
import { S as SwedishOrganizationType } from './swedish-organization-type-CZOdETwG.cjs';
|
|
4
|
+
|
|
5
|
+
/** A 9-digit D-U-N-S number. */
|
|
6
|
+
declare class DunsNumber {
|
|
7
|
+
static readonly typeInfo: PrimitiveTypeInfo;
|
|
8
|
+
readonly digits: string;
|
|
9
|
+
private constructor();
|
|
10
|
+
static tryParse(input: string | null | undefined): DunsNumber | null;
|
|
11
|
+
static parse(input: string): DunsNumber;
|
|
12
|
+
static isValid(input: string | null | undefined): boolean;
|
|
13
|
+
static format(input: string | null | undefined, options?: {
|
|
14
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
15
|
+
}): string | null;
|
|
16
|
+
static normalize(input: string | null | undefined, options?: {
|
|
17
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
18
|
+
}): string | null;
|
|
19
|
+
static isNormalized(input: string | null | undefined): boolean;
|
|
20
|
+
toNormalizedString(): string;
|
|
21
|
+
toString(): string;
|
|
22
|
+
static findCandidatesInText(text: string): readonly TextCandidate<DunsNumber>[];
|
|
23
|
+
equals(other: DunsNumber | null | undefined): boolean;
|
|
24
|
+
compareTo(other: DunsNumber | null | undefined): number;
|
|
25
|
+
}
|
|
26
|
+
/** Masks all digits of a D-U-N-S number. */
|
|
27
|
+
declare function maskDunsNumber(d: DunsNumber): string;
|
|
28
|
+
|
|
29
|
+
/** VAT identification number (`momsnummer` / `momsregistreringsnummer`). */
|
|
30
|
+
declare class EuVatNumber {
|
|
31
|
+
static readonly typeInfo: PrimitiveTypeInfo;
|
|
32
|
+
readonly vatPrefix: string;
|
|
33
|
+
readonly countryCode: string;
|
|
34
|
+
readonly countryName: string;
|
|
35
|
+
readonly body: string;
|
|
36
|
+
private constructor();
|
|
37
|
+
static tryParse(input: string | null | undefined): EuVatNumber | null;
|
|
38
|
+
static parse(input: string): EuVatNumber;
|
|
39
|
+
static isValid(input: string | null | undefined): boolean;
|
|
40
|
+
static format(input: string | null | undefined, options?: {
|
|
41
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
42
|
+
}): string | null;
|
|
43
|
+
static normalize(input: string | null | undefined, options?: {
|
|
44
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
45
|
+
}): string | null;
|
|
46
|
+
static isNormalized(input: string | null | undefined): boolean;
|
|
47
|
+
static tryParseForCountry(input: string | null | undefined, countryCode: string | null | undefined): EuVatNumber | null;
|
|
48
|
+
static parseForCountry(input: string, countryCode: string): EuVatNumber;
|
|
49
|
+
static validate(input: string | null | undefined): ValidationResult;
|
|
50
|
+
toNormalizedString(): string;
|
|
51
|
+
toString(): string;
|
|
52
|
+
static findCandidatesInText(text: string): readonly TextCandidate<EuVatNumber>[];
|
|
53
|
+
equals(other: EuVatNumber | null | undefined): boolean;
|
|
54
|
+
compareTo(other: EuVatNumber | null | undefined): number;
|
|
55
|
+
}
|
|
56
|
+
/** Masks person-based Swedish VAT automatically; pass `alwaysMask` to mask all VAT bodies. */
|
|
57
|
+
declare function maskEuVatNumber(vat: EuVatNumber, alwaysMask?: boolean): string;
|
|
58
|
+
|
|
59
|
+
/** Legal Entity Identifier (ISO 17442). */
|
|
60
|
+
declare class LeiCode {
|
|
61
|
+
static readonly typeInfo: PrimitiveTypeInfo;
|
|
62
|
+
readonly value: string;
|
|
63
|
+
get louPrefix(): string;
|
|
64
|
+
get reserved(): string;
|
|
65
|
+
get entitySpecific(): string;
|
|
66
|
+
get checkDigits(): string;
|
|
67
|
+
private constructor();
|
|
68
|
+
static tryParse(input: string | null | undefined): LeiCode | null;
|
|
69
|
+
static parse(input: string): LeiCode;
|
|
70
|
+
static isValid(input: string | null | undefined): boolean;
|
|
71
|
+
static format(input: string | null | undefined, options?: {
|
|
72
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
73
|
+
}): string | null;
|
|
74
|
+
static normalize(input: string | null | undefined, options?: {
|
|
75
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
76
|
+
}): string | null;
|
|
77
|
+
static isNormalized(input: string | null | undefined): boolean;
|
|
78
|
+
toNormalizedString(): string;
|
|
79
|
+
toString(): string;
|
|
80
|
+
static findCandidatesInText(text: string): readonly TextCandidate<LeiCode>[];
|
|
81
|
+
equals(other: LeiCode | null | undefined): boolean;
|
|
82
|
+
compareTo(other: LeiCode | null | undefined): number;
|
|
83
|
+
}
|
|
84
|
+
/** Masks the LEI keeping only the first 4-character LOU prefix visible. */
|
|
85
|
+
declare function maskLeiCode(l: LeiCode): string;
|
|
86
|
+
|
|
87
|
+
interface SwedishOrganizationTypeHintResult {
|
|
88
|
+
readonly certain: SwedishOrganizationType;
|
|
89
|
+
readonly bestGuess: SwedishOrganizationType;
|
|
90
|
+
}
|
|
91
|
+
/** A Swedish organization number (`organisationsnummer`). */
|
|
92
|
+
declare class SwedishOrganizationNumber {
|
|
93
|
+
static readonly typeInfo: PrimitiveTypeInfo;
|
|
94
|
+
readonly _tenWithDash: string;
|
|
95
|
+
readonly _twelveDigits: string;
|
|
96
|
+
readonly _isPerson: boolean;
|
|
97
|
+
get isPerson(): boolean;
|
|
98
|
+
private constructor();
|
|
99
|
+
static tryParse(input: string | null | undefined): SwedishOrganizationNumber | null;
|
|
100
|
+
static parse(input: string): SwedishOrganizationNumber;
|
|
101
|
+
static isValid(input: string | null | undefined): boolean;
|
|
102
|
+
static format(input: string | null | undefined, options?: {
|
|
103
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
104
|
+
}): string | null;
|
|
105
|
+
static normalize(input: string | null | undefined, options?: {
|
|
106
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
107
|
+
}): string | null;
|
|
108
|
+
static isNormalized(input: string | null | undefined): boolean;
|
|
109
|
+
to10DigitsOnly(): string;
|
|
110
|
+
to10DigitString(): string;
|
|
111
|
+
to12DigitString(): string;
|
|
112
|
+
toNormalizedString(): string;
|
|
113
|
+
toString(): string;
|
|
114
|
+
getSwedishOrganizationTypeHint(name?: string | null, isPrivatePerson?: boolean | null): SwedishOrganizationTypeHintResult;
|
|
115
|
+
static validate(input: string | null | undefined): ValidationResult;
|
|
116
|
+
static findCandidatesInText(text: string): readonly TextCandidate<SwedishOrganizationNumber>[];
|
|
117
|
+
equals(other: SwedishOrganizationNumber | null | undefined): boolean;
|
|
118
|
+
compareTo(other: SwedishOrganizationNumber | null | undefined): number;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Masks person-based Swedish organization identifiers by default.
|
|
122
|
+
* Public legal-entity organization numbers are returned unmasked unless
|
|
123
|
+
* `maskOrganizationNumbers` is set.
|
|
124
|
+
*/
|
|
125
|
+
declare function maskSwedishOrganizationNumber(o: SwedishOrganizationNumber, options?: {
|
|
126
|
+
maskOrganizationNumbers?: boolean;
|
|
127
|
+
maskBirthDate?: boolean;
|
|
128
|
+
}): string;
|
|
129
|
+
|
|
130
|
+
export { DunsNumber as D, EuVatNumber as E, LeiCode as L, SwedishOrganizationNumber as S, type SwedishOrganizationTypeHintResult as a, maskEuVatNumber as b, maskLeiCode as c, maskSwedishOrganizationNumber as d, maskDunsNumber as m };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { P as PrimitiveTypeInfo, T as TextCandidate } from './text-candidate-qg2bD9PY.js';
|
|
2
|
+
import { ValidationResult } from './validation/index.js';
|
|
3
|
+
import { S as SwedishOrganizationType } from './swedish-organization-type-CZOdETwG.js';
|
|
4
|
+
|
|
5
|
+
/** A 9-digit D-U-N-S number. */
|
|
6
|
+
declare class DunsNumber {
|
|
7
|
+
static readonly typeInfo: PrimitiveTypeInfo;
|
|
8
|
+
readonly digits: string;
|
|
9
|
+
private constructor();
|
|
10
|
+
static tryParse(input: string | null | undefined): DunsNumber | null;
|
|
11
|
+
static parse(input: string): DunsNumber;
|
|
12
|
+
static isValid(input: string | null | undefined): boolean;
|
|
13
|
+
static format(input: string | null | undefined, options?: {
|
|
14
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
15
|
+
}): string | null;
|
|
16
|
+
static normalize(input: string | null | undefined, options?: {
|
|
17
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
18
|
+
}): string | null;
|
|
19
|
+
static isNormalized(input: string | null | undefined): boolean;
|
|
20
|
+
toNormalizedString(): string;
|
|
21
|
+
toString(): string;
|
|
22
|
+
static findCandidatesInText(text: string): readonly TextCandidate<DunsNumber>[];
|
|
23
|
+
equals(other: DunsNumber | null | undefined): boolean;
|
|
24
|
+
compareTo(other: DunsNumber | null | undefined): number;
|
|
25
|
+
}
|
|
26
|
+
/** Masks all digits of a D-U-N-S number. */
|
|
27
|
+
declare function maskDunsNumber(d: DunsNumber): string;
|
|
28
|
+
|
|
29
|
+
/** VAT identification number (`momsnummer` / `momsregistreringsnummer`). */
|
|
30
|
+
declare class EuVatNumber {
|
|
31
|
+
static readonly typeInfo: PrimitiveTypeInfo;
|
|
32
|
+
readonly vatPrefix: string;
|
|
33
|
+
readonly countryCode: string;
|
|
34
|
+
readonly countryName: string;
|
|
35
|
+
readonly body: string;
|
|
36
|
+
private constructor();
|
|
37
|
+
static tryParse(input: string | null | undefined): EuVatNumber | null;
|
|
38
|
+
static parse(input: string): EuVatNumber;
|
|
39
|
+
static isValid(input: string | null | undefined): boolean;
|
|
40
|
+
static format(input: string | null | undefined, options?: {
|
|
41
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
42
|
+
}): string | null;
|
|
43
|
+
static normalize(input: string | null | undefined, options?: {
|
|
44
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
45
|
+
}): string | null;
|
|
46
|
+
static isNormalized(input: string | null | undefined): boolean;
|
|
47
|
+
static tryParseForCountry(input: string | null | undefined, countryCode: string | null | undefined): EuVatNumber | null;
|
|
48
|
+
static parseForCountry(input: string, countryCode: string): EuVatNumber;
|
|
49
|
+
static validate(input: string | null | undefined): ValidationResult;
|
|
50
|
+
toNormalizedString(): string;
|
|
51
|
+
toString(): string;
|
|
52
|
+
static findCandidatesInText(text: string): readonly TextCandidate<EuVatNumber>[];
|
|
53
|
+
equals(other: EuVatNumber | null | undefined): boolean;
|
|
54
|
+
compareTo(other: EuVatNumber | null | undefined): number;
|
|
55
|
+
}
|
|
56
|
+
/** Masks person-based Swedish VAT automatically; pass `alwaysMask` to mask all VAT bodies. */
|
|
57
|
+
declare function maskEuVatNumber(vat: EuVatNumber, alwaysMask?: boolean): string;
|
|
58
|
+
|
|
59
|
+
/** Legal Entity Identifier (ISO 17442). */
|
|
60
|
+
declare class LeiCode {
|
|
61
|
+
static readonly typeInfo: PrimitiveTypeInfo;
|
|
62
|
+
readonly value: string;
|
|
63
|
+
get louPrefix(): string;
|
|
64
|
+
get reserved(): string;
|
|
65
|
+
get entitySpecific(): string;
|
|
66
|
+
get checkDigits(): string;
|
|
67
|
+
private constructor();
|
|
68
|
+
static tryParse(input: string | null | undefined): LeiCode | null;
|
|
69
|
+
static parse(input: string): LeiCode;
|
|
70
|
+
static isValid(input: string | null | undefined): boolean;
|
|
71
|
+
static format(input: string | null | undefined, options?: {
|
|
72
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
73
|
+
}): string | null;
|
|
74
|
+
static normalize(input: string | null | undefined, options?: {
|
|
75
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
76
|
+
}): string | null;
|
|
77
|
+
static isNormalized(input: string | null | undefined): boolean;
|
|
78
|
+
toNormalizedString(): string;
|
|
79
|
+
toString(): string;
|
|
80
|
+
static findCandidatesInText(text: string): readonly TextCandidate<LeiCode>[];
|
|
81
|
+
equals(other: LeiCode | null | undefined): boolean;
|
|
82
|
+
compareTo(other: LeiCode | null | undefined): number;
|
|
83
|
+
}
|
|
84
|
+
/** Masks the LEI keeping only the first 4-character LOU prefix visible. */
|
|
85
|
+
declare function maskLeiCode(l: LeiCode): string;
|
|
86
|
+
|
|
87
|
+
interface SwedishOrganizationTypeHintResult {
|
|
88
|
+
readonly certain: SwedishOrganizationType;
|
|
89
|
+
readonly bestGuess: SwedishOrganizationType;
|
|
90
|
+
}
|
|
91
|
+
/** A Swedish organization number (`organisationsnummer`). */
|
|
92
|
+
declare class SwedishOrganizationNumber {
|
|
93
|
+
static readonly typeInfo: PrimitiveTypeInfo;
|
|
94
|
+
readonly _tenWithDash: string;
|
|
95
|
+
readonly _twelveDigits: string;
|
|
96
|
+
readonly _isPerson: boolean;
|
|
97
|
+
get isPerson(): boolean;
|
|
98
|
+
private constructor();
|
|
99
|
+
static tryParse(input: string | null | undefined): SwedishOrganizationNumber | null;
|
|
100
|
+
static parse(input: string): SwedishOrganizationNumber;
|
|
101
|
+
static isValid(input: string | null | undefined): boolean;
|
|
102
|
+
static format(input: string | null | undefined, options?: {
|
|
103
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
104
|
+
}): string | null;
|
|
105
|
+
static normalize(input: string | null | undefined, options?: {
|
|
106
|
+
fallbackToTrimmedInputWhenInvalid?: boolean;
|
|
107
|
+
}): string | null;
|
|
108
|
+
static isNormalized(input: string | null | undefined): boolean;
|
|
109
|
+
to10DigitsOnly(): string;
|
|
110
|
+
to10DigitString(): string;
|
|
111
|
+
to12DigitString(): string;
|
|
112
|
+
toNormalizedString(): string;
|
|
113
|
+
toString(): string;
|
|
114
|
+
getSwedishOrganizationTypeHint(name?: string | null, isPrivatePerson?: boolean | null): SwedishOrganizationTypeHintResult;
|
|
115
|
+
static validate(input: string | null | undefined): ValidationResult;
|
|
116
|
+
static findCandidatesInText(text: string): readonly TextCandidate<SwedishOrganizationNumber>[];
|
|
117
|
+
equals(other: SwedishOrganizationNumber | null | undefined): boolean;
|
|
118
|
+
compareTo(other: SwedishOrganizationNumber | null | undefined): number;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Masks person-based Swedish organization identifiers by default.
|
|
122
|
+
* Public legal-entity organization numbers are returned unmasked unless
|
|
123
|
+
* `maskOrganizationNumbers` is set.
|
|
124
|
+
*/
|
|
125
|
+
declare function maskSwedishOrganizationNumber(o: SwedishOrganizationNumber, options?: {
|
|
126
|
+
maskOrganizationNumbers?: boolean;
|
|
127
|
+
maskBirthDate?: boolean;
|
|
128
|
+
}): string;
|
|
129
|
+
|
|
130
|
+
export { DunsNumber as D, EuVatNumber as E, LeiCode as L, SwedishOrganizationNumber as S, type SwedishOrganizationTypeHintResult as a, maskEuVatNumber as b, maskLeiCode as c, maskSwedishOrganizationNumber as d, maskDunsNumber as m };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Hint about the legal form of a Swedish organization. */
|
|
2
|
+
declare enum SwedishOrganizationType {
|
|
3
|
+
Unknown = 0,
|
|
4
|
+
Aktiebolag = 1,
|
|
5
|
+
Dodsbo = 2,
|
|
6
|
+
HandelsbolagEllerKommanditbolag = 10,
|
|
7
|
+
Handelsbolag = 11,
|
|
8
|
+
Kommanditbolag = 12,
|
|
9
|
+
EkonomiskForening = 20,
|
|
10
|
+
Bostadsrattsforening = 21,
|
|
11
|
+
Samfallighetsforening = 22,
|
|
12
|
+
IdeellForening = 30,
|
|
13
|
+
Stiftelse = 31,
|
|
14
|
+
OffentligSektor = 40,
|
|
15
|
+
Kommun = 41,
|
|
16
|
+
Region = 42,
|
|
17
|
+
Forsamling = 43,
|
|
18
|
+
EnkeltBolag = 50,
|
|
19
|
+
Filial = 51,
|
|
20
|
+
Europabolag = 52,
|
|
21
|
+
EuropeiskEkonomiskIntressegruppering = 53,
|
|
22
|
+
SCEForening = 54,
|
|
23
|
+
EnskildFirmaEllerPrivatperson = 60,
|
|
24
|
+
EnskildFirma = 61,
|
|
25
|
+
Privatperson = 62,
|
|
26
|
+
Other = 99
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { SwedishOrganizationType as S };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Hint about the legal form of a Swedish organization. */
|
|
2
|
+
declare enum SwedishOrganizationType {
|
|
3
|
+
Unknown = 0,
|
|
4
|
+
Aktiebolag = 1,
|
|
5
|
+
Dodsbo = 2,
|
|
6
|
+
HandelsbolagEllerKommanditbolag = 10,
|
|
7
|
+
Handelsbolag = 11,
|
|
8
|
+
Kommanditbolag = 12,
|
|
9
|
+
EkonomiskForening = 20,
|
|
10
|
+
Bostadsrattsforening = 21,
|
|
11
|
+
Samfallighetsforening = 22,
|
|
12
|
+
IdeellForening = 30,
|
|
13
|
+
Stiftelse = 31,
|
|
14
|
+
OffentligSektor = 40,
|
|
15
|
+
Kommun = 41,
|
|
16
|
+
Region = 42,
|
|
17
|
+
Forsamling = 43,
|
|
18
|
+
EnkeltBolag = 50,
|
|
19
|
+
Filial = 51,
|
|
20
|
+
Europabolag = 52,
|
|
21
|
+
EuropeiskEkonomiskIntressegruppering = 53,
|
|
22
|
+
SCEForening = 54,
|
|
23
|
+
EnskildFirmaEllerPrivatperson = 60,
|
|
24
|
+
EnskildFirma = 61,
|
|
25
|
+
Privatperson = 62,
|
|
26
|
+
Other = 99
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { SwedishOrganizationType as S };
|