@pax2pay/model-banking 0.1.306 → 0.1.308
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/{Log.ts → Audit.ts} +2 -2
- package/Client/Logs.ts +4 -4
- package/Client/index.ts +2 -2
- package/Log/Configuration.ts +15 -0
- package/Log/Entry.ts +22 -0
- package/Log/index.ts +34 -0
- package/dist/{Log.d.ts → Audit.d.ts} +2 -2
- package/dist/Audit.js +2 -0
- package/dist/Audit.js.map +1 -0
- package/dist/Client/Logs.d.ts +3 -3
- package/dist/Client/Logs.js +1 -1
- package/dist/Client/Logs.js.map +1 -1
- package/dist/Client/index.d.ts +2 -2
- package/dist/Client/index.js +2 -2
- package/dist/Client/index.js.map +1 -1
- package/dist/Log/Configuration.d.ts +10 -0
- package/dist/Log/Configuration.js +11 -0
- package/dist/Log/Configuration.js.map +1 -0
- package/dist/Log/Entry.d.ts +15 -0
- package/dist/Log/Entry.js +20 -0
- package/dist/Log/Entry.js.map +1 -0
- package/dist/Log/index.d.ts +15 -0
- package/dist/Log/index.js +37 -0
- package/dist/Log/index.js.map +1 -0
- package/dist/pax2pay.d.ts +1 -0
- package/dist/pax2pay.js +1 -0
- package/dist/pax2pay.js.map +1 -1
- package/package.json +10 -10
- package/pax2pay.ts +1 -0
- package/dist/Log.js +0 -2
- package/dist/Log.js.map +0 -1
package/{Log.ts → Audit.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { storage } from "cloudly-storage"
|
|
2
2
|
|
|
3
|
-
export type
|
|
4
|
-
export namespace
|
|
3
|
+
export type Audit = storage.AuditLogger.Entry<Audit.Type>
|
|
4
|
+
export namespace Audit {
|
|
5
5
|
export type Type = { rule: "change" | "add" }
|
|
6
6
|
export type Resource = Extract<keyof Type, string>
|
|
7
7
|
}
|
package/Client/Logs.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { gracely } from "gracely"
|
|
2
2
|
import { http } from "cloudly-http"
|
|
3
|
-
import {
|
|
3
|
+
import { Audit as AuditLog } from "../Audit"
|
|
4
4
|
|
|
5
|
-
export class
|
|
5
|
+
export class Audit {
|
|
6
6
|
constructor(private readonly client: http.Client) {}
|
|
7
|
-
async list(resource?:
|
|
8
|
-
return this.client.get<
|
|
7
|
+
async list(resource?: AuditLog.Resource): Promise<AuditLog[] | gracely.Error> {
|
|
8
|
+
return this.client.get<AuditLog[]>(`/audit/${resource}`)
|
|
9
9
|
}
|
|
10
10
|
}
|
package/Client/index.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { Accounts } from "./Accounts"
|
|
|
6
6
|
import { Cards } from "./Cards"
|
|
7
7
|
import { Exchanges } from "./Exchanges"
|
|
8
8
|
import { Labels } from "./Labels"
|
|
9
|
-
import {
|
|
9
|
+
import { Audit } from "./Logs"
|
|
10
10
|
import { Operations } from "./Operations"
|
|
11
11
|
import { Organizations } from "./Organizations"
|
|
12
12
|
import { Reports } from "./Reports"
|
|
@@ -25,7 +25,7 @@ export class Client extends rest.Client<gracely.Error> {
|
|
|
25
25
|
readonly exchanges = new Exchanges(this.client)
|
|
26
26
|
readonly organizations = new Organizations(this.client)
|
|
27
27
|
readonly reports = new Reports(this.client)
|
|
28
|
-
readonly logs = new
|
|
28
|
+
readonly logs = new Audit(this.client)
|
|
29
29
|
readonly rules = new Rules(this.client)
|
|
30
30
|
readonly settlements = new Settlements(this.client)
|
|
31
31
|
readonly transactions = new Transactions(this.client)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { isly } from "isly"
|
|
2
|
+
import { Realm } from "../Realm"
|
|
3
|
+
|
|
4
|
+
export interface Configuration {
|
|
5
|
+
realm: Realm
|
|
6
|
+
collection: string
|
|
7
|
+
resource?: string
|
|
8
|
+
}
|
|
9
|
+
export namespace Configuration {
|
|
10
|
+
export const type = isly.object<Configuration>({
|
|
11
|
+
realm: Realm.type,
|
|
12
|
+
collection: isly.string(),
|
|
13
|
+
resource: isly.string().optional(),
|
|
14
|
+
})
|
|
15
|
+
}
|
package/Log/Entry.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { isly } from "isly"
|
|
2
|
+
|
|
3
|
+
export interface Entry {
|
|
4
|
+
message: string
|
|
5
|
+
data?: any
|
|
6
|
+
}
|
|
7
|
+
export namespace Entry {
|
|
8
|
+
export type Message = Entry & { resource?: string }
|
|
9
|
+
export const type = isly.object<Entry>({
|
|
10
|
+
message: isly.string(),
|
|
11
|
+
data: isly.any().optional(),
|
|
12
|
+
})
|
|
13
|
+
export namespace Message {
|
|
14
|
+
export const type = Entry.type.extend<Message>({ resource: isly.string().optional() })
|
|
15
|
+
export function to(message: string, data: any | undefined, resource: string | undefined): Entry.Message {
|
|
16
|
+
const result: Entry.Message = { message }
|
|
17
|
+
resource && (result.resource = resource)
|
|
18
|
+
data && (result.data = data)
|
|
19
|
+
return result
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
package/Log/index.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Identifier } from "../Identifier"
|
|
2
|
+
import { Configuration } from "./Configuration"
|
|
3
|
+
import { Entry } from "./Entry"
|
|
4
|
+
|
|
5
|
+
export interface Log extends Configuration {
|
|
6
|
+
id: Identifier
|
|
7
|
+
entries: Entry[]
|
|
8
|
+
}
|
|
9
|
+
export namespace Log {
|
|
10
|
+
export function addEntry(logs: Log, entry: Entry): Log {
|
|
11
|
+
return logs.entries.concat(entry), logs
|
|
12
|
+
}
|
|
13
|
+
export function fromConfiguration(configuration: Configuration): Log {
|
|
14
|
+
return {
|
|
15
|
+
id: Identifier.generate(),
|
|
16
|
+
...configuration,
|
|
17
|
+
entries: [],
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export function configure(collection: string, realm: string | undefined, resource?: string): void {
|
|
21
|
+
const configuration = { collection, realm, resource }
|
|
22
|
+
if (Configuration.type.is(configuration))
|
|
23
|
+
console.log(JSON.stringify(configuration))
|
|
24
|
+
}
|
|
25
|
+
export function log(message: string, data?: any, resource?: string): void {
|
|
26
|
+
console.log(JSON.stringify(Entry.Message.to(message, data, resource)))
|
|
27
|
+
}
|
|
28
|
+
export function warning(message: string, data?: any, resource?: string): void {
|
|
29
|
+
console.warn(JSON.stringify(Entry.Message.to(message, data, resource)))
|
|
30
|
+
}
|
|
31
|
+
export function exception(message: string, data?: any, resource?: string): void {
|
|
32
|
+
console.error(JSON.stringify(Entry.Message.to(message, data, resource)))
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { storage } from "cloudly-storage";
|
|
2
|
-
export type
|
|
3
|
-
export declare namespace
|
|
2
|
+
export type Audit = storage.AuditLogger.Entry<Audit.Type>;
|
|
3
|
+
export declare namespace Audit {
|
|
4
4
|
type Type = {
|
|
5
5
|
rule: "change" | "add";
|
|
6
6
|
};
|
package/dist/Audit.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Audit.js","sourceRoot":"../","sources":["Audit.ts"],"names":[],"mappings":""}
|
package/dist/Client/Logs.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { gracely } from "gracely";
|
|
2
2
|
import { http } from "cloudly-http";
|
|
3
|
-
import {
|
|
4
|
-
export declare class
|
|
3
|
+
import { Audit as AuditLog } from "../Audit";
|
|
4
|
+
export declare class Audit {
|
|
5
5
|
private readonly client;
|
|
6
6
|
constructor(client: http.Client);
|
|
7
|
-
list(resource?:
|
|
7
|
+
list(resource?: AuditLog.Resource): Promise<AuditLog[] | gracely.Error>;
|
|
8
8
|
}
|
package/dist/Client/Logs.js
CHANGED
package/dist/Client/Logs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logs.js","sourceRoot":"../","sources":["Client/Logs.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"Logs.js","sourceRoot":"../","sources":["Client/Logs.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,KAAK;IACjB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,IAAI,CAAC,QAA4B;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAa,UAAU,QAAQ,EAAE,CAAC,CAAA;IACzD,CAAC;CACD"}
|
package/dist/Client/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { Accounts } from "./Accounts";
|
|
|
6
6
|
import { Cards } from "./Cards";
|
|
7
7
|
import { Exchanges } from "./Exchanges";
|
|
8
8
|
import { Labels } from "./Labels";
|
|
9
|
-
import {
|
|
9
|
+
import { Audit } from "./Logs";
|
|
10
10
|
import { Operations } from "./Operations";
|
|
11
11
|
import { Organizations } from "./Organizations";
|
|
12
12
|
import { Reports } from "./Reports";
|
|
@@ -24,7 +24,7 @@ export declare class Client extends rest.Client<gracely.Error> {
|
|
|
24
24
|
readonly exchanges: Exchanges;
|
|
25
25
|
readonly organizations: Organizations;
|
|
26
26
|
readonly reports: Reports;
|
|
27
|
-
readonly logs:
|
|
27
|
+
readonly logs: Audit;
|
|
28
28
|
readonly rules: Rules;
|
|
29
29
|
readonly settlements: Settlements;
|
|
30
30
|
readonly transactions: Transactions;
|
package/dist/Client/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Accounts } from "./Accounts";
|
|
|
5
5
|
import { Cards } from "./Cards";
|
|
6
6
|
import { Exchanges } from "./Exchanges";
|
|
7
7
|
import { Labels } from "./Labels";
|
|
8
|
-
import {
|
|
8
|
+
import { Audit } from "./Logs";
|
|
9
9
|
import { Operations } from "./Operations";
|
|
10
10
|
import { Organizations } from "./Organizations";
|
|
11
11
|
import { Reports } from "./Reports";
|
|
@@ -23,7 +23,7 @@ export class Client extends rest.Client {
|
|
|
23
23
|
this.exchanges = new Exchanges(this.client);
|
|
24
24
|
this.organizations = new Organizations(this.client);
|
|
25
25
|
this.reports = new Reports(this.client);
|
|
26
|
-
this.logs = new
|
|
26
|
+
this.logs = new Audit(this.client);
|
|
27
27
|
this.rules = new Rules(this.client);
|
|
28
28
|
this.settlements = new Settlements(this.client);
|
|
29
29
|
this.transactions = new Transactions(this.client);
|
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,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,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,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,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,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CA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AM,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAA;QACxC,OAAO,MAAoB,CAAA;IAC5B,CAAC;CACD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
import { Realm } from "../Realm";
|
|
3
|
+
export interface Configuration {
|
|
4
|
+
realm: Realm;
|
|
5
|
+
collection: string;
|
|
6
|
+
resource?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare namespace Configuration {
|
|
9
|
+
const type: isly.object.ExtendableType<Configuration>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
import { Realm } from "../Realm";
|
|
3
|
+
export var Configuration;
|
|
4
|
+
(function (Configuration) {
|
|
5
|
+
Configuration.type = isly.object({
|
|
6
|
+
realm: Realm.type,
|
|
7
|
+
collection: isly.string(),
|
|
8
|
+
resource: isly.string().optional(),
|
|
9
|
+
});
|
|
10
|
+
})(Configuration || (Configuration = {}));
|
|
11
|
+
//# sourceMappingURL=Configuration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Configuration.js","sourceRoot":"../","sources":["Log/Configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAOhC,MAAM,KAAW,aAAa,CAM7B;AAND,WAAiB,aAAa;IAChB,kBAAI,GAAG,IAAI,CAAC,MAAM,CAAgB;QAC9C,KAAK,EAAE,KAAK,CAAC,IAAI;QACjB,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE;QACzB,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAClC,CAAC,CAAA;AACH,CAAC,EANgB,aAAa,KAAb,aAAa,QAM7B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
export interface Entry {
|
|
3
|
+
message: string;
|
|
4
|
+
data?: any;
|
|
5
|
+
}
|
|
6
|
+
export declare namespace Entry {
|
|
7
|
+
type Message = Entry & {
|
|
8
|
+
resource?: string;
|
|
9
|
+
};
|
|
10
|
+
const type: isly.object.ExtendableType<Entry>;
|
|
11
|
+
namespace Message {
|
|
12
|
+
const type: isly.object.ExtendableType<Message>;
|
|
13
|
+
function to(message: string, data: any | undefined, resource: string | undefined): Entry.Message;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
export var Entry;
|
|
3
|
+
(function (Entry) {
|
|
4
|
+
Entry.type = isly.object({
|
|
5
|
+
message: isly.string(),
|
|
6
|
+
data: isly.any().optional(),
|
|
7
|
+
});
|
|
8
|
+
let Message;
|
|
9
|
+
(function (Message) {
|
|
10
|
+
Message.type = Entry.type.extend({ resource: isly.string().optional() });
|
|
11
|
+
function to(message, data, resource) {
|
|
12
|
+
const result = { message };
|
|
13
|
+
resource && (result.resource = resource);
|
|
14
|
+
data && (result.data = data);
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
Message.to = to;
|
|
18
|
+
})(Message = Entry.Message || (Entry.Message = {}));
|
|
19
|
+
})(Entry || (Entry = {}));
|
|
20
|
+
//# sourceMappingURL=Entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Entry.js","sourceRoot":"../","sources":["Log/Entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAM3B,MAAM,KAAW,KAAK,CAerB;AAfD,WAAiB,KAAK;IAER,UAAI,GAAG,IAAI,CAAC,MAAM,CAAQ;QACtC,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE;QACtB,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;KAC3B,CAAC,CAAA;IACF,IAAiB,OAAO,CAQvB;IARD,WAAiB,OAAO;QACV,YAAI,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;QACtF,SAAgB,EAAE,CAAC,OAAe,EAAE,IAAqB,EAAE,QAA4B;YACtF,MAAM,MAAM,GAAkB,EAAE,OAAO,EAAE,CAAA;YACzC,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAA;YACxC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,CAAA;YAC5B,OAAO,MAAM,CAAA;QACd,CAAC;QALe,UAAE,KAKjB,CAAA;IACF,CAAC,EARgB,OAAO,GAAP,aAAO,KAAP,aAAO,QAQvB;AACF,CAAC,EAfgB,KAAK,KAAL,KAAK,QAerB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Identifier } from "../Identifier";
|
|
2
|
+
import { Configuration } from "./Configuration";
|
|
3
|
+
import { Entry } from "./Entry";
|
|
4
|
+
export interface Log extends Configuration {
|
|
5
|
+
id: Identifier;
|
|
6
|
+
entries: Entry[];
|
|
7
|
+
}
|
|
8
|
+
export declare namespace Log {
|
|
9
|
+
function addEntry(logs: Log, entry: Entry): Log;
|
|
10
|
+
function fromConfiguration(configuration: Configuration): Log;
|
|
11
|
+
function configure(collection: string, realm: string | undefined, resource?: string): void;
|
|
12
|
+
function log(message: string, data?: any, resource?: string): void;
|
|
13
|
+
function warning(message: string, data?: any, resource?: string): void;
|
|
14
|
+
function exception(message: string, data?: any, resource?: string): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Identifier } from "../Identifier";
|
|
2
|
+
import { Configuration } from "./Configuration";
|
|
3
|
+
import { Entry } from "./Entry";
|
|
4
|
+
export var Log;
|
|
5
|
+
(function (Log) {
|
|
6
|
+
function addEntry(logs, entry) {
|
|
7
|
+
return logs.entries.concat(entry), logs;
|
|
8
|
+
}
|
|
9
|
+
Log.addEntry = addEntry;
|
|
10
|
+
function fromConfiguration(configuration) {
|
|
11
|
+
return {
|
|
12
|
+
id: Identifier.generate(),
|
|
13
|
+
...configuration,
|
|
14
|
+
entries: [],
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
Log.fromConfiguration = fromConfiguration;
|
|
18
|
+
function configure(collection, realm, resource) {
|
|
19
|
+
const configuration = { collection, realm, resource };
|
|
20
|
+
if (Configuration.type.is(configuration))
|
|
21
|
+
console.log(JSON.stringify(configuration));
|
|
22
|
+
}
|
|
23
|
+
Log.configure = configure;
|
|
24
|
+
function log(message, data, resource) {
|
|
25
|
+
console.log(JSON.stringify(Entry.Message.to(message, data, resource)));
|
|
26
|
+
}
|
|
27
|
+
Log.log = log;
|
|
28
|
+
function warning(message, data, resource) {
|
|
29
|
+
console.warn(JSON.stringify(Entry.Message.to(message, data, resource)));
|
|
30
|
+
}
|
|
31
|
+
Log.warning = warning;
|
|
32
|
+
function exception(message, data, resource) {
|
|
33
|
+
console.error(JSON.stringify(Entry.Message.to(message, data, resource)));
|
|
34
|
+
}
|
|
35
|
+
Log.exception = exception;
|
|
36
|
+
})(Log || (Log = {}));
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Log/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAM/B,MAAM,KAAW,GAAG,CAyBnB;AAzBD,WAAiB,GAAG;IACnB,SAAgB,QAAQ,CAAC,IAAS,EAAE,KAAY;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,IAAI,CAAA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AM,YAAY,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pax2pay/model-banking",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.308",
|
|
4
4
|
"description": "Library containing data model types and functions for the Pax2Pay Banking API.",
|
|
5
5
|
"author": "Pax2Pay Ltd",
|
|
6
6
|
"license": "MIT",
|
|
@@ -58,27 +58,27 @@
|
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/jest": "^29.5.12",
|
|
61
|
-
"@typescript-eslint/eslint-plugin": "7.
|
|
62
|
-
"@typescript-eslint/parser": "7.
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "7.13.0",
|
|
62
|
+
"@typescript-eslint/parser": "7.13.0",
|
|
63
63
|
"eslint": "^8.56.0",
|
|
64
64
|
"eslint-plugin-prettierx": "github:utily/eslint-plugin-prettierx#utily-20231004",
|
|
65
65
|
"eslint-plugin-simple-import-sort": "^12.1.0",
|
|
66
66
|
"jest": "^29.7.0",
|
|
67
67
|
"prettierx": "github:utily/prettierx#utily-20231004",
|
|
68
|
-
"rimraf": "^5.0.
|
|
69
|
-
"ts-jest": "^29.1.
|
|
68
|
+
"rimraf": "^5.0.7",
|
|
69
|
+
"ts-jest": "^29.1.5",
|
|
70
70
|
"typescript": "^5.4.5"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@userwidgets/model": "0.8.24",
|
|
74
|
-
"authly": "^3.
|
|
74
|
+
"authly": "^3.1.1",
|
|
75
75
|
"cloudly-http": "^0.1.7",
|
|
76
76
|
"cloudly-rest": "^0.1.4",
|
|
77
77
|
"cloudly-storage": "^0.10.6",
|
|
78
|
-
"cryptly": "^4.0.
|
|
78
|
+
"cryptly": "^4.0.5",
|
|
79
79
|
"gracely": "^2.0.8",
|
|
80
|
-
"isly": "0.1.
|
|
81
|
-
"isoly": "^2.3.
|
|
82
|
-
"selectively": "^2.0.
|
|
80
|
+
"isly": "0.1.16",
|
|
81
|
+
"isoly": "^2.3.10",
|
|
82
|
+
"selectively": "^2.0.11"
|
|
83
83
|
}
|
|
84
84
|
}
|
package/pax2pay.ts
CHANGED
package/dist/Log.js
DELETED
package/dist/Log.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Log.js","sourceRoot":"../","sources":["Log.ts"],"names":[],"mappings":""}
|