@pax2pay/model-banking 0.1.646 → 0.1.648

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.
Files changed (111) hide show
  1. package/Account/index.ts +0 -4
  2. package/Backup/Account.ts +1 -1
  3. package/Client/Accounts/index.ts +0 -3
  4. package/Client/Organizations/index.ts +0 -6
  5. package/Client/Transactions/index.ts +0 -9
  6. package/Client/index.ts +0 -8
  7. package/Transaction/Creatable.ts +2 -2
  8. package/Transaction/index.ts +0 -2
  9. package/dist/cjs/Account/index.d.ts +0 -2
  10. package/dist/cjs/Account/index.js +0 -2
  11. package/dist/cjs/Account/index.js.map +1 -1
  12. package/dist/cjs/Backup/Account.js +1 -1
  13. package/dist/cjs/Backup/Account.js.map +1 -1
  14. package/dist/cjs/Client/Accounts/index.d.ts +0 -2
  15. package/dist/cjs/Client/Accounts/index.js +0 -3
  16. package/dist/cjs/Client/Accounts/index.js.map +1 -1
  17. package/dist/cjs/Client/Organizations/index.d.ts +0 -4
  18. package/dist/cjs/Client/Organizations/index.js +0 -6
  19. package/dist/cjs/Client/Organizations/index.js.map +1 -1
  20. package/dist/cjs/Client/Transactions/index.d.ts +0 -8
  21. package/dist/cjs/Client/Transactions/index.js +0 -4
  22. package/dist/cjs/Client/Transactions/index.js.map +1 -1
  23. package/dist/cjs/Client/index.d.ts +0 -5
  24. package/dist/cjs/Client/index.js +0 -8
  25. package/dist/cjs/Client/index.js.map +1 -1
  26. package/dist/cjs/Transaction/Creatable.d.ts +1 -1
  27. package/dist/cjs/Transaction/Creatable.js +1 -1
  28. package/dist/cjs/Transaction/Creatable.js.map +1 -1
  29. package/dist/cjs/Transaction/index.d.ts +0 -2
  30. package/dist/cjs/Transaction/index.js +0 -2
  31. package/dist/cjs/Transaction/index.js.map +1 -1
  32. package/dist/cjs/pax2pay.d.ts +0 -1
  33. package/dist/cjs/pax2pay.js +1 -3
  34. package/dist/cjs/pax2pay.js.map +1 -1
  35. package/dist/mjs/Account/index.d.ts +0 -2
  36. package/dist/mjs/Account/index.js +0 -2
  37. package/dist/mjs/Account/index.js.map +1 -1
  38. package/dist/mjs/Backup/Account.js +1 -1
  39. package/dist/mjs/Backup/Account.js.map +1 -1
  40. package/dist/mjs/Client/Accounts/index.d.ts +0 -2
  41. package/dist/mjs/Client/Accounts/index.js +0 -3
  42. package/dist/mjs/Client/Accounts/index.js.map +1 -1
  43. package/dist/mjs/Client/Organizations/index.d.ts +0 -4
  44. package/dist/mjs/Client/Organizations/index.js +0 -6
  45. package/dist/mjs/Client/Organizations/index.js.map +1 -1
  46. package/dist/mjs/Client/Transactions/index.d.ts +0 -8
  47. package/dist/mjs/Client/Transactions/index.js +0 -4
  48. package/dist/mjs/Client/Transactions/index.js.map +1 -1
  49. package/dist/mjs/Client/index.d.ts +0 -5
  50. package/dist/mjs/Client/index.js +0 -8
  51. package/dist/mjs/Client/index.js.map +1 -1
  52. package/dist/mjs/Transaction/Creatable.d.ts +1 -1
  53. package/dist/mjs/Transaction/Creatable.js +1 -1
  54. package/dist/mjs/Transaction/Creatable.js.map +1 -1
  55. package/dist/mjs/Transaction/index.d.ts +0 -2
  56. package/dist/mjs/Transaction/index.js +0 -2
  57. package/dist/mjs/Transaction/index.js.map +1 -1
  58. package/dist/mjs/pax2pay.d.ts +0 -1
  59. package/dist/mjs/pax2pay.js +0 -1
  60. package/dist/mjs/pax2pay.js.map +1 -1
  61. package/package.json +1 -1
  62. package/pax2pay.ts +0 -1
  63. package/Client/Accounts/Rules.ts +0 -16
  64. package/Client/Labels.ts +0 -22
  65. package/Client/Organizations/Groups.ts +0 -12
  66. package/Client/Organizations/Rules.ts +0 -22
  67. package/Client/Rules.ts +0 -19
  68. package/Label.ts +0 -15
  69. package/Transaction/Statistics.ts +0 -93
  70. package/dist/cjs/Client/Accounts/Rules.d.ts +0 -10
  71. package/dist/cjs/Client/Accounts/Rules.js +0 -20
  72. package/dist/cjs/Client/Accounts/Rules.js.map +0 -1
  73. package/dist/cjs/Client/Labels.d.ts +0 -12
  74. package/dist/cjs/Client/Labels.js +0 -25
  75. package/dist/cjs/Client/Labels.js.map +0 -1
  76. package/dist/cjs/Client/Organizations/Groups.d.ts +0 -8
  77. package/dist/cjs/Client/Organizations/Groups.js +0 -16
  78. package/dist/cjs/Client/Organizations/Groups.js.map +0 -1
  79. package/dist/cjs/Client/Organizations/Rules.d.ts +0 -10
  80. package/dist/cjs/Client/Organizations/Rules.js +0 -26
  81. package/dist/cjs/Client/Organizations/Rules.js.map +0 -1
  82. package/dist/cjs/Client/Rules.d.ts +0 -11
  83. package/dist/cjs/Client/Rules.js +0 -23
  84. package/dist/cjs/Client/Rules.js.map +0 -1
  85. package/dist/cjs/Label.d.ts +0 -14
  86. package/dist/cjs/Label.js +0 -14
  87. package/dist/cjs/Label.js.map +0 -1
  88. package/dist/cjs/Transaction/Statistics.d.ts +0 -34
  89. package/dist/cjs/Transaction/Statistics.js +0 -74
  90. package/dist/cjs/Transaction/Statistics.js.map +0 -1
  91. package/dist/mjs/Client/Accounts/Rules.d.ts +0 -10
  92. package/dist/mjs/Client/Accounts/Rules.js +0 -16
  93. package/dist/mjs/Client/Accounts/Rules.js.map +0 -1
  94. package/dist/mjs/Client/Labels.d.ts +0 -12
  95. package/dist/mjs/Client/Labels.js +0 -21
  96. package/dist/mjs/Client/Labels.js.map +0 -1
  97. package/dist/mjs/Client/Organizations/Groups.d.ts +0 -8
  98. package/dist/mjs/Client/Organizations/Groups.js +0 -12
  99. package/dist/mjs/Client/Organizations/Groups.js.map +0 -1
  100. package/dist/mjs/Client/Organizations/Rules.d.ts +0 -10
  101. package/dist/mjs/Client/Organizations/Rules.js +0 -22
  102. package/dist/mjs/Client/Organizations/Rules.js.map +0 -1
  103. package/dist/mjs/Client/Rules.d.ts +0 -11
  104. package/dist/mjs/Client/Rules.js +0 -19
  105. package/dist/mjs/Client/Rules.js.map +0 -1
  106. package/dist/mjs/Label.d.ts +0 -14
  107. package/dist/mjs/Label.js +0 -11
  108. package/dist/mjs/Label.js.map +0 -1
  109. package/dist/mjs/Transaction/Statistics.d.ts +0 -34
  110. package/dist/mjs/Transaction/Statistics.js +0 -71
  111. package/dist/mjs/Transaction/Statistics.js.map +0 -1
