@pax2pay/model-banking 0.1.466 → 0.1.467
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/History.ts +2 -5
- package/Client/Accounts/Rails.ts +2 -5
- package/Client/Accounts/index.ts +2 -5
- package/Client/Cards.ts +2 -5
- package/Client/Exchanges.ts +2 -5
- package/Client/Operations.ts +2 -5
- package/Client/Organizations/Groups.ts +2 -5
- package/Client/Organizations/index.ts +2 -5
- package/Client/Reports.ts +2 -5
- package/Client/Transactions/Notes.ts +2 -5
- package/Client/Transactions/index.ts +2 -5
- package/Client/Version.ts +2 -6
- package/Client/index.ts +38 -31
- package/dist/Client/Accounts/History.d.ts +2 -2
- package/dist/Client/Accounts/History.js +2 -3
- package/dist/Client/Accounts/History.js.map +1 -1
- package/dist/Client/Accounts/Rails.d.ts +2 -2
- package/dist/Client/Accounts/Rails.js +2 -3
- package/dist/Client/Accounts/Rails.js.map +1 -1
- package/dist/Client/Accounts/index.d.ts +2 -2
- package/dist/Client/Accounts/index.js +2 -3
- package/dist/Client/Accounts/index.js.map +1 -1
- package/dist/Client/Cards.d.ts +2 -2
- package/dist/Client/Cards.js +2 -3
- package/dist/Client/Cards.js.map +1 -1
- package/dist/Client/Exchanges.d.ts +2 -2
- package/dist/Client/Exchanges.js +2 -3
- package/dist/Client/Exchanges.js.map +1 -1
- package/dist/Client/Operations.d.ts +2 -2
- package/dist/Client/Operations.js +2 -3
- package/dist/Client/Operations.js.map +1 -1
- package/dist/Client/Organizations/Groups.d.ts +2 -2
- package/dist/Client/Organizations/Groups.js +2 -3
- package/dist/Client/Organizations/Groups.js.map +1 -1
- package/dist/Client/Organizations/index.d.ts +2 -2
- package/dist/Client/Organizations/index.js +2 -3
- package/dist/Client/Organizations/index.js.map +1 -1
- package/dist/Client/Reports.d.ts +2 -2
- package/dist/Client/Reports.js +2 -3
- package/dist/Client/Reports.js.map +1 -1
- package/dist/Client/Transactions/Notes.d.ts +2 -2
- package/dist/Client/Transactions/Notes.js +2 -3
- package/dist/Client/Transactions/Notes.js.map +1 -1
- package/dist/Client/Transactions/index.d.ts +2 -2
- package/dist/Client/Transactions/index.js +2 -3
- package/dist/Client/Transactions/index.js.map +1 -1
- package/dist/Client/Version.d.ts +2 -3
- package/dist/Client/Version.js +2 -3
- package/dist/Client/Version.js.map +1 -1
- package/dist/Client/index.d.ts +9 -7
- package/dist/Client/index.js +20 -10
- package/dist/Client/index.js.map +1 -1
- package/package.json +1 -5
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { gracely } from "gracely"
|
|
2
2
|
import { http } from "cloudly-http"
|
|
3
|
-
import * as rest from "cloudly-rest"
|
|
4
3
|
import { Account } from "../../Account"
|
|
5
4
|
|
|
6
|
-
export class History
|
|
7
|
-
constructor(client: http.Client) {
|
|
8
|
-
super(client)
|
|
9
|
-
}
|
|
5
|
+
export class History {
|
|
6
|
+
constructor(private readonly client: http.Client) {}
|
|
10
7
|
async list(account: string): Promise<Account.History[] | gracely.Error> {
|
|
11
8
|
return this.client.get<Account.History[]>(`/account/${account}/history`)
|
|
12
9
|
}
|
package/Client/Accounts/Rails.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { gracely } from "gracely"
|
|
2
2
|
import { http } from "cloudly-http"
|
|
3
|
-
import * as rest from "cloudly-rest"
|
|
4
3
|
import { Rail } from "../../Rail"
|
|
5
4
|
import { Supplier } from "../../Supplier"
|
|
6
5
|
|
|
7
|
-
export class Rails
|
|
8
|
-
constructor(client: http.Client) {
|
|
9
|
-
super(client)
|
|
10
|
-
}
|
|
6
|
+
export class Rails {
|
|
7
|
+
constructor(private readonly client: http.Client) {}
|
|
11
8
|
async create(account: string, supplier: Supplier): Promise<Rail | gracely.Error> {
|
|
12
9
|
return this.client.post<Rail>(`/account/${account}/rail`, supplier)
|
|
13
10
|
}
|
package/Client/Accounts/index.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { gracely } from "gracely"
|
|
2
2
|
import { http } from "cloudly-http"
|
|
3
|
-
import * as rest from "cloudly-rest"
|
|
4
3
|
import { Account } from "../../Account"
|
|
5
4
|
import { Buffer } from "./Buffer"
|
|
6
5
|
import { Counterparts } from "./Counterparts"
|
|
@@ -9,7 +8,7 @@ import { Rails } from "./Rails"
|
|
|
9
8
|
import { Rules } from "./Rules"
|
|
10
9
|
import { Status } from "./Status"
|
|
11
10
|
|
|
12
|
-
export class Accounts
|
|
11
|
+
export class Accounts {
|
|
13
12
|
readonly buffer = new Buffer(this.client)
|
|
14
13
|
readonly Rails = new Rails(this.client)
|
|
15
14
|
readonly rules = new Rules(this.client)
|
|
@@ -17,9 +16,7 @@ export class Accounts extends rest.Collection<gracely.Error> {
|
|
|
17
16
|
readonly counterparts = new Counterparts(this.client)
|
|
18
17
|
readonly history = new History(this.client)
|
|
19
18
|
|
|
20
|
-
constructor(client: http.Client) {
|
|
21
|
-
super(client)
|
|
22
|
-
}
|
|
19
|
+
constructor(private readonly client: http.Client) {}
|
|
23
20
|
async create(account: Account.Creatable): Promise<Account | gracely.Error> {
|
|
24
21
|
return this.client.post<Account>("/account", account)
|
|
25
22
|
}
|
package/Client/Cards.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { gracely } from "gracely"
|
|
2
2
|
import { isoly } from "isoly"
|
|
3
3
|
import { http } from "cloudly-http"
|
|
4
|
-
import * as rest from "cloudly-rest"
|
|
5
4
|
import { Card } from "../Card"
|
|
6
5
|
|
|
7
|
-
export class Cards
|
|
8
|
-
constructor(client: http.Client) {
|
|
9
|
-
super(client)
|
|
10
|
-
}
|
|
6
|
+
export class Cards {
|
|
7
|
+
constructor(private readonly client: http.Client) {}
|
|
11
8
|
|
|
12
9
|
async fetch(card: string): Promise<Card | gracely.Error> {
|
|
13
10
|
// I mean it's supposed to return Card.Storable
|
package/Client/Exchanges.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { gracely } from "gracely"
|
|
2
2
|
import { isoly } from "isoly"
|
|
3
3
|
import { http } from "cloudly-http"
|
|
4
|
-
import * as rest from "cloudly-rest"
|
|
5
4
|
import { Exchange } from "../Exchange"
|
|
6
5
|
|
|
7
|
-
export class Exchanges
|
|
8
|
-
constructor(client: http.Client) {
|
|
9
|
-
super(client)
|
|
10
|
-
}
|
|
6
|
+
export class Exchanges {
|
|
7
|
+
constructor(private readonly client: http.Client) {}
|
|
11
8
|
async fetch(currency: isoly.Currency): Promise<Exchange.Rates | gracely.Error> {
|
|
12
9
|
return this.client.get<Exchange.Rates>(`/exchange?currencies=${currency}`)
|
|
13
10
|
}
|
package/Client/Operations.ts
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { gracely } from "gracely"
|
|
2
2
|
import { http } from "cloudly-http"
|
|
3
|
-
import * as rest from "cloudly-rest"
|
|
4
3
|
import { Operation } from "../Operation"
|
|
5
4
|
|
|
6
|
-
export class Operations
|
|
7
|
-
constructor(client: http.Client) {
|
|
8
|
-
super(client)
|
|
9
|
-
}
|
|
5
|
+
export class Operations {
|
|
6
|
+
constructor(private readonly client: http.Client) {}
|
|
10
7
|
async list(options?: {
|
|
11
8
|
start?: string
|
|
12
9
|
end?: string
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { gracely } from "gracely"
|
|
2
2
|
import { http } from "cloudly-http"
|
|
3
|
-
import * as rest from "cloudly-rest"
|
|
4
3
|
import { Organization } from "../../Organization"
|
|
5
4
|
|
|
6
|
-
export class Groups
|
|
7
|
-
constructor(client: http.Client) {
|
|
8
|
-
super(client)
|
|
9
|
-
}
|
|
5
|
+
export class Groups {
|
|
6
|
+
constructor(private readonly client: http.Client) {}
|
|
10
7
|
async replace(organization: string, groups: string[]): Promise<Organization | gracely.Error> {
|
|
11
8
|
return this.client.put<Organization>(`/organization/group`, groups, {
|
|
12
9
|
organization,
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
import { gracely } from "gracely"
|
|
2
2
|
import { http } from "cloudly-http"
|
|
3
|
-
import * as rest from "cloudly-rest"
|
|
4
3
|
import { Organization } from "../../Organization"
|
|
5
4
|
import { Groups } from "./Groups"
|
|
6
5
|
import { Rules } from "./Rules"
|
|
7
6
|
|
|
8
|
-
export class Organizations
|
|
7
|
+
export class Organizations {
|
|
9
8
|
readonly Rules = new Rules(this.client)
|
|
10
9
|
readonly groups = new Groups(this.client)
|
|
11
10
|
|
|
12
|
-
constructor(client: http.Client) {
|
|
13
|
-
super(client)
|
|
14
|
-
}
|
|
11
|
+
constructor(private readonly client: http.Client) {}
|
|
15
12
|
async list(options?: {
|
|
16
13
|
limit?: string
|
|
17
14
|
cursor?: string
|
package/Client/Reports.ts
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { gracely } from "gracely"
|
|
2
2
|
import { http } from "cloudly-http"
|
|
3
|
-
import * as rest from "cloudly-rest"
|
|
4
3
|
import { Card } from "../Card"
|
|
5
4
|
|
|
6
|
-
export class Reports
|
|
7
|
-
constructor(client: http.Client) {
|
|
8
|
-
super(client)
|
|
9
|
-
}
|
|
5
|
+
export class Reports {
|
|
6
|
+
constructor(private readonly client: http.Client) {}
|
|
10
7
|
async fetchT140(stack: Card.Stack, id: string): Promise<string | gracely.Error> {
|
|
11
8
|
return this.client.get<string>(`/processor/${stack}/t140/${id}?decrypt`)
|
|
12
9
|
}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { gracely } from "gracely"
|
|
2
2
|
import { http } from "cloudly-http"
|
|
3
|
-
import * as rest from "cloudly-rest"
|
|
4
3
|
import { Transaction } from "../../Transaction"
|
|
5
4
|
|
|
6
|
-
export class Notes
|
|
7
|
-
constructor(client: http.Client) {
|
|
8
|
-
super(client)
|
|
9
|
-
}
|
|
5
|
+
export class Notes {
|
|
6
|
+
constructor(private readonly client: http.Client) {}
|
|
10
7
|
async create(
|
|
11
8
|
organization: string,
|
|
12
9
|
account: string,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { gracely } from "gracely"
|
|
2
2
|
import { isoly } from "isoly"
|
|
3
3
|
import { http } from "cloudly-http"
|
|
4
|
-
import * as rest from "cloudly-rest"
|
|
5
4
|
import { Card } from "../../Card"
|
|
6
5
|
import { Operation } from "../../Operation"
|
|
7
6
|
import { Rule } from "../../Rule"
|
|
@@ -9,11 +8,9 @@ import { Supplier } from "../../Supplier"
|
|
|
9
8
|
import { Transaction } from "../../Transaction"
|
|
10
9
|
import { Notes } from "./Notes"
|
|
11
10
|
|
|
12
|
-
export class Transactions
|
|
11
|
+
export class Transactions {
|
|
13
12
|
readonly Notes = new Notes(this.client)
|
|
14
|
-
constructor(client: http.Client) {
|
|
15
|
-
super(client)
|
|
16
|
-
}
|
|
13
|
+
constructor(private readonly client: http.Client) {}
|
|
17
14
|
async create(account: string, transaction: Transaction.Creatable): Promise<Transaction | gracely.Error> {
|
|
18
15
|
return this.client.post<Transaction>(`/account/${account}/transaction`, transaction)
|
|
19
16
|
}
|
package/Client/Version.ts
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { gracely } from "gracely"
|
|
2
1
|
import { http } from "cloudly-http"
|
|
3
|
-
import * as rest from "cloudly-rest"
|
|
4
2
|
|
|
5
|
-
export class Version
|
|
6
|
-
constructor(client: http.Client) {
|
|
7
|
-
super(client)
|
|
8
|
-
}
|
|
3
|
+
export class Version {
|
|
4
|
+
constructor(private readonly client: http.Client) {}
|
|
9
5
|
async fetch() {
|
|
10
6
|
return this.client.get<any>("/version")
|
|
11
7
|
}
|
package/Client/index.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { gracely } from "gracely"
|
|
2
2
|
import { userwidgets } from "@userwidgets/model"
|
|
3
3
|
import { http } from "cloudly-http"
|
|
4
|
-
import { rest } from "cloudly-rest"
|
|
5
4
|
import { Accounts } from "./Accounts"
|
|
6
5
|
import { Audit } from "./Audit"
|
|
7
6
|
import { Cards } from "./Cards"
|
|
@@ -17,7 +16,7 @@ import { Transactions } from "./Transactions"
|
|
|
17
16
|
import { Treasury } from "./Treasury"
|
|
18
17
|
import { Version } from "./Version"
|
|
19
18
|
|
|
20
|
-
export class Client
|
|
19
|
+
export class Client {
|
|
21
20
|
realm?: string
|
|
22
21
|
organization?: string
|
|
23
22
|
readonly accounts = new Accounts(this.client)
|
|
@@ -37,34 +36,42 @@ export class Client extends rest.Client<gracely.Error> {
|
|
|
37
36
|
readonly userwidgets = (server: string, application: string) =>
|
|
38
37
|
new userwidgets.ClientCollection(new http.Client(server), { application })
|
|
39
38
|
readonly version = new Version(this.client)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
39
|
+
onUnauthorized?: (client: Client) => Promise<boolean>
|
|
40
|
+
private constructor(private readonly client: http.Client<gracely.Error>) {
|
|
41
|
+
this.client.onUnauthorized = async () => this.onUnauthorized != undefined && (await this.onUnauthorized(this))
|
|
42
|
+
}
|
|
43
|
+
set key(value: string | undefined) {
|
|
44
|
+
this.client.key = value
|
|
45
|
+
}
|
|
46
|
+
get key(): string | undefined {
|
|
47
|
+
return this.client.key
|
|
48
|
+
}
|
|
49
|
+
set onError(value: ((request: http.Request, response: http.Response) => Promise<boolean>) | undefined) {
|
|
50
|
+
this.client.onError = value
|
|
51
|
+
}
|
|
52
|
+
get onError(): ((request: http.Request, response: http.Response) => Promise<boolean>) | undefined {
|
|
53
|
+
return this.client.onError
|
|
54
|
+
}
|
|
55
|
+
static create(server: string, key?: string): Client {
|
|
56
|
+
const httpClient: http.Client<gracely.Error> = new http.Client<gracely.Error>(server, key, {
|
|
57
|
+
appendHeader: request => ({
|
|
58
|
+
...request.header,
|
|
59
|
+
realm: result.realm,
|
|
60
|
+
organization: request.header.organization ?? result.organization,
|
|
61
|
+
}),
|
|
62
|
+
postprocess: async response => {
|
|
63
|
+
let result = response
|
|
64
|
+
const body = await response.body
|
|
65
|
+
if (Array.isArray(body))
|
|
66
|
+
result = http.Response.create(
|
|
67
|
+
Object.defineProperty(body, "cursor", {
|
|
68
|
+
value: response.header.cursor ?? response.header.link?.split?.(",")[0],
|
|
69
|
+
})
|
|
70
|
+
)
|
|
71
|
+
return result
|
|
72
|
+
},
|
|
73
|
+
})
|
|
74
|
+
const result: Client = new Client(httpClient)
|
|
75
|
+
return result
|
|
66
76
|
}
|
|
67
|
-
}
|
|
68
|
-
export namespace Client {
|
|
69
|
-
export type Unauthorized = (client: rest.Client<never>) => Promise<boolean>
|
|
70
77
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
2
|
import { http } from "cloudly-http";
|
|
3
|
-
import * as rest from "cloudly-rest";
|
|
4
3
|
import { Account } from "../../Account";
|
|
5
|
-
export declare class History
|
|
4
|
+
export declare class History {
|
|
5
|
+
private readonly client;
|
|
6
6
|
constructor(client: http.Client);
|
|
7
7
|
list(account: string): Promise<Account.History[] | gracely.Error>;
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"History.js","sourceRoot":"../","sources":["Client/Accounts/History.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"History.js","sourceRoot":"../","sources":["Client/Accounts/History.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,OAAO;IACnB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,IAAI,CAAC,OAAe;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAoB,YAAY,OAAO,UAAU,CAAC,CAAA;IACzE,CAAC;CACD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
2
|
import { http } from "cloudly-http";
|
|
3
|
-
import * as rest from "cloudly-rest";
|
|
4
3
|
import { Rail } from "../../Rail";
|
|
5
4
|
import { Supplier } from "../../Supplier";
|
|
6
|
-
export declare class Rails
|
|
5
|
+
export declare class Rails {
|
|
6
|
+
private readonly client;
|
|
7
7
|
constructor(client: http.Client);
|
|
8
8
|
create(account: string, supplier: Supplier): Promise<Rail | gracely.Error>;
|
|
9
9
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export class Rails extends rest.Collection {
|
|
1
|
+
export class Rails {
|
|
3
2
|
constructor(client) {
|
|
4
|
-
|
|
3
|
+
this.client = client;
|
|
5
4
|
}
|
|
6
5
|
async create(account, supplier) {
|
|
7
6
|
return this.client.post(`/account/${account}/rail`, supplier);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Rails.js","sourceRoot":"../","sources":["Client/Accounts/Rails.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Rails.js","sourceRoot":"../","sources":["Client/Accounts/Rails.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,KAAK;IACjB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,QAAkB;QAC/C,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAO,YAAY,OAAO,OAAO,EAAE,QAAQ,CAAC,CAAA;IACpE,CAAC;CACD"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
2
|
import { http } from "cloudly-http";
|
|
3
|
-
import * as rest from "cloudly-rest";
|
|
4
3
|
import { Account } from "../../Account";
|
|
5
4
|
import { Buffer } from "./Buffer";
|
|
6
5
|
import { Counterparts } from "./Counterparts";
|
|
@@ -8,7 +7,8 @@ import { History } from "./History";
|
|
|
8
7
|
import { Rails } from "./Rails";
|
|
9
8
|
import { Rules } from "./Rules";
|
|
10
9
|
import { Status } from "./Status";
|
|
11
|
-
export declare class Accounts
|
|
10
|
+
export declare class Accounts {
|
|
11
|
+
private readonly client;
|
|
12
12
|
readonly buffer: Buffer;
|
|
13
13
|
readonly Rails: Rails;
|
|
14
14
|
readonly rules: Rules;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import * as rest from "cloudly-rest";
|
|
2
1
|
import { Buffer } from "./Buffer";
|
|
3
2
|
import { Counterparts } from "./Counterparts";
|
|
4
3
|
import { History } from "./History";
|
|
5
4
|
import { Rails } from "./Rails";
|
|
6
5
|
import { Rules } from "./Rules";
|
|
7
6
|
import { Status } from "./Status";
|
|
8
|
-
export class Accounts
|
|
7
|
+
export class Accounts {
|
|
9
8
|
constructor(client) {
|
|
10
|
-
|
|
9
|
+
this.client = client;
|
|
11
10
|
this.buffer = new Buffer(this.client);
|
|
12
11
|
this.Rails = new Rails(this.client);
|
|
13
12
|
this.rules = new Rules(this.client);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Accounts/index.ts"],"names":[],"mappings":"
|
|
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,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,MAAM,OAAO,QAAQ;IAQpB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;QAPvC,WAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAChC,UAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC9B,UAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC9B,WAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAChC,iBAAY,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC5C,YAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAEQ,CAAC;IACpD,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"}
|
package/dist/Client/Cards.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
2
|
import { isoly } from "isoly";
|
|
3
3
|
import { http } from "cloudly-http";
|
|
4
|
-
import * as rest from "cloudly-rest";
|
|
5
4
|
import { Card } from "../Card";
|
|
6
|
-
export declare class Cards
|
|
5
|
+
export declare class Cards {
|
|
6
|
+
private readonly client;
|
|
7
7
|
constructor(client: http.Client);
|
|
8
8
|
fetch(card: string): Promise<Card | gracely.Error>;
|
|
9
9
|
create(card: Card.Creatable): Promise<Card | gracely.Error>;
|
package/dist/Client/Cards.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { http } from "cloudly-http";
|
|
2
|
-
|
|
3
|
-
export class Cards extends rest.Collection {
|
|
2
|
+
export class Cards {
|
|
4
3
|
constructor(client) {
|
|
5
|
-
|
|
4
|
+
this.client = client;
|
|
6
5
|
}
|
|
7
6
|
async fetch(card) {
|
|
8
7
|
return this.client.get(`/card/${card}`);
|
package/dist/Client/Cards.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cards.js","sourceRoot":"../","sources":["Client/Cards.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"Cards.js","sourceRoot":"../","sources":["Client/Cards.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAGnC,MAAM,OAAO,KAAK;IACjB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IAEpD,KAAK,CAAC,KAAK,CAAC,IAAY;QAEvB,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;QAEA,MAAM,MAAM,GACX,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,GAAG;YAC7B,CAAC,CAAC,UAAU,OAAO,EAAE,KAAK,QAAQ,OAAO,EAAE,GAAG,EAAE;YAChD,CAAC,CAAC,OAAO,EAAE,KAAK;gBAChB,CAAC,CAAC,UAAU,OAAO,EAAE,KAAK,EAAE;gBAC5B,CAAC,CAAC,OAAO,EAAE,GAAG;oBACd,CAAC,CAAC,QAAQ,OAAO,EAAE,GAAG,EAAE;oBACxB,CAAC,CAAC,EAAE,CAAA;QACN,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACrB,QAAQ,MAAM,EAAE,EAChB,OAAO,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAC7D,CAAA;IACF,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;IACD,KAAK,CAAC,UAAU,CACf,MAAmB,EACnB,KAAsB,EACtB,OAA6C;QAE7C,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,GAAG,OAAO,EAAE,GAAG,KAAK,EAAE,CAAC,CAAA;QAC/D,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACrB,oBAAoB,MAAM,IAAI,OAAO,EAAE,CACvC,CAAA;IACF,CAAC;CACD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
2
|
import { isoly } from "isoly";
|
|
3
3
|
import { http } from "cloudly-http";
|
|
4
|
-
import * as rest from "cloudly-rest";
|
|
5
4
|
import { Exchange } from "../Exchange";
|
|
6
|
-
export declare class Exchanges
|
|
5
|
+
export declare class Exchanges {
|
|
6
|
+
private readonly client;
|
|
7
7
|
constructor(client: http.Client);
|
|
8
8
|
fetch(currency: isoly.Currency): Promise<Exchange.Rates | gracely.Error>;
|
|
9
9
|
}
|
package/dist/Client/Exchanges.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export class Exchanges extends rest.Collection {
|
|
1
|
+
export class Exchanges {
|
|
3
2
|
constructor(client) {
|
|
4
|
-
|
|
3
|
+
this.client = client;
|
|
5
4
|
}
|
|
6
5
|
async fetch(currency) {
|
|
7
6
|
return this.client.get(`/exchange?currencies=${currency}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Exchanges.js","sourceRoot":"../","sources":["Client/Exchanges.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Exchanges.js","sourceRoot":"../","sources":["Client/Exchanges.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,SAAS;IACrB,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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
2
|
import { http } from "cloudly-http";
|
|
3
|
-
import * as rest from "cloudly-rest";
|
|
4
3
|
import { Operation } from "../Operation";
|
|
5
|
-
export declare class Operations
|
|
4
|
+
export declare class Operations {
|
|
5
|
+
private readonly client;
|
|
6
6
|
constructor(client: http.Client);
|
|
7
7
|
list(options?: {
|
|
8
8
|
start?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Operations.js","sourceRoot":"../","sources":["Client/Operations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Operations.js","sourceRoot":"../","sources":["Client/Operations.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,UAAU;IACtB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,IAAI,CAAC,OAMV;QACA,MAAM,MAAM,GACX,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,GAAG;YAC7B,CAAC,CAAC,UAAU,OAAO,EAAE,KAAK,QAAQ,OAAO,EAAE,GAAG,EAAE;YAChD,CAAC,CAAC,OAAO,EAAE,KAAK;gBAChB,CAAC,CAAC,UAAU,OAAO,EAAE,KAAK,EAAE;gBAC5B,CAAC,CAAC,OAAO,EAAE,GAAG;oBACd,CAAC,CAAC,QAAQ,OAAO,EAAE,GAAG,EAAE;oBACxB,CAAC,CAAC,EAAE,CAAA;QACN,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACrB,aAAa,MAAM,EAAE,EACrB,OAAO,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAC7D,CAAA;IACF,CAAC;CACD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
2
|
import { http } from "cloudly-http";
|
|
3
|
-
import * as rest from "cloudly-rest";
|
|
4
3
|
import { Organization } from "../../Organization";
|
|
5
|
-
export declare class Groups
|
|
4
|
+
export declare class Groups {
|
|
5
|
+
private readonly client;
|
|
6
6
|
constructor(client: http.Client);
|
|
7
7
|
replace(organization: string, groups: string[]): Promise<Organization | gracely.Error>;
|
|
8
8
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export class Groups extends rest.Collection {
|
|
1
|
+
export class Groups {
|
|
3
2
|
constructor(client) {
|
|
4
|
-
|
|
3
|
+
this.client = client;
|
|
5
4
|
}
|
|
6
5
|
async replace(organization, groups) {
|
|
7
6
|
return this.client.put(`/organization/group`, groups, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Groups.js","sourceRoot":"../","sources":["Client/Organizations/Groups.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Groups.js","sourceRoot":"../","sources":["Client/Organizations/Groups.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,MAAM;IAClB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,OAAO,CAAC,YAAoB,EAAE,MAAgB;QACnD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAe,qBAAqB,EAAE,MAAM,EAAE;YACnE,YAAY;SACZ,CAAC,CAAA;IACH,CAAC;CACD"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
2
|
import { http } from "cloudly-http";
|
|
3
|
-
import * as rest from "cloudly-rest";
|
|
4
3
|
import { Organization } from "../../Organization";
|
|
5
4
|
import { Groups } from "./Groups";
|
|
6
5
|
import { Rules } from "./Rules";
|
|
7
|
-
export declare class Organizations
|
|
6
|
+
export declare class Organizations {
|
|
7
|
+
private readonly client;
|
|
8
8
|
readonly Rules: Rules;
|
|
9
9
|
readonly groups: Groups;
|
|
10
10
|
constructor(client: http.Client);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import * as rest from "cloudly-rest";
|
|
2
1
|
import { Groups } from "./Groups";
|
|
3
2
|
import { Rules } from "./Rules";
|
|
4
|
-
export class Organizations
|
|
3
|
+
export class Organizations {
|
|
5
4
|
constructor(client) {
|
|
6
|
-
|
|
5
|
+
this.client = client;
|
|
7
6
|
this.Rules = new Rules(this.client);
|
|
8
7
|
this.groups = new Groups(this.client);
|
|
9
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Organizations/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Organizations/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,MAAM,OAAO,aAAa;IAIzB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;QAHvC,UAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC9B,WAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAEU,CAAC;IACpD,KAAK,CAAC,IAAI,CAAC,OAGV;QACA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAmD,eAAe,EAAE,OAAO,CAAC,CAAA;IACnG,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,YAA0B;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAe,eAAe,EAAE,YAAY,CAAC,CAAA;IACrE,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,UAAmC;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAe,iBAAiB,EAAE,EAAE,EAAE,UAAU,CAAC,CAAA;IAC1E,CAAC;CACD"}
|
package/dist/Client/Reports.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
2
|
import { http } from "cloudly-http";
|
|
3
|
-
import * as rest from "cloudly-rest";
|
|
4
3
|
import { Card } from "../Card";
|
|
5
|
-
export declare class Reports
|
|
4
|
+
export declare class Reports {
|
|
5
|
+
private readonly client;
|
|
6
6
|
constructor(client: http.Client);
|
|
7
7
|
fetchT140(stack: Card.Stack, id: string): Promise<string | gracely.Error>;
|
|
8
8
|
}
|
package/dist/Client/Reports.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export class Reports extends rest.Collection {
|
|
1
|
+
export class Reports {
|
|
3
2
|
constructor(client) {
|
|
4
|
-
|
|
3
|
+
this.client = client;
|
|
5
4
|
}
|
|
6
5
|
async fetchT140(stack, id) {
|
|
7
6
|
return this.client.get(`/processor/${stack}/t140/${id}?decrypt`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Reports.js","sourceRoot":"../","sources":["Client/Reports.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Reports.js","sourceRoot":"../","sources":["Client/Reports.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,OAAO;IACnB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,SAAS,CAAC,KAAiB,EAAE,EAAU;QAC5C,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAS,cAAc,KAAK,SAAS,EAAE,UAAU,CAAC,CAAA;IACzE,CAAC;CACD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
2
|
import { http } from "cloudly-http";
|
|
3
|
-
import * as rest from "cloudly-rest";
|
|
4
3
|
import { Transaction } from "../../Transaction";
|
|
5
|
-
export declare class Notes
|
|
4
|
+
export declare class Notes {
|
|
5
|
+
private readonly client;
|
|
6
6
|
constructor(client: http.Client);
|
|
7
7
|
create(organization: string, account: string, transaction: string, note: Transaction.Note.Creatable): Promise<Transaction | gracely.Error>;
|
|
8
8
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export class Notes extends rest.Collection {
|
|
1
|
+
export class Notes {
|
|
3
2
|
constructor(client) {
|
|
4
|
-
|
|
3
|
+
this.client = client;
|
|
5
4
|
}
|
|
6
5
|
async create(organization, account, transaction, note) {
|
|
7
6
|
return this.client.post(`/transaction/${transaction}/note`, note, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notes.js","sourceRoot":"../","sources":["Client/Transactions/Notes.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Notes.js","sourceRoot":"../","sources":["Client/Transactions/Notes.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,KAAK;IACjB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,MAAM,CACX,YAAoB,EACpB,OAAe,EACf,WAAmB,EACnB,IAAgC;QAEhC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAc,gBAAgB,WAAW,OAAO,EAAE,IAAI,EAAE;YAC9E,YAAY;YACZ,OAAO;SACP,CAAC,CAAA;IACH,CAAC;CACD"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
2
|
import { isoly } from "isoly";
|
|
3
3
|
import { http } from "cloudly-http";
|
|
4
|
-
import * as rest from "cloudly-rest";
|
|
5
4
|
import { Card } from "../../Card";
|
|
6
5
|
import { Operation } from "../../Operation";
|
|
7
6
|
import { Rule } from "../../Rule";
|
|
8
7
|
import { Supplier } from "../../Supplier";
|
|
9
8
|
import { Transaction } from "../../Transaction";
|
|
10
9
|
import { Notes } from "./Notes";
|
|
11
|
-
export declare class Transactions
|
|
10
|
+
export declare class Transactions {
|
|
11
|
+
private readonly client;
|
|
12
12
|
readonly Notes: Notes;
|
|
13
13
|
constructor(client: http.Client);
|
|
14
14
|
create(account: string, transaction: Transaction.Creatable): Promise<Transaction | gracely.Error>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { http } from "cloudly-http";
|
|
2
|
-
import * as rest from "cloudly-rest";
|
|
3
2
|
import { Notes } from "./Notes";
|
|
4
|
-
export class Transactions
|
|
3
|
+
export class Transactions {
|
|
5
4
|
constructor(client) {
|
|
6
|
-
|
|
5
|
+
this.client = client;
|
|
7
6
|
this.Notes = new Notes(this.client);
|
|
8
7
|
}
|
|
9
8
|
async create(account, transaction) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Transactions/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Transactions/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAMnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,MAAM,OAAO,YAAY;IAExB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;QADvC,UAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACY,CAAC;IACpD,KAAK,CAA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,IAAI,CAAC,MAAM,CAAC,GAAG,CACrB,OAAO,CAAC,CAAC,CAAC,YAAY,OAAO,gBAAgB,WAAW,EAAE,CAAC,CAAC,CAAC,gBAAgB,WAAW,EAAE,CAC1F,CAAA;IACF,CAAC;IACD,KAAK,CAAC,aAAa,CAAC,aAAqB;QACxC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAc,gBAAgB,aAAa,YAAY,CAAC,CAAA;IAC/E,CAAC;IACD,KAAK,CAAC,QAAQ,CAAC,aAAqB;QACnC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAa,gBAAgB,aAAa,QAAQ,CAAC,CAAA;IAC1E,CAAC;IACD,KAAK,CAAC,UAAU,CACf,KAAsB,EACtB,OAAwF;QAExF,MAAM,KAAK,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,GAAG,OAAO,EAAE,GAAG,KAAK,EAAE,CAAC,CAAA;QACnE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAyB,0BAA0B,KAAK,EAAE,CAAC,CAAA;IAClF,CAAC;CACD"}
|
package/dist/Client/Version.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { gracely } from "gracely";
|
|
2
1
|
import { http } from "cloudly-http";
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
export declare class Version {
|
|
3
|
+
private readonly client;
|
|
5
4
|
constructor(client: http.Client);
|
|
6
5
|
fetch(): Promise<any>;
|
|
7
6
|
}
|
package/dist/Client/Version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Version.js","sourceRoot":"../","sources":["Client/Version.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"Version.js","sourceRoot":"../","sources":["Client/Version.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,OAAO;IACnB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,KAAK;QACV,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAM,UAAU,CAAC,CAAA;IACxC,CAAC;CACD"}
|
package/dist/Client/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { gracely } from "gracely";
|
|
2
1
|
import { userwidgets } from "@userwidgets/model";
|
|
3
2
|
import { http } from "cloudly-http";
|
|
4
|
-
import { rest } from "cloudly-rest";
|
|
5
3
|
import { Accounts } from "./Accounts";
|
|
6
4
|
import { Audit } from "./Audit";
|
|
7
5
|
import { Cards } from "./Cards";
|
|
@@ -16,7 +14,8 @@ import { Settlements } from "./Settlements";
|
|
|
16
14
|
import { Transactions } from "./Transactions";
|
|
17
15
|
import { Treasury } from "./Treasury";
|
|
18
16
|
import { Version } from "./Version";
|
|
19
|
-
export declare class Client
|
|
17
|
+
export declare class Client {
|
|
18
|
+
private readonly client;
|
|
20
19
|
realm?: string;
|
|
21
20
|
organization?: string;
|
|
22
21
|
readonly accounts: Accounts;
|
|
@@ -35,8 +34,11 @@ export declare class Client extends rest.Client<gracely.Error> {
|
|
|
35
34
|
readonly groups: Labels;
|
|
36
35
|
readonly userwidgets: (server: string, application: string) => userwidgets.ClientCollection;
|
|
37
36
|
readonly version: Version;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
onUnauthorized?: (client: Client) => Promise<boolean>;
|
|
38
|
+
private constructor();
|
|
39
|
+
set key(value: string | undefined);
|
|
40
|
+
get key(): string | undefined;
|
|
41
|
+
set onError(value: ((request: http.Request, response: http.Response) => Promise<boolean>) | undefined);
|
|
42
|
+
get onError(): ((request: http.Request, response: http.Response) => Promise<boolean>) | undefined;
|
|
43
|
+
static create(server: string, key?: string): Client;
|
|
42
44
|
}
|
package/dist/Client/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { userwidgets } from "@userwidgets/model";
|
|
2
2
|
import { http } from "cloudly-http";
|
|
3
|
-
import { rest } from "cloudly-rest";
|
|
4
3
|
import { Accounts } from "./Accounts";
|
|
5
4
|
import { Audit } from "./Audit";
|
|
6
5
|
import { Cards } from "./Cards";
|
|
@@ -15,9 +14,9 @@ import { Settlements } from "./Settlements";
|
|
|
15
14
|
import { Transactions } from "./Transactions";
|
|
16
15
|
import { Treasury } from "./Treasury";
|
|
17
16
|
import { Version } from "./Version";
|
|
18
|
-
export class Client
|
|
19
|
-
constructor() {
|
|
20
|
-
|
|
17
|
+
export class Client {
|
|
18
|
+
constructor(client) {
|
|
19
|
+
this.client = client;
|
|
21
20
|
this.accounts = new Accounts(this.client);
|
|
22
21
|
this.cards = new Cards(this.client);
|
|
23
22
|
this.operations = new Operations(this.client);
|
|
@@ -34,10 +33,22 @@ export class Client extends rest.Client {
|
|
|
34
33
|
this.groups = new Labels(this.client, "group");
|
|
35
34
|
this.userwidgets = (server, application) => new userwidgets.ClientCollection(new http.Client(server), { application });
|
|
36
35
|
this.version = new Version(this.client);
|
|
36
|
+
this.client.onUnauthorized = async () => this.onUnauthorized != undefined && (await this.onUnauthorized(this));
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
set key(value) {
|
|
39
|
+
this.client.key = value;
|
|
40
|
+
}
|
|
41
|
+
get key() {
|
|
42
|
+
return this.client.key;
|
|
43
|
+
}
|
|
44
|
+
set onError(value) {
|
|
45
|
+
this.client.onError = value;
|
|
46
|
+
}
|
|
47
|
+
get onError() {
|
|
48
|
+
return this.client.onError;
|
|
49
|
+
}
|
|
50
|
+
static create(server, key) {
|
|
51
|
+
const httpClient = new http.Client(server, key, {
|
|
41
52
|
appendHeader: request => ({
|
|
42
53
|
...request.header,
|
|
43
54
|
realm: result.realm,
|
|
@@ -52,9 +63,8 @@ export class Client extends rest.Client {
|
|
|
52
63
|
}));
|
|
53
64
|
return result;
|
|
54
65
|
},
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
Object.assign(result, load(httpClient));
|
|
66
|
+
});
|
|
67
|
+
const result = new Client(httpClient);
|
|
58
68
|
return result;
|
|
59
69
|
}
|
|
60
70
|
}
|
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,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnC,MAAM,OAAO,MAAM;IAqBlB,YAAqC,MAAkC;QAAlC,WAAM,G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,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;qBACtE,CAAC,CACF,CAAA;gBACF,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pax2pay/model-banking",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.467",
|
|
4
4
|
"description": "Library containing data model types and functions for the Pax2Pay Banking API.",
|
|
5
5
|
"author": "Pax2Pay Ltd",
|
|
6
6
|
"license": "MIT",
|
|
@@ -53,9 +53,6 @@
|
|
|
53
53
|
"prepare": "npm run build",
|
|
54
54
|
"clean": "rimraf dist node_modules coverage"
|
|
55
55
|
},
|
|
56
|
-
"overrides": {
|
|
57
|
-
"semver": "7.5.3"
|
|
58
|
-
},
|
|
59
56
|
"devDependencies": {
|
|
60
57
|
"@cloudflare/workers-types": "^4.20241112.0",
|
|
61
58
|
"@types/jest": "^29.5.12",
|
|
@@ -76,7 +73,6 @@
|
|
|
76
73
|
"authly": "^3.1.2",
|
|
77
74
|
"cloudly-analytics-common": "^0.3.33",
|
|
78
75
|
"cloudly-http": "^0.1.7",
|
|
79
|
-
"cloudly-rest": "^0.1.4",
|
|
80
76
|
"cloudly-storage": "^0.10.16",
|
|
81
77
|
"cryptly": "^4.0.6",
|
|
82
78
|
"gracely": "^2.0.8",
|