25 KiB
obp-typescript / Modules / api
Module: api
Table of contents
Enumerations
Type Aliases
Variables
Functions
- CreateAny
- CreateTransactionRequestAccount
- Current
- DiscardAny
- GetAccountsByBankId
- GetAny
- GetBanks
- GetBanksById
- GetCustomersAtAnyBank
- GetCustomersAtBank
- GetKYCStatus
- GetTagsOnAccount
- GetTransactionsForAccountFull
- UpdateAny
- create
- discard
- get
- update
Type Aliases
APIClientConfig
Ƭ APIClientConfig: Object
Alias for APIClientConfig properties.
Property
baseUri
Property
version
Property
[authentication]
Property
[token]
See
Type declaration
| Name | Type |
|---|---|
authentication? |
DirectLoginAuthentication |
baseUri |
string |
oauthConfig? |
OAuthConfig |
token? |
string |
version |
Version |
withFixedVersion? |
boolean |
Defined in
APIRequest
Ƭ APIRequest<T>: Object
Alias for APIRequest properties.
Property
[get]
Property
[create]
See
Type parameters
| Name | Description |
|---|---|
T |
Type of object |
Type declaration
| Name | Type |
|---|---|
create? |
(config: APIClientConfig, methodCall: MethodCall<T>) => any |
discard? |
(config: APIClientConfig, methodCall: MethodCall<T>) => any |
get? |
(config: APIClientConfig, methodCall: MethodCall<T>) => any |
update? |
(config: APIClientConfig, methodCall: MethodCall<T>) => any |
Defined in
DirectLoginAuthentication
Ƭ DirectLoginAuthentication: Object
Alias for DirectLogin properties.
Property
username
Property
passowrd
Property
consumerKey
Type declaration
| Name | Type |
|---|---|
consumerKey |
string |
password |
string |
username |
string |
Defined in
MethodCall
Ƭ MethodCall<T>: (config: APIClientConfig, path: string, body?: any) => Promise<T>
Type parameters
| Name | Description |
|---|---|
T |
Type of object |
Type declaration
▸ (config, path, body?): Promise<T>
Alias for HTTP MethodCall properties.
Property
config
Property
path
Property
[body]
See
APIClientConfig
Parameters
| Name | Type |
|---|---|
config |
APIClientConfig |
path |
string |
body? |
any |
Returns
Promise<T>
Defined in
TransactionRequestAccountBody
Ƭ TransactionRequestAccountBody: Object
Alias for TransactionRequestAccountBody properties.
Property
description
Property
to
Property
value
Type declaration
| Name | Type |
|---|---|
description |
string |
to |
{ account_id: string ; bank_id: string } |
to.account_id |
string |
to.bank_id |
string |
value |
{ amount: number ; currency: string } |
value.amount |
number |
value.currency |
string |
Defined in
Variables
Account
• Const Account: APIRequest<Account>
Returns an anonymous function for creating or getting an Account data.
Param
The APIClientConfig object
Param
A higher order function
See
Defined in
Any
• Const Any: APIRequest<Any>
Returns an anonymous function for creating or getting Any data.
Param
The APIClientConfig object
Param
A higher order function
See
Defined in
Bank
• Const Bank: APIRequest<Bank>
Returns an anonymous function for creating or getting Bank data.
Param
The APIClientConfig object
Param
A higher order function
See
Defined in
Customer
• Const Customer: APIRequest<Customer>
Returns an anonymous function for creating or getting Customer data.
Param
The APIClientConfig object
Param
A higher order function
See
Defined in
KYC
• Const KYC: APIRequest<KYC>
Returns an anonymous function for creating or getting KYC data.
Param
The APIClientConfig object
Param
A higher order function
See
Defined in
Metadata
• Const Metadata: APIRequest<Metadata>
Returns an anonymous function for creating or getting Metadata data.
Param
The APIClientConfig object
Param
A higher order function
See
Defined in
Transaction
• Const Transaction: APIRequest<Transaction>
Returns an anonymous function for creating or getting Transaction data.
Param
The APIClientConfig object
Param
A higher order function
See
Defined in
User
• Const User: APIRequest<User>
Returns an anonymous function for creating or getting a User data.
Param
The APIClientConfig object
Param
A higher order function
See
Defined in
Functions
CreateAny
▸ CreateAny(config, methodCall): (path: string) => (body: any) => Promise<Any>
Create Any Request.
See
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
methodCall |
(config: APIClientConfig, path: string, body: any) => Promise<any> |
A higher order function |
Returns
fn
A curried function
▸ (path): (body: any) => Promise<Any>
Parameters
| Name | Type |
|---|---|
path |
string |
Returns
fn
▸ (body): Promise<Any>
Parameters
| Name | Type |
|---|---|
body |
any |
Returns
Promise<Any>
Defined in
CreateTransactionRequestAccount
▸ CreateTransactionRequestAccount(config, methodCall): (bankId: string, accountId: string, viewId: string, account: string) => (body: TransactionRequestAccountBody) => Promise<Transaction>
Create Transaction Request (ACCOUNT).
See
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
methodCall |
(config: APIClientConfig, path: string, body: TransactionRequestAccountBody) => Promise<any> |
A higher order function |
Returns
fn
A curried function
▸ (bankId, accountId, viewId, account): (body: TransactionRequestAccountBody) => Promise<Transaction>
Parameters
| Name | Type |
|---|---|
bankId |
string |
accountId |
string |
viewId |
string |
account |
string |
Returns
fn
▸ (body): Promise<Transaction>
Parameters
| Name | Type |
|---|---|
body |
TransactionRequestAccountBody |
Returns
Promise<Transaction>
Defined in
Current
▸ Current(config, methodCall): Promise<User>
Get the logged in user Returns information about the logged in user.
See
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
methodCall |
(config: APIClientConfig, path: string) => Promise<User> |
A higher order function |
Returns
Promise<User>
A curried function
Defined in
DiscardAny
▸ DiscardAny(config, methodCall): (path: string) => Promise<any>
Delete Any Request.
See
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
methodCall |
(config: APIClientConfig, path: string) => Promise<any> |
A higher order function |
Returns
fn
A curried function
▸ (path): Promise<any>
Parameters
| Name | Type |
|---|---|
path |
string |
Returns
Promise<any>
Defined in
GetAccountsByBankId
▸ GetAccountsByBankId(config, methodCall): (id: string) => Promise<Account>
Get Accounts at Bank. Returns the list of accounts at BANK_ID that the user has access to.
See
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
methodCall |
(config: APIClientConfig, path: string) => Promise<Account> |
A higher order function |
Returns
fn
A curried function
▸ (id): Promise<Account>
Parameters
| Name | Type |
|---|---|
id |
string |
Returns
Promise<Account>
Defined in
GetAny
▸ GetAny(config, methodCall): (path: string) => Promise<any>
Get any data. Returns the response of the requested endpoint.
See
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
methodCall |
(config: APIClientConfig, path: string) => Promise<any> |
A higher order function |
Returns
fn
A curried function
▸ (path): Promise<any>
Parameters
| Name | Type |
|---|---|
path |
string |
Returns
Promise<any>
Defined in
GetBanks
▸ GetBanks(config, methodCall): Promise<any>
Get banks on this API instance. Returns a list of banks.
See
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
methodCall |
(config: APIClientConfig, path: string) => Promise<any> |
A higher order function |
Returns
Promise<any>
A curried function
Defined in
GetBanksById
▸ GetBanksById(config, methodCall): (id: string) => Promise<Account>
Get the bank specified by BANK_ID. Returns information about a single bank specified by BANK_ID.
See
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
methodCall |
(config: APIClientConfig, path: string) => Promise<any> |
A higher order function |
Returns
fn
A curried function
▸ (id): Promise<Account>
Parameters
| Name | Type |
|---|---|
id |
string |
Returns
Promise<Account>
Defined in
GetCustomersAtAnyBank
▸ GetCustomersAtAnyBank(config, methodCall): Promise<any>
Get Customers at Any Bank.
See
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
methodCall |
(config: APIClientConfig, path: string) => Promise<any> |
A higher order function |
Returns
Promise<any>
A curried function
Defined in
GetCustomersAtBank
▸ GetCustomersAtBank(config, methodCall): (bankId: string) => Promise<Customer>
Get Customers at Bank.
See
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
methodCall |
(config: APIClientConfig, path: string) => Promise<any> |
A higher order function |
Returns
fn
A curried function
▸ (bankId): Promise<Customer>
Parameters
| Name | Type |
|---|---|
bankId |
string |
Returns
Promise<Customer>
Defined in
GetKYCStatus
▸ GetKYCStatus(config, methodCall): (customerId: string) => Promise<any>
Get the KYC statuses for a customer specified by CUSTOMER_ID over time.
See
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
methodCall |
(config: APIClientConfig, path: string) => Promise<any> |
A higher order function |
Returns
fn
A curried function
▸ (customerId): Promise<any>
Parameters
| Name | Type |
|---|---|
customerId |
string |
Returns
Promise<any>
Defined in
GetTagsOnAccount
▸ GetTagsOnAccount(config, methodCall): (bankId: string, accountId: string, viewId: string) => Promise<any>
Returns the account ACCOUNT_ID tags made on a view (VIEW_ID).
See
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
methodCall |
(config: APIClientConfig, path: string) => Promise<any> |
A higher order function |
Returns
fn
A curried function
▸ (bankId, accountId, viewId): Promise<any>
Parameters
| Name | Type |
|---|---|
bankId |
string |
accountId |
string |
viewId |
string |
Returns
Promise<any>
Defined in
GetTransactionsForAccountFull
▸ GetTransactionsForAccountFull(config, methodCall): (bankId: string, accountId: string, viewId: string) => Promise<Account>
Get Transactions for Account (Full). Returns transactions list of the account specified by ACCOUNT_ID and moderated by the view (VIEW_ID).
See
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
methodCall |
(config: APIClientConfig, path: string) => Promise<any> |
A higher order function |
Returns
fn
A curried function
▸ (bankId, accountId, viewId): Promise<Account>
Parameters
| Name | Type |
|---|---|
bankId |
string |
accountId |
string |
viewId |
string |
Returns
Promise<Account>
Defined in
UpdateAny
▸ UpdateAny(config, methodCall): (path: string) => (body: any) => Promise<Any>
Update Any Request.
See
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
methodCall |
(config: APIClientConfig, path: string, body: any) => Promise<any> |
A higher order function |
Returns
fn
A curried function
▸ (path): (body: any) => Promise<Any>
Parameters
| Name | Type |
|---|---|
path |
string |
Returns
fn
▸ (body): Promise<Any>
Parameters
| Name | Type |
|---|---|
body |
any |
Returns
Promise<Any>
Defined in
create
▸ create<T>(config, request): any
A POST request function that creates an API data and returns the result.
See
- APIClientConfig
- APIRequest
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
request |
APIRequest<T> |
The APIRequest object |
Returns
any
An
Defined in
discard
▸ discard<T>(config, request): any
A DELETE request function that deletes an API data.
See
- APIClientConfig
- APIRequest
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
request |
APIRequest<T> |
The APIRequest object |
Returns
any
An
Defined in
get
▸ get<T>(config, request): any
A GET request function that returns the API data.
See
- APIClientConfig
- APIRequest
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
request |
APIRequest<T> |
The APIRequest object |
Returns
any
An
Defined in
update
▸ update<T>(config, request): any
A PUT request function that updates an API data and returns the result.
See
- APIClientConfig
- APIRequest
Type parameters
| Name |
|---|
T |
Parameters
| Name | Type | Description |
|---|---|---|
config |
APIClientConfig |
The APIClientConfig object |
request |
APIRequest<T> |
The APIRequest object |
Returns
any
An