@pax2pay/client 0.6.19 → 0.6.20

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.
@@ -19,12 +19,13 @@ export interface TransferResponseV2 {
19
19
  source: FundingAccountSummaryResponse | ExternalSource;
20
20
  destination: TransferDestinationResponse;
21
21
  bookingInfo?: MetadataResponse;
22
- direction: TransferDirection;
22
+ direction?: TransferDirection;
23
23
  createdBy: string;
24
24
  personallyApprovable?: boolean;
25
25
  approvedBy?: string;
26
26
  approvedOn?: DateTime;
27
27
  }
28
28
  export declare namespace TransferResponseV2 {
29
- function is(value: TransferResponseV2 | any): value is TransferResponseV2;
29
+ const type: import("isly/dist/cjs/object").IslyObject<TransferResponseV2, object>;
30
+ const is: (value: TransferResponseV2 | any) => value is TransferResponseV2;
30
31
  }
@@ -1,4 +1,6 @@
1
1
  import { Currency, Date, DateTime } from "isoly";
2
+ import { isly } from "isly";
3
+ import { ExternalSource } from "./ExternalSource";
2
4
  import { FundingAccountSummaryResponse } from "./FundingAccountSummaryResponse";
3
5
  import { MetadataResponse } from "./MetadataResponse";
4
6
  import { ProviderCode } from "./ProviderCode";
@@ -7,26 +9,25 @@ import { TransferDirection } from "./TransferDirection";
7
9
  import { TransferStatus } from "./TransferStatus";
8
10
  export var TransferResponseV2;
9
11
  (function (TransferResponseV2) {
10
- function is(value) {
11
- return (typeof value == "object" &&
12
- ProviderCode.is(value.providerCode) &&
13
- typeof value.providerTransferId == "string" &&
14
- typeof value.amount == "number" &&
15
- Currency.is(value.currency) &&
16
- TransferStatus.is(value.status) &&
17
- (value.errorMessage == undefined || typeof value.errorMessage == "string") &&
18
- Date.is(value.createdDate) &&
19
- (value.paymentDate == undefined || Date.is(value.paymentDate)) &&
20
- typeof value.reference == "string" &&
21
- FundingAccountSummaryResponse.is(value.source) &&
22
- TransferDestinationResponse.is(value.destination) &&
23
- (value.bookingInfo == undefined || MetadataResponse.is(value.bookingInfo)) &&
24
- TransferDirection.is(value.direction) &&
25
- typeof value.createdBy == "string" &&
26
- (value.personallyApprovable == undefined || typeof value.personallyApprovable == "boolean") &&
27
- (value.approvedBy == undefined || typeof value.approvedBy == "string") &&
28
- (value.approvedOn == undefined || DateTime.is(value.approvedOn)));
29
- }
30
- TransferResponseV2.is = is;
12
+ TransferResponseV2.type = isly.object({
13
+ providerCode: ProviderCode.type,
14
+ providerTransferId: isly.string(),
15
+ amount: isly.number(),
16
+ currency: isly.fromIs("Currency", Currency.is),
17
+ status: TransferStatus.type,
18
+ errorMessage: isly.string().optional(),
19
+ createdDate: isly.fromIs("Date", Date.is),
20
+ paymentDate: isly.fromIs("Date", Date.is).optional(),
21
+ reference: isly.string(),
22
+ source: isly.union(isly.fromIs("FundingAccountSummaryResponse", FundingAccountSummaryResponse.is), isly.fromIs("ExternalSource", ExternalSource.is)),
23
+ destination: isly.fromIs("TransferDestinationResponse", TransferDestinationResponse.is),
24
+ bookingInfo: MetadataResponse.type.optional(),
25
+ direction: isly.fromIs("TransferDirection", TransferDirection.is).optional(),
26
+ createdBy: isly.string(),
27
+ personallyApprovable: isly.boolean().optional(),
28
+ approvedBy: isly.string().optional(),
29
+ approvedOn: isly.fromIs("DateTime", DateTime.is).optional(),
30
+ });
31
+ TransferResponseV2.is = TransferResponseV2.type.is;
31
32
  })(TransferResponseV2 || (TransferResponseV2 = {}));
