@pax2pay/client 0.0.103 → 0.0.104
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/Configuration/index.ts +14 -0
- package/Client/index.ts +3 -0
- package/dist/Client/Configuration/index.d.ts +11 -0
- package/dist/Client/Configuration/index.js +14 -0
- package/dist/Client/Configuration/index.js.map +1 -0
- package/dist/Client/index.d.ts +3 -0
- package/dist/Client/index.js +2 -0
- package/dist/Client/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Currency } from "isoly"
|
|
2
|
+
import { Connection } from "../Connection"
|
|
3
|
+
|
|
4
|
+
export class Configuration {
|
|
5
|
+
protected folder = "config"
|
|
6
|
+
constructor(private readonly connection: Connection) {}
|
|
7
|
+
static create(connection: Connection) {
|
|
8
|
+
return new Configuration(connection)
|
|
9
|
+
}
|
|
10
|
+
async getAvailableCurrency() {
|
|
11
|
+
const result = await this.connection.get<Currency[]>(`config/currencies`)
|
|
12
|
+
return result
|
|
13
|
+
}
|
|
14
|
+
}
|
package/Client/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { Beneficiaries as ClientBeneficiaries } from "./Beneficiaries"
|
|
|
5
5
|
import { Card as ClientCard } from "./Card"
|
|
6
6
|
import { Cards as ClientCards } from "./Cards"
|
|
7
7
|
import { Collection as ClientCollection } from "./Collection"
|
|
8
|
+
import { Configuration as ClientConfiguration } from "./Configuration"
|
|
8
9
|
import { Connection } from "./Connection"
|
|
9
10
|
import { List as ClientList } from "./List"
|
|
10
11
|
import { Organisation as ClientOrganisation } from "./Organisation"
|
|
@@ -25,6 +26,7 @@ export class Client {
|
|
|
25
26
|
auth = ClientAuth.create(this.connection)
|
|
26
27
|
beneficiaries = ClientBeneficiaries.create(this.connection)
|
|
27
28
|
cards = ClientCards.create(this.connection)
|
|
29
|
+
configuration = ClientConfiguration.create(this.connection)
|
|
28
30
|
users = ClientUsers.create(this.connection)
|
|
29
31
|
organisations = ClientOrganisations.create(this.connection)
|
|
30
32
|
reports = ClientReports.create(this.connection)
|
|
@@ -45,6 +47,7 @@ export namespace Client {
|
|
|
45
47
|
export type Beneficiaries = ClientBeneficiaries
|
|
46
48
|
export type Card = ClientCard
|
|
47
49
|
export type Cards = ClientCards
|
|
50
|
+
export type Configuration = ClientConfiguration
|
|
48
51
|
export type Organisation = ClientOrganisation
|
|
49
52
|
export type Organisations = ClientOrganisations
|
|
50
53
|
export type Reports = ClientReports
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Currency } from "isoly";
|
|
2
|
+
import { Connection } from "../Connection";
|
|
3
|
+
export declare class Configuration {
|
|
4
|
+
private readonly connection;
|
|
5
|
+
protected folder: string;
|
|
6
|
+
constructor(connection: Connection);
|
|
7
|
+
static create(connection: Connection): Configuration;
|
|
8
|
+
getAvailableCurrency(): Promise<Currency[] | (import("../..").ErrorResponse & {
|
|
9
|
+
status: 400 | 404 | 500 | 403 | 503;
|
|
10
|
+
})>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class Configuration {
|
|
2
|
+
constructor(connection) {
|
|
3
|
+
this.connection = connection;
|
|
4
|
+
this.folder = "config";
|
|
5
|
+
}
|
|
6
|
+
static create(connection) {
|
|
7
|
+
return new Configuration(connection);
|
|
8
|
+
}
|
|
9
|
+
async getAvailableCurrency() {
|
|
10
|
+
const result = await this.connection.get(`config/currencies`);
|
|
11
|
+
return result;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Configuration/index.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,aAAa;IAEzB,YAA6B,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;QADzC,WAAM,GAAG,QAAQ,CAAA;IAC2B,CAAC;IACvD,MAAM,CAAC,MAAM,CAAC,UAAsB;QACnC,OAAO,IAAI,aAAa,CAAC,UAAU,CAAC,CAAA;IACrC,CAAC;IACD,KAAK,CAAC,oBAAoB;QACzB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAa,mBAAmB,CAAC,CAAA;QACzE,OAAO,MAAM,CAAA;IACd,CAAC;CACD"}
|
package/dist/Client/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { Beneficiaries as ClientBeneficiaries } from "./Beneficiaries";
|
|
|
5
5
|
import { Card as ClientCard } from "./Card";
|
|
6
6
|
import { Cards as ClientCards } from "./Cards";
|
|
7
7
|
import { Collection as ClientCollection } from "./Collection";
|
|
8
|
+
import { Configuration as ClientConfiguration } from "./Configuration";
|
|
8
9
|
import { Connection } from "./Connection";
|
|
9
10
|
import { List as ClientList } from "./List";
|
|
10
11
|
import { Organisation as ClientOrganisation } from "./Organisation";
|
|
@@ -23,6 +24,7 @@ export declare class Client {
|
|
|
23
24
|
auth: ClientAuth;
|
|
24
25
|
beneficiaries: ClientBeneficiaries;
|
|
25
26
|
cards: ClientCards;
|
|
27
|
+
configuration: ClientConfiguration;
|
|
26
28
|
users: ClientUsers;
|
|
27
29
|
organisations: ClientOrganisations;
|
|
28
30
|
reports: ClientReports;
|
|
@@ -37,6 +39,7 @@ export declare namespace Client {
|
|
|
37
39
|
type Beneficiaries = ClientBeneficiaries;
|
|
38
40
|
type Card = ClientCard;
|
|
39
41
|
type Cards = ClientCards;
|
|
42
|
+
type Configuration = ClientConfiguration;
|
|
40
43
|
type Organisation = ClientOrganisation;
|
|
41
44
|
type Organisations = ClientOrganisations;
|
|
42
45
|
type Reports = ClientReports;
|
package/dist/Client/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import { Accounts as ClientAccounts } from "./Accounts";
|
|
|
2
2
|
import { Auth as ClientAuth } from "./Auth";
|
|
3
3
|
import { Beneficiaries as ClientBeneficiaries } from "./Beneficiaries";
|
|
4
4
|
import { Cards as ClientCards } from "./Cards";
|
|
5
|
+
import { Configuration as ClientConfiguration } from "./Configuration";
|
|
5
6
|
import { Connection } from "./Connection";
|
|
6
7
|
import { Organisations as ClientOrganisations } from "./Organisations";
|
|
7
8
|
import { Reports as ClientReports } from "./Reports";
|
|
@@ -15,6 +16,7 @@ export class Client {
|
|
|
15
16
|
this.auth = ClientAuth.create(this.connection);
|
|
16
17
|
this.beneficiaries = ClientBeneficiaries.create(this.connection);
|
|
17
18
|
this.cards = ClientCards.create(this.connection);
|
|
19
|
+
this.configuration = ClientConfiguration.create(this.connection);
|
|
18
20
|
this.users = ClientUsers.create(this.connection);
|
|
19
21
|
this.organisations = ClientOrganisations.create(this.connection);
|
|
20
22
|
this.reports = ClientReports.create(this.connection);
|
package/dist/Client/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,YAAY,CAAA;AACvD,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,QAAQ,CAAA;AAC3C,OAAO,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAEtE,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGzC,OAAO,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,WAAW,CAAA;AAEpD,OAAO,EAAE,SAAS,IAAI,eAAe,EAAE,MAAM,aAAa,CAAA;AAE1D,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,SAAS,CAAA;AAI9C,MAAM,OAAO,MAAM;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/index.ts"],"names":[],"mappings":"AACA,OAAO,EA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