@pax2pay/client 0.3.80 → 0.3.81
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/dist/model/CardTypeSpecification.d.ts +5 -1
- package/dist/model/CardTypeSpecification.js +12 -16
- package/dist/model/CardTypeSpecification.js.map +1 -1
- package/dist/model/CardTypeSpecificationFlag.d.ts +5 -4
- package/dist/model/CardTypeSpecificationFlag.js +4 -5
- package/dist/model/CardTypeSpecificationFlag.js.map +1 -1
- package/dist/model/ProviderCode.d.ts +5 -4
- package/dist/model/ProviderCode.js +4 -5
- package/dist/model/ProviderCode.js.map +1 -1
- package/model/CardTypeSpecification.ts +13 -17
- package/model/CardTypeSpecificationFlag.ts +6 -5
- package/model/ProviderCode.ts +6 -5
- package/package.json +3 -2
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { isly } from "isly";
|
|
1
2
|
import { CardTypeSpecificationFlag } from "./CardTypeSpecificationFlag";
|
|
3
|
+
import { ProviderCode } from "./ProviderCode";
|
|
2
4
|
export interface CardTypeSpecification {
|
|
3
5
|
cardTypeId?: string;
|
|
4
6
|
description?: string;
|
|
@@ -6,7 +8,9 @@ export interface CardTypeSpecification {
|
|
|
6
8
|
funding?: "DEBIT" | "CREDIT" | "PREPAID";
|
|
7
9
|
flags?: CardTypeSpecificationFlag[];
|
|
8
10
|
bin?: string;
|
|
11
|
+
providerCode?: ProviderCode;
|
|
9
12
|
}
|
|
10
13
|
export declare namespace CardTypeSpecification {
|
|
11
|
-
|
|
14
|
+
const type: isly.object.ExtendableType<CardTypeSpecification>;
|
|
15
|
+
const is: isly.Type.IsFunction<CardTypeSpecification>;
|
|
12
16
|
}
|
|
@@ -1,21 +1,17 @@
|
|
|
1
|
+
import { isly } from "isly";
|
|
1
2
|
import { CardTypeSpecificationFlag } from "./CardTypeSpecificationFlag";
|
|
3
|
+
import { ProviderCode } from "./ProviderCode";
|
|
2
4
|
export var CardTypeSpecification;
|
|
3
5
|
(function (CardTypeSpecification) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
value.funding == "CREDIT" ||
|
|
15
|
-
value.funding == "PREPAID") &&
|
|
16
|
-
(value.flags == undefined || (Array.isArray(value.flags) && value.flags.every(CardTypeSpecificationFlag.is))) &&
|
|
17
|
-
(value.bin == undefined || typeof value.bin == "string"));
|
|
18
|
-
}
|
|
19
|
-
CardTypeSpecification.is = is;
|
|
6
|
+
CardTypeSpecification.type = isly.object({
|
|
7
|
+
cardTypeId: isly.string().optional(),
|
|
8
|
+
description: isly.string().optional(),
|
|
9
|
+
scheme: isly.string(["VISA", "MASTERCARD", "AMERICAN_EXPRESS"]).optional(),
|
|
10
|
+
funding: isly.string(["DEBIT", "CREDIT", "PREPAID"]).optional(),
|
|
11
|
+
flags: isly.array(CardTypeSpecificationFlag.type).optional(),
|
|
12
|
+
bin: isly.string().optional(),
|
|
13
|
+
providerCode: ProviderCode.type.optional(),
|
|
14
|
+
});
|
|
15
|
+
CardTypeSpecification.is = CardTypeSpecification.type.is;
|
|
20
16
|
})(CardTypeSpecification || (CardTypeSpecification = {}));
|
|
21
17
|
//# sourceMappingURL=CardTypeSpecification.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardTypeSpecification.js","sourceRoot":"../","sources":["model/CardTypeSpecification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"CardTypeSpecification.js","sourceRoot":"../","sources":["model/CardTypeSpecification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAe7C,MAAM,KAAW,qBAAqB,CAWrC;AAXD,WAAiB,qBAAqB;IACxB,0BAAI,GAAG,IAAI,CAAC,MAAM,CAAwB;QACtD,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACpC,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACrC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,YAAY,EAAE,kBAAkB,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC1E,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC/D,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;QAC5D,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC7B,YAAY,EAAE,YAAY,CAAC,IAAI,CAAC,QAAQ,EAAE;KAC1C,CAAC,CAAA;IACW,wBAAE,GAAG,sBAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAXgB,qBAAqB,KAArB,qBAAqB,QAWrC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export type CardTypeSpecificationFlag = typeof
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
export type CardTypeSpecificationFlag = typeof CardTypeSpecificationFlag.types[number];
|
|
3
3
|
export declare namespace CardTypeSpecificationFlag {
|
|
4
|
-
|
|
4
|
+
const types: readonly ["CORPORATE", "BUSINESS", "CONSUMER"];
|
|
5
|
+
const type: isly.Type<"CORPORATE" | "BUSINESS" | "CONSUMER">;
|
|
6
|
+
const is: isly.Type.IsFunction<"CORPORATE" | "BUSINESS" | "CONSUMER">;
|
|
5
7
|
}
|
|
6
|
-
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { isly } from "isly";
|
|
2
2
|
export var CardTypeSpecificationFlag;
|
|
3
3
|
(function (CardTypeSpecificationFlag) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
CardTypeSpecificationFlag.is = is;
|
|
4
|
+
CardTypeSpecificationFlag.types = ["CORPORATE", "BUSINESS", "CONSUMER"];
|
|
5
|
+
CardTypeSpecificationFlag.type = isly.string(CardTypeSpecificationFlag.types);
|
|
6
|
+
CardTypeSpecificationFlag.is = CardTypeSpecificationFlag.type.is;
|
|
8
7
|
})(CardTypeSpecificationFlag || (CardTypeSpecificationFlag = {}));
|
|
9
8
|
//# sourceMappingURL=CardTypeSpecificationFlag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardTypeSpecificationFlag.js","sourceRoot":"../","sources":["model/CardTypeSpecificationFlag.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"CardTypeSpecificationFlag.js","sourceRoot":"../","sources":["model/CardTypeSpecificationFlag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,MAAM,KAAW,yBAAyB,CAIzC;AAJD,WAAiB,yBAAyB;IAC5B,+BAAK,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,UAAU,CAAU,CAAA;IACtD,8BAAI,GAAG,IAAI,CAAC,MAAM,CAAC,0BAAA,KAAK,CAAC,CAAA;IACzB,4BAAE,GAAG,0BAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAJgB,yBAAyB,KAAzB,yBAAyB,QAIzC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export type ProviderCode = typeof
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
export type ProviderCode = typeof ProviderCode.types[number];
|
|
3
3
|
export declare namespace ProviderCode {
|
|
4
|
-
|
|
4
|
+
const types: readonly ["conferma", "ixaris", "wex", "fake", "lodged", "modulr", "unknown", "pax2pay"];
|
|
5
|
+
const type: isly.Type<"unknown" | "conferma" | "ixaris" | "wex" | "fake" | "lodged" | "modulr" | "pax2pay">;
|
|
6
|
+
const is: isly.Type.IsFunction<"unknown" | "conferma" | "ixaris" | "wex" | "fake" | "lodged" | "modulr" | "pax2pay">;
|
|
5
7
|
}
|
|
6
|
-
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { isly } from "isly";
|
|
2
2
|
export var ProviderCode;
|
|
3
3
|
(function (ProviderCode) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
ProviderCode.is = is;
|
|
4
|
+
ProviderCode.types = ["conferma", "ixaris", "wex", "fake", "lodged", "modulr", "unknown", "pax2pay"];
|
|
5
|
+
ProviderCode.type = isly.string(ProviderCode.types);
|
|
6
|
+
ProviderCode.is = ProviderCode.type.is;
|
|
8
7
|
})(ProviderCode || (ProviderCode = {}));
|
|
9
8
|
//# sourceMappingURL=ProviderCode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderCode.js","sourceRoot":"../","sources":["model/ProviderCode.ts"],"names":[],"mappings":"AAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"ProviderCode.js","sourceRoot":"../","sources":["model/ProviderCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,MAAM,KAAW,YAAY,CAI5B;AAJD,WAAiB,YAAY;IACf,kBAAK,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAU,CAAA;IAChG,iBAAI,GAAG,IAAI,CAAC,MAAM,CAAC,aAAA,KAAK,CAAC,CAAA;IACzB,eAAE,GAAG,aAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAJgB,YAAY,KAAZ,YAAY,QAI5B"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { isly } from "isly"
|
|
1
2
|
import { CardTypeSpecificationFlag } from "./CardTypeSpecificationFlag"
|
|
3
|
+
import { ProviderCode } from "./ProviderCode"
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* The card type to use in the card options requests.
|
|
@@ -10,24 +12,18 @@ export interface CardTypeSpecification {
|
|
|
10
12
|
funding?: "DEBIT" | "CREDIT" | "PREPAID"
|
|
11
13
|
flags?: CardTypeSpecificationFlag[]
|
|
12
14
|
bin?: string
|
|
15
|
+
providerCode?: ProviderCode
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
export namespace CardTypeSpecification {
|
|
16
|
-
export
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
value.funding == "DEBIT" ||
|
|
27
|
-
value.funding == "CREDIT" ||
|
|
28
|
-
value.funding == "PREPAID") &&
|
|
29
|
-
(value.flags == undefined || (Array.isArray(value.flags) && value.flags.every(CardTypeSpecificationFlag.is))) &&
|
|
30
|
-
(value.bin == undefined || typeof value.bin == "string")
|
|
31
|
-
)
|
|
32
|
-
}
|
|
19
|
+
export const type = isly.object<CardTypeSpecification>({
|
|
20
|
+
cardTypeId: isly.string().optional(),
|
|
21
|
+
description: isly.string().optional(),
|
|
22
|
+
scheme: isly.string(["VISA", "MASTERCARD", "AMERICAN_EXPRESS"]).optional(),
|
|
23
|
+
funding: isly.string(["DEBIT", "CREDIT", "PREPAID"]).optional(),
|
|
24
|
+
flags: isly.array(CardTypeSpecificationFlag.type).optional(),
|
|
25
|
+
bin: isly.string().optional(),
|
|
26
|
+
providerCode: ProviderCode.type.optional(),
|
|
27
|
+
})
|
|
28
|
+
export const is = type.is
|
|
33
29
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { isly } from "isly"
|
|
2
|
+
|
|
3
|
+
export type CardTypeSpecificationFlag = typeof CardTypeSpecificationFlag.types[number]
|
|
3
4
|
|
|
4
5
|
export namespace CardTypeSpecificationFlag {
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
export const types = ["CORPORATE", "BUSINESS", "CONSUMER"] as const
|
|
7
|
+
export const type = isly.string(types)
|
|
8
|
+
export const is = type.is
|
|
8
9
|
}
|
package/model/ProviderCode.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { isly } from "isly"
|
|
2
|
+
|
|
3
|
+
export type ProviderCode = typeof ProviderCode.types[number]
|
|
3
4
|
|
|
4
5
|
export namespace ProviderCode {
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
export const types = ["conferma", "ixaris", "wex", "fake", "lodged", "modulr", "unknown", "pax2pay"] as const
|
|
7
|
+
export const type = isly.string(types)
|
|
8
|
+
export const is = type.is
|
|
8
9
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pax2pay/client",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.81",
|
|
4
4
|
"description": "Client library for the Pax2Pay API",
|
|
5
5
|
"author": "Pax2Pay Ltd.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"^.+\\.(j|t)sx?$": "ts-jest"
|
|
29
29
|
},
|
|
30
30
|
"transformIgnorePatterns": [
|
|
31
|
-
"<rootDir>/node_modules/(?!(cryptly|authly|isoly|gracely|@pax2pay|cloud-http)/.*)"
|
|
31
|
+
"<rootDir>/node_modules/(?!(cryptly|authly|isoly|isly|gracely|@pax2pay|cloud-http)/.*)"
|
|
32
32
|
],
|
|
33
33
|
"testEnvironment": "node",
|
|
34
34
|
"testRegex": "((\\.|/)(test|spec))(\\.|\\/.+)(jsx?|tsx?)$",
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"isoly": "^0.1.16",
|
|
79
|
+
"isly": "^0.1.13",
|
|
79
80
|
"isomorphic-fetch": "^3.0.0",
|
|
80
81
|
"math-exact": "^1.0.5"
|
|
81
82
|
},
|