@pax2pay/model-banking 0.1.337 → 0.1.338
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/Analytics/Configuration/Base.ts +35 -0
- package/Analytics/Configuration/Operation.ts +36 -0
- package/Analytics/Configuration/Transaction.ts +105 -0
- package/Analytics/Configuration/index.ts +79 -0
- package/Analytics/index.ts +2 -0
- package/dist/Analytics/Configuration/Base.d.ts +18 -0
- package/dist/Analytics/Configuration/Base.js +24 -0
- package/dist/Analytics/Configuration/Base.js.map +1 -0
- package/dist/Analytics/Configuration/Operation.d.ts +22 -0
- package/dist/Analytics/Configuration/Operation.js +34 -0
- package/dist/Analytics/Configuration/Operation.js.map +1 -0
- package/dist/Analytics/Configuration/Transaction.d.ts +86 -0
- package/dist/Analytics/Configuration/Transaction.js +103 -0
- package/dist/Analytics/Configuration/Transaction.js.map +1 -0
- package/dist/Analytics/Configuration/index.d.ts +18 -0
- package/dist/Analytics/Configuration/index.js +50 -0
- package/dist/Analytics/Configuration/index.js.map +1 -0
- package/dist/Analytics/index.d.ts +2 -0
- package/dist/Analytics/index.js +2 -0
- package/dist/Analytics/index.js.map +1 -1
- package/package.json +6 -4
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { filter, listener } from "cloudly-analytics-common"
|
|
2
|
+
|
|
3
|
+
export namespace Base {
|
|
4
|
+
type Selectors =
|
|
5
|
+
| "realm"
|
|
6
|
+
| "entity.type"
|
|
7
|
+
| "entity.id"
|
|
8
|
+
| "action"
|
|
9
|
+
| "created"
|
|
10
|
+
| "isError"
|
|
11
|
+
| "version"
|
|
12
|
+
| "source"
|
|
13
|
+
export const mapping = {
|
|
14
|
+
realm: "realm",
|
|
15
|
+
entity: "entity.type",
|
|
16
|
+
entityId: "entity.id",
|
|
17
|
+
action: "action",
|
|
18
|
+
created: "created",
|
|
19
|
+
isError: { selector: "isError", transform: "boolean" },
|
|
20
|
+
version: "version",
|
|
21
|
+
source: "source",
|
|
22
|
+
// eslint-disable-next-line
|
|
23
|
+
} as const satisfies filter.Mapping.RecordWithSelector<Selectors>;
|
|
24
|
+
export type Fields = keyof typeof mapping
|
|
25
|
+
export const schema: listener.BigQueryApi.BaseField<Fields>[] = [
|
|
26
|
+
{ name: "realm", type: "STRING" },
|
|
27
|
+
{ name: "entity", type: "STRING" },
|
|
28
|
+
{ name: "entityId", type: "STRING" },
|
|
29
|
+
{ name: "action", type: "STRING" },
|
|
30
|
+
{ name: "created", type: "TIMESTAMP" },
|
|
31
|
+
{ name: "isError", type: "BOOLEAN" },
|
|
32
|
+
{ name: "source", type: "STRING" },
|
|
33
|
+
{ name: "version", type: "STRING" },
|
|
34
|
+
]
|
|
35
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { filter, listener } from "cloudly-analytics-common"
|
|
2
|
+
|
|
3
|
+
export namespace Operation {
|
|
4
|
+
export const mapping = {
|
|
5
|
+
account: "value.account",
|
|
6
|
+
currency: "value.currency",
|
|
7
|
+
changes: { selector: "value.changes", transform: "array" },
|
|
8
|
+
type: "value.type",
|
|
9
|
+
transaction: "value.transaction",
|
|
10
|
+
counter: { selector: "value.counter", transform: "integer"},
|
|
11
|
+
operationCreated: "value.created",
|
|
12
|
+
signature: "value.signature",
|
|
13
|
+
previous: "value.previous",
|
|
14
|
+
// eslint-disable-next-line
|
|
15
|
+
} as const satisfies filter.Mapping.RecordWithSelector<string>;
|
|
16
|
+
export type Fields = keyof typeof mapping
|
|
17
|
+
export const schema: listener.BigQueryApi.BaseField<Fields>[] = [
|
|
18
|
+
{ name: "account", type: "STRING" },
|
|
19
|
+
{ name: "currency", type: "STRING" },
|
|
20
|
+
{ name: "changes", type: "RECORD", mode: "REPEATED", fields: [
|
|
21
|
+
{ name: "key", type: "STRING" },
|
|
22
|
+
{ name: "value", type: "RECORD", fields: [
|
|
23
|
+
{ name: "type", type: "STRING" },
|
|
24
|
+
{ name: "amount", type: "NUMERIC" },
|
|
25
|
+
{ name: "status", type: "STRING" },
|
|
26
|
+
{ name: "result", type: "STRING", mode: "NULLABLE" },
|
|
27
|
+
]}
|
|
28
|
+
] },
|
|
29
|
+
{ name: "type", type: "STRING" },
|
|
30
|
+
{ name: "transaction", type: "STRING" },
|
|
31
|
+
{ name: "counter", type: "NUMERIC" },
|
|
32
|
+
{ name: "operationCreated", type: "DATETIME" },
|
|
33
|
+
{ name: "signature", type: "STRING" },
|
|
34
|
+
{ name: "previous", type: "STRING" },
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { filter, listener } from "cloudly-analytics-common"
|
|
2
|
+
|
|
3
|
+
export namespace Transaction {
|
|
4
|
+
export const mapping = {
|
|
5
|
+
counterpartType: "value.counterpart.type",
|
|
6
|
+
counterpart: { selector: "value.counterpart", transform: "stringify" },
|
|
7
|
+
counterpartCode: "value.counterpart.code",
|
|
8
|
+
currency: "value.currency",
|
|
9
|
+
amount: { selector: "value.amount", transform: "number" },
|
|
10
|
+
description: "value.description",
|
|
11
|
+
organization: "value.organization",
|
|
12
|
+
accountId: "value.accountId",
|
|
13
|
+
accountName: "value.accountName",
|
|
14
|
+
account: { selector: "value.account", transform: "stringify" },
|
|
15
|
+
accountType: "value.account.type",
|
|
16
|
+
type: "value.type",
|
|
17
|
+
direction: "value.direction",
|
|
18
|
+
id: "value.id",
|
|
19
|
+
referenceSupplier: "value.reference.supplier",
|
|
20
|
+
referenceReference: "value.reference.reference",
|
|
21
|
+
referenceReturnId: "value.reference.returnId",
|
|
22
|
+
referenceEndToEndId: "value.reference.endToEndId",
|
|
23
|
+
posted: "value.posted",
|
|
24
|
+
transacted: "value.transacted",
|
|
25
|
+
by: "value.by",
|
|
26
|
+
actualBalance: { selector: "value.balance.actual", transform: "number" },
|
|
27
|
+
reservedBalance: { selector: "value.balance.reserved", transform: "number" },
|
|
28
|
+
availableBalance: { selector: "value.balance.available", transform: "number" },
|
|
29
|
+
operations: { selector: "value.operations[*]", transform: {
|
|
30
|
+
account: "account",
|
|
31
|
+
currency: "currency",
|
|
32
|
+
changes: { selector: "changes", transform: "array" },
|
|
33
|
+
type: "type",
|
|
34
|
+
transaction: "transaction",
|
|
35
|
+
counter: { selector: "counter", transform: "integer"},
|
|
36
|
+
created: "created",
|
|
37
|
+
signature: "signature",
|
|
38
|
+
previous: "previous",
|
|
39
|
+
}},
|
|
40
|
+
status: "value.status",
|
|
41
|
+
rail: "value.rail",
|
|
42
|
+
railType: "value.rail.type",
|
|
43
|
+
flags: "value.flags",
|
|
44
|
+
oldFlags: "value.oldFlags",
|
|
45
|
+
notes: { selector: "value.notes", transform: "stringify" },
|
|
46
|
+
risk: { selector: "value.risk", transform: "number" },
|
|
47
|
+
state: { selector: "value.state", transform: "stringify" },
|
|
48
|
+
// eslint-disable-next-line
|
|
49
|
+
} as const satisfies filter.Mapping.RecordWithSelector<string>;
|
|
50
|
+
export type Fields = keyof typeof mapping
|
|
51
|
+
export const schema: listener.BigQueryApi.BaseField<Fields>[] = [
|
|
52
|
+
{ name: "counterpartType", type: "STRING" },
|
|
53
|
+
{ name: "counterpart", type: "STRING" },
|
|
54
|
+
{ name: "counterpartCode", type: "STRING", mode: "NULLABLE" },
|
|
55
|
+
{ name: "currency", type: "STRING" },
|
|
56
|
+
{ name: "amount", type: "NUMERIC" },
|
|
57
|
+
{ name: "description", type: "STRING" },
|
|
58
|
+
{ name: "organization", type: "STRING" },
|
|
59
|
+
{ name: "accountId", type: "STRING" },
|
|
60
|
+
{ name: "accountName", type: "STRING", mode: "NULLABLE" },
|
|
61
|
+
{ name: "account", type: "STRING" },
|
|
62
|
+
{ name: "accountType", type: "STRING" },
|
|
63
|
+
{ name: "type", type: "STRING", mode: "NULLABLE" },
|
|
64
|
+
{ name: "direction", type: "STRING", mode: "NULLABLE" },
|
|
65
|
+
{ name: "id", type: "STRING" },
|
|
66
|
+
{ name: "referenceSupplier", type: "STRING", mode: "NULLABLE" },
|
|
67
|
+
{ name: "referenceReference", type: "STRING", mode: "NULLABLE" },
|
|
68
|
+
{ name: "referenceReturnId", type: "STRING", mode: "NULLABLE" },
|
|
69
|
+
{ name: "referenceEndToEndId", type: "STRING", mode: "NULLABLE" },
|
|
70
|
+
{ name: "posted", type: "DATETIME" },
|
|
71
|
+
{ name: "transacted", type: "DATETIME", mode: "NULLABLE" },
|
|
72
|
+
{ name: "by", type: "STRING", mode: "NULLABLE" },
|
|
73
|
+
{ name: "actualBalance", type: "NUMERIC" },
|
|
74
|
+
{ name: "reservedBalance", type: "NUMERIC" },
|
|
75
|
+
{ name: "availableBalance", type: "NUMERIC" },
|
|
76
|
+
{ name: "operations", type: "RECORD", mode: "REPEATED", fields: [
|
|
77
|
+
{ name: "account", type: "STRING" },
|
|
78
|
+
{ name: "currency", type: "STRING" },
|
|
79
|
+
{ name: "changes", type: "RECORD", mode: "REPEATED", fields: [
|
|
80
|
+
{ name: "key", type: "STRING" },
|
|
81
|
+
{ name: "value", type: "RECORD", fields: [
|
|
82
|
+
{ name: "type", type: "STRING" },
|
|
83
|
+
{ name: "amount", type: "NUMERIC" },
|
|
84
|
+
{ name: "status", type: "STRING" },
|
|
85
|
+
{ name: "result", type: "STRING", mode: "NULLABLE" },
|
|
86
|
+
]}
|
|
87
|
+
] },
|
|
88
|
+
{ name: "type", type: "STRING" },
|
|
89
|
+
{ name: "transaction", type: "STRING" },
|
|
90
|
+
{ name: "counter", type: "NUMERIC" },
|
|
91
|
+
{ name: "created", type: "DATETIME" },
|
|
92
|
+
{ name: "signature", type: "STRING" },
|
|
93
|
+
{ name: "previous", type: "STRING" },
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
{ name: "status", type: "STRING" },
|
|
97
|
+
{ name: "rail", type: "STRING", mode: "NULLABLE" },
|
|
98
|
+
{ name: "railType", type: "STRING" },
|
|
99
|
+
{ name: "flags", type: "STRING", mode: "REPEATED" },
|
|
100
|
+
{ name: "oldFlags", type: "STRING", mode: "REPEATED" },
|
|
101
|
+
{ name: "notes", type: "STRING", mode: "REPEATED" },
|
|
102
|
+
{ name: "risk", type: "NUMERIC", mode: "NULLABLE" },
|
|
103
|
+
{ name: "state", type: "STRING", mode: "NULLABLE" },
|
|
104
|
+
]
|
|
105
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { filter, listener } from "cloudly-analytics-common"
|
|
2
|
+
import { Base as ConfigBase } from "./Base"
|
|
3
|
+
import { Operation as ConfigOperation } from "./Operation"
|
|
4
|
+
import { Transaction as ConfigTransaction } from "./Transaction"
|
|
5
|
+
|
|
6
|
+
//cSpell: ignore: paxpay nonprod
|
|
7
|
+
export namespace Configuration {
|
|
8
|
+
export import Base = ConfigBase
|
|
9
|
+
export import Transaction = ConfigTransaction
|
|
10
|
+
export import Operation = ConfigOperation
|
|
11
|
+
export type BigQueryTableConfig = {
|
|
12
|
+
projectName: "paxpay-prod" | "paxpay-nonprod"
|
|
13
|
+
datasetName: string
|
|
14
|
+
tableName: string
|
|
15
|
+
}
|
|
16
|
+
export function create(
|
|
17
|
+
name: string,
|
|
18
|
+
mapping: filter.Mapping.RecordWithSelector<string>,
|
|
19
|
+
schema: listener.BigQueryApi.BaseField[],
|
|
20
|
+
config: BigQueryTableConfig,
|
|
21
|
+
filter: string
|
|
22
|
+
): listener.BigQueryBaseConfiguration {
|
|
23
|
+
return {
|
|
24
|
+
name,
|
|
25
|
+
type: "bigquery",
|
|
26
|
+
filter: [
|
|
27
|
+
{
|
|
28
|
+
type: "selectively",
|
|
29
|
+
expression: filter,
|
|
30
|
+
},
|
|
31
|
+
{ type: "useragent" },
|
|
32
|
+
{
|
|
33
|
+
type: "mapping",
|
|
34
|
+
mapping: {
|
|
35
|
+
...Base.mapping,
|
|
36
|
+
...mapping,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
batchSize: 10,
|
|
41
|
+
batchInterval: 3,
|
|
42
|
+
...config,
|
|
43
|
+
tableSchema: [...Base.schema, ...schema],
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export const backup = create(
|
|
47
|
+
"backup",
|
|
48
|
+
{ value: { selector: "value", transform: "stringify" } },
|
|
49
|
+
[{ name: "value", type: "STRING" }],
|
|
50
|
+
{
|
|
51
|
+
projectName: "paxpay-prod",
|
|
52
|
+
datasetName: "pays_ledger",
|
|
53
|
+
tableName: "backup",
|
|
54
|
+
},
|
|
55
|
+
"source:pax2pay-worker-banking-ledger realm:within(uk, eu)"
|
|
56
|
+
)
|
|
57
|
+
export const operation = create(
|
|
58
|
+
"operations",
|
|
59
|
+
Operation.mapping,
|
|
60
|
+
Operation.schema,
|
|
61
|
+
{
|
|
62
|
+
projectName: "paxpay-prod",
|
|
63
|
+
datasetName: "pays_ledger",
|
|
64
|
+
tableName: "operations",
|
|
65
|
+
},
|
|
66
|
+
"source:pax2pay-worker-banking-ledger entity:operation realm:within(uk, eu)"
|
|
67
|
+
)
|
|
68
|
+
export const transaction = create(
|
|
69
|
+
"transactions",
|
|
70
|
+
Transaction.mapping,
|
|
71
|
+
Transaction.schema,
|
|
72
|
+
{
|
|
73
|
+
projectName: "paxpay-prod",
|
|
74
|
+
datasetName: "pays_ledger",
|
|
75
|
+
tableName: "transactions",
|
|
76
|
+
},
|
|
77
|
+
"source:pax2pay-worker-banking-ledger entity:transaction realm:within(uk, eu)"
|
|
78
|
+
)
|
|
79
|
+
}
|
package/Analytics/index.ts
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { listener } from "cloudly-analytics-common";
|
|
2
|
+
export declare namespace Base {
|
|
3
|
+
const mapping: {
|
|
4
|
+
readonly realm: "realm";
|
|
5
|
+
readonly entity: "entity.type";
|
|
6
|
+
readonly entityId: "entity.id";
|
|
7
|
+
readonly action: "action";
|
|
8
|
+
readonly created: "created";
|
|
9
|
+
readonly isError: {
|
|
10
|
+
readonly selector: "isError";
|
|
11
|
+
readonly transform: "boolean";
|
|
12
|
+
};
|
|
13
|
+
readonly version: "version";
|
|
14
|
+
readonly source: "source";
|
|
15
|
+
};
|
|
16
|
+
type Fields = keyof typeof mapping;
|
|
17
|
+
const schema: listener.BigQueryApi.BaseField<Fields>[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export var Base;
|
|
2
|
+
(function (Base) {
|
|
3
|
+
Base.mapping = {
|
|
4
|
+
realm: "realm",
|
|
5
|
+
entity: "entity.type",
|
|
6
|
+
entityId: "entity.id",
|
|
7
|
+
action: "action",
|
|
8
|
+
created: "created",
|
|
9
|
+
isError: { selector: "isError", transform: "boolean" },
|
|
10
|
+
version: "version",
|
|
11
|
+
source: "source",
|
|
12
|
+
};
|
|
13
|
+
Base.schema = [
|
|
14
|
+
{ name: "realm", type: "STRING" },
|
|
15
|
+
{ name: "entity", type: "STRING" },
|
|
16
|
+
{ name: "entityId", type: "STRING" },
|
|
17
|
+
{ name: "action", type: "STRING" },
|
|
18
|
+
{ name: "created", type: "TIMESTAMP" },
|
|
19
|
+
{ name: "isError", type: "BOOLEAN" },
|
|
20
|
+
{ name: "source", type: "STRING" },
|
|
21
|
+
{ name: "version", type: "STRING" },
|
|
22
|
+
];
|
|
23
|
+
})(Base || (Base = {}));
|
|
24
|
+
//# sourceMappingURL=Base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Base.js","sourceRoot":"../","sources":["Analytics/Configuration/Base.ts"],"names":[],"mappings":"AAEA,MAAM,KAAW,IAAI,CAgCpB;AAhCD,WAAiB,IAAI;IAUP,YAAO,GAAG;QACtB,KAAK,EAAE,OAAO;QACd,MAAM,EAAE,aAAa;QACrB,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE;QACtD,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,QAAQ;KAEgD,CAAC;IAErD,WAAM,GAA6C;QAC/D,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE;QACjC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;QAClC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE;QACpC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;QAClC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE;QACtC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;QACpC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;QAClC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE;KACnC,CAAA;AACF,CAAC,EAhCgB,IAAI,KAAJ,IAAI,QAgCpB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { listener } from "cloudly-analytics-common";
|
|
2
|
+
export declare namespace Operation {
|
|
3
|
+
const mapping: {
|
|
4
|
+
readonly account: "value.account";
|
|
5
|
+
readonly currency: "value.currency";
|
|
6
|
+
readonly changes: {
|
|
7
|
+
readonly selector: "value.changes";
|
|
8
|
+
readonly transform: "array";
|
|
9
|
+
};
|
|
10
|
+
readonly type: "value.type";
|
|
11
|
+
readonly transaction: "value.transaction";
|
|
12
|
+
readonly counter: {
|
|
13
|
+
readonly selector: "value.counter";
|
|
14
|
+
readonly transform: "integer";
|
|
15
|
+
};
|
|
16
|
+
readonly operationCreated: "value.created";
|
|
17
|
+
readonly signature: "value.signature";
|
|
18
|
+
readonly previous: "value.previous";
|
|
19
|
+
};
|
|
20
|
+
type Fields = keyof typeof mapping;
|
|
21
|
+
const schema: listener.BigQueryApi.BaseField<Fields>[];
|
|
22
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export var Operation;
|
|
2
|
+
(function (Operation) {
|
|
3
|
+
Operation.mapping = {
|
|
4
|
+
account: "value.account",
|
|
5
|
+
currency: "value.currency",
|
|
6
|
+
changes: { selector: "value.changes", transform: "array" },
|
|
7
|
+
type: "value.type",
|
|
8
|
+
transaction: "value.transaction",
|
|
9
|
+
counter: { selector: "value.counter", transform: "integer" },
|
|
10
|
+
operationCreated: "value.created",
|
|
11
|
+
signature: "value.signature",
|
|
12
|
+
previous: "value.previous",
|
|
13
|
+
};
|
|
14
|
+
Operation.schema = [
|
|
15
|
+
{ name: "account", type: "STRING" },
|
|
16
|
+
{ name: "currency", type: "STRING" },
|
|
17
|
+
{ name: "changes", type: "RECORD", mode: "REPEATED", fields: [
|
|
18
|
+
{ name: "key", type: "STRING" },
|
|
19
|
+
{ name: "value", type: "RECORD", fields: [
|
|
20
|
+
{ name: "type", type: "STRING" },
|
|
21
|
+
{ name: "amount", type: "NUMERIC" },
|
|
22
|
+
{ name: "status", type: "STRING" },
|
|
23
|
+
{ name: "result", type: "STRING", mode: "NULLABLE" },
|
|
24
|
+
] }
|
|
25
|
+
] },
|
|
26
|
+
{ name: "type", type: "STRING" },
|
|
27
|
+
{ name: "transaction", type: "STRING" },
|
|
28
|
+
{ name: "counter", type: "NUMERIC" },
|
|
29
|
+
{ name: "operationCreated", type: "DATETIME" },
|
|
30
|
+
{ name: "signature", type: "STRING" },
|
|
31
|
+
{ name: "previous", type: "STRING" },
|
|
32
|
+
];
|
|
33
|
+
})(Operation || (Operation = {}));
|
|
34
|
+
//# sourceMappingURL=Operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Operation.js","sourceRoot":"../","sources":["Analytics/Configuration/Operation.ts"],"names":[],"mappings":"AAEA,MAAM,KAAW,SAAS,CAiCzB;AAjCD,WAAiB,SAAS;IACZ,iBAAO,GAAG;QACtB,OAAO,EAAE,eAAe;QACxB,QAAQ,EAAE,gBAAgB;QAC1B,OAAO,EAAE,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE;QAC1D,IAAI,EAAE,YAAY;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,QAAQ,EAAE;KACpC,CAAA;AACF,CAAC,EAjCgB,SAAS,KAAT,SAAS,QAiCzB"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { listener } from "cloudly-analytics-common";
|
|
2
|
+
export declare namespace Transaction {
|
|
3
|
+
const mapping: {
|
|
4
|
+
readonly counterpartType: "value.counterpart.type";
|
|
5
|
+
readonly counterpart: {
|
|
6
|
+
readonly selector: "value.counterpart";
|
|
7
|
+
readonly transform: "stringify";
|
|
8
|
+
};
|
|
9
|
+
readonly counterpartCode: "value.counterpart.code";
|
|
10
|
+
readonly currency: "value.currency";
|
|
11
|
+
readonly amount: {
|
|
12
|
+
readonly selector: "value.amount";
|
|
13
|
+
readonly transform: "number";
|
|
14
|
+
};
|
|
15
|
+
readonly description: "value.description";
|
|
16
|
+
readonly organization: "value.organization";
|
|
17
|
+
readonly accountId: "value.accountId";
|
|
18
|
+
readonly accountName: "value.accountName";
|
|
19
|
+
readonly account: {
|
|
20
|
+
readonly selector: "value.account";
|
|
21
|
+
readonly transform: "stringify";
|
|
22
|
+
};
|
|
23
|
+
readonly accountType: "value.account.type";
|
|
24
|
+
readonly type: "value.type";
|
|
25
|
+
readonly direction: "value.direction";
|
|
26
|
+
readonly id: "value.id";
|
|
27
|
+
readonly referenceSupplier: "value.reference.supplier";
|
|
28
|
+
readonly referenceReference: "value.reference.reference";
|
|
29
|
+
readonly referenceReturnId: "value.reference.returnId";
|
|
30
|
+
readonly referenceEndToEndId: "value.reference.endToEndId";
|
|
31
|
+
readonly posted: "value.posted";
|
|
32
|
+
readonly transacted: "value.transacted";
|
|
33
|
+
readonly by: "value.by";
|
|
34
|
+
readonly actualBalance: {
|
|
35
|
+
readonly selector: "value.balance.actual";
|
|
36
|
+
readonly transform: "number";
|
|
37
|
+
};
|
|
38
|
+
readonly reservedBalance: {
|
|
39
|
+
readonly selector: "value.balance.reserved";
|
|
40
|
+
readonly transform: "number";
|
|
41
|
+
};
|
|
42
|
+
readonly availableBalance: {
|
|
43
|
+
readonly selector: "value.balance.available";
|
|
44
|
+
readonly transform: "number";
|
|
45
|
+
};
|
|
46
|
+
readonly operations: {
|
|
47
|
+
readonly selector: "value.operations[*]";
|
|
48
|
+
readonly transform: {
|
|
49
|
+
readonly account: "account";
|
|
50
|
+
readonly currency: "currency";
|
|
51
|
+
readonly changes: {
|
|
52
|
+
readonly selector: "changes";
|
|
53
|
+
readonly transform: "array";
|
|
54
|
+
};
|
|
55
|
+
readonly type: "type";
|
|
56
|
+
readonly transaction: "transaction";
|
|
57
|
+
readonly counter: {
|
|
58
|
+
readonly selector: "counter";
|
|
59
|
+
readonly transform: "integer";
|
|
60
|
+
};
|
|
61
|
+
readonly created: "created";
|
|
62
|
+
readonly signature: "signature";
|
|
63
|
+
readonly previous: "previous";
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
readonly status: "value.status";
|
|
67
|
+
readonly rail: "value.rail";
|
|
68
|
+
readonly railType: "value.rail.type";
|
|
69
|
+
readonly flags: "value.flags";
|
|
70
|
+
readonly oldFlags: "value.oldFlags";
|
|
71
|
+
readonly notes: {
|
|
72
|
+
readonly selector: "value.notes";
|
|
73
|
+
readonly transform: "stringify";
|
|
74
|
+
};
|
|
75
|
+
readonly risk: {
|
|
76
|
+
readonly selector: "value.risk";
|
|
77
|
+
readonly transform: "number";
|
|
78
|
+
};
|
|
79
|
+
readonly state: {
|
|
80
|
+
readonly selector: "value.state";
|
|
81
|
+
readonly transform: "stringify";
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
type Fields = keyof typeof mapping;
|
|
85
|
+
const schema: listener.BigQueryApi.BaseField<Fields>[];
|
|
86
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
export var Transaction;
|
|
2
|
+
(function (Transaction) {
|
|
3
|
+
Transaction.mapping = {
|
|
4
|
+
counterpartType: "value.counterpart.type",
|
|
5
|
+
counterpart: { selector: "value.counterpart", transform: "stringify" },
|
|
6
|
+
counterpartCode: "value.counterpart.code",
|
|
7
|
+
currency: "value.currency",
|
|
8
|
+
amount: { selector: "value.amount", transform: "number" },
|
|
9
|
+
description: "value.description",
|
|
10
|
+
organization: "value.organization",
|
|
11
|
+
accountId: "value.accountId",
|
|
12
|
+
accountName: "value.accountName",
|
|
13
|
+
account: { selector: "value.account", transform: "stringify" },
|
|
14
|
+
accountType: "value.account.type",
|
|
15
|
+
type: "value.type",
|
|
16
|
+
direction: "value.direction",
|
|
17
|
+
id: "value.id",
|
|
18
|
+
referenceSupplier: "value.reference.supplier",
|
|
19
|
+
referenceReference: "value.reference.reference",
|
|
20
|
+
referenceReturnId: "value.reference.returnId",
|
|
21
|
+
referenceEndToEndId: "value.reference.endToEndId",
|
|
22
|
+
posted: "value.posted",
|
|
23
|
+
transacted: "value.transacted",
|
|
24
|
+
by: "value.by",
|
|
25
|
+
actualBalance: { selector: "value.balance.actual", transform: "number" },
|
|
26
|
+
reservedBalance: { selector: "value.balance.reserved", transform: "number" },
|
|
27
|
+
availableBalance: { selector: "value.balance.available", transform: "number" },
|
|
28
|
+
operations: { selector: "value.operations[*]", transform: {
|
|
29
|
+
account: "account",
|
|
30
|
+
currency: "currency",
|
|
31
|
+
changes: { selector: "changes", transform: "array" },
|
|
32
|
+
type: "type",
|
|
33
|
+
transaction: "transaction",
|
|
34
|
+
counter: { selector: "counter", transform: "integer" },
|
|
35
|
+
created: "created",
|
|
36
|
+
signature: "signature",
|
|
37
|
+
previous: "previous",
|
|
38
|
+
} },
|
|
39
|
+
status: "value.status",
|
|
40
|
+
rail: "value.rail",
|
|
41
|
+
railType: "value.rail.type",
|
|
42
|
+
flags: "value.flags",
|
|
43
|
+
oldFlags: "value.oldFlags",
|
|
44
|
+
notes: { selector: "value.notes", transform: "stringify" },
|
|
45
|
+
risk: { selector: "value.risk", transform: "number" },
|
|
46
|
+
state: { selector: "value.state", transform: "stringify" },
|
|
47
|
+
};
|
|
48
|
+
Transaction.schema = [
|
|
49
|
+
{ name: "counterpartType", type: "STRING" },
|
|
50
|
+
{ name: "counterpart", type: "STRING" },
|
|
51
|
+
{ name: "counterpartCode", type: "STRING", mode: "NULLABLE" },
|
|
52
|
+
{ name: "currency", type: "STRING" },
|
|
53
|
+
{ name: "amount", type: "NUMERIC" },
|
|
54
|
+
{ name: "description", type: "STRING" },
|
|
55
|
+
{ name: "organization", type: "STRING" },
|
|
56
|
+
{ name: "accountId", type: "STRING" },
|
|
57
|
+
{ name: "accountName", type: "STRING", mode: "NULLABLE" },
|
|
58
|
+
{ name: "account", type: "STRING" },
|
|
59
|
+
{ name: "accountType", type: "STRING" },
|
|
60
|
+
{ name: "type", type: "STRING", mode: "NULLABLE" },
|
|
61
|
+
{ name: "direction", type: "STRING", mode: "NULLABLE" },
|
|
62
|
+
{ name: "id", type: "STRING" },
|
|
63
|
+
{ name: "referenceSupplier", type: "STRING", mode: "NULLABLE" },
|
|
64
|
+
{ name: "referenceReference", type: "STRING", mode: "NULLABLE" },
|
|
65
|
+
{ name: "referenceReturnId", type: "STRING", mode: "NULLABLE" },
|
|
66
|
+
{ name: "referenceEndToEndId", type: "STRING", mode: "NULLABLE" },
|
|
67
|
+
{ name: "posted", type: "DATETIME" },
|
|
68
|
+
{ name: "transacted", type: "DATETIME", mode: "NULLABLE" },
|
|
69
|
+
{ name: "by", type: "STRING", mode: "NULLABLE" },
|
|
70
|
+
{ name: "actualBalance", type: "NUMERIC" },
|
|
71
|
+
{ name: "reservedBalance", type: "NUMERIC" },
|
|
72
|
+
{ name: "availableBalance", type: "NUMERIC" },
|
|
73
|
+
{ name: "operations", type: "RECORD", mode: "REPEATED", fields: [
|
|
74
|
+
{ name: "account", type: "STRING" },
|
|
75
|
+
{ name: "currency", type: "STRING" },
|
|
76
|
+
{ name: "changes", type: "RECORD", mode: "REPEATED", fields: [
|
|
77
|
+
{ name: "key", type: "STRING" },
|
|
78
|
+
{ name: "value", type: "RECORD", fields: [
|
|
79
|
+
{ name: "type", type: "STRING" },
|
|
80
|
+
{ name: "amount", type: "NUMERIC" },
|
|
81
|
+
{ name: "status", type: "STRING" },
|
|
82
|
+
{ name: "result", type: "STRING", mode: "NULLABLE" },
|
|
83
|
+
] }
|
|
84
|
+
] },
|
|
85
|
+
{ name: "type", type: "STRING" },
|
|
86
|
+
{ name: "transaction", type: "STRING" },
|
|
87
|
+
{ name: "counter", type: "NUMERIC" },
|
|
88
|
+
{ name: "created", type: "DATETIME" },
|
|
89
|
+
{ name: "signature", type: "STRING" },
|
|
90
|
+
{ name: "previous", type: "STRING" },
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{ name: "status", type: "STRING" },
|
|
94
|
+
{ name: "rail", type: "STRING", mode: "NULLABLE" },
|
|
95
|
+
{ name: "railType", type: "STRING" },
|
|
96
|
+
{ name: "flags", type: "STRING", mode: "REPEATED" },
|
|
97
|
+
{ name: "oldFlags", type: "STRING", mode: "REPEATED" },
|
|
98
|
+
{ name: "notes", type: "STRING", mode: "REPEATED" },
|
|
99
|
+
{ name: "risk", type: "NUMERIC", mode: "NULLABLE" },
|
|
100
|
+
{ name: "state", type: "STRING", mode: "NULLABLE" },
|
|
101
|
+
];
|
|
102
|
+
})(Transaction || (Transaction = {}));
|
|
103
|
+
//# sourceMappingURL=Transaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Transaction.js","sourceRoot":"../","sources":["Analytics/Configuration/Transaction.ts"],"names":[],"mappings":"AAEA,MAAM,KAAW,WAAW,CAsG3B;AAtGD,WAAiB,WAAW;IACd,mBAAO,GAAG;QACtB,eAAe,EAAE,wBAAwB;QACzC,WAAW,EAAE,EAAE,QAAQ,EAAE,mBAAmB,EAAE,SAAS,EAAE,WAAW,EAAE;QACtE,eAAe,EAAE,wBAAwB;QACzC,QAAQ,EAAE,gBAAgB;QAC1B,MAAM,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,SAAS,EAAE,QAAQ,EAAE;QACzD,WAAW,EAAE,mBAAmB;QAChC,YAAY,EAAE,oBAAoB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AAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE;KACnD,CAAA;AACF,CAAC,EAtGgB,WAAW,KAAX,WAAW,QAsG3B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { filter, listener } from "cloudly-analytics-common";
|
|
2
|
+
import { Base as ConfigBase } from "./Base";
|
|
3
|
+
import { Operation as ConfigOperation } from "./Operation";
|
|
4
|
+
import { Transaction as ConfigTransaction } from "./Transaction";
|
|
5
|
+
export declare namespace Configuration {
|
|
6
|
+
export import Base = ConfigBase;
|
|
7
|
+
export import Transaction = ConfigTransaction;
|
|
8
|
+
export import Operation = ConfigOperation;
|
|
9
|
+
type BigQueryTableConfig = {
|
|
10
|
+
projectName: "paxpay-prod" | "paxpay-nonprod";
|
|
11
|
+
datasetName: string;
|
|
12
|
+
tableName: string;
|
|
13
|
+
};
|
|
14
|
+
function create(name: string, mapping: filter.Mapping.RecordWithSelector<string>, schema: listener.BigQueryApi.BaseField[], config: BigQueryTableConfig, filter: string): listener.BigQueryBaseConfiguration;
|
|
15
|
+
const backup: listener.BigQueryBaseConfiguration;
|
|
16
|
+
const operation: listener.BigQueryBaseConfiguration;
|
|
17
|
+
const transaction: listener.BigQueryBaseConfiguration;
|
|
18
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Base as ConfigBase } from "./Base";
|
|
2
|
+
import { Operation as ConfigOperation } from "./Operation";
|
|
3
|
+
import { Transaction as ConfigTransaction } from "./Transaction";
|
|
4
|
+
export var Configuration;
|
|
5
|
+
(function (Configuration) {
|
|
6
|
+
Configuration.Base = ConfigBase;
|
|
7
|
+
Configuration.Transaction = ConfigTransaction;
|
|
8
|
+
Configuration.Operation = ConfigOperation;
|
|
9
|
+
function create(name, mapping, schema, config, filter) {
|
|
10
|
+
return {
|
|
11
|
+
name,
|
|
12
|
+
type: "bigquery",
|
|
13
|
+
filter: [
|
|
14
|
+
{
|
|
15
|
+
type: "selectively",
|
|
16
|
+
expression: filter,
|
|
17
|
+
},
|
|
18
|
+
{ type: "useragent" },
|
|
19
|
+
{
|
|
20
|
+
type: "mapping",
|
|
21
|
+
mapping: {
|
|
22
|
+
...Configuration.Base.mapping,
|
|
23
|
+
...mapping,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
batchSize: 10,
|
|
28
|
+
batchInterval: 3,
|
|
29
|
+
...config,
|
|
30
|
+
tableSchema: [...Configuration.Base.schema, ...schema],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
Configuration.create = create;
|
|
34
|
+
Configuration.backup = create("backup", { value: { selector: "value", transform: "stringify" } }, [{ name: "value", type: "STRING" }], {
|
|
35
|
+
projectName: "paxpay-prod",
|
|
36
|
+
datasetName: "pays_ledger",
|
|
37
|
+
tableName: "backup",
|
|
38
|
+
}, "source:pax2pay-worker-banking-ledger realm:within(uk, eu)");
|
|
39
|
+
Configuration.operation = create("operations", Configuration.Operation.mapping, Configuration.Operation.schema, {
|
|
40
|
+
projectName: "paxpay-prod",
|
|
41
|
+
datasetName: "pays_ledger",
|
|
42
|
+
tableName: "operations",
|
|
43
|
+
}, "source:pax2pay-worker-banking-ledger entity:operation realm:within(uk, eu)");
|
|
44
|
+
Configuration.transaction = create("transactions", Configuration.Transaction.mapping, Configuration.Transaction.schema, {
|
|
45
|
+
projectName: "paxpay-prod",
|
|
46
|
+
datasetName: "pays_ledger",
|
|
47
|
+
tableName: "transactions",
|
|
48
|
+
}, "source:pax2pay-worker-banking-ledger entity:transaction realm:within(uk, eu)");
|
|
49
|
+
})(Configuration || (Configuration = {}));
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Analytics/Configuration/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,QAAQ,CAAA;AAC3C,OAAO,EAAE,SAAS,IAAI,eAAe,EAAE,MAAM,a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W,EAAE,aAAa;QAC1B,SAAS,EAAE,YAAY;KACvB,EACD,4EAA4E,CAC5E,CAAA;IACY,yBAAW,GAAG,MAAM,CAChC,cAAc,EACd,cAAA,WAAW,CAAC,OAAO,EACnB,cAAA,WAAW,CAAC,MAAM,EAClB;QACC,WAAW,EAAE,aAAa;QAC1B,WAAW,EAAE,aAAa;QAC1B,SAAS,EAAE,cAAc;KACzB,EACD,8EAA8E,CAC9E,CAAA;AACF,CAAC,EAxEgB,aAAa,KAAb,aAAa,QAwE7B"}
|
package/dist/Analytics/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { Configuration as AnalyticsConfiguration } from "./Configuration";
|
|
1
2
|
import { Event as AnalyticsEvent } from "./Event";
|
|
2
3
|
export var Analytics;
|
|
3
4
|
(function (Analytics) {
|
|
4
5
|
Analytics.Event = AnalyticsEvent;
|
|
6
|
+
Analytics.Configuration = AnalyticsConfiguration;
|
|
5
7
|
})(Analytics || (Analytics = {}));
|
|
6
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Analytics/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,SAAS,CAAA;AAEjD,MAAM,KAAW,SAAS,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Analytics/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AACzE,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,SAAS,CAAA;AAEjD,MAAM,KAAW,SAAS,CAGzB;AAHD,WAAiB,SAAS;IACX,eAAK,GAAG,cAAc,CAAA;IACtB,uBAAa,GAAG,sBAAsB,CAAA;AACrD,CAAC,EAHgB,SAAS,KAAT,SAAS,QAGzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pax2pay/model-banking",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.338",
|
|
4
4
|
"description": "Library containing data model types and functions for the Pax2Pay Banking API.",
|
|
5
5
|
"author": "Pax2Pay Ltd",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,10 +57,11 @@
|
|
|
57
57
|
"semver": "7.5.3"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@cloudflare/workers-types": "^4.
|
|
60
|
+
"@cloudflare/workers-types": "^4.20240815.0",
|
|
61
61
|
"@types/jest": "^29.5.12",
|
|
62
|
-
"@typescript-eslint/eslint-plugin": "8.0
|
|
63
|
-
"@typescript-eslint/parser": "8.0
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "8.2.0",
|
|
63
|
+
"@typescript-eslint/parser": "8.2.0",
|
|
64
|
+
"cloudly-analytics-administration": "^0.3.26",
|
|
64
65
|
"eslint": "^8.57.0",
|
|
65
66
|
"eslint-plugin-prettierx": "github:utily/eslint-plugin-prettierx#utily-20231004",
|
|
66
67
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
@@ -73,6 +74,7 @@
|
|
|
73
74
|
"dependencies": {
|
|
74
75
|
"@userwidgets/model": "0.8.30",
|
|
75
76
|
"authly": "^3.1.1",
|
|
77
|
+
"cloudly-analytics-common": "^0.3.26",
|
|
76
78
|
"cloudly-http": "^0.1.7",
|
|
77
79
|
"cloudly-rest": "^0.1.4",
|
|
78
80
|
"cloudly-storage": "^0.10.8",
|