@pax2pay/client 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client/Beneficiaries/index.ts +6 -2
- package/Client/Cards/index.ts +86 -25
- package/Client/Connection.ts +30 -14
- package/Client/List.ts +55 -0
- package/Client/Paginated.ts +30 -0
- package/Client/Reports/index.ts +6 -2
- package/Client/Transfers/index.ts +3 -2
- package/Client/Users/index.ts +11 -8
- package/Client/index.ts +2 -0
- package/dist/Client/Beneficiaries/index.d.ts +1 -3
- package/dist/Client/Beneficiaries/index.js +2 -1
- package/dist/Client/Beneficiaries/index.js.map +1 -1
- package/dist/Client/Cards/index.d.ts +9 -18
- package/dist/Client/Cards/index.js +27 -18
- package/dist/Client/Cards/index.js.map +1 -1
- package/dist/Client/Connection.d.ts +4 -4
- package/dist/Client/Connection.js +19 -9
- package/dist/Client/Connection.js.map +1 -1
- package/dist/Client/List.d.ts +10 -0
- package/dist/Client/List.js +43 -0
- package/dist/Client/List.js.map +1 -1
- package/dist/Client/Paginated.d.ts +11 -0
- package/dist/Client/Paginated.js +19 -0
- package/dist/Client/Paginated.js.map +1 -0
- package/dist/Client/Reports/index.js +7 -2
- package/dist/Client/Reports/index.js.map +1 -1
- package/dist/Client/Transfers/index.d.ts +1 -3
- package/dist/Client/Transfers/index.js +2 -1
- package/dist/Client/Transfers/index.js.map +1 -1
- package/dist/Client/Users/index.d.ts +1 -1
- package/dist/Client/Users/index.js +7 -8
- package/dist/Client/Users/index.js.map +1 -1
- package/dist/Client/index.d.ts +2 -0
- package/dist/Client/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js.map +1 -1
- package/dist/model/CardSearchRequest.d.ts +29 -0
- package/dist/model/CardSearchRequest.js +2 -0
- package/dist/model/CardSearchRequest.js.map +1 -0
- package/dist/model/index.d.ts +2 -1
- package/dist/model/index.js.map +1 -1
- package/index.ts +2 -0
- package/model/CardSearchRequest.ts +29 -0
- package/model/index.ts +2 -0
- package/package.json +1 -1
|
@@ -17,8 +17,12 @@ export class Beneficiaries extends List<model.BeneficiaryResponse, model.Benefic
|
|
|
17
17
|
protected createResource(response: model.BeneficiaryResponse): Beneficiary {
|
|
18
18
|
return new Beneficiary(this.connection, [this.folder, response.beneficiaryId].join("/"), response)
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
|
|
21
|
+
async getAll(): Promise<model.ErrorResponse | model.BeneficiaryResponse[]> {
|
|
22
|
+
const response = await this.connection.get<{ list: model.BeneficiaryResponse[]; totalCount: number }>(
|
|
23
|
+
`${this.folder}`
|
|
24
|
+
)
|
|
25
|
+
return this.extractResponse(response)
|
|
22
26
|
}
|
|
23
27
|
async getBeneficiary(beneficiaryId: string) {
|
|
24
28
|
return await this.connection.get<model.BeneficiaryResponse>([this.folder, beneficiaryId].join("/"))
|
package/Client/Cards/index.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as model from "../../model"
|
|
|
2
2
|
import { Card } from "../Card"
|
|
3
3
|
import { Connection } from "../Connection"
|
|
4
4
|
import { List } from "../List"
|
|
5
|
+
import { Paginated } from "../Paginated"
|
|
5
6
|
|
|
6
7
|
export class Cards extends List<
|
|
7
8
|
model.CardResponseV2 | model.CardResponse,
|
|
@@ -36,14 +37,25 @@ export class Cards extends List<
|
|
|
36
37
|
static create(connection: Connection): Cards {
|
|
37
38
|
return new Cards(connection)
|
|
38
39
|
}
|
|
39
|
-
async
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
async getAllCardsPaginated(
|
|
41
|
+
previous?: Paginated<model.CardResponseV2>,
|
|
42
|
+
page?: number,
|
|
43
|
+
size?: number,
|
|
44
|
+
sort = "createdOn,desc"
|
|
45
|
+
): Promise<model.ErrorResponse | Paginated<model.CardResponseV2>> {
|
|
46
|
+
return await this.getNextPaginated<model.CardResponseV2>(
|
|
47
|
+
previous,
|
|
48
|
+
(page, size, sort) =>
|
|
49
|
+
this.connection.get<{ list: model.CardResponseV2[]; totalCount: number } | model.CardResponseV2[]>(`v2/cards`, {
|
|
50
|
+
page: page,
|
|
51
|
+
size: size,
|
|
52
|
+
sort: sort,
|
|
53
|
+
}),
|
|
54
|
+
undefined,
|
|
55
|
+
page,
|
|
56
|
+
size,
|
|
57
|
+
sort
|
|
58
|
+
)
|
|
47
59
|
}
|
|
48
60
|
async getCard(providerCardId: string, providerCode: model.ProviderCode) {
|
|
49
61
|
const result = await this.connection
|
|
@@ -85,26 +97,69 @@ export class Cards extends List<
|
|
|
85
97
|
)
|
|
86
98
|
return result
|
|
87
99
|
}
|
|
88
|
-
async getCardTypesV2(providerCode: model.ProviderCode) {
|
|
89
|
-
const
|
|
90
|
-
|
|
100
|
+
async getCardTypesV2(providerCode: model.ProviderCode): Promise<model.ErrorResponse | model.CardTypeResponseV2[]> {
|
|
101
|
+
const response = await this.connection.get<{ list: model.CardTypeResponseV2[]; totalCount: number }>(
|
|
102
|
+
`v2/cards/types/${providerCode}`
|
|
103
|
+
)
|
|
104
|
+
return this.extractResponse(response)
|
|
91
105
|
}
|
|
92
106
|
async getCardTypes(providerCode: model.ProviderCode) {
|
|
93
107
|
const result = await this.connection.get<model.CardTypeResponse>(`cards/types/${providerCode}`)
|
|
94
108
|
return result
|
|
95
109
|
}
|
|
96
|
-
|
|
97
|
-
|
|
110
|
+
|
|
111
|
+
async searchCardsV2(
|
|
112
|
+
searchRequest: model.CardSearchRequest,
|
|
113
|
+
parameters?: Record<string, any>
|
|
114
|
+
): Promise<model.ErrorResponse | model.CardResponseV2[]> {
|
|
115
|
+
const response = await this.connection.post<{ list: model.CardResponseV2[]; totalCount: number }>(
|
|
116
|
+
`v2/cards/searches`,
|
|
117
|
+
searchRequest,
|
|
118
|
+
parameters
|
|
119
|
+
)
|
|
120
|
+
return this.extractResponse(response)
|
|
121
|
+
}
|
|
122
|
+
async searchCardsV2Paginated(
|
|
123
|
+
request: model.CardSearchRequest,
|
|
124
|
+
previous?: Paginated<model.CardResponseV2>,
|
|
125
|
+
page?: number,
|
|
126
|
+
size?: number,
|
|
127
|
+
sort = "createdOn,desc"
|
|
128
|
+
): Promise<model.ErrorResponse | Paginated<model.CardResponseV2>> {
|
|
129
|
+
return await this.getNextPaginated<model.CardResponseV2>(
|
|
130
|
+
previous,
|
|
131
|
+
(page, size, sort, request) =>
|
|
132
|
+
this.connection.post<{ list: model.CardResponseV2[]; totalCount: number } | model.CardResponseV2[]>(
|
|
133
|
+
`v2/cards/searches`,
|
|
134
|
+
request,
|
|
135
|
+
{
|
|
136
|
+
page: page,
|
|
137
|
+
size: size,
|
|
138
|
+
sort: sort,
|
|
139
|
+
}
|
|
140
|
+
),
|
|
141
|
+
request,
|
|
142
|
+
page,
|
|
143
|
+
size,
|
|
144
|
+
sort
|
|
145
|
+
)
|
|
146
|
+
}
|
|
147
|
+
async getFundingAccounts(
|
|
148
|
+
searchRequest: model.FundingAccountSearchRequest
|
|
149
|
+
): Promise<model.ErrorResponse | model.CardFundingAccountResponse[]> {
|
|
150
|
+
const response = await this.connection.post<{ list: model.CardFundingAccountResponse[]; totalCount: number }>(
|
|
98
151
|
"funding-accounts/searches",
|
|
99
152
|
searchRequest
|
|
100
153
|
)
|
|
101
|
-
return
|
|
154
|
+
return this.extractResponse(response)
|
|
102
155
|
}
|
|
103
|
-
async getAllFundingAccounts(
|
|
104
|
-
|
|
156
|
+
async getAllFundingAccounts(
|
|
157
|
+
providerCode: model.ProviderCode
|
|
158
|
+
): Promise<model.ErrorResponse | model.CardFundingAccountResponse[]> {
|
|
159
|
+
const response = await this.connection.get<{ list: model.CardFundingAccountResponse[]; totalCount: number }>(
|
|
105
160
|
`funding-accounts?provider=${providerCode}&size=500`
|
|
106
161
|
)
|
|
107
|
-
return
|
|
162
|
+
return this.extractResponse(response)
|
|
108
163
|
}
|
|
109
164
|
async getCardBookingInfo(providerCardId: string, providerCode: model.ProviderCode) {
|
|
110
165
|
const result = await this.connection
|
|
@@ -119,17 +174,23 @@ export class Cards extends List<
|
|
|
119
174
|
)
|
|
120
175
|
return result
|
|
121
176
|
}
|
|
122
|
-
async getCardTransaction(
|
|
123
|
-
|
|
177
|
+
async getCardTransaction(
|
|
178
|
+
providerCardId: string,
|
|
179
|
+
providerCode: model.ProviderCode
|
|
180
|
+
): Promise<model.ErrorResponse | model.CardProcessedTransaction[]> {
|
|
181
|
+
const response = await this.connection.get<{ list: model.CardProcessedTransaction[]; totalCount: number }>(
|
|
124
182
|
`cards/virtual/${providerCode}/${providerCardId}/statements`
|
|
125
183
|
)
|
|
126
|
-
return
|
|
184
|
+
return this.extractResponse(response)
|
|
127
185
|
}
|
|
128
|
-
async searchTransaction(accountId: number) {
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
186
|
+
async searchTransaction(accountId: number): Promise<model.ErrorResponse | model.CardTransaction[]> {
|
|
187
|
+
const response = await this.connection.post<{ list: model.CardTransaction[]; totalCount: number }>(
|
|
188
|
+
`transactions/searches`,
|
|
189
|
+
{
|
|
190
|
+
accountId: accountId,
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
return this.extractResponse(response)
|
|
133
194
|
}
|
|
134
195
|
async editSchedule(providerCardId: string, providerCode: model.ProviderCode, request: model.ScheduleEntry[]) {
|
|
135
196
|
const result = await this.connection.put<model.CardResponse>(
|
package/Client/Connection.ts
CHANGED
|
@@ -18,7 +18,8 @@ export class Connection {
|
|
|
18
18
|
async fetch<Response, Codes = 400 | 403 | 404 | 500>(
|
|
19
19
|
path: string,
|
|
20
20
|
method: string,
|
|
21
|
-
request?: any
|
|
21
|
+
request?: any,
|
|
22
|
+
parameters?: Record<string, any>
|
|
22
23
|
): Promise<Response | (model.ErrorResponse & { status: Codes | DefaultCodes })> {
|
|
23
24
|
const headers: Record<string, string> = {
|
|
24
25
|
"Content-Type": "application/json; charset=utf-8",
|
|
@@ -32,31 +33,46 @@ export class Connection {
|
|
|
32
33
|
}
|
|
33
34
|
if (this.token)
|
|
34
35
|
headers["X-Auth-Token"] = this.token
|
|
35
|
-
const response = await fetch(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
const response = await fetch(
|
|
37
|
+
this.url +
|
|
38
|
+
"/" +
|
|
39
|
+
path +
|
|
40
|
+
(parameters
|
|
41
|
+
? "?" +
|
|
42
|
+
Object.entries(parameters)
|
|
43
|
+
.map(param => param.join("="))
|
|
44
|
+
.join("&")
|
|
45
|
+
: ""),
|
|
46
|
+
{
|
|
47
|
+
method,
|
|
48
|
+
headers,
|
|
49
|
+
body: request && JSON.stringify(request),
|
|
50
|
+
}
|
|
51
|
+
).catch(_ => undefined)
|
|
40
52
|
return !response
|
|
41
53
|
? { status: 503 }
|
|
42
54
|
: response.status == 401 && (await this.unauthorized(this))
|
|
43
|
-
? await this.fetch<Response, Codes>(path, method, request)
|
|
55
|
+
? await this.fetch<Response, Codes>(path, method, request, parameters)
|
|
44
56
|
: response.headers.get("Content-Type")?.startsWith("application/json")
|
|
45
57
|
? response.ok
|
|
46
|
-
?
|
|
58
|
+
? response.headers.get("x-total-count")
|
|
59
|
+
? { list: await response.json(), totalCount: response.headers.get("x-total-count") }
|
|
60
|
+
: await response.json()
|
|
47
61
|
: { status: response.status, ...(await response.json()) }
|
|
48
62
|
: { status: response.status, value: await response.text() }
|
|
49
63
|
}
|
|
50
64
|
async post<Response, Codes = 400 | 403 | 404 | 500>(
|
|
51
65
|
path: string,
|
|
52
|
-
request: any
|
|
66
|
+
request: any,
|
|
67
|
+
parameters?: Record<string, any>
|
|
53
68
|
): Promise<Response | (model.ErrorResponse & { status: Codes | DefaultCodes })> {
|
|
54
|
-
return await this.fetch<Response, Codes>(path, "POST", request)
|
|
69
|
+
return await this.fetch<Response, Codes>(path, "POST", request, parameters)
|
|
55
70
|
}
|
|
56
71
|
async get<Response, Codes = 400 | 403 | 404 | 500>(
|
|
57
|
-
path: string
|
|
72
|
+
path: string,
|
|
73
|
+
parameters?: Record<string, any>
|
|
58
74
|
): Promise<Response | (model.ErrorResponse & { status: Codes | DefaultCodes })> {
|
|
59
|
-
return await this.fetch<Response, Codes>(path, "GET")
|
|
75
|
+
return await this.fetch<Response, Codes>(path, "GET", undefined, parameters)
|
|
60
76
|
}
|
|
61
77
|
async put<Response, Codes = 400 | 403 | 404 | 500>(
|
|
62
78
|
path: string,
|
|
@@ -69,8 +85,8 @@ export class Connection {
|
|
|
69
85
|
): Promise<Response | (model.ErrorResponse & { status: Codes | DefaultCodes })> {
|
|
70
86
|
return await this.fetch<Response, Codes>(path, "DELETE")
|
|
71
87
|
}
|
|
72
|
-
static open(url: string
|
|
73
|
-
return
|
|
88
|
+
static open(url: string, token: string | undefined): Connection {
|
|
89
|
+
return new Connection(url, token)
|
|
74
90
|
}
|
|
75
91
|
static isError(
|
|
76
92
|
value: (model.ErrorResponse & { status: number }) | any
|
package/Client/List.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as model from "../model"
|
|
2
2
|
import { Connection } from "./Connection"
|
|
3
3
|
import { generatePagination } from "./generatePagination"
|
|
4
|
+
import { Paginated } from "./Paginated"
|
|
4
5
|
import { Resource } from "./Resource"
|
|
5
6
|
|
|
6
7
|
export abstract class List<
|
|
@@ -9,6 +10,7 @@ export abstract class List<
|
|
|
9
10
|
Request extends { [key: string]: any } = { [key: string]: any },
|
|
10
11
|
T extends Resource<Response, Request> = Resource<Response, Request>
|
|
11
12
|
> {
|
|
13
|
+
private DEFAULT_PAGE_SIZE = 20
|
|
12
14
|
#connection: Connection
|
|
13
15
|
protected get connection() {
|
|
14
16
|
return this.#connection
|
|
@@ -38,4 +40,57 @@ export abstract class List<
|
|
|
38
40
|
: this.connection.post<Response[]>(`${this.folder}/searches${generatePagination(page, size, sort)}`, pattern))
|
|
39
41
|
)
|
|
40
42
|
}
|
|
43
|
+
async getNextPaginated<R>(
|
|
44
|
+
previous: Paginated<R> | undefined,
|
|
45
|
+
callback: (
|
|
46
|
+
page: number,
|
|
47
|
+
size: number,
|
|
48
|
+
sort?: string,
|
|
49
|
+
request?: Record<string, any>
|
|
50
|
+
) => Promise<model.ErrorResponse | { list: R[]; totalCount: number } | R[]>,
|
|
51
|
+
request?: Record<string, any>,
|
|
52
|
+
chosenPage?: number,
|
|
53
|
+
chosenSize?: number,
|
|
54
|
+
chosenSort?: string
|
|
55
|
+
) {
|
|
56
|
+
const sort = chosenSort
|
|
57
|
+
let page = chosenPage
|
|
58
|
+
let size = chosenSize
|
|
59
|
+
let result
|
|
60
|
+
if (previous) {
|
|
61
|
+
if (previous.hasNextPage() == false) {
|
|
62
|
+
return new Paginated([], previous.totalCount, previous.page, previous.size, true)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
page = previous.nextPage()
|
|
66
|
+
size = previous.size
|
|
67
|
+
} else {
|
|
68
|
+
page = page ?? 0
|
|
69
|
+
size = size ?? 20
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const response = await callback(page, size, sort, request)
|
|
73
|
+
if (model.ErrorResponse.is(response)) {
|
|
74
|
+
result = response
|
|
75
|
+
} else {
|
|
76
|
+
let totalCount = -1
|
|
77
|
+
let list: R[]
|
|
78
|
+
if (!Array.isArray(response)) {
|
|
79
|
+
list = response.list
|
|
80
|
+
totalCount = response.totalCount
|
|
81
|
+
} else {
|
|
82
|
+
list = response
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
result = new Paginated(list, totalCount, page, size, list.length < size)
|
|
86
|
+
}
|
|
87
|
+
return result
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
extractResponse<R>(value: { list: R[]; totalCount: number } | model.ErrorResponse) {
|
|
91
|
+
if (!model.ErrorResponse.is(value))
|
|
92
|
+
return value.list
|
|
93
|
+
else
|
|
94
|
+
return value
|
|
95
|
+
}
|
|
41
96
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Class for handling pagination, one instance represents a page of the List/Collection.
|
|
3
|
+
* Can be used in combination with List#getNextPaginated
|
|
4
|
+
*
|
|
5
|
+
* data - list representing current page's data
|
|
6
|
+
* totalCount - the total amount of rows available in the List/Collection
|
|
7
|
+
* page - current page
|
|
8
|
+
* size - current size
|
|
9
|
+
* endReached - indicator whether there is no more data
|
|
10
|
+
*/
|
|
11
|
+
export class Paginated<T> {
|
|
12
|
+
constructor(
|
|
13
|
+
readonly data: T[],
|
|
14
|
+
readonly totalCount: number,
|
|
15
|
+
readonly page: number,
|
|
16
|
+
readonly size: number,
|
|
17
|
+
readonly endReached: boolean
|
|
18
|
+
) {}
|
|
19
|
+
nextPage(): number {
|
|
20
|
+
return this.page + 1
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
hasNextPage(): boolean {
|
|
24
|
+
return !this.endReached
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
isTotalCountKnown(): boolean {
|
|
28
|
+
return this.totalCount >= 0
|
|
29
|
+
}
|
|
30
|
+
}
|
package/Client/Reports/index.ts
CHANGED
|
@@ -32,7 +32,7 @@ export class Reports {
|
|
|
32
32
|
return await this.connection.post<model.Report.Statement>(`../reports/statement`, request)
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
statementForTable(
|
|
35
|
+
async statementForTable(
|
|
36
36
|
request: model.StatementReportRequest,
|
|
37
37
|
page?: number,
|
|
38
38
|
pageSize?: number
|
|
@@ -46,7 +46,11 @@ export class Reports {
|
|
|
46
46
|
if (page || pageSize)
|
|
47
47
|
path = this.attachPageable(path, page, pageSize)
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
let result
|
|
50
|
+
result = await this.connection.post<{ list: model.StatementReportResponse; totalCount: number }>(path, request)
|
|
51
|
+
if (!model.ErrorResponse.is(result))
|
|
52
|
+
result = result.list
|
|
53
|
+
return result
|
|
50
54
|
}
|
|
51
55
|
async getStatementForTable(rowId: string) {
|
|
52
56
|
const result = await this.connection.get<model.StatementReportResponseRow>(`statement/${rowId}
|
|
@@ -21,8 +21,9 @@ export class Transfers extends List<model.TransferResponse, model.TransferSearch
|
|
|
21
21
|
response
|
|
22
22
|
)
|
|
23
23
|
}
|
|
24
|
-
async getAll() {
|
|
25
|
-
|
|
24
|
+
async getAll(): Promise<model.ErrorResponse | model.TransferResponse[]> {
|
|
25
|
+
const response = await this.connection.get<{ list: model.TransferResponse[]; totalCount: number }>(`${this.folder}`)
|
|
26
|
+
return this.extractResponse(response)
|
|
26
27
|
}
|
|
27
28
|
async getTransfer(provider: model.ProviderCode, transferId: string) {
|
|
28
29
|
return await this.connection.get<model.TransferResponse>([this.folder, provider, transferId].join("/"))
|
package/Client/Users/index.ts
CHANGED
|
@@ -20,25 +20,28 @@ export class Users extends Collection<model.UserResponse, model.UserSearchReques
|
|
|
20
20
|
return result
|
|
21
21
|
}
|
|
22
22
|
async getAllUsers(): Promise<model.UserResponse[] | model.ErrorResponse> {
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
const response = await this.connection.get<{ list: model.UserResponse[]; totalCount: number }>(
|
|
24
|
+
`users?size=500&sort=username`
|
|
25
|
+
)
|
|
26
|
+
return this.extractResponse(response)
|
|
25
27
|
}
|
|
26
28
|
async getCategory(): Promise<string[] | model.ErrorResponse> {
|
|
27
29
|
const result = await this.connection.get<string[]>(`users/category`)
|
|
28
30
|
return result
|
|
29
31
|
}
|
|
30
32
|
async getRolesets(): Promise<model.RolesetResponse[] | model.ErrorResponse> {
|
|
31
|
-
const
|
|
32
|
-
return
|
|
33
|
+
const response = await this.connection.get<{ list: model.RolesetResponse[]; totalCount: number }>(`rolesets`)
|
|
34
|
+
return this.extractResponse(response)
|
|
33
35
|
}
|
|
34
36
|
async getUser(username: string): Promise<model.UserResponse | model.ErrorResponse> {
|
|
35
37
|
const result = await this.connection.get<model.UserResponse>(`users/${username}`)
|
|
36
38
|
return result
|
|
37
39
|
}
|
|
38
|
-
async getUsersActiveRoles(username: string
|
|
39
|
-
this.connection.
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
async getUsersActiveRoles(username: string): Promise<string[] | model.ErrorResponse> {
|
|
41
|
+
const response = await this.connection.get<{ list: string[]; totalCount: number }>(
|
|
42
|
+
`users/${username}/roles/minified`
|
|
43
|
+
)
|
|
44
|
+
return this.extractResponse(response)
|
|
42
45
|
}
|
|
43
46
|
async resetPassword(username: string): Promise<model.PasswordResetResponse | model.ErrorResponse> {
|
|
44
47
|
const result = await this.connection.post<model.PasswordResetResponse>(`auth/passwordreset`, { username: username })
|
package/Client/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { Email as ClientEmail } from "./Email"
|
|
|
12
12
|
import { List as ClientList } from "./List"
|
|
13
13
|
import { Organisation as ClientOrganisation } from "./Organisation"
|
|
14
14
|
import { Organisations as ClientOrganisations } from "./Organisations"
|
|
15
|
+
import { Paginated as ClientPaginated } from "./Paginated"
|
|
15
16
|
import { Reports as ClientReports } from "./Reports"
|
|
16
17
|
import { Resource as ClientResource } from "./Resource"
|
|
17
18
|
import { Transfers as ClientTransfers } from "./Transfers"
|
|
@@ -70,4 +71,5 @@ export namespace Client {
|
|
|
70
71
|
Request
|
|
71
72
|
>
|
|
72
73
|
export type Resource<Response, Request> = ClientResource<Response, Request>
|
|
74
|
+
export type Paginated<T> = ClientPaginated<T>
|
|
73
75
|
}
|
|
@@ -8,9 +8,7 @@ export declare class Beneficiaries extends List<model.BeneficiaryResponse, model
|
|
|
8
8
|
static create(connection: Connection): Beneficiaries;
|
|
9
9
|
protected getResourcePath(resource: model.BeneficiaryResponse): string;
|
|
10
10
|
protected createResource(response: model.BeneficiaryResponse): Beneficiary;
|
|
11
|
-
getAll(): Promise<model.
|
|
12
|
-
status: 400 | 404 | 500 | 403 | 503;
|
|
13
|
-
})>;
|
|
11
|
+
getAll(): Promise<model.ErrorResponse | model.BeneficiaryResponse[]>;
|
|
14
12
|
getBeneficiary(beneficiaryId: string): Promise<model.BeneficiaryResponse | (model.ErrorResponse & {
|
|
15
13
|
status: 400 | 404 | 500 | 403 | 503;
|
|
16
14
|
})>;
|
|
@@ -16,7 +16,8 @@ export class Beneficiaries extends List {
|
|
|
16
16
|
return new Beneficiary(this.connection, [this.folder, response.beneficiaryId].join("/"), response);
|
|
17
17
|
}
|
|
18
18
|
async getAll() {
|
|
19
|
-
|
|
19
|
+
const response = await this.connection.get(`${this.folder}`);
|
|
20
|
+
return this.extractResponse(response);
|
|
20
21
|
}
|
|
21
22
|
async getBeneficiary(beneficiaryId) {
|
|
22
23
|
return await this.connection.get([this.folder, beneficiaryId].join("/"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Beneficiaries/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAE5C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,MAAM,OAAO,aAAc,SAAQ,IAAyD;IAE3F,YAAY,UAAsB;QACjC,KAAK,CAAC,UAAU,CAAC,CAAA;QAFR,WAAM,GAAG,eAAe,CAAA;IAGlC,CAAC;IACD,MAAM,CAAC,MAAM,CAAC,UAAsB;QACnC,OAAO,IAAI,aAAa,CAAC,UAAU,CAAC,CAAA;IACrC,CAAC;IACS,eAAe,CAAC,QAAmC;QAC5D,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACvD,CAAC;IACS,cAAc,CAAC,QAAmC;QAC3D,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,CAAA;IACnG,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Beneficiaries/index.ts"],"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eAAe,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAA;IAC3G,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,OAAiC;QAC7C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAA4B,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,OAAO,CAAC,CAAA;QAC/F,OAAO,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;IAClE,CAAC;CACD"}
|
|
@@ -2,6 +2,7 @@ import * as model from "../../model";
|
|
|
2
2
|
import { Card } from "../Card";
|
|
3
3
|
import { Connection } from "../Connection";
|
|
4
4
|
import { List } from "../List";
|
|
5
|
+
import { Paginated } from "../Paginated";
|
|
5
6
|
export declare class Cards extends List<model.CardResponseV2 | model.CardResponse, model.CardSearch, model.CreateCardRequest, Card> {
|
|
6
7
|
protected folder: string;
|
|
7
8
|
constructor(connection: Connection);
|
|
@@ -16,9 +17,7 @@ export declare class Cards extends List<model.CardResponseV2 | model.CardRespons
|
|
|
16
17
|
status: 400 | 404 | 500 | 403 | 503;
|
|
17
18
|
}) | (Card & model.CardResponse)>;
|
|
18
19
|
static create(connection: Connection): Cards;
|
|
19
|
-
|
|
20
|
-
status: 400 | 404 | 500 | 403 | 503;
|
|
21
|
-
}) | model.CardResponseV2[]>;
|
|
20
|
+
getAllCardsPaginated(previous?: Paginated<model.CardResponseV2>, page?: number, size?: number, sort?: string): Promise<model.ErrorResponse | Paginated<model.CardResponseV2>>;
|
|
22
21
|
getCard(providerCardId: string, providerCode: model.ProviderCode): Promise<(model.ErrorResponse & {
|
|
23
22
|
status: 400 | 404 | 500 | 403 | 503;
|
|
24
23
|
}) | (Card & model.CardResponse)>;
|
|
@@ -40,30 +39,22 @@ export declare class Cards extends List<model.CardResponseV2 | model.CardRespons
|
|
|
40
39
|
freezeCard(providerCardId: string, providerCode: model.ProviderCode): Promise<model.CardResponse | (model.ErrorResponse & {
|
|
41
40
|
status: 400 | 404 | 500 | 403 | 503;
|
|
42
41
|
})>;
|
|
43
|
-
getCardTypesV2(providerCode: model.ProviderCode): Promise<
|
|
44
|
-
status: 400 | 404 | 500 | 403 | 503;
|
|
45
|
-
}) | model.CardTypeResponseV2[]>;
|
|
42
|
+
getCardTypesV2(providerCode: model.ProviderCode): Promise<model.ErrorResponse | model.CardTypeResponseV2[]>;
|
|
46
43
|
getCardTypes(providerCode: model.ProviderCode): Promise<model.CardTypeResponse | (model.ErrorResponse & {
|
|
47
44
|
status: 400 | 404 | 500 | 403 | 503;
|
|
48
45
|
})>;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
getAllFundingAccounts(providerCode: model.ProviderCode): Promise<
|
|
53
|
-
status: 400 | 404 | 500 | 403 | 503;
|
|
54
|
-
}) | model.CardFundingAccountResponse[]>;
|
|
46
|
+
searchCardsV2(searchRequest: model.CardSearchRequest, parameters?: Record<string, any>): Promise<model.ErrorResponse | model.CardResponseV2[]>;
|
|
47
|
+
searchCardsV2Paginated(request: model.CardSearchRequest, previous?: Paginated<model.CardResponseV2>, page?: number, size?: number, sort?: string): Promise<model.ErrorResponse | Paginated<model.CardResponseV2>>;
|
|
48
|
+
getFundingAccounts(searchRequest: model.FundingAccountSearchRequest): Promise<model.ErrorResponse | model.CardFundingAccountResponse[]>;
|
|
49
|
+
getAllFundingAccounts(providerCode: model.ProviderCode): Promise<model.ErrorResponse | model.CardFundingAccountResponse[]>;
|
|
55
50
|
getCardBookingInfo(providerCardId: string, providerCode: model.ProviderCode): Promise<model.BookingInfoResponse | (model.ErrorResponse & {
|
|
56
51
|
status: 400 | 404 | 500 | 403 | 503;
|
|
57
52
|
})>;
|
|
58
53
|
editCardBookingInfo(providerCardId: string, providerCode: model.ProviderCode, request: Record<string, any>): Promise<model.BookingInfoResponse | (model.ErrorResponse & {
|
|
59
54
|
status: 400 | 404 | 500 | 403 | 503;
|
|
60
55
|
})>;
|
|
61
|
-
getCardTransaction(providerCardId: string, providerCode: model.ProviderCode): Promise<
|
|
62
|
-
|
|
63
|
-
}) | model.CardProcessedTransaction[]>;
|
|
64
|
-
searchTransaction(accountId: number): Promise<(model.ErrorResponse & {
|
|
65
|
-
status: 400 | 404 | 500 | 403 | 503;
|
|
66
|
-
}) | model.CardTransaction[]>;
|
|
56
|
+
getCardTransaction(providerCardId: string, providerCode: model.ProviderCode): Promise<model.ErrorResponse | model.CardProcessedTransaction[]>;
|
|
57
|
+
searchTransaction(accountId: number): Promise<model.ErrorResponse | model.CardTransaction[]>;
|
|
67
58
|
editSchedule(providerCardId: string, providerCode: model.ProviderCode, request: model.ScheduleEntry[]): Promise<model.CardResponse | (model.ErrorResponse & {
|
|
68
59
|
status: 400 | 404 | 500 | 403 | 503;
|
|
69
60
|
})>;
|
|
@@ -29,14 +29,12 @@ export class Cards extends List {
|
|
|
29
29
|
static create(connection) {
|
|
30
30
|
return new Cards(connection);
|
|
31
31
|
}
|
|
32
|
-
async
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const result = await this.connection.get(path);
|
|
39
|
-
return result;
|
|
32
|
+
async getAllCardsPaginated(previous, page, size, sort = "createdOn,desc") {
|
|
33
|
+
return await this.getNextPaginated(previous, (page, size, sort) => this.connection.get(`v2/cards`, {
|
|
34
|
+
page: page,
|
|
35
|
+
size: size,
|
|
36
|
+
sort: sort,
|
|
37
|
+
}), undefined, page, size, sort);
|
|
40
38
|
}
|
|
41
39
|
async getCard(providerCardId, providerCode) {
|
|
42
40
|
const result = await this.connection
|
|
@@ -69,20 +67,31 @@ export class Cards extends List {
|
|
|
69
67
|
return result;
|
|
70
68
|
}
|
|
71
69
|
async getCardTypesV2(providerCode) {
|
|
72
|
-
const
|
|
73
|
-
return
|
|
70
|
+
const response = await this.connection.get(`v2/cards/types/${providerCode}`);
|
|
71
|
+
return this.extractResponse(response);
|
|
74
72
|
}
|
|
75
73
|
async getCardTypes(providerCode) {
|
|
76
74
|
const result = await this.connection.get(`cards/types/${providerCode}`);
|
|
77
75
|
return result;
|
|
78
76
|
}
|
|
77
|
+
async searchCardsV2(searchRequest, parameters) {
|
|
78
|
+
const response = await this.connection.post(`v2/cards/searches`, searchRequest, parameters);
|
|
79
|
+
return this.extractResponse(response);
|
|
80
|
+
}
|
|
81
|
+
async searchCardsV2Paginated(request, previous, page, size, sort = "createdOn,desc") {
|
|
82
|
+
return await this.getNextPaginated(previous, (page, size, sort, request) => this.connection.post(`v2/cards/searches`, request, {
|
|
83
|
+
page: page,
|
|
84
|
+
size: size,
|
|
85
|
+
sort: sort,
|
|
86
|
+
}), request, page, size, sort);
|
|
87
|
+
}
|
|
79
88
|
async getFundingAccounts(searchRequest) {
|
|
80
|
-
const
|
|
81
|
-
return
|
|
89
|
+
const response = await this.connection.post("funding-accounts/searches", searchRequest);
|
|
90
|
+
return this.extractResponse(response);
|
|
82
91
|
}
|
|
83
92
|
async getAllFundingAccounts(providerCode) {
|
|
84
|
-
const
|
|
85
|
-
return
|
|
93
|
+
const response = await this.connection.get(`funding-accounts?provider=${providerCode}&size=500`);
|
|
94
|
+
return this.extractResponse(response);
|
|
86
95
|
}
|
|
87
96
|
async getCardBookingInfo(providerCardId, providerCode) {
|
|
88
97
|
const result = await this.connection
|
|
@@ -95,14 +104,14 @@ export class Cards extends List {
|
|
|
95
104
|
return result;
|
|
96
105
|
}
|
|
97
106
|
async getCardTransaction(providerCardId, providerCode) {
|
|
98
|
-
const
|
|
99
|
-
return
|
|
107
|
+
const response = await this.connection.get(`cards/virtual/${providerCode}/${providerCardId}/statements`);
|
|
108
|
+
return this.extractResponse(response);
|
|
100
109
|
}
|
|
101
110
|
async searchTransaction(accountId) {
|
|
102
|
-
const
|
|
111
|
+
const response = await this.connection.post(`transactions/searches`, {
|
|
103
112
|
accountId: accountId,
|
|
104
113
|
});
|
|
105
|
-
return
|
|
114
|
+
return this.extractResponse(response);
|
|
106
115
|
}
|
|
107
116
|
async editSchedule(providerCardId, providerCode, request) {
|
|
108
117
|
const result = await this.connection.put(`cards/virtual/${providerCode}/${providerCardId}/schedule`, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Cards/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Cards/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAG9B,MAAM,OAAO,KAAM,SAAQ,IAK1B;IAEA,YAAY,UAAsB;QACjC,KAAK,CAAC,UAAU,CAAC,CAAA;QAFR,WAAM,GAAG,eAAe,CAAA;IAGlC,CAAC;IACS,eAAe,CAAC,QAAmD;QAC5E,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAC/E,CAAC;IACS,cAAc,CAAC,QAA8B;QACtD,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,CAAA;IACpH,CAAC;IACS,GAAG,CAAC,QAA8B;QAC3C,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,CA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