@pax2pay/client 0.0.58 → 0.0.63

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 (61) hide show
  1. package/.github/workflows/publish.yml +1 -1
  2. package/Client/Card/index.ts +2 -2
  3. package/dist/Client/Card/index.d.ts +2 -2
  4. package/dist/Client/Card/index.js.map +1 -1
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.js +2 -2
  7. package/dist/index.js.map +1 -1
  8. package/dist/model/CardFundingAccountResponse.d.ts +3 -0
  9. package/dist/model/CardFundingAccountResponse.js +29 -1
  10. package/dist/model/CardFundingAccountResponse.js.map +1 -1
  11. package/dist/model/CardResponseV2.d.ts +19 -13
  12. package/dist/model/CardResponseV2.js +27 -1
  13. package/dist/model/CardResponseV2.js.map +1 -1
  14. package/dist/model/CardScheduleResponse.d.ts +13 -0
  15. package/dist/model/CardScheduleResponse.js +16 -0
  16. package/dist/model/CardScheduleResponse.js.map +1 -0
  17. package/dist/model/CardScheduleTaskStatus.d.ts +6 -0
  18. package/dist/model/CardScheduleTaskStatus.js +19 -0
  19. package/dist/model/CardScheduleTaskStatus.js.map +1 -0
  20. package/dist/model/CardScheduleTaskType.d.ts +6 -1
  21. package/dist/model/CardScheduleTaskType.js +8 -1
  22. package/dist/model/CardScheduleTaskType.js.map +1 -1
  23. package/dist/model/CardTypeSpecification.d.ts +5 -1
  24. package/dist/model/CardTypeSpecification.js +20 -1
  25. package/dist/model/CardTypeSpecification.js.map +1 -1
  26. package/dist/model/CardTypeSpecificationFlag.d.ts +6 -0
  27. package/dist/model/CardTypeSpecificationFlag.js +9 -0
  28. package/dist/model/CardTypeSpecificationFlag.js.map +1 -0
  29. package/dist/model/CardUsage.d.ts +3 -0
  30. package/dist/model/CardUsage.js +7 -1
  31. package/dist/model/CardUsage.js.map +1 -1
  32. package/dist/model/FundingAccountResponseV2.d.ts +7 -0
  33. package/dist/model/FundingAccountResponseV2.js +8 -0
  34. package/dist/model/FundingAccountResponseV2.js.map +1 -0
  35. package/dist/model/ProviderCode.d.ts +6 -1
  36. package/dist/model/ProviderCode.js +8 -1
  37. package/dist/model/ProviderCode.js.map +1 -1
  38. package/dist/model/ProviderResponse.d.ts +3 -0
  39. package/dist/model/ProviderResponse.js +12 -1
  40. package/dist/model/ProviderResponse.js.map +1 -1
  41. package/dist/model/YearMonth.d.ts +7 -0
  42. package/dist/model/YearMonth.js +20 -0
  43. package/dist/model/YearMonth.js.map +1 -0
  44. package/dist/model/index.d.ts +6 -1
  45. package/dist/model/index.js +12 -1
  46. package/dist/model/index.js.map +1 -1
  47. package/index.ts +11 -1
  48. package/model/CardFundingAccountResponse.ts +27 -0
  49. package/model/CardResponseV2.ts +38 -13
  50. package/model/CardScheduleResponse.ts +24 -0
  51. package/model/CardScheduleTaskStatus.ts +18 -0
  52. package/model/CardScheduleTaskType.ts +8 -1
  53. package/model/CardTypeSpecification.ts +23 -1
  54. package/model/CardTypeSpecificationFlag.ts +8 -0
  55. package/model/CardUsage.ts +6 -0
  56. package/model/FundingAccountResponseV2.ts +10 -0
  57. package/model/ProviderCode.ts +8 -1
  58. package/model/ProviderResponse.ts +12 -0
  59. package/model/YearMonth.ts +16 -0
  60. package/model/index.ts +11 -1
  61. package/package.json +1 -1
@@ -18,7 +18,7 @@ jobs:
18
18
  - name: "Setup Node"
19
19
  uses: "actions/setup-node@v2"
20
20
  with:
21
- node-version: 15
21
+ node-version: 16
22
22
 
23
23
  - name: "Version Bump"
24
24
  id: version-bump
@@ -2,8 +2,8 @@ import * as model from "../../model"
2
2
  import { Connection } from "../Connection"
3
3
  import { Resource } from "../Resource"
4
4
 
