@shim-finance/typescript-sdk 0.0.1 → 0.0.3
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/README.md +69 -20
- package/dist/client/client.gen.d.ts.map +1 -1
- package/dist/client/client.gen.js +11 -4
- package/dist/client/types.gen.d.ts +1 -1
- package/dist/client/types.gen.d.ts.map +1 -1
- package/dist/client/utils.gen.d.ts.map +1 -1
- package/dist/client/utils.gen.js +2 -5
- package/dist/core/auth.gen.d.ts.map +1 -1
- package/dist/core/bodySerializer.gen.d.ts +4 -4
- package/dist/core/bodySerializer.gen.d.ts.map +1 -1
- package/dist/core/bodySerializer.gen.js +1 -1
- package/dist/core/params.gen.d.ts.map +1 -1
- package/dist/core/params.gen.js +1 -1
- package/dist/core/pathSerializer.gen.d.ts.map +1 -1
- package/dist/core/pathSerializer.gen.js +3 -11
- package/dist/core/queryKeySerializer.gen.d.ts.map +1 -1
- package/dist/core/queryKeySerializer.gen.js +4 -11
- package/dist/core/serverSentEvents.gen.d.ts.map +1 -1
- package/dist/core/serverSentEvents.gen.js +3 -7
- package/dist/core/types.gen.d.ts.map +1 -1
- package/dist/core/utils.gen.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/sdk.gen.d.ts +172 -2
- package/dist/sdk.gen.d.ts.map +1 -1
- package/dist/sdk.gen.js +188 -2
- package/dist/types.gen.d.ts +181 -1
- package/dist/types.gen.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @shim-finance/typescript-sdk
|
|
2
2
|
|
|
3
|
-
TypeScript SDK for the Shim.Finance REST API.
|
|
3
|
+
TypeScript SDK for the [Shim.Finance](https://shim.finance) REST API.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -8,56 +8,105 @@ TypeScript SDK for the Shim.Finance REST API.
|
|
|
8
8
|
npm install @shim-finance/typescript-sdk
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Quick Start
|
|
12
12
|
|
|
13
13
|
```typescript
|
|
14
|
-
import { client, institutionsList } from '@shim-finance/typescript-sdk';
|
|
14
|
+
import { client, institutionsList, accountsList, transactionsList } from '@shim-finance/typescript-sdk';
|
|
15
15
|
|
|
16
|
-
// Configure the client
|
|
16
|
+
// Configure the client with your API key
|
|
17
17
|
client.setConfig({
|
|
18
18
|
baseUrl: 'https://api.shim.finance',
|
|
19
19
|
headers: {
|
|
20
|
-
Authorization: 'Bearer
|
|
20
|
+
Authorization: 'Bearer sk_live_YOUR_API_KEY',
|
|
21
21
|
},
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
// List institutions
|
|
25
|
-
const
|
|
24
|
+
// List connected institutions
|
|
25
|
+
const institutions = await institutionsList();
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
// List all accounts
|
|
28
|
+
const accounts = await accountsList();
|
|
29
|
+
|
|
30
|
+
// List transactions with filtering
|
|
31
|
+
const transactions = await transactionsList({
|
|
32
|
+
query: {
|
|
33
|
+
startDate: '2026-01-01',
|
|
34
|
+
endDate: '2026-01-31',
|
|
35
|
+
limit: '50',
|
|
36
|
+
},
|
|
37
|
+
});
|
|
32
38
|
```
|
|
33
39
|
|
|
34
40
|
## Custom Client
|
|
35
41
|
|
|
42
|
+
Use `createClient` if you need multiple clients or custom configuration:
|
|
43
|
+
|
|
36
44
|
```typescript
|
|
37
|
-
import { createClient, createConfig,
|
|
45
|
+
import { createClient, createConfig, transactionsSync } from '@shim-finance/typescript-sdk';
|
|
38
46
|
|
|
39
47
|
const myClient = createClient(
|
|
40
48
|
createConfig({
|
|
41
49
|
baseUrl: 'https://api.shim.finance',
|
|
42
50
|
headers: {
|
|
43
|
-
Authorization: 'Bearer
|
|
51
|
+
Authorization: 'Bearer sk_live_YOUR_API_KEY',
|
|
44
52
|
},
|
|
45
53
|
})
|
|
46
54
|
);
|
|
47
55
|
|
|
48
|
-
const { data } = await
|
|
56
|
+
const { data } = await transactionsSync({ client: myClient });
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Error Handling
|
|
60
|
+
|
|
61
|
+
All SDK functions return `{ data, error }`. Check `error` before using `data`:
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
const { data, error } = await transactionsList();
|
|
65
|
+
|
|
66
|
+
if (error) {
|
|
67
|
+
console.error('API error:', error);
|
|
68
|
+
} else {
|
|
69
|
+
console.log(\`Found \${data.total} transactions\`);
|
|
70
|
+
}
|
|
49
71
|
```
|
|
50
72
|
|
|
51
73
|
## API Reference
|
|
52
74
|
|
|
53
75
|
### `institutionsList()`
|
|
54
76
|
|
|
55
|
-
Returns all connected financial institutions for the authenticated user.
|
|
77
|
+
Returns all connected financial institutions (banks) for the authenticated user.
|
|
78
|
+
|
|
79
|
+
### `accountsList()`
|
|
80
|
+
|
|
81
|
+
Returns all bank accounts across all connected institutions.
|
|
82
|
+
|
|
83
|
+
### `transactionsList(options?)`
|
|
84
|
+
|
|
85
|
+
Returns transactions with optional filtering and pagination.
|
|
86
|
+
|
|
87
|
+
| Parameter | Type | Description |
|
|
88
|
+
|-----------|------|-------------|
|
|
89
|
+
| `query.accountId` | `string` | Filter by account ID |
|
|
90
|
+
| `query.startDate` | `string` | Inclusive start date (YYYY-MM-DD) |
|
|
91
|
+
| `query.endDate` | `string` | Inclusive end date (YYYY-MM-DD) |
|
|
92
|
+
| `query.limit` | `string` | Max results per page (default 100, max 500) |
|
|
93
|
+
| `query.offset` | `string` | Number of results to skip |
|
|
94
|
+
|
|
95
|
+
### `transactionsSync(options?)`
|
|
96
|
+
|
|
97
|
+
Incrementally sync transaction changes. Omit `cursor` for initial sync, then pass the returned `cursor` to subsequent calls.
|
|
98
|
+
|
|
99
|
+
| Parameter | Type | Description |
|
|
100
|
+
|-----------|------|-------------|
|
|
101
|
+
| `query.cursor` | `string` | Sync cursor from a previous response |
|
|
102
|
+
|
|
103
|
+
Returns `{ added, modified, removed, cursor, hasMore }`.
|
|
104
|
+
|
|
105
|
+
## Authentication
|
|
106
|
+
|
|
107
|
+
All endpoints require an API key. Create one in your [Shim.Finance dashboard](https://app.shim.finance) under Settings > API Keys.
|
|
56
108
|
|
|
57
|
-
|
|
58
|
-
- `200`: `Institution[]` - Array of institutions
|
|
59
|
-
- `401`: `Unauthorized` - Missing or invalid authorization
|
|
60
|
-
- `500`: `InternalError` - Server error
|
|
109
|
+
API keys use the format `sk_live_<token>`. Include it as a Bearer token in the Authorization header.
|
|
61
110
|
|
|
62
111
|
## License
|
|
63
112
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.gen.d.ts","sourceRoot":"","sources":["../../src/client/client.gen.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"client.gen.d.ts","sourceRoot":"","sources":["../../src/client/client.gen.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAA0C,MAAM,aAAa,CAAC;AAgB1F,eAAO,MAAM,YAAY,GAAI,SAAQ,MAAW,KAAG,MA4QlD,CAAC"}
|
|
@@ -92,8 +92,7 @@ export const createClient = (config = {}) => {
|
|
|
92
92
|
const parseAs = (opts.parseAs === 'auto'
|
|
93
93
|
? getParseAs(response.headers.get('Content-Type'))
|
|
94
94
|
: opts.parseAs) ?? 'json';
|
|
95
|
-
if (response.status === 204 ||
|
|
96
|
-
response.headers.get('Content-Length') === '0') {
|
|
95
|
+
if (response.status === 204 || response.headers.get('Content-Length') === '0') {
|
|
97
96
|
let emptyData;
|
|
98
97
|
switch (parseAs) {
|
|
99
98
|
case 'arrayBuffer':
|
|
@@ -124,10 +123,16 @@ export const createClient = (config = {}) => {
|
|
|
124
123
|
case 'arrayBuffer':
|
|
125
124
|
case 'blob':
|
|
126
125
|
case 'formData':
|
|
127
|
-
case 'json':
|
|
128
126
|
case 'text':
|
|
129
127
|
data = await response[parseAs]();
|
|
130
128
|
break;
|
|
129
|
+
case 'json': {
|
|
130
|
+
// Some servers return 200 with no Content-Length and empty body.
|
|
131
|
+
// response.json() would throw; read as text and parse if non-empty.
|
|
132
|
+
const text = await response.text();
|
|
133
|
+
data = text ? JSON.parse(text) : {};
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
131
136
|
case 'stream':
|
|
132
137
|
return opts.responseStyle === 'data'
|
|
133
138
|
? response.body
|
|
@@ -195,11 +200,13 @@ export const createClient = (config = {}) => {
|
|
|
195
200
|
}
|
|
196
201
|
return request;
|
|
197
202
|
},
|
|
203
|
+
serializedBody: getValidRequestBody(opts),
|
|
198
204
|
url,
|
|
199
205
|
});
|
|
200
206
|
};
|
|
207
|
+
const _buildUrl = (options) => buildUrl({ ..._config, ...options });
|
|
201
208
|
return {
|
|
202
|
-
buildUrl,
|
|
209
|
+
buildUrl: _buildUrl,
|
|
203
210
|
connect: makeMethodFn('CONNECT'),
|
|
204
211
|
delete: makeMethodFn('DELETE'),
|
|
205
212
|
get: makeMethodFn('GET'),
|
|
@@ -47,7 +47,7 @@ export interface Config<T extends ClientOptions = ClientOptions> extends Omit<Re
|
|
|
47
47
|
export interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
48
48
|
responseStyle: TResponseStyle;
|
|
49
49
|
throwOnError: ThrowOnError;
|
|
50
|
-
}>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
50
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
51
51
|
/**
|
|
52
52
|
* Any body that you want to add to your request.
|
|
53
53
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.gen.d.ts","sourceRoot":"","sources":["../../src/client/types.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.gen.d.ts","sourceRoot":"","sources":["../../src/client/types.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,CAAC;AAE9C,MAAM,WAAW,MAAM,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,CAC7D,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC,EAAE,UAAU;IACpE;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC;IACvB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC;IACb;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpF;;;;OAIG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;;OAIG;IACH,YAAY,CAAC,EAAE,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,CAAC,CAAC;CAC3D;AAED,eAAO,MAAM,kBAAkB,GAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,OAAK,UAAU,CACtE,GAAG,EACH,GAAG,EACH,GAAG,EACH,OAAO,CAKP,CAAC;AAkBH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,aAAa,GAAG,aAAa,EAClE,WAAU,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAM,KACtD,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAMxC,CAAC"}
|
package/dist/client/utils.gen.js
CHANGED
|
@@ -65,8 +65,7 @@ export const getParseAs = (contentType) => {
|
|
|
65
65
|
if (!cleanContent) {
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
|
-
if (cleanContent.startsWith('application/json') ||
|
|
69
|
-
cleanContent.endsWith('+json')) {
|
|
68
|
+
if (cleanContent.startsWith('application/json') || cleanContent.endsWith('+json')) {
|
|
70
69
|
return 'json';
|
|
71
70
|
}
|
|
72
71
|
if (cleanContent === 'multipart/form-data') {
|
|
@@ -148,9 +147,7 @@ export const mergeHeaders = (...headers) => {
|
|
|
148
147
|
if (!header) {
|
|
149
148
|
continue;
|
|
150
149
|
}
|
|
151
|
-
const iterator = header instanceof Headers
|
|
152
|
-
? headersEntries(header)
|
|
153
|
-
: Object.entries(header);
|
|
150
|
+
const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
|
|
154
151
|
for (const [key, value] of iterator) {
|
|
155
152
|
if (value === null) {
|
|
156
153
|
mergedHeaders.delete(key);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.gen.d.ts","sourceRoot":"","sources":["../../src/core/auth.gen.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAE3C,MAAM,WAAW,IAAI;IACnB;;;;OAIG;IACH,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IACnC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC5B,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,YAAY,GACvB,MAAM,IAAI,EACV,UAAU,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,GAAG,SAAS,KACrE,OAAO,CAAC,MAAM,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"auth.gen.d.ts","sourceRoot":"","sources":["../../src/core/auth.gen.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAE3C,MAAM,WAAW,IAAI;IACnB;;;;OAIG;IACH,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IACnC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC5B,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,YAAY,GACvB,MAAM,IAAI,EACV,UAAU,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,GAAG,SAAS,KACrE,OAAO,CAAC,MAAM,GAAG,SAAS,CAgB5B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen';
|
|
2
2
|
export type QuerySerializer = (query: Record<string, unknown>) => string;
|
|
3
|
-
export type BodySerializer = (body:
|
|
3
|
+
export type BodySerializer = (body: unknown) => unknown;
|
|
4
4
|
type QuerySerializerOptionsObject = {
|
|
5
5
|
allowReserved?: boolean;
|
|
6
6
|
array?: Partial<SerializerOptions<ArrayStyle>>;
|
|
@@ -14,13 +14,13 @@ export type QuerySerializerOptions = QuerySerializerOptionsObject & {
|
|
|
14
14
|
parameters?: Record<string, QuerySerializerOptionsObject>;
|
|
15
15
|
};
|
|
16
16
|
export declare const formDataBodySerializer: {
|
|
17
|
-
bodySerializer:
|
|
17
|
+
bodySerializer: (body: unknown) => FormData;
|
|
18
18
|
};
|
|
19
19
|
export declare const jsonBodySerializer: {
|
|
20
|
-
bodySerializer:
|
|
20
|
+
bodySerializer: (body: unknown) => string;
|
|
21
21
|
};
|
|
22
22
|
export declare const urlSearchParamsBodySerializer: {
|
|
23
|
-
bodySerializer:
|
|
23
|
+
bodySerializer: (body: unknown) => string;
|
|
24
24
|
};
|
|
25
25
|
export {};
|
|
26
26
|
//# sourceMappingURL=bodySerializer.gen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bodySerializer.gen.d.ts","sourceRoot":"","sources":["../../src/core/bodySerializer.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"bodySerializer.gen.d.ts","sourceRoot":"","sources":["../../src/core/bodySerializer.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEvF,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC;AAEzE,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC;AAExD,KAAK,4BAA4B,GAAG;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;IAC/C,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAC;CAClD,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,4BAA4B,GAAG;IAClE;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,4BAA4B,CAAC,CAAC;CAC3D,CAAC;AAoBF,eAAO,MAAM,sBAAsB;2BACV,OAAO,KAAG,QAAQ;CAgB1C,CAAC;AAEF,eAAO,MAAM,kBAAkB;2BACN,OAAO,KAAG,MAAM;CAExC,CAAC;AAEF,eAAO,MAAM,6BAA6B;2BACjB,OAAO,KAAG,MAAM;CAgBxC,CAAC"}
|
|
@@ -36,7 +36,7 @@ export const formDataBodySerializer = {
|
|
|
36
36
|
},
|
|
37
37
|
};
|
|
38
38
|
export const jsonBodySerializer = {
|
|
39
|
-
bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === 'bigint' ? value.toString() : value),
|
|
39
|
+
bodySerializer: (body) => JSON.stringify(body, (_key, value) => (typeof value === 'bigint' ? value.toString() : value)),
|
|
40
40
|
};
|
|
41
41
|
export const urlSearchParamsBodySerializer = {
|
|
42
42
|
bodySerializer: (body) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"params.gen.d.ts","sourceRoot":"","sources":["../../src/core/params.gen.ts"],"names":[],"mappings":"AAEA,KAAK,IAAI,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAElD,MAAM,MAAM,KAAK,GACb;IACE,EAAE,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GACD;IACE,EAAE,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1B;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GACD;IACE;;OAEG;IACH,GAAG,EAAE,MAA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,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAC5C,IAAI,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;CAC7B;AAED,MAAM,MAAM,YAAY,GAAG,aAAa,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC;AA+CzD,UAAU,MAAM;IACd,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAUD,eAAO,MAAM,iBAAiB,GAAI,MAAM,aAAa,CAAC,OAAO,CAAC,EAAE,QAAQ,YAAY,WAgEnF,CAAC"}
|
package/dist/core/params.gen.js
CHANGED
|
@@ -32,7 +32,7 @@ const buildKeyMap = (fields, map) => {
|
|
|
32
32
|
};
|
|
33
33
|
const stripEmptySlots = (params) => {
|
|
34
34
|
for (const [slot, value] of Object.entries(params)) {
|
|
35
|
-
if (value && typeof value === 'object' && !Object.keys(value).length) {
|
|
35
|
+
if (value && typeof value === 'object' && !Array.isArray(value) && !Object.keys(value).length) {
|
|
36
36
|
delete params[slot];
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pathSerializer.gen.d.ts","sourceRoot":"","sources":["../../src/core/pathSerializer.gen.ts"],"names":[],"mappings":"AAEA,UAAU,gBAAgB,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"pathSerializer.gen.d.ts","sourceRoot":"","sources":["../../src/core/pathSerializer.gen.ts"],"names":[],"mappings":"AAEA,UAAU,gBAAgB,CAAC,CAAC,CAAE,SAAQ,yBAAyB,EAAE,iBAAiB,CAAC,CAAC,CAAC;CAAG;AAExF,UAAU,yBAAyB;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,CAAC,CAAC;CACV;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,gBAAgB,GAAG,eAAe,CAAC;AACrE,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,WAAW,CAAC;AAC3D,KAAK,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACjD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,YAAY,CAAC;AAChD,KAAK,oBAAoB,GAAG,WAAW,GAAG,WAAW,CAAC;AAEtD,UAAU,uBAAwB,SAAQ,yBAAyB;IACjE,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,qBAAqB,GAAI,OAAO,mBAAmB,0BAW/D,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,OAAO,mBAAmB,sBAWjE,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,OAAO,oBAAoB,0BAWjE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,iDAMjC,gBAAgB,CAAC,mBAAmB,CAAC,GAAG;IACzC,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB,WAgCA,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,iCAIrC,uBAAuB,WAYzB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,4DAOlC,gBAAgB,CAAC,oBAAoB,CAAC,GAAG;IAC1C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,WAkCA,CAAC"}
|
|
@@ -62,9 +62,7 @@ export const serializeArrayParam = ({ allowReserved, explode, name, style, value
|
|
|
62
62
|
});
|
|
63
63
|
})
|
|
64
64
|
.join(separator);
|
|
65
|
-
return style === 'label' || style === 'matrix'
|
|
66
|
-
? separator + joinedValues
|
|
67
|
-
: joinedValues;
|
|
65
|
+
return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;
|
|
68
66
|
};
|
|
69
67
|
export const serializePrimitiveParam = ({ allowReserved, name, value, }) => {
|
|
70
68
|
if (value === undefined || value === null) {
|
|
@@ -82,11 +80,7 @@ export const serializeObjectParam = ({ allowReserved, explode, name, style, valu
|
|
|
82
80
|
if (style !== 'deepObject' && !explode) {
|
|
83
81
|
let values = [];
|
|
84
82
|
Object.entries(value).forEach(([key, v]) => {
|
|
85
|
-
values = [
|
|
86
|
-
...values,
|
|
87
|
-
key,
|
|
88
|
-
allowReserved ? v : encodeURIComponent(v),
|
|
89
|
-
];
|
|
83
|
+
values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
|
|
90
84
|
});
|
|
91
85
|
const joinedValues = values.join(',');
|
|
92
86
|
switch (style) {
|
|
@@ -108,7 +102,5 @@ export const serializeObjectParam = ({ allowReserved, explode, name, style, valu
|
|
|
108
102
|
value: v,
|
|
109
103
|
}))
|
|
110
104
|
.join(separator);
|
|
111
|
-
return style === 'label' || style === 'matrix'
|
|
112
|
-
? separator + joinedValues
|
|
113
|
-
: joinedValues;
|
|
105
|
+
return style === 'label' || style === 'matrix' ? separator + joinedValues : joinedValues;
|
|
114
106
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryKeySerializer.gen.d.ts","sourceRoot":"","sources":["../../src/core/queryKeySerializer.gen.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,SAAS,GACjB,IAAI,GACJ,MAAM,GACN,MAAM,GACN,OAAO,GACP,SAAS,EAAE,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEjC;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,EAAE,OAAO,OAAO,
|
|
1
|
+
{"version":3,"file":"queryKeySerializer.gen.d.ts","sourceRoot":"","sources":["../../src/core/queryKeySerializer.gen.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,SAAS,GACjB,IAAI,GACJ,MAAM,GACN,MAAM,GACN,OAAO,GACP,SAAS,EAAE,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEjC;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,EAAE,OAAO,OAAO,0BAWhE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,KAAG,SAAS,GAAG,SAUjE,CAAC;AAqCF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,OAAO,OAAO,KAAG,SAAS,GAAG,SAkCnE,CAAC"}
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
* Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.
|
|
4
4
|
*/
|
|
5
5
|
export const queryKeyJsonReplacer = (_key, value) => {
|
|
6
|
-
if (value === undefined ||
|
|
7
|
-
typeof value === 'function' ||
|
|
8
|
-
typeof value === 'symbol') {
|
|
6
|
+
if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {
|
|
9
7
|
return undefined;
|
|
10
8
|
}
|
|
11
9
|
if (typeof value === 'bigint') {
|
|
@@ -69,14 +67,10 @@ export const serializeQueryKeyValue = (value) => {
|
|
|
69
67
|
if (value === null) {
|
|
70
68
|
return null;
|
|
71
69
|
}
|
|
72
|
-
if (typeof value === 'string' ||
|
|
73
|
-
typeof value === 'number' ||
|
|
74
|
-
typeof value === 'boolean') {
|
|
70
|
+
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
|
|
75
71
|
return value;
|
|
76
72
|
}
|
|
77
|
-
if (value === undefined ||
|
|
78
|
-
typeof value === 'function' ||
|
|
79
|
-
typeof value === 'symbol') {
|
|
73
|
+
if (value === undefined || typeof value === 'function' || typeof value === 'symbol') {
|
|
80
74
|
return undefined;
|
|
81
75
|
}
|
|
82
76
|
if (typeof value === 'bigint') {
|
|
@@ -88,8 +82,7 @@ export const serializeQueryKeyValue = (value) => {
|
|
|
88
82
|
if (Array.isArray(value)) {
|
|
89
83
|
return stringifyToJsonValue(value);
|
|
90
84
|
}
|
|
91
|
-
if (typeof URLSearchParams !== 'undefined' &&
|
|
92
|
-
value instanceof URLSearchParams) {
|
|
85
|
+
if (typeof URLSearchParams !== 'undefined' && value instanceof URLSearchParams) {
|
|
93
86
|
return serializeSearchParams(value);
|
|
94
87
|
}
|
|
95
88
|
if (isPlainObject(value)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serverSentEvents.gen.d.ts","sourceRoot":"","sources":["../../src/core/serverSentEvents.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,MAAM,uBAAuB,CAAC,KAAK,GAAG,OAAO,IAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"serverSentEvents.gen.d.ts","sourceRoot":"","sources":["../../src/core/serverSentEvents.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,MAAM,uBAAuB,CAAC,KAAK,GAAG,OAAO,IAAI,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,GAChF,IAAI,CAAC,MAAM,EAAE,QAAQ,GAAG,qBAAqB,GAAG,mBAAmB,CAAC,GAAG;IACrE;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACjE;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IACjD,cAAc,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEJ,MAAM,WAAW,WAAW,CAAC,KAAK,GAAG,OAAO;IAC1C,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,sBAAsB,CAAC,KAAK,GAAG,OAAO,EAAE,OAAO,GAAG,IAAI,EAAE,KAAK,GAAG,OAAO,IAAI;IACrF,MAAM,EAAE,cAAc,CACpB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,EAClE,OAAO,EACP,KAAK,CACN,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,KAAK,GAAG,OAAO,EAAE,yKAY9C,uBAAuB,KAAG,sBAAsB,CAAC,KAAK,CAqJxD,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
export const createSseClient = ({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) => {
|
|
3
3
|
let lastEventId;
|
|
4
|
-
const sleep = sseSleepFn ??
|
|
5
|
-
((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
4
|
+
const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
6
5
|
const createStream = async function* () {
|
|
7
6
|
let retryDelay = sseDefaultRetryDelay ?? 3000;
|
|
8
7
|
let attempt = 0;
|
|
@@ -37,9 +36,7 @@ export const createSseClient = ({ onRequest, onSseError, onSseEvent, responseTra
|
|
|
37
36
|
throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
|
|
38
37
|
if (!response.body)
|
|
39
38
|
throw new Error('No body in SSE response');
|
|
40
|
-
const reader = response.body
|
|
41
|
-
.pipeThrough(new TextDecoderStream())
|
|
42
|
-
.getReader();
|
|
39
|
+
const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
|
|
43
40
|
let buffer = '';
|
|
44
41
|
const abortHandler = () => {
|
|
45
42
|
try {
|
|
@@ -122,8 +119,7 @@ export const createSseClient = ({ onRequest, onSseError, onSseEvent, responseTra
|
|
|
122
119
|
catch (error) {
|
|
123
120
|
// connection failed or aborted; retry after delay
|
|
124
121
|
onSseError?.(error);
|
|
125
|
-
if (sseMaxRetryAttempts !== undefined &&
|
|
126
|
-
attempt >= sseMaxRetryAttempts) {
|
|
122
|
+
if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {
|
|
127
123
|
break; // stop after firing error
|
|
128
124
|
}
|
|
129
125
|
// exponential backoff: double retry each attempt, cap at 30s
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.gen.d.ts","sourceRoot":"","sources":["../../src/core/types.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.gen.d.ts","sourceRoot":"","sources":["../../src/core/types.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,SAA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,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,aAAa,QAAgB,CAAC;AAE3C,eAAO,MAAM,qBAAqB,GAAI,qBAAqB,cAAc,
|
|
1
|
+
{"version":3,"file":"utils.gen.d.ts","sourceRoot":"","sources":["../../src/core/utils.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAQ5E,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,aAAa,QAAgB,CAAC;AAE3C,eAAO,MAAM,qBAAqB,GAAI,qBAAqB,cAAc,WAiExE,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,uDAMpB;IACD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,eAAe,EAAE,eAAe,CAAC;IACjC,GAAG,EAAE,MAAM,CAAC;CACb,WAcA,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE;IAC3C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,WAuBA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { institutionsList, type Options } from './sdk.gen';
|
|
2
|
-
export type { ClientOptions, DateTimeUtc, HttpApiDecodeError, Institution, InstitutionsListData, InstitutionsListError, InstitutionsListErrors, InstitutionsListResponse, InstitutionsListResponses, InternalError, Issue, PropertyKey, Unauthorized } from './types.gen';
|
|
1
|
+
export { accountsList, institutionsList, type Options, transactionsList, transactionsSync } from './sdk.gen';
|
|
2
|
+
export type { Account, AccountsListData, AccountsListError, AccountsListErrors, AccountsListResponse, AccountsListResponses, BadRequest, ClientOptions, DateTimeUtc, HttpApiDecodeError, Institution, InstitutionsListData, InstitutionsListError, InstitutionsListErrors, InstitutionsListResponse, InstitutionsListResponses, InternalError, Issue, NumberFromString, PropertyKey, RemovedTransaction, Transaction, TransactionCategory, TransactionListResponse, TransactionLocation, TransactionMerchant, TransactionsListData, TransactionsListError, TransactionsListErrors, TransactionsListResponse, TransactionsListResponses, TransactionsSyncData, TransactionsSyncError, TransactionsSyncErrors, TransactionsSyncResponse, TransactionsSyncResponses, TransactionSyncResponse, Unauthorized } from './types.gen';
|
|
3
3
|
export { client, type CreateClientConfig } from './client.gen';
|
|
4
4
|
export { createClient, createConfig } from '@hey-api/client-fetch';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,KAAK,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7G,YAAY,EAAE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,aAAa,EAAE,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC7xB,OAAO,EAAE,MAAM,EAAE,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
export { institutionsList } from './sdk.gen';
|
|
2
|
+
export { accountsList, institutionsList, transactionsList, transactionsSync } from './sdk.gen';
|
|
3
3
|
export { client } from './client.gen';
|
|
4
4
|
export { createClient, createConfig } from '@hey-api/client-fetch';
|
package/dist/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, Options as Options2, TDataShape } from './client';
|
|
2
|
-
import type { InstitutionsListData, InstitutionsListErrors, InstitutionsListResponses } from './types.gen';
|
|
2
|
+
import type { AccountsListData, AccountsListErrors, AccountsListResponses, InstitutionsListData, InstitutionsListErrors, InstitutionsListResponses, TransactionsListData, TransactionsListErrors, TransactionsListResponses, TransactionsSyncData, TransactionsSyncErrors, TransactionsSyncResponses } from './types.gen';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -16,7 +16,177 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
|
|
|
16
16
|
/**
|
|
17
17
|
* List institutions
|
|
18
18
|
*
|
|
19
|
-
* Returns all connected financial institutions for the authenticated user
|
|
19
|
+
* Returns all connected financial institutions for the authenticated user.
|
|
20
|
+
*
|
|
21
|
+
* Each institution represents a bank or financial institution that you've connected via Plaid Link.
|
|
22
|
+
*
|
|
23
|
+
* **Example Request:**
|
|
24
|
+
*
|
|
25
|
+
* ```bash
|
|
26
|
+
* curl https://api.shim.finance/v1/institutions \
|
|
27
|
+
* -H "Authorization: Bearer sk_live_YOUR_API_KEY"
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* **Example Response:**
|
|
31
|
+
*
|
|
32
|
+
* ```json
|
|
33
|
+
* [
|
|
34
|
+
* {
|
|
35
|
+
* "id": "plaid_xxxxxx",
|
|
36
|
+
* "institutionId": "ins_1",
|
|
37
|
+
* "institutionName": "Chase",
|
|
38
|
+
* "status": "healthy",
|
|
39
|
+
* "lastSyncedAt": "2026-01-25T10:30:00Z",
|
|
40
|
+
* "createdAt": "2026-01-20T08:15:00Z"
|
|
41
|
+
* }
|
|
42
|
+
* ]
|
|
43
|
+
* ```
|
|
20
44
|
*/
|
|
21
45
|
export declare const institutionsList: <ThrowOnError extends boolean = false>(options?: Options<InstitutionsListData, ThrowOnError>) => import("./client").RequestResult<InstitutionsListResponses, InstitutionsListErrors, ThrowOnError, "fields">;
|
|
46
|
+
/**
|
|
47
|
+
* List accounts
|
|
48
|
+
*
|
|
49
|
+
* Returns all bank accounts across all connected institutions for the authenticated user.
|
|
50
|
+
*
|
|
51
|
+
* Each account represents a checking, savings, credit card, or other financial account.
|
|
52
|
+
*
|
|
53
|
+
* **Example Request:**
|
|
54
|
+
*
|
|
55
|
+
* ```bash
|
|
56
|
+
* curl https://api.shim.finance/v1/accounts \
|
|
57
|
+
* -H "Authorization: Bearer sk_live_YOUR_API_KEY"
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* **Example Response:**
|
|
61
|
+
*
|
|
62
|
+
* ```json
|
|
63
|
+
* [
|
|
64
|
+
* {
|
|
65
|
+
* "id": "account_xxxxxx",
|
|
66
|
+
* "institutionId": "plaid_xxxxxx",
|
|
67
|
+
* "name": "Checking",
|
|
68
|
+
* "officialName": "Chase Total Checking",
|
|
69
|
+
* "type": "depository",
|
|
70
|
+
* "subtype": "checking",
|
|
71
|
+
* "mask": "1234",
|
|
72
|
+
* "createdAt": "2026-01-20T08:15:00Z"
|
|
73
|
+
* }
|
|
74
|
+
* ]
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
export declare const accountsList: <ThrowOnError extends boolean = false>(options?: Options<AccountsListData, ThrowOnError>) => import("./client").RequestResult<AccountsListResponses, AccountsListErrors, ThrowOnError, "fields">;
|
|
78
|
+
/**
|
|
79
|
+
* List transactions
|
|
80
|
+
*
|
|
81
|
+
* Returns transactions across all connected accounts for the authenticated user, with optional filtering and pagination.
|
|
82
|
+
*
|
|
83
|
+
* **Filtering:**
|
|
84
|
+
* - `accountId` — filter to a specific account
|
|
85
|
+
* - `startDate` / `endDate` — filter by transaction date (YYYY-MM-DD, inclusive)
|
|
86
|
+
*
|
|
87
|
+
* **Pagination:**
|
|
88
|
+
* - `limit` — max results per page (default: 100, max: 500)
|
|
89
|
+
* - `offset` — number of results to skip
|
|
90
|
+
*
|
|
91
|
+
* **Example Request:**
|
|
92
|
+
*
|
|
93
|
+
* ```bash
|
|
94
|
+
* curl "https://api.shim.finance/v1/transactions?startDate=2026-01-01&limit=50" \
|
|
95
|
+
* -H "Authorization: Bearer sk_live_YOUR_API_KEY"
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* **Example Response:**
|
|
99
|
+
*
|
|
100
|
+
* ```json
|
|
101
|
+
* {
|
|
102
|
+
* "data": [
|
|
103
|
+
* {
|
|
104
|
+
* "id": "txn_abc123",
|
|
105
|
+
* "accountId": "account_xyz",
|
|
106
|
+
* "amount": 42.50,
|
|
107
|
+
* "pending": false,
|
|
108
|
+
* "date": "2026-01-15",
|
|
109
|
+
* "authorizedDate": "2026-01-14",
|
|
110
|
+
* "name": "AMAZON.COM*MK1AB2CD3",
|
|
111
|
+
* "merchant": {
|
|
112
|
+
* "name": "Amazon",
|
|
113
|
+
* "logoUrl": "https://plaid-merchant-logos.plaid.com/amazon.png",
|
|
114
|
+
* "website": "amazon.com"
|
|
115
|
+
* },
|
|
116
|
+
* "location": null,
|
|
117
|
+
* "category": {
|
|
118
|
+
* "primary": "GENERAL_MERCHANDISE",
|
|
119
|
+
* "detailed": "GENERAL_MERCHANDISE_ONLINE_MARKETPLACES"
|
|
120
|
+
* },
|
|
121
|
+
* "paymentChannel": "online",
|
|
122
|
+
* "currencyCode": "USD",
|
|
123
|
+
* "createdAt": "2026-01-15T10:30:00Z"
|
|
124
|
+
* }
|
|
125
|
+
* ],
|
|
126
|
+
* "total": 1250,
|
|
127
|
+
* "limit": 50,
|
|
128
|
+
* "offset": 0
|
|
129
|
+
* }
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
export declare const transactionsList: <ThrowOnError extends boolean = false>(options?: Options<TransactionsListData, ThrowOnError>) => import("./client").RequestResult<TransactionsListResponses, TransactionsListErrors, ThrowOnError, "fields">;
|
|
133
|
+
/**
|
|
134
|
+
* Sync transactions
|
|
135
|
+
*
|
|
136
|
+
* Returns transaction changes since the last sync cursor.
|
|
137
|
+
*
|
|
138
|
+
* **Initial sync (no cursor):**
|
|
139
|
+
* Omit the `cursor` parameter to get all current transactions as `added`.
|
|
140
|
+
*
|
|
141
|
+
* **Incremental sync:**
|
|
142
|
+
* Pass the `cursor` from a previous response to get only changes since then.
|
|
143
|
+
*
|
|
144
|
+
* **Response fields:**
|
|
145
|
+
* - `added` — newly created transactions
|
|
146
|
+
* - `modified` — updated transactions (full object, latest state)
|
|
147
|
+
* - `removed` — deleted transaction IDs
|
|
148
|
+
* - `cursor` — pass this to the next sync call
|
|
149
|
+
* - `hasMore` — if true, call again with the returned cursor to get remaining changes
|
|
150
|
+
*
|
|
151
|
+
* **Example Request:**
|
|
152
|
+
*
|
|
153
|
+
* ```bash
|
|
154
|
+
* # Initial sync
|
|
155
|
+
* curl "https://api.shim.finance/v1/transactions/sync" \
|
|
156
|
+
* -H "Authorization: Bearer sk_live_YOUR_API_KEY"
|
|
157
|
+
*
|
|
158
|
+
* # Incremental sync
|
|
159
|
+
* curl "https://api.shim.finance/v1/transactions/sync?cursor=42" \
|
|
160
|
+
* -H "Authorization: Bearer sk_live_YOUR_API_KEY"
|
|
161
|
+
* ```
|
|
162
|
+
*
|
|
163
|
+
* **Example Response:**
|
|
164
|
+
*
|
|
165
|
+
* ```json
|
|
166
|
+
* {
|
|
167
|
+
* "added": [
|
|
168
|
+
* {
|
|
169
|
+
* "id": "txn_abc123",
|
|
170
|
+
* "accountId": "account_xyz",
|
|
171
|
+
* "amount": 42.50,
|
|
172
|
+
* "pending": false,
|
|
173
|
+
* "date": "2026-01-15",
|
|
174
|
+
* "name": "AMAZON.COM*MK1AB2CD3",
|
|
175
|
+
* "merchant": { "name": "Amazon", "logoUrl": null, "website": "amazon.com" },
|
|
176
|
+
* "location": null,
|
|
177
|
+
* "category": { "primary": "GENERAL_MERCHANDISE", "detailed": "GENERAL_MERCHANDISE_ONLINE_MARKETPLACES" },
|
|
178
|
+
* "paymentChannel": "online",
|
|
179
|
+
* "currencyCode": "USD",
|
|
180
|
+
* "authorizedDate": "2026-01-14",
|
|
181
|
+
* "createdAt": "2026-01-15T10:30:00Z"
|
|
182
|
+
* }
|
|
183
|
+
* ],
|
|
184
|
+
* "modified": [],
|
|
185
|
+
* "removed": [],
|
|
186
|
+
* "cursor": "42",
|
|
187
|
+
* "hasMore": false
|
|
188
|
+
* }
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
export declare const transactionsSync: <ThrowOnError extends boolean = false>(options?: Options<TransactionsSyncData, ThrowOnError>) => import("./client").RequestResult<TransactionsSyncResponses, TransactionsSyncErrors, ThrowOnError, "fields">;
|
|
22
192
|
//# sourceMappingURL=sdk.gen.d.ts.map
|
package/dist/sdk.gen.d.ts.map
CHANGED
|
@@ -1 +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AE,UAAU,OAAO,CAAC,gBAAgB,EAAE,YAAY,CAAC,wGAIlH,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,gBAAgB,GAAI,YAAY,SAAS,OAAO,GAAG,KAAK,EAAE,UAAU,OAAO,CAAC,oBAAoB,EAAE,YAAY,CAAC,gHAI1H,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,eAAO,MAAM,gBAAgB,GAAI,YAAY,SAAS,OAAO,GAAG,KAAK,EAAE,UAAU,OAAO,CAAC,oBAAoB,EAAE,YAAY,CAAC,gHAI1H,CAAC"}
|
package/dist/sdk.gen.js
CHANGED
|
@@ -3,6 +3,192 @@ import { client } from './client.gen';
|
|
|
3
3
|
/**
|
|
4
4
|
* List institutions
|
|
5
5
|
*
|
|
6
|
-
* Returns all connected financial institutions for the authenticated user
|
|
6
|
+
* Returns all connected financial institutions for the authenticated user.
|
|
7
|
+
*
|
|
8
|
+
* Each institution represents a bank or financial institution that you've connected via Plaid Link.
|
|
9
|
+
*
|
|
10
|
+
* **Example Request:**
|
|
11
|
+
*
|
|
12
|
+
* ```bash
|
|
13
|
+
* curl https://api.shim.finance/v1/institutions \
|
|
14
|
+
* -H "Authorization: Bearer sk_live_YOUR_API_KEY"
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* **Example Response:**
|
|
18
|
+
*
|
|
19
|
+
* ```json
|
|
20
|
+
* [
|
|
21
|
+
* {
|
|
22
|
+
* "id": "plaid_xxxxxx",
|
|
23
|
+
* "institutionId": "ins_1",
|
|
24
|
+
* "institutionName": "Chase",
|
|
25
|
+
* "status": "healthy",
|
|
26
|
+
* "lastSyncedAt": "2026-01-25T10:30:00Z",
|
|
27
|
+
* "createdAt": "2026-01-20T08:15:00Z"
|
|
28
|
+
* }
|
|
29
|
+
* ]
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export const institutionsList = (options) => (options?.client ?? client).get({
|
|
33
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
34
|
+
url: '/v1/institutions',
|
|
35
|
+
...options
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* List accounts
|
|
39
|
+
*
|
|
40
|
+
* Returns all bank accounts across all connected institutions for the authenticated user.
|
|
41
|
+
*
|
|
42
|
+
* Each account represents a checking, savings, credit card, or other financial account.
|
|
43
|
+
*
|
|
44
|
+
* **Example Request:**
|
|
45
|
+
*
|
|
46
|
+
* ```bash
|
|
47
|
+
* curl https://api.shim.finance/v1/accounts \
|
|
48
|
+
* -H "Authorization: Bearer sk_live_YOUR_API_KEY"
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* **Example Response:**
|
|
52
|
+
*
|
|
53
|
+
* ```json
|
|
54
|
+
* [
|
|
55
|
+
* {
|
|
56
|
+
* "id": "account_xxxxxx",
|
|
57
|
+
* "institutionId": "plaid_xxxxxx",
|
|
58
|
+
* "name": "Checking",
|
|
59
|
+
* "officialName": "Chase Total Checking",
|
|
60
|
+
* "type": "depository",
|
|
61
|
+
* "subtype": "checking",
|
|
62
|
+
* "mask": "1234",
|
|
63
|
+
* "createdAt": "2026-01-20T08:15:00Z"
|
|
64
|
+
* }
|
|
65
|
+
* ]
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export const accountsList = (options) => (options?.client ?? client).get({
|
|
69
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
70
|
+
url: '/v1/accounts',
|
|
71
|
+
...options
|
|
72
|
+
});
|
|
73
|
+
/**
|
|
74
|
+
* List transactions
|
|
75
|
+
*
|
|
76
|
+
* Returns transactions across all connected accounts for the authenticated user, with optional filtering and pagination.
|
|
77
|
+
*
|
|
78
|
+
* **Filtering:**
|
|
79
|
+
* - `accountId` — filter to a specific account
|
|
80
|
+
* - `startDate` / `endDate` — filter by transaction date (YYYY-MM-DD, inclusive)
|
|
81
|
+
*
|
|
82
|
+
* **Pagination:**
|
|
83
|
+
* - `limit` — max results per page (default: 100, max: 500)
|
|
84
|
+
* - `offset` — number of results to skip
|
|
85
|
+
*
|
|
86
|
+
* **Example Request:**
|
|
87
|
+
*
|
|
88
|
+
* ```bash
|
|
89
|
+
* curl "https://api.shim.finance/v1/transactions?startDate=2026-01-01&limit=50" \
|
|
90
|
+
* -H "Authorization: Bearer sk_live_YOUR_API_KEY"
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
93
|
+
* **Example Response:**
|
|
94
|
+
*
|
|
95
|
+
* ```json
|
|
96
|
+
* {
|
|
97
|
+
* "data": [
|
|
98
|
+
* {
|
|
99
|
+
* "id": "txn_abc123",
|
|
100
|
+
* "accountId": "account_xyz",
|
|
101
|
+
* "amount": 42.50,
|
|
102
|
+
* "pending": false,
|
|
103
|
+
* "date": "2026-01-15",
|
|
104
|
+
* "authorizedDate": "2026-01-14",
|
|
105
|
+
* "name": "AMAZON.COM*MK1AB2CD3",
|
|
106
|
+
* "merchant": {
|
|
107
|
+
* "name": "Amazon",
|
|
108
|
+
* "logoUrl": "https://plaid-merchant-logos.plaid.com/amazon.png",
|
|
109
|
+
* "website": "amazon.com"
|
|
110
|
+
* },
|
|
111
|
+
* "location": null,
|
|
112
|
+
* "category": {
|
|
113
|
+
* "primary": "GENERAL_MERCHANDISE",
|
|
114
|
+
* "detailed": "GENERAL_MERCHANDISE_ONLINE_MARKETPLACES"
|
|
115
|
+
* },
|
|
116
|
+
* "paymentChannel": "online",
|
|
117
|
+
* "currencyCode": "USD",
|
|
118
|
+
* "createdAt": "2026-01-15T10:30:00Z"
|
|
119
|
+
* }
|
|
120
|
+
* ],
|
|
121
|
+
* "total": 1250,
|
|
122
|
+
* "limit": 50,
|
|
123
|
+
* "offset": 0
|
|
124
|
+
* }
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
export const transactionsList = (options) => (options?.client ?? client).get({
|
|
128
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
129
|
+
url: '/v1/transactions',
|
|
130
|
+
...options
|
|
131
|
+
});
|
|
132
|
+
/**
|
|
133
|
+
* Sync transactions
|
|
134
|
+
*
|
|
135
|
+
* Returns transaction changes since the last sync cursor.
|
|
136
|
+
*
|
|
137
|
+
* **Initial sync (no cursor):**
|
|
138
|
+
* Omit the `cursor` parameter to get all current transactions as `added`.
|
|
139
|
+
*
|
|
140
|
+
* **Incremental sync:**
|
|
141
|
+
* Pass the `cursor` from a previous response to get only changes since then.
|
|
142
|
+
*
|
|
143
|
+
* **Response fields:**
|
|
144
|
+
* - `added` — newly created transactions
|
|
145
|
+
* - `modified` — updated transactions (full object, latest state)
|
|
146
|
+
* - `removed` — deleted transaction IDs
|
|
147
|
+
* - `cursor` — pass this to the next sync call
|
|
148
|
+
* - `hasMore` — if true, call again with the returned cursor to get remaining changes
|
|
149
|
+
*
|
|
150
|
+
* **Example Request:**
|
|
151
|
+
*
|
|
152
|
+
* ```bash
|
|
153
|
+
* # Initial sync
|
|
154
|
+
* curl "https://api.shim.finance/v1/transactions/sync" \
|
|
155
|
+
* -H "Authorization: Bearer sk_live_YOUR_API_KEY"
|
|
156
|
+
*
|
|
157
|
+
* # Incremental sync
|
|
158
|
+
* curl "https://api.shim.finance/v1/transactions/sync?cursor=42" \
|
|
159
|
+
* -H "Authorization: Bearer sk_live_YOUR_API_KEY"
|
|
160
|
+
* ```
|
|
161
|
+
*
|
|
162
|
+
* **Example Response:**
|
|
163
|
+
*
|
|
164
|
+
* ```json
|
|
165
|
+
* {
|
|
166
|
+
* "added": [
|
|
167
|
+
* {
|
|
168
|
+
* "id": "txn_abc123",
|
|
169
|
+
* "accountId": "account_xyz",
|
|
170
|
+
* "amount": 42.50,
|
|
171
|
+
* "pending": false,
|
|
172
|
+
* "date": "2026-01-15",
|
|
173
|
+
* "name": "AMAZON.COM*MK1AB2CD3",
|
|
174
|
+
* "merchant": { "name": "Amazon", "logoUrl": null, "website": "amazon.com" },
|
|
175
|
+
* "location": null,
|
|
176
|
+
* "category": { "primary": "GENERAL_MERCHANDISE", "detailed": "GENERAL_MERCHANDISE_ONLINE_MARKETPLACES" },
|
|
177
|
+
* "paymentChannel": "online",
|
|
178
|
+
* "currencyCode": "USD",
|
|
179
|
+
* "authorizedDate": "2026-01-14",
|
|
180
|
+
* "createdAt": "2026-01-15T10:30:00Z"
|
|
181
|
+
* }
|
|
182
|
+
* ],
|
|
183
|
+
* "modified": [],
|
|
184
|
+
* "removed": [],
|
|
185
|
+
* "cursor": "42",
|
|
186
|
+
* "hasMore": false
|
|
187
|
+
* }
|
|
188
|
+
* ```
|
|
7
189
|
*/
|
|
8
|
-
export const
|
|
190
|
+
export const transactionsSync = (options) => (options?.client ?? client).get({
|
|
191
|
+
security: [{ scheme: 'bearer', type: 'http' }],
|
|
192
|
+
url: '/v1/transactions/sync',
|
|
193
|
+
...options
|
|
194
|
+
});
|
package/dist/types.gen.d.ts
CHANGED
|
@@ -50,11 +50,81 @@ export type InternalError = {
|
|
|
50
50
|
message: string;
|
|
51
51
|
_tag: 'InternalError';
|
|
52
52
|
};
|
|
53
|
+
export type Account = {
|
|
54
|
+
id: string;
|
|
55
|
+
institutionId: string;
|
|
56
|
+
name: string;
|
|
57
|
+
officialName: string | null;
|
|
58
|
+
type: string;
|
|
59
|
+
subtype: string | null;
|
|
60
|
+
mask: string | null;
|
|
61
|
+
createdAt: DateTimeUtc;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* a string to be decoded into a number
|
|
65
|
+
*/
|
|
66
|
+
export type NumberFromString = string;
|
|
67
|
+
export type TransactionListResponse = {
|
|
68
|
+
data: Array<Transaction>;
|
|
69
|
+
total: number;
|
|
70
|
+
limit: number;
|
|
71
|
+
offset: number;
|
|
72
|
+
};
|
|
73
|
+
export type Transaction = {
|
|
74
|
+
id: string;
|
|
75
|
+
accountId: string;
|
|
76
|
+
amount: number;
|
|
77
|
+
pending: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Transaction date (YYYY-MM-DD)
|
|
80
|
+
*/
|
|
81
|
+
date: string;
|
|
82
|
+
authorizedDate: string | null;
|
|
83
|
+
name: string | null;
|
|
84
|
+
merchant: TransactionMerchant | null;
|
|
85
|
+
location: TransactionLocation | null;
|
|
86
|
+
category: TransactionCategory | null;
|
|
87
|
+
paymentChannel: 'online' | 'in store' | 'other' | null;
|
|
88
|
+
currencyCode: string | null;
|
|
89
|
+
createdAt: DateTimeUtc;
|
|
90
|
+
};
|
|
91
|
+
export type TransactionMerchant = {
|
|
92
|
+
name: string | null;
|
|
93
|
+
logoUrl: string | null;
|
|
94
|
+
website: string | null;
|
|
95
|
+
};
|
|
96
|
+
export type TransactionLocation = {
|
|
97
|
+
address: string | null;
|
|
98
|
+
city: string | null;
|
|
99
|
+
region: string | null;
|
|
100
|
+
postalCode: string | null;
|
|
101
|
+
country: string | null;
|
|
102
|
+
lat: number | null;
|
|
103
|
+
lon: number | null;
|
|
104
|
+
};
|
|
105
|
+
export type TransactionCategory = {
|
|
106
|
+
primary: string;
|
|
107
|
+
detailed: string;
|
|
108
|
+
};
|
|
109
|
+
export type TransactionSyncResponse = {
|
|
110
|
+
added: Array<Transaction>;
|
|
111
|
+
modified: Array<Transaction>;
|
|
112
|
+
removed: Array<RemovedTransaction>;
|
|
113
|
+
cursor: string;
|
|
114
|
+
hasMore: boolean;
|
|
115
|
+
};
|
|
116
|
+
export type RemovedTransaction = {
|
|
117
|
+
id: string;
|
|
118
|
+
};
|
|
119
|
+
export type BadRequest = {
|
|
120
|
+
message: string;
|
|
121
|
+
_tag: 'BadRequest';
|
|
122
|
+
};
|
|
53
123
|
export type InstitutionsListData = {
|
|
54
124
|
body?: never;
|
|
55
125
|
path?: never;
|
|
56
126
|
query?: never;
|
|
57
|
-
url: '/
|
|
127
|
+
url: '/v1/institutions';
|
|
58
128
|
};
|
|
59
129
|
export type InstitutionsListErrors = {
|
|
60
130
|
/**
|
|
@@ -78,4 +148,114 @@ export type InstitutionsListResponses = {
|
|
|
78
148
|
200: Array<Institution>;
|
|
79
149
|
};
|
|
80
150
|
export type InstitutionsListResponse = InstitutionsListResponses[keyof InstitutionsListResponses];
|
|
151
|
+
export type AccountsListData = {
|
|
152
|
+
body?: never;
|
|
153
|
+
path?: never;
|
|
154
|
+
query?: never;
|
|
155
|
+
url: '/v1/accounts';
|
|
156
|
+
};
|
|
157
|
+
export type AccountsListErrors = {
|
|
158
|
+
/**
|
|
159
|
+
* The request did not match the expected schema
|
|
160
|
+
*/
|
|
161
|
+
400: HttpApiDecodeError;
|
|
162
|
+
/**
|
|
163
|
+
* Unauthorized
|
|
164
|
+
*/
|
|
165
|
+
401: Unauthorized;
|
|
166
|
+
/**
|
|
167
|
+
* InternalError
|
|
168
|
+
*/
|
|
169
|
+
500: InternalError;
|
|
170
|
+
};
|
|
171
|
+
export type AccountsListError = AccountsListErrors[keyof AccountsListErrors];
|
|
172
|
+
export type AccountsListResponses = {
|
|
173
|
+
/**
|
|
174
|
+
* Success
|
|
175
|
+
*/
|
|
176
|
+
200: Array<Account>;
|
|
177
|
+
};
|
|
178
|
+
export type AccountsListResponse = AccountsListResponses[keyof AccountsListResponses];
|
|
179
|
+
export type TransactionsListData = {
|
|
180
|
+
body?: never;
|
|
181
|
+
path?: never;
|
|
182
|
+
query?: {
|
|
183
|
+
/**
|
|
184
|
+
* Filter by account ID
|
|
185
|
+
*/
|
|
186
|
+
accountId?: string;
|
|
187
|
+
/**
|
|
188
|
+
* Inclusive start date (YYYY-MM-DD)
|
|
189
|
+
*/
|
|
190
|
+
startDate?: string;
|
|
191
|
+
/**
|
|
192
|
+
* Inclusive end date (YYYY-MM-DD)
|
|
193
|
+
*/
|
|
194
|
+
endDate?: string;
|
|
195
|
+
/**
|
|
196
|
+
* Max results per page (default 100, max 500)
|
|
197
|
+
*/
|
|
198
|
+
limit?: NumberFromString;
|
|
199
|
+
/**
|
|
200
|
+
* Number of results to skip for pagination
|
|
201
|
+
*/
|
|
202
|
+
offset?: NumberFromString;
|
|
203
|
+
};
|
|
204
|
+
url: '/v1/transactions';
|
|
205
|
+
};
|
|
206
|
+
export type TransactionsListErrors = {
|
|
207
|
+
/**
|
|
208
|
+
* The request did not match the expected schema
|
|
209
|
+
*/
|
|
210
|
+
400: HttpApiDecodeError;
|
|
211
|
+
/**
|
|
212
|
+
* Unauthorized
|
|
213
|
+
*/
|
|
214
|
+
401: Unauthorized;
|
|
215
|
+
/**
|
|
216
|
+
* InternalError
|
|
217
|
+
*/
|
|
218
|
+
500: InternalError;
|
|
219
|
+
};
|
|
220
|
+
export type TransactionsListError = TransactionsListErrors[keyof TransactionsListErrors];
|
|
221
|
+
export type TransactionsListResponses = {
|
|
222
|
+
/**
|
|
223
|
+
* TransactionListResponse
|
|
224
|
+
*/
|
|
225
|
+
200: TransactionListResponse;
|
|
226
|
+
};
|
|
227
|
+
export type TransactionsListResponse = TransactionsListResponses[keyof TransactionsListResponses];
|
|
228
|
+
export type TransactionsSyncData = {
|
|
229
|
+
body?: never;
|
|
230
|
+
path?: never;
|
|
231
|
+
query?: {
|
|
232
|
+
/**
|
|
233
|
+
* Sync cursor from a previous response. Omit for initial sync.
|
|
234
|
+
*/
|
|
235
|
+
cursor?: string;
|
|
236
|
+
};
|
|
237
|
+
url: '/v1/transactions/sync';
|
|
238
|
+
};
|
|
239
|
+
export type TransactionsSyncErrors = {
|
|
240
|
+
/**
|
|
241
|
+
* The request did not match the expected schema
|
|
242
|
+
*/
|
|
243
|
+
400: HttpApiDecodeError | BadRequest;
|
|
244
|
+
/**
|
|
245
|
+
* Unauthorized
|
|
246
|
+
*/
|
|
247
|
+
401: Unauthorized;
|
|
248
|
+
/**
|
|
249
|
+
* InternalError
|
|
250
|
+
*/
|
|
251
|
+
500: InternalError;
|
|
252
|
+
};
|
|
253
|
+
export type TransactionsSyncError = TransactionsSyncErrors[keyof TransactionsSyncErrors];
|
|
254
|
+
export type TransactionsSyncResponses = {
|
|
255
|
+
/**
|
|
256
|
+
* TransactionSyncResponse
|
|
257
|
+
*/
|
|
258
|
+
200: TransactionSyncResponse;
|
|
259
|
+
};
|
|
260
|
+
export type TransactionsSyncResponse = TransactionsSyncResponses[keyof TransactionsSyncResponses];
|
|
81
261
|
//# sourceMappingURL=types.gen.d.ts.map
|
package/dist/types.gen.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.gen.d.ts","sourceRoot":"","sources":["../src/types.gen.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG;IACxB,OAAO,EAAE,0BAA0B,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;CACvD,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;IAC5B,YAAY,EAAE,WAAW,GAAG,IAAI,CAAC;IACjC,SAAS,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC7B,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,oBAAoB,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG;IAChB;;OAEG;IACH,IAAI,EAAE,SAAS,GAAG,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,gBAAgB,GAAG,MAAM,GAAG,WAAW,CAAC;IAClH;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IACzB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MA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