@pax2pay/client 0.0.52 → 0.0.53
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/Client/Auth/index.ts +6 -0
- 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/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 +5 -1
- 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 +3 -1
- package/dist/model/index.js.map +1 -1
- package/model/CardDeliveryRequest.ts +7 -0
- package/model/CreateCardRequest.ts +5 -1
- package/model/ScheduledTaskRequest.ts +32 -0
- package/model/index.ts +5 -0
- package/package.json +1 -1
package/Client/Auth/index.ts
CHANGED
|
@@ -2,6 +2,12 @@ import * as model from "../../model"
|
|
|
2
2
|
import { Connection } from "../Connection"
|
|
3
3
|
|
|
4
4
|
export class Auth {
|
|
5
|
+
get token(): string | undefined {
|
|
6
|
+
return this.connection.token
|
|
7
|
+
}
|
|
8
|
+
set token(value: string | undefined) {
|
|
9
|
+
this.connection.token = value
|
|
10
|
+
}
|
|
5
11
|
constructor(private connection: Connection) {}
|
|
6
12
|
async login(request: model.LoginRequest) {
|
|
7
13
|
const result = await this.connection.post<model.LoginResponse, 400 | 403 | 404 | 500>("auth/login", request)
|
|
@@ -2,6 +2,8 @@ import * as model from "../../model";
|
|
|
2
2
|
import { Connection } from "../Connection";
|
|
3
3
|
export declare class Auth {
|
|
4
4
|
private connection;
|
|
5
|
+
get token(): string | undefined;
|
|
6
|
+
set token(value: string | undefined);
|
|
5
7
|
constructor(connection: Connection);
|
|
6
8
|
login(request: model.LoginRequest): Promise<model.LoginResponse | (model.ErrorResponse & {
|
|
7
9
|
status: 400 | 404 | 500 | 403 | 503;
|
|
@@ -2,6 +2,12 @@ export class Auth {
|
|
|
2
2
|
constructor(connection) {
|
|
3
3
|
this.connection = connection;
|
|
4
4
|
}
|
|
5
|
+
get token() {
|
|
6
|
+
return this.connection.token;
|
|
7
|
+
}
|
|
8
|
+
set token(value) {
|
|
9
|
+
this.connection.token = value;
|
|
10
|
+
}
|
|
5
11
|
async login(request) {
|
|
6
12
|
const result = await this.connection.post("auth/login", request);
|
|
7
13
|
if (!isError(result))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Auth/index.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,IAAI;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Auth/index.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,IAAI;IAOhB,YAAoB,UAAsB;QAAtB,eAAU,GAAV,UAAU,CAAY;IAAG,CAAC;IAN9C,IAAI,KAAK;QACR,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAA;IAC7B,CAAC;IACD,IAAI,KAAK,CAAC,KAAyB;QAClC,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,KAAK,CAAA;IAC9B,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,OAA2B;QACtC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAA6C,YAAY,EAAE,OAAO,CAAC,CAAA;QAC5G,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;YACnB,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAA;QACrC,OAAO,MAAM,CAAA;IACd,CAAC;IACD,KAAK,CAAC,OAAO,CAAC,OAAgD;QAC7D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAA6C,YAAY,EAAE,OAAO,CAAC,CAAA;QAC5G,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;YACnB,IAAI,CAAC,UAAU,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAA;QACrC,OAAO,MAAM,CAAA;IACd,CAAC;IACD,MAAM,CAAC,MAAM,CAAC,UAAsB;QACnC,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,CAAA;IAC5B,CAAC;CACD;AAED,SAAS,OAAO,CAAC,KAAgC;IAChD,OAAO,OAAO,KAAK,IAAI,QAAQ,IAAI,OAAO,KAAK,CAAC,IAAI,IAAI,QAAQ,CAAA;AACjE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardDeliveryRequest.js","sourceRoot":"../","sources":["model/CardDeliveryRequest.ts"],"names":[],"mappings":""}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { BookingInfo } from "./BookingInfo";
|
|
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;
|
|
7
|
+
cardType: CardTypeSpecification | string;
|
|
6
8
|
bookingInfo?: BookingInfo;
|
|
7
9
|
providerAccountId?: string;
|
|
8
10
|
providerCode: ProviderCode;
|
|
@@ -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
|
}
|
|
@@ -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";
|
|
@@ -62,6 +63,7 @@ import { RelogWithNewSessionDetailsRequest } from "./RelogWithNewSessionDetailsR
|
|
|
62
63
|
import { Report } from "./Report";
|
|
63
64
|
import { RoleResponse } from "./RoleResponse";
|
|
64
65
|
import { RolesetResponse } from "./RolesetResponse";
|
|
66
|
+
import { CardAmendmentScheduledTaskRequest, CardStateChangeScheduledTaskRequest } from "./ScheduledTaskRequest";
|
|
65
67
|
import { SearchRolesetsRequest } from "./SearchRolesetsRequest";
|
|
66
68
|
import { Sorting } from "./Sorting";
|
|
67
69
|
import { SupplierBookingInfo } from "./SupplierBookingInfo";
|
|
@@ -86,4 +88,4 @@ import { UserRequest } from "./UserRequest";
|
|
|
86
88
|
import { UserResponse } from "./UserResponse";
|
|
87
89
|
import { UserRoleResponse } from "./UserRoleResponse";
|
|
88
90
|
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, };
|
|
91
|
+
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, 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, };
|
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;AAU/C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/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,EAUb,KAAK,EAEL,aAAa,EAEb,gCAAgC,EAGhC,oBAAoB,EAkCpB,YAAY,GAIZ,CAAA"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { BookingInfo } from "./BookingInfo"
|
|
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
|
|
11
|
+
cardType: CardTypeSpecification | string
|
|
10
12
|
bookingInfo?: BookingInfo
|
|
11
13
|
providerAccountId?: string
|
|
12
14
|
providerCode: ProviderCode
|
|
@@ -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
|
}
|
|
@@ -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/index.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"
|
|
@@ -62,6 +63,7 @@ import { RelogWithNewSessionDetailsRequest } from "./RelogWithNewSessionDetailsR
|
|
|
62
63
|
import { Report } from "./Report"
|
|
63
64
|
import { RoleResponse } from "./RoleResponse"
|
|
64
65
|
import { RolesetResponse } from "./RolesetResponse"
|
|
66
|
+
import { CardAmendmentScheduledTaskRequest, CardStateChangeScheduledTaskRequest } from "./ScheduledTaskRequest"
|
|
65
67
|
import { SearchRolesetsRequest } from "./SearchRolesetsRequest"
|
|
66
68
|
import { Sorting } from "./Sorting"
|
|
67
69
|
import { SupplierBookingInfo } from "./SupplierBookingInfo"
|
|
@@ -100,11 +102,14 @@ export {
|
|
|
100
102
|
BookingInfo,
|
|
101
103
|
BookingInfoRequest,
|
|
102
104
|
BookingInfoResponse,
|
|
105
|
+
CardAmendmentScheduledTaskRequest,
|
|
106
|
+
CardDeliveryRequest,
|
|
103
107
|
CardFundingAccountResponse,
|
|
104
108
|
CardOptionSearch,
|
|
105
109
|
CardResponse,
|
|
106
110
|
CardResponseV2,
|
|
107
111
|
CardSearch,
|
|
112
|
+
CardStateChangeScheduledTaskRequest,
|
|
108
113
|
CardTypeResponse,
|
|
109
114
|
CardTypesConfig,
|
|
110
115
|
CardTypeSearchRequest,
|