5
- export class Card extends Resource<model.CardResponse, model.CreateCardRequest> {
6
- constructor(connection: Connection, folder: string, backend: model.CardResponse) {
5
+ export class Card extends Resource<model.CardResponse | model.CardResponseV2, model.CreateCardRequest> {
6
+ constructor(connection: Connection, folder: string, backend: model.CardResponse | model.CardResponseV2) {
7
7
  super(connection, folder, backend)
8
8
  }
9
9
  amend(
@@ -1,8 +1,8 @@
1
1
  import * as model from "../../model";
2
2
  import { Connection } from "../Connection";
3
3
  import { Resource } from "../Resource";
4
- export declare class Card extends Resource<model.CardResponse, model.CreateCardRequest> {
5
- constructor(connection: Connection, folder: string, backend: model.CardResponse);
4
+ export declare class Card extends Resource<model.CardResponse | model.CardResponseV2, model.CreateCardRequest> {
5
+ constructor(connection: Connection, folder: string, backend: model.CardResponse | model.CardResponseV2);
6
6
  amend(request: model.AmendCardRequest): Promise<model.CardResponse | (model.ErrorResponse & {
7
7
  status: 400 | 403 | 404 | 500 | 503;
8
8
  })>;
@@ -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,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"}
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,QAA4E;IACrG,YAAY,UAAsB,EAAE,MAAc,EAAE,OAAkD;QACrG,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"}
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, CardScheduleResponse, CardScheduleTaskStatus, 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, FundingAccountResponseV2, 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, YearMonth } from "./model";
3
+ export { Client, AccountCreationRequest, AccountResponse, AccountSearchRequest, AddressInfo, AgentBookingInfo, AmendCardRequest, BeneficiaryRequest, BeneficiaryResponse, BookedProductInfo, BookingInfo, BookingInfoRequest, BookingInfoResponse, CardAmendmentScheduledTaskRequest, CardDeliveryRequest, CardFundingAccountResponse, CardOptionSearch, CardResponse, CardResponseV2, CardScheduleResponse, CardScheduleTaskStatus, 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, FundingAccountResponseV2, 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, YearMonth, };
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, CardScheduleResponse, CardScheduleTaskStatus, CardScheduleTaskType, CardTypeSpecification, CardTypeSpecificationFlag, ErrorMessageDto, ErrorResponse, FundingAccountResponseV2, Issue, LoginResponse, OrganisationBalanceLimitResponse, OrganisationResponse, ProviderCode, ProviderResponse, UserResponse, YearMonth, } from "./model";
3
+ export { Client, CardFundingAccountResponse, CardResponseV2, CardScheduleResponse, CardScheduleTaskStatus, CardScheduleTaskType, CardTypeSpecification, CardTypeSpecificationFlag, ErrorMessageDto, ErrorResponse, FundingAccountResponseV2, Issue, LoginResponse, OrganisationBalanceLimitResponse, OrganisationResponse, ProviderCode, ProviderResponse, UserResponse, YearMonth, };
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,EACd,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EAOpB,qBAAqB,EACrB,yBAAyB,EAYzB,eAAe,EACf,aAAa,EAKb,wBAAwB,EAQxB,KAAK,EAGL,aAAa,EAEb,gCAAgC,EAGhC,oBAAoB,EASpB,YAAY,EACZ,gBAAgB,EA4BhB,YAAY,EAGZ,SAAS,GACT,MAAM,SAAS,CAAA;AAEhB,OAAO,EACN,MAAM,EAeN,0BAA0B,EAG1B,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EAOpB,qBAAqB,EACrB,yBAAyB,EAYzB,eAAe,EACf,aAAa,EAKb,wBAAwB,EAQxB,KAAK,EAGL,aAAa,EAEb,gCAAgC,EAGhC,oBAAoB,EASpB,YAAY,EACZ,gBAAgB,EA4BhB,YAAY,EAGZ,SAAS,GACT,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"}
@@ -1,18 +1,24 @@
1
- import { CardFundingAccountResponse } from "./CardFundingAccountResponse";
1
+ import { CardScheduleResponseItem } from "./CardScheduleResponse";
2
2
  import { CardTypeSpecification } from "./CardTypeSpecification";
3
3
  import { CardUsage } from "./CardUsage";
4
+ import { FundingAccountResponseV2 } from "./FundingAccountResponseV2";
4
5
  import { ProviderCode } from "./ProviderCode";
6
+ import { YearMonth } from "./YearMonth";
5
7
  export interface CardResponseV2 {
6
- cardType?: CardTypeSpecification | string;
7
- cardNumber?: string;
8
- cvv?: string;
9
- expiryDate?: any;
10
- nameOnCard?: string;
11
- balance?: number;
12
- issueDate?: string;
13
- providerCode?: ProviderCode;
14
- providerCardId?: string;
15
- usage?: CardUsage;
16
- fundingAccount?: CardFundingAccountResponse;
17
- createdBy?: string;
8
+ cardType: CardTypeSpecification | string;
9
+ cardNumber: string;
10
+ cvv: string;
11
+ expiryDate: YearMonth;
12
+ nameOnCard: string;
13
+ balance: number;
14
+ issueDate: string;
15
+ providerCode: ProviderCode;
16
+ providerCardId: string;
17
+ usage: CardUsage;
18
+ fundingAccount: FundingAccountResponseV2;
19
+ schedule: CardScheduleResponseItem[];
20
+ createdBy: string;
21
+ }
22
+ export declare namespace CardResponseV2 {
23
+ function is(value: CardResponseV2 | any): value is CardResponseV2;
18
24
  }
@@ -1,2 +1,28 @@
1
- export {};
1
+ import { CardScheduleResponseItem } from "./CardScheduleResponse";
2
+ import { CardTypeSpecification } from "./CardTypeSpecification";
3
+ import { CardUsage } from "./CardUsage";
4
+ import { FundingAccountResponseV2 } from "./FundingAccountResponseV2";
5
+ import { ProviderCode } from "./ProviderCode";
6
+ import { YearMonth } from "./YearMonth";
7
+ export var CardResponseV2;
8
+ (function (CardResponseV2) {
9
+ function is(value) {
10
+ return (typeof value == "object" &&
11
+ (typeof value.cardType == "string" || CardTypeSpecification.is(value.cardType)) &&
12
+ typeof value.cardNumber == "string" &&
13
+ typeof value.cvv == "string" &&
14
+ YearMonth.is(value.expiryDate) &&
15
+ typeof value.nameOnCard == "string" &&
16
+ typeof value.balance == "number" &&
17
+ typeof value.issueDate == "string" &&
18
+ ProviderCode.is(value.providerCode) &&
19
+ typeof value.providerCardId == "string" &&
20
+ CardUsage.is(value.usage) &&
21
+ FundingAccountResponseV2.is(value.fundingAccount) &&
22
+ Array.isArray(value.schedule) &&
23
+ value.schedule.every(CardScheduleResponseItem.is) &&
24
+ typeof value.createdBy == "string");
25
+ }
26
+ CardResponseV2.is = is;
27
+ })(CardResponseV2 || (CardResponseV2 = {}));
2
28
  //# 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,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAkBvC,MAAM,KAAW,cAAc,CAoB9B;AApBD,WAAiB,cAAc;IAC9B,SAAgB,EAAE,CAAC,KAA2B;QAC7C,OAAO,CACN,OAAO,KAAK,IAAI,QAAQ;YACxB,CAAC,OAAO,KAAK,CAAC,QAAQ,IAAI,QAAQ,IAAI,qBAAqB,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YAC/E,OAAO,KAAK,CAAC,UAAU,IAAI,QAAQ;YACnC,OAAO,KAAK,CAAC,GAAG,IAAI,QAAQ;YAC5B,SAAS,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC;YAC9B,OAAO,KAAK,CAAC,UAAU,IAAI,QAAQ;YACnC,OAAO,KAAK,CAAC,OAAO,IAAI,QAAQ;YAChC,OAAO,KAAK,CAAC,SAAS,IAAI,QAAQ;YAClC,YAAY,CAAC,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC;YACnC,OAAO,KAAK,CAAC,cAAc,IAAI,QAAQ;YACvC,SAAS,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;YACzB,wBAAwB,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC;YACjD,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC;YAC7B,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,wBAAwB,CAAC,EAAE,CAAC;YACjD,OAAO,KAAK,CAAC,SAAS,IAAI,QAAQ,CAClC,CAAA;IACF,CAAC;IAlBe,iBAAE,KAkBjB,CAAA;AACF,CAAC,EApBgB,cAAc,KAAd,cAAc,QAoB9B"}
@@ -0,0 +1,13 @@
1
+ import * as isoly from "isoly";
2
+ import { CardScheduleTaskStatus } from "./CardScheduleTaskStatus";
3
+ import { CardScheduleTaskType } from "./CardScheduleTaskType";
4
+ export interface CardScheduleResponseItem {
5
+ dueOn: isoly.DateTime;
6
+ status: CardScheduleTaskStatus;
7
+ statusText: string;
8
+ taskType: CardScheduleTaskType;
9
+ taskId: string;
10
+ }
11
+ export declare namespace CardScheduleResponseItem {
12
+ function is(value: CardScheduleResponseItem | any): value is CardScheduleResponseItem;
13
+ }
@@ -0,0 +1,16 @@
1
+ import * as isoly from "isoly";
2
+ import { CardScheduleTaskStatus } from "./CardScheduleTaskStatus";
3
+ import { CardScheduleTaskType } from "./CardScheduleTaskType";
4
+ export var CardScheduleResponseItem;
5
+ (function (CardScheduleResponseItem) {
6
+ function is(value) {
7
+ return (typeof value == "object" &&
8
+ isoly.DateTime.is(value.dueOn) &&
9
+ CardScheduleTaskStatus.is(value.status) &&
10
+ typeof value.statusText == "string" &&
11
+ CardScheduleTaskType.is(value.taskType) &&
12
+ typeof value.taskId == "string");
13
+ }
14
+ CardScheduleResponseItem.is = is;
15
+ })(CardScheduleResponseItem || (CardScheduleResponseItem = {}));
16
+ //# sourceMappingURL=CardScheduleResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardScheduleResponse.js","sourceRoot":"../","sources":["model/CardScheduleResponse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAU7D,MAAM,KAAW,wBAAwB,CAWxC;AAXD,WAAiB,wBAAwB;IACxC,SAAgB,EAAE,CAAC,KAAqC;QACvD,OAAO,CACN,OAAO,KAAK,IAAI,QAAQ;YACxB,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;YAC9B,sBAAsB,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;YACvC,OAAO,KAAK,CAAC,UAAU,IAAI,QAAQ;YACnC,oBAAoB,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC;YACvC,OAAO,KAAK,CAAC,MAAM,IAAI,QAAQ,CAC/B,CAAA;IACF,CAAC;IATe,2BAAE,KASjB,CAAA;AACF,CAAC,EAXgB,wBAAwB,KAAxB,wBAAwB,QAWxC"}
@@ -0,0 +1,6 @@
1
+ declare const cardScheduleTaskStatus: string[];
2
+ export declare type CardScheduleTaskStatus = typeof cardScheduleTaskStatus[number];
3
+ export declare namespace CardScheduleTaskStatus {
4
+ function is(value: unknown): value is CardScheduleTaskStatus;
5
+ }
6
+ export {};
@@ -0,0 +1,19 @@
1
+ const cardScheduleTaskStatus = [
2
+ "TODO",
3
+ "CANCELLED",
4
+ "CANCELLED_EXCEPTIONALLY",
5
+ "SUCCESSFUL",
6
+ "FAILED",
7
+ "FAILED_EXCEPTIONALLY",
8
+ "HALTED",
9
+ "PENDING",
10
+ "PENDING_DECLINED",
11
+ ];
12
+ export var CardScheduleTaskStatus;
13
+ (function (CardScheduleTaskStatus) {
14
+ function is(value) {
15
+ return typeof value == "string" && cardScheduleTaskStatus.includes(value);
16
+ }
17
+ CardScheduleTaskStatus.is = is;
18
+ })(CardScheduleTaskStatus || (CardScheduleTaskStatus = {}));
19
+ //# sourceMappingURL=CardScheduleTaskStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardScheduleTaskStatus.js","sourceRoot":"../","sources":["model/CardScheduleTaskStatus.ts"],"names":[],"mappings":"AAAA,MAAM,sBAAsB,GAAG;IAC9B,MAAM;IACN,WAAW;IACX,yBAAyB;IACzB,YAAY;IACZ,QAAQ;IACR,sBAAsB;IACtB,QAAQ;IACR,SAAS;IACT,kBAAkB;CAClB,CAAA;AAGD,MAAM,KAAW,sBAAsB,CAItC;AAJD,WAAiB,sBAAsB;IACtC,SAAgB,EAAE,CAAC,KAAc;QAChC,OAAO,OAAO,KAAK,IAAI,QAAQ,IAAI,sBAAsB,CAAC,QAAQ,CAAC,KAA+B,CAAC,CAAA;IACpG,CAAC;IAFe,yBAAE,KAEjB,CAAA;AACF,CAAC,EAJgB,sBAAsB,KAAtB,sBAAsB,QAItC"}
@@ -1 +1,6 @@
1
- export declare type CardScheduleTaskType = "CARD_AMENDMENT" | "CARD_STATE_CHANGE";
1
+ declare const cardScheduleTaskType: readonly ["CARD_AMENDMENT", "CARD_STATE_CHANGE"];
2
+ export declare type CardScheduleTaskType = typeof cardScheduleTaskType[number];
3
+ export declare namespace CardScheduleTaskType {
4
+ function is(value: unknown): value is CardScheduleTaskType;
5
+ }
6
+ export {};
@@ -1,2 +1,9 @@
1
- export {};
1
+ const cardScheduleTaskType = ["CARD_AMENDMENT", "CARD_STATE_CHANGE"];
2
+ export var CardScheduleTaskType;
3
+ (function (CardScheduleTaskType) {
4
+ function is(value) {
5
+ return typeof value == "string" && cardScheduleTaskType.includes(value);
6
+ }
7
+ CardScheduleTaskType.is = is;
8
+ })(CardScheduleTaskType || (CardScheduleTaskType = {}));
2
9
  //# sourceMappingURL=CardScheduleTaskType.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardScheduleTaskType.js","sourceRoot":"../","sources":["model/CardScheduleTaskType.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"CardScheduleTaskType.js","sourceRoot":"../","sources":["model/CardScheduleTaskType.ts"],"names":[],"mappings":"AAAA,MAAM,oBAAoB,GAAG,CAAC,gBAAgB,EAAE,mBAAmB,CAAU,CAAA;AAG7E,MAAM,KAAW,oBAAoB,CAIpC;AAJD,WAAiB,oBAAoB;IACpC,SAAgB,EAAE,CAAC,KAAc;QAChC,OAAO,OAAO,KAAK,IAAI,QAAQ,IAAI,oBAAoB,CAAC,QAAQ,CAAC,KAA6B,CAAC,CAAA;IAChG,CAAC;IAFe,uBAAE,KAEjB,CAAA;AACF,CAAC,EAJgB,oBAAoB,KAApB,oBAAoB,QAIpC"}
@@ -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"}
@@ -0,0 +1,7 @@
1
+ export interface FundingAccountResponseV2 {
2
+ providerAccountId: string;
3
+ balance: number;
4
+ }
5
+ export declare namespace FundingAccountResponseV2 {
6
+ function is(value: FundingAccountResponseV2 | any): value is FundingAccountResponseV2;
7
+ }
@@ -0,0 +1,8 @@
1
+ export var FundingAccountResponseV2;
2
+ (function (FundingAccountResponseV2) {
3
+ function is(value) {
4
+ return typeof value == "object" && typeof value.providerAccountId == "string" && typeof value.balance == "number";
5
+ }
6
+ FundingAccountResponseV2.is = is;
7
+ })(FundingAccountResponseV2 || (FundingAccountResponseV2 = {}));
8
+ //# sourceMappingURL=FundingAccountResponseV2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FundingAccountResponseV2.js","sourceRoot":"../","sources":["model/FundingAccountResponseV2.ts"],"names":[],"mappings":"AAKA,MAAM,KAAW,wBAAwB,CAIxC;AAJD,WAAiB,wBAAwB;IACxC,SAAgB,EAAE,CAAC,KAAqC;QACvD,OAAO,OAAO,KAAK,IAAI,QAAQ,IAAI,OAAO,KAAK,CAAC,iBAAiB,IAAI,QAAQ,IAAI,OAAO,KAAK,CAAC,OAAO,IAAI,QAAQ,CAAA;IAClH,CAAC;IAFe,2BAAE,KAEjB,CAAA;AACF,CAAC,EAJgB,wBAAwB,KAAxB,wBAAwB,QAIxC"}
@@ -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"}
@@ -0,0 +1,7 @@
1
+ export declare type YearMonth = string;
2
+ export declare namespace YearMonth {
3
+ function is(value: any | YearMonth): value is YearMonth;
4
+ function parse(value: YearMonth): Date;
5
+ function create(value: Date): YearMonth;
6
+ function now(): YearMonth;
7
+ }
@@ -0,0 +1,20 @@
1
+ export var YearMonth;
2
+ (function (YearMonth) {
3
+ function is(value) {
4
+ return typeof value == "string" && value.length == 7 && /^\d{4}-((0[1-9])|(1[0-2]))$/.test(value);
5
+ }
6
+ YearMonth.is = is;
7
+ function parse(value) {
8
+ return new Date(value + "28");
9
+ }
10
+ YearMonth.parse = parse;
11
+ function create(value) {
12
+ return value.toISOString().substring(0, 7);
13
+ }
14
+ YearMonth.create = create;
15
+ function now() {
16
+ return create(new Date());
17
+ }
18
+ YearMonth.now = now;
19
+ })(YearMonth || (YearMonth = {}));
20
+ //# sourceMappingURL=YearMonth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"YearMonth.js","sourceRoot":"../","sources":["model/YearMonth.ts"],"names":[],"mappings":"AAEA,MAAM,KAAW,SAAS,CAazB;AAbD,WAAiB,SAAS;IACzB,SAAgB,EAAE,CAAC,KAAsB;QACxC,OAAO,OAAO,KAAK,IAAI,QAAQ,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,6BAA6B,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAClG,CAAC;IAFe,YAAE,KAEjB,CAAA;IACD,SAAgB,KAAK,CAAC,KAAgB;QACrC,OAAO,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,CAAA;IAC9B,CAAC;IAFe,eAAK,QAEpB,CAAA;IACD,SAAgB,MAAM,CAAC,KAAW;QACjC,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAC3C,CAAC;IAFe,gBAAM,SAErB,CAAA;IACD,SAAgB,GAAG;QAClB,OAAO,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,CAAA;IAC1B,CAAC;IAFe,aAAG,MAElB,CAAA;AACF,CAAC,EAbgB,SAAS,KAAT,SAAS,QAazB"}
@@ -16,6 +16,8 @@ import { CardFundingAccountResponse } from "./CardFundingAccountResponse";
16
16
  import { CardOptionSearch } from "./CardOptionSearch";
17
17
  import { CardResponse } from "./CardResponse";
18
18
  import { CardResponseV2 } from "./CardResponseV2";
19
+ import { CardScheduleResponseItem } from "./CardScheduleResponse";
20
+ import { CardScheduleTaskStatus } from "./CardScheduleTaskStatus";
19
21
  import { CardScheduleTaskType } from "./CardScheduleTaskType";
20
22
  import { CardSearch } from "./CardSearch";
21
23
  import { CardStateChangeDesiredState } from "./CardStateChangeDesiredState";
@@ -24,6 +26,7 @@ import { CardTypeResponse } from "./CardTypeResponse";
24
26
  import { CardTypesConfig } from "./CardTypesConfig";
25
27
  import { CardTypeSearchRequest } from "./CardTypeSearchRequest";
26
28
  import { CardTypeSpecification } from "./CardTypeSpecification";
29
+ import { CardTypeSpecificationFlag } from "./CardTypeSpecificationFlag";
27
30
  import { ConfigMatchesRequest } from "./ConfigMatchesRequest";
28
31
  import { ConfigMatchesResponse } from "./ConfigMatchesResponse";
29
32
  import { ConfigRequest } from "./ConfigRequest";
@@ -41,6 +44,7 @@ import { FiveFieldsBookingInfoRequest } from "./FiveFieldsBookingInfoRequest";
41
44
  import { FiveFieldsBookingInfoResponse } from "./FiveFieldsBookingInfoResponse";
42
45
  import { FlightBookingInfoRequest } from "./FlightBookingInfoRequest";
43
46
  import { FundingAccountInboundTransferNotificationConfig } from "./FundingAccountInboundTransferNotificationConfig";
47
+ import { FundingAccountResponseV2 } from "./FundingAccountResponseV2";
44
48
  import { FundingAccountSearchRequest } from "./FundingAccountSearchRequest";
45
49
  import { FundingAccountSearchResponse } from "./FundingAccountSearchResponse";
46
50
  import { FundingLimitRequest } from "./FundingLimitRequest";
@@ -97,4 +101,5 @@ import { UserRequest } from "./UserRequest";
97
101
  import { UserResponse } from "./UserResponse";
98
102
  import { UserRoleResponse } from "./UserRoleResponse";
99
103
  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, };
104
+ import { YearMonth } from "./YearMonth";
105
+ export { AccountCreationRequest, AccountResponse, AccountSearchRequest, AddressInfo, AgentBookingInfo, AmendCardRequest, BeneficiaryRequest, BeneficiaryResponse, BookedProductInfo, BookingInfo, BookingInfoRequest, BookingInfoResponse, CardAmendmentScheduledTaskRequest, CardDeliveryRequest, CardFundingAccountResponse, CardOptionSearch, CardResponse, CardResponseV2, CardScheduleResponseItem as CardScheduleResponse, CardScheduleTaskStatus, 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, FundingAccountResponseV2, 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, YearMonth, };
@@ -1,9 +1,20 @@
1
+ import { CardFundingAccountResponse } from "./CardFundingAccountResponse";
2
+ import { CardResponseV2 } from "./CardResponseV2";
3
+ import { CardScheduleResponseItem } from "./CardScheduleResponse";
4
+ import { CardScheduleTaskStatus } from "./CardScheduleTaskStatus";
5
+ import { CardScheduleTaskType } from "./CardScheduleTaskType";
6
+ import { CardTypeSpecification } from "./CardTypeSpecification";
7
+ import { CardTypeSpecificationFlag } from "./CardTypeSpecificationFlag";
1
8
  import { ErrorMessageDto } from "./ErrorMessageDto";
2
9
  import { ErrorResponse } from "./ErrorResponse";
10
+ import { FundingAccountResponseV2 } from "./FundingAccountResponseV2";
3
11
  import { Issue } from "./Issue";
4
12
  import { LoginResponse } from "./LoginResponse";
5
13
  import { OrganisationBalanceLimitResponse } from "./OrganisationBalanceLimitResponse";
6
14
  import { OrganisationResponse } from "./OrganisationResponse";
15
+ import { ProviderCode } from "./ProviderCode";
16
+ import { ProviderResponse } from "./ProviderResponse";
7
17
  import { UserResponse } from "./UserResponse";
8
- export { ErrorMessageDto, ErrorResponse, Issue, LoginResponse, OrganisationBalanceLimitResponse, OrganisationResponse, UserResponse, };
18
+ import { YearMonth } from "./YearMonth";
19
+ export { CardFundingAccountResponse, CardResponseV2, CardScheduleResponseItem as CardScheduleResponse, CardScheduleTaskStatus, CardScheduleTaskType, CardTypeSpecification, CardTypeSpecificationFlag, ErrorMessageDto, ErrorResponse, FundingAccountResponseV2, Issue, LoginResponse, OrganisationBalanceLimitResponse, OrganisationResponse, ProviderCode, ProviderResponse, UserResponse, YearMonth, };
9
20
  //# 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;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAO7D,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;AAK/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AAQrE,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;AAG7C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,OAAO,EAeN,0BAA0B,EAG1B,cAAc,EACd,wBAAwB,IAAI,oBAAoB,EAChD,sBAAsB,EACtB,oBAAoB,EAOpB,qBAAqB,EACrB,yBAAyB,EAYzB,eAAe,EACf,aAAa,EAKb,wBAAwB,EAQxB,KAAK,EAGL,aAAa,EAEb,gCAAgC,EAGhC,oBAAoB,EASpB,YAAY,EACZ,gBAAgB,EA4BhB,YAAY,EAGZ,SAAS,GACT,CAAA"}
package/index.ts CHANGED
@@ -18,6 +18,8 @@ import {
18
18
  CardOptionSearch,
19
19
  CardResponse,
20
20
  CardResponseV2,
21
+ CardScheduleResponse,
22
+ CardScheduleTaskStatus,
21
23
  CardScheduleTaskType,
22
24
  CardSearch,
23
25
  CardStateChangeDesiredState,
@@ -26,6 +28,7 @@ import {
26
28
  CardTypesConfig,
27
29
  CardTypeSearchRequest,
28
30
  CardTypeSpecification,
31
+ CardTypeSpecificationFlag,
29
32
  ConfigMatchesRequest,
30
33
  ConfigMatchesResponse,
31
34
  ConfigRequest,
@@ -43,6 +46,7 @@ import {
43
46
  FiveFieldsBookingInfoResponse,
44
47
  FlightBookingInfoRequest,
45
48
  FundingAccountInboundTransferNotificationConfig,
49
+ FundingAccountResponseV2,
46
50
  FundingAccountSearchRequest,
47
51
  FundingAccountSearchResponse,
48
52
  FundingLimitRequest,
@@ -99,6 +103,7 @@ import {
99
103
  UserResponse,
100
104
  UserRoleResponse,
101
105
  UserSearchRequest,
106
+ YearMonth,
102
107
  } from "./model"
103
108
 
104
109
  export {
@@ -121,6 +126,8 @@ export {
121
126
  CardOptionSearch,
122
127
  CardResponse,
123
128
  CardResponseV2,
129
+ CardScheduleResponse,
130
+ CardScheduleTaskStatus,
124
131
  CardScheduleTaskType,
125
132
  CardSearch,
126
133
  CardStateChangeDesiredState,
@@ -129,6 +136,7 @@ export {
129
136
  CardTypesConfig,
130
137
  CardTypeSearchRequest,
131
138
  CardTypeSpecification,
139
+ CardTypeSpecificationFlag,
132
140
  ConfigMatchesRequest,
133
141
  ConfigMatchesResponse,
134
142
  ConfigRequest,
@@ -146,6 +154,7 @@ export {
146
154
  FiveFieldsBookingInfoResponse,
147
155
  FlightBookingInfoRequest,
148
156
  FundingAccountInboundTransferNotificationConfig,
157
+ FundingAccountResponseV2,
149
158
  FundingAccountSearchRequest,
150
159
  FundingAccountSearchResponse,
151
160
  FundingLimitRequest,
@@ -170,6 +179,7 @@ export {
170
179
  PaymentMethodOptionResponse,
171
180
  PaymentOption,
172
181
  ProcessedStatement,
182
+ ProviderCode,
173
183
  ProviderResponse,
174
184
  References,
175
185
  RelogWithNewSessionDetailsRequest,
@@ -201,5 +211,5 @@ export {
201
211
  UserResponse,
202
212
  UserRoleResponse,
203
213
  UserSearchRequest,
204
- ProviderCode,
214
+ YearMonth,
205
215
  }
@@ -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
+ }
@@ -1,19 +1,44 @@
1
- import { CardFundingAccountResponse } from "./CardFundingAccountResponse"
1
+ import { CardScheduleResponseItem } from "./CardScheduleResponse"
2
2
  import { CardTypeSpecification } from "./CardTypeSpecification"
3
3
  import { CardUsage } from "./CardUsage"
4
+ import { FundingAccountResponseV2 } from "./FundingAccountResponseV2"
4
5
  import { ProviderCode } from "./ProviderCode"
6
+ import { YearMonth } from "./YearMonth"
5
7
 
6
8
  export interface CardResponseV2 {
7
- cardType?: CardTypeSpecification | string
8
- cardNumber?: string
9
- cvv?: string
10
- expiryDate?: any
11
- nameOnCard?: string
12
- balance?: number
13
- issueDate?: string
14
- providerCode?: ProviderCode
15
- providerCardId?: string
16
- usage?: CardUsage
17
- fundingAccount?: CardFundingAccountResponse
18
- createdBy?: string
9
+ cardType: CardTypeSpecification | string
10
+ cardNumber: string
11
+ cvv: string
12
+ expiryDate: YearMonth
13
+ nameOnCard: string
14
+ balance: number
15
+ issueDate: string
16
+ providerCode: ProviderCode
17
+ providerCardId: string
18
+ usage: CardUsage
19
+ fundingAccount: FundingAccountResponseV2
20
+ schedule: CardScheduleResponseItem[]
21
+ createdBy: string
22
+ }
23
+
24
+ export namespace CardResponseV2 {
25
+ export function is(value: CardResponseV2 | any): value is CardResponseV2 {
26
+ return (
27
+ typeof value == "object" &&
28
+ (typeof value.cardType == "string" || CardTypeSpecification.is(value.cardType)) &&
29
+ typeof value.cardNumber == "string" &&
30
+ typeof value.cvv == "string" &&
31
+ YearMonth.is(value.expiryDate) &&
32
+ typeof value.nameOnCard == "string" &&
33
+ typeof value.balance == "number" &&
34
+ typeof value.issueDate == "string" &&
35
+ ProviderCode.is(value.providerCode) &&
36
+ typeof value.providerCardId == "string" &&
37
+ CardUsage.is(value.usage) &&
38
+ FundingAccountResponseV2.is(value.fundingAccount) &&
39
+ Array.isArray(value.schedule) &&
40
+ value.schedule.every(CardScheduleResponseItem.is) &&
41
+ typeof value.createdBy == "string"
42
+ )
43
+ }
19
44
  }
@@ -0,0 +1,24 @@
1
+ import * as isoly from "isoly"
2
+ import { CardScheduleTaskStatus } from "./CardScheduleTaskStatus"
3
+ import { CardScheduleTaskType } from "./CardScheduleTaskType"
4
+
5
+ export interface CardScheduleResponseItem {
6
+ dueOn: isoly.DateTime
7
+ status: CardScheduleTaskStatus
8
+ statusText: string
9
+ taskType: CardScheduleTaskType
10
+ taskId: string
11
+ }
12
+
13
+ export namespace CardScheduleResponseItem {
14
+ export function is(value: CardScheduleResponseItem | any): value is CardScheduleResponseItem {
15
+ return (
16
+ typeof value == "object" &&
17
+ isoly.DateTime.is(value.dueOn) &&
18
+ CardScheduleTaskStatus.is(value.status) &&
19
+ typeof value.statusText == "string" &&
20
+ CardScheduleTaskType.is(value.taskType) &&
21
+ typeof value.taskId == "string"
22
+ )
23
+ }
24
+ }
@@ -0,0 +1,18 @@
1
+ const cardScheduleTaskStatus = [
2
+ "TODO",
3
+ "CANCELLED",
4
+ "CANCELLED_EXCEPTIONALLY",
5
+ "SUCCESSFUL",
6
+ "FAILED",
7
+ "FAILED_EXCEPTIONALLY",
8
+ "HALTED",
9
+ "PENDING",
10
+ "PENDING_DECLINED",
11
+ ]
12
+ export type CardScheduleTaskStatus = typeof cardScheduleTaskStatus[number]
13
+
14
+ export namespace CardScheduleTaskStatus {
15
+ export function is(value: unknown): value is CardScheduleTaskStatus {
16
+ return typeof value == "string" && cardScheduleTaskStatus.includes(value as CardScheduleTaskStatus)
17
+ }
18
+ }
@@ -1 +1,8 @@
1
- export type CardScheduleTaskType = "CARD_AMENDMENT" | "CARD_STATE_CHANGE"
1
+ const cardScheduleTaskType = ["CARD_AMENDMENT", "CARD_STATE_CHANGE"] as const
2
+ export type CardScheduleTaskType = typeof cardScheduleTaskType[number]
3
+
4
+ export namespace CardScheduleTaskType {
5
+ export function is(value: unknown): value is CardScheduleTaskType {
6
+ return typeof value == "string" && cardScheduleTaskType.includes(value as CardScheduleTaskType)
7
+ }
8
+ }
@@ -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
+ }
@@ -0,0 +1,10 @@
1
+ export interface FundingAccountResponseV2 {
2
+ providerAccountId: string
3
+ balance: number
4
+ }
5
+
6
+ export namespace FundingAccountResponseV2 {
7
+ export function is(value: FundingAccountResponseV2 | any): value is FundingAccountResponseV2 {
8
+ return typeof value == "object" && typeof value.providerAccountId == "string" && typeof value.balance == "number"
9
+ }
10
+ }
@@ -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
+ }
@@ -0,0 +1,16 @@
1
+ export type YearMonth = string
2
+
3
+ export namespace YearMonth {
4
+ export function is(value: any | YearMonth): value is YearMonth {
5
+ return typeof value == "string" && value.length == 7 && /^\d{4}-((0[1-9])|(1[0-2]))$/.test(value)
6
+ }
7
+ export function parse(value: YearMonth): Date {
8
+ return new Date(value + "28")
9
+ }
10
+ export function create(value: Date): YearMonth {
11
+ return value.toISOString().substring(0, 7)
12
+ }
13
+ export function now(): YearMonth {
14
+ return create(new Date())
15
+ }
16
+ }
package/model/index.ts CHANGED
@@ -16,6 +16,8 @@ import { CardFundingAccountResponse } from "./CardFundingAccountResponse"
16
16
  import { CardOptionSearch } from "./CardOptionSearch"
17
17
  import { CardResponse } from "./CardResponse"
18
18
  import { CardResponseV2 } from "./CardResponseV2"
19
+ import { CardScheduleResponseItem } from "./CardScheduleResponse"
20
+ import { CardScheduleTaskStatus } from "./CardScheduleTaskStatus"
19
21
  import { CardScheduleTaskType } from "./CardScheduleTaskType"
20
22
  import { CardSearch } from "./CardSearch"
21
23
  import { CardStateChangeDesiredState } from "./CardStateChangeDesiredState"
@@ -24,6 +26,7 @@ import { CardTypeResponse } from "./CardTypeResponse"
24
26
  import { CardTypesConfig } from "./CardTypesConfig"
25
27
  import { CardTypeSearchRequest } from "./CardTypeSearchRequest"
26
28
  import { CardTypeSpecification } from "./CardTypeSpecification"
29
+ import { CardTypeSpecificationFlag } from "./CardTypeSpecificationFlag"
27
30
  import { ConfigMatchesRequest } from "./ConfigMatchesRequest"
28
31
  import { ConfigMatchesResponse } from "./ConfigMatchesResponse"
29
32
  import { ConfigRequest } from "./ConfigRequest"
@@ -41,6 +44,7 @@ import { FiveFieldsBookingInfoRequest } from "./FiveFieldsBookingInfoRequest"
41
44
  import { FiveFieldsBookingInfoResponse } from "./FiveFieldsBookingInfoResponse"
42
45
  import { FlightBookingInfoRequest } from "./FlightBookingInfoRequest"
43
46
  import { FundingAccountInboundTransferNotificationConfig } from "./FundingAccountInboundTransferNotificationConfig"
47
+ import { FundingAccountResponseV2 } from "./FundingAccountResponseV2"
44
48
  import { FundingAccountSearchRequest } from "./FundingAccountSearchRequest"
45
49
  import { FundingAccountSearchResponse } from "./FundingAccountSearchResponse"
46
50
  import { FundingLimitRequest } from "./FundingLimitRequest"
@@ -97,6 +101,7 @@ import { UserRequest } from "./UserRequest"
97
101
  import { UserResponse } from "./UserResponse"
98
102
  import { UserRoleResponse } from "./UserRoleResponse"
99
103
  import { UserSearchRequest } from "./UserSearchRequest"
104
+ import { YearMonth } from "./YearMonth"
100
105
 
101
106
  export {
102
107
  AccountCreationRequest,
@@ -117,6 +122,8 @@ export {
117
122
  CardOptionSearch,
118
123
  CardResponse,
119
124
  CardResponseV2,
125
+ CardScheduleResponseItem as CardScheduleResponse,
126
+ CardScheduleTaskStatus,
120
127
  CardScheduleTaskType,
121
128
  CardSearch,
122
129
  CardStateChangeDesiredState,
@@ -125,6 +132,7 @@ export {
125
132
  CardTypesConfig,
126
133
  CardTypeSearchRequest,
127
134
  CardTypeSpecification,
135
+ CardTypeSpecificationFlag,
128
136
  ConfigMatchesRequest,
129
137
  ConfigMatchesResponse,
130
138
  ConfigRequest,
@@ -142,6 +150,7 @@ export {
142
150
  FiveFieldsBookingInfoResponse,
143
151
  FlightBookingInfoRequest,
144
152
  FundingAccountInboundTransferNotificationConfig,
153
+ FundingAccountResponseV2,
145
154
  FundingAccountSearchRequest,
146
155
  FundingAccountSearchResponse,
147
156
  FundingLimitRequest,
@@ -166,6 +175,7 @@ export {
166
175
  PaymentMethodOptionResponse,
167
176
  PaymentOption,
168
177
  ProcessedStatement,
178
+ ProviderCode,
169
179
  ProviderResponse,
170
180
  References,
171
181
  RelogWithNewSessionDetailsRequest,
@@ -197,5 +207,5 @@ export {
197
207
  UserResponse,
198
208
  UserRoleResponse,
199
209
  UserSearchRequest,
200
- ProviderCode,
210
+ YearMonth,
201
211
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/client",
3
- "version": "0.0.58",
3
+ "version": "0.0.63",
4
4
  "description": "Client library for the Pax2Pay API",
5
5
  "author": "Pax2Pay Ltd.",
6
6
  "license": "MIT",