@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.
Files changed (107) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/LICENSE +21 -0
  3. package/README.md +253 -0
  4. package/THIRD_PARTY_NOTICES.md +52 -0
  5. package/dist/banking/index.cjs +6491 -0
  6. package/dist/banking/index.cjs.map +1 -0
  7. package/dist/banking/index.d.cts +58 -0
  8. package/dist/banking/index.d.ts +58 -0
  9. package/dist/banking/index.js +6464 -0
  10. package/dist/banking/index.js.map +1 -0
  11. package/dist/contact/index.cjs +6678 -0
  12. package/dist/contact/index.cjs.map +1 -0
  13. package/dist/contact/index.d.cts +709 -0
  14. package/dist/contact/index.d.ts +709 -0
  15. package/dist/contact/index.js +6586 -0
  16. package/dist/contact/index.js.map +1 -0
  17. package/dist/country-BhD51LDL.d.cts +433 -0
  18. package/dist/country-p0n0EVQ9.d.ts +433 -0
  19. package/dist/finance/index.cjs +3592 -0
  20. package/dist/finance/index.cjs.map +1 -0
  21. package/dist/finance/index.d.cts +83 -0
  22. package/dist/finance/index.d.ts +83 -0
  23. package/dist/finance/index.js +3584 -0
  24. package/dist/finance/index.js.map +1 -0
  25. package/dist/geography/index.cjs +4227 -0
  26. package/dist/geography/index.cjs.map +1 -0
  27. package/dist/geography/index.d.cts +34 -0
  28. package/dist/geography/index.d.ts +34 -0
  29. package/dist/geography/index.js +4202 -0
  30. package/dist/geography/index.js.map +1 -0
  31. package/dist/index.cjs +14087 -0
  32. package/dist/index.cjs.map +1 -0
  33. package/dist/index.d.cts +75 -0
  34. package/dist/index.d.ts +75 -0
  35. package/dist/index.js +13868 -0
  36. package/dist/index.js.map +1 -0
  37. package/dist/isin-EeVPpNWu.d.ts +39 -0
  38. package/dist/isin-ZlQLBVm8.d.cts +39 -0
  39. package/dist/organization/index.cjs +2376 -0
  40. package/dist/organization/index.cjs.map +1 -0
  41. package/dist/organization/index.d.cts +117 -0
  42. package/dist/organization/index.d.ts +117 -0
  43. package/dist/organization/index.js +2346 -0
  44. package/dist/organization/index.js.map +1 -0
  45. package/dist/person/index.cjs +1144 -0
  46. package/dist/person/index.cjs.map +1 -0
  47. package/dist/person/index.d.cts +60 -0
  48. package/dist/person/index.d.ts +60 -0
  49. package/dist/person/index.js +1125 -0
  50. package/dist/person/index.js.map +1 -0
  51. package/dist/person-full-name-Cmc9Ynuc.d.cts +82 -0
  52. package/dist/person-full-name-D6Hbsab6.d.ts +82 -0
  53. package/dist/phone-number-C24--ggy.d.ts +139 -0
  54. package/dist/phone-number-DZ-YxCQQ.d.cts +139 -0
  55. package/dist/property/index.cjs +487 -0
  56. package/dist/property/index.cjs.map +1 -0
  57. package/dist/property/index.d.cts +56 -0
  58. package/dist/property/index.d.ts +56 -0
  59. package/dist/property/index.js +480 -0
  60. package/dist/property/index.js.map +1 -0
  61. package/dist/sample-data/index.cjs +12310 -0
  62. package/dist/sample-data/index.cjs.map +1 -0
  63. package/dist/sample-data/index.d.cts +260 -0
  64. package/dist/sample-data/index.d.ts +260 -0
  65. package/dist/sample-data/index.js +12302 -0
  66. package/dist/sample-data/index.js.map +1 -0
  67. package/dist/swedish-address-DNC3ftRF.d.cts +297 -0
  68. package/dist/swedish-address-GMzjqgxb.d.ts +297 -0
  69. package/dist/swedish-bank-account-holder-name-BFJ8h1aO.d.cts +45 -0
  70. package/dist/swedish-bank-account-holder-name-CAAru07F.d.ts +45 -0
  71. package/dist/swedish-municipality-DlUS7g7h.d.cts +87 -0
  72. package/dist/swedish-municipality-nDRHYRAd.d.ts +87 -0
  73. package/dist/swedish-organization-name-D7NvERxA.d.cts +33 -0
  74. package/dist/swedish-organization-name-rR0Q836C.d.ts +33 -0
  75. package/dist/swedish-organization-number-Bcj7V_lh.d.cts +130 -0
  76. package/dist/swedish-organization-number-DM8dpXwR.d.ts +130 -0
  77. package/dist/swedish-organization-type-CZOdETwG.d.cts +29 -0
  78. package/dist/swedish-organization-type-CZOdETwG.d.ts +29 -0
  79. package/dist/swedish-personal-identity-number-BiIg4io3.d.ts +149 -0
  80. package/dist/swedish-personal-identity-number-Cp9Coz55.d.cts +149 -0
  81. package/dist/swedish-property-designation-BM-gdd9x.d.ts +46 -0
  82. package/dist/swedish-property-designation-BaHXufqV.d.cts +46 -0
  83. package/dist/swedish-sni-code-Ccsswpni.d.ts +53 -0
  84. package/dist/swedish-sni-code-CuJFyM6l.d.cts +53 -0
  85. package/dist/swedish-swish-number-CL6Gx_h3.d.cts +397 -0
  86. package/dist/swedish-swish-number-DDG3mNDg.d.ts +397 -0
  87. package/dist/text-candidate-qg2bD9PY.d.cts +110 -0
  88. package/dist/text-candidate-qg2bD9PY.d.ts +110 -0
  89. package/dist/text-scanning/index.cjs +10414 -0
  90. package/dist/text-scanning/index.cjs.map +1 -0
  91. package/dist/text-scanning/index.d.cts +153 -0
  92. package/dist/text-scanning/index.d.ts +153 -0
  93. package/dist/text-scanning/index.js +10406 -0
  94. package/dist/text-scanning/index.js.map +1 -0
  95. package/dist/validation/index.cjs +83 -0
  96. package/dist/validation/index.cjs.map +1 -0
  97. package/dist/validation/index.d.cts +63 -0
  98. package/dist/validation/index.d.ts +63 -0
  99. package/dist/validation/index.js +79 -0
  100. package/dist/validation/index.js.map +1 -0
  101. package/dist/web/index.cjs +3994 -0
  102. package/dist/web/index.cjs.map +1 -0
  103. package/dist/web/index.d.cts +203 -0
  104. package/dist/web/index.d.ts +203 -0
  105. package/dist/web/index.js +3987 -0
  106. package/dist/web/index.js.map +1 -0
  107. package/package.json +211 -0