32
33
  //# sourceMappingURL=TransferResponseV2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TransferResponseV2.js","sourceRoot":"../","sources":["model/TransferResponseV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,2BAA2B,EAA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E,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACtC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC;QACzC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;QACpD,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE;QACxB,MAAM,EAAE,IAAI,CAAC,KAAK,CACjB,IAAI,CAAC,MAAM,CAAC,+BAA+B,EAAE,6BAA6B,CAAC,EAAE,CAAC,EAC9E,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,cAAc,CAAC,EAAE,CAAC,CAChD;QACD,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,6BAA6B,EAAE,2BAA2B,CAAC,EAAE,CAAC;QACvF,WAAW,EAAE,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE;QAC7C,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;QAC5E,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE;QACxB,oBAAoB,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAC/C,UAAU,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACpC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;KAC3D,CAAC,CAAA;IACW,qBAAE,GAAG,mBAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAxBgB,kBAAkB,KAAlB,kBAAkB,QAwBlC"}
@@ -1,4 +1,5 @@
1
1
  import { Currency, Date, DateTime } from "isoly"
2
+ import { isly } from "isly"
2
3
  import { ExternalSource } from "./ExternalSource"
3
4
  import { FundingAccountSummaryResponse } from "./FundingAccountSummaryResponse"
4
5
  import { MetadataResponse } from "./MetadataResponse"
@@ -20,7 +21,7 @@ export interface TransferResponseV2 {
20
21
  source: FundingAccountSummaryResponse | ExternalSource
21
22
  destination: TransferDestinationResponse
22
23
  bookingInfo?: MetadataResponse
23
- direction: TransferDirection
24
+ direction?: TransferDirection
24
25
  createdBy: string
25
26
  personallyApprovable?: boolean
26
27
  approvedBy?: string
@@ -28,26 +29,27 @@ export interface TransferResponseV2 {
28
29
  }
29
30
 
30
31
  export namespace TransferResponseV2 {
31
- export function is(value: TransferResponseV2 | any): value is TransferResponseV2 {
32
- return (
33
- typeof value == "object" &&
34
- ProviderCode.is(value.providerCode) &&
35
- typeof value.providerTransferId == "string" &&
36
- typeof value.amount == "number" &&
37
- Currency.is(value.currency) &&
38
- TransferStatus.is(value.status) &&
39
- (value.errorMessage == undefined || typeof value.errorMessage == "string") &&
40
- Date.is(value.createdDate) &&
41
- (value.paymentDate == undefined || Date.is(value.paymentDate)) &&
42
- typeof value.reference == "string" &&
43
- FundingAccountSummaryResponse.is(value.source) &&
44
- TransferDestinationResponse.is(value.destination) &&
45
- (value.bookingInfo == undefined || MetadataResponse.is(value.bookingInfo)) &&
46
- TransferDirection.is(value.direction) &&
47
- typeof value.createdBy == "string" &&
48
- (value.personallyApprovable == undefined || typeof value.personallyApprovable == "boolean") &&
49
- (value.approvedBy == undefined || typeof value.approvedBy == "string") &&
50
- (value.approvedOn == undefined || DateTime.is(value.approvedOn))
51
- )
52
- }
32
+ export const type = isly.object<TransferResponseV2>({
33
+ providerCode: ProviderCode.type,
34
+ providerTransferId: isly.string(),
35
+ amount: isly.number(),
36
+ currency: isly.fromIs("Currency", Currency.is),
37
+ status: TransferStatus.type,
38
+ errorMessage: isly.string().optional(),
39
+ createdDate: isly.fromIs("Date", Date.is),
40
+ paymentDate: isly.fromIs("Date", Date.is).optional(),
41
+ reference: isly.string(),
42
+ source: isly.union(
43
+ isly.fromIs("FundingAccountSummaryResponse", FundingAccountSummaryResponse.is),
44
+ isly.fromIs("ExternalSource", ExternalSource.is)
45
+ ),
46
+ destination: isly.fromIs("TransferDestinationResponse", TransferDestinationResponse.is),
47
+ bookingInfo: MetadataResponse.type.optional(),
48
+ direction: isly.fromIs("TransferDirection", TransferDirection.is).optional(),
49
+ createdBy: isly.string(),
50
+ personallyApprovable: isly.boolean().optional(),
51
+ approvedBy: isly.string().optional(),
52
+ approvedOn: isly.fromIs("DateTime", DateTime.is).optional(),
53
+ })
54
+ export const is = type.is
53
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/client",
3
- "version": "0.6.19",
3
+ "version": "0.6.20",
4
4
  "description": "Client library for the Pax2Pay API",
5
5
  "author": "Pax2Pay Ltd.",
6
6
  "license": "MIT",