@bankingserviceai/sdk 1.0.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/dist/index.d.ts +30 -0
- package/dist/index.js +84 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/Currency.d.ts +181 -0
- package/dist/types/Currency.js +182 -0
- package/dist/types/Payment.d.ts +22 -0
- package/dist/types/Payment.js +8 -0
- package/package.json +29 -0
package/dist/index.d.ts
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
import { RequestInit, RequestInfo } from "node-fetch";
|
2
|
+
import { Secret } from "jsonwebtoken";
|
3
|
+
import { Payment, PaymentState } from "./types/Payment";
|
4
|
+
import { Currency } from "./types/Currency";
|
5
|
+
export type BankingServiceAISDKType = typeof BankingServiceAISDK;
|
6
|
+
export type { Payment };
|
7
|
+
export { PaymentState };
|
8
|
+
export { Currency };
|
9
|
+
declare class BankingServiceAISDK {
|
10
|
+
private accessToken?;
|
11
|
+
private refreshToken?;
|
12
|
+
private partnerId;
|
13
|
+
private privateKey;
|
14
|
+
constructor(partnerId: string, privateKey: Secret);
|
15
|
+
protected fetch<T = any>(url: URL | RequestInfo, init?: RequestInit): Promise<T>;
|
16
|
+
private requestAccessToken;
|
17
|
+
get payment(): {
|
18
|
+
retrieve: (profileId: string, paymentId: string) => Promise<Payment>;
|
19
|
+
create: (profileId: string, data: {
|
20
|
+
description: string;
|
21
|
+
method: string;
|
22
|
+
amount: string;
|
23
|
+
currency: Currency | (typeof Currency)[keyof typeof Currency];
|
24
|
+
}) => Promise<Payment>;
|
25
|
+
};
|
26
|
+
}
|
27
|
+
declare const _default: {
|
28
|
+
partner: (partnerId: string, privateKey: Secret) => BankingServiceAISDK;
|
29
|
+
};
|
30
|
+
export default _default;
|
package/dist/index.js
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
import { Headers, default as nodeFetch } from "node-fetch";
|
2
|
+
import jsonwebtoken from "jsonwebtoken";
|
3
|
+
import { PaymentState } from "./types/Payment";
|
4
|
+
import { Currency } from "./types/Currency";
|
5
|
+
export { PaymentState };
|
6
|
+
export { Currency };
|
7
|
+
const url = process.env['BANKINGSERVICEAI_ENV'] === 'staging' ? 'https://staging.api.bankingservice.ai' : 'https://api.bankingservice.ai';
|
8
|
+
class BankingServiceAISDK {
|
9
|
+
accessToken;
|
10
|
+
refreshToken;
|
11
|
+
partnerId;
|
12
|
+
privateKey;
|
13
|
+
constructor(partnerId, privateKey) {
|
14
|
+
this.partnerId = partnerId;
|
15
|
+
this.privateKey = privateKey;
|
16
|
+
}
|
17
|
+
async fetch(url, init) {
|
18
|
+
if (!init)
|
19
|
+
init = {};
|
20
|
+
if (!this.accessToken)
|
21
|
+
await this.requestAccessToken();
|
22
|
+
if (!this.accessToken)
|
23
|
+
throw "No access token!";
|
24
|
+
const decode = jsonwebtoken.decode(this.accessToken);
|
25
|
+
if (!decode)
|
26
|
+
throw "Could not decode access token!";
|
27
|
+
if (typeof decode === 'string')
|
28
|
+
throw "Could not decode access token!";
|
29
|
+
const expiration = new Date(decode.exp * 1000);
|
30
|
+
if ((expiration.getTime() - 30000) < new Date().getTime()) {
|
31
|
+
await this.requestAccessToken();
|
32
|
+
}
|
33
|
+
if (!init.headers)
|
34
|
+
init.headers = {};
|
35
|
+
if (init.headers instanceof Headers) {
|
36
|
+
init.headers.append('Authorization', `Bearer ${this.accessToken}`);
|
37
|
+
}
|
38
|
+
else if (Array.isArray(init.headers)) {
|
39
|
+
init.headers.push(['Authorization', `Bearer ${this.accessToken}`]);
|
40
|
+
}
|
41
|
+
else {
|
42
|
+
init.headers.Authorization = `Bearer ${this.accessToken}`;
|
43
|
+
}
|
44
|
+
return await nodeFetch(url, init).then(a => a.json());
|
45
|
+
}
|
46
|
+
async requestAccessToken() {
|
47
|
+
const accessToken = await jsonwebtoken.sign({}, this.privateKey, {
|
48
|
+
issuer: this.partnerId,
|
49
|
+
subject: this.partnerId,
|
50
|
+
audience: 'api.bankignservice.ai',
|
51
|
+
algorithm: 'RS256',
|
52
|
+
});
|
53
|
+
const request = await nodeFetch(url + "/v1/oauth/token", {
|
54
|
+
method: 'POST',
|
55
|
+
body: new URLSearchParams({
|
56
|
+
grant_type: 'client_credentials',
|
57
|
+
client_id: this.partnerId,
|
58
|
+
}),
|
59
|
+
headers: {
|
60
|
+
'Authorization': `Bearer ${accessToken}`
|
61
|
+
}
|
62
|
+
});
|
63
|
+
const result = await request.json();
|
64
|
+
if (result['error'])
|
65
|
+
throw result['error'];
|
66
|
+
this.accessToken = result['access_token'];
|
67
|
+
this.refreshToken = result['refresh_token'];
|
68
|
+
}
|
69
|
+
get payment() {
|
70
|
+
return {
|
71
|
+
retrieve: async (profileId, paymentId) => {
|
72
|
+
return await this.fetch(`/v1/partners/${this.partnerId}/profiles/${profileId}/payments/${paymentId}`);
|
73
|
+
},
|
74
|
+
create: async (profileId, data) => {
|
75
|
+
return await this.fetch(`/v1/partners/${this.partnerId}/profiles/${profileId}/payments`, data);
|
76
|
+
},
|
77
|
+
};
|
78
|
+
}
|
79
|
+
}
|
80
|
+
export default {
|
81
|
+
partner: (partnerId, privateKey) => {
|
82
|
+
return new BankingServiceAISDK(partnerId, privateKey);
|
83
|
+
}
|
84
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.es2022.d.ts","../node_modules/typescript/lib/lib.es2023.d.ts","../node_modules/typescript/lib/lib.esnext.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2016.intl.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.es2022.array.d.ts","../node_modules/typescript/lib/lib.es2022.error.d.ts","../node_modules/typescript/lib/lib.es2022.intl.d.ts","../node_modules/typescript/lib/lib.es2022.object.d.ts","../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2022.string.d.ts","../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../node_modules/typescript/lib/lib.es2023.array.d.ts","../node_modules/typescript/lib/lib.es2023.collection.d.ts","../node_modules/typescript/lib/lib.esnext.collection.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../node_modules/typescript/lib/lib.esnext.promise.d.ts","../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../node_modules/typescript/lib/lib.esnext.object.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/undici-types/header.d.ts","../node_modules/undici-types/readable.d.ts","../node_modules/undici-types/file.d.ts","../node_modules/undici-types/fetch.d.ts","../node_modules/undici-types/formdata.d.ts","../node_modules/undici-types/connector.d.ts","../node_modules/undici-types/client.d.ts","../node_modules/undici-types/errors.d.ts","../node_modules/undici-types/dispatcher.d.ts","../node_modules/undici-types/global-dispatcher.d.ts","../node_modules/undici-types/global-origin.d.ts","../node_modules/undici-types/pool-stats.d.ts","../node_modules/undici-types/pool.d.ts","../node_modules/undici-types/handlers.d.ts","../node_modules/undici-types/balanced-pool.d.ts","../node_modules/undici-types/agent.d.ts","../node_modules/undici-types/mock-interceptor.d.ts","../node_modules/undici-types/mock-agent.d.ts","../node_modules/undici-types/mock-client.d.ts","../node_modules/undici-types/mock-pool.d.ts","../node_modules/undici-types/mock-errors.d.ts","../node_modules/undici-types/proxy-agent.d.ts","../node_modules/undici-types/api.d.ts","../node_modules/undici-types/cookies.d.ts","../node_modules/undici-types/patch.d.ts","../node_modules/undici-types/filereader.d.ts","../node_modules/undici-types/diagnostics-channel.d.ts","../node_modules/undici-types/websocket.d.ts","../node_modules/undici-types/content-type.d.ts","../node_modules/undici-types/cache.d.ts","../node_modules/undici-types/interceptors.d.ts","../node_modules/undici-types/index.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/dom-events.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/readline/promises.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/sea.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/stream/consumers.d.ts","../node_modules/@types/node/stream/web.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/test.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/formdata-polyfill/esm.min.d.ts","../node_modules/fetch-blob/file.d.ts","../node_modules/fetch-blob/index.d.ts","../node_modules/fetch-blob/from.d.ts","../node_modules/node-fetch/@types/index.d.ts","../node_modules/@types/jsonwebtoken/index.d.ts","../src/types/currency.ts","../src/types/payment.ts","../src/index.ts"],"fileInfos":[{"version":"824cb491a40f7e8fdeb56f1df5edf91b23f3e3ee6b4cde84d4a99be32338faee","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","1c0cdb8dc619bc549c3e5020643e7cf7ae7940058e8c7e5aefa5871b6d86f44b","886e50ef125efb7878f744e86908884c0133e7a6d9d80013f421b0cd8fb2af94",{"version":"87d693a4920d794a73384b3c779cadcb8548ac6945aa7a925832fe2418c9527a","affectsGlobalScope":true},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"b20fe0eca9a4e405f1a5ae24a2b3290b37cf7f21eba6cbe4fc3fab979237d4f3","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"8073890e29d2f46fdbc19b8d6d2eb9ea58db9a2052f8640af20baff9afbc8640","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"d8670852241d4c6e03f2b89d67497a4bbefe29ecaa5a444e2c11a9b05e6fccc6","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"b1cb28af0c891c8c96b2d6b7be76bd394fddcfdb4709a20ba05a7c1605eea0f9","affectsGlobalScope":true},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true},{"version":"15b98a533864d324e5f57cd3cfc0579b231df58c1c0f6063ea0fcb13c3c74ff9","affectsGlobalScope":true},{"version":"ac77cb3e8c6d3565793eb90a8373ee8033146315a3dbead3bde8db5eaf5e5ec6","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"2fef54945a13095fdb9b84f705f2b5994597640c46afeb2ce78352fab4cb3279","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"acdc9fb9638a235a69bd270003d8db4d6153ada2b7ccbea741ade36b295e431e","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"a14ed46fa3f5ffc7a8336b497cd07b45c2084213aaca933a22443fcb2eef0d07","affectsGlobalScope":true},"cce1f5f86974c1e916ec4a8cab6eec9aa8e31e8148845bf07fbaa8e1d97b1a2c",{"version":"7fd7fcbf021a5845bdd9397d4649fcf2fe17152d2098140fc723099a215d19ad","affectsGlobalScope":true},"df3389f71a71a38bc931aaf1ef97a65fada98f0a27f19dd12f8b8de2b0f4e461","d69a3298a197fe5d59edba0ec23b4abf2c8e7b8c6718eac97833633cd664e4c9",{"version":"a9544f6f8af0d046565e8dde585502698ebc99eef28b715bad7c2bded62e4a32","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb",{"version":"8b809082dfeffc8cc4f3b9c59f55c0ff52ba12f5ae0766cb5c35deee83b8552e","affectsGlobalScope":true},"bd3f5d05b6b5e4bfcea7739a45f3ffb4a7f4a3442ba7baf93e0200799285b8f1","4c775c2fccabf49483c03cd5e3673f87c1ffb6079d98e7b81089c3def79e29c6","d4f9d3ae2fe1ae199e1c832cca2c44f45e0b305dfa2808afdd51249b6f4a5163","7525257b4aa35efc7a1bbc00f205a9a96c4e4ab791da90db41b77938c4e0c18e","b7fe70be794e13d1b7940e318b8770cd1fb3eced7707805318a2e3aaac2c3e9e",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},{"version":"9c611eff81287837680c1f4496daf9e737d6f3a1ff17752207814b8f8e1265af","affectsGlobalScope":true},"fe1fd6afdfe77976d4c702f3746c05fb05a7e566845c890e0e970fe9376d6a90","b5d4e3e524f2eead4519c8e819eaf7fa44a27c22418eff1b7b2d0ebc5fdc510d","afb1701fd4be413a8a5a88df6befdd4510c30a31372c07a4138facf61594c66d","9bd8e5984676cf28ebffcc65620b4ab5cb38ab2ec0aac0825df8568856895653","396a8939b5e177542bdf9b5262b4eee85d29851b2d57681fa9d7eae30e225830","5e8dc64e7e68b2b3ea52ed685cf85239e0d5fb9df31aabc94370c6bc7e19077b",{"version":"ea455cc68871b049bcecd9f56d4cf27b852d6dafd5e3b54468ca87cc11604e4d","affectsGlobalScope":true},"c07146dbbbd8b347241b5df250a51e48f2d7bef19b1e187b1a3f20c849988ff1","45b1053e691c5af9bfe85060a3e1542835f8d84a7e6e2e77ca305251eda0cb3c","0f05c06ff6196958d76b865ae17245b52d8fe01773626ac3c43214a2458ea7b7",{"version":"ae5507fc333d637dec9f37c6b3f4d423105421ea2820a64818de55db85214d66","affectsGlobalScope":true},{"version":"46755a4afc53df75f0bfce72259fb971daac826b0cdd8c4eaccad2755a817403","affectsGlobalScope":true},"8abd0566d2854c4bd1c5e48e05df5c74927187f1541e6770001d9637ac41542e","54e854615c4eafbdd3fd7688bd02a3aafd0ccf0e87c98f79d3e9109f047ce6b8","d8dba11dc34d50cb4202de5effa9a1b296d7a2f4a029eec871f894bddfb6430d","8b71dd18e7e63b6f991b511a201fad7c3bf8d1e0dd98acb5e3d844f335a73634","01d8e1419c84affad359cc240b2b551fb9812b450b4d3d456b64cda8102d4f60","9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","8221b00f271cf7f535a8eeec03b0f80f0929c7a16116e2d2df089b41066de69b","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","7fa32887f8a97909fca35ebba3740f8caf8df146618d8fff957a3f89f67a2f6a","9a9634296cca836c3308923ba7aa094fa6ed76bb1e366d8ddcf5c65888ab1024",{"version":"bddce945d552a963c9733db106b17a25474eefcab7fc990157a2134ef55d4954","affectsGlobalScope":true},{"version":"7052b7b0c3829df3b4985bab2fd74531074b4835d5a7b263b75c82f0916ad62f","affectsGlobalScope":true},"aa34c3aa493d1c699601027c441b9664547c3024f9dbab1639df7701d63d18fa","4b55240c2a03b2c71e98a7fc528b16136faa762211c92e781a01c37821915ea6","7c651f8dce91a927ab62925e73f190763574c46098f2b11fb8ddc1b147a6709a","7440ab60f4cb031812940cc38166b8bb6fbf2540cfe599f87c41c08011f0c1df",{"version":"94c086dff8dbc5998749326bc69b520e8e4273fb5b7b58b50e0210e0885dfcde","affectsGlobalScope":true},{"version":"f5b5dc128973498b75f52b1b8c2d5f8629869104899733ae485100c2309b4c12","affectsGlobalScope":true},"ebe5facd12fd7745cda5f4bc3319f91fb29dc1f96e57e9c6f8b260a7cc5b67ee","79bad8541d5779c85e82a9fb119c1fe06af77a71cc40f869d62ad379473d4b75","21c56c6e8eeacef15f63f373a29fab6a2b36e4705be7a528aae8c51469e2737b",{"version":"629d20681ca284d9e38c0a019f647108f5fe02f9c59ac164d56f5694fc3faf4d","affectsGlobalScope":true},"e7dbf5716d76846c7522e910896c5747b6df1abd538fee8f5291bdc843461795",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"a42be67ed1ddaec743582f41fc219db96a1b69719fccac6d1464321178d610fc","d782e571cb7d6ec0f0645957ed843d00e3f8577e08cc2940f400c931bc47a8df","9167246623f181441e6116605221268d94e33a1ebd88075e2dc80133c928ae7e","dc1a838d8a514b6de9fbce3bd5e6feb9ccfe56311e9338bb908eb4d0d966ecaf","186f09ed4b1bc1d5a5af5b1d9f42e2d798f776418e82599b3de16423a349d184","d692ae73951775d2448df535ce8bc8abf162dc343911fedda2c37b8de3b20d8e","97e0fc5fb970657971e04cb0c694a4b2318ba30ed3dd7bbb282d2eef3fd26925",{"version":"b43b6bce1cfae61ed6cfb64187c898851d8a88f1db1fcdc2b7948fbab59bd58d","signature":"24f79c65bcc6e59265f3259428e0c56e5fe9eb24b94135d43a9121079ba79c94"},{"version":"71e05069adced4fcea9c37d7e923fb768fd5d854abcb49f1b6d365037018aed8","signature":"30ddf7ba5fafc9738f9cdc626201a6fd788bb3805d5d25a17be5d552715c6b80"},{"version":"9f24d96a4cfa331848a38486ca5186ebc598fb38b6677c9308516d7bf62a8533","signature":"4a09b07b41b0298b5fd15474ccd59d49e4e0fc3e16f4b6d6f4479bf69a713167"}],"root":[164],"options":{"allowJs":true,"declaration":true,"downlevelIteration":true,"esModuleInterop":true,"jsx":4,"module":99,"outDir":"./","skipLibCheck":true,"strict":true,"target":99},"fileIdsList":[[110,155],[69],[104],[105,110,139],[106,117,118,125,136,147],[106,107,117,125],[108,148],[109,110,118,126],[110,136,144],[111,113,117,125],[104,112],[113,114],[117],[115,117],[104,117],[117,118,119,136,147],[117,118,119,132,136,139],[102,105,152],[113,117,120,125,136,147],[117,118,120,121,125,136,144,147],[120,122,136,144,147],[69,70,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154],[117,123],[124,147,152],[113,117,125,136],[126],[127],[104,128],[129,146,152],[130],[131],[117,132,133],[132,134,148,150],[105,117,136,137,138,139],[105,136,138],[136,137],[139],[140],[104,136],[117,142,143],[142,143],[110,125,136,144],[145],[125,146],[105,120,131,147],[110,148],[136,149],[124,150],[151],[105,110,117,119,128,136,147,150,152],[136,153],[157,158],[120,155,156,159],[79,83,147],[79,136,147],[74],[76,79,144,147],[125,144],[155],[74,155],[76,79,125,147],[71,72,75,78,105,117,136,147],[71,77],[75,79,105,139,147,155],[105,155],[95,105,155],[73,74,155],[79],[73,74,75,76,77,78,79,80,81,83,84,85,86,87,88,89,90,91,92,93,94,96,97,98,99,100,101],[79,86,87],[77,79,87,88],[78],[71,74,79],[79,83,87,88],[83],[77,79,82,147],[71,76,77,79,83,86],[105,136],[74,79,95,105,152,155],[160,161,162,163],[162]],"referencedMap":[[161,1],[69,2],[70,2],[104,3],[105,4],[106,5],[107,6],[108,7],[109,8],[110,9],[111,10],[112,11],[113,12],[114,12],[116,13],[115,14],[117,15],[118,16],[119,17],[103,18],[120,19],[121,20],[122,21],[155,22],[123,23],[124,24],[125,25],[126,26],[127,27],[128,28],[129,29],[130,30],[131,31],[132,32],[133,32],[134,33],[136,34],[138,35],[137,36],[139,37],[140,38],[141,39],[142,40],[143,41],[144,42],[145,43],[146,44],[147,45],[148,46],[149,47],[150,48],[151,49],[152,50],[153,51],[159,52],[160,53],[86,54],[93,55],[85,54],[100,56],[77,57],[76,58],[99,59],[94,60],[97,61],[79,62],[78,63],[74,64],[73,65],[96,66],[75,67],[80,68],[84,68],[102,69],[101,68],[88,70],[89,71],[91,72],[87,73],[90,74],[95,59],[82,75],[83,76],[92,77],[72,78],[98,79],[164,80],[163,81]],"exportedModulesMap":[[161,1],[69,2],[70,2],[104,3],[105,4],[106,5],[107,6],[108,7],[109,8],[110,9],[111,10],[112,11],[113,12],[114,12],[116,13],[115,14],[117,15],[118,16],[119,17],[103,18],[120,19],[121,20],[122,21],[155,22],[123,23],[124,24],[125,25],[126,26],[127,27],[128,28],[129,29],[130,30],[131,31],[132,32],[133,32],[134,33],[136,34],[138,35],[137,36],[139,37],[140,38],[141,39],[142,40],[143,41],[144,42],[145,43],[146,44],[147,45],[148,46],[149,47],[150,48],[151,49],[152,50],[153,51],[159,52],[160,53],[86,54],[93,55],[85,54],[100,56],[77,57],[76,58],[99,59],[94,60],[97,61],[79,62],[78,63],[74,64],[73,65],[96,66],[75,67],[80,68],[84,68],[102,69],[101,68],[88,70],[89,71],[91,72],[87,73],[90,74],[95,59],[82,75],[83,76],[92,77],[72,78],[98,79],[164,80],[163,81]],"semanticDiagnosticsPerFile":[161,69,70,104,105,106,107,108,109,110,111,112,113,114,116,115,117,118,119,103,154,120,121,122,155,123,124,125,126,127,128,129,130,131,132,133,134,135,136,138,137,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,157,159,158,156,160,67,68,12,14,13,2,15,16,17,18,19,20,21,22,3,23,4,24,28,25,26,27,29,30,31,5,32,33,34,35,6,39,36,37,38,40,7,41,46,47,42,43,44,45,8,51,48,49,50,52,9,53,54,55,58,56,57,59,60,10,1,61,11,65,63,62,66,64,86,93,85,100,77,76,99,94,97,79,78,74,73,96,75,80,81,84,71,102,101,88,89,91,87,90,95,82,83,92,72,98,164,162,163]},"version":"5.4.5"}
|
@@ -0,0 +1,181 @@
|
|
1
|
+
export declare enum Currency {
|
2
|
+
AED = "AED",// 784 2 United Arab Emirates dirham United Arab Emirates
|
3
|
+
AFN = "AFN",// 971 2 Afghan afghani Afghanistan
|
4
|
+
ALL = "ALL",// 008 2 Albanian lek Albania
|
5
|
+
AMD = "AMD",// 051 2 Armenian dram Armenia
|
6
|
+
ANG = "ANG",// 532 2 Netherlands Antillean guilder Curaçao (CW), Sint Maarten (SX)
|
7
|
+
AOA = "AOA",// 973 2 Angolan kwanza Angola
|
8
|
+
ARS = "ARS",// 032 2 Argentine peso Argentina
|
9
|
+
AUD = "AUD",// 036 2 Australian dollar Australia, Christmas Island (CX), Cocos (Keeling) Islands (CC), Heard Island and McDonald Islands (HM), Kiribati (KI), Nauru (NR), Norfolk Island (NF), Tuvalu (TV)
|
10
|
+
AWG = "AWG",// 533 2 Aruban florin Aruba
|
11
|
+
AZN = "AZN",// 944 2 Azerbaijani manat Azerbaijan
|
12
|
+
BAM = "BAM",// 977 2 Bosnia and Herzegovina convertible mark Bosnia and Herzegovina
|
13
|
+
BBD = "BBD",// 052 2 Barbados dollar Barbados
|
14
|
+
BDT = "BDT",// 050 2 Bangladeshi taka Bangladesh
|
15
|
+
BGN = "BGN",// 975 2 Bulgarian lev Bulgaria
|
16
|
+
BHD = "BHD",// 048 3 Bahraini dinar Bahrain
|
17
|
+
BIF = "BIF",// 108 0 Burundian franc Burundi
|
18
|
+
BMD = "BMD",// 060 2 Bermudian dollar Bermuda
|
19
|
+
BND = "BND",// 096 2 Brunei dollar Brunei
|
20
|
+
BOB = "BOB",// 068 2 Boliviano Bolivia
|
21
|
+
BOV = "BOV",// 984 2 Bolivian Mvdol (funds code) Bolivia
|
22
|
+
BRL = "BRL",// 986 2 Brazilian real Brazil
|
23
|
+
BSD = "BSD",// 044 2 Bahamian dollar Bahamas
|
24
|
+
BTN = "BTN",// 064 2 Bhutanese ngultrum Bhutan
|
25
|
+
BWP = "BWP",// 072 2 Botswana pula Botswana
|
26
|
+
BYN = "BYN",// 933 2 Belarusian ruble Belarus
|
27
|
+
BZD = "BZD",// 084 2 Belize dollar Belize
|
28
|
+
CAD = "CAD",// 124 2 Canadian dollar Canada
|
29
|
+
CDF = "CDF",// 976 2 Congolese franc Democratic Republic of the Congo
|
30
|
+
CHE = "CHE",// 947 2 WIR euro (complementary currency) Switzerland
|
31
|
+
CHF = "CHF",// 756 2 Swiss franc Switzerland, Liechtenstein (LI)
|
32
|
+
CHW = "CHW",// 948 2 WIR franc (complementary currency) Switzerland
|
33
|
+
CLF = "CLF",// 990 4 Unidad de Fomento (funds code) Chile
|
34
|
+
CLP = "CLP",// 152 0 Chilean peso Chile
|
35
|
+
CNY = "CNY",// 156 2 Renminbi[6] China
|
36
|
+
COP = "COP",// 170 2 Colombian peso Colombia
|
37
|
+
COU = "COU",// 970 2[7] Unidad de Valor Real (UVR) (funds code)[7] Colombia
|
38
|
+
CRC = "CRC",// 188 2 Costa Rican colon Costa Rica
|
39
|
+
CUP = "CUP",// 192 2 Cuban peso Cuba
|
40
|
+
CVE = "CVE",// 132 2 Cape Verdean escudo Cabo Verde
|
41
|
+
CZK = "CZK",// 203 2 Czech koruna Czechia[8]
|
42
|
+
DJF = "DJF",// 262 0 Djiboutian franc Djibouti
|
43
|
+
DKK = "DKK",// 208 2 Danish krone Denmark, Faroe Islands (FO), Greenland (GL)
|
44
|
+
DOP = "DOP",// 214 2 Dominican peso Dominican Republic
|
45
|
+
DZD = "DZD",// 012 2 Algerian dinar Algeria
|
46
|
+
EGP = "EGP",// 818 2 Egyptian pound Egypt
|
47
|
+
ERN = "ERN",// 232 2 Eritrean nakfa Eritrea
|
48
|
+
ETB = "ETB",// 230 2 Ethiopian birr Ethiopia
|
49
|
+
EUR = "EUR",// 978 2 Euro Åland Islands (AX), European Union (EU), Andorra (AD)[c], Austria (AT), Belgium (BE), Croatia (HR), Cyprus (CY), Estonia (EE), Finland (FI), France (FR), French Guiana (GF), French Southern and Antarctic Lands (TF), Germany (DE), Greece (GR), Guadeloupe (GP), Ireland (IE), Italy (IT), Kosovo (XK)[d], Latvia (LV), Lithuania (LT), Luxembourg (LU), Malta (MT), Martinique (MQ), Mayotte (YT), Monaco (MC)[c], Montenegro (ME)[d], Netherlands (NL), Portugal (PT), Réunion (RE), Saint Barthélemy (BL), Saint Martin (MF), Saint Pierre and Miquelon (PM), San Marino (SM)[c], Slovakia (SK), Slovenia (SI), Spain (ES), Vatican City (VA)[c]
|
50
|
+
FJD = "FJD",// 242 2 Fiji dollar Fiji
|
51
|
+
FKP = "FKP",// 238 2 Falkland Islands pound Falkland Islands (pegged to GBP 1:1)
|
52
|
+
GBP = "GBP",// 826 2 Pound sterling United Kingdom, Isle of Man (IM, see Manx pound), Jersey (JE, see Jersey pound), Guernsey (GG, see Guernsey pound), Tristan da Cunha (SH-TA)
|
53
|
+
GEL = "GEL",// 981 2 Georgian lari Georgia
|
54
|
+
GHS = "GHS",// 936 2 Ghanaian cedi Ghana
|
55
|
+
GIP = "GIP",// 292 2 Gibraltar pound Gibraltar (pegged to GBP 1:1)
|
56
|
+
GMD = "GMD",// 270 2 Gambian dalasi Gambia
|
57
|
+
GNF = "GNF",// 324 0 Guinean franc Guinea
|
58
|
+
GTQ = "GTQ",// 320 2 Guatemalan quetzal Guatemala
|
59
|
+
GYD = "GYD",// 328 2 Guyanese dollar Guyana
|
60
|
+
HKD = "HKD",// 344 2 Hong Kong dollar Hong Kong
|
61
|
+
HNL = "HNL",// 340 2 Honduran lempira Honduras
|
62
|
+
HTG = "HTG",// 332 2 Haitian gourde Haiti
|
63
|
+
HUF = "HUF",// 348 2 Hungarian forint Hungary
|
64
|
+
IDR = "IDR",// 360 2 Indonesian rupiah Indonesia
|
65
|
+
ILS = "ILS",// 376 2 Israeli new shekel Israel
|
66
|
+
INR = "INR",// 356 2 Indian rupee India, Bhutan
|
67
|
+
IQD = "IQD",// 368 3 Iraqi dinar Iraq
|
68
|
+
IRR = "IRR",// 364 2 Iranian rial Iran
|
69
|
+
ISK = "ISK",// 352 0 Icelandic króna (plural: krónur) Iceland
|
70
|
+
JMD = "JMD",// 388 2 Jamaican dollar Jamaica
|
71
|
+
JOD = "JOD",// 400 3 Jordanian dinar Jordan
|
72
|
+
JPY = "JPY",// 392 0 Japanese yen Japan
|
73
|
+
KES = "KES",// 404 2 Kenyan shilling Kenya
|
74
|
+
KGS = "KGS",// 417 2 Kyrgyzstani som Kyrgyzstan
|
75
|
+
KHR = "KHR",// 116 2 Cambodian riel Cambodia
|
76
|
+
KMF = "KMF",// 174 0 Comoro franc Comoros
|
77
|
+
KPW = "KPW",// 408 2 North Korean won North Korea
|
78
|
+
KRW = "KRW",// 410 0[e] South Korean won South Korea
|
79
|
+
KWD = "KWD",// 414 3 Kuwaiti dinar Kuwait
|
80
|
+
KYD = "KYD",// 136 2 Cayman Islands dollar Cayman Islands
|
81
|
+
KZT = "KZT",// 398 2 Kazakhstani tenge Kazakhstan
|
82
|
+
LAK = "LAK",// 418 2 Lao kip Laos
|
83
|
+
LBP = "LBP",// 422 2 Lebanese pound Lebanon
|
84
|
+
LKR = "LKR",// 144 2 Sri Lankan rupee Sri Lanka
|
85
|
+
LRD = "LRD",// 430 2 Liberian dollar Liberia
|
86
|
+
LSL = "LSL",// 426 2 Lesotho loti Lesotho
|
87
|
+
LYD = "LYD",// 434 3 Libyan dinar Libya
|
88
|
+
MAD = "MAD",// 504 2 Moroccan dirham Morocco, Western Sahara
|
89
|
+
MDL = "MDL",// 498 2 Moldovan leu Moldova
|
90
|
+
MGA = "MGA",// 969 2[f] Malagasy ariary Madagascar
|
91
|
+
MKD = "MKD",// 807 2 Macedonian denar North Macedonia
|
92
|
+
MMK = "MMK",// 104 2 Myanmar kyat Myanmar
|
93
|
+
MNT = "MNT",// 496 2 Mongolian tögrög Mongolia
|
94
|
+
MOP = "MOP",// 446 2 Macanese pataca Macau
|
95
|
+
MRU = "MRU",// 929 2[f][10] Mauritanian ouguiya Mauritania
|
96
|
+
MUR = "MUR",// 480 2 Mauritian rupee Mauritius
|
97
|
+
MVR = "MVR",// 462 2 Maldivian rufiyaa Maldives
|
98
|
+
MWK = "MWK",// 454 2 Malawian kwacha Malawi
|
99
|
+
MXN = "MXN",// 484 2 Mexican peso Mexico
|
100
|
+
MXV = "MXV",// 979 2 Mexican Unidad de Inversion (UDI) (funds code) Mexico
|
101
|
+
MYR = "MYR",// 458 2 Malaysian ringgit Malaysia
|
102
|
+
MZN = "MZN",// 943 2 Mozambican metical Mozambique
|
103
|
+
NAD = "NAD",// 516 2 Namibian dollar Namibia (pegged to ZAR 1:1)
|
104
|
+
NGN = "NGN",// 566 2 Nigerian naira Nigeria
|
105
|
+
NIO = "NIO",// 558 2 Nicaraguan córdoba Nicaragua
|
106
|
+
NOK = "NOK",// 578 2 Norwegian krone Norway, Svalbard and Jan Mayen (SJ), Bouvet Island (BV)
|
107
|
+
NPR = "NPR",// 524 2 Nepalese rupee Nepal
|
108
|
+
NZD = "NZD",// 554 2 New Zealand dollar New Zealand, Cook Islands (CK), Niue (NU), Pitcairn Islands (PN; see also Pitcairn Islands dollar), Tokelau (TK)
|
109
|
+
OMR = "OMR",// 512 3 Omani rial Oman
|
110
|
+
PAB = "PAB",// 590 2 Panamanian balboa Panama
|
111
|
+
PEN = "PEN",// 604 2 Peruvian sol Peru
|
112
|
+
PGK = "PGK",// 598 2 Papua New Guinean kina Papua New Guinea
|
113
|
+
PHP = "PHP",// 608 2 Philippine peso[11] Philippines
|
114
|
+
PKR = "PKR",// 586 2 Pakistani rupee Pakistan
|
115
|
+
PLN = "PLN",// 985 2 Polish złoty Poland
|
116
|
+
PYG = "PYG",// 600 0 Paraguayan guaraní Paraguay
|
117
|
+
QAR = "QAR",// 634 2 Qatari riyal Qatar
|
118
|
+
RON = "RON",// 946 2 Romanian leu Romania
|
119
|
+
RSD = "RSD",// 941 2 Serbian dinar Serbia
|
120
|
+
RUB = "RUB",// 643 2 Russian ruble Russia
|
121
|
+
RWF = "RWF",// 646 0 Rwandan franc Rwanda
|
122
|
+
SAR = "SAR",// 682 2 Saudi riyal Saudi Arabia
|
123
|
+
SBD = "SBD",// 090 2 Solomon Islands dollar Solomon Islands
|
124
|
+
SCR = "SCR",// 690 2 Seychelles rupee Seychelles
|
125
|
+
SDG = "SDG",// 938 2 Sudanese pound Sudan
|
126
|
+
SEK = "SEK",// 752 2 Swedish krona (plural: kronor) Sweden
|
127
|
+
SGD = "SGD",// 702 2 Singapore dollar Singapore
|
128
|
+
SHP = "SHP",// 654 2 Saint Helena pound Saint Helena (SH-SH), Ascension Island (SH-AC)
|
129
|
+
SLE = "SLE",// 925 2 Sierra Leonean leone (new leone)[12][13][14] Sierra Leone
|
130
|
+
SLL = "SLL",// 694 2 Sierra Leonean leone (old leone)[12][13][14][15] Sierra Leone
|
131
|
+
SOS = "SOS",// 706 2 Somalian shilling Somalia
|
132
|
+
SRD = "SRD",// 968 2 Surinamese dollar Suriname
|
133
|
+
SSP = "SSP",// 728 2 South Sudanese pound South Sudan
|
134
|
+
STN = "STN",// 930 2[16] São Tomé and Príncipe dobra São Tomé and Príncipe
|
135
|
+
SVC = "SVC",// 222 2 Salvadoran colón El Salvador
|
136
|
+
SYP = "SYP",// 760 2 Syrian pound Syria
|
137
|
+
SZL = "SZL",// 748 2 Swazi lilangeni Eswatini[11]
|
138
|
+
THB = "THB",// 764 2 Thai baht Thailand
|
139
|
+
TJS = "TJS",// 972 2 Tajikistani somoni Tajikistan
|
140
|
+
TMT = "TMT",// 934 2 Turkmenistan manat Turkmenistan
|
141
|
+
TND = "TND",// 788 3 Tunisian dinar Tunisia
|
142
|
+
TOP = "TOP",// 776 2 Tongan paʻanga Tonga
|
143
|
+
TRY = "TRY",// 949 2 Turkish lira Turkey
|
144
|
+
TTD = "TTD",// 780 2 Trinidad and Tobago dollar Trinidad and Tobago
|
145
|
+
TWD = "TWD",// 901 2 New Taiwan dollar Taiwan
|
146
|
+
TZS = "TZS",// 834 2 Tanzanian shilling Tanzania
|
147
|
+
UAH = "UAH",// 980 2 Ukrainian hryvnia Ukraine
|
148
|
+
UGX = "UGX",// 800 0 Ugandan shilling Uganda
|
149
|
+
USD = "USD",// 840 2 United States dollar United States, American Samoa (AS), British Indian Ocean Territory (IO) (also uses GBP), British Virgin Islands (VG), Caribbean Netherlands (BQ – Bonaire, Sint Eustatius and Saba), Ecuador (EC), El Salvador (SV), Guam (GU), Marshall Islands (MH), Federated States of Micronesia (FM), Northern Mariana Islands (MP), Palau (PW), Panama (PA) (as well as Panamanian Balboa), Puerto Rico (PR), Timor-Leste (TL), Turks and Caicos Islands (TC), U.S. Virgin Islands (VI), United States Minor Outlying Islands (UM)
|
150
|
+
USN = "USN",// 997 2 United States dollar (next day) (funds code) United States
|
151
|
+
UYI = "UYI",// 940 0 Uruguay Peso en Unidades Indexadas (URUIURUI) (funds code) Uruguay
|
152
|
+
UYU = "UYU",// 858 2 Uruguayan peso Uruguay
|
153
|
+
UYW = "UYW",// 927 4 Unidad previsional[17] Uruguay
|
154
|
+
UZS = "UZS",// 860 2 Uzbekistani sum Uzbekistan
|
155
|
+
VED = "VED",// 926 2 Venezuelan digital bolívar[18] Venezuela
|
156
|
+
VES = "VES",// 928 2 Venezuelan sovereign bolívar[11] Venezuela
|
157
|
+
VND = "VND",// 704 0 Vietnamese đồng Vietnam
|
158
|
+
VUV = "VUV",// 548 0 Vanuatu vatu Vanuatu
|
159
|
+
WST = "WST",// 882 2 Samoan tala Samoa
|
160
|
+
XAF = "XAF",// 950 0 CFA franc BEAC Cameroon (CM), Central African Republic (CF), Republic of the Congo (CG), Chad (TD), Equatorial Guinea (GQ), Gabon (GA)
|
161
|
+
XAG = "XAG",// 961 . Silver (one troy ounce)
|
162
|
+
XAU = "XAU",// 959 . Gold (one troy ounce)
|
163
|
+
XBA = "XBA",// 955 . European Composite Unit (EURCO) (bond market unit)
|
164
|
+
XBB = "XBB",// 956 . European Monetary Unit (E.M.U.-6) (bond market unit)
|
165
|
+
XBC = "XBC",// 957 . European Unit of Account 9 (E.U.A.-9) (bond market unit)
|
166
|
+
XBD = "XBD",// 958 . European Unit of Account 17 (E.U.A.-17) (bond market unit)
|
167
|
+
XCD = "XCD",// 951 2 East Caribbean dollar Anguilla (AI), Antigua and Barbuda (AG), Dominica (DM), Grenada (GD), Montserrat (MS), Saint Kitts and Nevis (KN), Saint Lucia (LC), Saint Vincent and the Grenadines (VC)
|
168
|
+
XDR = "XDR",// 960 . Special drawing rights International Monetary Fund
|
169
|
+
XOF = "XOF",// 952 0 CFA franc BCEAO Benin (BJ), Burkina Faso (BF), Côte d'Ivoire (CI), Guinea-Bissau (GW), Mali (ML), Niger (NE), Senegal (SN), Togo (TG)
|
170
|
+
XPD = "XPD",// 964 . Palladium (one troy ounce)
|
171
|
+
XPF = "XPF",// 953 0 CFP franc (franc Pacifique) French territories of the Pacific Ocean: French Polynesia (PF), New Caledonia (NC), Wallis and Futuna (WF)
|
172
|
+
XPT = "XPT",// 962 . Platinum (one troy ounce)
|
173
|
+
XSU = "XSU",// 994 . SUCRE Unified System for Regional Compensation (SUCRE)[19]
|
174
|
+
XTS = "XTS",// 963 . Code reserved for testing
|
175
|
+
XUA = "XUA",// 965 . ADB Unit of Account African Development Bank[20]
|
176
|
+
XXX = "XXX",// 999 . No currency
|
177
|
+
YER = "YER",// 886 2 Yemeni rial Yemen
|
178
|
+
ZAR = "ZAR",// 710 2 South African rand Eswatini, Lesotho, Namibia, South Africa
|
179
|
+
ZMW = "ZMW",// 967 2 Zambian kwacha Zambia
|
180
|
+
ZWL = "ZWL"
|
181
|
+
}
|
@@ -0,0 +1,182 @@
|
|
1
|
+
export var Currency;
|
2
|
+
(function (Currency) {
|
3
|
+
Currency["AED"] = "AED";
|
4
|
+
Currency["AFN"] = "AFN";
|
5
|
+
Currency["ALL"] = "ALL";
|
6
|
+
Currency["AMD"] = "AMD";
|
7
|
+
Currency["ANG"] = "ANG";
|
8
|
+
Currency["AOA"] = "AOA";
|
9
|
+
Currency["ARS"] = "ARS";
|
10
|
+
Currency["AUD"] = "AUD";
|
11
|
+
Currency["AWG"] = "AWG";
|
12
|
+
Currency["AZN"] = "AZN";
|
13
|
+
Currency["BAM"] = "BAM";
|
14
|
+
Currency["BBD"] = "BBD";
|
15
|
+
Currency["BDT"] = "BDT";
|
16
|
+
Currency["BGN"] = "BGN";
|
17
|
+
Currency["BHD"] = "BHD";
|
18
|
+
Currency["BIF"] = "BIF";
|
19
|
+
Currency["BMD"] = "BMD";
|
20
|
+
Currency["BND"] = "BND";
|
21
|
+
Currency["BOB"] = "BOB";
|
22
|
+
Currency["BOV"] = "BOV";
|
23
|
+
Currency["BRL"] = "BRL";
|
24
|
+
Currency["BSD"] = "BSD";
|
25
|
+
Currency["BTN"] = "BTN";
|
26
|
+
Currency["BWP"] = "BWP";
|
27
|
+
Currency["BYN"] = "BYN";
|
28
|
+
Currency["BZD"] = "BZD";
|
29
|
+
Currency["CAD"] = "CAD";
|
30
|
+
Currency["CDF"] = "CDF";
|
31
|
+
Currency["CHE"] = "CHE";
|
32
|
+
Currency["CHF"] = "CHF";
|
33
|
+
Currency["CHW"] = "CHW";
|
34
|
+
Currency["CLF"] = "CLF";
|
35
|
+
Currency["CLP"] = "CLP";
|
36
|
+
Currency["CNY"] = "CNY";
|
37
|
+
Currency["COP"] = "COP";
|
38
|
+
Currency["COU"] = "COU";
|
39
|
+
Currency["CRC"] = "CRC";
|
40
|
+
Currency["CUP"] = "CUP";
|
41
|
+
Currency["CVE"] = "CVE";
|
42
|
+
Currency["CZK"] = "CZK";
|
43
|
+
Currency["DJF"] = "DJF";
|
44
|
+
Currency["DKK"] = "DKK";
|
45
|
+
Currency["DOP"] = "DOP";
|
46
|
+
Currency["DZD"] = "DZD";
|
47
|
+
Currency["EGP"] = "EGP";
|
48
|
+
Currency["ERN"] = "ERN";
|
49
|
+
Currency["ETB"] = "ETB";
|
50
|
+
Currency["EUR"] = "EUR";
|
51
|
+
Currency["FJD"] = "FJD";
|
52
|
+
Currency["FKP"] = "FKP";
|
53
|
+
Currency["GBP"] = "GBP";
|
54
|
+
Currency["GEL"] = "GEL";
|
55
|
+
Currency["GHS"] = "GHS";
|
56
|
+
Currency["GIP"] = "GIP";
|
57
|
+
Currency["GMD"] = "GMD";
|
58
|
+
Currency["GNF"] = "GNF";
|
59
|
+
Currency["GTQ"] = "GTQ";
|
60
|
+
Currency["GYD"] = "GYD";
|
61
|
+
Currency["HKD"] = "HKD";
|
62
|
+
Currency["HNL"] = "HNL";
|
63
|
+
Currency["HTG"] = "HTG";
|
64
|
+
Currency["HUF"] = "HUF";
|
65
|
+
Currency["IDR"] = "IDR";
|
66
|
+
Currency["ILS"] = "ILS";
|
67
|
+
Currency["INR"] = "INR";
|
68
|
+
Currency["IQD"] = "IQD";
|
69
|
+
Currency["IRR"] = "IRR";
|
70
|
+
Currency["ISK"] = "ISK";
|
71
|
+
Currency["JMD"] = "JMD";
|
72
|
+
Currency["JOD"] = "JOD";
|
73
|
+
Currency["JPY"] = "JPY";
|
74
|
+
Currency["KES"] = "KES";
|
75
|
+
Currency["KGS"] = "KGS";
|
76
|
+
Currency["KHR"] = "KHR";
|
77
|
+
Currency["KMF"] = "KMF";
|
78
|
+
Currency["KPW"] = "KPW";
|
79
|
+
Currency["KRW"] = "KRW";
|
80
|
+
Currency["KWD"] = "KWD";
|
81
|
+
Currency["KYD"] = "KYD";
|
82
|
+
Currency["KZT"] = "KZT";
|
83
|
+
Currency["LAK"] = "LAK";
|
84
|
+
Currency["LBP"] = "LBP";
|
85
|
+
Currency["LKR"] = "LKR";
|
86
|
+
Currency["LRD"] = "LRD";
|
87
|
+
Currency["LSL"] = "LSL";
|
88
|
+
Currency["LYD"] = "LYD";
|
89
|
+
Currency["MAD"] = "MAD";
|
90
|
+
Currency["MDL"] = "MDL";
|
91
|
+
Currency["MGA"] = "MGA";
|
92
|
+
Currency["MKD"] = "MKD";
|
93
|
+
Currency["MMK"] = "MMK";
|
94
|
+
Currency["MNT"] = "MNT";
|
95
|
+
Currency["MOP"] = "MOP";
|
96
|
+
Currency["MRU"] = "MRU";
|
97
|
+
Currency["MUR"] = "MUR";
|
98
|
+
Currency["MVR"] = "MVR";
|
99
|
+
Currency["MWK"] = "MWK";
|
100
|
+
Currency["MXN"] = "MXN";
|
101
|
+
Currency["MXV"] = "MXV";
|
102
|
+
Currency["MYR"] = "MYR";
|
103
|
+
Currency["MZN"] = "MZN";
|
104
|
+
Currency["NAD"] = "NAD";
|
105
|
+
Currency["NGN"] = "NGN";
|
106
|
+
Currency["NIO"] = "NIO";
|
107
|
+
Currency["NOK"] = "NOK";
|
108
|
+
Currency["NPR"] = "NPR";
|
109
|
+
Currency["NZD"] = "NZD";
|
110
|
+
Currency["OMR"] = "OMR";
|
111
|
+
Currency["PAB"] = "PAB";
|
112
|
+
Currency["PEN"] = "PEN";
|
113
|
+
Currency["PGK"] = "PGK";
|
114
|
+
Currency["PHP"] = "PHP";
|
115
|
+
Currency["PKR"] = "PKR";
|
116
|
+
Currency["PLN"] = "PLN";
|
117
|
+
Currency["PYG"] = "PYG";
|
118
|
+
Currency["QAR"] = "QAR";
|
119
|
+
Currency["RON"] = "RON";
|
120
|
+
Currency["RSD"] = "RSD";
|
121
|
+
Currency["RUB"] = "RUB";
|
122
|
+
Currency["RWF"] = "RWF";
|
123
|
+
Currency["SAR"] = "SAR";
|
124
|
+
Currency["SBD"] = "SBD";
|
125
|
+
Currency["SCR"] = "SCR";
|
126
|
+
Currency["SDG"] = "SDG";
|
127
|
+
Currency["SEK"] = "SEK";
|
128
|
+
Currency["SGD"] = "SGD";
|
129
|
+
Currency["SHP"] = "SHP";
|
130
|
+
Currency["SLE"] = "SLE";
|
131
|
+
Currency["SLL"] = "SLL";
|
132
|
+
Currency["SOS"] = "SOS";
|
133
|
+
Currency["SRD"] = "SRD";
|
134
|
+
Currency["SSP"] = "SSP";
|
135
|
+
Currency["STN"] = "STN";
|
136
|
+
Currency["SVC"] = "SVC";
|
137
|
+
Currency["SYP"] = "SYP";
|
138
|
+
Currency["SZL"] = "SZL";
|
139
|
+
Currency["THB"] = "THB";
|
140
|
+
Currency["TJS"] = "TJS";
|
141
|
+
Currency["TMT"] = "TMT";
|
142
|
+
Currency["TND"] = "TND";
|
143
|
+
Currency["TOP"] = "TOP";
|
144
|
+
Currency["TRY"] = "TRY";
|
145
|
+
Currency["TTD"] = "TTD";
|
146
|
+
Currency["TWD"] = "TWD";
|
147
|
+
Currency["TZS"] = "TZS";
|
148
|
+
Currency["UAH"] = "UAH";
|
149
|
+
Currency["UGX"] = "UGX";
|
150
|
+
Currency["USD"] = "USD";
|
151
|
+
Currency["USN"] = "USN";
|
152
|
+
Currency["UYI"] = "UYI";
|
153
|
+
Currency["UYU"] = "UYU";
|
154
|
+
Currency["UYW"] = "UYW";
|
155
|
+
Currency["UZS"] = "UZS";
|
156
|
+
Currency["VED"] = "VED";
|
157
|
+
Currency["VES"] = "VES";
|
158
|
+
Currency["VND"] = "VND";
|
159
|
+
Currency["VUV"] = "VUV";
|
160
|
+
Currency["WST"] = "WST";
|
161
|
+
Currency["XAF"] = "XAF";
|
162
|
+
Currency["XAG"] = "XAG";
|
163
|
+
Currency["XAU"] = "XAU";
|
164
|
+
Currency["XBA"] = "XBA";
|
165
|
+
Currency["XBB"] = "XBB";
|
166
|
+
Currency["XBC"] = "XBC";
|
167
|
+
Currency["XBD"] = "XBD";
|
168
|
+
Currency["XCD"] = "XCD";
|
169
|
+
Currency["XDR"] = "XDR";
|
170
|
+
Currency["XOF"] = "XOF";
|
171
|
+
Currency["XPD"] = "XPD";
|
172
|
+
Currency["XPF"] = "XPF";
|
173
|
+
Currency["XPT"] = "XPT";
|
174
|
+
Currency["XSU"] = "XSU";
|
175
|
+
Currency["XTS"] = "XTS";
|
176
|
+
Currency["XUA"] = "XUA";
|
177
|
+
Currency["XXX"] = "XXX";
|
178
|
+
Currency["YER"] = "YER";
|
179
|
+
Currency["ZAR"] = "ZAR";
|
180
|
+
Currency["ZMW"] = "ZMW";
|
181
|
+
Currency["ZWL"] = "ZWL";
|
182
|
+
})(Currency || (Currency = {}));
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Currency } from "./Currency";
|
2
|
+
export declare enum PaymentState {
|
3
|
+
created = "created",
|
4
|
+
succeeded = "succeeded",
|
5
|
+
failed = "failed",
|
6
|
+
processing = "processing",
|
7
|
+
expired = "expired"
|
8
|
+
}
|
9
|
+
export interface Payment {
|
10
|
+
readonly id: string;
|
11
|
+
readonly currency: Currency;
|
12
|
+
readonly amount: number;
|
13
|
+
readonly state: PaymentState;
|
14
|
+
description: string;
|
15
|
+
metadata?: Record<string, string | number | boolean>;
|
16
|
+
_links: {
|
17
|
+
[index: string]: {
|
18
|
+
href: string;
|
19
|
+
type: string;
|
20
|
+
};
|
21
|
+
};
|
22
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export var PaymentState;
|
2
|
+
(function (PaymentState) {
|
3
|
+
PaymentState["created"] = "created";
|
4
|
+
PaymentState["succeeded"] = "succeeded";
|
5
|
+
PaymentState["failed"] = "failed";
|
6
|
+
PaymentState["processing"] = "processing";
|
7
|
+
PaymentState["expired"] = "expired";
|
8
|
+
})(PaymentState || (PaymentState = {}));
|
package/package.json
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
{
|
2
|
+
"name": "@bankingserviceai/sdk",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"private": false,
|
5
|
+
"publishConfig": {
|
6
|
+
"access": "public"
|
7
|
+
},
|
8
|
+
"description": "",
|
9
|
+
"main": "dist/index.js",
|
10
|
+
"module": "dist/index.js",
|
11
|
+
"type": "module",
|
12
|
+
"scripts": {
|
13
|
+
"build": "tsc",
|
14
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
15
|
+
},
|
16
|
+
"files": [
|
17
|
+
"dist"
|
18
|
+
],
|
19
|
+
"author": "",
|
20
|
+
"license": "ISC",
|
21
|
+
"devDependencies": {
|
22
|
+
"@types/jsonwebtoken": "^9.0.6",
|
23
|
+
"typescript": "^5.4.5"
|
24
|
+
},
|
25
|
+
"dependencies": {
|
26
|
+
"jsonwebtoken": "^9.0.2",
|
27
|
+
"node-fetch": "^3.3.2"
|
28
|
+
}
|
29
|
+
}
|