@pax2pay/client 0.0.58 → 0.0.59

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.
Files changed (37) hide show
  1. package/dist/index.d.ts +2 -2
  2. package/dist/index.js +2 -2
  3. package/dist/index.js.map +1 -1
  4. package/dist/model/CardFundingAccountResponse.d.ts +3 -0
  5. package/dist/model/CardFundingAccountResponse.js +29 -1
  6. package/dist/model/CardFundingAccountResponse.js.map +1 -1
  7. package/dist/model/CardResponseV2.d.ts +4 -1
  8. package/dist/model/CardResponseV2.js +23 -1
  9. package/dist/model/CardResponseV2.js.map +1 -1
  10. package/dist/model/CardTypeSpecification.d.ts +5 -1
  11. package/dist/model/CardTypeSpecification.js +20 -1
  12. package/dist/model/CardTypeSpecification.js.map +1 -1
  13. package/dist/model/CardTypeSpecificationFlag.d.ts +6 -0
  14. package/dist/model/CardTypeSpecificationFlag.js +9 -0
  15. package/dist/model/CardTypeSpecificationFlag.js.map +1 -0
  16. package/dist/model/CardUsage.d.ts +3 -0
  17. package/dist/model/CardUsage.js +7 -1
  18. package/dist/model/CardUsage.js.map +1 -1
  19. package/dist/model/ProviderCode.d.ts +6 -1
  20. package/dist/model/ProviderCode.js +8 -1
  21. package/dist/model/ProviderCode.js.map +1 -1
  22. package/dist/model/ProviderResponse.d.ts +3 -0
  23. package/dist/model/ProviderResponse.js +12 -1
  24. package/dist/model/ProviderResponse.js.map +1 -1
  25. package/dist/model/index.d.ts +2 -1
  26. package/dist/model/index.js +7 -1
  27. package/dist/model/index.js.map +1 -1
  28. package/index.ts +2 -0
  29. package/model/CardFundingAccountResponse.ts +27 -0
  30. package/model/CardResponseV2.ts +21 -1
  31. package/model/CardTypeSpecification.ts +23 -1
  32. package/model/CardTypeSpecificationFlag.ts +8 -0
  33. package/model/CardUsage.ts +6 -0
  34. package/model/ProviderCode.ts +8 -1
  35. package/model/ProviderResponse.ts +12 -0
  36. package/model/index.ts +2 -0
  37. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import { Client } from "./Client";