@@ -0,0 +1,117 @@
1
+ import { S as SwedishOrganizationType } from '../swedish-organization-type-CZOdETwG.cjs';
2
+ import { S as SwedishOrganizationNumber, E as EuVatNumber, D as DunsNumber, L as LeiCode } from '../swedish-organization-number-Bcj7V_lh.cjs';
3
+ export { a as SwedishOrganizationTypeHintResult, m as maskDunsNumber, b as maskEuVatNumber, c as maskLeiCode, d as maskSwedishOrganizationNumber } from '../swedish-organization-number-Bcj7V_lh.cjs';
4
+ export { S as SwedishOrganizationName, m as maskSwedishOrganizationName } from '../swedish-organization-name-D7NvERxA.cjs';
5
+ import { P as PrimitiveTypeInfo } from '../text-candidate-qg2bD9PY.cjs';
6
+ export { E as ElfCode, S as SwedishSniCode } from '../swedish-sni-code-CuJFyM6l.cjs';
7
+ import { S as SwedishCoordinationNumber, b as SwedishPersonalIdentityNumber } from '../swedish-personal-identity-number-Cp9Coz55.cjs';
8
+ import '../validation/index.cjs';
9
+
10
+ /** Type of identifier parsed by the unified organization identifier parser. */
11
+ declare enum SwedishOrganizationIdentifierType {
12
+ Unknown = 0,
13
+ SwedishOrganizationNumber = 1,
14
+ SwedishPersonalIdentityNumber = 2,
15
+ SwedishCoordinationNumber = 3,
16
+ EuVatNumber = 10,
17
+ DunsNumber = 20,
18
+ LeiCode = 30
19
+ }
20
+
21
+ interface SwedishOrganizationIdentifier {
22
+ readonly type: SwedishOrganizationIdentifierType;
23
+ readonly organizationTypeHintCertain: SwedishOrganizationType;
24
+ readonly organizationTypeHintBestGuess: SwedishOrganizationType;
25
+ readonly normalizedValue: string;
26
+ readonly swedishOrganizationNumber: SwedishOrganizationNumber | null;
27
+ readonly euVatNumber: EuVatNumber | null;
28
+ readonly dunsNumber: DunsNumber | null;
29
+ readonly leiCode: LeiCode | null;
30
+ }
31
+ interface ParseOptions {
32
+ readonly organizationName?: string | null;
33
+ readonly isPrivatePerson?: boolean | null;
34
+ }
35
+ /** Unified parser for Swedish organization, VAT, DUNS and LEI identifiers. */
36
+ declare class SwedishOrganizationIdentifierParser {
37
+ static tryParse(input: string | null | undefined, options?: ParseOptions): SwedishOrganizationIdentifier | null;
38
+ static parse(input: string, options?: ParseOptions): SwedishOrganizationIdentifier;
39
+ static tryParseForCountry(input: string | null | undefined, countryCode: string | null | undefined, options?: ParseOptions): SwedishOrganizationIdentifier | null;
40
+ static parseForCountry(input: string, countryCode: string, options?: ParseOptions): SwedishOrganizationIdentifier;
41
+ }
42
+
43
+ /** Registered name of a legal entity from any European jurisdiction. */
44
+ declare class EuOrganizationName {
45
+ static readonly typeInfo: PrimitiveTypeInfo;
46
+ readonly value: string;
47
+ readonly legalName: string;
48
+ readonly tradeName: string | null;
49
+ get hasTradeName(): boolean;
50
+ private constructor();
51
+ static tryParse(input: string | null | undefined): EuOrganizationName | null;
52
+ static parse(input: string): EuOrganizationName;
53
+ static isValid(input: string | null | undefined): boolean;
54
+ static format(input: string | null | undefined, options?: {
55
+ fallbackToTrimmedInputWhenInvalid?: boolean;
56
+ }): string | null;
57
+ static normalize(input: string | null | undefined, options?: {
58
+ fallbackToTrimmedInputWhenInvalid?: boolean;
59
+ }): string | null;
60
+ static isNormalized(input: string | null | undefined): boolean;
61
+ static trySplitLegalAndTrade(input: string | null | undefined): {
62
+ legalName: string;
63
+ tradeName: string | null;
64
+ } | null;
65
+ toNormalizedString(): string;
66
+ toString(): string;
67
+ equals(other: EuOrganizationName | null | undefined): boolean;
68
+ compareTo(other: EuOrganizationName | null | undefined): number;
69
+ }
70
+ /** Mask each organization-name token while preserving structural separators. */
71
+ declare function maskEuOrganizationName(value: EuOrganizationName): string;
72
+
73
+ /** Swedish CFAR number (`CFAR-nummer`) - 8-digit identifier for an establishment. */
74
+ declare class SwedishCfarNumber {
75
+ static readonly typeInfo: PrimitiveTypeInfo;
76
+ readonly number: string;
77
+ private constructor();
78
+ static tryParse(input: string | null | undefined): SwedishCfarNumber | null;
79
+ static parse(input: string): SwedishCfarNumber;
80
+ static isValid(input: string | null | undefined): boolean;
81
+ static format(input: string | null | undefined, options?: {
82
+ fallbackToTrimmedInputWhenInvalid?: boolean;
83
+ }): string | null;
84
+ static normalize(input: string | null | undefined, options?: {
85
+ fallbackToTrimmedInputWhenInvalid?: boolean;
86
+ }): string | null;
87
+ static isNormalized(input: string | null | undefined): boolean;
88
+ toNormalizedString(): string;
89
+ toString(): string;
90
+ equals(other: SwedishCfarNumber | null | undefined): boolean;
91
+ compareTo(other: SwedishCfarNumber | null | undefined): number;
92
+ }
93
+ /** Masks the last 4 digits of a CFAR number. */
94
+ declare function maskSwedishCfarNumber(c: SwedishCfarNumber): string;
95
+
96
+ /** Converts a PIN, coordination number, or SE VAT number to a Swedish organization number. */
97
+ declare function toSwedishOrganizationNumber(value: SwedishPersonalIdentityNumber | SwedishCoordinationNumber | EuVatNumber): SwedishOrganizationNumber | null;
98
+ /** Extracts a personal identity number from a person-based Swedish organization number or VAT number. */
99
+ declare function toPersonalIdentityNumber(value: SwedishOrganizationNumber | EuVatNumber): SwedishPersonalIdentityNumber | null;
100
+ /** Extracts a coordination number from a person-based Swedish organization number or VAT number. */
101
+ declare function toCoordinationNumber(value: SwedishOrganizationNumber | EuVatNumber): SwedishCoordinationNumber | null;
102
+ /** Converts a Swedish organization number, PIN or coordination number to its corresponding SE VAT number. */
103
+ declare function toEuVatNumber(value: SwedishOrganizationNumber | SwedishPersonalIdentityNumber | SwedishCoordinationNumber): EuVatNumber;
104
+ /** Bolagsverket company information URL. */
105
+ declare function getBolagsverketUrl(org: SwedishOrganizationNumber): URL;
106
+ /** Allabolag lookup URL using the normalized organization number. */
107
+ declare function getAllabolagUrl(org: SwedishOrganizationNumber): string;
108
+ /** Allabolag company information URL using the public 10-digit organization number. */
109
+ declare function getAllabolagExternalUrl(org: SwedishOrganizationNumber): URL;
110
+ /** EU VIES validation URL. */
111
+ declare function toViesUrl(vat: EuVatNumber): string;
112
+ /** GLEIF record URL. */
113
+ declare function getGleifUrl(lei: LeiCode): URL;
114
+ /** GLEIF lookup URL as string. */
115
+ declare function toGleifUrl(lei: LeiCode): string;
116
+
117
+ export { DunsNumber, EuOrganizationName, EuVatNumber, LeiCode, SwedishCfarNumber, type SwedishOrganizationIdentifier, SwedishOrganizationIdentifierParser, SwedishOrganizationIdentifierType, SwedishOrganizationNumber, SwedishOrganizationType, getAllabolagExternalUrl, getAllabolagUrl, getBolagsverketUrl, getGleifUrl, maskEuOrganizationName, maskSwedishCfarNumber, toCoordinationNumber, toEuVatNumber, toGleifUrl, toPersonalIdentityNumber, toSwedishOrganizationNumber, toViesUrl };
@@ -0,0 +1,117 @@
1
+ import { S as SwedishOrganizationType } from '../swedish-organization-type-CZOdETwG.js';
2
+ import { S as SwedishOrganizationNumber, E as EuVatNumber, D as DunsNumber, L as LeiCode } from '../swedish-organization-number-DM8dpXwR.js';
3
+ export { a as SwedishOrganizationTypeHintResult, m as maskDunsNumber, b as maskEuVatNumber, c as maskLeiCode, d as maskSwedishOrganizationNumber } from '../swedish-organization-number-DM8dpXwR.js';
4
+ export { S as SwedishOrganizationName, m as maskSwedishOrganizationName } from '../swedish-organization-name-rR0Q836C.js';
5
+ import { P as PrimitiveTypeInfo } from '../text-candidate-qg2bD9PY.js';
6
+ export { E as ElfCode, S as SwedishSniCode } from '../swedish-sni-code-Ccsswpni.js';
7
+ import { S as SwedishCoordinationNumber, b as SwedishPersonalIdentityNumber } from '../swedish-personal-identity-number-BiIg4io3.js';
8
+ import '../validation/index.js';
9
+
10
+ /** Type of identifier parsed by the unified organization identifier parser. */
11
+ declare enum SwedishOrganizationIdentifierType {
12
+ Unknown = 0,
13
+ SwedishOrganizationNumber = 1,
14
+ SwedishPersonalIdentityNumber = 2,
15
+ SwedishCoordinationNumber = 3,
16
+ EuVatNumber = 10,
17
+ DunsNumber = 20,
18
+ LeiCode = 30
19
+ }
20
+
21
+ interface SwedishOrganizationIdentifier {
22
+ readonly type: SwedishOrganizationIdentifierType;
23
+ readonly organizationTypeHintCertain: SwedishOrganizationType;
24
+ readonly organizationTypeHintBestGuess: SwedishOrganizationType;
25
+ readonly normalizedValue: string;
26
+ readonly swedishOrganizationNumber: SwedishOrganizationNumber | null;
27
+ readonly euVatNumber: EuVatNumber | null;
28
+ readonly dunsNumber: DunsNumber | null;
29
+ readonly leiCode: LeiCode | null;
30
+ }
31
+ interface ParseOptions {
32
+ readonly organizationName?: string | null;
33
+ readonly isPrivatePerson?: boolean | null;
34
+ }
35
+ /** Unified parser for Swedish organization, VAT, DUNS and LEI identifiers. */
36
+ declare class SwedishOrganizationIdentifierParser {
37
+ static tryParse(input: string | null | undefined, options?: ParseOptions): SwedishOrganizationIdentifier | null;
38
+ static parse(input: string, options?: ParseOptions): SwedishOrganizationIdentifier;
39
+ static tryParseForCountry(input: string | null | undefined, countryCode: string | null | undefined, options?: ParseOptions): SwedishOrganizationIdentifier | null;
40
+ static parseForCountry(input: string, countryCode: string, options?: ParseOptions): SwedishOrganizationIdentifier;
41
+ }
42
+
43
+ /** Registered name of a legal entity from any European jurisdiction. */
44
+ declare class EuOrganizationName {
45
+ static readonly typeInfo: PrimitiveTypeInfo;
46
+ readonly value: string;
47
+ readonly legalName: string;
48
+ readonly tradeName: string | null;
49
+ get hasTradeName(): boolean;
50
+ private constructor();
51
+ static tryParse(input: string | null | undefined): EuOrganizationName | null;
52
+ static parse(input: string): EuOrganizationName;
53
+ static isValid(input: string | null | undefined): boolean;
54
+ static format(input: string | null | undefined, options?: {
55
+ fallbackToTrimmedInputWhenInvalid?: boolean;
56
+ }): string | null;
57
+ static normalize(input: string | null | undefined, options?: {
58
+ fallbackToTrimmedInputWhenInvalid?: boolean;
59
+ }): string | null;
60
+ static isNormalized(input: string | null | undefined): boolean;
61
+ static trySplitLegalAndTrade(input: string | null | undefined): {
62
+ legalName: string;
63
+ tradeName: string | null;
64
+ } | null;
65
+ toNormalizedString(): string;
66
+ toString(): string;
67
+ equals(other: EuOrganizationName | null | undefined): boolean;
68
+ compareTo(other: EuOrganizationName | null | undefined): number;
69
+ }
70
+ /** Mask each organization-name token while preserving structural separators. */
71
+ declare function maskEuOrganizationName(value: EuOrganizationName): string;
72
+
73
+ /** Swedish CFAR number (`CFAR-nummer`) - 8-digit identifier for an establishment. */
74
+ declare class SwedishCfarNumber {
75
+ static readonly typeInfo: PrimitiveTypeInfo;
76
+ readonly number: string;
77
+ private constructor();
78
+ static tryParse(input: string | null | undefined): SwedishCfarNumber | null;
79
+ static parse(input: string): SwedishCfarNumber;
80
+ static isValid(input: string | null | undefined): boolean;
81
+ static format(input: string | null | undefined, options?: {
82
+ fallbackToTrimmedInputWhenInvalid?: boolean;
83
+ }): string | null;
84
+ static normalize(input: string | null | undefined, options?: {
85
+ fallbackToTrimmedInputWhenInvalid?: boolean;
86
+ }): string | null;
87
+ static isNormalized(input: string | null | undefined): boolean;
88
+ toNormalizedString(): string;
89
+ toString(): string;
90
+ equals(other: SwedishCfarNumber | null | undefined): boolean;
91
+ compareTo(other: SwedishCfarNumber | null | undefined): number;
92
+ }
93
+ /** Masks the last 4 digits of a CFAR number. */
94
+ declare function maskSwedishCfarNumber(c: SwedishCfarNumber): string;
95
+
96
+ /** Converts a PIN, coordination number, or SE VAT number to a Swedish organization number. */
97
+ declare function toSwedishOrganizationNumber(value: SwedishPersonalIdentityNumber | SwedishCoordinationNumber | EuVatNumber): SwedishOrganizationNumber | null;
98
+ /** Extracts a personal identity number from a person-based Swedish organization number or VAT number. */
99
+ declare function toPersonalIdentityNumber(value: SwedishOrganizationNumber | EuVatNumber): SwedishPersonalIdentityNumber | null;
100
+ /** Extracts a coordination number from a person-based Swedish organization number or VAT number. */
101
+ declare function toCoordinationNumber(value: SwedishOrganizationNumber | EuVatNumber): SwedishCoordinationNumber | null;
102
+ /** Converts a Swedish organization number, PIN or coordination number to its corresponding SE VAT number. */
103
+ declare function toEuVatNumber(value: SwedishOrganizationNumber | SwedishPersonalIdentityNumber | SwedishCoordinationNumber): EuVatNumber;
104
+ /** Bolagsverket company information URL. */
105
+ declare function getBolagsverketUrl(org: SwedishOrganizationNumber): URL;
106
+ /** Allabolag lookup URL using the normalized organization number. */
107
+ declare function getAllabolagUrl(org: SwedishOrganizationNumber): string;
108
+ /** Allabolag company information URL using the public 10-digit organization number. */
109
+ declare function getAllabolagExternalUrl(org: SwedishOrganizationNumber): URL;
110
+ /** EU VIES validation URL. */
111
+ declare function toViesUrl(vat: EuVatNumber): string;
112
+ /** GLEIF record URL. */
113
+ declare function getGleifUrl(lei: LeiCode): URL;
114
+ /** GLEIF lookup URL as string. */
115
+ declare function toGleifUrl(lei: LeiCode): string;
116
+
117
+ export { DunsNumber, EuOrganizationName, EuVatNumber, LeiCode, SwedishCfarNumber, type SwedishOrganizationIdentifier, SwedishOrganizationIdentifierParser, SwedishOrganizationIdentifierType, SwedishOrganizationNumber, SwedishOrganizationType, getAllabolagExternalUrl, getAllabolagUrl, getBolagsverketUrl, getGleifUrl, maskEuOrganizationName, maskSwedishCfarNumber, toCoordinationNumber, toEuVatNumber, toGleifUrl, toPersonalIdentityNumber, toSwedishOrganizationNumber, toViesUrl };