diff --git a/.phase15-state.json b/.phase15-state.json index 1fc69fd..8672543 100644 --- a/.phase15-state.json +++ b/.phase15-state.json @@ -1,10 +1,11 @@ { "completed_features": [], - "current_feature": "weekly-summary-email-stub", + "current_feature": "api-client-phase15", "started_at": "2026-05-23T06:57:51.069062", "attempted_features": [ "saved-views", "webhook-trigger-events", - "password-reset" + "password-reset", + "weekly-summary-email-stub" ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index f5cf8cb..15af24c 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -1837,3 +1837,20 @@ src/index.ts(27,25): error TS2769: No overload matches this call. Overload 2 of 3, '(plugin: FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. Type 'Promise' provides no match for the signature '(instance: FastifyInstance, FastifyBaseLogger, FastifyTy +- `07:04:57` **INFO** Committed feature weekly-summary-email-stub +- `07:04:57` **INFO** Pushed: rc=0 + +## Phase-3 Feature: api-client-phase15 (2026-05-23 07:04:57) + +- `07:04:57` **INFO** Description: API um phase15 endpoints erweitert +- `07:04:57` **INFO** Generating apps/web/src/lib/api.ts (ERWEITERT — behalte ALLES. Füge: listSavedViews(opts?), createSavedVie…) +- `07:05:39` **INFO** wrote 4869 chars in 42.6s (attempt 1) +- `07:05:39` **INFO** Running tsc --noEmit on api… +- `07:05:41` **WARN** tsc errors: +src/index.ts(27,25): error TS2769: No overload matches this call. + Overload 1 of 3, '(plugin: FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. + Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. + Type 'Promise' provides no match for the signature '(instance: FastifyInstance, FastifyBaseLogger, FastifyTypeProvider>, opts: { ...; }, done: (err?: Error | undefined) => void): void'. + Overload 2 of 3, '(plugin: FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>, opts?: FastifyRegisterOptions<...> | undefined): FastifyInstance<...> & PromiseLike<...>', gave the following error. + Argument of type 'Promise' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'. + Type 'Promise' provides no match for the signature '(instance: FastifyInstance, FastifyBaseLogger, FastifyTy diff --git a/apps/web/src/lib/api.ts b/apps/web/src/lib/api.ts index 8ab68ef..eae7f85 100644 --- a/apps/web/src/lib/api.ts +++ b/apps/web/src/lib/api.ts @@ -65,6 +65,20 @@ export const api = { }) }, + async forgotPassword(email: string) { + return request("/auth/forgot-password", { + method: "POST", + body: JSON.stringify({ email }) + }) + }, + + async resetPassword(token: string, password: string) { + return request("/auth/reset-password", { + method: "POST", + body: JSON.stringify({ token, password }) + }) + }, + async updateProfile(data: { name: string }) { return request("/users/me", { method: "PATCH", @@ -166,12 +180,21 @@ export const api = { }) }, - async listInvoices(opts?: Record) { + async listSavedViews(opts?: Record) { const query = opts ? `?${new URLSearchParams(opts).toString()}` : "" - return request(`/invoices${query}`) + return request(`/saved-views${query}`) }, - async getInvoice(id: string) { - return request(`/invoices/${id}`) + async createSavedView(data: any) { + return request("/saved-views", { + method: "POST", + body: JSON.stringify(data) + }) + }, + + async deleteSavedView(id: string) { + return request(`/saved-views/${id}`, { + method: "DELETE" + }) } } \ No newline at end of file