@pax2pay/client 0.0.91 → 0.0.95
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/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/model/AccountBankResponse.d.ts +9 -0
- package/dist/model/AccountBankResponse.js +12 -0
- package/dist/model/AccountBankResponse.js.map +1 -0
- package/dist/model/AccountIdentifierResponse.d.ts +11 -0
- package/dist/model/AccountIdentifierResponse.js +14 -0
- package/dist/model/AccountIdentifierResponse.js.map +1 -0
- package/dist/model/AccountResponse.d.ts +1 -1
- package/dist/model/AccountResponse.js +1 -1
- package/dist/model/AccountResponse.js.map +1 -1
- package/dist/model/AccountSummary.d.ts +29 -0
- package/dist/model/AccountSummary.js +32 -0
- package/dist/model/AccountSummary.js.map +1 -0
- package/dist/model/AddressInfo.d.ts +3 -0
- package/dist/model/AddressInfo.js +12 -1
- package/dist/model/AddressInfo.js.map +1 -1
- package/dist/model/AmountPair.d.ts +3 -0
- package/dist/model/AmountPair.js +8 -1
- package/dist/model/AmountPair.js.map +1 -1
- package/dist/model/BeneficiaryResponse.d.ts +5 -1
- package/dist/model/BeneficiaryResponse.js +17 -1
- package/dist/model/BeneficiaryResponse.js.map +1 -1
- package/dist/model/BeneficiaryStatus.d.ts +6 -0
- package/dist/model/BeneficiaryStatus.js +9 -0
- package/dist/model/BeneficiaryStatus.js.map +1 -0
- package/dist/model/BillingTransactionAmountPair.d.ts +3 -0
- package/dist/model/BillingTransactionAmountPair.js +11 -1
- package/dist/model/BillingTransactionAmountPair.js.map +1 -1
- package/dist/model/BookingInfoResponse.d.ts +3 -0
- package/dist/model/BookingInfoResponse.js +16 -1
- package/dist/model/BookingInfoResponse.js.map +1 -1
- package/dist/model/FiveFieldsBookingInfoResponse.d.ts +3 -0
- package/dist/model/FiveFieldsBookingInfoResponse.js +15 -1
- package/dist/model/FiveFieldsBookingInfoResponse.js.map +1 -1
- package/dist/model/FlightBookingInfoResponse.d.ts +3 -0
- package/dist/model/FlightBookingInfoResponse.js +20 -1
- package/dist/model/FlightBookingInfoResponse.js.map +1 -1
- package/dist/model/FlightInfo.d.ts +3 -7
- package/dist/model/FlightInfo.js +10 -1
- package/dist/model/FlightInfo.js.map +1 -1
- package/dist/model/FundingAccountIdentifierType.d.ts +6 -0
- package/dist/model/FundingAccountIdentifierType.js +9 -0
- package/dist/model/FundingAccountIdentifierType.js.map +1 -0
- package/dist/model/HotelBookingInfoResponse.d.ts +3 -0
- package/dist/model/HotelBookingInfoResponse.js +20 -1
- package/dist/model/HotelBookingInfoResponse.js.map +1 -1
- package/dist/model/InvoiceBookingInfoResponse.d.ts +3 -0
- package/dist/model/InvoiceBookingInfoResponse.js +17 -1
- package/dist/model/InvoiceBookingInfoResponse.js.map +1 -1
- package/dist/model/Segment.d.ts +10 -0
- package/dist/model/Segment.js +14 -0
- package/dist/model/Segment.js.map +1 -0
- package/dist/model/StatementReportRequest.d.ts +3 -1
- package/dist/model/StatementReportResponse.d.ts +1 -0
- package/dist/model/StatementReportResponseRow.d.ts +5 -2
- package/dist/model/StatementReportResponseRow.js +26 -1
- package/dist/model/StatementReportResponseRow.js.map +1 -1
- package/dist/model/StatementReportRowType.d.ts +3 -0
- package/dist/model/StatementReportRowType.js +7 -1
- package/dist/model/StatementReportRowType.js.map +1 -1
- package/dist/model/StatementRowIds.d.ts +3 -0
- package/dist/model/StatementRowIds.js +12 -1
- package/dist/model/StatementRowIds.js.map +1 -1
- package/dist/model/SummaryBookingInfoResponse.d.ts +5 -2
- package/dist/model/SummaryBookingInfoResponse.js +12 -1
- package/dist/model/SummaryBookingInfoResponse.js.map +1 -1
- package/dist/model/TransferDestinationInfo.d.ts +5 -1
- package/dist/model/TransferDestinationInfo.js +16 -1
- package/dist/model/TransferDestinationInfo.js.map +1 -1
- package/dist/model/TransferResponse.d.ts +5 -1
- package/dist/model/TransferResponse.js +25 -1
- package/dist/model/TransferResponse.js.map +1 -1
- package/dist/model/TransferStatus.d.ts +6 -0
- package/dist/model/TransferStatus.js +20 -0
- package/dist/model/TransferStatus.js.map +1 -0
- package/dist/model/index.d.ts +8 -1
- package/dist/model/index.js +24 -1
- package/dist/model/index.js.map +1 -1
- package/index.ts +14 -0
- package/model/AccountBankResponse.ts +18 -0
- package/model/AccountIdentifierResponse.ts +22 -0
- package/model/AccountResponse.ts +2 -2
- package/model/AccountSummary.ts +51 -0
- package/model/AddressInfo.ts +13 -0
- package/model/AmountPair.ts +6 -0
- package/model/BeneficiaryResponse.ts +18 -1
- package/model/BeneficiaryStatus.ts +9 -0
- package/model/BillingTransactionAmountPair.ts +10 -0
- package/model/BookingInfoResponse.ts +12 -0
- package/model/FiveFieldsBookingInfoResponse.ts +16 -0
- package/model/FlightBookingInfoResponse.ts +17 -0
- package/model/FlightInfo.ts +9 -6
- package/model/FundingAccountIdentifierType.ts +9 -0
- package/model/HotelBookingInfoResponse.ts +17 -0
- package/model/InvoiceBookingInfoResponse.ts +17 -0
- package/model/Segment.ts +21 -0
- package/model/StatementReportRequest.ts +3 -1
- package/model/StatementReportResponse.ts +1 -0
- package/model/StatementReportResponseRow.ts +21 -2
- package/model/StatementReportRowType.ts +6 -0
- package/model/StatementRowIds.ts +12 -0
- package/model/SummaryBookingInfoResponse.ts +15 -2
- package/model/TransferDestinationInfo.ts +17 -1
- package/model/TransferResponse.ts +23 -11
- package/model/TransferStatus.ts +20 -0
- package/model/index.ts +14 -0
- package/package.json +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as isoly from "isoly"
|
|
2
|
+
import { AccountBankResponse } from "./AccountBankResponse"
|
|
3
|
+
import { AccountIdentifierResponse } from "./AccountIdentifierResponse"
|
|
4
|
+
import { AccountState } from "./AccountState"
|
|
5
|
+
import { AccountType } from "./AccountType"
|
|
6
|
+
import { FundingLimitResponse } from "./FundingLimitResponse"
|
|
7
|
+
import { OrganisationResponse } from "./OrganisationResponse"
|
|
8
|
+
import { ProviderCode } from "./ProviderCode"
|
|
9
|
+
|
|
10
|
+
export interface AccountSummary {
|
|
11
|
+
providerAccountId: string
|
|
12
|
+
providerCode: ProviderCode
|
|
13
|
+
accountType: AccountType
|
|
14
|
+
createdOn: isoly.DateTime
|
|
15
|
+
createdBy: string
|
|
16
|
+
state: AccountState
|
|
17
|
+
friendlyName: string
|
|
18
|
+
accountBankDetails?: AccountBankResponse
|
|
19
|
+
organisation: OrganisationResponse
|
|
20
|
+
currency: isoly.Currency
|
|
21
|
+
balance: number
|
|
22
|
+
pendingBalance: number
|
|
23
|
+
totalCardAvailableBalance: number
|
|
24
|
+
lastUpdatedCardBalanceOn?: isoly.DateTime
|
|
25
|
+
fundingLimit?: FundingLimitResponse
|
|
26
|
+
accountIdentifierResponse?: AccountIdentifierResponse
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export namespace AccountSummary {
|
|
30
|
+
export function is(value: AccountSummary | any): value is AccountSummary {
|
|
31
|
+
return (
|
|
32
|
+
typeof value == "object" &&
|
|
33
|
+
typeof value.providerAccountId == "string" &&
|
|
34
|
+
ProviderCode.is(value.providerCode) &&
|
|
35
|
+
AccountType.is(value.accountType) &&
|
|
36
|
+
isoly.DateTime.is(value.createdOn) &&
|
|
37
|
+
typeof value.createdBy == "string" &&
|
|
38
|
+
AccountState.is(value.state) &&
|
|
39
|
+
typeof value.friendlyName == "string" &&
|
|
40
|
+
(value.accountBankDetails == undefined || AccountBankResponse.is(value.accountBankDetails)) &&
|
|
41
|
+
OrganisationResponse.is(value.organisation) &&
|
|
42
|
+
isoly.Currency.is(value.currency) &&
|
|
43
|
+
typeof value.balance == "number" &&
|
|
44
|
+
typeof value.pendingBalance == "number" &&
|
|
45
|
+
typeof value.totalCardAvailableBalance == "number" &&
|
|
46
|
+
(value.lastUpdatedCardBalanceOn == undefined || isoly.DateTime.is(value.lastUpdatedCardBalanceOn)) &&
|
|
47
|
+
(value.fundingLimit == undefined || FundingLimitResponse.is(value.fundingLimit)) &&
|
|
48
|
+
(value.accountIdentifierResponse == undefined || AccountIdentifierResponse.is(value.accountIdentifierResponse))
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
}
|
package/model/AddressInfo.ts
CHANGED
|
@@ -8,3 +8,16 @@ export interface AddressInfo {
|
|
|
8
8
|
postCode: string
|
|
9
9
|
postTown: string
|
|
10
10
|
}
|
|
11
|
+
|
|
12
|
+
export namespace AddressInfo {
|
|
13
|
+
export function is(value: AddressInfo | any): value is AddressInfo {
|
|
14
|
+
return (
|
|
15
|
+
typeof value == "object" &&
|
|
16
|
+
typeof value.addressLine1 == "string" &&
|
|
17
|
+
(value.addressLine2 == undefined || typeof value.addressLine2 == "string") &&
|
|
18
|
+
typeof value.country == "string" &&
|
|
19
|
+
typeof value.postCode == "string" &&
|
|
20
|
+
typeof value.postTown == "string"
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
}
|
package/model/AmountPair.ts
CHANGED
|
@@ -4,3 +4,9 @@ export interface AmountPair {
|
|
|
4
4
|
amount: number
|
|
5
5
|
currency: isoly.Currency
|
|
6
6
|
}
|
|
7
|
+
|
|
8
|
+
export namespace AmountPair {
|
|
9
|
+
export function is(value: AmountPair | any): value is AmountPair {
|
|
10
|
+
return typeof value == "object" && typeof value.amount == "number" && isoly.Currency.is(value.currency)
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -1,12 +1,29 @@
|
|
|
1
|
+
import { BeneficiaryStatus } from "./BeneficiaryStatus"
|
|
1
2
|
import { TransferDestinationInfo } from "./TransferDestinationInfo"
|
|
2
3
|
|
|
3
4
|
export interface BeneficiaryResponse {
|
|
4
5
|
transferDestination?: TransferDestinationInfo
|
|
5
6
|
defaultReference?: string
|
|
6
|
-
status?:
|
|
7
|
+
status?: BeneficiaryStatus
|
|
7
8
|
name?: string
|
|
8
9
|
fullName?: string
|
|
9
10
|
beneficiaryId?: string
|
|
10
11
|
createdOn?: string
|
|
11
12
|
history?: BeneficiaryResponse[]
|
|
12
13
|
}
|
|
14
|
+
|
|
15
|
+
export namespace BeneficiaryResponse {
|
|
16
|
+
export function is(value: BeneficiaryResponse | any): value is BeneficiaryResponse {
|
|
17
|
+
return (
|
|
18
|
+
typeof value == "object" &&
|
|
19
|
+
(value.transferDestination == undefined || TransferDestinationInfo.is(value.transferDestination)) &&
|
|
20
|
+
(value.defaultReference == undefined || typeof value.defaultReference == "string") &&
|
|
21
|
+
(value.status == undefined || BeneficiaryStatus.is(value.status)) &&
|
|
22
|
+
(value.name == undefined || typeof value.name == "string") &&
|
|
23
|
+
(value.fullName == undefined || typeof value.fullName == "string") &&
|
|
24
|
+
(value.beneficiaryId == undefined || typeof value.beneficiaryId == "string") &&
|
|
25
|
+
(value.createdOn == undefined || typeof value.createdOn == "string") &&
|
|
26
|
+
(value.history == undefined || Array.isArray(value.history)) //not checking same type because of risk of being slow
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const beneficiaryStatus = ["ACTIVE", "DELETED", "OUTDATED"] as const
|
|
2
|
+
|
|
3
|
+
export type BeneficiaryStatus = typeof beneficiaryStatus[number]
|
|
4
|
+
|
|
5
|
+
export namespace BeneficiaryStatus {
|
|
6
|
+
export function is(value: unknown): value is BeneficiaryStatus {
|
|
7
|
+
return typeof value == "string" && beneficiaryStatus.includes(value as BeneficiaryStatus)
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -5,3 +5,13 @@ export interface BillingTransactionAmountPair {
|
|
|
5
5
|
transaction: AmountPair
|
|
6
6
|
fxRate: number
|
|
7
7
|
}
|
|
8
|
+
export namespace BillingTransactionAmountPair {
|
|
9
|
+
export function is(value: BillingTransactionAmountPair | any): value is BillingTransactionAmountPair {
|
|
10
|
+
return (
|
|
11
|
+
typeof value == "object" &&
|
|
12
|
+
AmountPair.is(value.billing) &&
|
|
13
|
+
AmountPair.is(value.transaction) &&
|
|
14
|
+
typeof value.fxRate == "number"
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -10,3 +10,15 @@ export type BookingInfoResponse =
|
|
|
10
10
|
| InvoiceBookingInfoResponse
|
|
11
11
|
| FlightBookingInfoResponse
|
|
12
12
|
| SummaryBookingInfoResponse
|
|
13
|
+
|
|
14
|
+
export namespace BookingInfoResponse {
|
|
15
|
+
export function is(value: BookingInfoResponse | any): value is BookingInfoResponse {
|
|
16
|
+
return (
|
|
17
|
+
FiveFieldsBookingInfoResponse.is(value) ||
|
|
18
|
+
HotelBookingInfoResponse.is(value) ||
|
|
19
|
+
InvoiceBookingInfoResponse.is(value) ||
|
|
20
|
+
FlightBookingInfoResponse.is(value) ||
|
|
21
|
+
SummaryBookingInfoResponse.is(value)
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -8,3 +8,19 @@ export interface FiveFieldsBookingInfoResponse {
|
|
|
8
8
|
supplierCode?: string
|
|
9
9
|
trackingId?: string
|
|
10
10
|
}
|
|
11
|
+
|
|
12
|
+
export namespace FiveFieldsBookingInfoResponse {
|
|
13
|
+
export function is(value: FiveFieldsBookingInfoResponse | any): value is FiveFieldsBookingInfoResponse {
|
|
14
|
+
return (
|
|
15
|
+
typeof value == "object" &&
|
|
16
|
+
value.type == "FIVE_FIELDS" &&
|
|
17
|
+
typeof value.bookingInfoIdentifier == "string" &&
|
|
18
|
+
(value.agentBookingReference == undefined || typeof value.agentBookingReference) == "string" &&
|
|
19
|
+
(value.departureDate == undefined || typeof value.departureDate) == "string" &&
|
|
20
|
+
(value.supplierBookingReference == undefined || typeof value.supplierBookingReference) == "string" &&
|
|
21
|
+
(value.leadPassengerName == undefined || typeof value.leadPassengerName) == "string" &&
|
|
22
|
+
(value.supplierCode == undefined || typeof value.supplierCode) == "string" &&
|
|
23
|
+
(value.trackingId == undefined || typeof value.trackingId) == "string"
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -14,3 +14,20 @@ export interface FlightBookingInfoResponse {
|
|
|
14
14
|
currency?: isoly.Currency
|
|
15
15
|
timestamp: isoly.DateTime
|
|
16
16
|
}
|
|
17
|
+
|
|
18
|
+
export namespace FlightBookingInfoResponse {
|
|
19
|
+
export function is(value: FlightBookingInfoResponse | any): value is FlightBookingInfoResponse {
|
|
20
|
+
return (
|
|
21
|
+
typeof value == "object" &&
|
|
22
|
+
value.type == "FLIGHT" &&
|
|
23
|
+
(value.bookingInfoIdentifier == undefined || typeof value.bookingInfoIdentifier == "string") &&
|
|
24
|
+
(value.trackingId == undefined || typeof value.trackingId == "string") &&
|
|
25
|
+
Passengers.is(value.passengers) &&
|
|
26
|
+
FlightInfo.is(value.flight) &&
|
|
27
|
+
References.is(value.references) &&
|
|
28
|
+
(value.cost == undefined || typeof value.cost == "number") &&
|
|
29
|
+
(value.currency == undefined || isoly.Currency.is(value.currency)) &&
|
|
30
|
+
isoly.DateTime.is(value.timestamp)
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
}
|
package/model/FlightInfo.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Segment } from "./Segment"
|
|
2
2
|
|
|
3
3
|
export interface FlightInfo {
|
|
4
4
|
outbound: Segment
|
|
5
5
|
homebound?: Segment
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
export namespace FlightInfo {
|
|
9
|
+
export function is(value: FlightInfo | any): value is FlightInfo {
|
|
10
|
+
return (
|
|
11
|
+
typeof value == "object" &&
|
|
12
|
+
Segment.is(value.outbound) &&
|
|
13
|
+
(value.homebound == undefined) == Segment.is(value.homebound)
|
|
14
|
+
)
|
|
15
|
+
}
|
|
13
16
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const fundingAccountIdentifierType = ["SCAN", "IBAN", "UNKNOWN"] as const
|
|
2
|
+
|
|
3
|
+
export type FundingAccountIdentifierType = typeof fundingAccountIdentifierType[number]
|
|
4
|
+
|
|
5
|
+
export namespace FundingAccountIdentifierType {
|
|
6
|
+
export function is(value: unknown): value is FundingAccountIdentifierType {
|
|
7
|
+
return typeof value == "string" && fundingAccountIdentifierType.includes(value as FundingAccountIdentifierType)
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -14,3 +14,20 @@ export interface HotelBookingInfoResponse {
|
|
|
14
14
|
currency?: isoly.Currency
|
|
15
15
|
timestamp: isoly.DateTime
|
|
16
16
|
}
|
|
17
|
+
|
|
18
|
+
export namespace HotelBookingInfoResponse {
|
|
19
|
+
export function is(value: HotelBookingInfoResponse | any): value is HotelBookingInfoResponse {
|
|
20
|
+
return (
|
|
21
|
+
typeof value == "object" &&
|
|
22
|
+
value.type == "HOTEL" &&
|
|
23
|
+
(value.bookingInfoIdentifier == undefined || typeof value.bookingInfoIdentifier == "string") &&
|
|
24
|
+
(value.trackingId == undefined || typeof value.trackingId == "string") &&
|
|
25
|
+
(value.passengers == undefined || Passengers.is(value.passengers)) &&
|
|
26
|
+
(value.hotel == undefined || HotelInfo.is(value.hotel)) &&
|
|
27
|
+
(value.references == undefined || References.is(value.references)) &&
|
|
28
|
+
(value.cost == undefined || typeof value.cost == "number") &&
|
|
29
|
+
(value.currency == undefined || isoly.Currency.is(value.currency)) &&
|
|
30
|
+
isoly.DateTime.is(value.timestamp)
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -11,3 +11,20 @@ export interface InvoiceBookingInfoResponse {
|
|
|
11
11
|
taxElement?: string
|
|
12
12
|
timestamp: isoly.DateTime
|
|
13
13
|
}
|
|
14
|
+
|
|
15
|
+
export namespace InvoiceBookingInfoResponse {
|
|
16
|
+
export function is(value: InvoiceBookingInfoResponse | any): value is InvoiceBookingInfoResponse {
|
|
17
|
+
return (
|
|
18
|
+
typeof value == "object" &&
|
|
19
|
+
value.type == "INVOICE" &&
|
|
20
|
+
(value.bookingInfoIdentifier == undefined || typeof value.bookingInfoIdentifier == "string") &&
|
|
21
|
+
(value.trackingId == undefined || typeof value.trackingId == "string") &&
|
|
22
|
+
(value.supplierName == undefined || typeof value.supplierName == "string") &&
|
|
23
|
+
(value.date == undefined || isoly.Date.is(value.date)) &&
|
|
24
|
+
(value.supplierReferenceNumber == undefined || typeof value.supplierReferenceNumber == "string") &&
|
|
25
|
+
(value.value == undefined || typeof value.value == "number") &&
|
|
26
|
+
(value.taxElement == undefined || typeof value.taxElement == "string") &&
|
|
27
|
+
isoly.DateTime.is(value.timestamp)
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
}
|
package/model/Segment.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as isoly from "isoly"
|
|
2
|
+
|
|
3
|
+
export interface Segment {
|
|
4
|
+
from: string
|
|
5
|
+
to: string
|
|
6
|
+
date: isoly.Date
|
|
7
|
+
flightNumbers?: string[]
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export namespace Segment {
|
|
11
|
+
export function is(value: Segment | any): value is Segment {
|
|
12
|
+
return (
|
|
13
|
+
typeof value == "object" &&
|
|
14
|
+
typeof value.from == "string" &&
|
|
15
|
+
typeof value.to == "string" &&
|
|
16
|
+
isoly.Date.is(value.date) &&
|
|
17
|
+
(value.flightNumbers == undefined ||
|
|
18
|
+
(Array.isArray(value.flightNumbers) && value.flightNumbers.every((item: any) => typeof item == "string")))
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -4,8 +4,10 @@ import { ProviderCode } from "./ProviderCode"
|
|
|
4
4
|
export interface StatementReportRequest {
|
|
5
5
|
providerCode: ProviderCode
|
|
6
6
|
providerAccountId: string
|
|
7
|
-
|
|
7
|
+
dateRange: {
|
|
8
8
|
start: isoly.DateTime
|
|
9
9
|
end: isoly.DateTime
|
|
10
10
|
}
|
|
11
|
+
balanceType?: "AVAILABLE" | "ACTUAL"
|
|
12
|
+
type?: "summary" | "full"
|
|
11
13
|
}
|
|
@@ -10,9 +10,9 @@ import { TransferResponse } from "./TransferResponse"
|
|
|
10
10
|
export interface StatementReportResponseRow {
|
|
11
11
|
actionType: StatementReportRowActionType
|
|
12
12
|
amount: BillingTransactionAmountPair
|
|
13
|
-
bookingInfo
|
|
13
|
+
bookingInfo?: BookingInfoResponse
|
|
14
14
|
postedDate: isoly.DateTime
|
|
15
|
-
transactionDate
|
|
15
|
+
transactionDate?: isoly.DateTime
|
|
16
16
|
actualBalance: number
|
|
17
17
|
availableBalance: number
|
|
18
18
|
rowType: StatementReportRowType
|
|
@@ -20,3 +20,22 @@ export interface StatementReportResponseRow {
|
|
|
20
20
|
card?: CardResponseV2
|
|
21
21
|
transfer?: TransferResponse
|
|
22
22
|
}
|
|
23
|
+
|
|
24
|
+
export namespace StatementReportResponseRow {
|
|
25
|
+
export function is(value: StatementReportResponseRow | any): value is StatementReportResponseRow {
|
|
26
|
+
return (
|
|
27
|
+
typeof value == "object" &&
|
|
28
|
+
StatementReportRowActionType.is(value.actionType) &&
|
|
29
|
+
BillingTransactionAmountPair.is(value.amount) &&
|
|
30
|
+
(value.bookingInfo == undefined || BookingInfoResponse.is(value.bookingInfo)) &&
|
|
31
|
+
isoly.DateTime.is(value.postedDate) &&
|
|
32
|
+
(value.transactionDate == undefined || isoly.DateTime.is(value.transactionDate)) &&
|
|
33
|
+
typeof value.actualBalance == "number" &&
|
|
34
|
+
typeof value.availableBalance == "number" &&
|
|
35
|
+
StatementReportRowType.is(value.rowType) &&
|
|
36
|
+
StatementRowIds.is(value.ids) &&
|
|
37
|
+
(value.card == undefined || CardResponseV2.is(value.card)) &&
|
|
38
|
+
(value.transfer == undefined || TransferResponse.is(value.transfer))
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
}
|
package/model/StatementRowIds.ts
CHANGED
|
@@ -6,3 +6,15 @@ export interface StatementRowIds {
|
|
|
6
6
|
providerCardId?: string
|
|
7
7
|
providerTransferId?: string
|
|
8
8
|
}
|
|
9
|
+
|
|
10
|
+
export namespace StatementRowIds {
|
|
11
|
+
export function is(value: StatementRowIds | any): value is StatementRowIds {
|
|
12
|
+
return (
|
|
13
|
+
typeof value == "object" &&
|
|
14
|
+
typeof value.rowId == "string" &&
|
|
15
|
+
ProviderCode.is(value.providerCode) &&
|
|
16
|
+
(value.providerCardId == undefined || typeof value.providerCardId == "string") &&
|
|
17
|
+
(value.providerTransferId == undefined || typeof value.providerTransferId == "string")
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
export interface SummaryBookingInfoResponse {
|
|
2
|
-
leadPassengerName
|
|
3
|
-
agentBookingReference
|
|
2
|
+
leadPassengerName?: string
|
|
3
|
+
agentBookingReference?: string
|
|
4
4
|
type: "SUMMARY"
|
|
5
5
|
bookingInfoIdentifier: string
|
|
6
6
|
trackingId: string
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
export namespace SummaryBookingInfoResponse {
|
|
10
|
+
export function is(value: SummaryBookingInfoResponse | any): value is SummaryBookingInfoResponse {
|
|
11
|
+
return (
|
|
12
|
+
typeof value == "object" &&
|
|
13
|
+
value.type == "SUMMARY" &&
|
|
14
|
+
(value.leadPassengerName == undefined || typeof value.leadPassengerName == "string") &&
|
|
15
|
+
(value.agentBookingReference == undefined || typeof value.agentBookingReference == "string") &&
|
|
16
|
+
typeof value.bookingInfoIdentifier == "string" &&
|
|
17
|
+
typeof value.trackingId == "string"
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as isoly from "isoly"
|
|
1
2
|
import { AddressInfo } from "./AddressInfo"
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -8,7 +9,22 @@ export interface TransferDestinationInfo {
|
|
|
8
9
|
sortCode?: string
|
|
9
10
|
iban?: string
|
|
10
11
|
bic?: string
|
|
11
|
-
currency:
|
|
12
|
+
currency: isoly.Currency
|
|
12
13
|
address?: AddressInfo
|
|
13
14
|
fullName?: string
|
|
14
15
|
}
|
|
16
|
+
|
|
17
|
+
export namespace TransferDestinationInfo {
|
|
18
|
+
export function is(value: TransferDestinationInfo | any): value is TransferDestinationInfo {
|
|
19
|
+
return (
|
|
20
|
+
typeof value == "object" &&
|
|
21
|
+
(value.accountNumber == undefined || typeof value.accountNumber == "string") &&
|
|
22
|
+
(value.sortCode == undefined || typeof value.sortCode == "string") &&
|
|
23
|
+
(value.iban == undefined || typeof value.iban == "string") &&
|
|
24
|
+
(value.bic == undefined || typeof value.bic == "string") &&
|
|
25
|
+
isoly.Currency.is(value.currency) &&
|
|
26
|
+
(value.address == undefined || AddressInfo.is(value.address)) &&
|
|
27
|
+
(value.fullName == undefined || typeof value.fullName == "string")
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -2,6 +2,7 @@ import { AccountResponse } from "./AccountResponse"
|
|
|
2
2
|
import { BeneficiaryResponse } from "./BeneficiaryResponse"
|
|
3
3
|
import { ProviderCode } from "./ProviderCode"
|
|
4
4
|
import { TransferDestinationInfo } from "./TransferDestinationInfo"
|
|
5
|
+
import { TransferStatus } from "./TransferStatus"
|
|
5
6
|
|
|
6
7
|
export interface TransferResponse {
|
|
7
8
|
sourceAccount?: AccountResponse
|
|
@@ -9,17 +10,7 @@ export interface TransferResponse {
|
|
|
9
10
|
destinationAccount?: AccountResponse
|
|
10
11
|
destination?: TransferDestinationInfo
|
|
11
12
|
amount?: number
|
|
12
|
-
status?:
|
|
13
|
-
| "PENDING"
|
|
14
|
-
| "PENDING_FOR_DATE"
|
|
15
|
-
| "PENDING_FOR_FUNDS"
|
|
16
|
-
| "SETTLED"
|
|
17
|
-
| "CANCELLED"
|
|
18
|
-
| "ERROR_REJECTED"
|
|
19
|
-
| "APPROVAL_PENDING"
|
|
20
|
-
| "DECLINED"
|
|
21
|
-
| "APPROVED"
|
|
22
|
-
| "GENERATED"
|
|
13
|
+
status?: TransferStatus
|
|
23
14
|
createdDate?: string
|
|
24
15
|
paymentDate?: string
|
|
25
16
|
reference?: string
|
|
@@ -28,3 +19,24 @@ export interface TransferResponse {
|
|
|
28
19
|
scheduled?: boolean
|
|
29
20
|
errorDescription?: string
|
|
30
21
|
}
|
|
22
|
+
|
|
23
|
+
export namespace TransferResponse {
|
|
24
|
+
export function is(value: TransferResponse | any): value is TransferResponse {
|
|
25
|
+
return (
|
|
26
|
+
typeof value == "object" &&
|
|
27
|
+
(value.sourceAccount == undefined || AccountResponse.is(value.sourceAccount)) &&
|
|
28
|
+
(value.beneficiary == undefined || BeneficiaryResponse.is(value.beneficiary)) &&
|
|
29
|
+
(value.destinationAccount == undefined || AccountResponse.is(value.destinationAccount)) &&
|
|
30
|
+
(value.destination == undefined || TransferDestinationInfo.is(value.destination)) &&
|
|
31
|
+
(value.amount == undefined || typeof value.amount == "number") &&
|
|
32
|
+
(value.status == undefined || TransferStatus.is(value.status)) &&
|
|
33
|
+
(value.createdDate == undefined || typeof value.createdDate == "string") &&
|
|
34
|
+
(value.paymentDate == undefined || typeof value.paymentDate == "string") &&
|
|
35
|
+
(value.reference == undefined || typeof value.reference == "string") &&
|
|
36
|
+
(value.providerCode == undefined || ProviderCode.is(value.providerCode)) &&
|
|
37
|
+
(value.providerTransferId == undefined || typeof value.providerTransferId == "string") &&
|
|
38
|
+
(value.scheduled == undefined || typeof value.scheduled == "boolean") &&
|
|
39
|
+
(value.errorDescription == undefined || typeof value.errorDescription == "string")
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const transferStatus = [
|
|
2
|
+
"PENDING",
|
|
3
|
+
"PENDING_FOR_DATE",
|
|
4
|
+
"PENDING_FOR_FUNDS",
|
|
5
|
+
"SETTLED",
|
|
6
|
+
"CANCELLED",
|
|
7
|
+
"ERROR_REJECTED",
|
|
8
|
+
"APPROVAL_PENDING",
|
|
9
|
+
"DECLINED",
|
|
10
|
+
"APPROVED",
|
|
11
|
+
"GENERATED",
|
|
12
|
+
] as const
|
|
13
|
+
|
|
14
|
+
export type TransferStatus = typeof transferStatus[number]
|
|
15
|
+
|
|
16
|
+
export namespace TransferStatus {
|
|
17
|
+
export function is(value: unknown): value is TransferStatus {
|
|
18
|
+
return typeof value == "string" && transferStatus.includes(value as TransferStatus)
|
|
19
|
+
}
|
|
20
|
+
}
|
package/model/index.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { AccountBankResponse } from "./AccountBankResponse"
|
|
1
2
|
import { AccountCreationRequest } from "./AccountCreationRequest"
|
|
3
|
+
import { AccountIdentifierResponse } from "./AccountIdentifierResponse"
|
|
2
4
|
import { AccountResponse } from "./AccountResponse"
|
|
3
5
|
import { AccountSearchRequest } from "./AccountSearchRequest"
|
|
4
6
|
import { AccountState } from "./AccountState"
|
|
7
|
+
import { AccountSummary } from "./AccountSummary"
|
|
5
8
|
import { AccountType } from "./AccountType"
|
|
6
9
|
import { AddressInfo } from "./AddressInfo"
|
|
7
10
|
import { AgentBookingInfo } from "./AgentBookingInfo"
|
|
@@ -9,6 +12,7 @@ import { AmendCardRequest } from "./AmendCardRequest"
|
|
|
9
12
|
import { AmountPair } from "./AmountPair"
|
|
10
13
|
import { BeneficiaryRequest } from "./BeneficiaryRequest"
|
|
11
14
|
import { BeneficiaryResponse } from "./BeneficiaryResponse"
|
|
15
|
+
import { BeneficiaryStatus } from "./BeneficiaryStatus"
|
|
12
16
|
import { BillingTransactionAmountPair } from "./BillingTransactionAmountPair"
|
|
13
17
|
import { BookedProductInfo } from "./BookedProductInfo"
|
|
14
18
|
import { BookingInfo } from "./BookingInfo"
|
|
@@ -53,6 +57,7 @@ import { FiveFieldsBookingInfoResponse } from "./FiveFieldsBookingInfoResponse"
|
|
|
53
57
|
import { FlightBookingInfoRequest } from "./FlightBookingInfoRequest"
|
|
54
58
|
import { FlightBookingInfoResponse } from "./FlightBookingInfoResponse"
|
|
55
59
|
import { FlightInfo } from "./FlightInfo"
|
|
60
|
+
import { FundingAccountIdentifierType } from "./FundingAccountIdentifierType"
|
|
56
61
|
import { FundingAccountInboundTransferNotificationConfig } from "./FundingAccountInboundTransferNotificationConfig"
|
|
57
62
|
import { FundingAccountResponseV2 } from "./FundingAccountResponseV2"
|
|
58
63
|
import { FundingAccountSearchRequest } from "./FundingAccountSearchRequest"
|
|
@@ -94,6 +99,7 @@ import { RolesetResponse } from "./RolesetResponse"
|
|
|
94
99
|
import { Room } from "./Room"
|
|
95
100
|
import { ScheduledTaskRequest } from "./ScheduledTaskRequest"
|
|
96
101
|
import { SearchRolesetsRequest } from "./SearchRolesetsRequest"
|
|
102
|
+
import { Segment } from "./Segment"
|
|
97
103
|
import { Sorting } from "./Sorting"
|
|
98
104
|
import { StatementReportRequest } from "./StatementReportRequest"
|
|
99
105
|
import { StatementReportResponse } from "./StatementReportResponse"
|
|
@@ -109,6 +115,7 @@ import { TransferDestinationInfo } from "./TransferDestinationInfo"
|
|
|
109
115
|
import { TransferRequest } from "./TransferRequest"
|
|
110
116
|
import { TransferResponse } from "./TransferResponse"
|
|
111
117
|
import { TransferSearch } from "./TransferSearch"
|
|
118
|
+
import { TransferStatus } from "./TransferStatus"
|
|
112
119
|
import { TravelPartyInfo } from "./TravelPartyInfo"
|
|
113
120
|
import { TwoFactorAuthenticationDetails } from "./TwoFactorAuthenticationDetails"
|
|
114
121
|
import { TwoFactorAuthenticationRegistrationResponse } from "./TwoFactorAuthenticationRegistrationResponse"
|
|
@@ -127,10 +134,13 @@ import { UserSearchRequest } from "./UserSearchRequest"
|
|
|
127
134
|
import { YearMonth } from "./YearMonth"
|
|
128
135
|
|
|
129
136
|
export {
|
|
137
|
+
AccountBankResponse,
|
|
130
138
|
AccountCreationRequest,
|
|
139
|
+
AccountIdentifierResponse,
|
|
131
140
|
AccountResponse,
|
|
132
141
|
AccountSearchRequest,
|
|
133
142
|
AccountState,
|
|
143
|
+
AccountSummary,
|
|
134
144
|
AccountType,
|
|
135
145
|
AddressInfo,
|
|
136
146
|
AgentBookingInfo,
|
|
@@ -138,6 +148,7 @@ export {
|
|
|
138
148
|
AmountPair,
|
|
139
149
|
BeneficiaryRequest,
|
|
140
150
|
BeneficiaryResponse,
|
|
151
|
+
BeneficiaryStatus,
|
|
141
152
|
BillingTransactionAmountPair,
|
|
142
153
|
BookedProductInfo,
|
|
143
154
|
BookingInfo,
|
|
@@ -182,6 +193,7 @@ export {
|
|
|
182
193
|
FlightBookingInfoRequest,
|
|
183
194
|
FlightBookingInfoResponse,
|
|
184
195
|
FlightInfo,
|
|
196
|
+
FundingAccountIdentifierType,
|
|
185
197
|
FundingAccountInboundTransferNotificationConfig,
|
|
186
198
|
FundingAccountResponseV2,
|
|
187
199
|
FundingAccountSearchRequest,
|
|
@@ -223,6 +235,7 @@ export {
|
|
|
223
235
|
Room,
|
|
224
236
|
ScheduledTaskRequest,
|
|
225
237
|
SearchRolesetsRequest,
|
|
238
|
+
Segment,
|
|
226
239
|
Sorting,
|
|
227
240
|
StatementReportRequest,
|
|
228
241
|
StatementReportResponse,
|
|
@@ -238,6 +251,7 @@ export {
|
|
|
238
251
|
TransferRequest,
|
|
239
252
|
TransferResponse,
|
|
240
253
|
TransferSearch,
|
|
254
|
+
TransferStatus,
|
|
241
255
|
TravelPartyInfo,
|
|
242
256
|
TwoFactorAuthenticationDetails,
|
|
243
257
|
TwoFactorAuthenticationRegistrationResponse,
|