@pax2pay/client 0.0.59 → 0.0.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build.yml +3 -6
- package/.github/workflows/bump.yml +31 -0
- package/.github/workflows/publish.yml +7 -18
- package/Client/Card/index.ts +2 -2
- package/dist/Client/Card/index.d.ts +2 -2
- package/dist/Client/Card/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/model/CardResponseV2.d.ts +16 -13
- package/dist/model/CardResponseV2.js +17 -13
- package/dist/model/CardResponseV2.js.map +1 -1
- package/dist/model/CardScheduleResponse.d.ts +13 -0
- package/dist/model/CardScheduleResponse.js +16 -0
- package/dist/model/CardScheduleResponse.js.map +1 -0
- package/dist/model/CardScheduleTaskStatus.d.ts +6 -0
- package/dist/model/CardScheduleTaskStatus.js +19 -0
- package/dist/model/CardScheduleTaskStatus.js.map +1 -0
- package/dist/model/CardScheduleTaskType.d.ts +6 -1
- package/dist/model/CardScheduleTaskType.js +8 -1
- package/dist/model/CardScheduleTaskType.js.map +1 -1
- package/dist/model/FundingAccountResponseV2.d.ts +7 -0
- package/dist/model/FundingAccountResponseV2.js +8 -0
- package/dist/model/FundingAccountResponseV2.js.map +1 -0
- package/dist/model/YearMonth.d.ts +7 -0
- package/dist/model/YearMonth.js +20 -0
- package/dist/model/YearMonth.js.map +1 -0
- package/dist/model/index.d.ts +5 -1
- package/dist/model/index.js +6 -1
- package/dist/model/index.js.map +1 -1
- package/index.ts +9 -1
- package/model/CardResponseV2.ts +30 -25
- package/model/CardScheduleResponse.ts +24 -0
- package/model/CardScheduleTaskStatus.ts +18 -0
- package/model/CardScheduleTaskType.ts +8 -1
- package/model/FundingAccountResponseV2.ts +10 -0
- package/model/YearMonth.ts +16 -0
- package/model/index.ts +9 -1
- package/package.json +1 -1
|
@@ -17,9 +17,10 @@ jobs:
|
|
|
17
17
|
!~/cache/exclude
|
|
18
18
|
**/node_modules
|
|
19
19
|
key: ${{ runner.os }}-cache
|
|
20
|
-
-
|
|
20
|
+
- name: "Setup Node"
|
|
21
|
+
uses: "actions/setup-node@v2"
|
|
21
22
|
with:
|
|
22
|
-
node-version:
|
|
23
|
+
node-version: 16
|
|
23
24
|
- name: Update NPM
|
|
24
25
|
run: npm install -g npm
|
|
25
26
|
- name: Install Dependencies
|
|
@@ -29,8 +30,4 @@ jobs:
|
|
|
29
30
|
- name: Lint
|
|
30
31
|
run: npm run lint
|
|
31
32
|
- name: Test
|
|
32
|
-
env:
|
|
33
|
-
url: ${{ secrets.URL }}
|
|
34
|
-
username: ${{ secrets.USERNAME }}
|
|
35
|
-
password: ${{ secrets.PASSWORD }}
|
|
36
33
|
run: npm run test
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: "Bump"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- "master"
|
|
7
|
+
jobs:
|
|
8
|
+
bump-version:
|
|
9
|
+
name: "Deploy from master"
|
|
10
|
+
timeout-minutes: 60
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
if: "!contains(github.event.head_commit.message, 'ci: version bump to ')"
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: "Checkout source code"
|
|
16
|
+
uses: "actions/checkout@v2"
|
|
17
|
+
with:
|
|
18
|
+
token: ${{ secrets.ADMIN_TOKEN }}
|
|
19
|
+
- name: "Setup Node"
|
|
20
|
+
uses: "actions/setup-node@v2"
|
|
21
|
+
with:
|
|
22
|
+
node-version: 16
|
|
23
|
+
- name: Update NPM
|
|
24
|
+
run: npm install -g npm
|
|
25
|
+
- name: "Version Bump"
|
|
26
|
+
id: version-bump
|
|
27
|
+
uses: "phips28/gh-action-bump-version@master"
|
|
28
|
+
with:
|
|
29
|
+
tag-prefix: 'release-'
|
|
30
|
+
env:
|
|
31
|
+
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }}
|
|
@@ -1,32 +1,21 @@
|
|
|
1
|
-
name: "
|
|
1
|
+
name: "Publish"
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
-
|
|
6
|
-
- "
|
|
5
|
+
tags:
|
|
6
|
+
- "release-*"
|
|
7
7
|
jobs:
|
|
8
|
-
|
|
9
|
-
name: "
|
|
8
|
+
publish:
|
|
9
|
+
name: "Publish from master"
|
|
10
|
+
timeout-minutes: 60
|
|
10
11
|
runs-on: ubuntu-latest
|
|
11
|
-
if: "!contains(github.event.head_commit.message, 'ci: version bump to ')"
|
|
12
|
-
|
|
13
12
|
steps:
|
|
14
13
|
- name: "Checkout source code"
|
|
15
14
|
uses: "actions/checkout@v2"
|
|
16
|
-
with:
|
|
17
|
-
token: ${{ secrets.ADMIN_TOKEN }}
|
|
18
15
|
- name: "Setup Node"
|
|
19
16
|
uses: "actions/setup-node@v2"
|
|
20
17
|
with:
|
|
21
|
-
node-version:
|
|
22
|
-
|
|
23
|
-
- name: "Version Bump"
|
|
24
|
-
id: version-bump
|
|
25
|
-
uses: "phips28/gh-action-bump-version@master"
|
|
26
|
-
with:
|
|
27
|
-
tag-prefix: ''
|
|
28
|
-
env:
|
|
29
|
-
GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN }}
|
|
18
|
+
node-version: 16
|
|
30
19
|
- name: Update NPM
|
|
31
20
|
run: npm install -g npm
|
|
32
21
|
- name: Install
|
package/Client/Card/index.ts
CHANGED
|
@@ -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,
|
|
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, 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,
|
|
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 { 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,
|
|
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,EAeN,0BAA0B,EAG1B,cAAc,
|
|
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"}
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import {
|
|
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
|
|
7
|
-
cardNumber
|
|
8
|
-
cvv
|
|
9
|
-
expiryDate
|
|
10
|
-
nameOnCard
|
|
11
|
-
balance
|
|
12
|
-
issueDate
|
|
13
|
-
providerCode
|
|
14
|
-
providerCardId
|
|
15
|
-
usage
|
|
16
|
-
fundingAccount
|
|
17
|
-
|
|
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;
|
|
18
21
|
}
|
|
19
22
|
export declare namespace CardResponseV2 {
|
|
20
23
|
function is(value: CardResponseV2 | any): value is CardResponseV2;
|
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
import {
|
|
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 var CardResponseV2;
|
|
6
8
|
(function (CardResponseV2) {
|
|
7
9
|
function is(value) {
|
|
8
10
|
return (typeof value == "object" &&
|
|
9
|
-
(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
(value.expiryDate
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
(value.
|
|
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");
|
|
21
25
|
}
|
|
22
26
|
CardResponseV2.is = is;
|
|
23
27
|
})(CardResponseV2 || (CardResponseV2 = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardResponseV2.js","sourceRoot":"../","sources":["model/CardResponseV2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
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,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
|
-
|
|
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
|
-
|
|
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"}
|
|
@@ -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"}
|
|
@@ -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"}
|
package/dist/model/index.d.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";
|
|
@@ -42,6 +44,7 @@ import { FiveFieldsBookingInfoRequest } from "./FiveFieldsBookingInfoRequest";
|
|
|
42
44
|
import { FiveFieldsBookingInfoResponse } from "./FiveFieldsBookingInfoResponse";
|
|
43
45
|
import { FlightBookingInfoRequest } from "./FlightBookingInfoRequest";
|
|
44
46
|
import { FundingAccountInboundTransferNotificationConfig } from "./FundingAccountInboundTransferNotificationConfig";
|
|
47
|
+
import { FundingAccountResponseV2 } from "./FundingAccountResponseV2";
|
|
45
48
|
import { FundingAccountSearchRequest } from "./FundingAccountSearchRequest";
|
|
46
49
|
import { FundingAccountSearchResponse } from "./FundingAccountSearchResponse";
|
|
47
50
|
import { FundingLimitRequest } from "./FundingLimitRequest";
|
|
@@ -98,4 +101,5 @@ import { UserRequest } from "./UserRequest";
|
|
|
98
101
|
import { UserResponse } from "./UserResponse";
|
|
99
102
|
import { UserRoleResponse } from "./UserRoleResponse";
|
|
100
103
|
import { UserSearchRequest } from "./UserSearchRequest";
|
|
101
|
-
|
|
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, };
|
package/dist/model/index.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { CardFundingAccountResponse } from "./CardFundingAccountResponse";
|
|
2
2
|
import { CardResponseV2 } from "./CardResponseV2";
|
|
3
|
+
import { CardScheduleResponseItem } from "./CardScheduleResponse";
|
|
4
|
+
import { CardScheduleTaskStatus } from "./CardScheduleTaskStatus";
|
|
5
|
+
import { CardScheduleTaskType } from "./CardScheduleTaskType";
|
|
3
6
|
import { CardTypeSpecification } from "./CardTypeSpecification";
|
|
4
7
|
import { CardTypeSpecificationFlag } from "./CardTypeSpecificationFlag";
|
|
5
8
|
import { ErrorMessageDto } from "./ErrorMessageDto";
|
|
6
9
|
import { ErrorResponse } from "./ErrorResponse";
|
|
10
|
+
import { FundingAccountResponseV2 } from "./FundingAccountResponseV2";
|
|
7
11
|
import { Issue } from "./Issue";
|
|
8
12
|
import { LoginResponse } from "./LoginResponse";
|
|
9
13
|
import { OrganisationBalanceLimitResponse } from "./OrganisationBalanceLimitResponse";
|
|
@@ -11,5 +15,6 @@ import { OrganisationResponse } from "./OrganisationResponse";
|
|
|
11
15
|
import { ProviderCode } from "./ProviderCode";
|
|
12
16
|
import { ProviderResponse } from "./ProviderResponse";
|
|
13
17
|
import { UserResponse } from "./UserResponse";
|
|
14
|
-
|
|
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, };
|
|
15
20
|
//# sourceMappingURL=index.js.map
|
package/dist/model/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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;
|
|
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,
|
|
@@ -44,6 +46,7 @@ import {
|
|
|
44
46
|
FiveFieldsBookingInfoResponse,
|
|
45
47
|
FlightBookingInfoRequest,
|
|
46
48
|
FundingAccountInboundTransferNotificationConfig,
|
|
49
|
+
FundingAccountResponseV2,
|
|
47
50
|
FundingAccountSearchRequest,
|
|
48
51
|
FundingAccountSearchResponse,
|
|
49
52
|
FundingLimitRequest,
|
|
@@ -100,6 +103,7 @@ import {
|
|
|
100
103
|
UserResponse,
|
|
101
104
|
UserRoleResponse,
|
|
102
105
|
UserSearchRequest,
|
|
106
|
+
YearMonth,
|
|
103
107
|
} from "./model"
|
|
104
108
|
|
|
105
109
|
export {
|
|
@@ -122,6 +126,8 @@ export {
|
|
|
122
126
|
CardOptionSearch,
|
|
123
127
|
CardResponse,
|
|
124
128
|
CardResponseV2,
|
|
129
|
+
CardScheduleResponse,
|
|
130
|
+
CardScheduleTaskStatus,
|
|
125
131
|
CardScheduleTaskType,
|
|
126
132
|
CardSearch,
|
|
127
133
|
CardStateChangeDesiredState,
|
|
@@ -148,6 +154,7 @@ export {
|
|
|
148
154
|
FiveFieldsBookingInfoResponse,
|
|
149
155
|
FlightBookingInfoRequest,
|
|
150
156
|
FundingAccountInboundTransferNotificationConfig,
|
|
157
|
+
FundingAccountResponseV2,
|
|
151
158
|
FundingAccountSearchRequest,
|
|
152
159
|
FundingAccountSearchResponse,
|
|
153
160
|
FundingLimitRequest,
|
|
@@ -172,6 +179,7 @@ export {
|
|
|
172
179
|
PaymentMethodOptionResponse,
|
|
173
180
|
PaymentOption,
|
|
174
181
|
ProcessedStatement,
|
|
182
|
+
ProviderCode,
|
|
175
183
|
ProviderResponse,
|
|
176
184
|
References,
|
|
177
185
|
RelogWithNewSessionDetailsRequest,
|
|
@@ -203,5 +211,5 @@ export {
|
|
|
203
211
|
UserResponse,
|
|
204
212
|
UserRoleResponse,
|
|
205
213
|
UserSearchRequest,
|
|
206
|
-
|
|
214
|
+
YearMonth,
|
|
207
215
|
}
|
package/model/CardResponseV2.ts
CHANGED
|
@@ -1,39 +1,44 @@
|
|
|
1
|
-
import {
|
|
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
|
|
8
|
-
cardNumber
|
|
9
|
-
cvv
|
|
10
|
-
expiryDate
|
|
11
|
-
nameOnCard
|
|
12
|
-
balance
|
|
13
|
-
issueDate
|
|
14
|
-
providerCode
|
|
15
|
-
providerCardId
|
|
16
|
-
usage
|
|
17
|
-
fundingAccount
|
|
18
|
-
|
|
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
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
export namespace CardResponseV2 {
|
|
22
25
|
export function is(value: CardResponseV2 | any): value is CardResponseV2 {
|
|
23
26
|
return (
|
|
24
27
|
typeof value == "object" &&
|
|
25
|
-
(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
(value.expiryDate
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
(value.
|
|
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"
|
|
37
42
|
)
|
|
38
43
|
}
|
|
39
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
|
-
|
|
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
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -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"
|
|
@@ -42,6 +44,7 @@ import { FiveFieldsBookingInfoRequest } from "./FiveFieldsBookingInfoRequest"
|
|
|
42
44
|
import { FiveFieldsBookingInfoResponse } from "./FiveFieldsBookingInfoResponse"
|
|
43
45
|
import { FlightBookingInfoRequest } from "./FlightBookingInfoRequest"
|
|
44
46
|
import { FundingAccountInboundTransferNotificationConfig } from "./FundingAccountInboundTransferNotificationConfig"
|
|
47
|
+
import { FundingAccountResponseV2 } from "./FundingAccountResponseV2"
|
|
45
48
|
import { FundingAccountSearchRequest } from "./FundingAccountSearchRequest"
|
|
46
49
|
import { FundingAccountSearchResponse } from "./FundingAccountSearchResponse"
|
|
47
50
|
import { FundingLimitRequest } from "./FundingLimitRequest"
|
|
@@ -98,6 +101,7 @@ import { UserRequest } from "./UserRequest"
|
|
|
98
101
|
import { UserResponse } from "./UserResponse"
|
|
99
102
|
import { UserRoleResponse } from "./UserRoleResponse"
|
|
100
103
|
import { UserSearchRequest } from "./UserSearchRequest"
|
|
104
|
+
import { YearMonth } from "./YearMonth"
|
|
101
105
|
|
|
102
106
|
export {
|
|
103
107
|
AccountCreationRequest,
|
|
@@ -118,6 +122,8 @@ export {
|
|
|
118
122
|
CardOptionSearch,
|
|
119
123
|
CardResponse,
|
|
120
124
|
CardResponseV2,
|
|
125
|
+
CardScheduleResponseItem as CardScheduleResponse,
|
|
126
|
+
CardScheduleTaskStatus,
|
|
121
127
|
CardScheduleTaskType,
|
|
122
128
|
CardSearch,
|
|
123
129
|
CardStateChangeDesiredState,
|
|
@@ -144,6 +150,7 @@ export {
|
|
|
144
150
|
FiveFieldsBookingInfoResponse,
|
|
145
151
|
FlightBookingInfoRequest,
|
|
146
152
|
FundingAccountInboundTransferNotificationConfig,
|
|
153
|
+
FundingAccountResponseV2,
|
|
147
154
|
FundingAccountSearchRequest,
|
|
148
155
|
FundingAccountSearchResponse,
|
|
149
156
|
FundingLimitRequest,
|
|
@@ -168,6 +175,7 @@ export {
|
|
|
168
175
|
PaymentMethodOptionResponse,
|
|
169
176
|
PaymentOption,
|
|
170
177
|
ProcessedStatement,
|
|
178
|
+
ProviderCode,
|
|
171
179
|
ProviderResponse,
|
|
172
180
|
References,
|
|
173
181
|
RelogWithNewSessionDetailsRequest,
|
|
@@ -199,5 +207,5 @@ export {
|
|
|
199
207
|
UserResponse,
|
|
200
208
|
UserRoleResponse,
|
|
201
209
|
UserSearchRequest,
|
|
202
|
-
|
|
210
|
+
YearMonth,
|
|
203
211
|
}
|