@pax2pay/client 0.0.51 → 0.0.54
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/.eslintignore +3 -1
- package/Client/Auth/index.ts +6 -0
- package/Client/Beneficiaries/index.ts +33 -0
- package/Client/Beneficiary/index.ts +9 -0
- package/Client/Card/index.ts +38 -18
- package/Client/Cards/actions/actionTest.ts +4 -10
- package/Client/Cards/create/factory.ts +27 -20
- package/Client/Transfer/index.ts +9 -0
- package/Client/Transfers/factory.ts +172 -0
- package/Client/Transfers/index.ts +37 -0
- package/Client/generatePagination.ts +2 -2
- package/Client/index.ts +7 -1
- package/dist/Client/Auth/index.d.ts +2 -0
- package/dist/Client/Auth/index.js +6 -0
- package/dist/Client/Auth/index.js.map +1 -1
- package/dist/Client/Beneficiaries/index.d.ts +21 -0
- package/dist/Client/Beneficiaries/index.js +32 -0
- package/dist/Client/Beneficiaries/index.js.map +1 -0
- package/dist/Client/Beneficiary/index.d.ts +6 -0
- package/dist/Client/Beneficiary/index.js +7 -0
- package/dist/Client/Beneficiary/index.js.map +1 -0
- package/dist/Client/Card/index.js.map +1 -1
- package/dist/Client/Transfer/index.d.ts +6 -0
- package/dist/Client/Transfer/index.js +7 -0
- package/dist/Client/Transfer/index.js.map +1 -0
- package/dist/Client/Transfers/index.d.ts +21 -0
- package/dist/Client/Transfers/index.js +32 -0
- package/dist/Client/Transfers/index.js.map +1 -0
- package/dist/Client/generatePagination.js +2 -2
- package/dist/Client/generatePagination.js.map +1 -1
- package/dist/Client/index.d.ts +7 -1
- package/dist/Client/index.js +5 -1
- package/dist/Client/index.js.map +1 -1
- package/dist/model/BookingInfoRequest.d.ts +4 -3
- package/dist/model/CardDeliveryRequest.d.ts +6 -0
- package/dist/model/CardDeliveryRequest.js +2 -0
- package/dist/model/CardDeliveryRequest.js.map +1 -0
- package/dist/model/CreateCardRequest.d.ts +7 -3
- package/dist/model/ErrorMessageDto.js +2 -2
- package/dist/model/ErrorMessageDto.js.map +1 -1
- package/dist/model/FlightBookingInfoRequest.d.ts +33 -0
- package/dist/model/FlightBookingInfoRequest.js +4 -0
- package/dist/model/FlightBookingInfoRequest.js.map +1 -0
- package/dist/model/HotelBookingInfoRequest.d.ts +7 -0
- package/dist/model/HotelBookingInfoRequest.js +2 -0
- package/dist/model/HotelBookingInfoRequest.js.map +1 -0
- package/dist/model/LegacyBookingInfoRequest.d.ts +21 -0
- package/dist/model/LegacyBookingInfoRequest.js +2 -0
- package/dist/model/LegacyBookingInfoRequest.js.map +1 -0
- package/dist/model/ScheduledTaskRequest.d.ts +22 -0
- package/dist/model/ScheduledTaskRequest.js +7 -0
- package/dist/model/ScheduledTaskRequest.js.map +1 -0
- package/dist/model/index.d.ts +6 -1
- package/dist/model/index.js.map +1 -1
- package/model/BookingInfoRequest.ts +8 -3
- package/model/CardDeliveryRequest.ts +7 -0
- package/model/CreateCardRequest.ts +7 -3
- package/model/ErrorMessageDto.ts +2 -2
- package/model/FlightBookingInfoRequest.ts +33 -0
- package/model/HotelBookingInfoRequest.ts +8 -0
- package/model/LegacyBookingInfoRequest.ts +22 -0
- package/model/ScheduledTaskRequest.ts +32 -0
- package/model/Sorting.ts +1 -1
- package/model/index.ts +11 -0
- package/package.json +13 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Card/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,MAAM,OAAO,IAAK,SAAQ,QAAqD;IAC9E,YAAY,UAAsB,EAAE,MAAc,EAAE,OAA2B;QAC9E,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,CAAC;IACD,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Card/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,MAAM,OAAO,IAAK,SAAQ,QAAqD;IAC9E,YAAY,UAAsB,EAAE,MAAc,EAAE,OAA2B;QAC9E,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,CAAC;IACD,KAAK,CACJ,OAA+B;QAO/B,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAqB,GAAG,IAAI,CAAC,MAAM,QAAQ,EAAE,OAAO,CAAC,CAAA;IACjF,CAAC;IACD,MAAM;QAML,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAqB,GAAG,IAAI,CAAC,MAAM,SAAS,CAAC,CAAA;IACxE,CAAC;IACD,IAAI;QAMH,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAqB,GAAG,IAAI,CAAC,MAAM,OAAO,CAAC,CAAA;IACtE,CAAC;IACD,MAAM;QAML,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAqB,GAAG,IAAI,CAAC,MAAM,SAAS,CAAC,CAAA;IACxE,CAAC;IACD,OAAO;QAMN,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAqB,GAAG,IAAI,CAAC,MAAM,uBAAuB,CAAC,CAAA;IACtF,CAAC;IACD,eAAe;QAMd,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAA4B,GAAG,IAAI,CAAC,MAAM,eAAe,CAAC,CAAA;IACrF,CAAC;CACD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as model from "../../model";
|
|
2
|
+
import { Connection } from "../Connection";
|
|
3
|
+
import { Resource } from "../Resource";
|
|
4
|
+
export declare class Transfer extends Resource<model.TransferResponse, model.TransferRequest> {
|
|
5
|
+
constructor(connection: Connection, folder: string, backend: model.TransferResponse);
|
|
6
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Transfer/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,MAAM,OAAO,QAAS,SAAQ,QAAuD;IACpF,YAAY,UAAsB,EAAE,MAAc,EAAE,OAA+B;QAClF,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;IACnC,CAAC;CACD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as model from "../../model";
|
|
2
|
+
import { Connection } from "../Connection";
|
|
3
|
+
import { List } from "../List";
|
|
4
|
+
import { Transfer } from "../Transfer";
|
|
5
|
+
export declare class Transfers extends List<model.TransferResponse, model.TransferSearch, model.TransferRequest> {
|
|
6
|
+
protected folder: string;
|
|
7
|
+
constructor(connection: Connection);
|
|
8
|
+
static create(connection: Connection): Transfers;
|
|
9
|
+
protected getResourcePath(resource: model.TransferResponse): string;
|
|
10
|
+
protected createResource(response: model.TransferResponse): Transfer;
|
|
11
|
+
getAll(): Promise<(model.ErrorResponse & {
|
|
12
|
+
status: 400 | 404 | 500 | 403 | 503;
|
|
13
|
+
}) | model.TransferResponse[]>;
|
|
14
|
+
getTransfer(provider: model.ProviderCode, transferId: string): Promise<model.TransferResponse | (model.ErrorResponse & {
|
|
15
|
+
status: 400 | 404 | 500 | 403 | 503;
|
|
16
|
+
})>;
|
|
17
|
+
protected map(response: model.TransferResponse): Transfer & model.TransferResponse;
|
|
18
|
+
create(request: model.TransferRequest): Promise<(model.ErrorResponse & {
|
|
19
|
+
status: 400 | 404 | 500 | 403 | 503;
|
|
20
|
+
}) | (Transfer & model.TransferResponse)>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as model from "../../model";
|
|
2
|
+
import { List } from "../List";
|
|
3
|
+
import { Transfer } from "../Transfer";
|
|
4
|
+
export class Transfers extends List {
|
|
5
|
+
constructor(connection) {
|
|
6
|
+
super(connection);
|
|
7
|
+
this.folder = "transfers";
|
|
8
|
+
}
|
|
9
|
+
static create(connection) {
|
|
10
|
+
return new Transfers(connection);
|
|
11
|
+
}
|
|
12
|
+
getResourcePath(resource) {
|
|
13
|
+
return [this.folder, resource.providerCode, resource.providerTransferId].join("/");
|
|
14
|
+
}
|
|
15
|
+
createResource(response) {
|
|
16
|
+
return new Transfer(this.connection, [this.folder, response.providerCode, response.providerTransferId].join("/"), response);
|
|
17
|
+
}
|
|
18
|
+
async getAll() {
|
|
19
|
+
return await this.connection.get(`${this.folder}`);
|
|
20
|
+
}
|
|
21
|
+
async getTransfer(provider, transferId) {
|
|
22
|
+
return await this.connection.get([this.folder, provider, transferId].join("/"));
|
|
23
|
+
}
|
|
24
|
+
map(response) {
|
|
25
|
+
return Object.assign(new Transfer(this.connection, this.getResourcePath(response), response), response);
|
|
26
|
+
}
|
|
27
|
+
async create(request) {
|
|
28
|
+
const result = await this.connection.post(`${this.folder}`, request);
|
|
29
|
+
return model.ErrorResponse.is(result) ? result : this.map(result);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Transfers/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,aAAa,CAAA;AAEpC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,MAAM,OAAO,SAAU,SAAQ,IAAyE;IAEvG,YAAY,UAAsB;QACjC,KAAK,CAAC,UAAU,CAAC,CAAA;QAFR,WAAM,GAAG,WAAW,CAAA;IAG9B,CAAC;IACD,MAAM,CAAC,MAAM,CAAC,UAAsB;QACnC,OAAO,IAAI,SAAS,CAAC,UAAU,CAAC,CAAA;IACjC,CAAC;IACS,eAAe,CAAC,QAAgC;QACzD,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACnF,CAAC;IACS,cAAc,CAAC,QAAgC;QACxD,OAAO,IAAI,QAAQ,CAClB,IAAI,CAAC,UAAU,EACf,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAC3E,QAAQ,CACR,CAAA;IACF,CAAC;IACD,KAAK,CAAC,MAAM;QACX,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAA2B,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;IAC7E,CAAC;IACD,KAAK,CAAC,WAAW,CAAC,QAA4B,EAAE,UAAkB;QACjE,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAyB,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;IACxG,CAAC;IACS,GAAG,CAAC,QAAgC;QAC7C,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAA;IACxG,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,OAA8B;QAC1C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAAyB,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,OAAO,CAAC,CAAA;QAC5F,OAAO,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IAClE,CAAC;CACD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function generatePagination(page = 0, size = 20, sort = []) {
|
|
2
2
|
const result = [
|
|
3
|
-
...(page
|
|
4
|
-
...(size
|
|
3
|
+
...(page ? [`page=${page}`] : []),
|
|
4
|
+
...(size ? [`size=${size}`] : []),
|
|
5
5
|
...sort.map(s => `sort=${typeof s == "object" ? s + (s.direction == "descending" ? "desc" : "") : s}`),
|
|
6
6
|
].join("&");
|
|
7
7
|
return result ? "?" + result : "";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatePagination.js","sourceRoot":"../","sources":["Client/generatePagination.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,kBAAkB,CACjC,IAAI,GAAG,CAAC,EACR,IAAI,GAAG,EAAE,EACT,OAA2B,EAAE;IAE7B,MAAM,MAAM,GAAG;QACd,GAAG,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"generatePagination.js","sourceRoot":"../","sources":["Client/generatePagination.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,kBAAkB,CACjC,IAAI,GAAG,CAAC,EACR,IAAI,GAAG,EAAE,EACT,OAA2B,EAAE;IAE7B,MAAM,MAAM,GAAG;QACd,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACjC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACjC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,QAAQ,OAAO,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,IAAI,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACtG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACX,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,GAAG,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;AAClC,CAAC"}
|
package/dist/Client/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Account as ClientAccount } from "./Account";
|
|
2
2
|
import { Accounts as ClientAccounts } from "./Accounts";
|
|
3
3
|
import { Auth as ClientAuth } from "./Auth";
|
|
4
|
+
import { Beneficiaries as ClientBeneficiaries } from "./Beneficiaries";
|
|
4
5
|
import { Card as ClientCard } from "./Card";
|
|
5
6
|
import { Cards as ClientCards } from "./Cards";
|
|
6
7
|
import { Collection as ClientCollection } from "./Collection";
|
|
@@ -10,6 +11,7 @@ import { Organisation as ClientOrganisation } from "./Organisation";
|
|
|
10
11
|
import { Organisations as ClientOrganisations } from "./Organisations";
|
|
11
12
|
import { Reports as ClientReports } from "./Reports";
|
|
12
13
|
import { Resource as ClientResource } from "./Resource";
|
|
14
|
+
import { Transfers as ClientTransfers } from "./Transfers";
|
|
13
15
|
import { User as ClientUser } from "./User";
|
|
14
16
|
import { Users as ClientUsers } from "./Users";
|
|
15
17
|
declare type Authenticate = (client: Client) => Promise<boolean>;
|
|
@@ -18,11 +20,13 @@ export declare class Client {
|
|
|
18
20
|
private $authenticate?;
|
|
19
21
|
set authenticate(value: Authenticate);
|
|
20
22
|
accounts: ClientAccounts;
|
|
21
|
-
cards: ClientCards;
|
|
22
23
|
auth: ClientAuth;
|
|
24
|
+
beneficiaries: ClientBeneficiaries;
|
|
25
|
+
cards: ClientCards;
|
|
23
26
|
users: ClientUsers;
|
|
24
27
|
organisations: ClientOrganisations;
|
|
25
28
|
reports: ClientReports;
|
|
29
|
+
transfers: ClientTransfers;
|
|
26
30
|
constructor(connection: Connection, $authenticate?: Authenticate | undefined);
|
|
27
31
|
static create(url: string | undefined, token?: string | Authenticate): Client | undefined;
|
|
28
32
|
}
|
|
@@ -30,11 +34,13 @@ export declare namespace Client {
|
|
|
30
34
|
type Account = ClientAccount;
|
|
31
35
|
type Accounts = ClientAccounts;
|
|
32
36
|
type Auth = ClientAuth;
|
|
37
|
+
type Beneficiaries = ClientBeneficiaries;
|
|
33
38
|
type Card = ClientCard;
|
|
34
39
|
type Cards = ClientCards;
|
|
35
40
|
type Organisation = ClientOrganisation;
|
|
36
41
|
type Organisations = ClientOrganisations;
|
|
37
42
|
type Reports = ClientReports;
|
|
43
|
+
type Transfers = ClientTransfers;
|
|
38
44
|
type User = ClientUser;
|
|
39
45
|
type Users = ClientUsers;
|
|
40
46
|
type Collection<Response extends {
|
package/dist/Client/index.js
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { Accounts as ClientAccounts } from "./Accounts";
|
|
2
2
|
import { Auth as ClientAuth } from "./Auth";
|
|
3
|
+
import { Beneficiaries as ClientBeneficiaries } from "./Beneficiaries";
|
|
3
4
|
import { Cards as ClientCards } from "./Cards";
|
|
4
5
|
import { Connection } from "./Connection";
|
|
5
6
|
import { Organisations as ClientOrganisations } from "./Organisations";
|
|
6
7
|
import { Reports as ClientReports } from "./Reports";
|
|
8
|
+
import { Transfers as ClientTransfers } from "./Transfers";
|
|
7
9
|
import { Users as ClientUsers } from "./Users";
|
|
8
10
|
export class Client {
|
|
9
11
|
constructor(connection, $authenticate) {
|
|
10
12
|
this.connection = connection;
|
|
11
13
|
this.$authenticate = $authenticate;
|
|
12
14
|
this.accounts = ClientAccounts.create(this.connection);
|
|
13
|
-
this.cards = ClientCards.create(this.connection);
|
|
14
15
|
this.auth = ClientAuth.create(this.connection);
|
|
16
|
+
this.beneficiaries = ClientBeneficiaries.create(this.connection);
|
|
17
|
+
this.cards = ClientCards.create(this.connection);
|
|
15
18
|
this.users = ClientUsers.create(this.connection);
|
|
16
19
|
this.organisations = ClientOrganisations.create(this.connection);
|
|
17
20
|
this.reports = ClientReports.create(this.connection);
|
|
21
|
+
this.transfers = ClientTransfers.create(this.connection);
|
|
18
22
|
connection.unauthorized = async () => { var _a, _b; return (_b = (await ((_a = this.$authenticate) === null || _a === void 0 ? void 0 : _a.call(this, this)))) !== null && _b !== void 0 ? _b : false; };
|
|
19
23
|
}
|
|
20
24
|
set authenticate(value) {
|
package/dist/Client/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,YAAY,CAAA;AACvD,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,YAAY,CAAA;AACvD,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,QAAQ,CAAA;AAC3C,OAAO,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AAEtE,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGzC,OAAO,EAAE,aAAa,IAAI,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,WAAW,CAAA;AAEpD,OAAO,EAAE,SAAS,IAAI,eAAe,EAAE,MAAM,aAAa,CAAA;AAE1D,OAAO,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,SAAS,CAAA;AAI9C,MAAM,OAAO,MAAM;IAYlB,YAAoB,UAAsB,EAAU,aAA4B;QAA5D,eAAU,GAAV,UAAU,CAAY;QAAU,kBAAa,GAAb,aAAa,CAAe;QARhF,aAAQ,GAAG,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QACjD,SAAI,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QACzC,kBAAa,GAAG,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QAC3D,UAAK,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QAC3C,UAAK,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QAC3C,kBAAa,GAAG,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QAC3D,YAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QAC/C,cAAS,GAAG,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QAElD,UAAU,CAAC,YAAY,GAAG,KAAK,IAAI,EAAE,eAAC,OAAA,MAAA,CAAC,MAAM,CAAA,MAAA,IAAI,CAAC,aAAa,+CAAlB,IAAI,EAAiB,IAAI,CAAC,CAAA,CAAC,mCAAI,KAAK,CAAA,EAAA,CAAA;IAClF,CAAC;IAbD,IAAI,YAAY,CAAC,KAAmB;QACnC,IAAI,CAAC,aAAa,GAAG,KAAK,CAAA;IAC3B,CAAC;IAYD,MAAM,CAAC,MAAM,CAAC,GAAuB,EAAE,KAA6B;QACnE,MAAM,UAAU,GAAG,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;QACvG,OAAO,UAAU,IAAI,IAAI,MAAM,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;IAC1F,CAAC;CACD"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FiveFieldsBookingInfoRequest } from "./FiveFieldsBookingInfoRequest";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
2
|
+
import { FlightBookingInfoRequest } from "./FlightBookingInfoRequest";
|
|
3
|
+
import { HotelBookingInfoRequest } from "./HotelBookingInfoRequest";
|
|
4
|
+
import { LegacyBookingInfoRequest } from "./LegacyBookingInfoRequest";
|
|
5
|
+
export declare type BookingInfoRequest = FiveFieldsBookingInfoRequest | LegacyBookingInfoRequest | HotelBookingInfoRequest | FlightBookingInfoRequest;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardDeliveryRequest.js","sourceRoot":"../","sources":["model/CardDeliveryRequest.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BookingInfoRequest } from "./BookingInfoRequest";
|
|
2
|
+
import { CardDeliveryRequest } from "./CardDeliveryRequest";
|
|
2
3
|
import { CardTypeSpecification } from "./CardTypeSpecification";
|
|
3
4
|
import { ProviderCode } from "./ProviderCode";
|
|
5
|
+
import { CardAmendmentScheduledTaskRequest, CardStateChangeScheduledTaskRequest } from "./ScheduledTaskRequest";
|
|
4
6
|
export interface CreateCardRequest {
|
|
5
|
-
cardType: CardTypeSpecification;
|
|
6
|
-
bookingInfo?:
|
|
7
|
+
cardType: CardTypeSpecification | string;
|
|
8
|
+
bookingInfo?: BookingInfoRequest;
|
|
7
9
|
providerAccountId?: string;
|
|
8
10
|
providerCode: ProviderCode;
|
|
9
11
|
balance: number;
|
|
@@ -11,5 +13,7 @@ export interface CreateCardRequest {
|
|
|
11
13
|
fundingDate?: string;
|
|
12
14
|
expiryDate?: any;
|
|
13
15
|
usage?: "SINGLE_USE" | "MULTIPLE_USE";
|
|
16
|
+
schedule?: (CardAmendmentScheduledTaskRequest | CardStateChangeScheduledTaskRequest)[];
|
|
14
17
|
friendlyName?: string;
|
|
18
|
+
delivery?: CardDeliveryRequest;
|
|
15
19
|
}
|
|
@@ -2,8 +2,8 @@ export var ErrorMessageDto;
|
|
|
2
2
|
(function (ErrorMessageDto) {
|
|
3
3
|
function is(value) {
|
|
4
4
|
return (typeof value == "object" &&
|
|
5
|
-
(value.field == undefined || value.field == "string") &&
|
|
6
|
-
(value.message == undefined || value.message == "string"));
|
|
5
|
+
(value.field == undefined || typeof value.field == "string") &&
|
|
6
|
+
(value.message == undefined || typeof value.message == "string"));
|
|
7
7
|
}
|
|
8
8
|
ErrorMessageDto.is = is;
|
|
9
9
|
})(ErrorMessageDto || (ErrorMessageDto = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorMessageDto.js","sourceRoot":"../","sources":["model/ErrorMessageDto.ts"],"names":[],"mappings":"AAMA,MAAM,KAAW,eAAe,CAQ/B;AARD,WAAiB,eAAe;IAC/B,SAAgB,EAAE,CAAC,KAAkC;QACpD,OAAO,CACN,OAAO,KAAK,IAAI,QAAQ;YACxB,CAAC,KAAK,CAAC,KAAK,IAAI,SAAS,IAAI,KAAK,CAAC,KAAK,IAAI,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"ErrorMessageDto.js","sourceRoot":"../","sources":["model/ErrorMessageDto.ts"],"names":[],"mappings":"AAMA,MAAM,KAAW,eAAe,CAQ/B;AARD,WAAiB,eAAe;IAC/B,SAAgB,EAAE,CAAC,KAAkC;QACpD,OAAO,CACN,OAAO,KAAK,IAAI,QAAQ;YACxB,CAAC,KAAK,CAAC,KAAK,IAAI,SAAS,IAAI,OAAO,KAAK,CAAC,KAAK,IAAI,QAAQ,CAAC;YAC5D,CAAC,KAAK,CAAC,OAAO,IAAI,SAAS,IAAI,OAAO,KAAK,CAAC,OAAO,IAAI,QAAQ,CAAC,CAChE,CAAA;IACF,CAAC;IANe,kBAAE,KAMjB,CAAA;AACF,CAAC,EARgB,eAAe,KAAf,eAAe,QAQ/B"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as isoly from "isoly";
|
|
2
|
+
export interface FlightBookingInfoRequest {
|
|
3
|
+
passengers?: Passengers;
|
|
4
|
+
flight?: FlightInfo;
|
|
5
|
+
references?: References;
|
|
6
|
+
cost?: number;
|
|
7
|
+
currency?: isoly.Currency;
|
|
8
|
+
timestamp?: isoly.DateTime;
|
|
9
|
+
}
|
|
10
|
+
interface Passengers {
|
|
11
|
+
leadPassengerName?: string;
|
|
12
|
+
adults?: number;
|
|
13
|
+
children?: number;
|
|
14
|
+
infants?: number;
|
|
15
|
+
}
|
|
16
|
+
interface FlightInfo {
|
|
17
|
+
outbound?: Segment;
|
|
18
|
+
homebound?: Segment;
|
|
19
|
+
}
|
|
20
|
+
interface Segment {
|
|
21
|
+
from?: string;
|
|
22
|
+
to?: string;
|
|
23
|
+
date?: isoly.Date;
|
|
24
|
+
}
|
|
25
|
+
declare class References {
|
|
26
|
+
supplierCode?: string;
|
|
27
|
+
supplierName?: string;
|
|
28
|
+
supplierBookingReference?: string;
|
|
29
|
+
agentBookingReference?: string;
|
|
30
|
+
fabBasketReference?: string;
|
|
31
|
+
syndicatorName?: string;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlightBookingInfoRequest.js","sourceRoot":"../","sources":["model/FlightBookingInfoRequest.ts"],"names":[],"mappings":"AAyBA,MAAM,UAAU;CAOf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HotelBookingInfoRequest.js","sourceRoot":"../","sources":["model/HotelBookingInfoRequest.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AgentBookingInfo } from "./AgentBookingInfo";
|
|
2
|
+
import { BookedProductInfo } from "./BookedProductInfo";
|
|
3
|
+
import { SupplierBookingInfo } from "./SupplierBookingInfo";
|
|
4
|
+
import { TravelPartyInfo } from "./TravelPartyInfo";
|
|
5
|
+
export interface LegacyBookingInfoRequest {
|
|
6
|
+
bookingOpType?: string;
|
|
7
|
+
productType?: string;
|
|
8
|
+
trackingId?: string;
|
|
9
|
+
bookingInfoText?: string;
|
|
10
|
+
bookingDate?: string;
|
|
11
|
+
supplierBookingInfo?: SupplierBookingInfo;
|
|
12
|
+
createdOn?: string;
|
|
13
|
+
createdBy?: string;
|
|
14
|
+
bookingRef?: string;
|
|
15
|
+
sellingPriceCurrency?: string;
|
|
16
|
+
sellingPriceAmount?: number;
|
|
17
|
+
bookedProduct?: BookedProductInfo;
|
|
18
|
+
travelParty?: TravelPartyInfo;
|
|
19
|
+
agentBookingInfo?: AgentBookingInfo;
|
|
20
|
+
chargingMerchantId?: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LegacyBookingInfoRequest.js","sourceRoot":"../","sources":["model/LegacyBookingInfoRequest.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as isoly from "isoly";
|
|
2
|
+
declare enum CardScheduleTaskType {
|
|
3
|
+
CARD_AMENDMENT = 0,
|
|
4
|
+
CARD_STATE_CHANGE = 1
|
|
5
|
+
}
|
|
6
|
+
interface ScheduledTaskRequest {
|
|
7
|
+
dueOn: isoly.DateTime;
|
|
8
|
+
status?: "TODO" | "CANCELLED" | "CANCELLED_EXCEPTIONALLY" | "SUCCESSFUL" | "FAILED" | "FAILED_EXCEPTIONALLY" | "HALTED" | "PENDING" | "PENDING_DECLINED";
|
|
9
|
+
taskId?: string;
|
|
10
|
+
taskType?: CardScheduleTaskType.CARD_AMENDMENT | CardScheduleTaskType.CARD_STATE_CHANGE;
|
|
11
|
+
}
|
|
12
|
+
export interface CardAmendmentScheduledTaskRequest extends ScheduledTaskRequest {
|
|
13
|
+
taskType: CardScheduleTaskType.CARD_AMENDMENT;
|
|
14
|
+
newBalance?: number;
|
|
15
|
+
balanceDifferential?: number;
|
|
16
|
+
remainingBalance?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface CardStateChangeScheduledTaskRequest extends ScheduledTaskRequest {
|
|
19
|
+
taskType: CardScheduleTaskType.CARD_STATE_CHANGE;
|
|
20
|
+
desiredState: "CANCEL" | "FREEZE" | "THAW";
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var CardScheduleTaskType;
|
|
2
|
+
(function (CardScheduleTaskType) {
|
|
3
|
+
CardScheduleTaskType[CardScheduleTaskType["CARD_AMENDMENT"] = 0] = "CARD_AMENDMENT";
|
|
4
|
+
CardScheduleTaskType[CardScheduleTaskType["CARD_STATE_CHANGE"] = 1] = "CARD_STATE_CHANGE";
|
|
5
|
+
})(CardScheduleTaskType || (CardScheduleTaskType = {}));
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=ScheduledTaskRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduledTaskRequest.js","sourceRoot":"../","sources":["model/ScheduledTaskRequest.ts"],"names":[],"mappings":"AAEA,IAAK,oBAGJ;AAHD,WAAK,oBAAoB;IACxB,mFAAc,CAAA;IACd,yFAAiB,CAAA;AAClB,CAAC,EAHI,oBAAoB,KAApB,oBAAoB,QAGxB"}
|
package/dist/model/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { BookedProductInfo } from "./BookedProductInfo";
|
|
|
10
10
|
import { BookingInfo } from "./BookingInfo";
|
|
11
11
|
import { BookingInfoRequest } from "./BookingInfoRequest";
|
|
12
12
|
import { BookingInfoResponse } from "./BookingInfoResponse";
|
|
13
|
+
import { CardDeliveryRequest } from "./CardDeliveryRequest";
|
|
13
14
|
import { CardFundingAccountResponse } from "./CardFundingAccountResponse";
|
|
14
15
|
import { CardOptionSearch } from "./CardOptionSearch";
|
|
15
16
|
import { CardResponse } from "./CardResponse";
|
|
@@ -34,14 +35,17 @@ import { ErrorMessageDto } from "./ErrorMessageDto";
|
|
|
34
35
|
import { ErrorResponse } from "./ErrorResponse";
|
|
35
36
|
import { FiveFieldsBookingInfoRequest } from "./FiveFieldsBookingInfoRequest";
|
|
36
37
|
import { FiveFieldsBookingInfoResponse } from "./FiveFieldsBookingInfoResponse";
|
|
38
|
+
import { FlightBookingInfoRequest } from "./FlightBookingInfoRequest";
|
|
37
39
|
import { FundingAccountInboundTransferNotificationConfig } from "./FundingAccountInboundTransferNotificationConfig";
|
|
38
40
|
import { FundingAccountSearchRequest } from "./FundingAccountSearchRequest";
|
|
39
41
|
import { FundingAccountSearchResponse } from "./FundingAccountSearchResponse";
|
|
40
42
|
import { FundingLimitRequest } from "./FundingLimitRequest";
|
|
41
43
|
import { FundingLimitResponse } from "./FundingLimitResponse";
|
|
44
|
+
import { HotelBookingInfoRequest } from "./HotelBookingInfoRequest";
|
|
42
45
|
import { InsertCardOptionRequest } from "./InsertCardOptionRequest";
|
|
43
46
|
import { InsertCardRequest } from "./InsertCardRequest";
|
|
44
47
|
import { Issue } from "./Issue";
|
|
48
|
+
import { LegacyBookingInfoRequest } from "./LegacyBookingInfoRequest";
|
|
45
49
|
import { LoginRequest } from "./LoginRequest";
|
|
46
50
|
import { LoginResponse } from "./LoginResponse";
|
|
47
51
|
import { NonBeneficiaryTransferDestination } from "./NonBeneficiaryTransferDestination";
|
|
@@ -62,6 +66,7 @@ import { RelogWithNewSessionDetailsRequest } from "./RelogWithNewSessionDetailsR
|
|
|
62
66
|
import { Report } from "./Report";
|
|
63
67
|
import { RoleResponse } from "./RoleResponse";
|
|
64
68
|
import { RolesetResponse } from "./RolesetResponse";
|
|
69
|
+
import { CardAmendmentScheduledTaskRequest, CardStateChangeScheduledTaskRequest } from "./ScheduledTaskRequest";
|
|
65
70
|
import { SearchRolesetsRequest } from "./SearchRolesetsRequest";
|
|
66
71
|
import { Sorting } from "./Sorting";
|
|
67
72
|
import { SupplierBookingInfo } from "./SupplierBookingInfo";
|
|
@@ -86,4 +91,4 @@ import { UserRequest } from "./UserRequest";
|
|
|
86
91
|
import { UserResponse } from "./UserResponse";
|
|
87
92
|
import { UserRoleResponse } from "./UserRoleResponse";
|
|
88
93
|
import { UserSearchRequest } from "./UserSearchRequest";
|
|
89
|
-
export { AccountCreationRequest, AccountResponse, AccountSearchRequest, AddressInfo, AgentBookingInfo, AmendCardRequest, BeneficiaryRequest, BeneficiaryResponse, BookedProductInfo, BookingInfo, BookingInfoRequest, BookingInfoResponse, CardFundingAccountResponse, CardOptionSearch, CardResponse, CardResponseV2, CardSearch, CardTypeResponse, CardTypesConfig, CardTypeSearchRequest, CardTypeSpecification, ConfigMatchesRequest, ConfigMatchesResponse, ConfigRequest, ConfigResponse, ConfigTypesResponse, CreateCardRequest, CreateRolesetRequest, CredentialRequest, CredentialResponse, Criteria, DateRangeLocalDate, ErrorMessageDto, ErrorResponse, FiveFieldsBookingInfoRequest, FiveFieldsBookingInfoResponse, FundingAccountInboundTransferNotificationConfig, FundingAccountSearchRequest, FundingAccountSearchResponse, FundingLimitRequest, FundingLimitResponse, InsertCardOptionRequest, InsertCardRequest, Issue, LoginRequest, LoginResponse, NonBeneficiaryTransferDestination, OrganisationBalanceLimitResponse, OrganisationConfig, OrganisationRequest, OrganisationResponse, PasswordChangeRequest, PasswordValidateRequest, PasswordValidateResponse, Payload, PaymentMethodOptionResponse, PaymentOption, ProcessedStatement, ProviderResponse, RelogWithNewSessionDetailsRequest, Report, RoleResponse, RolesetResponse, SearchRolesetsRequest, Sorting, SupplierBookingInfo, TransactionResponse, TransactionType, TransferDestinationInfo, TransferRequest, TransferResponse, TransferSearch, TravelPartyInfo, TwoFactorAuthenticationDetails, TwoFactorAuthenticationRegistrationResponse, UpdateAccountRequest, UpdateBeneficiaryRequest, UpdateRolesetRequest, UserChangeRequest, UserConfig, UserLimit, UserLimitsDeleteRequest, UserLimitsRequest, UserRequest, UserResponse, UserRoleResponse, UserSearchRequest, ProviderCode, };
|
|
94
|
+
export { AccountCreationRequest, AccountResponse, AccountSearchRequest, AddressInfo, AgentBookingInfo, AmendCardRequest, BeneficiaryRequest, BeneficiaryResponse, BookedProductInfo, BookingInfo, BookingInfoRequest, BookingInfoResponse, CardAmendmentScheduledTaskRequest, CardDeliveryRequest, CardFundingAccountResponse, CardOptionSearch, CardResponse, CardResponseV2, CardSearch, CardStateChangeScheduledTaskRequest, CardTypeResponse, CardTypesConfig, CardTypeSearchRequest, CardTypeSpecification, ConfigMatchesRequest, ConfigMatchesResponse, ConfigRequest, ConfigResponse, ConfigTypesResponse, CreateCardRequest, CreateRolesetRequest, CredentialRequest, CredentialResponse, Criteria, DateRangeLocalDate, ErrorMessageDto, ErrorResponse, FiveFieldsBookingInfoRequest, FiveFieldsBookingInfoResponse, FlightBookingInfoRequest, FundingAccountInboundTransferNotificationConfig, FundingAccountSearchRequest, FundingAccountSearchResponse, FundingLimitRequest, FundingLimitResponse, HotelBookingInfoRequest, InsertCardOptionRequest, InsertCardRequest, Issue, LegacyBookingInfoRequest, LoginRequest, LoginResponse, NonBeneficiaryTransferDestination, OrganisationBalanceLimitResponse, OrganisationConfig, OrganisationRequest, OrganisationResponse, PasswordChangeRequest, PasswordValidateRequest, PasswordValidateResponse, Payload, PaymentMethodOptionResponse, PaymentOption, ProcessedStatement, ProviderResponse, RelogWithNewSessionDetailsRequest, Report, RoleResponse, RolesetResponse, SearchRolesetsRequest, Sorting, SupplierBookingInfo, TransactionResponse, TransactionType, TransferDestinationInfo, TransferRequest, TransferResponse, TransferSearch, TravelPartyInfo, TwoFactorAuthenticationDetails, TwoFactorAuthenticationRegistrationResponse, UpdateAccountRequest, UpdateBeneficiaryRequest, UpdateRolesetRequest, UserChangeRequest, UserConfig, UserLimit, UserLimitsDeleteRequest, UserLimitsRequest, UserRequest, UserResponse, UserRoleResponse, UserSearchRequest, ProviderCode, };
|
package/dist/model/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["model/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["model/index.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAY/C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAG/B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAA;AAGrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAoC7D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAI7C,OAAO,EAoCN,eAAe,EACf,aAAa,EAYb,KAAK,EAGL,aAAa,EAEb,gCAAgC,EAGhC,oBAAoB,EAkCpB,YAAY,GAIZ,CAAA"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { FiveFieldsBookingInfoRequest } from "./FiveFieldsBookingInfoRequest"
|
|
2
|
+
import { FlightBookingInfoRequest } from "./FlightBookingInfoRequest"
|
|
3
|
+
import { HotelBookingInfoRequest } from "./HotelBookingInfoRequest"
|
|
4
|
+
import { LegacyBookingInfoRequest } from "./LegacyBookingInfoRequest"
|
|
2
5
|
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
export type BookingInfoRequest =
|
|
7
|
+
| FiveFieldsBookingInfoRequest
|
|
8
|
+
| LegacyBookingInfoRequest
|
|
9
|
+
| HotelBookingInfoRequest
|
|
10
|
+
| FlightBookingInfoRequest
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BookingInfoRequest } from "./BookingInfoRequest"
|
|
2
|
+
import { CardDeliveryRequest } from "./CardDeliveryRequest"
|
|
2
3
|
import { CardTypeSpecification } from "./CardTypeSpecification"
|
|
3
4
|
import { ProviderCode } from "./ProviderCode"
|
|
5
|
+
import { CardAmendmentScheduledTaskRequest, CardStateChangeScheduledTaskRequest } from "./ScheduledTaskRequest"
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* Creates a virtual card.
|
|
7
9
|
*/
|
|
8
10
|
export interface CreateCardRequest {
|
|
9
|
-
cardType: CardTypeSpecification
|
|
10
|
-
bookingInfo?:
|
|
11
|
+
cardType: CardTypeSpecification | string
|
|
12
|
+
bookingInfo?: BookingInfoRequest
|
|
11
13
|
providerAccountId?: string
|
|
12
14
|
providerCode: ProviderCode
|
|
13
15
|
balance: number
|
|
@@ -15,5 +17,7 @@ export interface CreateCardRequest {
|
|
|
15
17
|
fundingDate?: string
|
|
16
18
|
expiryDate?: any
|
|
17
19
|
usage?: "SINGLE_USE" | "MULTIPLE_USE"
|
|
20
|
+
schedule?: (CardAmendmentScheduledTaskRequest | CardStateChangeScheduledTaskRequest)[]
|
|
18
21
|
friendlyName?: string
|
|
22
|
+
delivery?: CardDeliveryRequest
|
|
19
23
|
}
|
package/model/ErrorMessageDto.ts
CHANGED
|
@@ -8,8 +8,8 @@ export namespace ErrorMessageDto {
|
|
|
8
8
|
export function is(value: ErrorMessageDto | undefined) {
|
|
9
9
|
return (
|
|
10
10
|
typeof value == "object" &&
|
|
11
|
-
(value.field == undefined || value.field == "string") &&
|
|
12
|
-
(value.message == undefined || value.message == "string")
|
|
11
|
+
(value.field == undefined || typeof value.field == "string") &&
|
|
12
|
+
(value.message == undefined || typeof value.message == "string")
|
|
13
13
|
)
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as isoly from "isoly"
|
|
2
|
+
|
|
3
|
+
export interface FlightBookingInfoRequest {
|
|
4
|
+
passengers?: Passengers
|
|
5
|
+
flight?: FlightInfo
|
|
6
|
+
references?: References
|
|
7
|
+
cost?: number
|
|
8
|
+
currency?: isoly.Currency
|
|
9
|
+
timestamp?: isoly.DateTime
|
|
10
|
+
}
|
|
11
|
+
interface Passengers {
|
|
12
|
+
leadPassengerName?: string
|
|
13
|
+
adults?: number
|
|
14
|
+
children?: number
|
|
15
|
+
infants?: number
|
|
16
|
+
}
|
|
17
|
+
interface FlightInfo {
|
|
18
|
+
outbound?: Segment
|
|
19
|
+
homebound?: Segment
|
|
20
|
+
}
|
|
21
|
+
interface Segment {
|
|
22
|
+
from?: string
|
|
23
|
+
to?: string
|
|
24
|
+
date?: isoly.Date
|
|
25
|
+
}
|
|
26
|
+
class References {
|
|
27
|
+
supplierCode?: string
|
|
28
|
+
supplierName?: string
|
|
29
|
+
supplierBookingReference?: string
|
|
30
|
+
agentBookingReference?: string
|
|
31
|
+
fabBasketReference?: string
|
|
32
|
+
syndicatorName?: string
|
|
33
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AgentBookingInfo } from "./AgentBookingInfo"
|
|
2
|
+
import { BookedProductInfo } from "./BookedProductInfo"
|
|
3
|
+
import { SupplierBookingInfo } from "./SupplierBookingInfo"
|
|
4
|
+
import { TravelPartyInfo } from "./TravelPartyInfo"
|
|
5
|
+
|
|
6
|
+
export interface LegacyBookingInfoRequest {
|
|
7
|
+
bookingOpType?: string
|
|
8
|
+
productType?: string
|
|
9
|
+
trackingId?: string
|
|
10
|
+
bookingInfoText?: string
|
|
11
|
+
bookingDate?: string
|
|
12
|
+
supplierBookingInfo?: SupplierBookingInfo
|
|
13
|
+
createdOn?: string
|
|
14
|
+
createdBy?: string
|
|
15
|
+
bookingRef?: string
|
|
16
|
+
sellingPriceCurrency?: string
|
|
17
|
+
sellingPriceAmount?: number
|
|
18
|
+
bookedProduct?: BookedProductInfo
|
|
19
|
+
travelParty?: TravelPartyInfo
|
|
20
|
+
agentBookingInfo?: AgentBookingInfo
|
|
21
|
+
chargingMerchantId?: string
|
|
22
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as isoly from "isoly"
|
|
2
|
+
|
|
3
|
+
enum CardScheduleTaskType {
|
|
4
|
+
CARD_AMENDMENT,
|
|
5
|
+
CARD_STATE_CHANGE,
|
|
6
|
+
}
|
|
7
|
+
interface ScheduledTaskRequest {
|
|
8
|
+
dueOn: isoly.DateTime
|
|
9
|
+
status?:
|
|
10
|
+
| "TODO"
|
|
11
|
+
| "CANCELLED"
|
|
12
|
+
| "CANCELLED_EXCEPTIONALLY"
|
|
13
|
+
| "SUCCESSFUL"
|
|
14
|
+
| "FAILED"
|
|
15
|
+
| "FAILED_EXCEPTIONALLY"
|
|
16
|
+
| "HALTED"
|
|
17
|
+
| "PENDING"
|
|
18
|
+
| "PENDING_DECLINED"
|
|
19
|
+
taskId?: string
|
|
20
|
+
taskType?: CardScheduleTaskType.CARD_AMENDMENT | CardScheduleTaskType.CARD_STATE_CHANGE
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CardAmendmentScheduledTaskRequest extends ScheduledTaskRequest {
|
|
24
|
+
taskType: CardScheduleTaskType.CARD_AMENDMENT
|
|
25
|
+
newBalance?: number
|
|
26
|
+
balanceDifferential?: number
|
|
27
|
+
remainingBalance?: number
|
|
28
|
+
}
|
|
29
|
+
export interface CardStateChangeScheduledTaskRequest extends ScheduledTaskRequest {
|
|
30
|
+
taskType: CardScheduleTaskType.CARD_STATE_CHANGE
|
|
31
|
+
desiredState: "CANCEL" | "FREEZE" | "THAW"
|
|
32
|
+
}
|
package/model/Sorting.ts
CHANGED