2
- import { AccountCreationRequest, AccountResponse, AccountSearchRequest, AddressInfo, AgentBookingInfo, AmendCardRequest, BeneficiaryRequest, BeneficiaryResponse, BookedProductInfo, BookingInfo, BookingInfoRequest, BookingInfoResponse, CardAmendmentScheduledTaskRequest, CardDeliveryRequest, CardFundingAccountResponse, CardOptionSearch, CardResponse, CardResponseV2, CardScheduleTaskType, CardSearch, CardStateChangeDesiredState, 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, Passengers, PasswordChangeRequest, PasswordValidateRequest, PasswordValidateResponse, Payload, PaymentMethodOptionResponse, PaymentOption, ProcessedStatement, ProviderCode, ProviderResponse, References, RelogWithNewSessionDetailsRequest, Report, RoleResponse, RolesetResponse, ScheduledTaskRequest, SearchRolesetsRequest, Sorting, SupplierBookingInfo, TransactionResponse, TransactionType, TransferDestinationInfo, TransferRequest, TransferResponse, TransferSearch, TravelPartyInfo, TwoFactorAuthenticationDetails, TwoFactorAuthenticationRegistrationResponse, UpdateAccountRequest, UpdateBeneficiaryRequest, UpdateRolesetRequest, UserChangeRequest, UserConfig, UserLimit, UserLimitsDeleteRequest, UserLimitsRequest, UserRequest, UserResponse, UserRoleResponse, UserSearchRequest } from "./model";
3
- export { Client, AccountCreationRequest, AccountResponse, AccountSearchRequest, AddressInfo, AgentBookingInfo, AmendCardRequest, BeneficiaryRequest, BeneficiaryResponse, BookedProductInfo, BookingInfo, BookingInfoRequest, BookingInfoResponse, CardAmendmentScheduledTaskRequest, CardDeliveryRequest, CardFundingAccountResponse, CardOptionSearch, CardResponse, CardResponseV2, CardScheduleTaskType, CardSearch, CardStateChangeDesiredState, 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, Passengers, PasswordChangeRequest, PasswordValidateRequest, PasswordValidateResponse, Payload, PaymentMethodOptionResponse, PaymentOption, ProcessedStatement, ProviderResponse, References, RelogWithNewSessionDetailsRequest, Report, RoleResponse, RolesetResponse, ScheduledTaskRequest, 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, };
2
+ import { AccountCreationRequest, AccountResponse, AccountSearchRequest, AddressInfo, AgentBookingInfo, AmendCardRequest, BeneficiaryRequest, BeneficiaryResponse, BookedProductInfo, BookingInfo, BookingInfoRequest, BookingInfoResponse, CardAmendmentScheduledTaskRequest, CardDeliveryRequest, CardFundingAccountResponse, CardOptionSearch, CardResponse, CardResponseV2, CardScheduleTaskType, CardSearch, CardStateChangeDesiredState, CardStateChangeScheduledTaskRequest, CardTypeResponse, CardTypesConfig, CardTypeSearchRequest, CardTypeSpecification, CardTypeSpecificationFlag, 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, Passengers, PasswordChangeRequest, PasswordValidateRequest, PasswordValidateResponse, Payload, PaymentMethodOptionResponse, PaymentOption, ProcessedStatement, ProviderCode, ProviderResponse, References, RelogWithNewSessionDetailsRequest, Report, RoleResponse, RolesetResponse, ScheduledTaskRequest, SearchRolesetsRequest, Sorting, SupplierBookingInfo, TransactionResponse, TransactionType, TransferDestinationInfo, TransferRequest, TransferResponse, TransferSearch, TravelPartyInfo, TwoFactorAuthenticationDetails, TwoFactorAuthenticationRegistrationResponse, UpdateAccountRequest, UpdateBeneficiaryRequest, UpdateRolesetRequest, UserChangeRequest, UserConfig, UserLimit, UserLimitsDeleteRequest, UserLimitsRequest, UserRequest, UserResponse, UserRoleResponse, UserSearchRequest } from "./model";
3
+ export { Client, AccountCreationRequest, AccountResponse, AccountSearchRequest, AddressInfo, AgentBookingInfo, AmendCardRequest, BeneficiaryRequest, BeneficiaryResponse, BookedProductInfo, BookingInfo, BookingInfoRequest, BookingInfoResponse, CardAmendmentScheduledTaskRequest, CardDeliveryRequest, CardFundingAccountResponse, CardOptionSearch, CardResponse, CardResponseV2, CardScheduleTaskType, CardSearch, CardStateChangeDesiredState, CardStateChangeScheduledTaskRequest, CardTypeResponse, CardTypesConfig, CardTypeSearchRequest, CardTypeSpecification, CardTypeSpecificationFlag, 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, Passengers, PasswordChangeRequest, PasswordValidateRequest, PasswordValidateResponse, Payload, PaymentMethodOptionResponse, PaymentOption, ProcessedStatement, ProviderResponse, References, RelogWithNewSessionDetailsRequest, Report, RoleResponse, RolesetResponse, ScheduledTaskRequest, 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/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { Client } from "./Client";
2
- import { ErrorMessageDto, ErrorResponse, Issue, LoginResponse, OrganisationBalanceLimitResponse, OrganisationResponse, UserResponse, } from "./model";
3
- export { Client, ErrorMessageDto, ErrorResponse, Issue, LoginResponse, OrganisationBalanceLimitResponse, OrganisationResponse, UserResponse, };
2
+ import { CardFundingAccountResponse, CardResponseV2, CardTypeSpecification, CardTypeSpecificationFlag, ErrorMessageDto, ErrorResponse, Issue, LoginResponse, OrganisationBalanceLimitResponse, OrganisationResponse, ProviderCode, ProviderResponse, UserResponse, } from "./model";
3
+ export { Client, CardFundingAccountResponse, CardResponseV2, CardTypeSpecification, CardTypeSpecificationFlag, ErrorMessageDto, ErrorResponse, Issue, LoginResponse, OrganisationBalanceLimitResponse, OrganisationResponse, ProviderResponse, UserResponse, ProviderCode, };
4
4
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAsCN,eAAe,EACf,aAAa,EAYb,KAAK,EAGL,aAAa,EAEb,gCAAgC,EAGhC,oBAAoB,EAsCpB,YAAY,GAGZ,MAAM,SAAS,CAAA;AAEhB,OAAO,EACN,MAAM,EAsCN,eAAe,EACf,aAAa,EAYb,KAAK,EAGL,aAAa,EAEb,gCAAgC,EAGhC,oBAAoB,EAqCpB,YAAY,GAIZ,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAeN,0BAA0B,EAG1B,cAAc,EAQd,qBAAqB,EACrB,yBAAyB,EAYzB,eAAe,EACf,aAAa,EAYb,KAAK,EAGL,aAAa,EAEb,gCAAgC,EAGhC,oBAAoB,EASpB,YAAY,EACZ,gBAAgB,EA4BhB,YAAY,GAGZ,MAAM,SAAS,CAAA;AAEhB,OAAO,EACN,MAAM,EAeN,0BAA0B,EAG1B,cAAc,EAQd,qBAAqB,EACrB,yBAAyB,EAYzB,eAAe,EACf,aAAa,EAYb,KAAK,EAGL,aAAa,EAEb,gCAAgC,EAGhC,oBAAoB,EASpB,gBAAgB,EA4BhB,YAAY,EAGZ,YAAY,GACZ,CAAA"}
@@ -14,3 +14,6 @@ export interface CardFundingAccountResponse {
14
14
  updatedOn: isoly.Date;
15
15
  createdOn: isoly.Date;
16
16
  }
17
+ export declare namespace CardFundingAccountResponse {
18
+ function is(value: CardFundingAccountResponse | any): value is CardFundingAccountResponse;
19
+ }
@@ -1,2 +1,30 @@
1
- export {};
1
+ import * as isoly from "isoly";
2
+ import { ProviderResponse } from ".";
3
+ import { OrganisationResponse } from "./OrganisationResponse";
4
+ export var CardFundingAccountResponse;
5
+ (function (CardFundingAccountResponse) {
6
+ function is(value) {
7
+ return (typeof value == "object" &&
8
+ typeof value.id == "number" &&
9
+ typeof value.providerAccountId == "string" &&
10
+ ProviderResponse.is(value.provider) &&
11
+ OrganisationResponse.is(value.organisation) &&
12
+ isoly.Currency.is(value.currency) &&
13
+ (value.state == "ACTIVE" ||
14
+ value.state == "INACTIVE" ||
15
+ value.state == "CLOSED" ||
16
+ value.state == "DELETED" ||
17
+ value.state == "EXPIRED" ||
18
+ value.state == "PENDING" ||
19
+ value.state == "APPROVED" ||
20
+ value.state == "DECLINED" ||
21
+ value.state == "GENERATED") &&
22
+ typeof value.friendlyName == "string" &&
23
+ typeof value.balance == "number" &&
24
+ (value.accountType == "FUNDING" || value.accountType == "CARD") &&
25
+ isoly.Date.is(value.updatedOn) &&
26
+ isoly.Date.is(value.createdOn));
27
+ }
28
+ CardFundingAccountResponse.is = is;
29
+ })(CardFundingAccountResponse || (CardFundingAccountResponse = {}));
2
30
  //# sourceMappingURL=CardFundingAccountResponse.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardFundingAccountResponse.js","sourceRoot":"../","sources":["model/CardFundingAccountResponse.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"CardFundingAccountResponse.js","sourceRoot":"../","sources":["model/CardFundingAccountResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAA;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAkB7D,MAAM,KAAW,0BAA0B,CAyB1C;AAzBD,WAAiB,0BAA0B;IAC1C,SAAgB,EAAE,CAAC,KAAuC;QACzD,OAAO,CACN,OAAO,KAAK,IAAI,QAAQ;YACxB,OAAO,KAAK,CAAC,EAAE,IAAI,QAAQ;YAC3B,OAAO,KAAK,CAAC,iBAAiB,IAAI,QAAQ;YAC1C,gBAAgB,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC;YACnC,oBAAoB,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC;YAC3C,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC;YACjC,CAAC,KAAK,CAAC,KAAK,IAAI,QAAQ;gBACvB,KAAK,CAAC,KAAK,IAAI,UAAU;gBACzB,KAAK,CAAC,KAAK,IAAI,QAAQ;gBACvB,KAAK,CAAC,KAAK,IAAI,SAAS;gBACxB,KAAK,CAAC,KAAK,IAAI,SAAS;gBACxB,KAAK,CAAC,KAAK,IAAI,SAAS;gBACxB,KAAK,CAAC,KAAK,IAAI,UAAU;gBACzB,KAAK,CAAC,KAAK,IAAI,UAAU;gBACzB,KAAK,CAAC,KAAK,IAAI,WAAW,CAAC;YAC5B,OAAO,KAAK,CAAC,YAAY,IAAI,QAAQ;YACrC,OAAO,KAAK,CAAC,OAAO,IAAI,QAAQ;YAChC,CAAC,KAAK,CAAC,WAAW,IAAI,SAAS,IAAI,KAAK,CAAC,WAAW,IAAI,MAAM,CAAC;YAC/D,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC;YAC9B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,CAC9B,CAAA;IACF,CAAC;IAvBe,6BAAE,KAuBjB,CAAA;AACF,CAAC,EAzBgB,0BAA0B,KAA1B,0BAA0B,QAyB1C"}
@@ -6,7 +6,7 @@ export interface CardResponseV2 {
6
6
  cardType?: CardTypeSpecification | string;
7
7
  cardNumber?: string;
8
8
  cvv?: string;
9
- expiryDate?: any;
9
+ expiryDate?: string;
10
10
  nameOnCard?: string;
11
11
  balance?: number;
12
12
  issueDate?: string;
@@ -16,3 +16,6 @@ export interface CardResponseV2 {
16
16
  fundingAccount?: CardFundingAccountResponse;
17
17
  createdBy?: string;
18
18
  }
19
+ export declare namespace CardResponseV2 {
20
+ function is(value: CardResponseV2 | any): value is CardResponseV2;
21
+ }
@@ -1,2 +1,24 @@
1
- export {};
1
+ import { CardFundingAccountResponse } from "./CardFundingAccountResponse";
2
+ import { CardTypeSpecification } from "./CardTypeSpecification";
3
+ import { CardUsage } from "./CardUsage";
4
+ import { ProviderCode } from "./ProviderCode";
5
+ export var CardResponseV2;
6
+ (function (CardResponseV2) {
7
+ function is(value) {
8
+ return (typeof value == "object" &&
9
+ (value.cardType == undefined || typeof value.cardType == "string" || CardTypeSpecification.is(value.cardType)) &&
10
+ (value.cardNumber == undefined || typeof value.cardNumber == "string") &&
11
+ (value.cvv == undefined || typeof value.cvv == "string") &&
12
+ (value.expiryDate == undefined || typeof value.expiryDate == "string") &&
13
+ (value.nameOnCard == undefined || typeof value.nameOnCard == "string") &&
14
+ (value.balance == undefined || typeof value.balance == "number") &&
15
+ (value.issueDate == undefined || typeof value.issueDate == "string") &&
16
+ (value.providerCode == undefined || ProviderCode.is(value.providerCode)) &&
17
+ (value.providerCardId == undefined || typeof value.providerCardId == "string") &&
18
+ (value.usage == undefined || CardUsage.is(value.usage)) &&
19
+ (value.fundingAccount == undefined || CardFundingAccountResponse.is(value.fundingAccount)) &&
20
+ (value.createdBy == undefined || typeof value.createdBy == "string"));
21
+ }
22
+ CardResponseV2.is = is;
23
+ })(CardResponseV2 || (CardResponseV2 = {}));
2
24
  //# sourceMappingURL=CardResponseV2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardResponseV2.js","sourceRoot":"../","sources":["model/CardResponseV2.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"CardResponseV2.js","sourceRoot":"../","sources":["model/CardResponseV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAA;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAiB7C,MAAM,KAAW,cAAc,CAkB9B;AAlBD,WAAiB,cAAc;IAC9B,SAAgB,EAAE,CAAC,KAA2B;QAC7C,OAAO,CACN,OAAO,KAAK,IAAI,QAAQ;YACxB,CAAC,KAAK,CAAC,QAAQ,IAAI,SAAS,IAAI,OAAO,KAAK,CAAC,QAAQ,IAAI,QAAQ,IAAI,qBAAqB,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YAC9G,CAAC,KAAK,CAAC,UAAU,IAAI,SAAS,IAAI,OAAO,KAAK,CAAC,UAAU,IAAI,QAAQ,CAAC;YACtE,CAAC,KAAK,CAAC,GAAG,IAAI,SAAS,IAAI,OAAO,KAAK,CAAC,GAAG,IAAI,QAAQ,CAAC;YACxD,CAAC,KAAK,CAAC,UAAU,IAAI,SAAS,IAAI,OAAO,KAAK,CAAC,UAAU,IAAI,QAAQ,CAAC;YACtE,CAAC,KAAK,CAAC,UAAU,IAAI,SAAS,IAAI,OAAO,KAAK,CAAC,UAAU,IAAI,QAAQ,CAAC;YACtE,CAAC,KAAK,CAAC,OAAO,IAAI,SAAS,IAAI,OAAO,KAAK,CAAC,OAAO,IAAI,QAAQ,CAAC;YAChE,CAAC,KAAK,CAAC,SAAS,IAAI,SAAS,IAAI,OAAO,KAAK,CAAC,SAAS,IAAI,QAAQ,CAAC;YACpE,CAAC,KAAK,CAAC,YAAY,IAAI,SAAS,IAAI,YAAY,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;YACxE,CAAC,KAAK,CAAC,cAAc,IAAI,SAAS,IAAI,OAAO,KAAK,CAAC,cAAc,IAAI,QAAQ,CAAC;YAC9E,CAAC,KAAK,CAAC,KAAK,IAAI,SAAS,IAAI,SAAS,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;YACvD,CAAC,KAAK,CAAC,cAAc,IAAI,SAAS,IAAI,0BAA0B,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;YAC1F,CAAC,KAAK,CAAC,SAAS,IAAI,SAAS,IAAI,OAAO,KAAK,CAAC,SAAS,IAAI,QAAQ,CAAC,CACpE,CAAA;IACF,CAAC;IAhBe,iBAAE,KAgBjB,CAAA;AACF,CAAC,EAlBgB,cAAc,KAAd,cAAc,QAkB9B"}
@@ -1,8 +1,12 @@
1
+ import { CardTypeSpecificationFlag } from "./CardTypeSpecificationFlag";
1
2
  export interface CardTypeSpecification {
2
3
  cardTypeId?: string;
3
4
  description?: string;
4
5
  scheme?: "VISA" | "MASTERCARD" | "AMERICAN_EXPRESS";
5
6
  funding?: "DEBIT" | "CREDIT" | "PREPAID";
6
- flags?: ("CORPORATE" | "BUSINESS" | "CONSUMER")[];
7
+ flags?: CardTypeSpecificationFlag[];
7
8
  bin?: string;
8
9
  }
10
+ export declare namespace CardTypeSpecification {
11
+ function is(value: CardTypeSpecification | any): value is CardTypeSpecification;
12
+ }
@@ -1,2 +1,21 @@
1
- export {};
1
+ import { CardTypeSpecificationFlag } from "./CardTypeSpecificationFlag";
2
+ export var CardTypeSpecification;
3
+ (function (CardTypeSpecification) {
4
+ function is(value) {
5
+ return (typeof value == "object" &&
6
+ (value.cardTypeId == undefined || typeof value.cardTypeId == "string") &&
7
+ (value.description == undefined || typeof value.description == "string") &&
8
+ (value.scheme == undefined ||
9
+ value.scheme == "VISA" ||
10
+ value.scheme == "MASTERCARD" ||
11
+ value.scheme == "AMERICAN_EXPRESS") &&
12
+ (value.funding == undefined ||
13
+ value.funding == "DEBIT" ||
14
+ value.funding == "CREDIT" ||
15
+ value.funding == "PREPAID") &&
16
+ (value.flags == undefined || (Array.isArray(value.flags) && value.flags.every(CardTypeSpecificationFlag.is))) &&
17
+ (value.bin == undefined || typeof value.bin == "string"));
18
+ }
19
+ CardTypeSpecification.is = is;
20
+ })(CardTypeSpecification || (CardTypeSpecification = {}));
2
21
  //# sourceMappingURL=CardTypeSpecification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardTypeSpecification.js","sourceRoot":"../","sources":["model/CardTypeSpecification.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"CardTypeSpecification.js","sourceRoot":"../","sources":["model/CardTypeSpecification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAcvE,MAAM,KAAW,qBAAqB,CAkBrC;AAlBD,WAAiB,qBAAqB;IACrC,SAAgB,EAAE,CAAC,KAAkC;QACpD,OAAO,CACN,OAAO,KAAK,IAAI,QAAQ;YACxB,CAAC,KAAK,CAAC,UAAU,IAAI,SAAS,IAAI,OAAO,KAAK,CAAC,UAAU,IAAI,QAAQ,CAAC;YACtE,CAAC,KAAK,CAAC,WAAW,IAAI,SAAS,IAAI,OAAO,KAAK,CAAC,WAAW,IAAI,QAAQ,CAAC;YACxE,CAAC,KAAK,CAAC,MAAM,IAAI,SAAS;gBACzB,KAAK,CAAC,MAAM,IAAI,MAAM;gBACtB,KAAK,CAAC,MAAM,IAAI,YAAY;gBAC5B,KAAK,CAAC,MAAM,IAAI,kBAAkB,CAAC;YACpC,CAAC,KAAK,CAAC,OAAO,IAAI,SAAS;gBAC1B,KAAK,CAAC,OAAO,IAAI,OAAO;gBACxB,KAAK,CAAC,OAAO,IAAI,QAAQ;gBACzB,KAAK,CAAC,OAAO,IAAI,SAAS,CAAC;YAC5B,CAAC,KAAK,CAAC,KAAK,IAAI,SAAS,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,yBAAyB,CAAC,EAAE,CAAC,CAAC,CAAC;YAC7G,CAAC,KAAK,CAAC,GAAG,IAAI,SAAS,IAAI,OAAO,KAAK,CAAC,GAAG,IAAI,QAAQ,CAAC,CACxD,CAAA;IACF,CAAC;IAhBe,wBAAE,KAgBjB,CAAA;AACF,CAAC,EAlBgB,qBAAqB,KAArB,qBAAqB,QAkBrC"}
@@ -0,0 +1,6 @@
1
+ declare const cardTypeSpecificationFlags: readonly ["CORPORATE", "BUSINESS", "CONSUMER"];
2
+ export declare type CardTypeSpecificationFlag = typeof cardTypeSpecificationFlags[number];
3
+ export declare namespace CardTypeSpecificationFlag {
4
+ function is(value: unknown): value is CardTypeSpecificationFlag;
5
+ }
6
+ export {};
@@ -0,0 +1,9 @@
1
+ const cardTypeSpecificationFlags = ["CORPORATE", "BUSINESS", "CONSUMER"];
2
+ export var CardTypeSpecificationFlag;
3
+ (function (CardTypeSpecificationFlag) {
4
+ function is(value) {
5
+ return value == "string" && cardTypeSpecificationFlags.includes(value);
6
+ }
7
+ CardTypeSpecificationFlag.is = is;
8
+ })(CardTypeSpecificationFlag || (CardTypeSpecificationFlag = {}));
9
+ //# sourceMappingURL=CardTypeSpecificationFlag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardTypeSpecificationFlag.js","sourceRoot":"../","sources":["model/CardTypeSpecificationFlag.ts"],"names":[],"mappings":"AAAA,MAAM,0BAA0B,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,UAAU,CAAU,CAAA;AAGjF,MAAM,KAAW,yBAAyB,CAIzC;AAJD,WAAiB,yBAAyB;IACzC,SAAgB,EAAE,CAAC,KAAc;QAChC,OAAO,KAAK,IAAI,QAAQ,IAAI,0BAA0B,CAAC,QAAQ,CAAC,KAAkC,CAAC,CAAA;IACpG,CAAC;IAFe,4BAAE,KAEjB,CAAA;AACF,CAAC,EAJgB,yBAAyB,KAAzB,yBAAyB,QAIzC"}
@@ -1 +1,4 @@
1
1
  export declare type CardUsage = "SINGLE_USE" | "MULTIPLE_USE" | "SINGLE_USE_ALLOW_TEST_AUTH";
2
+ export declare namespace CardUsage {
3
+ function is(value: CardUsage | any): value is CardUsage;
4
+ }
@@ -1,2 +1,8 @@
1
- export {};
1
+ export var CardUsage;
2
+ (function (CardUsage) {
3
+ function is(value) {
4
+ return value == "SINGLE_USE" || value == "MULTIPLE_USE" || value == "SINGLE_USE_ALLOW_TEST_AUTH";
5
+ }
6
+ CardUsage.is = is;
7
+ })(CardUsage || (CardUsage = {}));
2
8
  //# sourceMappingURL=CardUsage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardUsage.js","sourceRoot":"../","sources":["model/CardUsage.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"CardUsage.js","sourceRoot":"../","sources":["model/CardUsage.ts"],"names":[],"mappings":"AAEA,MAAM,KAAW,SAAS,CAIzB;AAJD,WAAiB,SAAS;IACzB,SAAgB,EAAE,CAAC,KAAsB;QACxC,OAAO,KAAK,IAAI,YAAY,IAAI,KAAK,IAAI,cAAc,IAAI,KAAK,IAAI,4BAA4B,CAAA;IACjG,CAAC;IAFe,YAAE,KAEjB,CAAA;AACF,CAAC,EAJgB,SAAS,KAAT,SAAS,QAIzB"}
@@ -1 +1,6 @@
1
- export declare type ProviderCode = "conferma" | "ixaris" | "wex" | "fake" | "lodged" | "modulr" | "unknown" | "pax2pay";
1
+ declare const providerCodes: readonly ["conferma", "ixaris", "wex", "fake", "lodged", "modulr", "unknown", "pax2pay"];
2
+ export declare type ProviderCode = typeof providerCodes[number];
3
+ export declare namespace ProviderCode {
4
+ function is(value: unknown): value is ProviderCode;
5
+ }
6
+ export {};
@@ -1,2 +1,9 @@
1
- export {};
1
+ const providerCodes = ["conferma", "ixaris", "wex", "fake", "lodged", "modulr", "unknown", "pax2pay"];
2
+ export var ProviderCode;
3
+ (function (ProviderCode) {
4
+ function is(value) {
5
+ return typeof value == "string" && providerCodes.includes(value);
6
+ }
7
+ ProviderCode.is = is;
8
+ })(ProviderCode || (ProviderCode = {}));
2
9
  //# sourceMappingURL=ProviderCode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProviderCode.js","sourceRoot":"../","sources":["model/ProviderCode.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"ProviderCode.js","sourceRoot":"../","sources":["model/ProviderCode.ts"],"names":[],"mappings":"AAAA,MAAM,aAAa,GAAG,CAAC,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAU,CAAA;AAG9G,MAAM,KAAW,YAAY,CAI5B;AAJD,WAAiB,YAAY;IAC5B,SAAgB,EAAE,CAAC,KAAc;QAChC,OAAO,OAAO,KAAK,IAAI,QAAQ,IAAI,aAAa,CAAC,QAAQ,CAAC,KAAqB,CAAC,CAAA;IACjF,CAAC;IAFe,eAAE,KAEjB,CAAA;AACF,CAAC,EAJgB,YAAY,KAAZ,YAAY,QAI5B"}
@@ -5,3 +5,6 @@ export interface ProviderResponse {
5
5
  name?: string;
6
6
  status?: "ACTIVE" | "DELETED" | "INACTIVE";
7
7
  }
8
+ export declare namespace ProviderResponse {
9
+ function is(value: ProviderResponse | any): value is ProviderResponse;
10
+ }
@@ -1,2 +1,13 @@
1
- export {};
1
+ import { ProviderCode } from "./ProviderCode";
2
+ export var ProviderResponse;
3
+ (function (ProviderResponse) {
4
+ function is(value) {
5
+ return (typeof value == "object" &&
6
+ (value.id == undefined || typeof value.id == "number") &&
7
+ (value.code == undefined || ProviderCode.is(value.code)) &&
8
+ (value.name == undefined || typeof value.name == "string") &&
9
+ (value.name == undefined || value.status == "ACTIVE" || value.status == "DELETED" || value.status == "INACTIVE"));
10
+ }
11
+ ProviderResponse.is = is;
12
+ })(ProviderResponse || (ProviderResponse = {}));
2
13
  //# sourceMappingURL=ProviderResponse.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProviderResponse.js","sourceRoot":"../","sources":["model/ProviderResponse.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"ProviderResponse.js","sourceRoot":"../","sources":["model/ProviderResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAY7C,MAAM,KAAW,gBAAgB,CAUhC;AAVD,WAAiB,gBAAgB;IAChC,SAAgB,EAAE,CAAC,KAA6B;QAC/C,OAAO,CACN,OAAO,KAAK,IAAI,QAAQ;YACxB,CAAC,KAAK,CAAC,EAAE,IAAI,SAAS,IAAI,OAAO,KAAK,CAAC,EAAE,IAAI,QAAQ,CAAC;YACtD,CAAC,KAAK,CAAC,IAAI,IAAI,SAAS,IAAI,YAAY,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YACxD,CAAC,KAAK,CAAC,IAAI,IAAI,SAAS,IAAI,OAAO,KAAK,CAAC,IAAI,IAAI,QAAQ,CAAC;YAC1D,CAAC,KAAK,CAAC,IAAI,IAAI,SAAS,IAAI,KAAK,CAAC,MAAM,IAAI,QAAQ,IAAI,KAAK,CAAC,MAAM,IAAI,SAAS,IAAI,KAAK,CAAC,MAAM,IAAI,UAAU,CAAC,CAChH,CAAA;IACF,CAAC;IARe,mBAAE,KAQjB,CAAA;AACF,CAAC,EAVgB,gBAAgB,KAAhB,gBAAgB,QAUhC"}
@@ -24,6 +24,7 @@ import { CardTypeResponse } from "./CardTypeResponse";
24
24
  import { CardTypesConfig } from "./CardTypesConfig";
25
25
  import { CardTypeSearchRequest } from "./CardTypeSearchRequest";
26
26
  import { CardTypeSpecification } from "./CardTypeSpecification";
27
+ import { CardTypeSpecificationFlag } from "./CardTypeSpecificationFlag";
27
28
  import { ConfigMatchesRequest } from "./ConfigMatchesRequest";
28
29
  import { ConfigMatchesResponse } from "./ConfigMatchesResponse";
29
30
  import { ConfigRequest } from "./ConfigRequest";
@@ -97,4 +98,4 @@ import { UserRequest } from "./UserRequest";
97
98
  import { UserResponse } from "./UserResponse";
98
99
  import { UserRoleResponse } from "./UserRoleResponse";
99
100
  import { UserSearchRequest } from "./UserSearchRequest";
100
- export { AccountCreationRequest, AccountResponse, AccountSearchRequest, AddressInfo, AgentBookingInfo, AmendCardRequest, BeneficiaryRequest, BeneficiaryResponse, BookedProductInfo, BookingInfo, BookingInfoRequest, BookingInfoResponse, CardAmendmentScheduledTaskRequest, CardDeliveryRequest, CardFundingAccountResponse, CardOptionSearch, CardResponse, CardResponseV2, CardScheduleTaskType, CardSearch, CardStateChangeDesiredState, 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, Passengers, PasswordChangeRequest, PasswordValidateRequest, PasswordValidateResponse, Payload, PaymentMethodOptionResponse, PaymentOption, ProcessedStatement, ProviderResponse, References, RelogWithNewSessionDetailsRequest, Report, RoleResponse, RolesetResponse, ScheduledTaskRequest, 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, };
101
+ export { AccountCreationRequest, AccountResponse, AccountSearchRequest, AddressInfo, AgentBookingInfo, AmendCardRequest, BeneficiaryRequest, BeneficiaryResponse, BookedProductInfo, BookingInfo, BookingInfoRequest, BookingInfoResponse, CardAmendmentScheduledTaskRequest, CardDeliveryRequest, CardFundingAccountResponse, CardOptionSearch, CardResponse, CardResponseV2, CardScheduleTaskType, CardSearch, CardStateChangeDesiredState, CardStateChangeScheduledTaskRequest, CardTypeResponse, CardTypesConfig, CardTypeSearchRequest, CardTypeSpecification, CardTypeSpecificationFlag, 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, Passengers, PasswordChangeRequest, PasswordValidateRequest, PasswordValidateResponse, Payload, PaymentMethodOptionResponse, PaymentOption, ProcessedStatement, ProviderResponse, References, RelogWithNewSessionDetailsRequest, Report, RoleResponse, RolesetResponse, ScheduledTaskRequest, 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, };
@@ -1,9 +1,15 @@
1
+ import { CardFundingAccountResponse } from "./CardFundingAccountResponse";
2
+ import { CardResponseV2 } from "./CardResponseV2";
3
+ import { CardTypeSpecification } from "./CardTypeSpecification";
4
+ import { CardTypeSpecificationFlag } from "./CardTypeSpecificationFlag";
1
5
  import { ErrorMessageDto } from "./ErrorMessageDto";
2
6
  import { ErrorResponse } from "./ErrorResponse";
3
7
  import { Issue } from "./Issue";
4
8
  import { LoginResponse } from "./LoginResponse";
5
9
  import { OrganisationBalanceLimitResponse } from "./OrganisationBalanceLimitResponse";
6
10
  import { OrganisationResponse } from "./OrganisationResponse";
11
+ import { ProviderCode } from "./ProviderCode";
12
+ import { ProviderResponse } from "./ProviderResponse";
7
13
  import { UserResponse } from "./UserResponse";
8
- export { ErrorMessageDto, ErrorResponse, Issue, LoginResponse, OrganisationBalanceLimitResponse, OrganisationResponse, UserResponse, };
14
+ export { CardFundingAccountResponse, CardResponseV2, CardTypeSpecification, CardTypeSpecificationFlag, ErrorMessageDto, ErrorResponse, Issue, LoginResponse, OrganisationBalanceLimitResponse, OrganisationResponse, ProviderResponse, UserResponse, ProviderCode, };
9
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["model/index.ts"],"names":[],"mappings":"AAqCA,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;AAsC7D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAI7C,OAAO,EAsCN,eAAe,EACf,aAAa,EAYb,KAAK,EAGL,aAAa,EAEb,gCAAgC,EAGhC,oBAAoB,EAqCpB,YAAY,GAIZ,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../","sources":["model/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAA;AAGzE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAQjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAYvE,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;AAS7D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AA4BrD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAI7C,OAAO,EAeN,0BAA0B,EAG1B,cAAc,EAQd,qBAAqB,EACrB,yBAAyB,EAYzB,eAAe,EACf,aAAa,EAYb,KAAK,EAGL,aAAa,EAEb,gCAAgC,EAGhC,oBAAoB,EASpB,gBAAgB,EA4BhB,YAAY,EAGZ,YAAY,GACZ,CAAA"}
package/index.ts CHANGED
@@ -26,6 +26,7 @@ import {
26
26
  CardTypesConfig,
27
27
  CardTypeSearchRequest,
28
28
  CardTypeSpecification,
29
+ CardTypeSpecificationFlag,
29
30
  ConfigMatchesRequest,
30
31
  ConfigMatchesResponse,
31
32
  ConfigRequest,
@@ -129,6 +130,7 @@ export {
129
130
  CardTypesConfig,
130
131
  CardTypeSearchRequest,
131
132
  CardTypeSpecification,
133
+ CardTypeSpecificationFlag,
132
134
  ConfigMatchesRequest,
133
135
  ConfigMatchesResponse,
134
136
  ConfigRequest,
@@ -17,3 +17,30 @@ export interface CardFundingAccountResponse {
17
17
  updatedOn: isoly.Date
18
18
  createdOn: isoly.Date
19
19
  }
20
+
21
+ export namespace CardFundingAccountResponse {
22
+ export function is(value: CardFundingAccountResponse | any): value is CardFundingAccountResponse {
23
+ return (
24
+ typeof value == "object" &&
25
+ typeof value.id == "number" &&
26
+ typeof value.providerAccountId == "string" &&
27
+ ProviderResponse.is(value.provider) &&
28
+ OrganisationResponse.is(value.organisation) &&
29
+ isoly.Currency.is(value.currency) &&
30
+ (value.state == "ACTIVE" ||
31
+ value.state == "INACTIVE" ||
32
+ value.state == "CLOSED" ||
33
+ value.state == "DELETED" ||
34
+ value.state == "EXPIRED" ||
35
+ value.state == "PENDING" ||
36
+ value.state == "APPROVED" ||
37
+ value.state == "DECLINED" ||
38
+ value.state == "GENERATED") &&
39
+ typeof value.friendlyName == "string" &&
40
+ typeof value.balance == "number" &&
41
+ (value.accountType == "FUNDING" || value.accountType == "CARD") &&
42
+ isoly.Date.is(value.updatedOn) &&
43
+ isoly.Date.is(value.createdOn)
44
+ )
45
+ }
46
+ }
@@ -7,7 +7,7 @@ export interface CardResponseV2 {
7
7
  cardType?: CardTypeSpecification | string
8
8
  cardNumber?: string
9
9
  cvv?: string
10
- expiryDate?: any
10
+ expiryDate?: string
11
11
  nameOnCard?: string
12
12
  balance?: number
13
13
  issueDate?: string
@@ -17,3 +17,23 @@ export interface CardResponseV2 {
17
17
  fundingAccount?: CardFundingAccountResponse
18
18
  createdBy?: string
19
19
  }
20
+
21
+ export namespace CardResponseV2 {
22
+ export function is(value: CardResponseV2 | any): value is CardResponseV2 {
23
+ return (
24
+ typeof value == "object" &&
25
+ (value.cardType == undefined || typeof value.cardType == "string" || CardTypeSpecification.is(value.cardType)) &&
26
+ (value.cardNumber == undefined || typeof value.cardNumber == "string") &&
27
+ (value.cvv == undefined || typeof value.cvv == "string") &&
28
+ (value.expiryDate == undefined || typeof value.expiryDate == "string") &&
29
+ (value.nameOnCard == undefined || typeof value.nameOnCard == "string") &&
30
+ (value.balance == undefined || typeof value.balance == "number") &&
31
+ (value.issueDate == undefined || typeof value.issueDate == "string") &&
32
+ (value.providerCode == undefined || ProviderCode.is(value.providerCode)) &&
33
+ (value.providerCardId == undefined || typeof value.providerCardId == "string") &&
34
+ (value.usage == undefined || CardUsage.is(value.usage)) &&
35
+ (value.fundingAccount == undefined || CardFundingAccountResponse.is(value.fundingAccount)) &&
36
+ (value.createdBy == undefined || typeof value.createdBy == "string")
37
+ )
38
+ }
39
+ }
@@ -1,3 +1,5 @@
1
+ import { CardTypeSpecificationFlag } from "./CardTypeSpecificationFlag"
2
+
1
3
  /**
2
4
  * The card type to use in the card options requests.
3
5
  */
@@ -6,6 +8,26 @@ export interface CardTypeSpecification {
6
8
  description?: string
7
9
  scheme?: "VISA" | "MASTERCARD" | "AMERICAN_EXPRESS"
8
10
  funding?: "DEBIT" | "CREDIT" | "PREPAID"
9
- flags?: ("CORPORATE" | "BUSINESS" | "CONSUMER")[]
11
+ flags?: CardTypeSpecificationFlag[]
10
12
  bin?: string
11
13
  }
14
+
15
+ export namespace CardTypeSpecification {
16
+ export function is(value: CardTypeSpecification | any): value is CardTypeSpecification {
17
+ return (
18
+ typeof value == "object" &&
19
+ (value.cardTypeId == undefined || typeof value.cardTypeId == "string") &&
20
+ (value.description == undefined || typeof value.description == "string") &&
21
+ (value.scheme == undefined ||
22
+ value.scheme == "VISA" ||
23
+ value.scheme == "MASTERCARD" ||
24
+ value.scheme == "AMERICAN_EXPRESS") &&
25
+ (value.funding == undefined ||
26
+ value.funding == "DEBIT" ||
27
+ value.funding == "CREDIT" ||
28
+ value.funding == "PREPAID") &&
29
+ (value.flags == undefined || (Array.isArray(value.flags) && value.flags.every(CardTypeSpecificationFlag.is))) &&
30
+ (value.bin == undefined || typeof value.bin == "string")
31
+ )
32
+ }
33
+ }
@@ -0,0 +1,8 @@
1
+ const cardTypeSpecificationFlags = ["CORPORATE", "BUSINESS", "CONSUMER"] as const
2
+ export type CardTypeSpecificationFlag = typeof cardTypeSpecificationFlags[number]
3
+
4
+ export namespace CardTypeSpecificationFlag {
5
+ export function is(value: unknown): value is CardTypeSpecificationFlag {
6
+ return value == "string" && cardTypeSpecificationFlags.includes(value as CardTypeSpecificationFlag)
7
+ }
8
+ }
@@ -1 +1,7 @@
1
1
  export type CardUsage = "SINGLE_USE" | "MULTIPLE_USE" | "SINGLE_USE_ALLOW_TEST_AUTH"
2
+
3
+ export namespace CardUsage {
4
+ export function is(value: CardUsage | any): value is CardUsage {
5
+ return value == "SINGLE_USE" || value == "MULTIPLE_USE" || value == "SINGLE_USE_ALLOW_TEST_AUTH"
6
+ }
7
+ }
@@ -1 +1,8 @@
1
- export type ProviderCode = "conferma" | "ixaris" | "wex" | "fake" | "lodged" | "modulr" | "unknown" | "pax2pay"
1
+ const providerCodes = ["conferma", "ixaris", "wex", "fake", "lodged", "modulr", "unknown", "pax2pay"] as const
2
+ export type ProviderCode = typeof providerCodes[number]
3
+
4
+ export namespace ProviderCode {
5
+ export function is(value: unknown): value is ProviderCode {
6
+ return typeof value == "string" && providerCodes.includes(value as ProviderCode)
7
+ }
8
+ }
@@ -9,3 +9,15 @@ export interface ProviderResponse {
9
9
  name?: string
10
10
  status?: "ACTIVE" | "DELETED" | "INACTIVE"
11
11
  }
12
+
13
+ export namespace ProviderResponse {
14
+ export function is(value: ProviderResponse | any): value is ProviderResponse {
15
+ return (
16
+ typeof value == "object" &&
17
+ (value.id == undefined || typeof value.id == "number") &&
18
+ (value.code == undefined || ProviderCode.is(value.code)) &&
19
+ (value.name == undefined || typeof value.name == "string") &&
20
+ (value.name == undefined || value.status == "ACTIVE" || value.status == "DELETED" || value.status == "INACTIVE")
21
+ )
22
+ }
23
+ }
package/model/index.ts CHANGED
@@ -24,6 +24,7 @@ import { CardTypeResponse } from "./CardTypeResponse"
24
24
  import { CardTypesConfig } from "./CardTypesConfig"
25
25
  import { CardTypeSearchRequest } from "./CardTypeSearchRequest"
26
26
  import { CardTypeSpecification } from "./CardTypeSpecification"
27
+ import { CardTypeSpecificationFlag } from "./CardTypeSpecificationFlag"
27
28
  import { ConfigMatchesRequest } from "./ConfigMatchesRequest"
28
29
  import { ConfigMatchesResponse } from "./ConfigMatchesResponse"
29
30
  import { ConfigRequest } from "./ConfigRequest"
@@ -125,6 +126,7 @@ export {
125
126
  CardTypesConfig,
126
127
  CardTypeSearchRequest,
127
128
  CardTypeSpecification,
129
+ CardTypeSpecificationFlag,
128
130
  ConfigMatchesRequest,
129
131
  ConfigMatchesResponse,
130
132
  ConfigRequest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/client",
3
- "version": "0.0.58",
3
+ "version": "0.0.59",
4
4
  "description": "Client library for the Pax2Pay API",
5
5
  "author": "Pax2Pay Ltd.",
6
6
  "license": "MIT",