@pax2pay/client 0.3.100 → 0.3.101

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.
@@ -1,12 +1,14 @@
1
1
  import { Currency } from "isoly";
2
+ import { isly } from "isly";
2
3
  import { ProviderCode } from "./ProviderCode";
3
4
  export interface CardType {
4
5
  providerCode: ProviderCode;
5
6
  cardType: string;
6
- representAs: string;
7
7
  cardName?: string;
8
+ representAs?: string;
8
9
  currencies?: Currency[];
9
10
  }
10
11
  export declare namespace CardType {
11
- function is(value: CardType | any): value is CardType;
12
+ const type: isly.object.ExtendableType<CardType>;
13
+ const is: isly.Type.IsFunction<CardType>;
12
14
  }
@@ -1,13 +1,15 @@
1
+ import { Currency } from "isoly";
2
+ import { isly } from "isly";
1
3
  import { ProviderCode } from "./ProviderCode";
2
4
  export var CardType;
3
5
  (function (CardType) {
4
- function is(value) {
5
- return (typeof value == "object" &&
6
- ProviderCode.is(value.providerCode) &&
7
- typeof value.cardType == "string" &&
8
- typeof value.representAs == "string" &&
9
- (typeof value.cardName == "string" || value.cardName == undefined));
10
- }
11
- CardType.is = is;
6
+ CardType.type = isly.object({
7
+ providerCode: isly.fromIs("ProviderCode", ProviderCode.is),
8
+ cardType: isly.string(),
9
+ cardName: isly.string().optional(),
10
+ representAs: isly.string().optional(),
11
+ currencies: isly.array(isly.fromIs("Currency", Currency.is)).optional(),
12
+ });
13
+ CardType.is = CardType.type.is;
12
14
  })(CardType || (CardType = {}));
13
15
  //# sourceMappingURL=CardType.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardType.js","sourceRoot":"../","sources":["model/CardType.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAS7C,MAAM,KAAW,QAAQ,CAUxB;AAVD,WAAiB,QAAQ;IACxB,SAAgB,EAAE,CAAC,KAAqB;QACvC,OAAO,CACN,OAAO,KAAK,IAAI,QAAQ;YACxB,YAAY,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC;YACnC,OAAO,KAAK,CAAC,QAAQ,IAAI,QAAQ;YACjC,OAAO,KAAK,CAAC,WAAW,IAAI,QAAQ;YACpC,CAAC,OAAO,KAAK,CAAC,QAAQ,IAAI,QAAQ,IAAI,KAAK,CAAC,QAAQ,IAAI,SAAS,CAAC,CAClE,CAAA;IACF,CAAC;IARe,WAAE,KAQjB,CAAA;AACF,CAAC,EAVgB,QAAQ,KAAR,QAAQ,QAUxB"}
1
+ {"version":3,"file":"CardType.js","sourceRoot":"../","sources":["model/CardType.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAS7C,MAAM,KAAW,QAAQ,CASxB;AATD,WAAiB,QAAQ;IACX,aAAI,GAAG,IAAI,CAAC,MAAM,CAAW;QACzC,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,YAAY,CAAC,EAAE,CAAC;QAC1D,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE;QACvB,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAClC,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACrC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE;KACvE,CAAC,CAAA;IACW,WAAE,GAAG,SAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EATgB,QAAQ,KAAR,QAAQ,QASxB"}
package/model/CardType.ts CHANGED
@@ -1,21 +1,21 @@
1
1
  import { Currency } from "isoly"
2
+ import { isly } from "isly"
2
3
  import { ProviderCode } from "./ProviderCode"
3
4
 
4
5
  export interface CardType {
5
6
  providerCode: ProviderCode
6
7
  cardType: string
7
- representAs: string
8
8
  cardName?: string
9
+ representAs?: string
9
10
  currencies?: Currency[]
10
11
  }
11
12
  export namespace CardType {
12
- export function is(value: CardType | any): value is CardType {
13
- return (
14
- typeof value == "object" &&
15
- ProviderCode.is(value.providerCode) &&
16
- typeof value.cardType == "string" &&
17
- typeof value.representAs == "string" &&
18
- (typeof value.cardName == "string" || value.cardName == undefined)
19
- )
20
- }
13
+ export const type = isly.object<CardType>({
14
+ providerCode: isly.fromIs("ProviderCode", ProviderCode.is),
15
+ cardType: isly.string(),
16
+ cardName: isly.string().optional(),
17
+ representAs: isly.string().optional(),
18
+ currencies: isly.array(isly.fromIs("Currency", Currency.is)).optional(),
19
+ })
20
+ export const is = type.is
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/client",
3
- "version": "0.3.100",
3
+ "version": "0.3.101",
4
4
  "description": "Client library for the Pax2Pay API",
5
5
  "author": "Pax2Pay Ltd.",
6
6
  "license": "MIT",