@ripwords/myinvois-client 0.0.6 → 0.0.8
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/bun.lock +25 -25
- package/dist/index.cjs +95 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2318 -464
- package/dist/index.js +24 -22
- package/package.json +17 -13
- package/rolldown.config.ts +1 -1
- package/src/api/platform/taxpayerLogin.ts +28 -0
- package/src/types/index.d.ts +12 -0
- package/src/types/unit/1X.d.ts +16 -0
- package/src/types/unit/2X.d.ts +62 -0
- package/src/types/unit/3X.d.ts +17 -0
- package/src/types/unit/4X.d.ts +44 -0
- package/src/types/unit/5X.d.ts +26 -0
- package/src/types/unit/6X.d.ts +12 -0
- package/src/types/unit/7X.d.ts +12 -0
- package/src/types/unit/8X.d.ts +15 -0
- package/src/types/unit/9X.d.ts +11 -0
- package/src/types/unit/AX.d.ts +202 -0
- package/src/types/unit/BX.d.ts +212 -0
- package/src/types/unit/CX.d.ts +238 -0
- package/src/types/unit/DX.d.ts +212 -0
- package/src/types/unit/EX.d.ts +196 -0
- package/src/types/unit/FX.d.ts +236 -0
- package/src/types/unit/GX.d.ts +254 -0
- package/src/types/unit/HX.d.ts +234 -0
- package/src/types/unit/IX.d.ts +28 -0
- package/src/types/unit/JX.d.ts +190 -0
- package/src/types/unit/KX.d.ts +284 -0
- package/src/types/unit/LX.d.ts +228 -0
- package/src/types/unit/MX.d.ts +288 -0
- package/src/types/unit/NX.d.ts +226 -0
- package/src/types/unit/OX.d.ts +34 -0
- package/src/types/unit/PX.d.ts +224 -0
- package/src/types/unit/QX.d.ts +94 -0
- package/src/types/unit/RX.d.ts +28 -0
- package/src/types/unit/SX.d.ts +56 -0
- package/src/types/unit/TX.d.ts +44 -0
- package/src/types/unit/UX.d.ts +14 -0
- package/src/types/unit/VX.d.ts +13 -0
- package/src/types/unit/WX.d.ts +34 -0
- package/src/types/unit/XX.d.ts +825 -0
- package/src/types/unit/YX.d.ts +17 -0
- package/src/types/unit/ZX.d.ts +19 -0
- package/src/types/unit-types.d.ts +71 -575
- package/src/utils/MyInvoisClient.ts +20 -33
- package/src/utils/getBaseUrl.ts +5 -0
- package/test/{MyInvoiClientRealData.test.ts → MyInvoiClientWithRealData.test.ts} +13 -1
- package/test/MyInvoisClient.test.ts +14 -13
- package/dist/cjs/index.cjs +0 -70
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/cjs/multipart-parser-Bu3ikqFQ.cjs +0 -182
- package/dist/cjs/multipart-parser-Bu3ikqFQ.cjs.map +0 -1
- package/dist/cjs/node-qs2pnN6F.cjs +0 -4124
- package/dist/cjs/node-qs2pnN6F.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,38 +1,40 @@
|
|
|
1
|
+
import { taxpayerLogin } from "src/api/platform/taxpayerLogin";
|
|
1
2
|
|
|
3
|
+
//#region src/utils/getBaseUrl.ts
|
|
4
|
+
const getBaseUrl = (environment) => {
|
|
5
|
+
return environment === "sandbox" ? "https://preprod-api.myinvois.hasil.gov.my" : "https://api.myinvois.hasil.gov.my";
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
2
9
|
//#region src/utils/MyInvoisClient.ts
|
|
3
10
|
var MyInvoisClient = class {
|
|
4
11
|
baseUrl;
|
|
5
12
|
clientId;
|
|
6
13
|
clientSecret;
|
|
14
|
+
debug;
|
|
7
15
|
token = "";
|
|
8
16
|
tokenExpiration;
|
|
9
|
-
constructor(clientId, clientSecret, environment) {
|
|
17
|
+
constructor(clientId, clientSecret, environment, debug = false) {
|
|
10
18
|
this.clientId = clientId;
|
|
11
19
|
this.clientSecret = clientSecret;
|
|
12
|
-
|
|
13
|
-
|
|
20
|
+
this.baseUrl = getBaseUrl(environment);
|
|
21
|
+
this.debug = debug;
|
|
14
22
|
}
|
|
15
23
|
async refreshToken() {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
scope: "InvoicingAPI"
|
|
25
|
-
})
|
|
26
|
-
});
|
|
27
|
-
const tokenResponse = await response.json();
|
|
28
|
-
this.token = tokenResponse.access_token;
|
|
29
|
-
this.tokenExpiration = new Date(Date.now() + tokenResponse.expires_in * 1e3);
|
|
30
|
-
} catch (error) {
|
|
31
|
-
console.error(error);
|
|
32
|
-
}
|
|
24
|
+
const tokenResponse = await taxpayerLogin({
|
|
25
|
+
clientId: this.clientId,
|
|
26
|
+
clientSecret: this.clientSecret,
|
|
27
|
+
baseUrl: this.baseUrl,
|
|
28
|
+
debug: this.debug
|
|
29
|
+
});
|
|
30
|
+
this.token = tokenResponse.token;
|
|
31
|
+
this.tokenExpiration = tokenResponse.tokenExpiration;
|
|
33
32
|
}
|
|
34
33
|
async getToken() {
|
|
35
|
-
if (!this.tokenExpiration || this.tokenExpiration < new Date())
|
|
34
|
+
if (!this.tokenExpiration || this.tokenExpiration < new Date()) {
|
|
35
|
+
if (this.debug) console.log("Refreshing token");
|
|
36
|
+
await this.refreshToken();
|
|
37
|
+
}
|
|
36
38
|
return this.token;
|
|
37
39
|
}
|
|
38
40
|
async fetch(path, options = {}) {
|
|
@@ -58,7 +60,7 @@ var MyInvoisClient = class {
|
|
|
58
60
|
if (response.status === 200) return true;
|
|
59
61
|
return false;
|
|
60
62
|
} catch (error) {
|
|
61
|
-
console.error(error);
|
|
63
|
+
if (this.debug) console.error(error);
|
|
62
64
|
return false;
|
|
63
65
|
}
|
|
64
66
|
}
|
package/package.json
CHANGED
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ripwords/myinvois-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
|
+
"description": "MyInvois client",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "rolldown -c rolldown.config.ts",
|
|
7
|
+
"release": "bun run build && npm publish --access public",
|
|
8
|
+
"lint": "oxlint",
|
|
9
|
+
"test": "vitest"
|
|
10
|
+
},
|
|
4
11
|
"main": "dist/index.js",
|
|
5
12
|
"module": "src/index.ts",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"types": "dist/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
"import": "./dist/index.js",
|
|
17
|
+
"require": "./dist/index.cjs"
|
|
18
|
+
},
|
|
6
19
|
"devDependencies": {
|
|
7
20
|
"@types/bun": "latest",
|
|
8
21
|
"dotenv": "^16.5.0",
|
|
9
22
|
"oxlint": "^0.16.6",
|
|
10
23
|
"prettier": "^3.5.3",
|
|
11
24
|
"rolldown": "^1.0.0-beta.7",
|
|
12
|
-
"rolldown-plugin-dts": "^0.7.
|
|
25
|
+
"rolldown-plugin-dts": "^0.7.13",
|
|
13
26
|
"vitest": "^3.1.1"
|
|
14
27
|
},
|
|
15
28
|
"peerDependencies": {
|
|
16
|
-
"typescript": "^5"
|
|
17
|
-
}
|
|
18
|
-
"description": "MyInvois client",
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "rolldown -c rolldown.config.ts",
|
|
21
|
-
"release": "bun run build && npm publish --access public && git push --follow-tags",
|
|
22
|
-
"lint": "oxlint",
|
|
23
|
-
"test": "vitest"
|
|
24
|
-
},
|
|
25
|
-
"type": "module",
|
|
26
|
-
"types": "dist/index.d.ts"
|
|
29
|
+
"typescript": "^5.8.3"
|
|
30
|
+
}
|
|
27
31
|
}
|
package/rolldown.config.ts
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ClientCredentials, TokenResponse } from 'src/types'
|
|
2
|
+
|
|
3
|
+
export const taxpayerLogin = async (client: ClientCredentials) => {
|
|
4
|
+
const { clientId, clientSecret, baseUrl, debug } = client
|
|
5
|
+
try {
|
|
6
|
+
const response = await fetch(`${baseUrl}/connect/token`, {
|
|
7
|
+
method: 'POST',
|
|
8
|
+
headers: {
|
|
9
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
10
|
+
},
|
|
11
|
+
body: new URLSearchParams({
|
|
12
|
+
grant_type: 'client_credentials',
|
|
13
|
+
client_id: clientId,
|
|
14
|
+
client_secret: clientSecret,
|
|
15
|
+
scope: 'InvoicingAPI',
|
|
16
|
+
}),
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const tokenResponse: TokenResponse = await response.json()
|
|
20
|
+
return {
|
|
21
|
+
token: tokenResponse.access_token,
|
|
22
|
+
tokenExpiration: new Date(Date.now() + tokenResponse.expires_in * 1000),
|
|
23
|
+
}
|
|
24
|
+
} catch (error) {
|
|
25
|
+
if (debug) console.error(error)
|
|
26
|
+
throw error
|
|
27
|
+
}
|
|
28
|
+
}
|
package/src/types/index.d.ts
CHANGED
|
@@ -9,3 +9,15 @@ export type * from './currencies.d.ts'
|
|
|
9
9
|
export type * from './state-codes.d.ts'
|
|
10
10
|
export type * from './e-invoice.d.ts'
|
|
11
11
|
export type * from './msic-codes.d.ts'
|
|
12
|
+
|
|
13
|
+
export interface TokenResponse {
|
|
14
|
+
access_token: string
|
|
15
|
+
expires_in: number
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ClientCredentials {
|
|
19
|
+
clientId: string
|
|
20
|
+
clientSecret: string
|
|
21
|
+
baseUrl: string
|
|
22
|
+
debug?: boolean
|
|
23
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit type codes starting with '1'.
|
|
3
|
+
*/
|
|
4
|
+
export type UnitTypeCode_1X = '10' | '11' | '13' | '14' | '15' | '1I'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Enum representing unit type codes starting with '1'.
|
|
8
|
+
*/
|
|
9
|
+
export enum UnitTypeCodeEnum_1X {
|
|
10
|
+
Group = '10',
|
|
11
|
+
Outfit = '11',
|
|
12
|
+
Ration = '13',
|
|
13
|
+
Shot = '14',
|
|
14
|
+
StickMilitary = '15',
|
|
15
|
+
FixedRate = '1I',
|
|
16
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit type codes starting with '2'.
|
|
3
|
+
*/
|
|
4
|
+
export type UnitTypeCode_2X =
|
|
5
|
+
| '20'
|
|
6
|
+
| '21'
|
|
7
|
+
| '22'
|
|
8
|
+
| '23'
|
|
9
|
+
| '24'
|
|
10
|
+
| '25'
|
|
11
|
+
| '27'
|
|
12
|
+
| '28'
|
|
13
|
+
| '2A'
|
|
14
|
+
| '2B'
|
|
15
|
+
| '2C'
|
|
16
|
+
| '2G'
|
|
17
|
+
| '2H'
|
|
18
|
+
| '2I'
|
|
19
|
+
| '2J'
|
|
20
|
+
| '2K'
|
|
21
|
+
| '2L'
|
|
22
|
+
| '2M'
|
|
23
|
+
| '2N'
|
|
24
|
+
| '2P'
|
|
25
|
+
| '2Q'
|
|
26
|
+
| '2R'
|
|
27
|
+
| '2U'
|
|
28
|
+
| '2X'
|
|
29
|
+
| '2Y'
|
|
30
|
+
| '2Z'
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Enum representing unit type codes starting with '2'.
|
|
34
|
+
*/
|
|
35
|
+
export enum UnitTypeCodeEnum_2X {
|
|
36
|
+
TwentyFootContainer = '20',
|
|
37
|
+
FortyFootContainer = '21',
|
|
38
|
+
DecilitrePerGram = '22',
|
|
39
|
+
GramPerCubicCentimetre = '23',
|
|
40
|
+
TheoreticalPound = '24',
|
|
41
|
+
GramPerSquareCentimetre = '25',
|
|
42
|
+
TheoreticalTon = '27',
|
|
43
|
+
KilogramPerSquareMetre = '28',
|
|
44
|
+
RadianPerSecond = '2A',
|
|
45
|
+
RadianPerSecondSquared = '2B',
|
|
46
|
+
Roentgen = '2C',
|
|
47
|
+
VoltAC = '2G',
|
|
48
|
+
VoltDC = '2H',
|
|
49
|
+
BritishThermalUnitInternationalTablePerHour = '2I',
|
|
50
|
+
CubicCentimetrePerSecond = '2J',
|
|
51
|
+
CubicFootPerHour = '2K',
|
|
52
|
+
CubicFootPerMinute = '2L',
|
|
53
|
+
CentimetrePerSecond = '2M',
|
|
54
|
+
Decibel = '2N',
|
|
55
|
+
Kilobyte = '2P',
|
|
56
|
+
Kilobecquerel = '2Q',
|
|
57
|
+
Kilocurie = '2R',
|
|
58
|
+
Megagram = '2U',
|
|
59
|
+
MetrePerMinute = '2X',
|
|
60
|
+
Milliroentgen = '2Y',
|
|
61
|
+
Millivolt = '2Z',
|
|
62
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit type codes starting with '3'.
|
|
3
|
+
*/
|
|
4
|
+
export type UnitTypeCode_3X = '33' | '34' | '35' | '37' | '38' | '3B' | '3C'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Enum representing unit type codes starting with '3'.
|
|
8
|
+
*/
|
|
9
|
+
export enum UnitTypeCodeEnum_3X {
|
|
10
|
+
KilopascalSquareMetrePerGram = '33',
|
|
11
|
+
KilopascalPerMillimetre = '34',
|
|
12
|
+
MillilitrePerSquareCentimetreSecond = '35',
|
|
13
|
+
OuncePerSquareFoot = '37',
|
|
14
|
+
OuncePerSquareFootPer0_01inch = '38',
|
|
15
|
+
Megajoule = '3B',
|
|
16
|
+
Manmonth = '3C',
|
|
17
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit type codes starting with '4'.
|
|
3
|
+
*/
|
|
4
|
+
export type UnitTypeCode_4X =
|
|
5
|
+
| '40'
|
|
6
|
+
| '41'
|
|
7
|
+
| '4C'
|
|
8
|
+
| '4G'
|
|
9
|
+
| '4H'
|
|
10
|
+
| '4K'
|
|
11
|
+
| '4L'
|
|
12
|
+
| '4M'
|
|
13
|
+
| '4N'
|
|
14
|
+
| '4O'
|
|
15
|
+
| '4P'
|
|
16
|
+
| '4Q'
|
|
17
|
+
| '4R'
|
|
18
|
+
| '4T'
|
|
19
|
+
| '4U'
|
|
20
|
+
| '4W'
|
|
21
|
+
| '4X'
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Enum representing unit type codes starting with '4'.
|
|
25
|
+
*/
|
|
26
|
+
export enum UnitTypeCodeEnum_4X {
|
|
27
|
+
MillilitrePerSecond = '40',
|
|
28
|
+
MillilitrePerMinute = '41',
|
|
29
|
+
Centistokes = '4C',
|
|
30
|
+
Microlitre = '4G',
|
|
31
|
+
MicrometreMicron = '4H',
|
|
32
|
+
Milliampere = '4K',
|
|
33
|
+
Megabyte = '4L',
|
|
34
|
+
MilligramPerHour = '4M',
|
|
35
|
+
Megabecquerel = '4N',
|
|
36
|
+
Microfarad = '4O',
|
|
37
|
+
NewtonPerMetre = '4P',
|
|
38
|
+
OunceInch = '4Q',
|
|
39
|
+
OunceFoot = '4R',
|
|
40
|
+
Picofarad = '4T',
|
|
41
|
+
PoundPerHour = '4U',
|
|
42
|
+
TonUSPerHour = '4W',
|
|
43
|
+
KilolitrePerHour = '4X',
|
|
44
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit type codes starting with '5'.
|
|
3
|
+
*/
|
|
4
|
+
export type UnitTypeCode_5X =
|
|
5
|
+
| '56'
|
|
6
|
+
| '57'
|
|
7
|
+
| '58'
|
|
8
|
+
| '59'
|
|
9
|
+
| '5A'
|
|
10
|
+
| '5B'
|
|
11
|
+
| '5E'
|
|
12
|
+
| '5J'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Enum representing unit type codes starting with '5'.
|
|
16
|
+
*/
|
|
17
|
+
export enum UnitTypeCodeEnum_5X {
|
|
18
|
+
Sitas = '56',
|
|
19
|
+
Mesh = '57',
|
|
20
|
+
NetKilogram = '58',
|
|
21
|
+
PartPerMillion = '59',
|
|
22
|
+
BarrelUSPerMinute = '5A',
|
|
23
|
+
Batch = '5B',
|
|
24
|
+
MMSCFDay = '5E',
|
|
25
|
+
HydraulicHorsePower = '5J',
|
|
26
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit type codes starting with '8'.
|
|
3
|
+
*/
|
|
4
|
+
export type UnitTypeCode_8X = '80' | '81' | '85' | '87' | '89'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Enum representing unit type codes starting with '8'.
|
|
8
|
+
*/
|
|
9
|
+
export enum UnitTypeCodeEnum_8X {
|
|
10
|
+
PoundPerSquareInchAbsolute = '80',
|
|
11
|
+
Henry = '81',
|
|
12
|
+
FootPoundForce = '85',
|
|
13
|
+
PoundPerCubicFoot = '87',
|
|
14
|
+
Poise = '89',
|
|
15
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unit type codes starting with 'A'.
|
|
3
|
+
*/
|
|
4
|
+
export type UnitTypeCode_AX =
|
|
5
|
+
| 'A10'
|
|
6
|
+
| 'A11'
|
|
7
|
+
| 'A12'
|
|
8
|
+
| 'A13'
|
|
9
|
+
| 'A14'
|
|
10
|
+
| 'A15'
|
|
11
|
+
| 'A16'
|
|
12
|
+
| 'A17'
|
|
13
|
+
| 'A18'
|
|
14
|
+
| 'A19'
|
|
15
|
+
| 'A2'
|
|
16
|
+
| 'A20'
|
|
17
|
+
| 'A21'
|
|
18
|
+
| 'A22'
|
|
19
|
+
| 'A23'
|
|
20
|
+
| 'A24'
|
|
21
|
+
| 'A26'
|
|
22
|
+
| 'A27'
|
|
23
|
+
| 'A28'
|
|
24
|
+
| 'A29'
|
|
25
|
+
| 'A3'
|
|
26
|
+
| 'A30'
|
|
27
|
+
| 'A31'
|
|
28
|
+
| 'A32'
|
|
29
|
+
| 'A33'
|
|
30
|
+
| 'A34'
|
|
31
|
+
| 'A35'
|
|
32
|
+
| 'A36'
|
|
33
|
+
| 'A37'
|
|
34
|
+
| 'A38'
|
|
35
|
+
| 'A39'
|
|
36
|
+
| 'A4'
|
|
37
|
+
| 'A40'
|
|
38
|
+
| 'A41'
|
|
39
|
+
| 'A42'
|
|
40
|
+
| 'A43'
|
|
41
|
+
| 'A44'
|
|
42
|
+
| 'A45'
|
|
43
|
+
| 'A47'
|
|
44
|
+
| 'A48'
|
|
45
|
+
| 'A49'
|
|
46
|
+
| 'A5'
|
|
47
|
+
| 'A53'
|
|
48
|
+
| 'A54'
|
|
49
|
+
| 'A55'
|
|
50
|
+
| 'A56'
|
|
51
|
+
| 'A59'
|
|
52
|
+
| 'A6'
|
|
53
|
+
| 'A68'
|
|
54
|
+
| 'A69'
|
|
55
|
+
| 'A7'
|
|
56
|
+
| 'A70'
|
|
57
|
+
| 'A71'
|
|
58
|
+
| 'A73'
|
|
59
|
+
| 'A74'
|
|
60
|
+
| 'A75'
|
|
61
|
+
| 'A76'
|
|
62
|
+
| 'A8'
|
|
63
|
+
| 'A84'
|
|
64
|
+
| 'A85'
|
|
65
|
+
| 'A86'
|
|
66
|
+
| 'A87'
|
|
67
|
+
| 'A88'
|
|
68
|
+
| 'A89'
|
|
69
|
+
| 'A9'
|
|
70
|
+
| 'A90'
|
|
71
|
+
| 'A91'
|
|
72
|
+
| 'A93'
|
|
73
|
+
| 'A94'
|
|
74
|
+
| 'A95'
|
|
75
|
+
| 'A96'
|
|
76
|
+
| 'A97'
|
|
77
|
+
| 'A98'
|
|
78
|
+
| 'A99'
|
|
79
|
+
| 'AA'
|
|
80
|
+
| 'AB'
|
|
81
|
+
| 'ACR'
|
|
82
|
+
| 'ACT'
|
|
83
|
+
| 'AD'
|
|
84
|
+
| 'AE'
|
|
85
|
+
| 'AH'
|
|
86
|
+
| 'AI'
|
|
87
|
+
| 'AK'
|
|
88
|
+
| 'AL'
|
|
89
|
+
| 'AMH'
|
|
90
|
+
| 'AMP'
|
|
91
|
+
| 'ANN'
|
|
92
|
+
| 'APZ'
|
|
93
|
+
| 'AQ'
|
|
94
|
+
| 'AS'
|
|
95
|
+
| 'ASM'
|
|
96
|
+
| 'ASU'
|
|
97
|
+
| 'ATM'
|
|
98
|
+
| 'AWG'
|
|
99
|
+
| 'AY'
|
|
100
|
+
| 'AZ'
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Enum representing unit type codes starting with 'A'.
|
|
104
|
+
*/
|
|
105
|
+
export enum UnitTypeCodeEnum_AX {
|
|
106
|
+
AmpereSquareMetrePerJouleSecond = 'A10',
|
|
107
|
+
Angstrom = 'A11',
|
|
108
|
+
AstronomicalUnit = 'A12',
|
|
109
|
+
Attojoule = 'A13',
|
|
110
|
+
Barn = 'A14',
|
|
111
|
+
BarnPerElectronvolt = 'A15',
|
|
112
|
+
BarnPerSteradianElectronvolt = 'A16',
|
|
113
|
+
BarnPerSteradian = 'A17',
|
|
114
|
+
BecquerelPerKilogram = 'A18',
|
|
115
|
+
BecquerelPerCubicMetre = 'A19',
|
|
116
|
+
AmperePerCentimetre = 'A2',
|
|
117
|
+
BritishThermalUnitInternationalTablePerSecondSquareFootDegreeRankine = 'A20',
|
|
118
|
+
BritishThermalUnitInternationalTablePerPoundDegreeRankine = 'A21',
|
|
119
|
+
BritishThermalUnitInternationalTablePerSecondFootDegreeRankine = 'A22',
|
|
120
|
+
BritishThermalUnitInternationalTablePerHourSquareFootDegreeRankine = 'A23',
|
|
121
|
+
CandelaPerSquareMetre = 'A24',
|
|
122
|
+
CoulombMetre = 'A26',
|
|
123
|
+
CoulombMetreSquaredPerVolt = 'A27',
|
|
124
|
+
CoulombPerCubicCentimetre = 'A28',
|
|
125
|
+
CoulombPerCubicMetre = 'A29',
|
|
126
|
+
AmperePerMillimetre = 'A3',
|
|
127
|
+
CoulombPerCubicMillimetre = 'A30',
|
|
128
|
+
CoulombPerKilogramSecond = 'A31',
|
|
129
|
+
CoulombPerMole = 'A32',
|
|
130
|
+
CoulombPerSquareCentimetre = 'A33',
|
|
131
|
+
CoulombPerSquareMetre = 'A34',
|
|
132
|
+
CoulombPerSquareMillimetre = 'A35',
|
|
133
|
+
CubicCentimetrePerMole = 'A36',
|
|
134
|
+
CubicDecimetrePerMole = 'A37',
|
|
135
|
+
CubicMetrePerCoulomb = 'A38',
|
|
136
|
+
CubicMetrePerKilogram = 'A39',
|
|
137
|
+
AmperePerSquareCentimetre = 'A4',
|
|
138
|
+
CubicMetrePerMole = 'A40',
|
|
139
|
+
AmperePerSquareMetre = 'A41',
|
|
140
|
+
CuriePerKilogram = 'A42',
|
|
141
|
+
DeadweightTonnage = 'A43',
|
|
142
|
+
Decalitre = 'A44',
|
|
143
|
+
Decametre = 'A45',
|
|
144
|
+
Decitex = 'A47',
|
|
145
|
+
DegreeRankine = 'A48',
|
|
146
|
+
Denier = 'A49',
|
|
147
|
+
AmpereSquareMetre = 'A5',
|
|
148
|
+
Electronvolt = 'A53',
|
|
149
|
+
ElectronvoltPerMetre = 'A54',
|
|
150
|
+
ElectronvoltSquareMetre = 'A55',
|
|
151
|
+
ElectronvoltSquareMetrePerKilogram = 'A56',
|
|
152
|
+
_8PartCloudCover = 'A59', // Enum member names cannot start with a number
|
|
153
|
+
AmperePerSquareMetreKelvinSquared = 'A6',
|
|
154
|
+
Exajoule = 'A68',
|
|
155
|
+
FaradPerMetre = 'A69',
|
|
156
|
+
AmperePerSquareMillimetre = 'A7',
|
|
157
|
+
Femtojoule = 'A70',
|
|
158
|
+
Femtometre = 'A71',
|
|
159
|
+
FootPerSecondSquared = 'A73',
|
|
160
|
+
FootPoundForcePerSecond = 'A74',
|
|
161
|
+
FreightTon = 'A75',
|
|
162
|
+
Gal = 'A76',
|
|
163
|
+
AmpereSecond = 'A8',
|
|
164
|
+
GigacoulombPerCubicMetre = 'A84',
|
|
165
|
+
Gigaelectronvolt = 'A85',
|
|
166
|
+
Gigahertz = 'A86',
|
|
167
|
+
Gigaohm = 'A87',
|
|
168
|
+
GigaohmMetre = 'A88',
|
|
169
|
+
Gigapascal = 'A89',
|
|
170
|
+
Rate = 'A9',
|
|
171
|
+
Gigawatt = 'A90',
|
|
172
|
+
Gon = 'A91',
|
|
173
|
+
GramPerCubicMetre = 'A93',
|
|
174
|
+
GramPerMole = 'A94',
|
|
175
|
+
Gray = 'A95',
|
|
176
|
+
GrayPerSecond = 'A96',
|
|
177
|
+
Hectopascal = 'A97',
|
|
178
|
+
HenryPerMetre = 'A98',
|
|
179
|
+
Bit = 'A99',
|
|
180
|
+
Ball = 'AA',
|
|
181
|
+
BulkPack = 'AB',
|
|
182
|
+
Acre = 'ACR',
|
|
183
|
+
Activity = 'ACT',
|
|
184
|
+
Byte = 'AD',
|
|
185
|
+
AmperePerMetre = 'AE',
|
|
186
|
+
AdditionalMinute = 'AH',
|
|
187
|
+
AverageMinutePerCall = 'AI',
|
|
188
|
+
Fathom = 'AK',
|
|
189
|
+
AccessLine = 'AL',
|
|
190
|
+
AmpereHour = 'AMH',
|
|
191
|
+
Ampere = 'AMP',
|
|
192
|
+
Year = 'ANN',
|
|
193
|
+
TroyOunceOrApothecaryOunce = 'APZ',
|
|
194
|
+
AntiHemophilicFactorAHFUnit = 'AQ',
|
|
195
|
+
Assortment = 'AS',
|
|
196
|
+
AlcoholicStrengthByMass = 'ASM',
|
|
197
|
+
AlcoholicStrengthByVolume = 'ASU',
|
|
198
|
+
StandardAtmosphere = 'ATM',
|
|
199
|
+
AmericanWireGauge = 'AWG',
|
|
200
|
+
Assembly = 'AY',
|
|
201
|
+
BritishThermalUnitInternationalTablePerPound = 'AZ',
|
|
202
|
+
}
|