257 lines
5.4 KiB
TypeScript
257 lines
5.4 KiB
TypeScript
|
export interface IBunqApiContext {
|
||
|
apiKey: string;
|
||
|
environment: 'SANDBOX' | 'PRODUCTION';
|
||
|
baseUrl: string;
|
||
|
installationToken?: string;
|
||
|
sessionToken?: string;
|
||
|
serverPublicKey?: string;
|
||
|
clientPrivateKey?: string;
|
||
|
clientPublicKey?: string;
|
||
|
}
|
||
|
|
||
|
export interface IBunqError {
|
||
|
Error: Array<{
|
||
|
error_description: string;
|
||
|
error_description_translated: string;
|
||
|
}>;
|
||
|
}
|
||
|
|
||
|
export interface IBunqPaginationOptions {
|
||
|
count?: number;
|
||
|
newer_id?: number | false;
|
||
|
older_id?: number | false;
|
||
|
}
|
||
|
|
||
|
export interface IBunqRequestOptions {
|
||
|
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'LIST';
|
||
|
endpoint: string;
|
||
|
body?: any;
|
||
|
params?: { [key: string]: any };
|
||
|
useSigning?: boolean;
|
||
|
useSessionToken?: boolean;
|
||
|
}
|
||
|
|
||
|
export interface IBunqInstallationResponse {
|
||
|
Response: Array<{
|
||
|
Id: {
|
||
|
id: number;
|
||
|
};
|
||
|
Token: {
|
||
|
id: number;
|
||
|
created: string;
|
||
|
updated: string;
|
||
|
token: string;
|
||
|
};
|
||
|
ServerPublicKey: {
|
||
|
server_public_key: string;
|
||
|
};
|
||
|
}>;
|
||
|
}
|
||
|
|
||
|
export interface IBunqDeviceServerResponse {
|
||
|
Response: Array<{
|
||
|
Id: {
|
||
|
id: number;
|
||
|
};
|
||
|
}>;
|
||
|
}
|
||
|
|
||
|
export interface IBunqSessionServerResponse {
|
||
|
Response: Array<{
|
||
|
Id: {
|
||
|
id: number;
|
||
|
};
|
||
|
Token: {
|
||
|
id: number;
|
||
|
created: string;
|
||
|
updated: string;
|
||
|
token: string;
|
||
|
};
|
||
|
UserPerson?: {
|
||
|
id: number;
|
||
|
created: string;
|
||
|
updated: string;
|
||
|
[key: string]: any;
|
||
|
};
|
||
|
UserCompany?: {
|
||
|
id: number;
|
||
|
created: string;
|
||
|
updated: string;
|
||
|
[key: string]: any;
|
||
|
};
|
||
|
UserApiKey?: {
|
||
|
id: number;
|
||
|
created: string;
|
||
|
updated: string;
|
||
|
[key: string]: any;
|
||
|
};
|
||
|
}>;
|
||
|
}
|
||
|
|
||
|
export interface IBunqAlias {
|
||
|
type: 'EMAIL' | 'PHONE_NUMBER' | 'IBAN';
|
||
|
value: string;
|
||
|
name?: string;
|
||
|
}
|
||
|
|
||
|
export interface IBunqAmount {
|
||
|
value: string;
|
||
|
currency: string;
|
||
|
}
|
||
|
|
||
|
export interface IBunqPaymentRequest {
|
||
|
amount: IBunqAmount;
|
||
|
counterparty_alias: IBunqAlias;
|
||
|
description: string;
|
||
|
attachment?: Array<{
|
||
|
id: number;
|
||
|
}>;
|
||
|
merchant_reference?: string;
|
||
|
allow_bunqto?: boolean;
|
||
|
}
|
||
|
|
||
|
export interface IBunqScheduledPaymentRequest extends IBunqPaymentRequest {
|
||
|
schedule: {
|
||
|
time_start: string;
|
||
|
time_end?: string;
|
||
|
recurrence_unit: 'ONCE' | 'HOURLY' | 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'YEARLY';
|
||
|
recurrence_size: number;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
export interface IBunqNotificationFilter {
|
||
|
notification_delivery_method: 'URL' | 'PUSH';
|
||
|
notification_target?: string;
|
||
|
category: string;
|
||
|
}
|
||
|
|
||
|
export interface IBunqCard {
|
||
|
id: number;
|
||
|
created: string;
|
||
|
updated: string;
|
||
|
public_uuid: string;
|
||
|
type: 'MAESTRO' | 'MASTERCARD';
|
||
|
sub_type: string;
|
||
|
second_line: string;
|
||
|
status: string;
|
||
|
order_status?: string;
|
||
|
expiry_date?: string;
|
||
|
name_on_card: string;
|
||
|
primary_account_number_four_digit?: string;
|
||
|
limit?: IBunqAmount;
|
||
|
mag_stripe_permission?: {
|
||
|
expiry_time?: string;
|
||
|
};
|
||
|
country_permission?: Array<{
|
||
|
country: string;
|
||
|
expiry_time?: string;
|
||
|
}>;
|
||
|
label_monetary_account_ordered?: any;
|
||
|
label_monetary_account_current?: any;
|
||
|
pin_code_assignment?: Array<any>;
|
||
|
monetary_account_id_fallback?: number;
|
||
|
country?: string;
|
||
|
}
|
||
|
|
||
|
export interface IBunqAvatar {
|
||
|
uuid: string;
|
||
|
anchor_uuid?: string;
|
||
|
image: Array<{
|
||
|
attachment_public_uuid: string;
|
||
|
content_type: string;
|
||
|
height: number;
|
||
|
width: number;
|
||
|
}>;
|
||
|
}
|
||
|
|
||
|
export interface IBunqUser {
|
||
|
id: number;
|
||
|
created: string;
|
||
|
updated: string;
|
||
|
alias?: IBunqAlias[];
|
||
|
avatar?: IBunqAvatar;
|
||
|
status: string;
|
||
|
sub_status?: string;
|
||
|
public_uuid: string;
|
||
|
display_name: string;
|
||
|
public_nick_name?: string;
|
||
|
language: string;
|
||
|
region: string;
|
||
|
session_timeout: number;
|
||
|
daily_limit_without_confirmation_login?: IBunqAmount;
|
||
|
}
|
||
|
|
||
|
export interface IBunqMonetaryAccountBank {
|
||
|
id: number;
|
||
|
created: string;
|
||
|
updated: string;
|
||
|
alias: IBunqAlias[];
|
||
|
avatar: IBunqAvatar;
|
||
|
balance: IBunqAmount;
|
||
|
country: string;
|
||
|
currency: string;
|
||
|
daily_limit: IBunqAmount;
|
||
|
daily_spent: IBunqAmount;
|
||
|
description: string;
|
||
|
public_uuid: string;
|
||
|
status: string;
|
||
|
sub_status: string;
|
||
|
timezone: string;
|
||
|
user_id: number;
|
||
|
monetary_account_profile?: any;
|
||
|
notification_filters: IBunqNotificationFilter[];
|
||
|
setting: any;
|
||
|
connected_cards?: IBunqCard[];
|
||
|
overdraft_limit?: IBunqAmount;
|
||
|
}
|
||
|
|
||
|
export interface IBunqPayment {
|
||
|
id: number;
|
||
|
created: string;
|
||
|
updated: string;
|
||
|
monetary_account_id: number;
|
||
|
amount: IBunqAmount;
|
||
|
description: string;
|
||
|
type: string;
|
||
|
merchant_reference?: string;
|
||
|
alias: IBunqAlias;
|
||
|
counterparty_alias: IBunqAlias;
|
||
|
attachment?: any[];
|
||
|
geolocation?: any;
|
||
|
batch_id?: number;
|
||
|
allow_chat: boolean;
|
||
|
scheduled_id?: number;
|
||
|
address_billing?: any;
|
||
|
address_shipping?: any;
|
||
|
sub_type: string;
|
||
|
request_reference_split_the_bill?: any[];
|
||
|
balance_after_mutation: IBunqAmount;
|
||
|
}
|
||
|
|
||
|
export interface IBunqRequestInquiry {
|
||
|
id: number;
|
||
|
created: string;
|
||
|
updated: string;
|
||
|
time_responded?: string;
|
||
|
time_expiry: string;
|
||
|
monetary_account_id: number;
|
||
|
amount_inquired: IBunqAmount;
|
||
|
amount_responded?: IBunqAmount;
|
||
|
user_alias_created: IBunqAlias;
|
||
|
user_alias_revoked?: IBunqAlias;
|
||
|
counterparty_alias: IBunqAlias;
|
||
|
description: string;
|
||
|
merchant_reference?: string;
|
||
|
attachment?: any[];
|
||
|
status: string;
|
||
|
batch_id?: number;
|
||
|
scheduled_id?: number;
|
||
|
minimum_age?: number;
|
||
|
require_address?: string;
|
||
|
bunqme_share_url?: string;
|
||
|
redirect_url?: string;
|
||
|
address_billing?: any;
|
||
|
address_shipping?: any;
|
||
|
geolocation?: any;
|
||
|
allow_chat?: boolean;
|
||
|
}
|