@pax2pay/model-banking 0.1.613 → 0.1.615
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/Amount.ts +0 -6
- package/Card/Changeable.ts +0 -13
- package/Card/Creatable.ts +0 -28
- package/Card/Expiry.ts +0 -14
- package/Card/Operation/Authorization.ts +1 -13
- package/Card/Operation/Card.ts +0 -14
- package/Card/Operation/index.ts +0 -5
- package/Card/Preset.ts +0 -5
- package/Card/Restriction/Merchant.ts +0 -2
- package/Card/Restriction/index.ts +0 -8
- package/Card/Restriction/merchants/Merchant.ts +2 -2
- package/Card/Scheme.ts +0 -5
- package/Card/index.ts +0 -37
- package/Client/Transactions/index.ts +0 -21
- package/Operation/Changes.ts +6 -0
- package/Rail/index.ts +0 -2
- package/Realm.ts +0 -5
- package/Rule/Base.ts +0 -26
- package/Rule/Other.ts +0 -6
- package/Rule/type.ts +0 -5
- package/Treasury/Snapshot/Account.ts +1 -1
- package/Treasury/Snapshot/Check/BankFeedIntegrity.ts +19 -0
- package/Treasury/Snapshot/Check/Base.ts +8 -0
- package/Treasury/Snapshot/Check/Checks.ts +15 -0
- package/Treasury/Snapshot/Check/ExternalReconciliation.ts +9 -0
- package/Treasury/Snapshot/Check/InternalReconciliation.ts +9 -0
- package/Treasury/Snapshot/Check/LedgerIntegrity.ts +17 -0
- package/Treasury/Snapshot/Check/Overdraft.ts +7 -0
- package/Treasury/Snapshot/Check/Result.ts +11 -0
- package/Treasury/Snapshot/Check/TransactionMatch.ts +9 -0
- package/Treasury/Snapshot/Check/UnidentifiedFunds.ts +8 -0
- package/Treasury/Snapshot/Check/index.ts +29 -0
- package/Treasury/Snapshot/Fiat.ts +0 -2
- package/Treasury/Snapshot/index.ts +7 -27
- package/dist/cjs/Amount.d.ts +0 -2
- package/dist/cjs/Amount.js +0 -3
- package/dist/cjs/Amount.js.map +1 -1
- package/dist/cjs/Card/Changeable.d.ts +0 -2
- package/dist/cjs/Card/Changeable.js +0 -13
- package/dist/cjs/Card/Changeable.js.map +1 -1
- package/dist/cjs/Card/Creatable.d.ts +0 -2
- package/dist/cjs/Card/Creatable.js +0 -28
- package/dist/cjs/Card/Creatable.js.map +1 -1
- package/dist/cjs/Card/Expiry.d.ts +0 -2
- package/dist/cjs/Card/Expiry.js +0 -11
- package/dist/cjs/Card/Expiry.js.map +1 -1
- package/dist/cjs/Card/Operation/Authorization.d.ts +0 -2
- package/dist/cjs/Card/Operation/Authorization.js +0 -12
- package/dist/cjs/Card/Operation/Authorization.js.map +1 -1
- package/dist/cjs/Card/Operation/Card.d.ts +0 -2
- package/dist/cjs/Card/Operation/Card.js +0 -14
- package/dist/cjs/Card/Operation/Card.js.map +1 -1
- package/dist/cjs/Card/Operation/index.d.ts +0 -2
- package/dist/cjs/Card/Operation/index.js +0 -5
- package/dist/cjs/Card/Operation/index.js.map +1 -1
- package/dist/cjs/Card/Preset.d.ts +0 -2
- package/dist/cjs/Card/Preset.js +0 -5
- package/dist/cjs/Card/Preset.js.map +1 -1
- package/dist/cjs/Card/Restriction/Merchant.d.ts +0 -2
- package/dist/cjs/Card/Restriction/Merchant.js +0 -2
- package/dist/cjs/Card/Restriction/Merchant.js.map +1 -1
- package/dist/cjs/Card/Restriction/index.d.ts +0 -2
- package/dist/cjs/Card/Restriction/index.js +0 -8
- package/dist/cjs/Card/Restriction/index.js.map +1 -1
- package/dist/cjs/Card/Restriction/merchants/Merchant.d.ts +1 -2
- package/dist/cjs/Card/Restriction/merchants/Merchant.js +8 -8
- package/dist/cjs/Card/Restriction/merchants/Merchant.js.map +1 -1
- package/dist/cjs/Card/Scheme.d.ts +0 -2
- package/dist/cjs/Card/Scheme.js +0 -5
- package/dist/cjs/Card/Scheme.js.map +1 -1
- package/dist/cjs/Card/index.d.ts +0 -2
- package/dist/cjs/Card/index.js +0 -38
- package/dist/cjs/Card/index.js.map +1 -1
- package/dist/cjs/Client/Transactions/index.d.ts +0 -16
- package/dist/cjs/Client/Transactions/index.js +0 -27
- package/dist/cjs/Client/Transactions/index.js.map +1 -1
- package/dist/cjs/Operation/Changes.d.ts +1 -0
- package/dist/cjs/Operation/Changes.js +4 -0
- package/dist/cjs/Operation/Changes.js.map +1 -1
- package/dist/cjs/Rail/index.d.ts +0 -2
- package/dist/cjs/Rail/index.js +0 -2
- package/dist/cjs/Rail/index.js.map +1 -1
- package/dist/cjs/Realm.d.ts +0 -2
- package/dist/cjs/Realm.js +0 -5
- package/dist/cjs/Realm.js.map +1 -1
- package/dist/cjs/Rule/Base.d.ts +0 -4
- package/dist/cjs/Rule/Base.js +0 -26
- package/dist/cjs/Rule/Base.js.map +1 -1
- package/dist/cjs/Rule/Other.d.ts +0 -3
- package/dist/cjs/Rule/Other.js +0 -6
- package/dist/cjs/Rule/Other.js.map +1 -1
- package/dist/cjs/Rule/type.js.map +1 -1
- package/dist/cjs/Treasury/Snapshot/Account.d.ts +1 -1
- package/dist/cjs/Treasury/Snapshot/Check/BankFeedIntegrity.d.ts +25 -0
- package/dist/cjs/Treasury/Snapshot/Check/BankFeedIntegrity.js +3 -0
- package/dist/cjs/Treasury/Snapshot/Check/BankFeedIntegrity.js.map +1 -0
- package/dist/cjs/Treasury/Snapshot/Check/Base.d.ts +7 -0
- package/dist/cjs/Treasury/Snapshot/Check/Base.js +3 -0
- package/dist/cjs/Treasury/Snapshot/Check/Base.js.map +1 -0
- package/dist/cjs/Treasury/Snapshot/Check/Checks.d.ts +6 -0
- package/dist/cjs/Treasury/Snapshot/Check/Checks.js +18 -0
- package/dist/cjs/Treasury/Snapshot/Check/Checks.js.map +1 -0
- package/dist/cjs/Treasury/Snapshot/Check/ExternalReconciliation.d.ts +8 -0
- package/dist/cjs/Treasury/Snapshot/Check/ExternalReconciliation.js +3 -0
- package/dist/cjs/Treasury/Snapshot/Check/ExternalReconciliation.js.map +1 -0
- package/dist/cjs/Treasury/Snapshot/Check/InternalReconciliation.d.ts +8 -0
- package/dist/cjs/Treasury/Snapshot/Check/InternalReconciliation.js +3 -0
- package/dist/cjs/Treasury/Snapshot/Check/InternalReconciliation.js.map +1 -0
- package/dist/cjs/Treasury/Snapshot/Check/LedgerIntegrity.d.ts +24 -0
- package/dist/cjs/Treasury/Snapshot/Check/LedgerIntegrity.js +3 -0
- package/dist/cjs/Treasury/Snapshot/Check/LedgerIntegrity.js.map +1 -0
- package/dist/cjs/Treasury/Snapshot/Check/Overdraft.d.ts +9 -0
- package/dist/cjs/Treasury/Snapshot/Check/Overdraft.js +3 -0
- package/dist/cjs/Treasury/Snapshot/Check/Overdraft.js.map +1 -0
- package/dist/cjs/Treasury/Snapshot/Check/Result.d.ts +5 -0
- package/dist/cjs/Treasury/Snapshot/Check/Result.js +16 -0
- package/dist/cjs/Treasury/Snapshot/Check/Result.js.map +1 -0
- package/dist/cjs/Treasury/Snapshot/Check/TransactionMatch.d.ts +8 -0
- package/dist/cjs/Treasury/Snapshot/Check/TransactionMatch.js +3 -0
- package/dist/cjs/Treasury/Snapshot/Check/TransactionMatch.js.map +1 -0
- package/dist/cjs/Treasury/Snapshot/Check/UnidentifiedFunds.d.ts +7 -0
- package/dist/cjs/Treasury/Snapshot/Check/UnidentifiedFunds.js +3 -0
- package/dist/cjs/Treasury/Snapshot/Check/UnidentifiedFunds.js.map +1 -0
- package/dist/cjs/Treasury/Snapshot/Check/index.d.ts +21 -0
- package/dist/cjs/Treasury/Snapshot/Check/index.js +11 -0
- package/dist/cjs/Treasury/Snapshot/Check/index.js.map +1 -0
- package/dist/cjs/Treasury/Snapshot/Fiat.d.ts +0 -2
- package/dist/cjs/Treasury/Snapshot/index.d.ts +6 -8
- package/dist/cjs/Treasury/Snapshot/index.js +2 -27
- package/dist/cjs/Treasury/Snapshot/index.js.map +1 -1
- package/dist/mjs/Amount.d.ts +0 -2
- package/dist/mjs/Amount.js +0 -3
- package/dist/mjs/Amount.js.map +1 -1
- package/dist/mjs/Card/Changeable.d.ts +0 -2
- package/dist/mjs/Card/Changeable.js +0 -13
- package/dist/mjs/Card/Changeable.js.map +1 -1
- package/dist/mjs/Card/Creatable.d.ts +0 -2
- package/dist/mjs/Card/Creatable.js +0 -28
- package/dist/mjs/Card/Creatable.js.map +1 -1
- package/dist/mjs/Card/Expiry.d.ts +0 -2
- package/dist/mjs/Card/Expiry.js +0 -11
- package/dist/mjs/Card/Expiry.js.map +1 -1
- package/dist/mjs/Card/Operation/Authorization.d.ts +0 -2
- package/dist/mjs/Card/Operation/Authorization.js +0 -12
- package/dist/mjs/Card/Operation/Authorization.js.map +1 -1
- package/dist/mjs/Card/Operation/Card.d.ts +0 -2
- package/dist/mjs/Card/Operation/Card.js +0 -14
- package/dist/mjs/Card/Operation/Card.js.map +1 -1
- package/dist/mjs/Card/Operation/index.d.ts +0 -2
- package/dist/mjs/Card/Operation/index.js +0 -5
- package/dist/mjs/Card/Operation/index.js.map +1 -1
- package/dist/mjs/Card/Preset.d.ts +0 -2
- package/dist/mjs/Card/Preset.js +0 -5
- package/dist/mjs/Card/Preset.js.map +1 -1
- package/dist/mjs/Card/Restriction/Merchant.d.ts +0 -2
- package/dist/mjs/Card/Restriction/Merchant.js +0 -2
- package/dist/mjs/Card/Restriction/Merchant.js.map +1 -1
- package/dist/mjs/Card/Restriction/index.d.ts +0 -2
- package/dist/mjs/Card/Restriction/index.js +0 -8
- package/dist/mjs/Card/Restriction/index.js.map +1 -1
- package/dist/mjs/Card/Restriction/merchants/Merchant.d.ts +1 -2
- package/dist/mjs/Card/Restriction/merchants/Merchant.js +2 -2
- package/dist/mjs/Card/Restriction/merchants/Merchant.js.map +1 -1
- package/dist/mjs/Card/Scheme.d.ts +0 -2
- package/dist/mjs/Card/Scheme.js +0 -5
- package/dist/mjs/Card/Scheme.js.map +1 -1
- package/dist/mjs/Card/index.d.ts +0 -2
- package/dist/mjs/Card/index.js +0 -38
- package/dist/mjs/Card/index.js.map +1 -1
- package/dist/mjs/Client/Transactions/index.d.ts +0 -16
- package/dist/mjs/Client/Transactions/index.js +0 -27
- package/dist/mjs/Client/Transactions/index.js.map +1 -1
- package/dist/mjs/Operation/Changes.d.ts +1 -0
- package/dist/mjs/Operation/Changes.js +4 -0
- package/dist/mjs/Operation/Changes.js.map +1 -1
- package/dist/mjs/Rail/index.d.ts +0 -2
- package/dist/mjs/Rail/index.js +0 -2
- package/dist/mjs/Rail/index.js.map +1 -1
- package/dist/mjs/Realm.d.ts +0 -2
- package/dist/mjs/Realm.js +0 -5
- package/dist/mjs/Realm.js.map +1 -1
- package/dist/mjs/Rule/Base.d.ts +0 -4
- package/dist/mjs/Rule/Base.js +0 -26
- package/dist/mjs/Rule/Base.js.map +1 -1
- package/dist/mjs/Rule/Other.d.ts +0 -3
- package/dist/mjs/Rule/Other.js +0 -6
- package/dist/mjs/Rule/Other.js.map +1 -1
- package/dist/mjs/Rule/type.js.map +1 -1
- package/dist/mjs/Treasury/Snapshot/Account.d.ts +1 -1
- package/dist/mjs/Treasury/Snapshot/Check/BankFeedIntegrity.d.ts +25 -0
- package/dist/mjs/Treasury/Snapshot/Check/BankFeedIntegrity.js +2 -0
- package/dist/mjs/Treasury/Snapshot/Check/BankFeedIntegrity.js.map +1 -0
- package/dist/mjs/Treasury/Snapshot/Check/Base.d.ts +7 -0
- package/dist/mjs/Treasury/Snapshot/Check/Base.js +2 -0
- package/dist/mjs/Treasury/Snapshot/Check/Base.js.map +1 -0
- package/dist/mjs/Treasury/Snapshot/Check/Checks.d.ts +6 -0
- package/dist/mjs/Treasury/Snapshot/Check/Checks.js +15 -0
- package/dist/mjs/Treasury/Snapshot/Check/Checks.js.map +1 -0
- package/dist/mjs/Treasury/Snapshot/Check/ExternalReconciliation.d.ts +8 -0
- package/dist/mjs/Treasury/Snapshot/Check/ExternalReconciliation.js +2 -0
- package/dist/mjs/Treasury/Snapshot/Check/ExternalReconciliation.js.map +1 -0
- package/dist/mjs/Treasury/Snapshot/Check/InternalReconciliation.d.ts +8 -0
- package/dist/mjs/Treasury/Snapshot/Check/InternalReconciliation.js +2 -0
- package/dist/mjs/Treasury/Snapshot/Check/InternalReconciliation.js.map +1 -0
- package/dist/mjs/Treasury/Snapshot/Check/LedgerIntegrity.d.ts +24 -0
- package/dist/mjs/Treasury/Snapshot/Check/LedgerIntegrity.js +2 -0
- package/dist/mjs/Treasury/Snapshot/Check/LedgerIntegrity.js.map +1 -0
- package/dist/mjs/Treasury/Snapshot/Check/Overdraft.d.ts +9 -0
- package/dist/mjs/Treasury/Snapshot/Check/Overdraft.js +2 -0
- package/dist/mjs/Treasury/Snapshot/Check/Overdraft.js.map +1 -0
- package/dist/mjs/Treasury/Snapshot/Check/Result.d.ts +5 -0
- package/dist/mjs/Treasury/Snapshot/Check/Result.js +13 -0
- package/dist/mjs/Treasury/Snapshot/Check/Result.js.map +1 -0
- package/dist/mjs/Treasury/Snapshot/Check/TransactionMatch.d.ts +8 -0
- package/dist/mjs/Treasury/Snapshot/Check/TransactionMatch.js +2 -0
- package/dist/mjs/Treasury/Snapshot/Check/TransactionMatch.js.map +1 -0
- package/dist/mjs/Treasury/Snapshot/Check/UnidentifiedFunds.d.ts +7 -0
- package/dist/mjs/Treasury/Snapshot/Check/UnidentifiedFunds.js +2 -0
- package/dist/mjs/Treasury/Snapshot/Check/UnidentifiedFunds.js.map +1 -0
- package/dist/mjs/Treasury/Snapshot/Check/index.d.ts +21 -0
- package/dist/mjs/Treasury/Snapshot/Check/index.js +8 -0
- package/dist/mjs/Treasury/Snapshot/Check/index.js.map +1 -0
- package/dist/mjs/Treasury/Snapshot/Fiat.d.ts +0 -2
- package/dist/mjs/Treasury/Snapshot/index.d.ts +6 -8
- package/dist/mjs/Treasury/Snapshot/index.js +2 -27
- package/dist/mjs/Treasury/Snapshot/index.js.map +1 -1
- package/package.json +1 -6
|
@@ -1,54 +1,34 @@
|
|
|
1
1
|
import { isoly } from "isoly"
|
|
2
|
-
import { isly } from "isly"
|
|
3
2
|
import { Balance } from "../../Balance"
|
|
4
3
|
import { Supplier } from "../../Supplier"
|
|
5
4
|
import { Transaction } from "../../Transaction"
|
|
6
5
|
import { Warning } from "../../Warning"
|
|
7
6
|
import { Account as SnapshotAccount } from "./Account"
|
|
7
|
+
import { Check as SnapshotCheck } from "./Check"
|
|
8
8
|
import { Emoney as SnapshotEmoney } from "./Emoney"
|
|
9
9
|
import { Fiat as SnapshotFiat } from "./Fiat"
|
|
10
10
|
import { funding as snapshotFunding } from "./funding"
|
|
11
11
|
import { Reconciliation as SnapshotReconciliation } from "./Reconciliation"
|
|
12
12
|
|
|
13
13
|
export interface Snapshot {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
emoney: Balance.Extended & { total?: number }
|
|
15
|
+
created: isoly.DateTime
|
|
16
16
|
currency: isoly.Currency
|
|
17
17
|
supplier: Supplier
|
|
18
18
|
fiat: {
|
|
19
|
-
safe: number
|
|
20
|
-
unsafe: number
|
|
21
19
|
total: number // emoney issuable total amount
|
|
22
|
-
other: number
|
|
23
|
-
buffer: number
|
|
24
20
|
accounts: Snapshot.Account[]
|
|
25
21
|
}
|
|
26
22
|
notes: Transaction.Note[]
|
|
23
|
+
checks: Snapshot.Check[]
|
|
24
|
+
result: Snapshot.Check.Result
|
|
25
|
+
warnings?: Warning.Snapshot[]
|
|
27
26
|
}
|
|
28
27
|
export namespace Snapshot {
|
|
29
28
|
export import funding = snapshotFunding
|
|
29
|
+
export import Check = SnapshotCheck
|
|
30
30
|
export type Reconciliation = SnapshotReconciliation
|
|
31
31
|
export type Emoney = SnapshotEmoney
|
|
32
32
|
export type Fiat = SnapshotFiat
|
|
33
33
|
export import Account = SnapshotAccount
|
|
34
|
-
export function validate(snapshot: Snapshot): boolean {
|
|
35
|
-
const issuable = snapshot.fiat.total
|
|
36
|
-
const actual = snapshot.emoney.actual ?? 0
|
|
37
|
-
return issuable == actual
|
|
38
|
-
}
|
|
39
|
-
export const type = isly.object<Snapshot>({
|
|
40
|
-
warnings: Warning.Snapshot.type.array(),
|
|
41
|
-
emoney: Balance.Extended,
|
|
42
|
-
currency: isly.fromIs("currency", isoly.Currency.is),
|
|
43
|
-
supplier: Supplier.type,
|
|
44
|
-
fiat: isly.object({
|
|
45
|
-
safe: isly.number(),
|
|
46
|
-
unsafe: isly.number(),
|
|
47
|
-
total: isly.number(),
|
|
48
|
-
other: isly.number(),
|
|
49
|
-
buffer: isly.number(),
|
|
50
|
-
accounts: Account.type.array(),
|
|
51
|
-
}),
|
|
52
|
-
notes: Transaction.Note.type.array(),
|
|
53
|
-
})
|
|
54
34
|
}
|
package/dist/cjs/Amount.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { isoly } from "isoly";
|
|
2
2
|
import { isly } from "isly";
|
|
3
|
-
import { isly as isly2 } from "isly2";
|
|
4
3
|
import { Amounts } from "./Amounts";
|
|
5
4
|
export type Amount = [isoly.Currency, number];
|
|
6
5
|
export declare namespace Amount {
|
|
7
6
|
function toAmounts(amount?: Amount): Amounts;
|
|
8
7
|
const type: isly.Type<Amount>;
|
|
9
|
-
const type2: isly2.Tuple<Amount>;
|
|
10
8
|
}
|
package/dist/cjs/Amount.js
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Amount = void 0;
|
|
4
4
|
const isoly_1 = require("isoly");
|
|
5
|
-
const isoly2_1 = require("isoly2");
|
|
6
5
|
const isly_1 = require("isly");
|
|
7
|
-
const isly2_1 = require("isly2");
|
|
8
6
|
var Amount;
|
|
9
7
|
(function (Amount) {
|
|
10
8
|
function toAmounts(amount) {
|
|
@@ -12,6 +10,5 @@ var Amount;
|
|
|
12
10
|
}
|
|
13
11
|
Amount.toAmounts = toAmounts;
|
|
14
12
|
Amount.type = isly_1.isly.tuple(isly_1.isly.string(isoly_1.isoly.Currency.values), isly_1.isly.number());
|
|
15
|
-
Amount.type2 = isly2_1.isly.tuple(isoly2_1.isoly.Currency.type, isly2_1.isly.number().rename("Amount").describe("Amount in a specified currency."));
|
|
16
13
|
})(Amount || (exports.Amount = Amount = {}));
|
|
17
14
|
//# sourceMappingURL=Amount.js.map
|
package/dist/cjs/Amount.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Amount.js","sourceRoot":"","sources":["../../Amount.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B
|
|
1
|
+
{"version":3,"file":"Amount.js","sourceRoot":"","sources":["../../Amount.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAK3B,IAAiB,MAAM,CAKtB;AALD,WAAiB,MAAM;IACtB,SAAgB,SAAS,CAAC,MAAe;QACxC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAS,CAAC,MAAM,CAAC,CAAC,CAAA;IAC3D,CAAC;IAFe,gBAAS,YAExB,CAAA;IACY,WAAI,GAAG,WAAI,CAAC,KAAK,CAAS,WAAI,CAAC,MAAM,CAAC,aAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,CAAA;AAC1F,CAAC,EALgB,MAAM,sBAAN,MAAM,QAKtB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { isly as isly2 } from "isly2";
|
|
2
1
|
import { Amount } from "../Amount";
|
|
3
2
|
import { Meta } from "./Meta";
|
|
4
3
|
export type Changeable = {
|
|
@@ -7,5 +6,4 @@ export type Changeable = {
|
|
|
7
6
|
};
|
|
8
7
|
export declare namespace Changeable {
|
|
9
8
|
const type: import("isly/dist/cjs/object").IslyObject<Changeable, object>;
|
|
10
|
-
const type2: isly2.Object<Changeable>;
|
|
11
9
|
}
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Changeable = void 0;
|
|
4
4
|
const isoly_1 = require("isoly");
|
|
5
|
-
const isoly2_1 = require("isoly2");
|
|
6
5
|
const isly_1 = require("isly");
|
|
7
|
-
const isly2_1 = require("isly2");
|
|
8
6
|
const Meta_1 = require("./Meta");
|
|
9
7
|
var Changeable;
|
|
10
8
|
(function (Changeable) {
|
|
@@ -12,16 +10,5 @@ var Changeable;
|
|
|
12
10
|
limit: isly_1.isly.tuple(isly_1.isly.fromIs("isoly.Currency", isoly_1.isoly.Currency.is), isly_1.isly.number()).optional(),
|
|
13
11
|
meta: isly_1.isly.fromIs("Card.Meta", Meta_1.Meta.is).optional(),
|
|
14
12
|
});
|
|
15
|
-
Changeable.type2 = isly2_1.isly
|
|
16
|
-
.object({
|
|
17
|
-
limit: isly2_1.isly
|
|
18
|
-
.tuple(isoly2_1.isoly.Currency.type, isly2_1.isly.number())
|
|
19
|
-
.optional()
|
|
20
|
-
.rename("Limit")
|
|
21
|
-
.describe("The new limit of the card."),
|
|
22
|
-
meta: isly2_1.isly.from("Card.Meta", Meta_1.Meta.is).optional().rename("Meta").describe("The new meta data of the card."),
|
|
23
|
-
})
|
|
24
|
-
.rename("Changeable")
|
|
25
|
-
.describe("Changeable card properties.");
|
|
26
13
|
})(Changeable || (exports.Changeable = Changeable = {}));
|
|
27
14
|
//# sourceMappingURL=Changeable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Changeable.js","sourceRoot":"","sources":["../../../Card/Changeable.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B
|
|
1
|
+
{"version":3,"file":"Changeable.js","sourceRoot":"","sources":["../../../Card/Changeable.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAE3B,iCAA6B;AAO7B,IAAiB,UAAU,CAK1B;AALD,WAAiB,UAAU;IACb,eAAI,GAAG,WAAI,CAAC,MAAM,CAAa;QAC3C,KAAK,EAAE,WAAI,CAAC,KAAK,CAAC,WAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,aAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;QAC7F,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC,WAAW,EAAE,WAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;KAClD,CAAC,CAAA;AACH,CAAC,EALgB,UAAU,0BAAV,UAAU,QAK1B"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { isoly } from "isoly";
|
|
2
|
-
import { isly as isly2 } from "isly2";
|
|
3
2
|
import { Amount } from "../Amount";
|
|
4
3
|
import type { Rule } from "../Rule";
|
|
5
4
|
import { Expiry } from "./Expiry";
|
|
@@ -24,5 +23,4 @@ export interface Creatable {
|
|
|
24
23
|
}
|
|
25
24
|
export declare namespace Creatable {
|
|
26
25
|
const type: import("isly/dist/cjs/object").IslyObject<Creatable, object>;
|
|
27
|
-
const type2: isly2.Object<Creatable>;
|
|
28
26
|
}
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Creatable = void 0;
|
|
4
4
|
const isoly_1 = require("isoly");
|
|
5
|
-
const isoly2_1 = require("isoly2");
|
|
6
5
|
const isly_1 = require("isly");
|
|
7
|
-
const isly2_1 = require("isly2");
|
|
8
6
|
const type_1 = require("../Rule/type");
|
|
9
7
|
const Expiry_1 = require("./Expiry");
|
|
10
8
|
const Meta_1 = require("./Meta");
|
|
@@ -23,31 +21,5 @@ var Creatable;
|
|
|
23
21
|
key: isly_1.isly.string().optional(),
|
|
24
22
|
restricted: isly_1.isly.object({ to: Restriction_1.Restriction.type.optional() }).optional(),
|
|
25
23
|
});
|
|
26
|
-
Creatable.type2 = isly2_1.isly.object({
|
|
27
|
-
account: isly2_1.isly.string().rename("Account").describe("The account id the card was created on."),
|
|
28
|
-
number: isly2_1.isly.string().optional().rename("Number").describe("The card identifier of the user of the api."),
|
|
29
|
-
preset: Preset_1.Preset.type2,
|
|
30
|
-
details: isly2_1.isly
|
|
31
|
-
.object({ expiry: Expiry_1.Expiry.type2, holder: isly2_1.isly.string() })
|
|
32
|
-
.rename("Details")
|
|
33
|
-
.describe("The card details, the information that will be displayed on the card."),
|
|
34
|
-
limit: isly2_1.isly
|
|
35
|
-
.tuple(isoly2_1.isoly.Currency.type, isly2_1.isly.number().rename("Amount").describe("Amount in a specified currency."))
|
|
36
|
-
.rename("Limit")
|
|
37
|
-
.describe("Maximum amount that can be spent on the card."),
|
|
38
|
-
rules: isly2_1.isly
|
|
39
|
-
.from("Rule", type_1.type.is)
|
|
40
|
-
.array()
|
|
41
|
-
.optional()
|
|
42
|
-
.rename("Rules")
|
|
43
|
-
.describe("Card rules that applies to authorizations made with the card."),
|
|
44
|
-
meta: isly2_1.isly.from("Meta", Meta_1.Meta.is).optional(),
|
|
45
|
-
key: isly2_1.isly.string().optional(),
|
|
46
|
-
restricted: isly2_1.isly
|
|
47
|
-
.object({ to: Restriction_1.Restriction.type2.optional() })
|
|
48
|
-
.optional()
|
|
49
|
-
.rename("Restrictions")
|
|
50
|
-
.describe("Set of restrictions that apply to the card."),
|
|
51
|
-
});
|
|
52
24
|
})(Creatable || (exports.Creatable = Creatable = {}));
|
|
53
25
|
//# sourceMappingURL=Creatable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Creatable.js","sourceRoot":"","sources":["../../../Card/Creatable.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B
|
|
1
|
+
{"version":3,"file":"Creatable.js","sourceRoot":"","sources":["../../../Card/Creatable.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAG3B,uCAA+C;AAC/C,qCAAiC;AACjC,iCAA6B;AAC7B,qCAAiC;AACjC,+CAA2C;AAiB3C,IAAiB,SAAS,CAYzB;AAZD,WAAiB,SAAS;IACZ,cAAI,GAAG,WAAI,CAAC,MAAM,CAAY;QAC1C,OAAO,EAAE,WAAI,CAAC,MAAM,EAAE;QACtB,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAChC,MAAM,EAAE,eAAM,CAAC,IAAI;QACnB,OAAO,EAAE,WAAI,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,eAAM,CAAC,IAAI,EAAE,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,CAAC;QACpE,KAAK,EAAE,WAAI,CAAC,KAAK,CAAC,WAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,aAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC;QAClF,KAAK,EAAE,WAAQ,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAClC,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC,WAAW,EAAE,WAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;QAClD,GAAG,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC7B,UAAU,EAAE,WAAI,CAAC,MAAM,CAAoC,EAAE,EAAE,EAAE,yBAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE;KAC1G,CAAC,CAAA;AACH,CAAC,EAZgB,SAAS,yBAAT,SAAS,QAYzB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { isoly } from "isoly";
|
|
2
2
|
import { isly } from "isly";
|
|
3
|
-
import { isly as isly2 } from "isly2";
|
|
4
3
|
declare const year: readonly [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40];
|
|
5
4
|
type Year = (typeof year)[number];
|
|
6
5
|
declare const month: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
|
@@ -8,7 +7,6 @@ type Month = (typeof month)[number];
|
|
|
8
7
|
export type Expiry = [Year, Month];
|
|
9
8
|
export declare namespace Expiry {
|
|
10
9
|
const type: isly.Type<Expiry>;
|
|
11
|
-
const type2: isly2.Tuple<Expiry>;
|
|
12
10
|
function toDateTime(expiry: Expiry): isoly.DateTime;
|
|
13
11
|
function isExpired(expiry: Expiry): boolean;
|
|
14
12
|
}
|
package/dist/cjs/Card/Expiry.js
CHANGED
|
@@ -3,22 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Expiry = void 0;
|
|
4
4
|
const isoly_1 = require("isoly");
|
|
5
5
|
const isly_1 = require("isly");
|
|
6
|
-
const isly2_1 = require("isly2");
|
|
7
6
|
const year = [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40];
|
|
8
7
|
const month = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
|
9
8
|
var Expiry;
|
|
10
9
|
(function (Expiry) {
|
|
11
10
|
Expiry.type = isly_1.isly.tuple(isly_1.isly.number([...year]), isly_1.isly.number([...month]));
|
|
12
|
-
Expiry.type2 = isly2_1.isly
|
|
13
|
-
.tuple(isly2_1.isly
|
|
14
|
-
.number("value", ...year)
|
|
15
|
-
.rename("Year")
|
|
16
|
-
.describe("Year of expiry."), isly2_1.isly
|
|
17
|
-
.number("value", ...month)
|
|
18
|
-
.rename("Month")
|
|
19
|
-
.describe("Month of expiry."))
|
|
20
|
-
.rename("Expiry")
|
|
21
|
-
.describe("The year and month the card is valid ([yy, mm]).");
|
|
22
11
|
function toDateTime(expiry) {
|
|
23
12
|
return isoly_1.isoly.DateTime.nextMonth("20" + expiry[0].toString() + "-" + expiry[1].toString().padStart(2, "0") + "-01T00:00:01.000Z");
|
|
24
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Expiry.js","sourceRoot":"","sources":["../../../Card/Expiry.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;
|
|
1
|
+
{"version":3,"file":"Expiry.js","sourceRoot":"","sources":["../../../Card/Expiry.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAE3B,MAAM,IAAI,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAU,CAAA;AAG9F,MAAM,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAU,CAAA;AAI9D,IAAiB,MAAM,CAetB;AAfD,WAAiB,MAAM;IACT,WAAI,GAAG,WAAI,CAAC,KAAK,CAAS,WAAI,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,WAAI,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;IACvF,SAAgB,UAAU,CAAC,MAAc;QACxC,OAAO,aAAK,CAAC,QAAQ,CAAC,SAAS,CAC9B,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,mBAAmB,CAC/F,CAAA;IACF,CAAC;IAJe,iBAAU,aAIzB,CAAA;IACD,SAAgB,SAAS,CAAC,MAAc;QACvC,MAAM,GAAG,GAAG,aAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAA;QAChC,MAAM,UAAU,GAAG,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;QACnC,OAAO,CACN,UAAU,GAAG,aAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC;YACxC,CAAC,UAAU,IAAI,aAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,aAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CACvF,CAAA;IACF,CAAC;IAPe,gBAAS,YAOxB,CAAA;AACF,CAAC,EAfgB,MAAM,sBAAN,MAAM,QAetB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { isoly } from "isoly";
|
|
2
|
-
import { isly as isly2 } from "isly2";
|
|
3
2
|
export interface Authorization {
|
|
4
3
|
type: "authorization";
|
|
5
4
|
id: string;
|
|
@@ -11,5 +10,4 @@ export declare namespace Authorization {
|
|
|
11
10
|
const statuses: readonly ["created", "confirmed", "refunded", "captured", "cancelled"];
|
|
12
11
|
type Status = (typeof statuses)[number];
|
|
13
12
|
const type: import("isly/dist/cjs/object").IslyObject<Authorization, object>;
|
|
14
|
-
const type2: isly2.Object<Authorization>;
|
|
15
13
|
}
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Authorization = void 0;
|
|
4
4
|
const isoly_1 = require("isoly");
|
|
5
|
-
const isoly2_1 = require("isoly2");
|
|
6
5
|
const isly_1 = require("isly");
|
|
7
|
-
const isly2_1 = require("isly2");
|
|
8
6
|
var Authorization;
|
|
9
7
|
(function (Authorization) {
|
|
10
8
|
Authorization.statuses = ["created", "confirmed", "refunded", "captured", "cancelled"];
|
|
@@ -15,15 +13,5 @@ var Authorization;
|
|
|
15
13
|
reason: isly_1.isly.string().optional(),
|
|
16
14
|
created: isly_1.isly.fromIs("isoly.DateTime", isoly_1.isoly.DateTime.is),
|
|
17
15
|
});
|
|
18
|
-
Authorization.type2 = isly2_1.isly.object({
|
|
19
|
-
type: isly2_1.isly.string("value", "authorization").rename("Operation.Type").describe("Type of operation."),
|
|
20
|
-
id: isly2_1.isly.string().rename("Id").describe("The id of the operation."),
|
|
21
|
-
status: isly2_1.isly
|
|
22
|
-
.string("value", ...Authorization.statuses)
|
|
23
|
-
.rename("Status")
|
|
24
|
-
.describe("The updated status of the operation."),
|
|
25
|
-
reason: isly2_1.isly.string().optional().rename("Reason").describe("The reason for the status change."),
|
|
26
|
-
created: isoly2_1.isoly.DateTime.type.describe("The time of the operation."),
|
|
27
|
-
});
|
|
28
16
|
})(Authorization || (exports.Authorization = Authorization = {}));
|
|
29
17
|
//# sourceMappingURL=Authorization.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Authorization.js","sourceRoot":"","sources":["../../../../Card/Operation/Authorization.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B
|
|
1
|
+
{"version":3,"file":"Authorization.js","sourceRoot":"","sources":["../../../../Card/Operation/Authorization.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAS3B,IAAiB,aAAa,CAU7B;AAVD,WAAiB,aAAa;IAChB,sBAAQ,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,CAAU,CAAA;IAEjF,kBAAI,GAAG,WAAI,CAAC,MAAM,CAAgB;QAC9C,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC,eAAe,CAAC;QAClC,EAAE,EAAE,WAAI,CAAC,MAAM,EAAE;QACjB,MAAM,EAAE,WAAI,CAAC,MAAM,CAAC,cAAA,QAAQ,CAAC;QAC7B,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAChC,OAAO,EAAE,WAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,aAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;KACzD,CAAC,CAAA;AACH,CAAC,EAVgB,aAAa,6BAAb,aAAa,QAU7B"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { isoly } from "isoly";
|
|
2
|
-
import { isly as isly2 } from "isly2";
|
|
3
2
|
import { Changeable } from "../Changeable";
|
|
4
3
|
export interface Card {
|
|
5
4
|
type: "card";
|
|
@@ -11,5 +10,4 @@ export declare namespace Card {
|
|
|
11
10
|
const statuses: readonly ["created", "changed", "cancelled"];
|
|
12
11
|
type Status = (typeof statuses)[number];
|
|
13
12
|
const type: import("isly/dist/cjs/object").IslyObject<Card, object>;
|
|
14
|
-
const type2: isly2.Object<Card>;
|
|
15
13
|
}
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Card = void 0;
|
|
4
4
|
const isoly_1 = require("isoly");
|
|
5
|
-
const isoly2_1 = require("isoly2");
|
|
6
5
|
const isly_1 = require("isly");
|
|
7
|
-
const isly2_1 = require("isly2");
|
|
8
6
|
const Changeable_1 = require("../Changeable");
|
|
9
7
|
var Card;
|
|
10
8
|
(function (Card) {
|
|
@@ -15,17 +13,5 @@ var Card;
|
|
|
15
13
|
from: Changeable_1.Changeable.type.optional(),
|
|
16
14
|
created: isly_1.isly.fromIs("isoly.DateTime", isoly_1.isoly.DateTime.is),
|
|
17
15
|
});
|
|
18
|
-
Card.type2 = isly2_1.isly
|
|
19
|
-
.object({
|
|
20
|
-
type: isly2_1.isly.string("value", "card").rename("Type").describe("Type of operation."),
|
|
21
|
-
status: isly2_1.isly
|
|
22
|
-
.string("value", ...Card.statuses)
|
|
23
|
-
.rename("Status")
|
|
24
|
-
.describe("The updated status of the card."),
|
|
25
|
-
from: Changeable_1.Changeable.type2.optional(),
|
|
26
|
-
created: isoly2_1.isoly.DateTime.type.rename("Created").describe("The time of the operation."),
|
|
27
|
-
})
|
|
28
|
-
.describe("A card operation.")
|
|
29
|
-
.rename("Operation.Card");
|
|
30
16
|
})(Card || (exports.Card = Card = {}));
|
|
31
17
|
//# sourceMappingURL=Card.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../../Card/Operation/Card.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B
|
|
1
|
+
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../../Card/Operation/Card.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAC3B,8CAA0C;AAS1C,IAAiB,IAAI,CASpB;AATD,WAAiB,IAAI;IACP,aAAQ,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAU,CAAA;IAEvD,SAAI,GAAG,WAAI,CAAC,MAAM,CAAO;QACrC,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QACzB,MAAM,EAAE,WAAI,CAAC,MAAM,CAAC,KAAA,QAAQ,CAAC;QAC7B,IAAI,EAAE,uBAAU,CAAC,IAAI,CAAC,QAAQ,EAAE;QAChC,OAAO,EAAE,WAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,aAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;KACzD,CAAC,CAAA;AACH,CAAC,EATgB,IAAI,oBAAJ,IAAI,QASpB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { isly } from "isly";
|
|
2
|
-
import { isly as isly2 } from "isly2";
|
|
3
2
|
import { Authorization } from "../../Authorization";
|
|
4
3
|
import { Entry } from "../../Settlement/Entry";
|
|
5
4
|
import { Authorization as OperationAuthorization } from "./Authorization";
|
|
@@ -9,5 +8,4 @@ export declare namespace Operation {
|
|
|
9
8
|
function fromAuthorization(authorization: Authorization, status: OperationAuthorization.Status): Operation;
|
|
10
9
|
function fromEntry(entry: Entry): Operation | undefined;
|
|
11
10
|
const type: isly.Type<Card | OperationAuthorization>;
|
|
12
|
-
const type2: isly2.Union<Operation>;
|
|
13
11
|
}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Operation = void 0;
|
|
4
4
|
const isoly_1 = require("isoly");
|
|
5
5
|
const isly_1 = require("isly");
|
|
6
|
-
const isly2_1 = require("isly2");
|
|
7
6
|
const Authorization_1 = require("./Authorization");
|
|
8
7
|
const Card_1 = require("./Card");
|
|
9
8
|
var Operation;
|
|
@@ -29,9 +28,5 @@ var Operation;
|
|
|
29
28
|
}
|
|
30
29
|
Operation.fromEntry = fromEntry;
|
|
31
30
|
Operation.type = isly_1.isly.union(Card_1.Card.type, Authorization_1.Authorization.type);
|
|
32
|
-
Operation.type2 = isly2_1.isly
|
|
33
|
-
.union(Card_1.Card.type2, Authorization_1.Authorization.type2)
|
|
34
|
-
.rename("Operation")
|
|
35
|
-
.describe("An operation performed on a card.");
|
|
36
31
|
})(Operation || (exports.Operation = Operation = {}));
|
|
37
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Card/Operation/index.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Card/Operation/index.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAG3B,mDAAyE;AACzE,iCAA6B;AAI7B,IAAiB,SAAS,CAoBzB;AApBD,WAAiB,SAAS;IACzB,SAAgB,iBAAiB,CAAC,aAA4B,EAAE,MAAqC;QACpG,OAAO;YACN,IAAI,EAAE,eAAe;YACrB,EAAE,EAAE,aAAa,EAAE,EAAE,IAAI,aAAa,CAAC,WAAW,EAAE,EAAE,IAAI,SAAS;YACnE,MAAM;YACN,OAAO,EAAE,aAAK,CAAC,QAAQ,CAAC,GAAG,EAAE;SAC7B,CAAA;IACF,CAAC;IAPe,2BAAiB,oBAOhC,CAAA;IACD,SAAgB,SAAS,CAAC,KAAY;QACrC,OAAO,KAAK,CAAC,MAAM,IAAI,QAAQ;YAC9B,CAAC,CAAC,SAAS;YACX,CAAC,CAAC;gBACA,IAAI,EAAE,eAAe;gBACrB,EAAE,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE;gBACxB,MAAM,EAAE,KAAK,CAAC,IAAI,IAAI,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU;gBACzD,OAAO,EAAE,aAAK,CAAC,QAAQ,CAAC,GAAG,EAAE;aAC7B,CAAA;IACJ,CAAC;IATe,mBAAS,YASxB,CAAA;IACY,cAAI,GAAG,WAAI,CAAC,KAAK,CAAC,WAAI,CAAC,IAAI,EAAE,6BAAsB,CAAC,IAAI,CAAC,CAAA;AACvE,CAAC,EApBgB,SAAS,yBAAT,SAAS,QAoBzB"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { isly } from "isly";
|
|
2
|
-
import { isly as isly2 } from "isly2";
|
|
3
2
|
import { Realm } from "../Realm";
|
|
4
3
|
import { Stack } from "./Stack";
|
|
5
4
|
export type Preset = (typeof Preset.names)[number];
|
|
6
5
|
export declare namespace Preset {
|
|
7
6
|
const names: readonly ["p2p-diners-175", "p2p-diners-200", "p2p-mc-200", "p2p-visa-bid-115", "p2p-visa-bp-140", "p2p-visa-cdd-185", "p2p-visa-idx-140", "p2p-visa-idx-160", "p2p-visa-idx-200", "test-pg-150", "test-pg-200", "test-ta-mc-200", "test-ta-pg-200", "test-ta-pg-bc-200", "test-diners-175"];
|
|
8
7
|
const type: isly.Type<"p2p-diners-175" | "p2p-diners-200" | "p2p-mc-200" | "p2p-visa-bid-115" | "p2p-visa-bp-140" | "p2p-visa-cdd-185" | "p2p-visa-idx-140" | "p2p-visa-idx-160" | "p2p-visa-idx-200" | "test-pg-150" | "test-pg-200" | "test-ta-mc-200" | "test-ta-pg-200" | "test-ta-pg-bc-200" | "test-diners-175">;
|
|
9
|
-
const type2: isly2.String<"p2p-diners-175" | "p2p-diners-200" | "p2p-mc-200" | "p2p-visa-bid-115" | "p2p-visa-bp-140" | "p2p-visa-cdd-185" | "p2p-visa-idx-140" | "p2p-visa-idx-160" | "p2p-visa-idx-200" | "test-pg-150" | "test-pg-200" | "test-ta-mc-200" | "test-ta-pg-200" | "test-ta-pg-bc-200" | "test-diners-175">;
|
|
10
8
|
const forRealm: Record<Realm, Preset[]>;
|
|
11
9
|
const presets: Record<Preset, Stack>;
|
|
12
10
|
}
|
package/dist/cjs/Card/Preset.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Preset = void 0;
|
|
4
4
|
const isly_1 = require("isly");
|
|
5
|
-
const isly2_1 = require("isly2");
|
|
6
5
|
var Preset;
|
|
7
6
|
(function (Preset) {
|
|
8
7
|
Preset.names = [
|
|
@@ -23,10 +22,6 @@ var Preset;
|
|
|
23
22
|
"test-diners-175",
|
|
24
23
|
];
|
|
25
24
|
Preset.type = isly_1.isly.string(Preset.names);
|
|
26
|
-
Preset.type2 = isly2_1.isly
|
|
27
|
-
.string("value", ...Preset.names)
|
|
28
|
-
.rename("Preset")
|
|
29
|
-
.describe("Card configuration (iin/scheme/interchange).");
|
|
30
25
|
Preset.forRealm = {
|
|
31
26
|
test: ["test-pg-150", "test-pg-200", "test-ta-mc-200", "test-ta-pg-200", "test-ta-pg-bc-200", "test-diners-175"],
|
|
32
27
|
uk: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Preset.js","sourceRoot":"","sources":["../../../Card/Preset.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;
|
|
1
|
+
{"version":3,"file":"Preset.js","sourceRoot":"","sources":["../../../Card/Preset.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAO3B,IAAiB,MAAM,CAmDtB;AAnDD,WAAiB,MAAM;IACT,YAAK,GAAG;QACpB,gBAAgB;QAChB,gBAAgB;QAChB,YAAY;QACZ,kBAAkB;QAClB,iBAAiB;QACjB,kBAAkB;QAClB,kBAAkB;QAClB,kBAAkB;QAClB,kBAAkB;QAClB,aAAa;QACb,aAAa;QACb,gBAAgB;QAChB,gBAAgB;QAChB,mBAAmB;QACnB,iBAAiB;KACR,CAAA;IACG,WAAI,GAAG,WAAI,CAAC,MAAM,CAAS,OAAA,KAAK,CAAC,CAAA;IACjC,eAAQ,GAA4B;QAChD,IAAI,EAAE,CAAC,aAAa,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,iBAAiB,CAAC;QAChH,EAAE,EAAE;YACH,gBAAgB;YAChB,gBAAgB;YAChB,YAAY;YACZ,kBAAkB;YAClB,iBAAiB;YACjB,kBAAkB;YAClB,kBAAkB;YAClB,kBAAkB;YAClB,kBAAkB;SAClB;QACD,GAAG,EAAE,EAAE;KACP,CAAA;IACY,cAAO,GAA0B;QAC7C,gBAAgB,EAAE,eAAe;QACjC,gBAAgB,EAAE,eAAe;QACjC,YAAY,EAAE,mBAAmB;QACjC,kBAAkB,EAAE,qBAAqB;QACzC,iBAAiB,EAAE,qBAAqB;QACxC,kBAAkB,EAAE,qBAAqB;QACzC,kBAAkB,EAAE,qBAAqB;QACzC,kBAAkB,EAAE,qBAAqB;QACzC,kBAAkB,EAAE,qBAAqB;QACzC,aAAa,EAAE,cAAc;QAC7B,aAAa,EAAE,cAAc;QAC7B,gBAAgB,EAAE,kBAAkB;QACpC,gBAAgB,EAAE,kBAAkB;QACpC,mBAAmB,EAAE,kBAAkB;QACvC,iBAAiB,EAAE,oBAAoB;KACvC,CAAA;AACF,CAAC,EAnDgB,MAAM,sBAAN,MAAM,QAmDtB"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { isly } from "isly";
|
|
2
|
-
import { isly as isly2 } from "isly2";
|
|
3
2
|
import { Rail } from "../../Rail";
|
|
4
3
|
export type Merchant = (typeof Merchant.values)[number];
|
|
5
4
|
export declare namespace Merchant {
|
|
6
5
|
const values: ("ryanair" | "easyjet" | "wizzair" | "aer lingus" | "air malta" | "vueling" | "jet2" | "eurowings" | "turkish air" | "tap" | "pegasus" | "royal air maroc" | "qatar air" | "blue island" | "klm" | "iberia" | "emirates" | "aegean airlines" | "tui" | "united airlines" | "cathay pacific airlines" | "air serbia" | "copa air" | "bamboo airways" | "latam airlines" | "flydubai" | "condor" | "transavia" | "austrian air" | "alitalia" | "apg airlines" | "iceland air" | "flyone" | "avianca" | "brussels airlines" | "saudia" | "aeromexico" | "gulf air" | "ethiopian airlines" | "egypt air" | "albawings" | "iberojet" | "norwegian air" | "vistara" | "air greenland" | "sky express" | "air canada" | "philippine airlines" | "south african airlink" | "air benelux" | "tunisair" | "lufthansa" | "corendon airlines" | "uganda airlines" | "freebird airlines" | "kenya airway" | "kuwait air" | "british airways" | "czech airlines" | "lot polish airlines" | "volotea" | "flybe" | "bulgaria air" | "sas" | "qantas" | "air india" | "air europa" | "royal jordanian" | "virgin atlantic" | "flexflight" | "rwandair" | "hahn air" | "american air" | "pakistan international airlines" | "singapore airlines" | "delta air lines" | "croatia airlines" | "air asia" | "hawaiian airlines" | "oman air" | "etihad air" | "middle east airlines" | "logan air" | "aurigny" | "eastern airways" | "sun express" | "spirit air" | "air france" | "malaysia airlines" | "finnair" | "swiss air" | "air china" | "ana air" | "ae bsp" | "thai airways" | "jet blue" | "westjet" | "aerolineas" | "air seoul" | "azerbaijan airlines" | "air dolomiti" | "bangkok airways" | "china airlines" | "china eastern airlines" | "eva air" | "jetstar airways" | "km malta airlines" | "ita airways" | "china southern airlines" | "world2fly" | "sata denmark" | "air baltic" | "ajet" | "flynorse" | "hainan air" | "sichuan airlines" | "korean air" | "gol airlines" | "azul brazilian airlines" | "flysafair" | "air mauritius" | "alaska airlines" | "allegiant air" | "plus ultra líneas aéreas" | "boliviana de aviacion" | "caribbean airlines" | "vietnam air" | "parkwing" | "albergo - food and drinks" | "amtrak" | "italo treno" | "ilsa web" | "rail ninja" | "irish rail" | "österreichische bundesbahnen" | "rail europe" | "via rail canada" | "direct ferries" | "booking.com" | "expedia group" | "google ads" | "facebook ads" | "milan airport shop" | "blacklane" | "visit britain gov" | "best western" | "una hotels" | "unaway hotels" | "albergo - lodging" | "leonardo hotels" | "hotel mercure" | "nh hotels & resorts" | "novotel hotels" | "ac hotels" | "marriott hotels" | "sheraton hotels and resorts" | "ih hotels" | "ibis hotels" | "hyatt hotels & resorts" | "hilton hotels & resorts" | "holiday inn" | "four seasons" | "doubletree by hilton" | "crowne plaza hotels" | "wmm hotel betriebs gmbh" | "the niu hotels" | "radisson hotels" | "achat hotels" | "arcotel hotels" | "gruppo una hotels and resorts" | "b&b hotels" | "dormero hotels" | "dorint hotels" | "schani hotels" | "innside" | "intercityhotel" | "lindner hotels & resorts" | "limehome" | "moxy hotels" | "roompay" | "rioca hotels" | "adagio" | "barcelo hotel group" | "campanile hotels" | "clayton hotels" | "palace catania" | "milano verticle" | "courtyard by marriott" | "splitmyfare")[];
|
|
7
6
|
const type: isly.Type<"ryanair" | "easyjet" | "wizzair" | "aer lingus" | "air malta" | "vueling" | "jet2" | "eurowings" | "turkish air" | "tap" | "pegasus" | "royal air maroc" | "qatar air" | "blue island" | "klm" | "iberia" | "emirates" | "aegean airlines" | "tui" | "united airlines" | "cathay pacific airlines" | "air serbia" | "copa air" | "bamboo airways" | "latam airlines" | "flydubai" | "condor" | "transavia" | "austrian air" | "alitalia" | "apg airlines" | "iceland air" | "flyone" | "avianca" | "brussels airlines" | "saudia" | "aeromexico" | "gulf air" | "ethiopian airlines" | "egypt air" | "albawings" | "iberojet" | "norwegian air" | "vistara" | "air greenland" | "sky express" | "air canada" | "philippine airlines" | "south african airlink" | "air benelux" | "tunisair" | "lufthansa" | "corendon airlines" | "uganda airlines" | "freebird airlines" | "kenya airway" | "kuwait air" | "british airways" | "czech airlines" | "lot polish airlines" | "volotea" | "flybe" | "bulgaria air" | "sas" | "qantas" | "air india" | "air europa" | "royal jordanian" | "virgin atlantic" | "flexflight" | "rwandair" | "hahn air" | "american air" | "pakistan international airlines" | "singapore airlines" | "delta air lines" | "croatia airlines" | "air asia" | "hawaiian airlines" | "oman air" | "etihad air" | "middle east airlines" | "logan air" | "aurigny" | "eastern airways" | "sun express" | "spirit air" | "air france" | "malaysia airlines" | "finnair" | "swiss air" | "air china" | "ana air" | "ae bsp" | "thai airways" | "jet blue" | "westjet" | "aerolineas" | "air seoul" | "azerbaijan airlines" | "air dolomiti" | "bangkok airways" | "china airlines" | "china eastern airlines" | "eva air" | "jetstar airways" | "km malta airlines" | "ita airways" | "china southern airlines" | "world2fly" | "sata denmark" | "air baltic" | "ajet" | "flynorse" | "hainan air" | "sichuan airlines" | "korean air" | "gol airlines" | "azul brazilian airlines" | "flysafair" | "air mauritius" | "alaska airlines" | "allegiant air" | "plus ultra líneas aéreas" | "boliviana de aviacion" | "caribbean airlines" | "vietnam air" | "parkwing" | "albergo - food and drinks" | "amtrak" | "italo treno" | "ilsa web" | "rail ninja" | "irish rail" | "österreichische bundesbahnen" | "rail europe" | "via rail canada" | "direct ferries" | "booking.com" | "expedia group" | "google ads" | "facebook ads" | "milan airport shop" | "blacklane" | "visit britain gov" | "best western" | "una hotels" | "unaway hotels" | "albergo - lodging" | "leonardo hotels" | "hotel mercure" | "nh hotels & resorts" | "novotel hotels" | "ac hotels" | "marriott hotels" | "sheraton hotels and resorts" | "ih hotels" | "ibis hotels" | "hyatt hotels & resorts" | "hilton hotels & resorts" | "holiday inn" | "four seasons" | "doubletree by hilton" | "crowne plaza hotels" | "wmm hotel betriebs gmbh" | "the niu hotels" | "radisson hotels" | "achat hotels" | "arcotel hotels" | "gruppo una hotels and resorts" | "b&b hotels" | "dormero hotels" | "dorint hotels" | "schani hotels" | "innside" | "intercityhotel" | "lindner hotels & resorts" | "limehome" | "moxy hotels" | "roompay" | "rioca hotels" | "adagio" | "barcelo hotel group" | "campanile hotels" | "clayton hotels" | "palace catania" | "milano verticle" | "courtyard by marriott" | "splitmyfare">;
|
|
8
|
-
const type2: isly2.String<"ryanair" | "easyjet" | "wizzair" | "aer lingus" | "air malta" | "vueling" | "jet2" | "eurowings" | "turkish air" | "tap" | "pegasus" | "royal air maroc" | "qatar air" | "blue island" | "klm" | "iberia" | "emirates" | "aegean airlines" | "tui" | "united airlines" | "cathay pacific airlines" | "air serbia" | "copa air" | "bamboo airways" | "latam airlines" | "flydubai" | "condor" | "transavia" | "austrian air" | "alitalia" | "apg airlines" | "iceland air" | "flyone" | "avianca" | "brussels airlines" | "saudia" | "aeromexico" | "gulf air" | "ethiopian airlines" | "egypt air" | "albawings" | "iberojet" | "norwegian air" | "vistara" | "air greenland" | "sky express" | "air canada" | "philippine airlines" | "south african airlink" | "air benelux" | "tunisair" | "lufthansa" | "corendon airlines" | "uganda airlines" | "freebird airlines" | "kenya airway" | "kuwait air" | "british airways" | "czech airlines" | "lot polish airlines" | "volotea" | "flybe" | "bulgaria air" | "sas" | "qantas" | "air india" | "air europa" | "royal jordanian" | "virgin atlantic" | "flexflight" | "rwandair" | "hahn air" | "american air" | "pakistan international airlines" | "singapore airlines" | "delta air lines" | "croatia airlines" | "air asia" | "hawaiian airlines" | "oman air" | "etihad air" | "middle east airlines" | "logan air" | "aurigny" | "eastern airways" | "sun express" | "spirit air" | "air france" | "malaysia airlines" | "finnair" | "swiss air" | "air china" | "ana air" | "ae bsp" | "thai airways" | "jet blue" | "westjet" | "aerolineas" | "air seoul" | "azerbaijan airlines" | "air dolomiti" | "bangkok airways" | "china airlines" | "china eastern airlines" | "eva air" | "jetstar airways" | "km malta airlines" | "ita airways" | "china southern airlines" | "world2fly" | "sata denmark" | "air baltic" | "ajet" | "flynorse" | "hainan air" | "sichuan airlines" | "korean air" | "gol airlines" | "azul brazilian airlines" | "flysafair" | "air mauritius" | "alaska airlines" | "allegiant air" | "plus ultra líneas aéreas" | "boliviana de aviacion" | "caribbean airlines" | "vietnam air" | "parkwing" | "albergo - food and drinks" | "amtrak" | "italo treno" | "ilsa web" | "rail ninja" | "irish rail" | "österreichische bundesbahnen" | "rail europe" | "via rail canada" | "direct ferries" | "booking.com" | "expedia group" | "google ads" | "facebook ads" | "milan airport shop" | "blacklane" | "visit britain gov" | "best western" | "una hotels" | "unaway hotels" | "albergo - lodging" | "leonardo hotels" | "hotel mercure" | "nh hotels & resorts" | "novotel hotels" | "ac hotels" | "marriott hotels" | "sheraton hotels and resorts" | "ih hotels" | "ibis hotels" | "hyatt hotels & resorts" | "hilton hotels & resorts" | "holiday inn" | "four seasons" | "doubletree by hilton" | "crowne plaza hotels" | "wmm hotel betriebs gmbh" | "the niu hotels" | "radisson hotels" | "achat hotels" | "arcotel hotels" | "gruppo una hotels and resorts" | "b&b hotels" | "dormero hotels" | "dorint hotels" | "schani hotels" | "innside" | "intercityhotel" | "lindner hotels & resorts" | "limehome" | "moxy hotels" | "roompay" | "rioca hotels" | "adagio" | "barcelo hotel group" | "campanile hotels" | "clayton hotels" | "palace catania" | "milano verticle" | "courtyard by marriott" | "splitmyfare">;
|
|
9
7
|
function check(merchant: Merchant, counterpart: Rail.Address.Card.Counterpart): boolean;
|
|
10
8
|
function resolve(counterpart: Rail.Address.Card.Counterpart): Merchant | undefined;
|
|
11
9
|
}
|
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Merchant = void 0;
|
|
4
4
|
const isly_1 = require("isly");
|
|
5
|
-
const isly2_1 = require("isly2");
|
|
6
5
|
const typedly_1 = require("typedly");
|
|
7
6
|
const merchants_1 = require("./merchants");
|
|
8
7
|
var Merchant;
|
|
9
8
|
(function (Merchant) {
|
|
10
9
|
Merchant.values = typedly_1.typedly.Object.keys(merchants_1.merchants);
|
|
11
10
|
Merchant.type = isly_1.isly.string(Merchant.values);
|
|
12
|
-
Merchant.type2 = isly2_1.isly.string("value", ...Merchant.values);
|
|
13
11
|
function check(merchant, counterpart) {
|
|
14
12
|
const attribute = merchants_1.merchants[merchant];
|
|
15
13
|
let result;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Merchant.js","sourceRoot":"","sources":["../../../../Card/Restriction/Merchant.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,
|
|
1
|
+
{"version":3,"file":"Merchant.js","sourceRoot":"","sources":["../../../../Card/Restriction/Merchant.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,qCAAiC;AAEjC,2CAAuC;AAIvC,IAAiB,QAAQ,CA+BxB;AA/BD,WAAiB,QAAQ;IACX,eAAM,GAAG,iBAAO,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAS,CAAC,CAAA;IACvC,aAAI,GAAG,WAAI,CAAC,MAAM,CAAW,SAAA,MAAM,CAAC,CAAA;IACjD,SAAgB,KAAK,CAAC,QAAkB,EAAE,WAA0C;QACnF,MAAM,SAAS,GAAc,qBAAS,CAAC,QAAQ,CAAC,CAAA;QAChD,IAAI,MAAe,CAAA;QACnB,IAAI,SAAS,EAAE,cAAc,IAAI,WAAW,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;YAChE,MAAM,GAAG,IAAI,CAAA;QACd,CAAC;aAAM,IAAI,SAAS,CAAC,QAAQ,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC;YACjD,MAAM;gBACL,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC;oBAChE,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;QACrE,CAAC;aAAM,IAAI,SAAS,CAAC,UAAU,IAAI,SAAS,CAAC,IAAI,EAAE,CAAC;YACnD,MAAM;gBACL,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC;oBAChE,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;QACzE,CAAC;aAAM,CAAC;YACP,MAAM,GAAG,KAAK,CAAA;QACf,CAAC;QACD,OAAO,MAAM,CAAA;IACd,CAAC;IAjBe,cAAK,QAiBpB,CAAA;IACD,SAAgB,OAAO,CAAC,WAA0C;QACjE,IAAI,MAA4B,CAAA;QAChC,KAAK,MAAM,QAAQ,IAAI,SAAA,MAAM,EAAE,CAAC;YAC/B,IAAI,KAAK,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,CAAC;gBAClC,MAAM,GAAG,QAAQ,CAAA;gBACjB,MAAK;YACN,CAAC;QACF,CAAC;QACD,OAAO,MAAM,CAAA;IACd,CAAC;IATe,gBAAO,UAStB,CAAA;AACF,CAAC,EA/BgB,QAAQ,wBAAR,QAAQ,QA+BxB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { isly as isly2 } from "isly2";
|
|
2
1
|
import type { Transaction } from "../../Transaction";
|
|
3
2
|
import { Merchant as RestrictionsMerchant } from "./Merchant";
|
|
4
3
|
export interface Restriction {
|
|
@@ -7,6 +6,5 @@ export interface Restriction {
|
|
|
7
6
|
export declare namespace Restriction {
|
|
8
7
|
export import Merchant = RestrictionsMerchant;
|
|
9
8
|
const type: import("isly/dist/cjs/object").IslyObject<Restriction, object>;
|
|
10
|
-
const type2: isly2.Object<Restriction>;
|
|
11
9
|
function check(restrictions: Restriction, transaction: Transaction.Creatable.CardTransaction | Transaction.PreTransaction.Authorization): boolean;
|
|
12
10
|
}
|
|
@@ -2,19 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Restriction = void 0;
|
|
4
4
|
const isly_1 = require("isly");
|
|
5
|
-
const isly2_1 = require("isly2");
|
|
6
5
|
const Merchant_1 = require("./Merchant");
|
|
7
6
|
var Restriction;
|
|
8
7
|
(function (Restriction) {
|
|
9
8
|
Restriction.Merchant = Merchant_1.Merchant;
|
|
10
9
|
Restriction.type = isly_1.isly.object({ merchants: Restriction.Merchant.type.array().optional() });
|
|
11
|
-
Restriction.type2 = isly2_1.isly.object({
|
|
12
|
-
merchants: Restriction.Merchant.type2
|
|
13
|
-
.array()
|
|
14
|
-
.optional()
|
|
15
|
-
.rename("Merchants")
|
|
16
|
-
.describe("List of merchants that the card can be used with."),
|
|
17
|
-
});
|
|
18
10
|
function check(restrictions, transaction) {
|
|
19
11
|
let result = true;
|
|
20
12
|
if (restrictions.merchants?.length) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Card/Restriction/index.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Card/Restriction/index.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAE3B,yCAA6D;AAK7D,IAAiB,WAAW,CAa3B;AAbD,WAAiB,WAAW;IACb,oBAAQ,GAAG,mBAAoB,CAAA;IAChC,gBAAI,GAAG,WAAI,CAAC,MAAM,CAAc,EAAE,SAAS,EAAE,YAAA,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAA;IAC7F,SAAgB,KAAK,CACpB,YAAyB,EACzB,WAA6F;QAE7F,IAAI,MAAM,GAAY,IAAI,CAAA;QAC1B,IAAI,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,CAAC;YACpC,MAAM,GAAG,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,YAAA,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC,CAAA;QACpG,CAAC;QACD,OAAO,MAAM,CAAA;IACd,CAAC;IATe,iBAAK,QASpB,CAAA;AACF,CAAC,EAbgB,WAAW,2BAAX,WAAW,QAa3B"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { isly } from "isly2";
|
|
2
1
|
export interface Merchant {
|
|
3
2
|
name: string;
|
|
4
3
|
unambiguousMcc?: string;
|
|
@@ -7,6 +6,6 @@ export interface Merchant {
|
|
|
7
6
|
contains?: Readonly<string[]>;
|
|
8
7
|
}
|
|
9
8
|
export declare namespace Merchant {
|
|
10
|
-
const type: isly.
|
|
9
|
+
const type: import("isly/dist/cjs/object").IslyObject<Merchant, object>;
|
|
11
10
|
function parse(value: Record<string, any>): Merchant | undefined;
|
|
12
11
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Merchant = void 0;
|
|
4
|
-
const
|
|
4
|
+
const isly_1 = require("isly");
|
|
5
5
|
var Merchant;
|
|
6
6
|
(function (Merchant) {
|
|
7
|
-
Merchant.type =
|
|
8
|
-
name:
|
|
9
|
-
unambiguousMcc:
|
|
10
|
-
mccs:
|
|
11
|
-
startsWith:
|
|
12
|
-
contains:
|
|
7
|
+
Merchant.type = isly_1.isly.object({
|
|
8
|
+
name: isly_1.isly.string(),
|
|
9
|
+
unambiguousMcc: isly_1.isly.string().optional(),
|
|
10
|
+
mccs: isly_1.isly.string().array().optional(),
|
|
11
|
+
startsWith: isly_1.isly.string().array().optional(),
|
|
12
|
+
contains: isly_1.isly.string().array().optional(),
|
|
13
13
|
});
|
|
14
14
|
function parse(value) {
|
|
15
15
|
const result = {
|
|
@@ -19,7 +19,7 @@ var Merchant;
|
|
|
19
19
|
startsWith: value.startsWith && (Array.isArray(value.startsWith) ? value.startsWith : [value.startsWith]),
|
|
20
20
|
contains: value.contains && (Array.isArray(value.contains) ? value.contains : [value.contains]),
|
|
21
21
|
};
|
|
22
|
-
return Merchant.type.
|
|
22
|
+
return Merchant.type.get(result);
|
|
23
23
|
}
|
|
24
24
|
Merchant.parse = parse;
|
|
25
25
|
})(Merchant || (exports.Merchant = Merchant = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Merchant.js","sourceRoot":"","sources":["../../../../../Card/Restriction/merchants/Merchant.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"Merchant.js","sourceRoot":"","sources":["../../../../../Card/Restriction/merchants/Merchant.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAS3B,IAAiB,QAAQ,CAkBxB;AAlBD,WAAiB,QAAQ;IACX,aAAI,GAAG,WAAI,CAAC,MAAM,CAAW;QACzC,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE;QACnB,cAAc,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACxC,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QACtC,UAAU,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAC5C,QAAQ,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KAC1C,CAAC,CAAA;IACF,SAAgB,KAAK,CAAC,KAA0B;QAC/C,MAAM,MAAM,GAAG;YACd,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE;YAC/B,cAAc,EAAE,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,cAAc,CAAC,QAAQ,EAAE;YACvE,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC7G,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;YACzG,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;SAC/F,CAAA;QACD,OAAO,SAAA,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IACxB,CAAC;IATe,cAAK,QASpB,CAAA;AACF,CAAC,EAlBgB,QAAQ,wBAAR,QAAQ,QAkBxB"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { isly } from "isly";
|
|
2
|
-
import { isly as isly2 } from "isly2";
|
|
3
2
|
export type Scheme = (typeof Scheme.schemes)[number];
|
|
4
3
|
export declare namespace Scheme {
|
|
5
4
|
const schemes: readonly ["mastercard", "diners", "visa"];
|
|
6
5
|
const type: isly.Type<"mastercard" | "diners" | "visa">;
|
|
7
|
-
const type2: isly2.String<"mastercard" | "diners" | "visa">;
|
|
8
6
|
}
|