@@ -1,93 +0,0 @@
1
- import { isoly } from "isoly"
2
- import { isly } from "isly"
3
- import { typedly } from "typedly"
4
- import { Card } from "../Card"
5
- import { Transaction } from "."
6
-
7
- export interface Statistics {
8
- capture: Statistics.Regional
9
- refund: Statistics.Regional
10
- cards: string[]
11
- cursor?: string
12
- }
13
-
14
- export namespace Statistics {
15
- export type TransactionType = (typeof TransactionType.values)[number]
16
- export namespace TransactionType {
17
- export const values = ["capture", "refund"] as const
18
- }
19
- export type Region = (typeof Region.values)[number]
20
- export namespace Region {
21
- export const values = ["domestic", "intraRegion", "extraRegion"] as const
22
- }
23
- export type Regional = Record<Statistics.Region, { count: number; amount: number }>
24
- export namespace Regional {
25
- export const type = isly.record(
26
- isly.string<Region>(Region.values),
27
- isly.object({ count: isly.number(), amount: isly.number() })
28
- )
29
- }
30
- export const type = isly.object<Statistics>({
31
- capture: Regional.type,
32
- refund: Regional.type,
33
- cards: isly.string().array(),
34
- cursor: isly.string().optional(),
35
- })
36
- function empty(): Statistics {
37
- return {
38
- capture: {
39
- domestic: { count: 0, amount: 0 },
40
- intraRegion: { count: 0, amount: 0 },
41
- extraRegion: { count: 0, amount: 0 },
42
- },
43
- refund: {
44
- domestic: { count: 0, amount: 0 },
45
- intraRegion: { count: 0, amount: 0 },
46
- extraRegion: { count: 0, amount: 0 },
47
- },
48
- cards: [],
49
- }
50
- }
51
- export function compile(
52
- transactions: Transaction[],
53
- scheme: Card.Scheme,
54
- regions: Record<"domestic" | "intraRegion", isoly.CountryCode.Alpha2[]>
55
- ): Statistics {
56
- const result: Statistics = empty()
57
- for (const transaction of transactions) {
58
- if (
59
- Transaction.CardTransaction.type.is(transaction) &&
60
- transaction.status == "finalized" &&
61
- transaction.account.scheme == scheme
62
- ) {
63
- const region = regions.domestic.includes(transaction.counterpart.merchant.country)
64
- ? "domestic"
65
- : regions.intraRegion.includes(transaction.counterpart.merchant.country)
66
- ? "intraRegion"
67
- : "extraRegion"
68
- const kind = transaction.direction == "outbound" ? "capture" : "refund"
69
- result[kind][region].count++
70
- result[kind][region].amount = isoly.Currency.add(
71
- transaction.currency,
72
- result[kind][region].amount,
73
- Math.abs(transaction.amount.original)
74
- )
75
- result.cards.includes(transaction.account.id) || result.cards.push(transaction.account.id)
76
- }
77
- }
78
- return result
79
- }
80
- export function combine(accumulation: Statistics, incoming: Statistics, currency: isoly.Currency): Statistics {
81
- const [statistics, cards] = (({ cursor, cards, ...rest }) => [rest, cards])(incoming)
82
- typedly.Object.entries(statistics).forEach(([kind, statistic]: [TransactionType, Statistics[TransactionType]]) =>
83
- typedly.Object.entries(statistic).forEach(
84
- ([region, { count, amount }]: [Region, { count: number; amount: number }]) => {
85
- accumulation[kind][region].count += count
86
- accumulation[kind][region].amount = isoly.Currency.add(currency, accumulation[kind][region].amount, amount)
87
- }
88
- )
89
- )
90
- cards.forEach(card => accumulation.cards.includes(card) || accumulation.cards.push(card))
91
- return accumulation
92
- }
93
- }
@@ -1,10 +0,0 @@
1
- import { gracely } from "gracely";
2
- import { http } from "cloudly-http";
3
- import { Rule } from "../../Rule";
4
- export declare class Rules {
5
- private readonly client;
6
- constructor(client: http.Client);
7
- create(account: string, rule: Rule): Promise<Rule | gracely.Error>;
8
- replace(account: string, rule: Rule): Promise<Rule | gracely.Error>;
9
- remove(account: string, code: string): Promise<Rule | gracely.Error>;
10
- }
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Rules = void 0;
4
- class Rules {
5
- client;
6
- constructor(client) {
7
- this.client = client;
8
- }
9
- async create(account, rule) {
10
- return this.client.post(`/account/${account}/rule`, rule);
11
- }
12
- async replace(account, rule) {
13
- return this.client.put(`/account/${account}/rule/${rule.code}`, rule);
14
- }
15
- async remove(account, code) {
16
- return this.client.delete(`/account/${account}/rule/${code}`);
17
- }
18
- }
19
- exports.Rules = Rules;
20
- //# sourceMappingURL=Rules.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Rules.js","sourceRoot":"","sources":["../../../../Client/Accounts/Rules.ts"],"names":[],"mappings":";;;AAIA,MAAa,KAAK;IACY;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,IAAU;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAO,YAAY,OAAO,OAAO,EAAE,IAAI,CAAC,CAAA;IAChE,CAAC;IACD,KAAK,CAAC,OAAO,CAAC,OAAe,EAAE,IAAU;QACxC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAO,YAAY,OAAO,SAAS,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAA;IAC5E,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,IAAY;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAO,YAAY,OAAO,SAAS,IAAI,EAAE,CAAC,CAAA;IACpE,CAAC;CACD;AAXD,sBAWC"}
@@ -1,12 +0,0 @@
1
- import { gracely } from "gracely";
2
- import { http } from "cloudly-http";
3
- import { Label } from "../Label";
4
- export declare class Labels {
5
- private readonly client;
6
- readonly type: Label.Type;
7
- constructor(client: http.Client, type: Label.Type);
8
- create(label: Label): Promise<Label | gracely.Error>;
9
- replace(label: Label): Promise<Label | gracely.Error>;
10
- list(): Promise<Label[] | gracely.Error>;
11
- remove(name: string): Promise<Label | gracely.Error>;
12
- }
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Labels = void 0;
4
- class Labels {
5
- client;
6
- type;
7
- constructor(client, type) {
8
- this.client = client;
9
- this.type = type;
10
- }
11
- async create(label) {
12
- return this.client.post(`/label/${this.type}`, label);
13
- }
14
- async replace(label) {
15
- return this.client.put(`/label/${this.type}`, label);
16
- }
17
- async list() {
18
- return this.client.get(`/label/${this.type}`);
19
- }
20
- async remove(name) {
21
- return this.client.delete(`/label/${this.type}/${name}`);
22
- }
23
- }
24
- exports.Labels = Labels;
25
- //# sourceMappingURL=Labels.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Labels.js","sourceRoot":"","sources":["../../../Client/Labels.ts"],"names":[],"mappings":";;;AAIA,MAAa,MAAM;IAEA;IACR;IAFV,YACkB,MAAmB,EAC3B,IAAgB;QADR,WAAM,GAAN,MAAM,CAAa;QAC3B,SAAI,GAAJ,IAAI,CAAY;IACvB,CAAC;IACJ,KAAK,CAAC,MAAM,CAAC,KAAY;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAQ,UAAU,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,CAAA;IAC7D,CAAC;IACD,KAAK,CAAC,OAAO,CAAC,KAAY;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAQ,UAAU,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,CAAA;IAC5D,CAAC;IACD,KAAK,CAAC,IAAI;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAU,UAAU,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;IACvD,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,IAAY;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,CAAA;IACzD,CAAC;CACD;AAjBD,wBAiBC"}
@@ -1,8 +0,0 @@
1
- import { gracely } from "gracely";
2
- import { http } from "cloudly-http";
3
- import { Organization } from "../../Organization";
4
- export declare class Groups {
5
- private readonly client;
6
- constructor(client: http.Client);
7
- replace(organization: string, groups: string[]): Promise<Organization | gracely.Error>;
8
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Groups = void 0;
4
- class Groups {
5
- client;
6
- constructor(client) {
7
- this.client = client;
8
- }
9
- async replace(organization, groups) {
10
- return this.client.put(`/organization/group`, groups, {
11
- organization,
12
- });
13
- }
14
- }
15
- exports.Groups = Groups;
16
- //# sourceMappingURL=Groups.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Groups.js","sourceRoot":"","sources":["../../../../Client/Organizations/Groups.ts"],"names":[],"mappings":";;;AAIA,MAAa,MAAM;IACW;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,OAAO,CAAC,YAAoB,EAAE,MAAgB;QACnD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAe,qBAAqB,EAAE,MAAM,EAAE;YACnE,YAAY;SACZ,CAAC,CAAA;IACH,CAAC;CACD;AAPD,wBAOC"}
@@ -1,10 +0,0 @@
1
- import { gracely } from "gracely";
2
- import { http } from "cloudly-http";
3
- import { Rule } from "../../Rule";
4
- export declare class Rules {
5
- private readonly client;
6
- constructor(client: http.Client);
7
- create(organization: string, rule: Rule): Promise<Rule | gracely.Error>;
8
- replace(organization: string, rule: Rule): Promise<Rule | gracely.Error>;
9
- remove(organization: string, code: string): Promise<Rule | gracely.Error>;
10
- }
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Rules = void 0;
4
- class Rules {
5
- client;
6
- constructor(client) {
7
- this.client = client;
8
- }
9
- async create(organization, rule) {
10
- return this.client.post(`/organization/rule`, rule, {
11
- organization,
12
- });
13
- }
14
- async replace(organization, rule) {
15
- return this.client.put(`/organization/rule/${rule.code}`, rule, {
16
- organization,
17
- });
18
- }
19
- async remove(organization, code) {
20
- return this.client.delete(`/organization/rule/${code}`, {
21
- organization,
22
- });
23
- }
24
- }
25
- exports.Rules = Rules;
26
- //# sourceMappingURL=Rules.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Rules.js","sourceRoot":"","sources":["../../../../Client/Organizations/Rules.ts"],"names":[],"mappings":";;;AAIA,MAAa,KAAK;IACY;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,MAAM,CAAC,YAAoB,EAAE,IAAU;QAC5C,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAO,oBAAoB,EAAE,IAAI,EAAE;YACzD,YAAY;SACZ,CAAC,CAAA;IACH,CAAC;IACD,KAAK,CAAC,OAAO,CAAC,YAAoB,EAAE,IAAU;QAC7C,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAO,sBAAsB,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE;YACrE,YAAY;SACZ,CAAC,CAAA;IACH,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,YAAoB,EAAE,IAAY;QAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAO,sBAAsB,IAAI,EAAE,EAAE;YAC7D,YAAY;SACZ,CAAC,CAAA;IACH,CAAC;CACD;AAjBD,sBAiBC"}
@@ -1,11 +0,0 @@
1
- import { gracely } from "gracely";
2
- import { http } from "cloudly-http";
3
- import { Rule } from "../Rule";
4
- export declare class Rules {
5
- private readonly client;
6
- constructor(client: http.Client);
7
- create(rule: Rule): Promise<Rule | gracely.Error>;
8
- list(): Promise<Rule[] | gracely.Error>;
9
- replace(rule: Rule): Promise<Rule | gracely.Error>;
10
- remove(code: string): Promise<Rule | gracely.Error>;
11
- }
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Rules = void 0;
4
- class Rules {
5
- client;
6
- constructor(client) {
7
- this.client = client;
8
- }
9
- async create(rule) {
10
- return this.client.post(`/rule`, rule);
11
- }
12
- async list() {
13
- return this.client.get(`/rule`);
14
- }
15
- async replace(rule) {
16
- return this.client.put(`/rule/${rule.code}`, rule);
17
- }
18
- async remove(code) {
19
- return this.client.delete(`/rule/${code}`);
20
- }
21
- }
22
- exports.Rules = Rules;
23
- //# sourceMappingURL=Rules.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Rules.js","sourceRoot":"","sources":["../../../Client/Rules.ts"],"names":[],"mappings":";;;AAIA,MAAa,KAAK;IACY;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,MAAM,CAAC,IAAU;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAO,OAAO,EAAE,IAAI,CAAC,CAAA;IAC7C,CAAC;IACD,KAAK,CAAC,IAAI;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAS,OAAO,CAAC,CAAA;IACxC,CAAC;IACD,KAAK,CAAC,OAAO,CAAC,IAAU;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAO,SAAS,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAA;IACzD,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,IAAY;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAO,SAAS,IAAI,EAAE,CAAC,CAAA;IACjD,CAAC;CACD;AAdD,sBAcC"}
@@ -1,14 +0,0 @@
1
- import { isly } from "isly";
2
- export interface Label {
3
- name: string;
4
- color: string;
5
- description: string;
6
- }
7
- export declare namespace Label {
8
- const type: import("isly/dist/cjs/object").IslyObject<Label, object>;
9
- type Type = (typeof Type.values)[number];
10
- namespace Type {
11
- const values: readonly ["flag", "group"];
12
- const type: isly.Type<"flag" | "group">;
13
- }
14
- }
package/dist/cjs/Label.js DELETED
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Label = void 0;
4
- const isly_1 = require("isly");
5
- var Label;
6
- (function (Label) {
7
- Label.type = isly_1.isly.object({ name: isly_1.isly.string(), color: isly_1.isly.string(), description: isly_1.isly.string() });
8
- let Type;
9
- (function (Type) {
10
- Type.values = ["flag", "group"];
11
- Type.type = isly_1.isly.string(Type.values);
12
- })(Type = Label.Type || (Label.Type = {}));
13
- })(Label || (exports.Label = Label = {}));
14
- //# sourceMappingURL=Label.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Label.js","sourceRoot":"","sources":["../../Label.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAO3B,IAAiB,KAAK,CAOrB;AAPD,WAAiB,KAAK;IACR,UAAI,GAAG,WAAI,CAAC,MAAM,CAAQ,EAAE,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,WAAW,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;IAEjH,IAAiB,IAAI,CAGpB;IAHD,WAAiB,IAAI;QACP,WAAM,GAAG,CAAC,MAAM,EAAE,OAAO,CAAU,CAAA;QACnC,SAAI,GAAG,WAAI,CAAC,MAAM,CAAC,KAAA,MAAM,CAAC,CAAA;IACxC,CAAC,EAHgB,IAAI,GAAJ,UAAI,KAAJ,UAAI,QAGpB;AACF,CAAC,EAPgB,KAAK,qBAAL,KAAK,QAOrB"}
@@ -1,34 +0,0 @@
1
- import { isoly } from "isoly";
2
- import { isly } from "isly";
3
- import { Card } from "../Card";
4
- import { Transaction } from ".";
5
- export interface Statistics {
6
- capture: Statistics.Regional;
7
- refund: Statistics.Regional;
8
- cards: string[];
9
- cursor?: string;
10
- }
11
- export declare namespace Statistics {
12
- type TransactionType = (typeof TransactionType.values)[number];
13
- namespace TransactionType {
14
- const values: readonly ["capture", "refund"];
15
- }
16
- type Region = (typeof Region.values)[number];
17
- namespace Region {
18
- const values: readonly ["domestic", "intraRegion", "extraRegion"];
19
- }
20
- type Regional = Record<Statistics.Region, {
21
- count: number;
22
- amount: number;
23
- }>;
24
- namespace Regional {
25
- const type: isly.Type<{
26
- domestic: any;
27
- intraRegion: any;
28
- extraRegion: any;
29
- }>;
30
- }
31
- const type: import("isly/dist/cjs/object").IslyObject<Transaction.Statistics, object>;
32
- function compile(transactions: Transaction[], scheme: Card.Scheme, regions: Record<"domestic" | "intraRegion", isoly.CountryCode.Alpha2[]>): Statistics;
33
- function combine(accumulation: Statistics, incoming: Statistics, currency: isoly.Currency): Statistics;
34
- }
@@ -1,74 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Statistics = void 0;
4
- const isoly_1 = require("isoly");
5
- const isly_1 = require("isly");
6
- const typedly_1 = require("typedly");
7
- const _1 = require(".");
8
- var Statistics;
9
- (function (Statistics) {
10
- let TransactionType;
11
- (function (TransactionType) {
12
- TransactionType.values = ["capture", "refund"];
13
- })(TransactionType = Statistics.TransactionType || (Statistics.TransactionType = {}));
14
- let Region;
15
- (function (Region) {
16
- Region.values = ["domestic", "intraRegion", "extraRegion"];
17
- })(Region = Statistics.Region || (Statistics.Region = {}));
18
- let Regional;
19
- (function (Regional) {
20
- Regional.type = isly_1.isly.record(isly_1.isly.string(Region.values), isly_1.isly.object({ count: isly_1.isly.number(), amount: isly_1.isly.number() }));
21
- })(Regional = Statistics.Regional || (Statistics.Regional = {}));
22
- Statistics.type = isly_1.isly.object({
23
- capture: Regional.type,
24
- refund: Regional.type,
25
- cards: isly_1.isly.string().array(),
26
- cursor: isly_1.isly.string().optional(),
27
- });
28
- function empty() {
29
- return {
30
- capture: {
31
- domestic: { count: 0, amount: 0 },
32
- intraRegion: { count: 0, amount: 0 },
33
- extraRegion: { count: 0, amount: 0 },
34
- },
35
- refund: {
36
- domestic: { count: 0, amount: 0 },
37
- intraRegion: { count: 0, amount: 0 },
38
- extraRegion: { count: 0, amount: 0 },
39
- },
40
- cards: [],
41
- };
42
- }
43
- function compile(transactions, scheme, regions) {
44
- const result = empty();
45
- for (const transaction of transactions) {
46
- if (_1.Transaction.CardTransaction.type.is(transaction) &&
47
- transaction.status == "finalized" &&
48
- transaction.account.scheme == scheme) {
49
- const region = regions.domestic.includes(transaction.counterpart.merchant.country)
50
- ? "domestic"
51
- : regions.intraRegion.includes(transaction.counterpart.merchant.country)
52
- ? "intraRegion"
53
- : "extraRegion";
54
- const kind = transaction.direction == "outbound" ? "capture" : "refund";
55
- result[kind][region].count++;
56
- result[kind][region].amount = isoly_1.isoly.Currency.add(transaction.currency, result[kind][region].amount, Math.abs(transaction.amount.original));
57
- result.cards.includes(transaction.account.id) || result.cards.push(transaction.account.id);
58
- }
59
- }
60
- return result;
61
- }
62
- Statistics.compile = compile;
63
- function combine(accumulation, incoming, currency) {
64
- const [statistics, cards] = (({ cursor, cards, ...rest }) => [rest, cards])(incoming);
65
- typedly_1.typedly.Object.entries(statistics).forEach(([kind, statistic]) => typedly_1.typedly.Object.entries(statistic).forEach(([region, { count, amount }]) => {
66
- accumulation[kind][region].count += count;
67
- accumulation[kind][region].amount = isoly_1.isoly.Currency.add(currency, accumulation[kind][region].amount, amount);
68
- }));
69
- cards.forEach(card => accumulation.cards.includes(card) || accumulation.cards.push(card));
70
- return accumulation;
71
- }
72
- Statistics.combine = combine;
73
- })(Statistics || (exports.Statistics = Statistics = {}));
74
- //# sourceMappingURL=Statistics.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Statistics.js","sourceRoot":"","sources":["../../../Transaction/Statistics.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAC3B,qCAAiC;AAEjC,wBAA+B;AAS/B,IAAiB,UAAU,CA+E1B;AA/ED,WAAiB,UAAU;IAE1B,IAAiB,eAAe,CAE/B;IAFD,WAAiB,eAAe;QAClB,sBAAM,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAU,CAAA;IACrD,CAAC,EAFgB,eAAe,GAAf,0BAAe,KAAf,0BAAe,QAE/B;IAED,IAAiB,MAAM,CAEtB;IAFD,WAAiB,MAAM;QACT,aAAM,GAAG,CAAC,UAAU,EAAE,aAAa,EAAE,aAAa,CAAU,CA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- import { Rule } from "../../Rule";
4
- export declare class Rules {
5
- private readonly client;
6
- constructor(client: http.Client);
7
- create(account: string, rule: Rule): Promise<Rule | gracely.Error>;
8
- replace(account: string, rule: Rule): Promise<Rule | gracely.Error>;
9
- remove(account: string, code: string): Promise<Rule | gracely.Error>;
10
- }
@@ -1,16 +0,0 @@
1
- export class Rules {
2
- client;
3
- constructor(client) {
4
- this.client = client;
5
- }
6
- async create(account, rule) {
7
- return this.client.post(`/account/${account}/rule`, rule);
8
- }
9
- async replace(account, rule) {
10
- return this.client.put(`/account/${account}/rule/${rule.code}`, rule);
11
- }
12
- async remove(account, code) {
13
- return this.client.delete(`/account/${account}/rule/${code}`);
14
- }
15
- }
16
- //# sourceMappingURL=Rules.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Rules.js","sourceRoot":"","sources":["../../../../Client/Accounts/Rules.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,KAAK;IACY;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,IAAU;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAO,YAAY,OAAO,OAAO,EAAE,IAAI,CAAC,CAAA;IAChE,CAAC;IACD,KAAK,CAAC,OAAO,CAAC,OAAe,EAAE,IAAU;QACxC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAO,YAAY,OAAO,SAAS,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAA;IAC5E,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,OAAe,EAAE,IAAY;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAO,YAAY,OAAO,SAAS,IAAI,EAAE,CAAC,CAAA;IACpE,CAAC;CACD"}
@@ -1,12 +0,0 @@
1
- import { gracely } from "gracely";
2
- import { http } from "cloudly-http";
3
- import { Label } from "../Label";
4
- export declare class Labels {
5
- private readonly client;
6
- readonly type: Label.Type;
7
- constructor(client: http.Client, type: Label.Type);
8
- create(label: Label): Promise<Label | gracely.Error>;
9
- replace(label: Label): Promise<Label | gracely.Error>;
10
- list(): Promise<Label[] | gracely.Error>;
11
- remove(name: string): Promise<Label | gracely.Error>;
12
- }
@@ -1,21 +0,0 @@
1
- export class Labels {
2
- client;
3
- type;
4
- constructor(client, type) {
5
- this.client = client;
6
- this.type = type;
7
- }
8
- async create(label) {
9
- return this.client.post(`/label/${this.type}`, label);
10
- }
11
- async replace(label) {
12
- return this.client.put(`/label/${this.type}`, label);
13
- }
14
- async list() {
15
- return this.client.get(`/label/${this.type}`);
16
- }
17
- async remove(name) {
18
- return this.client.delete(`/label/${this.type}/${name}`);
19
- }
20
- }
21
- //# sourceMappingURL=Labels.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Labels.js","sourceRoot":"","sources":["../../../Client/Labels.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,MAAM;IAEA;IACR;IAFV,YACkB,MAAmB,EAC3B,IAAgB;QADR,WAAM,GAAN,MAAM,CAAa;QAC3B,SAAI,GAAJ,IAAI,CAAY;IACvB,CAAC;IACJ,KAAK,CAAC,MAAM,CAAC,KAAY;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAQ,UAAU,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,CAAA;IAC7D,CAAC;IACD,KAAK,CAAC,OAAO,CAAC,KAAY;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAQ,UAAU,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,CAAC,CAAA;IAC5D,CAAC;IACD,KAAK,CAAC,IAAI;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAU,UAAU,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;IACvD,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,IAAY;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC,CAAA;IACzD,CAAC;CACD"}
@@ -1,8 +0,0 @@
1
- import { gracely } from "gracely";
2
- import { http } from "cloudly-http";
3
- import { Organization } from "../../Organization";
4
- export declare class Groups {
5
- private readonly client;
6
- constructor(client: http.Client);
7
- replace(organization: string, groups: string[]): Promise<Organization | gracely.Error>;
8
- }
@@ -1,12 +0,0 @@
1
- export class Groups {
2
- client;
3
- constructor(client) {
4
- this.client = client;
5
- }
6
- async replace(organization, groups) {
7
- return this.client.put(`/organization/group`, groups, {
8
- organization,
9
- });
10
- }
11
- }
12
- //# sourceMappingURL=Groups.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Groups.js","sourceRoot":"","sources":["../../../../Client/Organizations/Groups.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,MAAM;IACW;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,OAAO,CAAC,YAAoB,EAAE,MAAgB;QACnD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAe,qBAAqB,EAAE,MAAM,EAAE;YACnE,YAAY;SACZ,CAAC,CAAA;IACH,CAAC;CACD"}
@@ -1,10 +0,0 @@
1
- import { gracely } from "gracely";
2
- import { http } from "cloudly-http";
3
- import { Rule } from "../../Rule";
4
- export declare class Rules {
5
- private readonly client;
6
- constructor(client: http.Client);
7
- create(organization: string, rule: Rule): Promise<Rule | gracely.Error>;
8
- replace(organization: string, rule: Rule): Promise<Rule | gracely.Error>;
9
- remove(organization: string, code: string): Promise<Rule | gracely.Error>;
10
- }
@@ -1,22 +0,0 @@
1
- export class Rules {
2
- client;
3
- constructor(client) {
4
- this.client = client;
5
- }
6
- async create(organization, rule) {
7
- return this.client.post(`/organization/rule`, rule, {
8
- organization,
9
- });
10
- }
11
- async replace(organization, rule) {
12
- return this.client.put(`/organization/rule/${rule.code}`, rule, {
13
- organization,
14
- });
15
- }
16
- async remove(organization, code) {
17
- return this.client.delete(`/organization/rule/${code}`, {
18
- organization,
19
- });
20
- }
21
- }
22
- //# sourceMappingURL=Rules.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Rules.js","sourceRoot":"","sources":["../../../../Client/Organizations/Rules.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,KAAK;IACY;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,MAAM,CAAC,YAAoB,EAAE,IAAU;QAC5C,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAO,oBAAoB,EAAE,IAAI,EAAE;YACzD,YAAY;SACZ,CAAC,CAAA;IACH,CAAC;IACD,KAAK,CAAC,OAAO,CAAC,YAAoB,EAAE,IAAU;QAC7C,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAO,sBAAsB,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE;YACrE,YAAY;SACZ,CAAC,CAAA;IACH,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,YAAoB,EAAE,IAAY;QAC9C,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAO,sBAAsB,IAAI,EAAE,EAAE;YAC7D,YAAY;SACZ,CAAC,CAAA;IACH,CAAC;CACD"}
@@ -1,11 +0,0 @@
1
- import { gracely } from "gracely";
2
- import { http } from "cloudly-http";
3
- import { Rule } from "../Rule";
4
- export declare class Rules {
5
- private readonly client;
6
- constructor(client: http.Client);
7
- create(rule: Rule): Promise<Rule | gracely.Error>;
8
- list(): Promise<Rule[] | gracely.Error>;
9
- replace(rule: Rule): Promise<Rule | gracely.Error>;
10
- remove(code: string): Promise<Rule | gracely.Error>;
11
- }
@@ -1,19 +0,0 @@
1
- export class Rules {
2
- client;
3
- constructor(client) {
4
- this.client = client;
5
- }
6
- async create(rule) {
7
- return this.client.post(`/rule`, rule);
8
- }
9
- async list() {
10
- return this.client.get(`/rule`);
11
- }
12
- async replace(rule) {
13
- return this.client.put(`/rule/${rule.code}`, rule);
14
- }
15
- async remove(code) {
16
- return this.client.delete(`/rule/${code}`);
17
- }
18
- }
19
- //# sourceMappingURL=Rules.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Rules.js","sourceRoot":"","sources":["../../../Client/Rules.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,KAAK;IACY;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,MAAM,CAAC,IAAU;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAO,OAAO,EAAE,IAAI,CAAC,CAAA;IAC7C,CAAC;IACD,KAAK,CAAC,IAAI;QACT,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAS,OAAO,CAAC,CAAA;IACxC,CAAC;IACD,KAAK,CAAC,OAAO,CAAC,IAAU;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAO,SAAS,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAA;IACzD,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,IAAY;QACxB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAO,SAAS,IAAI,EAAE,CAAC,CAAA;IACjD,CAAC;CACD"}
@@ -1,14 +0,0 @@
1
- import { isly } from "isly";
2
- export interface Label {
3
- name: string;
4
- color: string;
5
- description: string;
6
- }
7
- export declare namespace Label {
8
- const type: import("isly/dist/cjs/object").IslyObject<Label, object>;
9
- type Type = (typeof Type.values)[number];
10
- namespace Type {
11
- const values: readonly ["flag", "group"];
12
- const type: isly.Type<"flag" | "group">;
13
- }
14
- }