@pax2pay/model-banking 0.1.332 → 0.1.334
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/index.ts +0 -2
- package/Operation/Creatable.ts +1 -2
- package/Transaction/index.ts +41 -21
- package/dist/Analytics/index.d.ts +0 -2
- package/dist/Analytics/index.js +0 -2
- package/dist/Analytics/index.js.map +1 -1
- package/dist/Operation/Creatable.d.ts +1 -2
- package/dist/Operation/Creatable.js +1 -1
- package/dist/Operation/Creatable.js.map +1 -1
- package/dist/Transaction/index.d.ts +15 -1
- package/dist/Transaction/index.js +28 -8
- package/dist/Transaction/index.js.map +1 -1
- package/package.json +1 -2
- package/Analytics/Configuration/Base.ts +0 -36
- package/Analytics/Configuration/Mapping.ts +0 -13
- package/Analytics/Configuration/Operation.ts +0 -37
- package/Analytics/Configuration/Schema.ts +0 -7
- package/Analytics/Configuration/Transaction.ts +0 -106
- package/Analytics/Configuration/index.ts +0 -83
- package/dist/Analytics/Configuration/Base.d.ts +0 -18
- package/dist/Analytics/Configuration/Base.js +0 -24
- package/dist/Analytics/Configuration/Base.js.map +0 -1
- package/dist/Analytics/Configuration/Mapping.d.ts +0 -11
- package/dist/Analytics/Configuration/Mapping.js +0 -12
- package/dist/Analytics/Configuration/Mapping.js.map +0 -1
- package/dist/Analytics/Configuration/Operation.d.ts +0 -22
- package/dist/Analytics/Configuration/Operation.js +0 -34
- package/dist/Analytics/Configuration/Operation.js.map +0 -1
- package/dist/Analytics/Configuration/Schema.d.ts +0 -6
- package/dist/Analytics/Configuration/Schema.js +0 -7
- package/dist/Analytics/Configuration/Schema.js.map +0 -1
- package/dist/Analytics/Configuration/Transaction.d.ts +0 -86
- package/dist/Analytics/Configuration/Transaction.js +0 -103
- package/dist/Analytics/Configuration/Transaction.js.map +0 -1
- package/dist/Analytics/Configuration/index.d.ts +0 -22
- package/dist/Analytics/Configuration/index.js +0 -54
- package/dist/Analytics/Configuration/index.js.map +0 -1
package/Analytics/index.ts
CHANGED
package/Operation/Creatable.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { cryptly } from "cryptly"
|
|
2
2
|
import { isoly } from "isoly"
|
|
3
3
|
import { isly } from "isly"
|
|
4
|
-
import { Card } from "../Card"
|
|
5
4
|
import { Settlement } from "../Settlement"
|
|
6
5
|
import { Changes } from "./Changes"
|
|
7
6
|
|
|
@@ -37,7 +36,7 @@ export namespace Creatable {
|
|
|
37
36
|
})
|
|
38
37
|
export const is = type.is
|
|
39
38
|
export const flaw = type.flaw
|
|
40
|
-
export function fromRefund(account: string, entry: Settlement.Entry.Refund.Creatable
|
|
39
|
+
export function fromRefund(account: string, entry: Settlement.Entry.Refund.Creatable): Creatable {
|
|
41
40
|
// The Entry.Refund.Creatable has negative amount and fee
|
|
42
41
|
// The operation amounts should always be positive
|
|
43
42
|
const [currency, entryAmount] = entry.amount
|
package/Transaction/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { Operation } from "../Operation"
|
|
|
6
6
|
import { Rail } from "../Rail"
|
|
7
7
|
import { Report } from "../Report"
|
|
8
8
|
import type { Rule } from "../Rule"
|
|
9
|
+
import { Settlement } from "../Settlement"
|
|
9
10
|
import { Creatable as TransactionCreatable } from "./Creatable"
|
|
10
11
|
import { Incoming as TransactionIncoming } from "./Incoming"
|
|
11
12
|
import { Note as TransactionNote } from "./Note"
|
|
@@ -28,11 +29,7 @@ export interface Transaction {
|
|
|
28
29
|
posted: isoly.DateTime
|
|
29
30
|
transacted?: isoly.DateTime
|
|
30
31
|
by?: string
|
|
31
|
-
balance: {
|
|
32
|
-
actual: number
|
|
33
|
-
reserved: number
|
|
34
|
-
available: number
|
|
35
|
-
}
|
|
32
|
+
balance: { actual: number; reserved: number; available: number }
|
|
36
33
|
operations: Operation[]
|
|
37
34
|
status: Transaction.Status
|
|
38
35
|
rail?: Rail
|
|
@@ -169,28 +166,51 @@ export namespace Transaction {
|
|
|
169
166
|
}
|
|
170
167
|
}
|
|
171
168
|
export function fromIncoming(
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
actual: number
|
|
179
|
-
reserved: number
|
|
180
|
-
available: number
|
|
181
|
-
}
|
|
169
|
+
transaction: Transaction.Incoming,
|
|
170
|
+
id: string,
|
|
171
|
+
state: Rule.State.Evaluated,
|
|
172
|
+
account: { id: string; name: string; organization: string },
|
|
173
|
+
balance: { actual: number; reserved: number; available: number },
|
|
174
|
+
operation: Operation | undefined
|
|
182
175
|
): Transaction {
|
|
183
|
-
const
|
|
176
|
+
const status: Transaction.Status =
|
|
177
|
+
state.outcome == "reject" ? ["rejected", "denied"] : state.outcome == "review" ? "review" : "processing"
|
|
184
178
|
return {
|
|
185
179
|
...transaction,
|
|
186
|
-
type: getType(transaction.counterpart,
|
|
180
|
+
type: getType(transaction.counterpart, account.name),
|
|
187
181
|
direction: "inbound",
|
|
188
|
-
organization,
|
|
189
|
-
accountId,
|
|
190
|
-
accountName,
|
|
182
|
+
organization: account.organization,
|
|
183
|
+
accountId: account.id,
|
|
184
|
+
accountName: account.name,
|
|
185
|
+
balance,
|
|
186
|
+
id,
|
|
187
|
+
operations: !operation ? [] : [operation],
|
|
188
|
+
status,
|
|
189
|
+
flags: state.flags,
|
|
190
|
+
oldFlags: [],
|
|
191
|
+
notes: state.notes,
|
|
192
|
+
state,
|
|
193
|
+
risk: state.transaction.risk,
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
export function fromRefund(
|
|
197
|
+
refund: Settlement.Entry.Refund.Creatable,
|
|
198
|
+
id: string,
|
|
199
|
+
account: { id: string; name: string; organization: string },
|
|
200
|
+
card: Rail.Address.Card,
|
|
201
|
+
operation: Operation,
|
|
202
|
+
balance: { actual: number; reserved: number; available: number }
|
|
203
|
+
): Transaction {
|
|
204
|
+
return {
|
|
205
|
+
...Incoming.fromRefund(refund, card),
|
|
206
|
+
type: "card",
|
|
207
|
+
direction: "inbound",
|
|
208
|
+
organization: account.organization,
|
|
209
|
+
accountId: account.id,
|
|
210
|
+
accountName: account.name,
|
|
191
211
|
balance,
|
|
192
212
|
id,
|
|
193
|
-
operations:
|
|
213
|
+
operations: [operation],
|
|
194
214
|
status: "review",
|
|
195
215
|
flags: [],
|
|
196
216
|
oldFlags: [],
|
package/dist/Analytics/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { Configuration as AnalyticsConfiguration } from "./Configuration";
|
|
2
1
|
import { Event as AnalyticsEvent } from "./Event";
|
|
3
2
|
export var Analytics;
|
|
4
3
|
(function (Analytics) {
|
|
5
4
|
Analytics.Event = AnalyticsEvent;
|
|
6
|
-
Analytics.Configuration = AnalyticsConfiguration;
|
|
7
5
|
})(Analytics || (Analytics = {}));
|
|
8
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Analytics/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
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,CAEzB;AAFD,WAAiB,SAAS;IACX,eAAK,GAAG,cAAc,CAAA;AACrC,CAAC,EAFgB,SAAS,KAAT,SAAS,QAEzB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { cryptly } from "cryptly";
|
|
2
2
|
import { isoly } from "isoly";
|
|
3
3
|
import { isly } from "isly";
|
|
4
|
-
import { Card } from "../Card";
|
|
5
4
|
import { Settlement } from "../Settlement";
|
|
6
5
|
import { Changes } from "./Changes";
|
|
7
6
|
export interface Creatable {
|
|
@@ -16,5 +15,5 @@ export declare namespace Creatable {
|
|
|
16
15
|
const type: isly.object.ExtendableType<Creatable>;
|
|
17
16
|
const is: isly.Type.IsFunction<Creatable>;
|
|
18
17
|
const flaw: isly.Type.FlawFunction;
|
|
19
|
-
function fromRefund(account: string, entry: Settlement.Entry.Refund.Creatable
|
|
18
|
+
function fromRefund(account: string, entry: Settlement.Entry.Refund.Creatable): Creatable;
|
|
20
19
|
}
|
|
@@ -27,7 +27,7 @@ export var Creatable;
|
|
|
27
27
|
});
|
|
28
28
|
Creatable.is = Creatable.type.is;
|
|
29
29
|
Creatable.flaw = Creatable.type.flaw;
|
|
30
|
-
function fromRefund(account, entry
|
|
30
|
+
function fromRefund(account, entry) {
|
|
31
31
|
const [currency, entryAmount] = entry.amount;
|
|
32
32
|
const operationAmount = Math.abs(entryAmount);
|
|
33
33
|
const operationFee = Math.abs(entry.fee.other[currency] ?? 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Creatable.js","sourceRoot":"../","sources":["Operation/Creatable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"Creatable.js","sourceRoot":"../","sources":["Operation/Creatable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AASnC,MAAM,KAAW,SAAS,CAiDzB;AAjDD,WAAiB,SAAS;IACZ,eAAK,GAAG;QACpB,UAAU;QACV,kBAAkB;QAClB,UAAU;QACV,kBAAkB;QAClB,eAAe;QACf,SAAS;QACT,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,SAAS;QACT,QAAQ;QACR,MAAM;QACN,QAAQ;KACC,CAAA;IAEG,cAAI,GA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EAjDgB,SAAS,KAAT,SAAS,QAiDzB"}
|
|
@@ -4,6 +4,7 @@ import { isly } from "isly";
|
|
|
4
4
|
import { Operation } from "../Operation";
|
|
5
5
|
import { Rail } from "../Rail";
|
|
6
6
|
import type { Rule } from "../Rule";
|
|
7
|
+
import { Settlement } from "../Settlement";
|
|
7
8
|
import { Creatable as TransactionCreatable } from "./Creatable";
|
|
8
9
|
import { Incoming as TransactionIncoming } from "./Incoming";
|
|
9
10
|
import { Note as TransactionNote } from "./Note";
|
|
@@ -86,7 +87,20 @@ export declare namespace Transaction {
|
|
|
86
87
|
reserved: number;
|
|
87
88
|
available: number;
|
|
88
89
|
}, by: string | undefined): Transaction;
|
|
89
|
-
function fromIncoming(
|
|
90
|
+
function fromIncoming(transaction: Transaction.Incoming, id: string, state: Rule.State.Evaluated, account: {
|
|
91
|
+
id: string;
|
|
92
|
+
name: string;
|
|
93
|
+
organization: string;
|
|
94
|
+
}, balance: {
|
|
95
|
+
actual: number;
|
|
96
|
+
reserved: number;
|
|
97
|
+
available: number;
|
|
98
|
+
}, operation: Operation | undefined): Transaction;
|
|
99
|
+
function fromRefund(refund: Settlement.Entry.Refund.Creatable, id: string, account: {
|
|
100
|
+
id: string;
|
|
101
|
+
name: string;
|
|
102
|
+
organization: string;
|
|
103
|
+
}, card: Rail.Address.Card, operation: Operation, balance: {
|
|
90
104
|
actual: number;
|
|
91
105
|
reserved: number;
|
|
92
106
|
available: number;
|
|
@@ -124,25 +124,45 @@ export var Transaction;
|
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
Transaction.empty = empty;
|
|
127
|
-
function fromIncoming(
|
|
128
|
-
const
|
|
127
|
+
function fromIncoming(transaction, id, state, account, balance, operation) {
|
|
128
|
+
const status = state.outcome == "reject" ? ["rejected", "denied"] : state.outcome == "review" ? "review" : "processing";
|
|
129
129
|
return {
|
|
130
130
|
...transaction,
|
|
131
|
-
type: getType(transaction.counterpart,
|
|
131
|
+
type: getType(transaction.counterpart, account.name),
|
|
132
132
|
direction: "inbound",
|
|
133
|
-
organization,
|
|
134
|
-
accountId,
|
|
135
|
-
accountName,
|
|
133
|
+
organization: account.organization,
|
|
134
|
+
accountId: account.id,
|
|
135
|
+
accountName: account.name,
|
|
136
|
+
balance,
|
|
137
|
+
id,
|
|
138
|
+
operations: !operation ? [] : [operation],
|
|
139
|
+
status,
|
|
140
|
+
flags: state.flags,
|
|
141
|
+
oldFlags: [],
|
|
142
|
+
notes: state.notes,
|
|
143
|
+
state,
|
|
144
|
+
risk: state.transaction.risk,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
Transaction.fromIncoming = fromIncoming;
|
|
148
|
+
function fromRefund(refund, id, account, card, operation, balance) {
|
|
149
|
+
return {
|
|
150
|
+
...Transaction.Incoming.fromRefund(refund, card),
|
|
151
|
+
type: "card",
|
|
152
|
+
direction: "inbound",
|
|
153
|
+
organization: account.organization,
|
|
154
|
+
accountId: account.id,
|
|
155
|
+
accountName: account.name,
|
|
136
156
|
balance,
|
|
137
157
|
id,
|
|
138
|
-
operations:
|
|
158
|
+
operations: [operation],
|
|
139
159
|
status: "review",
|
|
140
160
|
flags: [],
|
|
141
161
|
oldFlags: [],
|
|
142
162
|
notes: [],
|
|
143
163
|
};
|
|
144
164
|
}
|
|
145
|
-
Transaction.
|
|
165
|
+
Transaction.fromRefund = fromRefund;
|
|
146
166
|
function isIdentifier(value) {
|
|
147
167
|
return typeof value == "string";
|
|
148
168
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Transaction/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,MAA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OAAO,CAAC;YACjC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC;gBAChD,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;gBACrB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAA;IACd,CAAC;IACD,SAAgB,KAAK,CAAC,YAA2B;QAChD,OAAO,MAAM,CAAC,KAAK,CAClB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EACnB,YAAY,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAC9B,MAAM,CAAC,GAAG,CAAC,KAAK,CACf,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,EAC9C,GAAG,CACH,CACD,EACD,GAAG,CACH,CAAA;IACF,CAAC;IAXe,iBAAK,QAWpB,CAAA;AACF,CAAC,EAnQgB,WAAW,KAAX,WAAW,QAmQ3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pax2pay/model-banking",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.334",
|
|
4
4
|
"description": "Library containing data model types and functions for the Pax2Pay Banking API.",
|
|
5
5
|
"author": "Pax2Pay Ltd",
|
|
6
6
|
"license": "MIT",
|
|
@@ -73,7 +73,6 @@
|
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@userwidgets/model": "0.8.30",
|
|
75
75
|
"authly": "^3.1.1",
|
|
76
|
-
"cloudly-analytics-administration": "^0.3.25",
|
|
77
76
|
"cloudly-http": "^0.1.7",
|
|
78
77
|
"cloudly-rest": "^0.1.4",
|
|
79
78
|
"cloudly-storage": "^0.10.8",
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Mapping } from "./Mapping"
|
|
2
|
-
import { Schema } from "./Schema"
|
|
3
|
-
|
|
4
|
-
export namespace Base {
|
|
5
|
-
type Selectors =
|
|
6
|
-
| "realm"
|
|
7
|
-
| "entity.type"
|
|
8
|
-
| "entity.id"
|
|
9
|
-
| "action"
|
|
10
|
-
| "created"
|
|
11
|
-
| "isError"
|
|
12
|
-
| "version"
|
|
13
|
-
| "source"
|
|
14
|
-
export const mapping = {
|
|
15
|
-
realm: "realm",
|
|
16
|
-
entity: "entity.type",
|
|
17
|
-
entityId: "entity.id",
|
|
18
|
-
action: "action",
|
|
19
|
-
created: "created",
|
|
20
|
-
isError: { selector: "isError", transform: "boolean" },
|
|
21
|
-
version: "version",
|
|
22
|
-
source: "source",
|
|
23
|
-
// eslint-disable-next-line
|
|
24
|
-
} as const satisfies Mapping<Selectors>;
|
|
25
|
-
export type Fields = keyof typeof mapping
|
|
26
|
-
export const schema: Schema<Fields> = [
|
|
27
|
-
{ name: "realm", type: "STRING" },
|
|
28
|
-
{ name: "entity", type: "STRING" },
|
|
29
|
-
{ name: "entityId", type: "STRING" },
|
|
30
|
-
{ name: "action", type: "STRING" },
|
|
31
|
-
{ name: "created", type: "TIMESTAMP" },
|
|
32
|
-
{ name: "isError", type: "BOOLEAN" },
|
|
33
|
-
{ name: "source", type: "STRING" },
|
|
34
|
-
{ name: "version", type: "STRING" },
|
|
35
|
-
]
|
|
36
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Filter } from "cloudly-analytics-administration"
|
|
2
|
-
import { isly } from "isly"
|
|
3
|
-
|
|
4
|
-
export type Mapping<T extends string = string> = Filter.Mapping.RecordWithSelector<T>
|
|
5
|
-
|
|
6
|
-
export namespace Mapping {
|
|
7
|
-
export type Field = string | Filter.Mapping.Getter
|
|
8
|
-
export namespace Field {
|
|
9
|
-
export import Transform = Filter.Mapping.Transform
|
|
10
|
-
export const type = isly.union(isly.string(), Filter.Mapping.Getter.type)
|
|
11
|
-
}
|
|
12
|
-
export const type = isly.record<Mapping>(isly.string(), Field.type)
|
|
13
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Mapping } from "./Mapping"
|
|
2
|
-
import { Schema } from "./Schema"
|
|
3
|
-
|
|
4
|
-
export namespace Operation {
|
|
5
|
-
export const mapping = {
|
|
6
|
-
account: "value.account",
|
|
7
|
-
currency: "value.currency",
|
|
8
|
-
changes: { selector: "value.changes", transform: "array" },
|
|
9
|
-
type: "value.type",
|
|
10
|
-
transaction: "value.transaction",
|
|
11
|
-
counter: { selector: "value.counter", transform: "integer"},
|
|
12
|
-
operationCreated: "value.created",
|
|
13
|
-
signature: "value.signature",
|
|
14
|
-
previous: "value.previous",
|
|
15
|
-
// eslint-disable-next-line
|
|
16
|
-
} as const satisfies Mapping
|
|
17
|
-
export type Fields = keyof typeof mapping
|
|
18
|
-
export const schema: Schema<Fields> = [
|
|
19
|
-
{ name: "account", type: "STRING" },
|
|
20
|
-
{ name: "currency", type: "STRING" },
|
|
21
|
-
{ name: "changes", type: "RECORD", mode: "REPEATED", fields: [
|
|
22
|
-
{ name: "key", type: "STRING" },
|
|
23
|
-
{ name: "value", type: "RECORD", fields: [
|
|
24
|
-
{ name: "type", type: "STRING" },
|
|
25
|
-
{ name: "amount", type: "NUMERIC" },
|
|
26
|
-
{ name: "status", type: "STRING" },
|
|
27
|
-
{ name: "result", type: "STRING", mode: "NULLABLE" },
|
|
28
|
-
]}
|
|
29
|
-
] },
|
|
30
|
-
{ name: "type", type: "STRING" },
|
|
31
|
-
{ name: "transaction", type: "STRING" },
|
|
32
|
-
{ name: "counter", type: "NUMERIC" },
|
|
33
|
-
{ name: "operationCreated", type: "DATETIME" },
|
|
34
|
-
{ name: "signature", type: "STRING" },
|
|
35
|
-
{ name: "previous", type: "STRING" },
|
|
36
|
-
]
|
|
37
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Listener } from "cloudly-analytics-administration"
|
|
2
|
-
|
|
3
|
-
export type Schema<T extends string = string> = Schema.Field<T>[]
|
|
4
|
-
export namespace Schema {
|
|
5
|
-
export import Field = Listener.Configuration.BigQuery.Api.BaseField
|
|
6
|
-
export const type = Field.type.array()
|
|
7
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { Mapping } from "./Mapping"
|
|
2
|
-
import { Schema } from "./Schema"
|
|
3
|
-
|
|
4
|
-
export namespace Transaction {
|
|
5
|
-
export const mapping = {
|
|
6
|
-
counterpartType: "value.counterpart.type",
|
|
7
|
-
counterpart: { selector: "value.counterpart", transform: "stringify" },
|
|
8
|
-
counterpartCode: "value.counterpart.code",
|
|
9
|
-
currency: "value.currency",
|
|
10
|
-
amount: { selector: "value.amount", transform: "number" },
|
|
11
|
-
description: "value.description",
|
|
12
|
-
organization: "value.organization",
|
|
13
|
-
accountId: "value.accountId",
|
|
14
|
-
accountName: "value.accountName",
|
|
15
|
-
account: { selector: "value.account", transform: "stringify" },
|
|
16
|
-
accountType: "value.account.type",
|
|
17
|
-
type: "value.type",
|
|
18
|
-
direction: "value.direction",
|
|
19
|
-
id: "value.id",
|
|
20
|
-
referenceSupplier: "value.reference.supplier",
|
|
21
|
-
referenceReference: "value.reference.reference",
|
|
22
|
-
referenceReturnId: "value.reference.returnId",
|
|
23
|
-
referenceEndToEndId: "value.reference.endToEndId",
|
|
24
|
-
posted: "value.posted",
|
|
25
|
-
transacted: "value.transacted",
|
|
26
|
-
by: "value.by",
|
|
27
|
-
actualBalance: { selector: "value.balance.actual", transform: "number" },
|
|
28
|
-
reservedBalance: { selector: "value.balance.reserved", transform: "number" },
|
|
29
|
-
availableBalance: { selector: "value.balance.available", transform: "number" },
|
|
30
|
-
operations: { selector: "value.operations[*]", transform: {
|
|
31
|
-
account: "account",
|
|
32
|
-
currency: "currency",
|
|
33
|
-
changes: { selector: "changes", transform: "array" },
|
|
34
|
-
type: "type",
|
|
35
|
-
transaction: "transaction",
|
|
36
|
-
counter: { selector: "counter", transform: "integer"},
|
|
37
|
-
created: "created",
|
|
38
|
-
signature: "signature",
|
|
39
|
-
previous: "previous",
|
|
40
|
-
}},
|
|
41
|
-
status: "value.status",
|
|
42
|
-
rail: "value.rail",
|
|
43
|
-
railType: "value.rail.type",
|
|
44
|
-
flags: "value.flags",
|
|
45
|
-
oldFlags: "value.oldFlags",
|
|
46
|
-
notes: { selector: "value.notes", transform: "stringify" },
|
|
47
|
-
risk: { selector: "value.risk", transform: "number" },
|
|
48
|
-
state: { selector: "value.state", transform: "stringify" },
|
|
49
|
-
// eslint-disable-next-line
|
|
50
|
-
} as const satisfies Mapping
|
|
51
|
-
export type Fields = keyof typeof mapping
|
|
52
|
-
export const schema: Schema<Fields> = [
|
|
53
|
-
{ name: "counterpartType", type: "STRING" },
|
|
54
|
-
{ name: "counterpart", type: "STRING" },
|
|
55
|
-
{ name: "counterpartCode", type: "STRING", mode: "NULLABLE" },
|
|
56
|
-
{ name: "currency", type: "STRING" },
|
|
57
|
-
{ name: "amount", type: "NUMERIC" },
|
|
58
|
-
{ name: "description", type: "STRING" },
|
|
59
|
-
{ name: "organization", type: "STRING" },
|
|
60
|
-
{ name: "accountId", type: "STRING" },
|
|
61
|
-
{ name: "accountName", type: "STRING", mode: "NULLABLE" },
|
|
62
|
-
{ name: "account", type: "STRING" },
|
|
63
|
-
{ name: "accountType", type: "STRING" },
|
|
64
|
-
{ name: "type", type: "STRING", mode: "NULLABLE" },
|
|
65
|
-
{ name: "direction", type: "STRING", mode: "NULLABLE" },
|
|
66
|
-
{ name: "id", type: "STRING" },
|
|
67
|
-
{ name: "referenceSupplier", type: "STRING", mode: "NULLABLE" },
|
|
68
|
-
{ name: "referenceReference", type: "STRING", mode: "NULLABLE" },
|
|
69
|
-
{ name: "referenceReturnId", type: "STRING", mode: "NULLABLE" },
|
|
70
|
-
{ name: "referenceEndToEndId", type: "STRING", mode: "NULLABLE" },
|
|
71
|
-
{ name: "posted", type: "DATETIME" },
|
|
72
|
-
{ name: "transacted", type: "DATETIME", mode: "NULLABLE" },
|
|
73
|
-
{ name: "by", type: "STRING", mode: "NULLABLE" },
|
|
74
|
-
{ name: "actualBalance", type: "NUMERIC" },
|
|
75
|
-
{ name: "reservedBalance", type: "NUMERIC" },
|
|
76
|
-
{ name: "availableBalance", type: "NUMERIC" },
|
|
77
|
-
{ name: "operations", type: "RECORD", mode: "REPEATED", fields: [
|
|
78
|
-
{ name: "account", type: "STRING" },
|
|
79
|
-
{ name: "currency", type: "STRING" },
|
|
80
|
-
{ name: "changes", type: "RECORD", mode: "REPEATED", fields: [
|
|
81
|
-
{ name: "key", type: "STRING" },
|
|
82
|
-
{ name: "value", type: "RECORD", fields: [
|
|
83
|
-
{ name: "type", type: "STRING" },
|
|
84
|
-
{ name: "amount", type: "NUMERIC" },
|
|
85
|
-
{ name: "status", type: "STRING" },
|
|
86
|
-
{ name: "result", type: "STRING", mode: "NULLABLE" },
|
|
87
|
-
]}
|
|
88
|
-
] },
|
|
89
|
-
{ name: "type", type: "STRING" },
|
|
90
|
-
{ name: "transaction", type: "STRING" },
|
|
91
|
-
{ name: "counter", type: "NUMERIC" },
|
|
92
|
-
{ name: "created", type: "DATETIME" },
|
|
93
|
-
{ name: "signature", type: "STRING" },
|
|
94
|
-
{ name: "previous", type: "STRING" },
|
|
95
|
-
]
|
|
96
|
-
},
|
|
97
|
-
{ name: "status", type: "STRING" },
|
|
98
|
-
{ name: "rail", type: "STRING", mode: "NULLABLE" },
|
|
99
|
-
{ name: "railType", type: "STRING" },
|
|
100
|
-
{ name: "flags", type: "STRING", mode: "REPEATED" },
|
|
101
|
-
{ name: "oldFlags", type: "STRING", mode: "REPEATED" },
|
|
102
|
-
{ name: "notes", type: "STRING", mode: "REPEATED" },
|
|
103
|
-
{ name: "risk", type: "NUMERIC", mode: "NULLABLE" },
|
|
104
|
-
{ name: "state", type: "STRING", mode: "NULLABLE" },
|
|
105
|
-
]
|
|
106
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { Listener } from "cloudly-analytics-administration"
|
|
2
|
-
import { Base as ConfigBase } from "./Base"
|
|
3
|
-
import { Mapping as AnalyticsMapping } from "./Mapping"
|
|
4
|
-
import { Operation as ConfigOperation } from "./Operation"
|
|
5
|
-
import { Schema as AnalyticsSchema } from "./Schema"
|
|
6
|
-
import { Transaction as ConfigTransaction } from "./Transaction"
|
|
7
|
-
|
|
8
|
-
//cSpell: ignore: paxpay nonprod
|
|
9
|
-
export namespace Configuration {
|
|
10
|
-
export import Mapping = AnalyticsMapping
|
|
11
|
-
export import Schema = AnalyticsSchema
|
|
12
|
-
export import Base = ConfigBase
|
|
13
|
-
export import Transaction = ConfigTransaction
|
|
14
|
-
export import Operation = ConfigOperation
|
|
15
|
-
export type BigQueryTableConfig = {
|
|
16
|
-
projectName: "paxpay-prod" | "paxpay-nonprod"
|
|
17
|
-
datasetName: string
|
|
18
|
-
tableName: string
|
|
19
|
-
}
|
|
20
|
-
export function create(
|
|
21
|
-
name: string,
|
|
22
|
-
mapping: Mapping,
|
|
23
|
-
schema: Schema,
|
|
24
|
-
config: BigQueryTableConfig,
|
|
25
|
-
filter: string
|
|
26
|
-
): Listener.Configuration.BigQuery.BaseConfiguration {
|
|
27
|
-
return {
|
|
28
|
-
name,
|
|
29
|
-
type: "bigquery",
|
|
30
|
-
filter: [
|
|
31
|
-
{
|
|
32
|
-
type: "selectively",
|
|
33
|
-
expression: filter,
|
|
34
|
-
},
|
|
35
|
-
{ type: "useragent" },
|
|
36
|
-
{
|
|
37
|
-
type: "mapping",
|
|
38
|
-
mapping: {
|
|
39
|
-
...Base.mapping,
|
|
40
|
-
...mapping,
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
batchSize: 10,
|
|
45
|
-
batchInterval: 3,
|
|
46
|
-
...config,
|
|
47
|
-
tableSchema: [...Base.schema, ...schema],
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
export const backup = create(
|
|
51
|
-
"backup",
|
|
52
|
-
{ value: { selector: "value", transform: "stringify" } },
|
|
53
|
-
[{ name: "value", type: "STRING" }],
|
|
54
|
-
{
|
|
55
|
-
projectName: "paxpay-prod",
|
|
56
|
-
datasetName: "pays_ledger",
|
|
57
|
-
tableName: "backup",
|
|
58
|
-
},
|
|
59
|
-
"source:pax2pay-worker-banking-ledger realm:within(uk, eu)"
|
|
60
|
-
)
|
|
61
|
-
export const operation = create(
|
|
62
|
-
"operations",
|
|
63
|
-
Operation.mapping,
|
|
64
|
-
Operation.schema,
|
|
65
|
-
{
|
|
66
|
-
projectName: "paxpay-prod",
|
|
67
|
-
datasetName: "pays_ledger",
|
|
68
|
-
tableName: "operations",
|
|
69
|
-
},
|
|
70
|
-
"source:pax2pay-worker-banking-ledger entity:operation realm:within(uk, eu)"
|
|
71
|
-
)
|
|
72
|
-
export const transaction = create(
|
|
73
|
-
"transactions",
|
|
74
|
-
Transaction.mapping,
|
|
75
|
-
Transaction.schema,
|
|
76
|
-
{
|
|
77
|
-
projectName: "paxpay-prod",
|
|
78
|
-
datasetName: "pays_ledger",
|
|
79
|
-
tableName: "transactions",
|
|
80
|
-
},
|
|
81
|
-
"source:pax2pay-worker-banking-ledger entity:transaction realm:within(uk, eu)"
|
|
82
|
-
)
|
|
83
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Schema } from "./Schema";
|
|
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: Schema<Fields>;
|
|
18
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Base.js","sourceRoot":"../","sources":["Analytics/Configuration/Base.ts"],"names":[],"mappings":"AAGA,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;KAEsB,CAAC;IAE3B,WAAM,GAAmB;QACrC,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"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Filter } from "cloudly-analytics-administration";
|
|
2
|
-
import { isly } from "isly";
|
|
3
|
-
export type Mapping<T extends string = string> = Filter.Mapping.RecordWithSelector<T>;
|
|
4
|
-
export declare namespace Mapping {
|
|
5
|
-
type Field = string | Filter.Mapping.Getter;
|
|
6
|
-
namespace Field {
|
|
7
|
-
export import Transform = Filter.Mapping.Transform;
|
|
8
|
-
const type: isly.Type<string | Filter.Mapping.Getter<string>>;
|
|
9
|
-
}
|
|
10
|
-
const type: isly.Type<Mapping<string>>;
|
|
11
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Filter } from "cloudly-analytics-administration";
|
|
2
|
-
import { isly } from "isly";
|
|
3
|
-
export var Mapping;
|
|
4
|
-
(function (Mapping) {
|
|
5
|
-
let Field;
|
|
6
|
-
(function (Field) {
|
|
7
|
-
Field.Transform = Filter.Mapping.Transform;
|
|
8
|
-
Field.type = isly.union(isly.string(), Filter.Mapping.Getter.type);
|
|
9
|
-
})(Field = Mapping.Field || (Mapping.Field = {}));
|
|
10
|
-
Mapping.type = isly.record(isly.string(), Field.type);
|
|
11
|
-
})(Mapping || (Mapping = {}));
|
|
12
|
-
//# sourceMappingURL=Mapping.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Mapping.js","sourceRoot":"../","sources":["Analytics/Configuration/Mapping.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,MAAM,KAAW,OAAO,CAOvB;AAPD,WAAiB,OAAO;IAEvB,IAAiB,KAAK,CAGrB;IAHD,WAAiB,KAAK;QACP,eAAS,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAA;QACrC,UAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC1E,CAAC,EAHgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAGrB;IACY,YAAI,GAAG,IAAI,CAAC,MAAM,CAAU,IAAI,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;AACpE,CAAC,EAPgB,OAAO,KAAP,OAAO,QAOvB"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Schema } from "./Schema";
|
|
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: Schema<Fields>;
|
|
22
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Operation.js","sourceRoot":"../","sources":["Analytics/Configuration/Operation.ts"],"names":[],"mappings":"AAGA,MAAM,KAAW,SAAS,CAiCzB;AAjCD,WAAiB,SAAS;IACZ,iBAAO,GAAG;QACtB,OAAO,EAAE,eAAe;QACxB,QAAQ,EAAE,gBAAgB;QAC1B,OAAO,EAAE,EAAE,QAAQ,EAAE,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AAQ,EAAE;QACrC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE;KACpC,CAAA;AACF,CAAC,EAjCgB,SAAS,KAAT,SAAS,QAiCzB"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Listener } from "cloudly-analytics-administration";
|
|
2
|
-
export type Schema<T extends string = string> = Schema.Field<T>[];
|
|
3
|
-
export declare namespace Schema {
|
|
4
|
-
export import Field = Listener.Configuration.BigQuery.Api.BaseField;
|
|
5
|
-
const type: import("isly/dist/cjs/Type").Type<Field<string>[]>;
|
|
6
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Listener } from "cloudly-analytics-administration";
|
|
2
|
-
export var Schema;
|
|
3
|
-
(function (Schema) {
|
|
4
|
-
Schema.Field = Listener.Configuration.BigQuery.Api.BaseField;
|
|
5
|
-
Schema.type = Schema.Field.type.array();
|
|
6
|
-
})(Schema || (Schema = {}));
|
|
7
|
-
//# sourceMappingURL=Schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Schema.js","sourceRoot":"../","sources":["Analytics/Configuration/Schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAG3D,MAAM,KAAW,MAAM,CAGtB;AAHD,WAAiB,MAAM;IACR,YAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAA;IACtD,WAAI,GAAG,OAAA,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAA;AACvC,CAAC,EAHgB,MAAM,KAAN,MAAM,QAGtB"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { Schema } from "./Schema";
|
|
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: Schema<Fields>;
|
|
86
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Transaction.js","sourceRoot":"../","sources":["Analytics/Configuration/Transaction.ts"],"names":[],"mappings":"AAGA,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;QAClC,SAAS,EAAE,iBAAiB;QAC5B,WAAW,EAAE,mBAAmB;QAChC,OAAO,EAAE,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE;QAC9D,WAAW,EAAE,oBAAoB;QACjC,IAAI,EAAE,YAAY;QAClB,SAAS,EAAE,iBAAiB;QAC5B,EAAE,EAAE,UAAU;QACd,iBAAiB,EAAE,0BAA0B;QAC7C,kBAAkB,EAAE,2BAA2B;QAC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IAAI,EAAE,QAAQ,EAAE;gBAChC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACvC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;gBACpC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE;gBACrC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACrC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE;aACpC;SACD;QACD,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;QAClC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE;QAClD,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE;QACpC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE;QACnD,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE;QACtD,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE;QACnD,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE;QACnD,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE;KACnD,CAAA;AACF,CAAC,EAtGgB,WAAW,KAAX,WAAW,QAsG3B"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Listener } from "cloudly-analytics-administration";
|
|
2
|
-
import { Base as ConfigBase } from "./Base";
|
|
3
|
-
import { Mapping as AnalyticsMapping } from "./Mapping";
|
|
4
|
-
import { Operation as ConfigOperation } from "./Operation";
|
|
5
|
-
import { Schema as AnalyticsSchema } from "./Schema";
|
|
6
|
-
import { Transaction as ConfigTransaction } from "./Transaction";
|
|
7
|
-
export declare namespace Configuration {
|
|
8
|
-
export import Mapping = AnalyticsMapping;
|
|
9
|
-
export import Schema = AnalyticsSchema;
|
|
10
|
-
export import Base = ConfigBase;
|
|
11
|
-
export import Transaction = ConfigTransaction;
|
|
12
|
-
export import Operation = ConfigOperation;
|
|
13
|
-
type BigQueryTableConfig = {
|
|
14
|
-
projectName: "paxpay-prod" | "paxpay-nonprod";
|
|
15
|
-
datasetName: string;
|
|
16
|
-
tableName: string;
|
|
17
|
-
};
|
|
18
|
-
function create(name: string, mapping: Mapping, schema: Schema, config: BigQueryTableConfig, filter: string): Listener.Configuration.BigQuery.BaseConfiguration;
|
|
19
|
-
const backup: import("cloudly-analytics-administration/dist/Listener/BigQuery").BigQuery.BaseConfiguration;
|
|
20
|
-
const operation: import("cloudly-analytics-administration/dist/Listener/BigQuery").BigQuery.BaseConfiguration;
|
|
21
|
-
const transaction: import("cloudly-analytics-administration/dist/Listener/BigQuery").BigQuery.BaseConfiguration;
|
|
22
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { Base as ConfigBase } from "./Base";
|
|
2
|
-
import { Mapping as AnalyticsMapping } from "./Mapping";
|
|
3
|
-
import { Operation as ConfigOperation } from "./Operation";
|
|
4
|
-
import { Schema as AnalyticsSchema } from "./Schema";
|
|
5
|
-
import { Transaction as ConfigTransaction } from "./Transaction";
|
|
6
|
-
export var Configuration;
|
|
7
|
-
(function (Configuration) {
|
|
8
|
-
Configuration.Mapping = AnalyticsMapping;
|
|
9
|
-
Configuration.Schema = AnalyticsSchema;
|
|
10
|
-
Configuration.Base = ConfigBase;
|
|
11
|
-
Configuration.Transaction = ConfigTransaction;
|
|
12
|
-
Configuration.Operation = ConfigOperation;
|
|
13
|
-
function create(name, mapping, schema, config, filter) {
|
|
14
|
-
return {
|
|
15
|
-
name,
|
|
16
|
-
type: "bigquery",
|
|
17
|
-
filter: [
|
|
18
|
-
{
|
|
19
|
-
type: "selectively",
|
|
20
|
-
expression: filter,
|
|
21
|
-
},
|
|
22
|
-
{ type: "useragent" },
|
|
23
|
-
{
|
|
24
|
-
type: "mapping",
|
|
25
|
-
mapping: {
|
|
26
|
-
...Configuration.Base.mapping,
|
|
27
|
-
...mapping,
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
batchSize: 10,
|
|
32
|
-
batchInterval: 3,
|
|
33
|
-
...config,
|
|
34
|
-
tableSchema: [...Configuration.Base.schema, ...schema],
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
Configuration.create = create;
|
|
38
|
-
Configuration.backup = create("backup", { value: { selector: "value", transform: "stringify" } }, [{ name: "value", type: "STRING" }], {
|
|
39
|
-
projectName: "paxpay-prod",
|
|
40
|
-
datasetName: "pays_ledger",
|
|
41
|
-
tableName: "backup",
|
|
42
|
-
}, "source:pax2pay-worker-banking-ledger realm:within(uk, eu)");
|
|
43
|
-
Configuration.operation = create("operations", Configuration.Operation.mapping, Configuration.Operation.schema, {
|
|
44
|
-
projectName: "paxpay-prod",
|
|
45
|
-
datasetName: "pays_ledger",
|
|
46
|
-
tableName: "operations",
|
|
47
|
-
}, "source:pax2pay-worker-banking-ledger entity:operation realm:within(uk, eu)");
|
|
48
|
-
Configuration.transaction = create("transactions", Configuration.Transaction.mapping, Configuration.Transaction.schema, {
|
|
49
|
-
projectName: "paxpay-prod",
|
|
50
|
-
datasetName: "pays_ledger",
|
|
51
|
-
tableName: "transactions",
|
|
52
|
-
}, "source:pax2pay-worker-banking-ledger entity:transaction realm:within(uk, eu)");
|
|
53
|
-
})(Configuration || (Configuration = {}));
|
|
54
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Analytics/Configuration/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,IAAI,UAA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