@pax2pay/model-banking 0.1.645 → 0.1.646
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/Client/Accounts/index.ts +0 -6
- package/Client/Cards.ts +7 -13
- package/Client/index.ts +0 -3
- package/dist/cjs/Client/Accounts/index.d.ts +0 -4
- package/dist/cjs/Client/Accounts/index.js +0 -6
- package/dist/cjs/Client/Accounts/index.js.map +1 -1
- package/dist/cjs/Client/Cards.d.ts +4 -11
- package/dist/cjs/Client/Cards.js +0 -4
- package/dist/cjs/Client/Cards.js.map +1 -1
- package/dist/cjs/Client/index.d.ts +0 -2
- package/dist/cjs/Client/index.js +0 -3
- package/dist/cjs/Client/index.js.map +1 -1
- package/dist/cjs/pax2pay.d.ts +0 -1
- package/dist/cjs/pax2pay.js +1 -3
- package/dist/cjs/pax2pay.js.map +1 -1
- package/dist/mjs/Client/Accounts/index.d.ts +0 -4
- package/dist/mjs/Client/Accounts/index.js +0 -6
- package/dist/mjs/Client/Accounts/index.js.map +1 -1
- package/dist/mjs/Client/Cards.d.ts +4 -11
- package/dist/mjs/Client/Cards.js +0 -4
- package/dist/mjs/Client/Cards.js.map +1 -1
- package/dist/mjs/Client/index.d.ts +0 -2
- package/dist/mjs/Client/index.js +0 -3
- package/dist/mjs/Client/index.js.map +1 -1
- package/dist/mjs/pax2pay.d.ts +0 -1
- package/dist/mjs/pax2pay.js +0 -1
- package/dist/mjs/pax2pay.js.map +1 -1
- package/package.json +1 -1
- package/pax2pay.ts +0 -1
- package/Client/Accounts/Buffer.ts +0 -11
- package/Client/Accounts/Counterparts.ts +0 -13
- package/Client/Exchanges.ts +0 -11
- package/Exchange.ts +0 -19
- package/dist/cjs/Client/Accounts/Buffer.d.ts +0 -9
- package/dist/cjs/Client/Accounts/Buffer.js +0 -14
- package/dist/cjs/Client/Accounts/Buffer.js.map +0 -1
- package/dist/cjs/Client/Accounts/Counterparts.d.ts +0 -9
- package/dist/cjs/Client/Accounts/Counterparts.js +0 -17
- package/dist/cjs/Client/Accounts/Counterparts.js.map +0 -1
- package/dist/cjs/Client/Exchanges.d.ts +0 -9
- package/dist/cjs/Client/Exchanges.js +0 -14
- package/dist/cjs/Client/Exchanges.js.map +0 -1
- package/dist/cjs/Exchange.d.ts +0 -187
- package/dist/cjs/Exchange.js +0 -15
- package/dist/cjs/Exchange.js.map +0 -1
- package/dist/mjs/Client/Accounts/Buffer.d.ts +0 -9
- package/dist/mjs/Client/Accounts/Buffer.js +0 -10
- package/dist/mjs/Client/Accounts/Buffer.js.map +0 -1
- package/dist/mjs/Client/Accounts/Counterparts.d.ts +0 -9
- package/dist/mjs/Client/Accounts/Counterparts.js +0 -13
- package/dist/mjs/Client/Accounts/Counterparts.js.map +0 -1
- package/dist/mjs/Client/Exchanges.d.ts +0 -9
- package/dist/mjs/Client/Exchanges.js +0 -10
- package/dist/mjs/Client/Exchanges.js.map +0 -1
- package/dist/mjs/Exchange.d.ts +0 -187
- package/dist/mjs/Exchange.js +0 -12
- package/dist/mjs/Exchange.js.map +0 -1
package/Client/Accounts/index.ts
CHANGED
|
@@ -1,29 +1,23 @@
|
|
|
1
1
|
import { gracely } from "gracely"
|
|
2
2
|
import { http } from "cloudly-http"
|
|
3
3
|
import { Account } from "../../Account"
|
|
4
|
-
import { Buffer } from "./Buffer"
|
|
5
4
|
import { Charge } from "./Charge"
|
|
6
|
-
import { Counterparts } from "./Counterparts"
|
|
7
5
|
import { Details } from "./Details"
|
|
8
6
|
import { History } from "./History"
|
|
9
7
|
import { Rules } from "./Rules"
|
|
10
8
|
import { Status } from "./Status"
|
|
11
9
|
|
|
12
10
|
export class Accounts {
|
|
13
|
-
readonly buffer: Buffer
|
|
14
11
|
readonly charge: Charge
|
|
15
12
|
readonly details: Details
|
|
16
13
|
readonly rules: Rules
|
|
17
14
|
readonly status: Status
|
|
18
|
-
readonly counterparts: Counterparts
|
|
19
15
|
readonly history: History
|
|
20
16
|
constructor(private readonly client: http.Client) {
|
|
21
|
-
this.buffer = new Buffer(this.client)
|
|
22
17
|
this.charge = new Charge(this.client)
|
|
23
18
|
this.details = new Details(this.client)
|
|
24
19
|
this.rules = new Rules(this.client)
|
|
25
20
|
this.status = new Status(this.client)
|
|
26
|
-
this.counterparts = new Counterparts(this.client)
|
|
27
21
|
this.history = new History(this.client)
|
|
28
22
|
}
|
|
29
23
|
|
package/Client/Cards.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { gracely } from "gracely"
|
|
2
|
-
import { isoly } from "isoly"
|
|
3
2
|
import { http } from "cloudly-http"
|
|
4
3
|
import { Card } from "../Card"
|
|
5
4
|
|
|
@@ -7,27 +6,22 @@ export class Cards {
|
|
|
7
6
|
constructor(private readonly client: http.Client) {}
|
|
8
7
|
|
|
9
8
|
async fetch(card: string): Promise<Card | gracely.Error> {
|
|
10
|
-
// I mean it's supposed to return Card.Storable
|
|
11
9
|
return this.client.get<Card>(`/card/${card}`)
|
|
12
10
|
}
|
|
13
11
|
async create(card: Card.Creatable): Promise<Card | gracely.Error> {
|
|
14
12
|
return this.client.post<Card>("/card", card)
|
|
15
13
|
}
|
|
16
|
-
async list(options?: {
|
|
14
|
+
async list(options?: {
|
|
15
|
+
account?: string
|
|
16
|
+
organization?: string
|
|
17
|
+
scheme?: Card.Scheme
|
|
18
|
+
limit?: number
|
|
19
|
+
cursor?: string
|
|
20
|
+
}): Promise<(Card[] & { cursor?: string }) | gracely.Error> {
|
|
17
21
|
const search = options && "?" + http.Search.stringify(options)
|
|
18
22
|
return this.client.get<Card[] & { cursor?: string }>(`/card${search ? search : ""}`)
|
|
19
23
|
}
|
|
20
24
|
async update(id: string, card: Card.Changeable): Promise<Card | gracely.Error> {
|
|
21
25
|
return this.client.patch<Card>(`/card/${id}`, card)
|
|
22
26
|
}
|
|
23
|
-
async statistics(
|
|
24
|
-
scheme: Card.Scheme,
|
|
25
|
-
range: isoly.DateRange,
|
|
26
|
-
options?: { limit?: number; cursor?: string }
|
|
27
|
-
): Promise<{ new: number; old: number; withTransaction: number; cursor?: string } | gracely.Error> {
|
|
28
|
-
const queries = http.Search.stringify({ ...options, ...range })
|
|
29
|
-
return this.client.get<{ new: number; old: number; withTransaction: number; cursor?: string }>(
|
|
30
|
-
`/card/statistics/${scheme}?${queries}`
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
27
|
}
|
package/Client/index.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { http } from "cloudly-http"
|
|
|
3
3
|
import { Accounts } from "./Accounts"
|
|
4
4
|
import { Audit } from "./Audit"
|
|
5
5
|
import { Cards } from "./Cards"
|
|
6
|
-
import { Exchanges } from "./Exchanges"
|
|
7
6
|
import { Labels } from "./Labels"
|
|
8
7
|
import { Logs } from "./Logs"
|
|
9
8
|
import { MCCPolicies } from "./MCCPolicies"
|
|
@@ -24,7 +23,6 @@ export class Client {
|
|
|
24
23
|
readonly accounts: Accounts
|
|
25
24
|
readonly audits: Audit
|
|
26
25
|
readonly cards: Cards
|
|
27
|
-
readonly exchanges: Exchanges
|
|
28
26
|
readonly flags: Labels
|
|
29
27
|
readonly groups: Labels
|
|
30
28
|
readonly logs: Logs
|
|
@@ -57,7 +55,6 @@ export class Client {
|
|
|
57
55
|
this.accounts = new Accounts(this.client)
|
|
58
56
|
this.audits = new Audit(this.client)
|
|
59
57
|
this.cards = new Cards(this.client)
|
|
60
|
-
this.exchanges = new Exchanges(this.client)
|
|
61
58
|
this.flags = new Labels(this.client, "flag")
|
|
62
59
|
this.groups = new Labels(this.client, "group")
|
|
63
60
|
this.logs = new Logs(this.client)
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
2
|
import { http } from "cloudly-http";
|
|
3
3
|
import { Account } from "../../Account";
|
|
4
|
-
import { Buffer } from "./Buffer";
|
|
5
4
|
import { Charge } from "./Charge";
|
|
6
|
-
import { Counterparts } from "./Counterparts";
|
|
7
5
|
import { Details } from "./Details";
|
|
8
6
|
import { History } from "./History";
|
|
9
7
|
import { Rules } from "./Rules";
|
|
10
8
|
import { Status } from "./Status";
|
|
11
9
|
export declare class Accounts {
|
|
12
10
|
private readonly client;
|
|
13
|
-
readonly buffer: Buffer;
|
|
14
11
|
readonly charge: Charge;
|
|
15
12
|
readonly details: Details;
|
|
16
13
|
readonly rules: Rules;
|
|
17
14
|
readonly status: Status;
|
|
18
|
-
readonly counterparts: Counterparts;
|
|
19
15
|
readonly history: History;
|
|
20
16
|
constructor(client: http.Client);
|
|
21
17
|
create(account: Account.Creatable): Promise<Account | gracely.Error>;
|
|
@@ -1,30 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Accounts = void 0;
|
|
4
|
-
const Buffer_1 = require("./Buffer");
|
|
5
4
|
const Charge_1 = require("./Charge");
|
|
6
|
-
const Counterparts_1 = require("./Counterparts");
|
|
7
5
|
const Details_1 = require("./Details");
|
|
8
6
|
const History_1 = require("./History");
|
|
9
7
|
const Rules_1 = require("./Rules");
|
|
10
8
|
const Status_1 = require("./Status");
|
|
11
9
|
class Accounts {
|
|
12
10
|
client;
|
|
13
|
-
buffer;
|
|
14
11
|
charge;
|
|
15
12
|
details;
|
|
16
13
|
rules;
|
|
17
14
|
status;
|
|
18
|
-
counterparts;
|
|
19
15
|
history;
|
|
20
16
|
constructor(client) {
|
|
21
17
|
this.client = client;
|
|
22
|
-
this.buffer = new Buffer_1.Buffer(this.client);
|
|
23
18
|
this.charge = new Charge_1.Charge(this.client);
|
|
24
19
|
this.details = new Details_1.Details(this.client);
|
|
25
20
|
this.rules = new Rules_1.Rules(this.client);
|
|
26
21
|
this.status = new Status_1.Status(this.client);
|
|
27
|
-
this.counterparts = new Counterparts_1.Counterparts(this.client);
|
|
28
22
|
this.history = new History_1.History(this.client);
|
|
29
23
|
}
|
|
30
24
|
async create(account) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Accounts/index.ts"],"names":[],"mappings":";;;AAGA,qCAAiC;AACjC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Accounts/index.ts"],"names":[],"mappings":";;;AAGA,qCAAiC;AACjC,uCAAmC;AACnC,uCAAmC;AACnC,mCAA+B;AAC/B,qCAAiC;AAEjC,MAAa,QAAQ;IAMS;IALpB,MAAM,CAAQ;IACd,OAAO,CAAS;IAChB,KAAK,CAAO;IACZ,MAAM,CAAQ;IACd,OAAO,CAAS;IACzB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;QAC/C,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACrC,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACvC,IAAI,CAAC,KAAK,GAAG,IAAI,aAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnC,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACrC,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACxC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAA0B;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAU,UAAU,EAAE,OAAO,CAAC,CAAA;IACtD,CAAC;IACD,KAAK,CAAC,GAAG,CAAC,OAAe;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAU,YAAY,OAAO,EAAE,CAAC,CAAA;IACvD,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,OAIV;QACA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA8C,UAAU,EAAE,OAAO,CAAC,CAAA;IACzF,CAAC;CACD;AA3BD,4BA2BC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
|
-
import { isoly } from "isoly";
|
|
3
2
|
import { http } from "cloudly-http";
|
|
4
3
|
import { Card } from "../Card";
|
|
5
4
|
export declare class Cards {
|
|
@@ -8,19 +7,13 @@ export declare class Cards {
|
|
|
8
7
|
fetch(card: string): Promise<Card | gracely.Error>;
|
|
9
8
|
create(card: Card.Creatable): Promise<Card | gracely.Error>;
|
|
10
9
|
list(options?: {
|
|
11
|
-
|
|
10
|
+
account?: string;
|
|
11
|
+
organization?: string;
|
|
12
|
+
scheme?: Card.Scheme;
|
|
13
|
+
limit?: number;
|
|
12
14
|
cursor?: string;
|
|
13
15
|
}): Promise<(Card[] & {
|
|
14
16
|
cursor?: string;
|
|
15
17
|
}) | gracely.Error>;
|
|
16
18
|
update(id: string, card: Card.Changeable): Promise<Card | gracely.Error>;
|
|
17
|
-
statistics(scheme: Card.Scheme, range: isoly.DateRange, options?: {
|
|
18
|
-
limit?: number;
|
|
19
|
-
cursor?: string;
|
|
20
|
-
}): Promise<{
|
|
21
|
-
new: number;
|
|
22
|
-
old: number;
|
|
23
|
-
withTransaction: number;
|
|
24
|
-
cursor?: string;
|
|
25
|
-
} | gracely.Error>;
|
|
26
19
|
}
|
package/dist/cjs/Client/Cards.js
CHANGED
|
@@ -20,10 +20,6 @@ class Cards {
|
|
|
20
20
|
async update(id, card) {
|
|
21
21
|
return this.client.patch(`/card/${id}`, card);
|
|
22
22
|
}
|
|
23
|
-
async statistics(scheme, range, options) {
|
|
24
|
-
const queries = cloudly_http_1.http.Search.stringify({ ...options, ...range });
|
|
25
|
-
return this.client.get(`/card/statistics/${scheme}?${queries}`);
|
|
26
|
-
}
|
|
27
23
|
}
|
|
28
24
|
exports.Cards = Cards;
|
|
29
25
|
//# sourceMappingURL=Cards.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cards.js","sourceRoot":"","sources":["../../../Client/Cards.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Cards.js","sourceRoot":"","sources":["../../../Client/Cards.ts"],"names":[],"mappings":";;;AACA,+CAAmC;AAGnC,MAAa,KAAK;IACY;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD,KAAK,CAAC,KAAK,CAAC,IAAY;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAO,SAAS,IAAI,EAAE,CAAC,CAAA;IAC9C,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,IAAoB;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAO,OAAO,EAAE,IAAI,CAAC,CAAA;IAC7C,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,OAMV;QACA,MAAM,MAAM,GAAG,OAAO,IAAI,GAAG,GAAG,mBAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;QAC9D,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA+B,QAAQ,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IACrF,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,IAAqB;QAC7C,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAO,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,CAAA;IACpD,CAAC;CACD;AAtBD,sBAsBC"}
|
|
@@ -2,7 +2,6 @@ import { http } from "cloudly-http";
|
|
|
2
2
|
import { Accounts } from "./Accounts";
|
|
3
3
|
import { Audit } from "./Audit";
|
|
4
4
|
import { Cards } from "./Cards";
|
|
5
|
-
import { Exchanges } from "./Exchanges";
|
|
6
5
|
import { Labels } from "./Labels";
|
|
7
6
|
import { Logs } from "./Logs";
|
|
8
7
|
import { MCCPolicies } from "./MCCPolicies";
|
|
@@ -24,7 +23,6 @@ export declare class Client {
|
|
|
24
23
|
readonly accounts: Accounts;
|
|
25
24
|
readonly audits: Audit;
|
|
26
25
|
readonly cards: Cards;
|
|
27
|
-
readonly exchanges: Exchanges;
|
|
28
26
|
readonly flags: Labels;
|
|
29
27
|
readonly groups: Labels;
|
|
30
28
|
readonly logs: Logs;
|
package/dist/cjs/Client/index.js
CHANGED
|
@@ -5,7 +5,6 @@ const cloudly_http_1 = require("cloudly-http");
|
|
|
5
5
|
const Accounts_1 = require("./Accounts");
|
|
6
6
|
const Audit_1 = require("./Audit");
|
|
7
7
|
const Cards_1 = require("./Cards");
|
|
8
|
-
const Exchanges_1 = require("./Exchanges");
|
|
9
8
|
const Labels_1 = require("./Labels");
|
|
10
9
|
const Logs_1 = require("./Logs");
|
|
11
10
|
const MCCPolicies_1 = require("./MCCPolicies");
|
|
@@ -27,7 +26,6 @@ class Client {
|
|
|
27
26
|
accounts;
|
|
28
27
|
audits;
|
|
29
28
|
cards;
|
|
30
|
-
exchanges;
|
|
31
29
|
flags;
|
|
32
30
|
groups;
|
|
33
31
|
logs;
|
|
@@ -61,7 +59,6 @@ class Client {
|
|
|
61
59
|
this.accounts = new Accounts_1.Accounts(this.client);
|
|
62
60
|
this.audits = new Audit_1.Audit(this.client);
|
|
63
61
|
this.cards = new Cards_1.Cards(this.client);
|
|
64
|
-
this.exchanges = new Exchanges_1.Exchanges(this.client);
|
|
65
62
|
this.flags = new Labels_1.Labels(this.client, "flag");
|
|
66
63
|
this.groups = new Labels_1.Labels(this.client, "group");
|
|
67
64
|
this.logs = new Logs_1.Logs(this.client);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Client/index.ts"],"names":[],"mappings":";;;AACA,+CAAmC;AACnC,yCAAqC;AACrC,mCAA+B;AAC/B,mCAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Client/index.ts"],"names":[],"mappings":";;;AACA,+CAAmC;AACnC,yCAAqC;AACrC,mCAA+B;AAC/B,mCAA+B;AAC/B,qCAAiC;AACjC,iCAA6B;AAC7B,+CAA2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,MAAM,CAAA;IACd,CAAC;CACD;AAjFD,wBAiFC;AACD,WAAiB,MAAM;IACR,mBAAY,GAAG,2BAAkB,CAAA;AAChD,CAAC,EAFgB,MAAM,sBAAN,MAAM,QAEtB"}
|
package/dist/cjs/pax2pay.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export { Balance } from "./Balance";
|
|
|
9
9
|
export { Balances } from "./Balances";
|
|
10
10
|
export { Card } from "./Card";
|
|
11
11
|
export { Client } from "./Client";
|
|
12
|
-
export { Exchange } from "./Exchange";
|
|
13
12
|
export { fx } from "./fx";
|
|
14
13
|
export { Holidays } from "./Holidays";
|
|
15
14
|
export { Identifier } from "./Identifier";
|
package/dist/cjs/pax2pay.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zodHelper = exports.Quarter = exports.Warning = exports.User = exports.Treasury = exports.Transaction = exports.Supplier = exports.Settlement = exports.Rule = exports.reports = exports.Report = exports.Realm = exports.Rail = exports.Organization = exports.Operation = exports.Merchant = exports.MCCPolicy = exports.Log = exports.Label = exports.Identifier = exports.Holidays = exports.fx = exports.
|
|
3
|
+
exports.zodHelper = exports.Quarter = exports.Warning = exports.User = exports.Treasury = exports.Transaction = exports.Supplier = exports.Settlement = exports.Rule = exports.reports = exports.Report = exports.Realm = exports.Rail = exports.Organization = exports.Operation = exports.Merchant = exports.MCCPolicy = exports.Log = exports.Label = exports.Identifier = exports.Holidays = exports.fx = exports.Client = exports.Card = exports.Balances = exports.Balance = exports.Backup = exports.Authorization = exports.Audit = exports.Amounts = exports.Amount = exports.Acquirer = exports.Account = void 0;
|
|
4
4
|
var Account_1 = require("./Account");
|
|
5
5
|
Object.defineProperty(exports, "Account", { enumerable: true, get: function () { return Account_1.Account; } });
|
|
6
6
|
var Acquirer_1 = require("./Acquirer");
|
|
@@ -23,8 +23,6 @@ var Card_1 = require("./Card");
|
|
|
23
23
|
Object.defineProperty(exports, "Card", { enumerable: true, get: function () { return Card_1.Card; } });
|
|
24
24
|
var Client_1 = require("./Client");
|
|
25
25
|
Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return Client_1.Client; } });
|
|
26
|
-
var Exchange_1 = require("./Exchange");
|
|
27
|
-
Object.defineProperty(exports, "Exchange", { enumerable: true, get: function () { return Exchange_1.Exchange; } });
|
|
28
26
|
var fx_1 = require("./fx");
|
|
29
27
|
Object.defineProperty(exports, "fx", { enumerable: true, get: function () { return fx_1.fx; } });
|
|
30
28
|
var Holidays_1 = require("./Holidays");
|
package/dist/cjs/pax2pay.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pax2pay.js","sourceRoot":"","sources":["../../pax2pay.ts"],"names":[],"mappings":";;;AAAA,qCAAmC;AAA1B,kGAAA,OAAO,OAAA;AAChB,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA;AACjB,mCAAiC;AAAxB,gGAAA,MAAM,OAAA;AACf,qCAAmC;AAA1B,kGAAA,OAAO,OAAA;AAChB,iCAA+B;AAAtB,8FAAA,KAAK,OAAA;AACd,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,mCAAiC;AAAxB,gGAAA,MAAM,OAAA;AACf,qCAAmC;AAA1B,kGAAA,OAAO,OAAA;AAChB,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA;AACjB,+BAA6B;AAApB,4FAAA,IAAI,OAAA;AACb,mCAAiC;AAAxB,gGAAA,MAAM,OAAA;AACf,
|
|
1
|
+
{"version":3,"file":"pax2pay.js","sourceRoot":"","sources":["../../pax2pay.ts"],"names":[],"mappings":";;;AAAA,qCAAmC;AAA1B,kGAAA,OAAO,OAAA;AAChB,uCAAqC;AAA5B,oGAAA,QAAQ,OAAA;AACjB,mCAAiC;AAAxB,gGAAA,MAAM,OAAA;AACf,qCAAmC;AAA1B,kGAAA,OAAO,OAAA;AAChB,iCAA+B;AAAtB,8FAAA,KAAK,OAAA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{ Account } from "../../Account";
|
|
4
|
-
import { Buffer } from "./Buffer";
|
|
5
4
|
import { Charge } from "./Charge";
|
|
6
|
-
import { Counterparts } from "./Counterparts";
|
|
7
5
|
import { Details } from "./Details";
|
|
8
6
|
import { History } from "./History";
|
|
9
7
|
import { Rules } from "./Rules";
|
|
10
8
|
import { Status } from "./Status";
|
|
11
9
|
export declare class Accounts {
|
|
12
10
|
private readonly client;
|
|
13
|
-
readonly buffer: Buffer;
|
|
14
11
|
readonly charge: Charge;
|
|
15
12
|
readonly details: Details;
|
|
16
13
|
readonly rules: Rules;
|
|
17
14
|
readonly status: Status;
|
|
18
|
-
readonly counterparts: Counterparts;
|
|
19
15
|
readonly history: History;
|
|
20
16
|
constructor(client: http.Client);
|
|
21
17
|
create(account: Account.Creatable): Promise<Account | gracely.Error>;
|
|
@@ -1,27 +1,21 @@
|
|
|
1
|
-
import { Buffer } from "./Buffer";
|
|
2
1
|
import { Charge } from "./Charge";
|
|
3
|
-
import { Counterparts } from "./Counterparts";
|
|
4
2
|
import { Details } from "./Details";
|
|
5
3
|
import { History } from "./History";
|
|
6
4
|
import { Rules } from "./Rules";
|
|
7
5
|
import { Status } from "./Status";
|
|
8
6
|
export class Accounts {
|
|
9
7
|
client;
|
|
10
|
-
buffer;
|
|
11
8
|
charge;
|
|
12
9
|
details;
|
|
13
10
|
rules;
|
|
14
11
|
status;
|
|
15
|
-
counterparts;
|
|
16
12
|
history;
|
|
17
13
|
constructor(client) {
|
|
18
14
|
this.client = client;
|
|
19
|
-
this.buffer = new Buffer(this.client);
|
|
20
15
|
this.charge = new Charge(this.client);
|
|
21
16
|
this.details = new Details(this.client);
|
|
22
17
|
this.rules = new Rules(this.client);
|
|
23
18
|
this.status = new Status(this.client);
|
|
24
|
-
this.counterparts = new Counterparts(this.client);
|
|
25
19
|
this.history = new History(this.client);
|
|
26
20
|
}
|
|
27
21
|
async create(account) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Accounts/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Accounts/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,MAAM,OAAO,QAAQ;IAMS;IALpB,MAAM,CAAQ;IACd,OAAO,CAAS;IAChB,KAAK,CAAO;IACZ,MAAM,CAAQ;IACd,OAAO,CAAS;IACzB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;QAC/C,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACrC,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACvC,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnC,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACrC,IAAI,CAAC,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACxC,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAA0B;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAU,UAAU,EAAE,OAAO,CAAC,CAAA;IACtD,CAAC;IACD,KAAK,CAAC,GAAG,CAAC,OAAe;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAU,YAAY,OAAO,EAAE,CAAC,CAAA;IACvD,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,OAIV;QACA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA8C,UAAU,EAAE,OAAO,CAAC,CAAA;IACzF,CAAC;CACD"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
|
-
import { isoly } from "isoly";
|
|
3
2
|
import { http } from "cloudly-http";
|
|
4
3
|
import { Card } from "../Card";
|
|
5
4
|
export declare class Cards {
|
|
@@ -8,19 +7,13 @@ export declare class Cards {
|
|
|
8
7
|
fetch(card: string): Promise<Card | gracely.Error>;
|
|
9
8
|
create(card: Card.Creatable): Promise<Card | gracely.Error>;
|
|
10
9
|
list(options?: {
|
|
11
|
-
|
|
10
|
+
account?: string;
|
|
11
|
+
organization?: string;
|
|
12
|
+
scheme?: Card.Scheme;
|
|
13
|
+
limit?: number;
|
|
12
14
|
cursor?: string;
|
|
13
15
|
}): Promise<(Card[] & {
|
|
14
16
|
cursor?: string;
|
|
15
17
|
}) | gracely.Error>;
|
|
16
18
|
update(id: string, card: Card.Changeable): Promise<Card | gracely.Error>;
|
|
17
|
-
statistics(scheme: Card.Scheme, range: isoly.DateRange, options?: {
|
|
18
|
-
limit?: number;
|
|
19
|
-
cursor?: string;
|
|
20
|
-
}): Promise<{
|
|
21
|
-
new: number;
|
|
22
|
-
old: number;
|
|
23
|
-
withTransaction: number;
|
|
24
|
-
cursor?: string;
|
|
25
|
-
} | gracely.Error>;
|
|
26
19
|
}
|
package/dist/mjs/Client/Cards.js
CHANGED
|
@@ -17,9 +17,5 @@ export class Cards {
|
|
|
17
17
|
async update(id, card) {
|
|
18
18
|
return this.client.patch(`/card/${id}`, card);
|
|
19
19
|
}
|
|
20
|
-
async statistics(scheme, range, options) {
|
|
21
|
-
const queries = http.Search.stringify({ ...options, ...range });
|
|
22
|
-
return this.client.get(`/card/statistics/${scheme}?${queries}`);
|
|
23
|
-
}
|
|
24
20
|
}
|
|
25
21
|
//# sourceMappingURL=Cards.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cards.js","sourceRoot":"","sources":["../../../Client/Cards.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Cards.js","sourceRoot":"","sources":["../../../Client/Cards.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAGnC,MAAM,OAAO,KAAK;IACY;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD,KAAK,CAAC,KAAK,CAAC,IAAY;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAO,SAAS,IAAI,EAAE,CAAC,CAAA;IAC9C,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,IAAoB;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAO,OAAO,EAAE,IAAI,CAAC,CAAA;IAC7C,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,OAMV;QACA,MAAM,MAAM,GAAG,OAAO,IAAI,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAA;QAC9D,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAA+B,QAAQ,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IACrF,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,IAAqB;QAC7C,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAO,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,CAAA;IACpD,CAAC;CACD"}
|
|
@@ -2,7 +2,6 @@ import { http } from "cloudly-http";
|
|
|
2
2
|
import { Accounts } from "./Accounts";
|
|
3
3
|
import { Audit } from "./Audit";
|
|
4
4
|
import { Cards } from "./Cards";
|
|
5
|
-
import { Exchanges } from "./Exchanges";
|
|
6
5
|
import { Labels } from "./Labels";
|
|
7
6
|
import { Logs } from "./Logs";
|
|
8
7
|
import { MCCPolicies } from "./MCCPolicies";
|
|
@@ -24,7 +23,6 @@ export declare class Client {
|
|
|
24
23
|
readonly accounts: Accounts;
|
|
25
24
|
readonly audits: Audit;
|
|
26
25
|
readonly cards: Cards;
|
|
27
|
-
readonly exchanges: Exchanges;
|
|
28
26
|
readonly flags: Labels;
|
|
29
27
|
readonly groups: Labels;
|
|
30
28
|
readonly logs: Logs;
|
package/dist/mjs/Client/index.js
CHANGED
|
@@ -2,7 +2,6 @@ import { http } from "cloudly-http";
|
|
|
2
2
|
import { Accounts } from "./Accounts";
|
|
3
3
|
import { Audit } from "./Audit";
|
|
4
4
|
import { Cards } from "./Cards";
|
|
5
|
-
import { Exchanges } from "./Exchanges";
|
|
6
5
|
import { Labels } from "./Labels";
|
|
7
6
|
import { Logs } from "./Logs";
|
|
8
7
|
import { MCCPolicies } from "./MCCPolicies";
|
|
@@ -24,7 +23,6 @@ export class Client {
|
|
|
24
23
|
accounts;
|
|
25
24
|
audits;
|
|
26
25
|
cards;
|
|
27
|
-
exchanges;
|
|
28
26
|
flags;
|
|
29
27
|
groups;
|
|
30
28
|
logs;
|
|
@@ -58,7 +56,6 @@ export class Client {
|
|
|
58
56
|
this.accounts = new Accounts(this.client);
|
|
59
57
|
this.audits = new Audit(this.client);
|
|
60
58
|
this.cards = new Cards(this.client);
|
|
61
|
-
this.exchanges = new Exchanges(this.client);
|
|
62
59
|
this.flags = new Labels(this.client, "flag");
|
|
63
60
|
this.groups = new Labels(this.client, "group");
|
|
64
61
|
this.logs = new Logs(this.client);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Client/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,SAA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ACjB,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,IAAI,MAAM,CAAC,YAAY,CAAC;oBACvD,CAAC,CAAC,EAAE,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY,IAAI,MAAM,CAAC,YAAY,EAAE;oBACtE,CAAC,CAAC,EAAE,CAAC;aACN,CAAC;YACF,WAAW,EAAE,KAAK,EAAC,QAAQ,EAAC,EAAE;gBAC7B,IAAI,MAAM,GAAG,QAAQ,CAAA;gBACrB,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAA;gBAChC,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;oBACzB,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAC5B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE;wBACrC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;qBACtE,CAAC,CACF,CAAA;gBACF,CAAC;gBACD,OAAO,MAAM,CAAA;YACd,CAAC;SACD,CAAC,CAAA;QACF,MAAM,MAAM,GAAW,IAAI,MAAM,CAAC,UAAU,CAAC,CAAA;QAC7C,OAAO,MAAM,CAAA;IACd,CAAC;CACD;AACD,WAAiB,MAAM;IACR,mBAAY,GAAG,kBAAkB,CAAA;AAChD,CAAC,EAFgB,MAAM,KAAN,MAAM,QAEtB"}
|
package/dist/mjs/pax2pay.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export { Balance } from "./Balance";
|
|
|
9
9
|
export { Balances } from "./Balances";
|
|
10
10
|
export { Card } from "./Card";
|
|
11
11
|
export { Client } from "./Client";
|
|
12
|
-
export { Exchange } from "./Exchange";
|
|
13
12
|
export { fx } from "./fx";
|
|
14
13
|
export { Holidays } from "./Holidays";
|
|
15
14
|
export { Identifier } from "./Identifier";
|
package/dist/mjs/pax2pay.js
CHANGED
|
@@ -9,7 +9,6 @@ export { Balance } from "./Balance";
|
|
|
9
9
|
export { Balances } from "./Balances";
|
|
10
10
|
export { Card } from "./Card";
|
|
11
11
|
export { Client } from "./Client";
|
|
12
|
-
export { Exchange } from "./Exchange";
|
|
13
12
|
export { fx } from "./fx";
|
|
14
13
|
export { Holidays } from "./Holidays";
|
|
15
14
|
export { Identifier } from "./Identifier";
|
package/dist/mjs/pax2pay.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pax2pay.js","sourceRoot":"","sources":["../../pax2pay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"pax2pay.js","sourceRoot":"","sources":["../../pax2pay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC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AO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA"}
|
package/package.json
CHANGED
package/pax2pay.ts
CHANGED
|
@@ -9,7 +9,6 @@ export { Balance } from "./Balance"
|
|
|
9
9
|
export { Balances } from "./Balances"
|
|
10
10
|
export { Card } from "./Card"
|
|
11
11
|
export { Client } from "./Client"
|
|
12
|
-
export { Exchange } from "./Exchange"
|
|
13
12
|
export { fx } from "./fx"
|
|
14
13
|
export { Holidays } from "./Holidays"
|
|
15
14
|
export { Identifier } from "./Identifier"
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { gracely } from "gracely"
|
|
2
|
-
import { isoly } from "isoly"
|
|
3
|
-
import { http } from "cloudly-http"
|
|
4
|
-
import { Transaction } from "../../Transaction"
|
|
5
|
-
|
|
6
|
-
export class Buffer {
|
|
7
|
-
constructor(private readonly client: http.Client) {}
|
|
8
|
-
async replace(account: string, currency: isoly.Currency, amount: number): Promise<Transaction | gracely.Error> {
|
|
9
|
-
return this.client.put<Transaction>(`/account/${account}/balances/${currency}/buffer`, amount)
|
|
10
|
-
}
|
|
11
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { gracely } from "gracely"
|
|
2
|
-
import { http } from "cloudly-http"
|
|
3
|
-
import { Rail } from "../../Rail"
|
|
4
|
-
|
|
5
|
-
export class Counterparts {
|
|
6
|
-
constructor(private readonly client: http.Client) {}
|
|
7
|
-
async replace(account: string, code: string, address: Rail.Address): Promise<Rail.Address | gracely.Error> {
|
|
8
|
-
return this.client.put<Rail.Address>(`/account/${account}/counterpart/${code}`, address)
|
|
9
|
-
}
|
|
10
|
-
async remove(account: string, code: string): Promise<Rail.Address | gracely.Error> {
|
|
11
|
-
return this.client.delete<Rail.Address>(`/account/${account}/counterpart/${code}`)
|
|
12
|
-
}
|
|
13
|
-
}
|
package/Client/Exchanges.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { gracely } from "gracely"
|
|
2
|
-
import { isoly } from "isoly"
|
|
3
|
-
import { http } from "cloudly-http"
|
|
4
|
-
import { Exchange } from "../Exchange"
|
|
5
|
-
|
|
6
|
-
export class Exchanges {
|
|
7
|
-
constructor(private readonly client: http.Client) {}
|
|
8
|
-
async fetch(currency: isoly.Currency): Promise<Exchange.Rates | gracely.Error> {
|
|
9
|
-
return this.client.get<Exchange.Rates>(`/exchange?currencies=${currency}`)
|
|
10
|
-
}
|
|
11
|
-
}
|
package/Exchange.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { isoly } from "isoly"
|
|
2
|
-
import { isly } from "isly"
|
|
3
|
-
|
|
4
|
-
export namespace Exchange {
|
|
5
|
-
export type Rates = Partial<Record<isoly.Currency, Partial<Record<isoly.Currency, number>>>>
|
|
6
|
-
export const type = isly.record(
|
|
7
|
-
isly.fromIs("Currency", isoly.Currency.is),
|
|
8
|
-
isly.record(isly.fromIs("Currency", isoly.Currency.is), isly.number())
|
|
9
|
-
)
|
|
10
|
-
export function convert(
|
|
11
|
-
amount: number,
|
|
12
|
-
from: isoly.Currency,
|
|
13
|
-
to: isoly.Currency,
|
|
14
|
-
table: Exchange.Rates
|
|
15
|
-
): number | undefined {
|
|
16
|
-
const rate = table[to]?.[from]
|
|
17
|
-
return rate && isoly.Currency.divide(to, amount, rate)
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { gracely } from "gracely";
|
|
2
|
-
import { isoly } from "isoly";
|
|
3
|
-
import { http } from "cloudly-http";
|
|
4
|
-
import { Transaction } from "../../Transaction";
|
|
5
|
-
export declare class Buffer {
|
|
6
|
-
private readonly client;
|
|
7
|
-
constructor(client: http.Client);
|
|
8
|
-
replace(account: string, currency: isoly.Currency, amount: number): Promise<Transaction | gracely.Error>;
|
|
9
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Buffer = void 0;
|
|
4
|
-
class Buffer {
|
|
5
|
-
client;
|
|
6
|
-
constructor(client) {
|
|
7
|
-
this.client = client;
|
|
8
|
-
}
|
|
9
|
-
async replace(account, currency, amount) {
|
|
10
|
-
return this.client.put(`/account/${account}/balances/${currency}/buffer`, amount);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.Buffer = Buffer;
|
|
14
|
-
//# sourceMappingURL=Buffer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Buffer.js","sourceRoot":"","sources":["../../../../Client/Accounts/Buffer.ts"],"names":[],"mappings":";;;AAKA,MAAa,MAAM;IACW;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,OAAO,CAAC,OAAe,EAAE,QAAwB,EAAE,MAAc;QACtE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAc,YAAY,OAAO,aAAa,QAAQ,SAAS,EAAE,MAAM,CAAC,CAAA;IAC/F,CAAC;CACD;AALD,wBAKC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { gracely } from "gracely";
|
|
2
|
-
import { http } from "cloudly-http";
|
|
3
|
-
import { Rail } from "../../Rail";
|
|
4
|
-
export declare class Counterparts {
|
|
5
|
-
private readonly client;
|
|
6
|
-
constructor(client: http.Client);
|
|
7
|
-
replace(account: string, code: string, address: Rail.Address): Promise<Rail.Address | gracely.Error>;
|
|
8
|
-
remove(account: string, code: string): Promise<Rail.Address | gracely.Error>;
|
|
9
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Counterparts = void 0;
|
|
4
|
-
class Counterparts {
|
|
5
|
-
client;
|
|
6
|
-
constructor(client) {
|
|
7
|
-
this.client = client;
|
|
8
|
-
}
|
|
9
|
-
async replace(account, code, address) {
|
|
10
|
-
return this.client.put(`/account/${account}/counterpart/${code}`, address);
|
|
11
|
-
}
|
|
12
|
-
async remove(account, code) {
|
|
13
|
-
return this.client.delete(`/account/${account}/counterpart/${code}`);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.Counterparts = Counterparts;
|
|
17
|
-
//# sourceMappingURL=Counterparts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Counterparts.js","sourceRoot":"","sources":["../../../../Client/Accounts/Counterparts.ts"],"names":[],"mappings":";;;AAIA,MAAa,YAAY;IACK;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,OAAO,CAAC,OAAe,EAAE,IAAY,EAAE,OAAqB;QACjE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAe,YAAY,OAAO,gBAAgB,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACzF,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,IAAY;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAe,YAAY,OAAO,gBAAgB,IAAI,EAAE,CAAC,CAAA;IACnF,CAAC;CACD;AARD,oCAQC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { gracely } from "gracely";
|
|
2
|
-
import { isoly } from "isoly";
|
|
3
|
-
import { http } from "cloudly-http";
|
|
4
|
-
import { Exchange } from "../Exchange";
|
|
5
|
-
export declare class Exchanges {
|
|
6
|
-
private readonly client;
|
|
7
|
-
constructor(client: http.Client);
|
|
8
|
-
fetch(currency: isoly.Currency): Promise<Exchange.Rates | gracely.Error>;
|
|
9
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Exchanges = void 0;
|
|
4
|
-
class Exchanges {
|
|
5
|
-
client;
|
|
6
|
-
constructor(client) {
|
|
7
|
-
this.client = client;
|
|
8
|
-
}
|
|
9
|
-
async fetch(currency) {
|
|
10
|
-
return this.client.get(`/exchange?currencies=${currency}`);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.Exchanges = Exchanges;
|
|
14
|
-
//# sourceMappingURL=Exchanges.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Exchanges.js","sourceRoot":"","sources":["../../../Client/Exchanges.ts"],"names":[],"mappings":";;;AAKA,MAAa,SAAS;IACQ;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,KAAK,CAAC,QAAwB;QACnC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAiB,wBAAwB,QAAQ,EAAE,CAAC,CAAA;IAC3E,CAAC;CACD;AALD,8BAKC"}
|
package/dist/cjs/Exchange.d.ts
DELETED
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { isoly } from "isoly";
|
|
2
|
-
import { isly } from "isly";
|
|
3
|
-
export declare namespace Exchange {
|
|
4
|
-
type Rates = Partial<Record<isoly.Currency, Partial<Record<isoly.Currency, number>>>>;
|
|
5
|
-
const type: isly.Type<{
|
|
6
|
-
AED: any;
|
|
7
|
-
AFN: any;
|
|
8
|
-
ALL: any;
|
|
9
|
-
AMD: any;
|
|
10
|
-
ANG: any;
|
|
11
|
-
AOA: any;
|
|
12
|
-
ARS: any;
|
|
13
|
-
AUD: any;
|
|
14
|
-
AWG: any;
|
|
15
|
-
AZN: any;
|
|
16
|
-
BAM: any;
|
|
17
|
-
BBD: any;
|
|
18
|
-
BDT: any;
|
|
19
|
-
BGN: any;
|
|
20
|
-
BHD: any;
|
|
21
|
-
BIF: any;
|
|
22
|
-
BMD: any;
|
|
23
|
-
BND: any;
|
|
24
|
-
BOB: any;
|
|
25
|
-
BOV: any;
|
|
26
|
-
BRL: any;
|
|
27
|
-
BSD: any;
|
|
28
|
-
BTN: any;
|
|
29
|
-
BWP: any;
|
|
30
|
-
BYN: any;
|
|
31
|
-
BZD: any;
|
|
32
|
-
CAD: any;
|
|
33
|
-
CDF: any;
|
|
34
|
-
CHE: any;
|
|
35
|
-
CHF: any;
|
|
36
|
-
CHW: any;
|
|
37
|
-
CLF: any;
|
|
38
|
-
CLP: any;
|
|
39
|
-
CNY: any;
|
|
40
|
-
COP: any;
|
|
41
|
-
COU: any;
|
|
42
|
-
CRC: any;
|
|
43
|
-
CUC: any;
|
|
44
|
-
CUP: any;
|
|
45
|
-
CVE: any;
|
|
46
|
-
CZK: any;
|
|
47
|
-
DJF: any;
|
|
48
|
-
DKK: any;
|
|
49
|
-
DOP: any;
|
|
50
|
-
DZD: any;
|
|
51
|
-
EGP: any;
|
|
52
|
-
ERN: any;
|
|
53
|
-
ETB: any;
|
|
54
|
-
EUR: any;
|
|
55
|
-
FJD: any;
|
|
56
|
-
FKP: any;
|
|
57
|
-
GBP: any;
|
|
58
|
-
GEL: any;
|
|
59
|
-
GHS: any;
|
|
60
|
-
GIP: any;
|
|
61
|
-
GMD: any;
|
|
62
|
-
GNF: any;
|
|
63
|
-
GTQ: any;
|
|
64
|
-
GYD: any;
|
|
65
|
-
HKD: any;
|
|
66
|
-
HNL: any;
|
|
67
|
-
HRK: any;
|
|
68
|
-
HTG: any;
|
|
69
|
-
HUF: any;
|
|
70
|
-
IDR: any;
|
|
71
|
-
ILS: any;
|
|
72
|
-
INR: any;
|
|
73
|
-
IQD: any;
|
|
74
|
-
IRR: any;
|
|
75
|
-
ISK: any;
|
|
76
|
-
JMD: any;
|
|
77
|
-
JOD: any;
|
|
78
|
-
JPY: any;
|
|
79
|
-
KES: any;
|
|
80
|
-
KGS: any;
|
|
81
|
-
KHR: any;
|
|
82
|
-
KMF: any;
|
|
83
|
-
KPW: any;
|
|
84
|
-
KRW: any;
|
|
85
|
-
KWD: any;
|
|
86
|
-
KYD: any;
|
|
87
|
-
KZT: any;
|
|
88
|
-
LAK: any;
|
|
89
|
-
LBP: any;
|
|
90
|
-
LKR: any;
|
|
91
|
-
LRD: any;
|
|
92
|
-
LSL: any;
|
|
93
|
-
LYD: any;
|
|
94
|
-
MAD: any;
|
|
95
|
-
MDL: any;
|
|
96
|
-
MGA: any;
|
|
97
|
-
MKD: any;
|
|
98
|
-
MMK: any;
|
|
99
|
-
MNT: any;
|
|
100
|
-
MOP: any;
|
|
101
|
-
MRU: any;
|
|
102
|
-
MUR: any;
|
|
103
|
-
MVR: any;
|
|
104
|
-
MWK: any;
|
|
105
|
-
MXN: any;
|
|
106
|
-
MXV: any;
|
|
107
|
-
MYR: any;
|
|
108
|
-
MZN: any;
|
|
109
|
-
NAD: any;
|
|
110
|
-
NGN: any;
|
|
111
|
-
NIO: any;
|
|
112
|
-
NOK: any;
|
|
113
|
-
NPR: any;
|
|
114
|
-
NZD: any;
|
|
115
|
-
OMR: any;
|
|
116
|
-
PAB: any;
|
|
117
|
-
PEN: any;
|
|
118
|
-
PGK: any;
|
|
119
|
-
PHP: any;
|
|
120
|
-
PKR: any;
|
|
121
|
-
PLN: any;
|
|
122
|
-
PYG: any;
|
|
123
|
-
QAR: any;
|
|
124
|
-
RON: any;
|
|
125
|
-
RSD: any;
|
|
126
|
-
RUB: any;
|
|
127
|
-
RWF: any;
|
|
128
|
-
SAR: any;
|
|
129
|
-
SBD: any;
|
|
130
|
-
SCR: any;
|
|
131
|
-
SDG: any;
|
|
132
|
-
SEK: any;
|
|
133
|
-
SGD: any;
|
|
134
|
-
SHP: any;
|
|
135
|
-
SLL: any;
|
|
136
|
-
SOS: any;
|
|
137
|
-
SRD: any;
|
|
138
|
-
SSP: any;
|
|
139
|
-
STN: any;
|
|
140
|
-
SVC: any;
|
|
141
|
-
SYP: any;
|
|
142
|
-
SZL: any;
|
|
143
|
-
THB: any;
|
|
144
|
-
TJS: any;
|
|
145
|
-
TMT: any;
|
|
146
|
-
TND: any;
|
|
147
|
-
TOP: any;
|
|
148
|
-
TRY: any;
|
|
149
|
-
TTD: any;
|
|
150
|
-
TWD: any;
|
|
151
|
-
TZS: any;
|
|
152
|
-
UAH: any;
|
|
153
|
-
UGX: any;
|
|
154
|
-
USD: any;
|
|
155
|
-
USN: any;
|
|
156
|
-
UYI: any;
|
|
157
|
-
UYU: any;
|
|
158
|
-
UYW: any;
|
|
159
|
-
UZS: any;
|
|
160
|
-
VES: any;
|
|
161
|
-
VND: any;
|
|
162
|
-
VUV: any;
|
|
163
|
-
WST: any;
|
|
164
|
-
XAF: any;
|
|
165
|
-
XAG: any;
|
|
166
|
-
XAU: any;
|
|
167
|
-
XBA: any;
|
|
168
|
-
XBB: any;
|
|
169
|
-
XBC: any;
|
|
170
|
-
XBD: any;
|
|
171
|
-
XCD: any;
|
|
172
|
-
XDR: any;
|
|
173
|
-
XOF: any;
|
|
174
|
-
XPD: any;
|
|
175
|
-
XPF: any;
|
|
176
|
-
XPT: any;
|
|
177
|
-
XSU: any;
|
|
178
|
-
XTS: any;
|
|
179
|
-
XUA: any;
|
|
180
|
-
XXX: any;
|
|
181
|
-
YER: any;
|
|
182
|
-
ZAR: any;
|
|
183
|
-
ZMW: any;
|
|
184
|
-
ZWL: any;
|
|
185
|
-
}>;
|
|
186
|
-
function convert(amount: number, from: isoly.Currency, to: isoly.Currency, table: Exchange.Rates): number | undefined;
|
|
187
|
-
}
|
package/dist/cjs/Exchange.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Exchange = void 0;
|
|
4
|
-
const isoly_1 = require("isoly");
|
|
5
|
-
const isly_1 = require("isly");
|
|
6
|
-
var Exchange;
|
|
7
|
-
(function (Exchange) {
|
|
8
|
-
Exchange.type = isly_1.isly.record(isly_1.isly.fromIs("Currency", isoly_1.isoly.Currency.is), isly_1.isly.record(isly_1.isly.fromIs("Currency", isoly_1.isoly.Currency.is), isly_1.isly.number()));
|
|
9
|
-
function convert(amount, from, to, table) {
|
|
10
|
-
const rate = table[to]?.[from];
|
|
11
|
-
return rate && isoly_1.isoly.Currency.divide(to, amount, rate);
|
|
12
|
-
}
|
|
13
|
-
Exchange.convert = convert;
|
|
14
|
-
})(Exchange || (exports.Exchange = Exchange = {}));
|
|
15
|
-
//# sourceMappingURL=Exchange.js.map
|
package/dist/cjs/Exchange.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Exchange.js","sourceRoot":"","sources":["../../Exchange.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAE3B,IAAiB,QAAQ,CAexB;AAfD,WAAiB,QAAQ;IAEX,aAAI,GAAG,WAAI,CAAC,MAAM,CAC9B,WAAI,CAAC,MAAM,CAAC,UAAU,EAAE,aAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,EAC1C,WAAI,CAAC,MAAM,CAAC,WAAI,CAAC,MAAM,CAAC,UAAU,EAAE,aAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,CACtE,CAAA;IACD,SAAgB,OAAO,CACtB,MAAc,EACd,IAAoB,EACpB,EAAkB,EAClB,KAAqB;QAErB,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;QAC9B,OAAO,IAAI,IAAI,aAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;IACvD,CAAC;IARe,gBAAO,UAQtB,CAAA;AACF,CAAC,EAfgB,QAAQ,wBAAR,QAAQ,QAexB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { gracely } from "gracely";
|
|
2
|
-
import { isoly } from "isoly";
|
|
3
|
-
import { http } from "cloudly-http";
|
|
4
|
-
import { Transaction } from "../../Transaction";
|
|
5
|
-
export declare class Buffer {
|
|
6
|
-
private readonly client;
|
|
7
|
-
constructor(client: http.Client);
|
|
8
|
-
replace(account: string, currency: isoly.Currency, amount: number): Promise<Transaction | gracely.Error>;
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Buffer.js","sourceRoot":"","sources":["../../../../Client/Accounts/Buffer.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,MAAM;IACW;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,OAAO,CAAC,OAAe,EAAE,QAAwB,EAAE,MAAc;QACtE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAc,YAAY,OAAO,aAAa,QAAQ,SAAS,EAAE,MAAM,CAAC,CAAA;IAC/F,CAAC;CACD"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { gracely } from "gracely";
|
|
2
|
-
import { http } from "cloudly-http";
|
|
3
|
-
import { Rail } from "../../Rail";
|
|
4
|
-
export declare class Counterparts {
|
|
5
|
-
private readonly client;
|
|
6
|
-
constructor(client: http.Client);
|
|
7
|
-
replace(account: string, code: string, address: Rail.Address): Promise<Rail.Address | gracely.Error>;
|
|
8
|
-
remove(account: string, code: string): Promise<Rail.Address | gracely.Error>;
|
|
9
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export class Counterparts {
|
|
2
|
-
client;
|
|
3
|
-
constructor(client) {
|
|
4
|
-
this.client = client;
|
|
5
|
-
}
|
|
6
|
-
async replace(account, code, address) {
|
|
7
|
-
return this.client.put(`/account/${account}/counterpart/${code}`, address);
|
|
8
|
-
}
|
|
9
|
-
async remove(account, code) {
|
|
10
|
-
return this.client.delete(`/account/${account}/counterpart/${code}`);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=Counterparts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Counterparts.js","sourceRoot":"","sources":["../../../../Client/Accounts/Counterparts.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,YAAY;IACK;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,OAAO,CAAC,OAAe,EAAE,IAAY,EAAE,OAAqB;QACjE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAe,YAAY,OAAO,gBAAgB,IAAI,EAAE,EAAE,OAAO,CAAC,CAAA;IACzF,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,IAAY;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAe,YAAY,OAAO,gBAAgB,IAAI,EAAE,CAAC,CAAA;IACnF,CAAC;CACD"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { gracely } from "gracely";
|
|
2
|
-
import { isoly } from "isoly";
|
|
3
|
-
import { http } from "cloudly-http";
|
|
4
|
-
import { Exchange } from "../Exchange";
|
|
5
|
-
export declare class Exchanges {
|
|
6
|
-
private readonly client;
|
|
7
|
-
constructor(client: http.Client);
|
|
8
|
-
fetch(currency: isoly.Currency): Promise<Exchange.Rates | gracely.Error>;
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Exchanges.js","sourceRoot":"","sources":["../../../Client/Exchanges.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,SAAS;IACQ;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,KAAK,CAAC,QAAwB;QACnC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAiB,wBAAwB,QAAQ,EAAE,CAAC,CAAA;IAC3E,CAAC;CACD"}
|
package/dist/mjs/Exchange.d.ts
DELETED
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { isoly } from "isoly";
|
|
2
|
-
import { isly } from "isly";
|
|
3
|
-
export declare namespace Exchange {
|
|
4
|
-
type Rates = Partial<Record<isoly.Currency, Partial<Record<isoly.Currency, number>>>>;
|
|
5
|
-
const type: isly.Type<{
|
|
6
|
-
AED: any;
|
|
7
|
-
AFN: any;
|
|
8
|
-
ALL: any;
|
|
9
|
-
AMD: any;
|
|
10
|
-
ANG: any;
|
|
11
|
-
AOA: any;
|
|
12
|
-
ARS: any;
|
|
13
|
-
AUD: any;
|
|
14
|
-
AWG: any;
|
|
15
|
-
AZN: any;
|
|
16
|
-
BAM: any;
|
|
17
|
-
BBD: any;
|
|
18
|
-
BDT: any;
|
|
19
|
-
BGN: any;
|
|
20
|
-
BHD: any;
|
|
21
|
-
BIF: any;
|
|
22
|
-
BMD: any;
|
|
23
|
-
BND: any;
|
|
24
|
-
BOB: any;
|
|
25
|
-
BOV: any;
|
|
26
|
-
BRL: any;
|
|
27
|
-
BSD: any;
|
|
28
|
-
BTN: any;
|
|
29
|
-
BWP: any;
|
|
30
|
-
BYN: any;
|
|
31
|
-
BZD: any;
|
|
32
|
-
CAD: any;
|
|
33
|
-
CDF: any;
|
|
34
|
-
CHE: any;
|
|
35
|
-
CHF: any;
|
|
36
|
-
CHW: any;
|
|
37
|
-
CLF: any;
|
|
38
|
-
CLP: any;
|
|
39
|
-
CNY: any;
|
|
40
|
-
COP: any;
|
|
41
|
-
COU: any;
|
|
42
|
-
CRC: any;
|
|
43
|
-
CUC: any;
|
|
44
|
-
CUP: any;
|
|
45
|
-
CVE: any;
|
|
46
|
-
CZK: any;
|
|
47
|
-
DJF: any;
|
|
48
|
-
DKK: any;
|
|
49
|
-
DOP: any;
|
|
50
|
-
DZD: any;
|
|
51
|
-
EGP: any;
|
|
52
|
-
ERN: any;
|
|
53
|
-
ETB: any;
|
|
54
|
-
EUR: any;
|
|
55
|
-
FJD: any;
|
|
56
|
-
FKP: any;
|
|
57
|
-
GBP: any;
|
|
58
|
-
GEL: any;
|
|
59
|
-
GHS: any;
|
|
60
|
-
GIP: any;
|
|
61
|
-
GMD: any;
|
|
62
|
-
GNF: any;
|
|
63
|
-
GTQ: any;
|
|
64
|
-
GYD: any;
|
|
65
|
-
HKD: any;
|
|
66
|
-
HNL: any;
|
|
67
|
-
HRK: any;
|
|
68
|
-
HTG: any;
|
|
69
|
-
HUF: any;
|
|
70
|
-
IDR: any;
|
|
71
|
-
ILS: any;
|
|
72
|
-
INR: any;
|
|
73
|
-
IQD: any;
|
|
74
|
-
IRR: any;
|
|
75
|
-
ISK: any;
|
|
76
|
-
JMD: any;
|
|
77
|
-
JOD: any;
|
|
78
|
-
JPY: any;
|
|
79
|
-
KES: any;
|
|
80
|
-
KGS: any;
|
|
81
|
-
KHR: any;
|
|
82
|
-
KMF: any;
|
|
83
|
-
KPW: any;
|
|
84
|
-
KRW: any;
|
|
85
|
-
KWD: any;
|
|
86
|
-
KYD: any;
|
|
87
|
-
KZT: any;
|
|
88
|
-
LAK: any;
|
|
89
|
-
LBP: any;
|
|
90
|
-
LKR: any;
|
|
91
|
-
LRD: any;
|
|
92
|
-
LSL: any;
|
|
93
|
-
LYD: any;
|
|
94
|
-
MAD: any;
|
|
95
|
-
MDL: any;
|
|
96
|
-
MGA: any;
|
|
97
|
-
MKD: any;
|
|
98
|
-
MMK: any;
|
|
99
|
-
MNT: any;
|
|
100
|
-
MOP: any;
|
|
101
|
-
MRU: any;
|
|
102
|
-
MUR: any;
|
|
103
|
-
MVR: any;
|
|
104
|
-
MWK: any;
|
|
105
|
-
MXN: any;
|
|
106
|
-
MXV: any;
|
|
107
|
-
MYR: any;
|
|
108
|
-
MZN: any;
|
|
109
|
-
NAD: any;
|
|
110
|
-
NGN: any;
|
|
111
|
-
NIO: any;
|
|
112
|
-
NOK: any;
|
|
113
|
-
NPR: any;
|
|
114
|
-
NZD: any;
|
|
115
|
-
OMR: any;
|
|
116
|
-
PAB: any;
|
|
117
|
-
PEN: any;
|
|
118
|
-
PGK: any;
|
|
119
|
-
PHP: any;
|
|
120
|
-
PKR: any;
|
|
121
|
-
PLN: any;
|
|
122
|
-
PYG: any;
|
|
123
|
-
QAR: any;
|
|
124
|
-
RON: any;
|
|
125
|
-
RSD: any;
|
|
126
|
-
RUB: any;
|
|
127
|
-
RWF: any;
|
|
128
|
-
SAR: any;
|
|
129
|
-
SBD: any;
|
|
130
|
-
SCR: any;
|
|
131
|
-
SDG: any;
|
|
132
|
-
SEK: any;
|
|
133
|
-
SGD: any;
|
|
134
|
-
SHP: any;
|
|
135
|
-
SLL: any;
|
|
136
|
-
SOS: any;
|
|
137
|
-
SRD: any;
|
|
138
|
-
SSP: any;
|
|
139
|
-
STN: any;
|
|
140
|
-
SVC: any;
|
|
141
|
-
SYP: any;
|
|
142
|
-
SZL: any;
|
|
143
|
-
THB: any;
|
|
144
|
-
TJS: any;
|
|
145
|
-
TMT: any;
|
|
146
|
-
TND: any;
|
|
147
|
-
TOP: any;
|
|
148
|
-
TRY: any;
|
|
149
|
-
TTD: any;
|
|
150
|
-
TWD: any;
|
|
151
|
-
TZS: any;
|
|
152
|
-
UAH: any;
|
|
153
|
-
UGX: any;
|
|
154
|
-
USD: any;
|
|
155
|
-
USN: any;
|
|
156
|
-
UYI: any;
|
|
157
|
-
UYU: any;
|
|
158
|
-
UYW: any;
|
|
159
|
-
UZS: any;
|
|
160
|
-
VES: any;
|
|
161
|
-
VND: any;
|
|
162
|
-
VUV: any;
|
|
163
|
-
WST: any;
|
|
164
|
-
XAF: any;
|
|
165
|
-
XAG: any;
|
|
166
|
-
XAU: any;
|
|
167
|
-
XBA: any;
|
|
168
|
-
XBB: any;
|
|
169
|
-
XBC: any;
|
|
170
|
-
XBD: any;
|
|
171
|
-
XCD: any;
|
|
172
|
-
XDR: any;
|
|
173
|
-
XOF: any;
|
|
174
|
-
XPD: any;
|
|
175
|
-
XPF: any;
|
|
176
|
-
XPT: any;
|
|
177
|
-
XSU: any;
|
|
178
|
-
XTS: any;
|
|
179
|
-
XUA: any;
|
|
180
|
-
XXX: any;
|
|
181
|
-
YER: any;
|
|
182
|
-
ZAR: any;
|
|
183
|
-
ZMW: any;
|
|
184
|
-
ZWL: any;
|
|
185
|
-
}>;
|
|
186
|
-
function convert(amount: number, from: isoly.Currency, to: isoly.Currency, table: Exchange.Rates): number | undefined;
|
|
187
|
-
}
|
package/dist/mjs/Exchange.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { isoly } from "isoly";
|
|
2
|
-
import { isly } from "isly";
|
|
3
|
-
export var Exchange;
|
|
4
|
-
(function (Exchange) {
|
|
5
|
-
Exchange.type = isly.record(isly.fromIs("Currency", isoly.Currency.is), isly.record(isly.fromIs("Currency", isoly.Currency.is), isly.number()));
|
|
6
|
-
function convert(amount, from, to, table) {
|
|
7
|
-
const rate = table[to]?.[from];
|
|
8
|
-
return rate && isoly.Currency.divide(to, amount, rate);
|
|
9
|
-
}
|
|
10
|
-
Exchange.convert = convert;
|
|
11
|
-
})(Exchange || (Exchange = {}));
|
|
12
|
-
//# sourceMappingURL=Exchange.js.map
|
package/dist/mjs/Exchange.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Exchange.js","sourceRoot":"","sources":["../../Exchange.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,MAAM,KAAW,QAAQ,CAexB;AAfD,WAAiB,QAAQ;IAEX,aAAI,GAAG,IAAI,CAAC,MAAM,CAC9B,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,EAC1C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CACtE,CAAA;IACD,SAAgB,OAAO,CACtB,MAAc,EACd,IAAoB,EACpB,EAAkB,EAClB,KAAqB;QAErB,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;QAC9B,OAAO,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;IACvD,CAAC;IARe,gBAAO,UAQtB,CAAA;AACF,CAAC,EAfgB,QAAQ,KAAR,QAAQ,QAexB"}
|