degroshi 1.0.0-beta.1 → 1.0.0-beta.2
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/CHANGELOG.md +29 -0
- package/README.md +21 -1
- package/dist/client.d.ts +42 -10
- package/dist/client.js +114 -18
- package/dist/client.js.map +1 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/sdk.gen.d.ts +12 -6
- package/dist/generated/sdk.gen.js +15 -5
- package/dist/generated/sdk.gen.js.map +1 -1
- package/dist/generated/types.gen.d.ts +535 -96
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/retry.d.ts +4 -1
- package/dist/retry.js +22 -1
- package/dist/retry.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,35 @@
|
|
|
3
3
|
Versions follow semver; the major version follows the API's (v1). The API part of each entry comes from comparing the
|
|
4
4
|
public spec with the last release (oasdiff); the SDK part lists SDK-only changes.
|
|
5
5
|
|
|
6
|
+
## 1.0.0-beta.2 (2026-11-14)
|
|
7
|
+
|
|
8
|
+
### API
|
|
9
|
+
|
|
10
|
+
- Every operation documents its `429 Too Many Requests` answer (error code `BIZ_080`) with the `Retry-After` and
|
|
11
|
+
`X-RateLimit-*` headers.
|
|
12
|
+
- The operations that convert money (accounts, transactions, budgets, recurring occurrences, analytics) document the
|
|
13
|
+
optional `X-Display-Currency` header.
|
|
14
|
+
- The reference reads in English throughout: descriptions and examples no longer quote the app's Ukrainian labels,
|
|
15
|
+
and name fields by their JSON names. `x-error-codes` lists only the codes the API answers with, each with its HTTP
|
|
16
|
+
statuses.
|
|
17
|
+
- `GET /v1/changes`: the change feed, everything that changed since a cursor, deletions included.
|
|
18
|
+
- Transactions carry `linked_activity`: the crypto wallet or exchange activity a row was recorded from (network, hash,
|
|
19
|
+
explorer link, amount and fee legs, status), on reads and in the `transaction.created` / `transaction.updated`
|
|
20
|
+
webhooks.
|
|
21
|
+
- Recurring payments can wait for confirmation: a rule's `mode` gains `confirm`, an occurrence's `status` gains
|
|
22
|
+
`awaiting_confirmation`, and `POST /v1/transactions` takes `recurring_occurrence` to record a waiting payment.
|
|
23
|
+
- Transactions have a place: `place`, `place_id` and `place_source` on reads and writes, and the list filters `city`,
|
|
24
|
+
`country`, `online` and `place_id`. Places aren't switched on yet, so these stay empty for now.
|
|
25
|
+
|
|
26
|
+
### SDK
|
|
27
|
+
|
|
28
|
+
- `changes.list()` and `changes.iterate()`: a `ChangeFeed` that pages the feed and keeps `cursor` for the next read.
|
|
29
|
+
- `recurring.list()` and `get()`, `analytics.summary()`, `spending()` and `trends()`, and `sources.list()`, `get()`,
|
|
30
|
+
`create()`, `update()` and `upsertAccount()` return their response types instead of `unknown`.
|
|
31
|
+
- A delete retried after a lost answer (a dropped connection, a timeout, a 5xx) that then finds nothing (404) counts
|
|
32
|
+
as done: the earlier try deleted it. The stand-in answer is a 204 with `X-Degroshi-Retried-Delete: true`
|
|
33
|
+
(`RETRIED_DELETE_HEADER`). A 404 on the first try still throws `NotFoundError`.
|
|
34
|
+
|
|
6
35
|
## 1.0.0-beta.1 (2026-11-13)
|
|
7
36
|
|
|
8
37
|
### API
|
package/README.md
CHANGED
|
@@ -46,6 +46,24 @@ for await (const transaction of degroshi.transactions.iterate({ from_date: "2026
|
|
|
46
46
|
|
|
47
47
|
Lists that use cursors (`sources.iteratePushed`, `events.iterate`) follow `next_cursor` the same way.
|
|
48
48
|
|
|
49
|
+
## Keeping a copy
|
|
50
|
+
|
|
51
|
+
`changes.iterate()` reads the change feed (`GET /v1/changes`): everything that changed since your cursor, deletions
|
|
52
|
+
included, in the order the changes were saved. Without a cursor it starts with every object. Save `feed.cursor` after
|
|
53
|
+
the loop and pass it next time:
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
const feed = degroshi.changes.iterate({ cursor: saved, types: ["transaction"] })
|
|
57
|
+
for await (const change of feed) {
|
|
58
|
+
if (change.op === "delete") copy.delete(change.id)
|
|
59
|
+
else copy.set(change.id, change.data)
|
|
60
|
+
}
|
|
61
|
+
save(feed.cursor)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
A cursor that can't continue (the space's access changed, 180 days passed) throws a `DegroshiError` with status 410
|
|
65
|
+
and code `CHANGES_RESYNC_REQUIRED`: read again without a cursor and replace the copy.
|
|
66
|
+
|
|
49
67
|
## Money
|
|
50
68
|
|
|
51
69
|
Amounts are strings, exactly as the API sends them (`"642.30"`), so no precision is lost. Don't turn them into
|
|
@@ -89,7 +107,8 @@ try {
|
|
|
89
107
|
|
|
90
108
|
Requests that are safe to repeat are retried on network failures, 408, 429, 500, 502, 503 and 504, with backoff and
|
|
91
109
|
respecting `Retry-After`. `maxRetries` sets how many times (default 2), and `timeoutMs` how long one try may take (default
|
|
92
|
-
60 000).
|
|
110
|
+
60 000). A delete retried after a lost answer that then finds nothing has been done by the earlier try, so it resolves
|
|
111
|
+
instead of throwing `NotFoundError` (the stand-in answer is a 204 with the `RETRIED_DELETE_HEADER` header).
|
|
93
112
|
|
|
94
113
|
## Webhooks
|
|
95
114
|
|
|
@@ -114,6 +133,7 @@ you can catch up after downtime.
|
|
|
114
133
|
- [Developer guide](https://docs.degroshi.com/en/developers): tokens, spaces, limits and errors.
|
|
115
134
|
- [API reference](https://docs.degroshi.com/en/developers/api/me/list-my-spaces): every endpoint and its fields.
|
|
116
135
|
- [Webhooks](https://docs.degroshi.com/en/developers/webhooks): events, signatures and retries.
|
|
136
|
+
- [Keeping a copy](https://docs.degroshi.com/en/developers/changes): the change feed and a Google Sheets recipe.
|
|
117
137
|
|
|
118
138
|
## Versions
|
|
119
139
|
|
package/dist/client.d.ts
CHANGED
|
@@ -39,6 +39,31 @@ export interface WriteOptions {
|
|
|
39
39
|
export interface EditOptions {
|
|
40
40
|
ifMatch?: string | number | null;
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Every change since a cursor, page after page (GET /v1/changes), for keeping a copy: `degroshi.changes.iterate()`.
|
|
44
|
+
* `feed.cursor` is where the next read starts; save it after the loop and pass it as `cursor` next time. A cursor that
|
|
45
|
+
* can't continue throws a DegroshiError with status 410 (code CHANGES_RESYNC_REQUIRED): read again without a cursor
|
|
46
|
+
* and replace the copy.
|
|
47
|
+
*
|
|
48
|
+
* ```ts
|
|
49
|
+
* const feed = degroshi.changes.iterate({ cursor: saved, types: ["transaction"] })
|
|
50
|
+
* for await (const change of feed) {
|
|
51
|
+
* if (change.op === "delete") copy.delete(change.id)
|
|
52
|
+
* else copy.set(change.id, change.data)
|
|
53
|
+
* }
|
|
54
|
+
* save(feed.cursor)
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export declare class ChangeFeed implements AsyncIterable<T.Change> {
|
|
58
|
+
/**
|
|
59
|
+
* Where reading again starts: the start of the page being read, and each page's next_cursor once all of its changes
|
|
60
|
+
* were taken. Stopping early is safe: reading from it again repeats at most the rest of a page (apply by id).
|
|
61
|
+
*/
|
|
62
|
+
cursor: string | undefined;
|
|
63
|
+
private readonly read;
|
|
64
|
+
constructor(read: (cursor: string | undefined) => Promise<T.ChangesResponse>, cursor?: string);
|
|
65
|
+
[Symbol.asyncIterator](): AsyncGenerator<T.Change>;
|
|
66
|
+
}
|
|
42
67
|
/**
|
|
43
68
|
* The Degroshi API client. Amounts are strings, as the API sends them ("642.30"): never parse them into numbers when
|
|
44
69
|
* you add them up.
|
|
@@ -87,27 +112,27 @@ export declare class Degroshi {
|
|
|
87
112
|
get: (id: string) => Promise<T.BudgetResponse>;
|
|
88
113
|
};
|
|
89
114
|
readonly recurring: {
|
|
90
|
-
list: (query?: QueryOf<T.ListRecurringTransactionsData>) => Promise<
|
|
91
|
-
get: (id: string) => Promise<
|
|
115
|
+
list: (query?: QueryOf<T.ListRecurringTransactionsData>) => Promise<T.RecurringResponse[]>;
|
|
116
|
+
get: (id: string) => Promise<T.RecurringResponse>;
|
|
92
117
|
occurrences: (query?: QueryOf<T.ListRecurringOccurrencesData>) => Promise<T.OccurrencesResponse>;
|
|
93
118
|
};
|
|
94
119
|
readonly analytics: {
|
|
95
|
-
summary: (query: QueryOf<T.GetAnalyticsSummaryData>) => Promise<
|
|
120
|
+
summary: (query: QueryOf<T.GetAnalyticsSummaryData>) => Promise<T.SummaryResponse>;
|
|
96
121
|
cashFlow: (query: QueryOf<T.GetAnalyticsCashFlowData>) => Promise<T.CashFlowResponse>;
|
|
97
122
|
categories: (query: QueryOf<T.GetAnalyticsCategoriesData>) => Promise<T.CategoryAnalyticsResponse>;
|
|
98
|
-
spending: (query: QueryOf<T.GetAnalyticsSpendingData>) => Promise<
|
|
99
|
-
trends: (query: QueryOf<T.GetAnalyticsTrendsData>) => Promise<
|
|
123
|
+
spending: (query: QueryOf<T.GetAnalyticsSpendingData>) => Promise<T.SpendingResponse>;
|
|
124
|
+
trends: (query: QueryOf<T.GetAnalyticsTrendsData>) => Promise<T.TrendsResponse>;
|
|
100
125
|
merchants: (query: QueryOf<T.GetAnalyticsMerchantsData>) => Promise<T.MerchantAnalyticsResponse>;
|
|
101
126
|
netWorth: (query: QueryOf<T.GetAnalyticsNetWorthData>) => Promise<T.NetWorthTimeSeriesResponse>;
|
|
102
127
|
};
|
|
103
128
|
/** Custom sources: push accounts, transactions and balances from your own system. */
|
|
104
129
|
readonly sources: {
|
|
105
|
-
list: () => Promise<
|
|
106
|
-
get: (id: string) => Promise<
|
|
107
|
-
create: (body: BodyOf<T.CreateSourceData>, options?: WriteOptions) => Promise<
|
|
108
|
-
update: (id: string, body: BodyOf<T.UpdateSourceData>) => Promise<
|
|
130
|
+
list: () => Promise<T.SourceResponse[]>;
|
|
131
|
+
get: (id: string) => Promise<T.SourceResponse>;
|
|
132
|
+
create: (body: BodyOf<T.CreateSourceData>, options?: WriteOptions) => Promise<T.SourceResponse>;
|
|
133
|
+
update: (id: string, body: BodyOf<T.UpdateSourceData>) => Promise<T.SourceResponse>;
|
|
109
134
|
delete: (id: string) => Promise<undefined>;
|
|
110
|
-
upsertAccount: (id: string, externalId: string, body: BodyOf<T.UpsertSourceAccountData>) => Promise<
|
|
135
|
+
upsertAccount: (id: string, externalId: string, body: BodyOf<T.UpsertSourceAccountData>) => Promise<T.UpsertAccountResponse>;
|
|
111
136
|
/** Up to 500 rows; safe to retry (an Idempotency-Key is sent for you). */
|
|
112
137
|
pushTransactions: (id: string, body: BodyOf<T.PushSourceTransactionsData>, options?: WriteOptions) => Promise<T.PushBatchResponse>;
|
|
113
138
|
pushBalances: (id: string, body: BodyOf<T.PushSourceBalancesData>, options?: WriteOptions) => Promise<T.BalanceBatchResponse>;
|
|
@@ -117,6 +142,13 @@ export declare class Degroshi {
|
|
|
117
142
|
iteratePushed: (id: string, query: QueryOf<T.ListSourceTransactionsData>) => AsyncGenerator<T.PushedRow, any, any>;
|
|
118
143
|
deletePushed: (id: string, account: string, externalId: string) => Promise<undefined>;
|
|
119
144
|
};
|
|
145
|
+
/** What changed in the space since a cursor, deletions included, in the order the changes were saved. */
|
|
146
|
+
readonly changes: {
|
|
147
|
+
/** One page: `items`, `next_cursor` (keep it, even when `items` is empty) and `has_more`. */
|
|
148
|
+
list: (query?: QueryOf<T.ListChangesData>) => Promise<T.ChangesResponse>;
|
|
149
|
+
/** Every change since `cursor` (every object first without one); `feed.cursor` is where to start next time. */
|
|
150
|
+
iterate: (query?: QueryOf<T.ListChangesData>) => ChangeFeed;
|
|
151
|
+
};
|
|
120
152
|
/** The space's events of the last 30 days, as webhook endpoints receive them. */
|
|
121
153
|
readonly events: {
|
|
122
154
|
list: (query?: QueryOf<T.ListEventsData>) => Promise<{
|
package/dist/client.js
CHANGED
|
@@ -1,9 +1,45 @@
|
|
|
1
|
-
import { createClient, createConfig } from "./generated/client/index.js";
|
|
1
|
+
import { createClient, createConfig, } from "./generated/client/index.js";
|
|
2
2
|
import * as api from "./generated/sdk.gen.js";
|
|
3
|
-
import { ApiConnectionError, DegroshiError, errorBodyOf, errorFor } from "./errors.js";
|
|
3
|
+
import { ApiConnectionError, DegroshiError, errorBodyOf, errorFor, } from "./errors.js";
|
|
4
4
|
import { retryingFetch } from "./retry.js";
|
|
5
5
|
import { SDK_VERSION } from "./version.js";
|
|
6
|
-
import { verifyWebhook } from "./webhooks.js";
|
|
6
|
+
import { verifyWebhook, } from "./webhooks.js";
|
|
7
|
+
/**
|
|
8
|
+
* Every change since a cursor, page after page (GET /v1/changes), for keeping a copy: `degroshi.changes.iterate()`.
|
|
9
|
+
* `feed.cursor` is where the next read starts; save it after the loop and pass it as `cursor` next time. A cursor that
|
|
10
|
+
* can't continue throws a DegroshiError with status 410 (code CHANGES_RESYNC_REQUIRED): read again without a cursor
|
|
11
|
+
* and replace the copy.
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* const feed = degroshi.changes.iterate({ cursor: saved, types: ["transaction"] })
|
|
15
|
+
* for await (const change of feed) {
|
|
16
|
+
* if (change.op === "delete") copy.delete(change.id)
|
|
17
|
+
* else copy.set(change.id, change.data)
|
|
18
|
+
* }
|
|
19
|
+
* save(feed.cursor)
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export class ChangeFeed {
|
|
23
|
+
/**
|
|
24
|
+
* Where reading again starts: the start of the page being read, and each page's next_cursor once all of its changes
|
|
25
|
+
* were taken. Stopping early is safe: reading from it again repeats at most the rest of a page (apply by id).
|
|
26
|
+
*/
|
|
27
|
+
cursor;
|
|
28
|
+
read;
|
|
29
|
+
constructor(read, cursor) {
|
|
30
|
+
this.read = read;
|
|
31
|
+
this.cursor = cursor;
|
|
32
|
+
}
|
|
33
|
+
async *[Symbol.asyncIterator]() {
|
|
34
|
+
for (;;) {
|
|
35
|
+
const page = await this.read(this.cursor);
|
|
36
|
+
yield* page.items ?? [];
|
|
37
|
+
this.cursor = page.next_cursor;
|
|
38
|
+
if (!page.has_more)
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
7
43
|
function readEnv(name) {
|
|
8
44
|
const env = globalThis.process?.env;
|
|
9
45
|
return env?.[name];
|
|
@@ -24,7 +60,9 @@ export class Degroshi {
|
|
|
24
60
|
const apiKey = options.apiKey ?? readEnv("DEGROSHI_API_KEY");
|
|
25
61
|
if (!apiKey)
|
|
26
62
|
throw new Error("degroshi: pass apiKey or set DEGROSHI_API_KEY");
|
|
27
|
-
const headers = {
|
|
63
|
+
const headers = {
|
|
64
|
+
"X-Degroshi-SDK": `js/${SDK_VERSION}`,
|
|
65
|
+
};
|
|
28
66
|
if (options.spaceId)
|
|
29
67
|
headers["X-Space-ID"] = options.spaceId;
|
|
30
68
|
this.client = createClient(createConfig({
|
|
@@ -44,7 +82,9 @@ export class Degroshi {
|
|
|
44
82
|
if (response?.ok)
|
|
45
83
|
return (result.data ?? {});
|
|
46
84
|
if (!response) {
|
|
47
|
-
throw result.error instanceof Error
|
|
85
|
+
throw result.error instanceof Error
|
|
86
|
+
? result.error
|
|
87
|
+
: new ApiConnectionError(result.error);
|
|
48
88
|
}
|
|
49
89
|
throw errorFor(response.status, errorBodyOf(response.status, result.error), response.headers);
|
|
50
90
|
}
|
|
@@ -53,13 +93,18 @@ export class Degroshi {
|
|
|
53
93
|
}
|
|
54
94
|
async page(call) {
|
|
55
95
|
const envelope = await this.envelope(call);
|
|
56
|
-
return {
|
|
96
|
+
return {
|
|
97
|
+
data: (envelope.data ?? []),
|
|
98
|
+
meta: envelope.meta,
|
|
99
|
+
};
|
|
57
100
|
}
|
|
58
101
|
writeHeaders(options = {}) {
|
|
59
102
|
return { "Idempotency-Key": options.idempotencyKey ?? crypto.randomUUID() };
|
|
60
103
|
}
|
|
61
104
|
editHeaders(options = {}) {
|
|
62
|
-
return options.ifMatch == null
|
|
105
|
+
return options.ifMatch == null
|
|
106
|
+
? {}
|
|
107
|
+
: { "If-Match": String(options.ifMatch) };
|
|
63
108
|
}
|
|
64
109
|
/** The spaces the token reaches. */
|
|
65
110
|
spaces = {
|
|
@@ -76,9 +121,22 @@ export class Degroshi {
|
|
|
76
121
|
/** Every matching transaction, page after page. */
|
|
77
122
|
iterate: (query = {}) => this.iterateTransactions(query),
|
|
78
123
|
get: (id) => this.one(api.getTransaction({ client: this.client, path: { id } })),
|
|
79
|
-
create: (body, options) => this.one(api.createTransaction({
|
|
80
|
-
|
|
81
|
-
|
|
124
|
+
create: (body, options) => this.one(api.createTransaction({
|
|
125
|
+
client: this.client,
|
|
126
|
+
body,
|
|
127
|
+
headers: this.writeHeaders(options),
|
|
128
|
+
})),
|
|
129
|
+
update: (id, body, options) => this.one(api.updateTransaction({
|
|
130
|
+
client: this.client,
|
|
131
|
+
path: { id },
|
|
132
|
+
body,
|
|
133
|
+
headers: this.editHeaders(options),
|
|
134
|
+
})),
|
|
135
|
+
delete: (id, options) => this.envelope(api.deleteTransaction({
|
|
136
|
+
client: this.client,
|
|
137
|
+
path: { id },
|
|
138
|
+
headers: this.editHeaders(options),
|
|
139
|
+
})).then(() => undefined),
|
|
82
140
|
dayTotals: (query) => this.one(api.getTransactionDayTotals({ client: this.client, query })),
|
|
83
141
|
};
|
|
84
142
|
categories = {
|
|
@@ -107,18 +165,50 @@ export class Degroshi {
|
|
|
107
165
|
sources = {
|
|
108
166
|
list: () => this.one(api.listSources({ client: this.client })),
|
|
109
167
|
get: (id) => this.one(api.getSource({ client: this.client, path: { id } })),
|
|
110
|
-
create: (body, options) => this.one(api.createSource({
|
|
168
|
+
create: (body, options) => this.one(api.createSource({
|
|
169
|
+
client: this.client,
|
|
170
|
+
body,
|
|
171
|
+
headers: this.writeHeaders(options),
|
|
172
|
+
})),
|
|
111
173
|
update: (id, body) => this.one(api.updateSource({ client: this.client, path: { id }, body })),
|
|
112
174
|
delete: (id) => this.envelope(api.deleteSource({ client: this.client, path: { id } })).then(() => undefined),
|
|
113
|
-
upsertAccount: (id, externalId, body) => this.one(api.upsertSourceAccount({
|
|
175
|
+
upsertAccount: (id, externalId, body) => this.one(api.upsertSourceAccount({
|
|
176
|
+
client: this.client,
|
|
177
|
+
path: { id, external_id: externalId },
|
|
178
|
+
body,
|
|
179
|
+
})),
|
|
114
180
|
/** Up to 500 rows; safe to retry (an Idempotency-Key is sent for you). */
|
|
115
|
-
pushTransactions: (id, body, options) => this.one(api.pushSourceTransactions({
|
|
116
|
-
|
|
181
|
+
pushTransactions: (id, body, options) => this.one(api.pushSourceTransactions({
|
|
182
|
+
client: this.client,
|
|
183
|
+
path: { id },
|
|
184
|
+
body,
|
|
185
|
+
headers: this.writeHeaders(options),
|
|
186
|
+
})),
|
|
187
|
+
pushBalances: (id, body, options) => this.one(api.pushSourceBalances({
|
|
188
|
+
client: this.client,
|
|
189
|
+
path: { id },
|
|
190
|
+
body,
|
|
191
|
+
headers: this.writeHeaders(options),
|
|
192
|
+
})),
|
|
117
193
|
/** What the space holds from the source, newest first, one page. */
|
|
118
|
-
listPushed: (id, query) => this.one(api.listSourceTransactions({
|
|
194
|
+
listPushed: (id, query) => this.one(api.listSourceTransactions({
|
|
195
|
+
client: this.client,
|
|
196
|
+
path: { id },
|
|
197
|
+
query,
|
|
198
|
+
})),
|
|
119
199
|
/** Every row the space holds from the source, following next_cursor. */
|
|
120
200
|
iteratePushed: (id, query) => this.iteratePushedRows(id, query),
|
|
121
|
-
deletePushed: (id, account, externalId) => this.envelope(api.deleteSourceTransaction({
|
|
201
|
+
deletePushed: (id, account, externalId) => this.envelope(api.deleteSourceTransaction({
|
|
202
|
+
client: this.client,
|
|
203
|
+
path: { id, account, external_id: externalId },
|
|
204
|
+
})).then(() => undefined),
|
|
205
|
+
};
|
|
206
|
+
/** What changed in the space since a cursor, deletions included, in the order the changes were saved. */
|
|
207
|
+
changes = {
|
|
208
|
+
/** One page: `items`, `next_cursor` (keep it, even when `items` is empty) and `has_more`. */
|
|
209
|
+
list: (query) => this.one(api.listChanges({ client: this.client, query })),
|
|
210
|
+
/** Every change since `cursor` (every object first without one); `feed.cursor` is where to start next time. */
|
|
211
|
+
iterate: (query = {}) => new ChangeFeed((cursor) => this.changes.list({ ...query, cursor }), query.cursor),
|
|
122
212
|
};
|
|
123
213
|
/** The space's events of the last 30 days, as webhook endpoints receive them. */
|
|
124
214
|
events = {
|
|
@@ -132,7 +222,11 @@ export class Degroshi {
|
|
|
132
222
|
};
|
|
133
223
|
async *iterateTransactions(query) {
|
|
134
224
|
for (let page = query.page ?? 1;; page++) {
|
|
135
|
-
const result = await this.transactions.list({
|
|
225
|
+
const result = await this.transactions.list({
|
|
226
|
+
...query,
|
|
227
|
+
page,
|
|
228
|
+
per_page: query.per_page ?? 100,
|
|
229
|
+
});
|
|
136
230
|
yield* result.data;
|
|
137
231
|
if (!result.meta?.has_next || result.data.length === 0)
|
|
138
232
|
return;
|
|
@@ -142,7 +236,9 @@ export class Degroshi {
|
|
|
142
236
|
const envelope = await this.envelope(api.listEvents({ client: this.client, query }));
|
|
143
237
|
return {
|
|
144
238
|
data: (envelope.data ?? []),
|
|
145
|
-
meta: {
|
|
239
|
+
meta: {
|
|
240
|
+
has_more: Boolean(envelope.meta?.has_more),
|
|
241
|
+
},
|
|
146
242
|
};
|
|
147
243
|
}
|
|
148
244
|
async *iterateEvents(query) {
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AACrF,OAAO,KAAK,GAAG,MAAM,wBAAwB,CAAA;AAE7C,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtF,OAAO,EAAgB,aAAa,EAAE,MAAM,YAAY,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAyC,aAAa,EAAE,MAAM,eAAe,CAAA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E,CAAC,CAAC;YAC1E,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC;YACnB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YAChC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI;gBAAE,OAAO;YAC3C,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;QACnB,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,CAAC,iBAAiB,CAC9B,EAAU,EACV,KAA4C;QAE5C,IAAI,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC1B,SAAS,CAAC;YACR,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;YACrE,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;YACxB,IAAI,CAAC,IAAI,CAAC,WAAW;gBAAE,OAAO;YAC9B,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC;QAC5B,CAAC;IACH,CAAC;CACF;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createSource, createTransaction, deleteSource, deleteSourceTransaction, deleteTransaction, getAccount, getAccountsNetWorth, getAnalyticsCashFlow, getAnalyticsCategories, getAnalyticsMerchants, getAnalyticsNetWorth, getAnalyticsSpending, getAnalyticsSummary, getAnalyticsTrends, getBudget, getCategory, getEvent, getRecurringTransaction, getSource, getTransaction, getTransactionDayTotals, listAccounts, listBudgets, listCategories, listEvents, listMySpaces, listRecurringOccurrences, listRecurringTransactions, listSources, listSourceTransactions, listTransactions, type Options, pushSourceBalances, pushSourceTransactions, updateSource, updateTransaction, upsertSourceAccount } from './sdk.gen.js';
|
|
2
|
-
export type { AccountBalanceUpdatedEvent, AccountBrand, AccountConnection, AccountListResponse, AccountListResponseListEnvelope, AccountResponse, AccountResponseEnvelope, AccountsCurrencyInfo, AccountSource, AccountType, AccountWithConvertedBalance, AllocationDisplay, AmountChangeResponse, AnalyticsCurrencyInfo, BalanceBatchRequest, BalanceBatchResponse, BalanceBatchResponseEnvelope, BalanceItem, BalanceResult, BrandResponse, BudgetAllocationResponse, BudgetDisplay, BudgetListItem, BudgetListItemListEnvelope, BudgetPeriod, BudgetResponse, BudgetResponseEnvelope, BudgetThresholdReachedEvent, CashFlowPoint, CashFlowResponse, CashFlowResponseEnvelope, Category, CategoryAnalyticsItem, CategoryAnalyticsResponse, CategoryAnalyticsResponseEnvelope, CategoryEnvelope, CategoryListEnvelope, CategoryReview, CategorySummary, CategoryType, ClientOptions, ConnectionStatusChangedEvent, CreateSourceData, CreateSourceError, CreateSourceErrors, CreateSourceRequest, CreateSourceResponse, CreateSourceResponses, CreateTransactionData, CreateTransactionError, CreateTransactionErrors, CreateTransactionRequest, CreateTransactionResponse, CreateTransactionResponses, DateRange, DayTotal, DayTotalsResponse, DayTotalsResponseEnvelope, DeleteData, DeleteDataEnvelope, DeleteSourceData, DeleteSourceError, DeleteSourceErrors, DeleteSourceResponse, DeleteSourceResponses, DeleteSourceTransactionData, DeleteSourceTransactionError, DeleteSourceTransactionErrors, DeleteSourceTransactionResponse, DeleteSourceTransactionResponses, DeleteTransactionData, DeleteTransactionError, DeleteTransactionErrors, DeleteTransactionResponse, DeleteTransactionResponses, ErrorBody, ErrorResponse, Event, EventCursorMeta, EventEnvelope, EventListPage, EventListPageEnvelope, Frequency, GetAccountData, GetAccountError, GetAccountErrors, GetAccountResponse, GetAccountResponses, GetAccountsNetWorthData, GetAccountsNetWorthError, GetAccountsNetWorthErrors, GetAccountsNetWorthResponse, GetAccountsNetWorthResponses, GetAnalyticsCashFlowData, GetAnalyticsCashFlowError, GetAnalyticsCashFlowErrors, GetAnalyticsCashFlowResponse, GetAnalyticsCashFlowResponses, GetAnalyticsCategoriesData, GetAnalyticsCategoriesError, GetAnalyticsCategoriesErrors, GetAnalyticsCategoriesResponse, GetAnalyticsCategoriesResponses, GetAnalyticsMerchantsData, GetAnalyticsMerchantsError, GetAnalyticsMerchantsErrors, GetAnalyticsMerchantsResponse, GetAnalyticsMerchantsResponses, GetAnalyticsNetWorthData, GetAnalyticsNetWorthError, GetAnalyticsNetWorthErrors, GetAnalyticsNetWorthResponse, GetAnalyticsNetWorthResponses, GetAnalyticsSpendingData, GetAnalyticsSpendingError, GetAnalyticsSpendingErrors, GetAnalyticsSpendingResponse, GetAnalyticsSpendingResponses, GetAnalyticsSummaryData, GetAnalyticsSummaryError, GetAnalyticsSummaryErrors, GetAnalyticsSummaryResponse, GetAnalyticsSummaryResponses, GetAnalyticsTrendsData, GetAnalyticsTrendsError, GetAnalyticsTrendsErrors, GetAnalyticsTrendsResponse, GetAnalyticsTrendsResponses, GetBudgetData, GetBudgetError, GetBudgetErrors, GetBudgetResponse, GetBudgetResponses, GetCategoryData, GetCategoryError, GetCategoryErrors, GetCategoryResponse, GetCategoryResponses, GetEventData, GetEventError, GetEventErrors, GetEventResponse, GetEventResponses, GetRecurringTransactionData, GetRecurringTransactionError, GetRecurringTransactionErrors, GetRecurringTransactionResponse, GetRecurringTransactionResponses, GetSourceData, GetSourceError, GetSourceErrors, GetSourceResponse, GetSourceResponses, GetTransactionData, GetTransactionDayTotalsData, GetTransactionDayTotalsError, GetTransactionDayTotalsErrors, GetTransactionDayTotalsResponse, GetTransactionDayTotalsResponses, GetTransactionError, GetTransactionErrors, GetTransactionResponse, GetTransactionResponses, GradientType, GrantInfo, ImportCompletedEvent, InterestPayout, LastPaidResponse, ListAccountsData, ListAccountsError, ListAccountsErrors, ListAccountsResponse, ListAccountsResponses, ListBudgetsData, ListBudgetsError, ListBudgetsErrors, ListBudgetsResponse, ListBudgetsResponses, ListCategoriesData, ListCategoriesError, ListCategoriesErrors, ListCategoriesResponse, ListCategoriesResponses, ListEventsData, ListEventsError, ListEventsErrors, ListEventsResponse, ListEventsResponses, ListMySpacesData, ListMySpacesError, ListMySpacesErrors, ListMySpacesResponse, ListMySpacesResponses, ListRecurringOccurrencesData, ListRecurringOccurrencesError, ListRecurringOccurrencesErrors, ListRecurringOccurrencesResponse, ListRecurringOccurrencesResponses, ListRecurringTransactionsData, ListRecurringTransactionsError, ListRecurringTransactionsErrors, ListRecurringTransactionsResponse, ListRecurringTransactionsResponses, ListSourcesData, ListSourcesError, ListSourcesErrors, ListSourcesResponse, ListSourcesResponses, ListSourceTransactionsData, ListSourceTransactionsError, ListSourceTransactionsErrors, ListSourceTransactionsResponse, ListSourceTransactionsResponses, ListTransactionsData, ListTransactionsError, ListTransactionsErrors, ListTransactionsResponse, ListTransactionsResponses, MerchantActivity, MerchantAnalyticsResponse, MerchantAnalyticsResponseEnvelope, MerchantCategory, MerchantFigures, Meta, Mode, MySpaceResponse, MySpaceResponseListEnvelope, NetWorthPoint, NetWorthResponse, NetWorthResponseEnvelope, NetWorthTimeSeriesResponse, NetWorthTimeSeriesResponseEnvelope, OccurrenceDayTotal, OccurrenceDisplay, OccurrenceResponse, OccurrencesResponse, OccurrencesResponseEnvelope, OccurrenceStatus, OccurrenceTotals, PossibleDuplicate, PushBatchRequest, PushBatchResponse, PushBatchResponseEnvelope, PushedPage, PushedPageEnvelope, PushedRow, PushItem, PushItemError, PushItemResult, PushItemResultEnvelope, PushOriginal, PushSourceBalancesData, PushSourceBalancesError, PushSourceBalancesErrors, PushSourceBalancesResponse, PushSourceBalancesResponses, PushSourceTransactionsData, PushSourceTransactionsError, PushSourceTransactionsErrors, PushSourceTransactionsResponse, PushSourceTransactionsResponses, ReactionsSummary, RecurringDueEvent, RecurringResponse, RecurringResponseEnvelope, RecurringResponseListEnvelope, RecurringTransactionsKind, SharedWith, SourceResponse, SourceResponseEnvelope, SourceResponseListEnvelope, SourcesKind, SpendingResponse, SpendingResponseEnvelope, Status, SummaryResponse, SummaryResponseEnvelope, TransactionAmountInfo, TransactionAmountsResponse, TransactionCreatedEvent, TransactionDeletedEvent, TransactionExternalDataResponse, TransactionFinancialsResponse, TransactionListResponse, TransactionListResponseEnvelope, TransactionMetadataResponse, TransactionRelationshipsResponse, TransactionResponse, TransactionResponseEnvelope, TransactionsBulkUpdatedEvent, TransactionStatus, TransactionsTransactionDirection, TransactionsTransactionType, TransactionTag, TransactionTimestampsResponse, TransactionTreatment, TransactionUpdatedEvent, TransferDisplay, TransferResponse, TrendComparison, TrendsResponse, TrendsResponseEnvelope, UncategorizedActivity, UncategorizedSpending, UpdateSourceData, UpdateSourceError, UpdateSourceErrors, UpdateSourceRequest, UpdateSourceResponse, UpdateSourceResponses, UpdateTransactionData, UpdateTransactionError, UpdateTransactionErrors, UpdateTransactionRequest, UpdateTransactionResponse, UpdateTransactionResponses, UpsertAccountRequest, UpsertAccountResponse, UpsertAccountResponseEnvelope, UpsertSourceAccountData, UpsertSourceAccountError, UpsertSourceAccountErrors, UpsertSourceAccountResponse, UpsertSourceAccountResponses, WebhookAccountBalanceUpdatedWebhookPayload, WebhookAccountBalanceUpdatedWebhookRequest, WebhookBudgetThresholdReachedWebhookPayload, WebhookBudgetThresholdReachedWebhookRequest, WebhookConnectionStatusChangedWebhookPayload, WebhookConnectionStatusChangedWebhookRequest, WebhookEvent, WebhookImportCompletedWebhookPayload, WebhookImportCompletedWebhookRequest, WebhookRecurringDueWebhookPayload, WebhookRecurringDueWebhookRequest, Webhooks, WebhookTransactionCreatedWebhookPayload, WebhookTransactionCreatedWebhookRequest, WebhookTransactionDeletedWebhookPayload, WebhookTransactionDeletedWebhookRequest, WebhookTransactionsBulkUpdatedWebhookPayload, WebhookTransactionsBulkUpdatedWebhookRequest, WebhookTransactionUpdatedWebhookPayload, WebhookTransactionUpdatedWebhookRequest } from './types.gen.js';
|
|
1
|
+
export { createSource, createTransaction, deleteSource, deleteSourceTransaction, deleteTransaction, getAccount, getAccountsNetWorth, getAnalyticsCashFlow, getAnalyticsCategories, getAnalyticsMerchants, getAnalyticsNetWorth, getAnalyticsSpending, getAnalyticsSummary, getAnalyticsTrends, getBudget, getCategory, getEvent, getRecurringTransaction, getSource, getTransaction, getTransactionDayTotals, listAccounts, listBudgets, listCategories, listChanges, listEvents, listMySpaces, listRecurringOccurrences, listRecurringTransactions, listSources, listSourceTransactions, listTransactions, type Options, pushSourceBalances, pushSourceTransactions, updateSource, updateTransaction, upsertSourceAccount } from './sdk.gen.js';
|
|
2
|
+
export type { AccountBalanceUpdatedEvent, AccountBrand, AccountConnection, AccountListResponse, AccountListResponseListEnvelope, AccountResponse, AccountResponseEnvelope, AccountsCurrencyInfo, AccountSource, AccountType, AccountWithConvertedBalance, AllocationDisplay, AmountChangeResponse, AnalyticsCurrencyInfo, BalanceBatchRequest, BalanceBatchResponse, BalanceBatchResponseEnvelope, BalanceItem, BalanceResult, BrandResponse, BudgetAllocationResponse, BudgetDisplay, BudgetListItem, BudgetListItemListEnvelope, BudgetPeriod, BudgetResponse, BudgetResponseEnvelope, BudgetThresholdReachedEvent, CashFlowPoint, CashFlowResponse, CashFlowResponseEnvelope, Category, CategoryAnalyticsItem, CategoryAnalyticsResponse, CategoryAnalyticsResponseEnvelope, CategoryEnvelope, CategoryListEnvelope, CategoryReview, CategorySummary, CategoryType, Change, ChangesResponse, ChangesResponseEnvelope, ClientOptions, ConnectionStatusChangedEvent, CreatePlaceRequest, CreateSourceData, CreateSourceError, CreateSourceErrors, CreateSourceRequest, CreateSourceResponse, CreateSourceResponses, CreateTransactionData, CreateTransactionError, CreateTransactionErrors, CreateTransactionRequest, CreateTransactionResponse, CreateTransactionResponses, DateRange, DayTotal, DayTotalsResponse, DayTotalsResponseEnvelope, DeleteData, DeleteDataEnvelope, DeleteSourceData, DeleteSourceError, DeleteSourceErrors, DeleteSourceResponse, DeleteSourceResponses, DeleteSourceTransactionData, DeleteSourceTransactionError, DeleteSourceTransactionErrors, DeleteSourceTransactionResponse, DeleteSourceTransactionResponses, DeleteTransactionData, DeleteTransactionError, DeleteTransactionErrors, DeleteTransactionResponse, DeleteTransactionResponses, ErrorBody, ErrorResponse, Event, EventCursorMeta, EventEnvelope, EventListPage, EventListPageEnvelope, Frequency, GetAccountData, GetAccountError, GetAccountErrors, GetAccountResponse, GetAccountResponses, GetAccountsNetWorthData, GetAccountsNetWorthError, GetAccountsNetWorthErrors, GetAccountsNetWorthResponse, GetAccountsNetWorthResponses, GetAnalyticsCashFlowData, GetAnalyticsCashFlowError, GetAnalyticsCashFlowErrors, GetAnalyticsCashFlowResponse, GetAnalyticsCashFlowResponses, GetAnalyticsCategoriesData, GetAnalyticsCategoriesError, GetAnalyticsCategoriesErrors, GetAnalyticsCategoriesResponse, GetAnalyticsCategoriesResponses, GetAnalyticsMerchantsData, GetAnalyticsMerchantsError, GetAnalyticsMerchantsErrors, GetAnalyticsMerchantsResponse, GetAnalyticsMerchantsResponses, GetAnalyticsNetWorthData, GetAnalyticsNetWorthError, GetAnalyticsNetWorthErrors, GetAnalyticsNetWorthResponse, GetAnalyticsNetWorthResponses, GetAnalyticsSpendingData, GetAnalyticsSpendingError, GetAnalyticsSpendingErrors, GetAnalyticsSpendingResponse, GetAnalyticsSpendingResponses, GetAnalyticsSummaryData, GetAnalyticsSummaryError, GetAnalyticsSummaryErrors, GetAnalyticsSummaryResponse, GetAnalyticsSummaryResponses, GetAnalyticsTrendsData, GetAnalyticsTrendsError, GetAnalyticsTrendsErrors, GetAnalyticsTrendsResponse, GetAnalyticsTrendsResponses, GetBudgetData, GetBudgetError, GetBudgetErrors, GetBudgetResponse, GetBudgetResponses, GetCategoryData, GetCategoryError, GetCategoryErrors, GetCategoryResponse, GetCategoryResponses, GetEventData, GetEventError, GetEventErrors, GetEventResponse, GetEventResponses, GetRecurringTransactionData, GetRecurringTransactionError, GetRecurringTransactionErrors, GetRecurringTransactionResponse, GetRecurringTransactionResponses, GetSourceData, GetSourceError, GetSourceErrors, GetSourceResponse, GetSourceResponses, GetTransactionData, GetTransactionDayTotalsData, GetTransactionDayTotalsError, GetTransactionDayTotalsErrors, GetTransactionDayTotalsResponse, GetTransactionDayTotalsResponses, GetTransactionError, GetTransactionErrors, GetTransactionResponse, GetTransactionResponses, GradientType, GrantInfo, ImportCompletedEvent, InterestPayout, LastPaidResponse, LinkedActivityLeg, LinkedActivityResponse, ListAccountsData, ListAccountsError, ListAccountsErrors, ListAccountsResponse, ListAccountsResponses, ListBudgetsData, ListBudgetsError, ListBudgetsErrors, ListBudgetsResponse, ListBudgetsResponses, ListCategoriesData, ListCategoriesError, ListCategoriesErrors, ListCategoriesResponse, ListCategoriesResponses, ListChangesData, ListChangesError, ListChangesErrors, ListChangesResponse, ListChangesResponses, ListEventsData, ListEventsError, ListEventsErrors, ListEventsResponse, ListEventsResponses, ListMySpacesData, ListMySpacesError, ListMySpacesErrors, ListMySpacesResponse, ListMySpacesResponses, ListRecurringOccurrencesData, ListRecurringOccurrencesError, ListRecurringOccurrencesErrors, ListRecurringOccurrencesResponse, ListRecurringOccurrencesResponses, ListRecurringTransactionsData, ListRecurringTransactionsError, ListRecurringTransactionsErrors, ListRecurringTransactionsResponse, ListRecurringTransactionsResponses, ListSourcesData, ListSourcesError, ListSourcesErrors, ListSourcesResponse, ListSourcesResponses, ListSourceTransactionsData, ListSourceTransactionsError, ListSourceTransactionsErrors, ListSourceTransactionsResponse, ListSourceTransactionsResponses, ListTransactionsData, ListTransactionsError, ListTransactionsErrors, ListTransactionsResponse, ListTransactionsResponses, MerchantActivity, MerchantAnalyticsResponse, MerchantAnalyticsResponseEnvelope, MerchantCategory, MerchantFigures, Meta, Mode, MySpaceResponse, MySpaceResponseListEnvelope, NetWorthPoint, NetWorthResponse, NetWorthResponseEnvelope, NetWorthTimeSeriesResponse, NetWorthTimeSeriesResponseEnvelope, ObjectType, OccurrenceDayTotal, OccurrenceDisplay, OccurrenceResponse, OccurrencesResponse, OccurrencesResponseEnvelope, OccurrenceStatus, OccurrenceTotals, PlacesKind, PointName, PossibleDuplicate, Precision, PushBatchRequest, PushBatchResponse, PushBatchResponseEnvelope, PushedPage, PushedPageEnvelope, PushedRow, PushItem, PushItemError, PushItemResult, PushItemResultEnvelope, PushOriginal, PushSourceBalancesData, PushSourceBalancesError, PushSourceBalancesErrors, PushSourceBalancesResponse, PushSourceBalancesResponses, PushSourceTransactionsData, PushSourceTransactionsError, PushSourceTransactionsErrors, PushSourceTransactionsResponse, PushSourceTransactionsResponses, ReactionsSummary, RecurringDueEvent, RecurringOccurrenceRef, RecurringResponse, RecurringResponseEnvelope, RecurringResponseListEnvelope, RecurringTransactionsKind, SharedWith, SourceResponse, SourceResponseEnvelope, SourceResponseListEnvelope, SourcesKind, SpendingResponse, SpendingResponseEnvelope, Status, SummaryResponse, SummaryResponseEnvelope, TransactionAmountInfo, TransactionAmountsResponse, TransactionCreatedEvent, TransactionDeletedEvent, TransactionExternalDataResponse, TransactionFinancialsResponse, TransactionListResponse, TransactionListResponseEnvelope, TransactionMetadataResponse, TransactionPlace, TransactionRelationshipsResponse, TransactionResponse, TransactionResponseEnvelope, TransactionsBulkUpdatedEvent, TransactionStatus, TransactionsTransactionDirection, TransactionsTransactionType, TransactionTag, TransactionTimestampsResponse, TransactionTreatment, TransactionUpdatedEvent, TransferDisplay, TransferResponse, TrendComparison, TrendsResponse, TrendsResponseEnvelope, UncategorizedActivity, UncategorizedSpending, UpdateSourceData, UpdateSourceError, UpdateSourceErrors, UpdateSourceRequest, UpdateSourceResponse, UpdateSourceResponses, UpdateTransactionData, UpdateTransactionError, UpdateTransactionErrors, UpdateTransactionRequest, UpdateTransactionResponse, UpdateTransactionResponses, UpsertAccountRequest, UpsertAccountResponse, UpsertAccountResponseEnvelope, UpsertSourceAccountData, UpsertSourceAccountError, UpsertSourceAccountErrors, UpsertSourceAccountResponse, UpsertSourceAccountResponses, WebhookAccountBalanceUpdatedWebhookPayload, WebhookAccountBalanceUpdatedWebhookRequest, WebhookBudgetThresholdReachedWebhookPayload, WebhookBudgetThresholdReachedWebhookRequest, WebhookConnectionStatusChangedWebhookPayload, WebhookConnectionStatusChangedWebhookRequest, WebhookEvent, WebhookImportCompletedWebhookPayload, WebhookImportCompletedWebhookRequest, WebhookRecurringDueWebhookPayload, WebhookRecurringDueWebhookRequest, Webhooks, WebhookTransactionCreatedWebhookPayload, WebhookTransactionCreatedWebhookRequest, WebhookTransactionDeletedWebhookPayload, WebhookTransactionDeletedWebhookRequest, WebhookTransactionsBulkUpdatedWebhookPayload, WebhookTransactionsBulkUpdatedWebhookRequest, WebhookTransactionUpdatedWebhookPayload, WebhookTransactionUpdatedWebhookRequest } from './types.gen.js';
|
package/dist/generated/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
export { createSource, createTransaction, deleteSource, deleteSourceTransaction, deleteTransaction, getAccount, getAccountsNetWorth, getAnalyticsCashFlow, getAnalyticsCategories, getAnalyticsMerchants, getAnalyticsNetWorth, getAnalyticsSpending, getAnalyticsSummary, getAnalyticsTrends, getBudget, getCategory, getEvent, getRecurringTransaction, getSource, getTransaction, getTransactionDayTotals, listAccounts, listBudgets, listCategories, listEvents, listMySpaces, listRecurringOccurrences, listRecurringTransactions, listSources, listSourceTransactions, listTransactions, pushSourceBalances, pushSourceTransactions, updateSource, updateTransaction, upsertSourceAccount } from './sdk.gen.js';
|
|
2
|
+
export { createSource, createTransaction, deleteSource, deleteSourceTransaction, deleteTransaction, getAccount, getAccountsNetWorth, getAnalyticsCashFlow, getAnalyticsCategories, getAnalyticsMerchants, getAnalyticsNetWorth, getAnalyticsSpending, getAnalyticsSummary, getAnalyticsTrends, getBudget, getCategory, getEvent, getRecurringTransaction, getSource, getTransaction, getTransactionDayTotals, listAccounts, listBudgets, listCategories, listChanges, listEvents, listMySpaces, listRecurringOccurrences, listRecurringTransactions, listSources, listSourceTransactions, listTransactions, pushSourceBalances, pushSourceTransactions, updateSource, updateTransaction, upsertSourceAccount } from './sdk.gen.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,UAAU,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,uBAAuB,EAAE,SAAS,EAAE,cAAc,EAAE,uBAAuB,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,YAAY,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,WAAW,EAAE,sBAAsB,EAAE,gBAAgB,EAAgB,kBAAkB,EAAE,sBAAsB,EAAE,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,UAAU,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,uBAAuB,EAAE,SAAS,EAAE,cAAc,EAAE,uBAAuB,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,WAAW,EAAE,sBAAsB,EAAE,gBAAgB,EAAgB,kBAAkB,EAAE,sBAAsB,EAAE,YAAY,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
|
|
2
|
-
import type { CreateSourceData, CreateSourceErrors, CreateSourceResponses, CreateTransactionData, CreateTransactionErrors, CreateTransactionResponses, DeleteSourceData, DeleteSourceErrors, DeleteSourceResponses, DeleteSourceTransactionData, DeleteSourceTransactionErrors, DeleteSourceTransactionResponses, DeleteTransactionData, DeleteTransactionErrors, DeleteTransactionResponses, GetAccountData, GetAccountErrors, GetAccountResponses, GetAccountsNetWorthData, GetAccountsNetWorthErrors, GetAccountsNetWorthResponses, GetAnalyticsCashFlowData, GetAnalyticsCashFlowErrors, GetAnalyticsCashFlowResponses, GetAnalyticsCategoriesData, GetAnalyticsCategoriesErrors, GetAnalyticsCategoriesResponses, GetAnalyticsMerchantsData, GetAnalyticsMerchantsErrors, GetAnalyticsMerchantsResponses, GetAnalyticsNetWorthData, GetAnalyticsNetWorthErrors, GetAnalyticsNetWorthResponses, GetAnalyticsSpendingData, GetAnalyticsSpendingErrors, GetAnalyticsSpendingResponses, GetAnalyticsSummaryData, GetAnalyticsSummaryErrors, GetAnalyticsSummaryResponses, GetAnalyticsTrendsData, GetAnalyticsTrendsErrors, GetAnalyticsTrendsResponses, GetBudgetData, GetBudgetErrors, GetBudgetResponses, GetCategoryData, GetCategoryErrors, GetCategoryResponses, GetEventData, GetEventErrors, GetEventResponses, GetRecurringTransactionData, GetRecurringTransactionErrors, GetRecurringTransactionResponses, GetSourceData, GetSourceErrors, GetSourceResponses, GetTransactionData, GetTransactionDayTotalsData, GetTransactionDayTotalsErrors, GetTransactionDayTotalsResponses, GetTransactionErrors, GetTransactionResponses, ListAccountsData, ListAccountsErrors, ListAccountsResponses, ListBudgetsData, ListBudgetsErrors, ListBudgetsResponses, ListCategoriesData, ListCategoriesErrors, ListCategoriesResponses, ListEventsData, ListEventsErrors, ListEventsResponses, ListMySpacesData, ListMySpacesErrors, ListMySpacesResponses, ListRecurringOccurrencesData, ListRecurringOccurrencesErrors, ListRecurringOccurrencesResponses, ListRecurringTransactionsData, ListRecurringTransactionsErrors, ListRecurringTransactionsResponses, ListSourcesData, ListSourcesErrors, ListSourcesResponses, ListSourceTransactionsData, ListSourceTransactionsErrors, ListSourceTransactionsResponses, ListTransactionsData, ListTransactionsErrors, ListTransactionsResponses, PushSourceBalancesData, PushSourceBalancesErrors, PushSourceBalancesResponses, PushSourceTransactionsData, PushSourceTransactionsErrors, PushSourceTransactionsResponses, UpdateSourceData, UpdateSourceErrors, UpdateSourceResponses, UpdateTransactionData, UpdateTransactionErrors, UpdateTransactionResponses, UpsertSourceAccountData, UpsertSourceAccountErrors, UpsertSourceAccountResponses } from './types.gen.js';
|
|
2
|
+
import type { CreateSourceData, CreateSourceErrors, CreateSourceResponses, CreateTransactionData, CreateTransactionErrors, CreateTransactionResponses, DeleteSourceData, DeleteSourceErrors, DeleteSourceResponses, DeleteSourceTransactionData, DeleteSourceTransactionErrors, DeleteSourceTransactionResponses, DeleteTransactionData, DeleteTransactionErrors, DeleteTransactionResponses, GetAccountData, GetAccountErrors, GetAccountResponses, GetAccountsNetWorthData, GetAccountsNetWorthErrors, GetAccountsNetWorthResponses, GetAnalyticsCashFlowData, GetAnalyticsCashFlowErrors, GetAnalyticsCashFlowResponses, GetAnalyticsCategoriesData, GetAnalyticsCategoriesErrors, GetAnalyticsCategoriesResponses, GetAnalyticsMerchantsData, GetAnalyticsMerchantsErrors, GetAnalyticsMerchantsResponses, GetAnalyticsNetWorthData, GetAnalyticsNetWorthErrors, GetAnalyticsNetWorthResponses, GetAnalyticsSpendingData, GetAnalyticsSpendingErrors, GetAnalyticsSpendingResponses, GetAnalyticsSummaryData, GetAnalyticsSummaryErrors, GetAnalyticsSummaryResponses, GetAnalyticsTrendsData, GetAnalyticsTrendsErrors, GetAnalyticsTrendsResponses, GetBudgetData, GetBudgetErrors, GetBudgetResponses, GetCategoryData, GetCategoryErrors, GetCategoryResponses, GetEventData, GetEventErrors, GetEventResponses, GetRecurringTransactionData, GetRecurringTransactionErrors, GetRecurringTransactionResponses, GetSourceData, GetSourceErrors, GetSourceResponses, GetTransactionData, GetTransactionDayTotalsData, GetTransactionDayTotalsErrors, GetTransactionDayTotalsResponses, GetTransactionErrors, GetTransactionResponses, ListAccountsData, ListAccountsErrors, ListAccountsResponses, ListBudgetsData, ListBudgetsErrors, ListBudgetsResponses, ListCategoriesData, ListCategoriesErrors, ListCategoriesResponses, ListChangesData, ListChangesErrors, ListChangesResponses, ListEventsData, ListEventsErrors, ListEventsResponses, ListMySpacesData, ListMySpacesErrors, ListMySpacesResponses, ListRecurringOccurrencesData, ListRecurringOccurrencesErrors, ListRecurringOccurrencesResponses, ListRecurringTransactionsData, ListRecurringTransactionsErrors, ListRecurringTransactionsResponses, ListSourcesData, ListSourcesErrors, ListSourcesResponses, ListSourceTransactionsData, ListSourceTransactionsErrors, ListSourceTransactionsResponses, ListTransactionsData, ListTransactionsErrors, ListTransactionsResponses, PushSourceBalancesData, PushSourceBalancesErrors, PushSourceBalancesResponses, PushSourceTransactionsData, PushSourceTransactionsErrors, PushSourceTransactionsResponses, UpdateSourceData, UpdateSourceErrors, UpdateSourceResponses, UpdateTransactionData, UpdateTransactionErrors, UpdateTransactionResponses, UpsertSourceAccountData, UpsertSourceAccountErrors, UpsertSourceAccountResponses } from './types.gen.js';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -97,10 +97,16 @@ export declare const listCategories: <ThrowOnError extends boolean = false>(opti
|
|
|
97
97
|
* One category of the space.
|
|
98
98
|
*/
|
|
99
99
|
export declare const getCategory: <ThrowOnError extends boolean = false>(options: Options<GetCategoryData, ThrowOnError>) => RequestResult<GetCategoryResponses, GetCategoryErrors, ThrowOnError>;
|
|
100
|
+
/**
|
|
101
|
+
* List what changed
|
|
102
|
+
*
|
|
103
|
+
* What changed in the space since a cursor, oldest first: keep a faithful copy by polling, deletions included. Without `cursor` the feed starts from the beginning (every object, then the changes); keep `next_cursor` from every page and send it next time, and while `has_more` is true read again right away. Each item is an object (`transaction`, `account`, `category`, `budget`, `recurring_transaction`) with `op` `upsert` and `data`, the object as its list endpoint returns it, or `delete`. Changes come in commit order, so a slow write never lands behind a cursor already read. Any read scope opens this route, and each type needs the scope that reads it. 410 `CHANGES_RESYNC_REQUIRED` means the cursor can't continue (access changed, 180 days passed, other `types`): read again without a cursor and replace the copy.
|
|
104
|
+
*/
|
|
105
|
+
export declare const listChanges: <ThrowOnError extends boolean = false>(options?: Options<ListChangesData, ThrowOnError>) => RequestResult<ListChangesResponses, ListChangesErrors, ThrowOnError>;
|
|
100
106
|
/**
|
|
101
107
|
* List events
|
|
102
108
|
*
|
|
103
|
-
* The space's events of the last 30 days, newest first, as webhook endpoints receive them.
|
|
109
|
+
* The space's events of the last 30 days, newest first, as webhook endpoints receive them. A space records events from its first personal access token or webhook endpoint: every type while an active token is bound to it, otherwise the types its endpoints take. Any read scope opens this route, and each event type needs the scope that reads its object: `transactions:read` for `transaction.*`, `transactions.bulk_updated` and `import.completed`, `accounts:read` for `account.balance.updated` and `connection.status_changed`, `budgets:read` and `recurring:read` for their events. Filter with `type` and `created_gte`; `meta.has_more` says older events follow, so pass the last `id` as `starting_after`.
|
|
104
110
|
*/
|
|
105
111
|
export declare const listEvents: <ThrowOnError extends boolean = false>(options?: Options<ListEventsData, ThrowOnError>) => RequestResult<ListEventsResponses, ListEventsErrors, ThrowOnError>;
|
|
106
112
|
/**
|
|
@@ -142,7 +148,7 @@ export declare const listSources: <ThrowOnError extends boolean = false>(options
|
|
|
142
148
|
/**
|
|
143
149
|
* Create source
|
|
144
150
|
*
|
|
145
|
-
* Add a custom source to the space (scope `sources:write`, in the
|
|
151
|
+
* Add a custom source to the space (scope `sources:write`, in the “Import from your own source” and “Full access” tokens). A source is read-only by default: the app then changes only its rows' category, merchant, note and tags, and adds no rows of its own to its accounts. Each plan allows a number of sources (403 BILL_013 above it).
|
|
146
152
|
*/
|
|
147
153
|
export declare const createSource: <ThrowOnError extends boolean = false>(options: Options<CreateSourceData, ThrowOnError>) => RequestResult<CreateSourceResponses, CreateSourceErrors, ThrowOnError>;
|
|
148
154
|
/**
|
|
@@ -202,7 +208,7 @@ export declare const listTransactions: <ThrowOnError extends boolean = false>(op
|
|
|
202
208
|
/**
|
|
203
209
|
* Create transaction
|
|
204
210
|
*
|
|
205
|
-
* Add a transaction to a manual account (needs the
|
|
211
|
+
* Add a transaction to a manual account (needs the “Full access” token, scope `transactions:write`). `amount` is positive and `type` says its direction (income or expense). Completed and pending rows move the account's balance; cancelled ones don't. An optional client-made `id` makes the request safe to retry: the same id answers 200 with the stored row and the header `Idempotent-Replayed: true`. An account kept by a bank, wallet or exchange takes no rows from the API (422 TXN_ACCOUNT_CONNECTED). The response carries the row's `version`, also as `ETag`.
|
|
206
212
|
*/
|
|
207
213
|
export declare const createTransaction: <ThrowOnError extends boolean = false>(options: Options<CreateTransactionData, ThrowOnError>) => RequestResult<CreateTransactionResponses, CreateTransactionErrors, ThrowOnError>;
|
|
208
214
|
/**
|
|
@@ -214,7 +220,7 @@ export declare const getTransactionDayTotals: <ThrowOnError extends boolean = fa
|
|
|
214
220
|
/**
|
|
215
221
|
* Delete transaction
|
|
216
222
|
*
|
|
217
|
-
* Delete a transaction and reverse its balance effect (needs the
|
|
223
|
+
* Delete a transaction and reverse its balance effect (needs the “Full access” token, scope `transactions:write`). Deleting one leg of a transfer deletes both legs; deleting a split deletes its parts, and a single part can't be deleted (TXN_047). A repeated delete answers 404. With `If-Match: "<version>"` the delete applies only when the row still has that version.
|
|
218
224
|
*/
|
|
219
225
|
export declare const deleteTransaction: <ThrowOnError extends boolean = false>(options: Options<DeleteTransactionData, ThrowOnError>) => RequestResult<DeleteTransactionResponses, DeleteTransactionErrors, ThrowOnError>;
|
|
220
226
|
/**
|
|
@@ -226,6 +232,6 @@ export declare const getTransaction: <ThrowOnError extends boolean = false>(opti
|
|
|
226
232
|
/**
|
|
227
233
|
* Update transaction
|
|
228
234
|
*
|
|
229
|
-
* Change a transaction (needs the
|
|
235
|
+
* Change a transaction (needs the “Full access” token, scope `transactions:write`); fields left out keep their value. Editing one leg of a transfer updates both. Moving a row to or from `cancelled` reverses or re-applies its balance effect. With `If-Match: "<version>"` the change applies only when the row still has that version; otherwise 412 SYNC_VERSION_MISMATCH.
|
|
230
236
|
*/
|
|
231
237
|
export declare const updateTransaction: <ThrowOnError extends boolean = false>(options: Options<UpdateTransactionData, ThrowOnError>) => RequestResult<UpdateTransactionResponses, UpdateTransactionErrors, ThrowOnError>;
|
|
@@ -142,10 +142,20 @@ export const getCategory = (options) => (options.client ?? client).get({
|
|
|
142
142
|
url: '/v1/categories/{id}',
|
|
143
143
|
...options
|
|
144
144
|
});
|
|
145
|
+
/**
|
|
146
|
+
* List what changed
|
|
147
|
+
*
|
|
148
|
+
* What changed in the space since a cursor, oldest first: keep a faithful copy by polling, deletions included. Without `cursor` the feed starts from the beginning (every object, then the changes); keep `next_cursor` from every page and send it next time, and while `has_more` is true read again right away. Each item is an object (`transaction`, `account`, `category`, `budget`, `recurring_transaction`) with `op` `upsert` and `data`, the object as its list endpoint returns it, or `delete`. Changes come in commit order, so a slow write never lands behind a cursor already read. Any read scope opens this route, and each type needs the scope that reads it. 410 `CHANGES_RESYNC_REQUIRED` means the cursor can't continue (access changed, 180 days passed, other `types`): read again without a cursor and replace the copy.
|
|
149
|
+
*/
|
|
150
|
+
export const listChanges = (options) => (options?.client ?? client).get({
|
|
151
|
+
security: [{ name: 'X-API-Key', type: 'apiKey' }],
|
|
152
|
+
url: '/v1/changes',
|
|
153
|
+
...options
|
|
154
|
+
});
|
|
145
155
|
/**
|
|
146
156
|
* List events
|
|
147
157
|
*
|
|
148
|
-
* The space's events of the last 30 days, newest first, as webhook endpoints receive them.
|
|
158
|
+
* The space's events of the last 30 days, newest first, as webhook endpoints receive them. A space records events from its first personal access token or webhook endpoint: every type while an active token is bound to it, otherwise the types its endpoints take. Any read scope opens this route, and each event type needs the scope that reads its object: `transactions:read` for `transaction.*`, `transactions.bulk_updated` and `import.completed`, `accounts:read` for `account.balance.updated` and `connection.status_changed`, `budgets:read` and `recurring:read` for their events. Filter with `type` and `created_gte`; `meta.has_more` says older events follow, so pass the last `id` as `starting_after`.
|
|
149
159
|
*/
|
|
150
160
|
export const listEvents = (options) => (options?.client ?? client).get({
|
|
151
161
|
security: [{ name: 'X-API-Key', type: 'apiKey' }],
|
|
@@ -215,7 +225,7 @@ export const listSources = (options) => (options?.client ?? client).get({
|
|
|
215
225
|
/**
|
|
216
226
|
* Create source
|
|
217
227
|
*
|
|
218
|
-
* Add a custom source to the space (scope `sources:write`, in the
|
|
228
|
+
* Add a custom source to the space (scope `sources:write`, in the “Import from your own source” and “Full access” tokens). A source is read-only by default: the app then changes only its rows' category, merchant, note and tags, and adds no rows of its own to its accounts. Each plan allows a number of sources (403 BILL_013 above it).
|
|
219
229
|
*/
|
|
220
230
|
export const createSource = (options) => (options.client ?? client).post({
|
|
221
231
|
security: [{ name: 'X-API-Key', type: 'apiKey' }],
|
|
@@ -335,7 +345,7 @@ export const listTransactions = (options) => (options?.client ?? client).get({
|
|
|
335
345
|
/**
|
|
336
346
|
* Create transaction
|
|
337
347
|
*
|
|
338
|
-
* Add a transaction to a manual account (needs the
|
|
348
|
+
* Add a transaction to a manual account (needs the “Full access” token, scope `transactions:write`). `amount` is positive and `type` says its direction (income or expense). Completed and pending rows move the account's balance; cancelled ones don't. An optional client-made `id` makes the request safe to retry: the same id answers 200 with the stored row and the header `Idempotent-Replayed: true`. An account kept by a bank, wallet or exchange takes no rows from the API (422 TXN_ACCOUNT_CONNECTED). The response carries the row's `version`, also as `ETag`.
|
|
339
349
|
*/
|
|
340
350
|
export const createTransaction = (options) => (options.client ?? client).post({
|
|
341
351
|
security: [{ name: 'X-API-Key', type: 'apiKey' }],
|
|
@@ -359,7 +369,7 @@ export const getTransactionDayTotals = (options) => (options?.client ?? client).
|
|
|
359
369
|
/**
|
|
360
370
|
* Delete transaction
|
|
361
371
|
*
|
|
362
|
-
* Delete a transaction and reverse its balance effect (needs the
|
|
372
|
+
* Delete a transaction and reverse its balance effect (needs the “Full access” token, scope `transactions:write`). Deleting one leg of a transfer deletes both legs; deleting a split deletes its parts, and a single part can't be deleted (TXN_047). A repeated delete answers 404. With `If-Match: "<version>"` the delete applies only when the row still has that version.
|
|
363
373
|
*/
|
|
364
374
|
export const deleteTransaction = (options) => (options.client ?? client).delete({
|
|
365
375
|
security: [{ name: 'X-API-Key', type: 'apiKey' }],
|
|
@@ -379,7 +389,7 @@ export const getTransaction = (options) => (options.client ?? client).get({
|
|
|
379
389
|
/**
|
|
380
390
|
* Update transaction
|
|
381
391
|
*
|
|
382
|
-
* Change a transaction (needs the
|
|
392
|
+
* Change a transaction (needs the “Full access” token, scope `transactions:write`); fields left out keep their value. Editing one leg of a transfer updates both. Moving a row to or from `cancelled` reverses or re-applies its balance effect. With `If-Match: "<version>"` the change applies only when the row still has that version; otherwise 412 SYNC_VERSION_MISMATCH.
|
|
383
393
|
*/
|
|
384
394
|
export const updateTransaction = (options) => (options.client ?? client).patch({
|
|
385
395
|
security: [{ name: 'X-API-Key', type: 'apiKey' }],
|