wealthica-sdk-js 0.0.2 → 0.0.4

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.
@@ -17,7 +17,7 @@ interface APIInterface {
17
17
  getTeam(): string;
18
18
  getConnectData(options: ConnectDataOptions): Promise<ConnectData>
19
19
  connect(options?: APIConfig): APIInterface
20
- reconnect(accountId: string): APIUserInterface
20
+ reconnect(institutionId: string): APIUserInterface
21
21
  onConnection(callback: Function): APIInterface
22
22
  onError(callback: Function): APIInterface
23
23
  onEvent(callback: Function): APIInterface
@@ -45,9 +45,9 @@ interface APIUserInterface extends APIInterface {
45
45
 
46
46
  interface InstitutionsInterface {
47
47
  constructor(api: APIUserInterface)
48
- getList(): Promise<Account[]> | Promise<never>
49
- getOne(id: string, params?: {}): Promise<Account> | Promise<never>
50
- sync(id): Promise<Account> | Promise<never>
48
+ getList(): Promise<Institution[]> | Promise<never>
49
+ getOne(id: string, params?: {}): Promise<Institution> | Promise<never>
50
+ sync(id): Promise<Institution> | Promise<never>
51
51
  remove(id): Promise<void> | Promise<never>
52
52
  }
53
53
 
@@ -82,7 +82,7 @@ type TokenOptions = {
82
82
 
83
83
  type ConnectDataOptions = {
84
84
  provider: string;
85
- accountId: string;
85
+ institutionId: string;
86
86
  state: string;
87
87
  origin: string | undefined;
88
88
  lang: string;
@@ -96,16 +96,16 @@ type ConnectData = {
96
96
  }
97
97
 
98
98
  type TransactionsOptions = {
99
- accountId: string;
99
+ institutionId: string;
100
100
  from?: string;
101
101
  to?: string;
102
- wallet?: string;
102
+ investments?: string;
103
103
  last?: string;
104
104
  limit?: number;
105
105
  }
106
106
 
107
107
  type TransactionOptions = {
108
- accountId: string;
108
+ institutionId: string;
109
109
  txId: string;
110
110
  }
111
111
 
@@ -115,8 +115,6 @@ type Part = {
115
115
  provider_ticker: string;
116
116
  amount: string;
117
117
  asset_is_verified?: boolean | null;
118
- fiat_ticker: string;
119
- fiat_value: string;
120
118
  fiat_asset_is_verified?: boolean | null;
121
119
  other_parties: any[];
122
120
  }
@@ -127,8 +125,6 @@ type Fee = {
127
125
  provider_ticker: string;
128
126
  amount: string;
129
127
  asset_is_verified?: boolean | null;
130
- fiat_ticker: string;
131
- fiat_value: string;
132
128
  fiat_asset_is_verified?: boolean | null;
133
129
  resource_type: string;
134
130
  }
@@ -147,18 +143,16 @@ type Transactions = {
147
143
  }
148
144
 
149
145
  type HistoryListOptions = {
150
- accountId: string;
146
+ institutionId: string;
151
147
  from?: string;
152
148
  to?: string;
153
- wallet?: string;
149
+ investments?: string;
154
150
  }
155
151
 
156
152
  type BalanceHistory = {
157
153
  id: string;
158
154
  date: number;
159
- wallet: string;
160
- fiat_ticker: string;
161
- fiat_value: string;
155
+ investment: string;
162
156
  }
163
157
 
164
158
  type Provider = {
@@ -175,7 +169,7 @@ type Provider = {
175
169
  credentials: string[];
176
170
  }
177
171
 
178
- type AccountProvider = {
172
+ type InstitutionProvider = {
179
173
  name: string;
180
174
  display_name: string;
181
175
  logo: string;
@@ -192,8 +186,6 @@ type Balance = {
192
186
  asset_type: string;
193
187
  amount: string;
194
188
  decimals: number;
195
- fiat_ticker: string;
196
- fiat_value: string;
197
189
  fiat_asset_is_verified?: any;
198
190
  logo: string;
199
191
  updated_at: number;
@@ -201,9 +193,9 @@ type Balance = {
201
193
  resource_type: string;
202
194
  }
203
195
 
204
- type Account = {
196
+ type Institution = {
205
197
  id: string;
206
- provider: AccountProvider;
198
+ provider: InstitutionProvider;
207
199
  balances: Balance[];
208
200
  blockchain?: any;
209
201
  created_at: number;