diff --git a/.phase9-state.json b/.phase9-state.json index 8834024..f53de82 100644 --- a/.phase9-state.json +++ b/.phase9-state.json @@ -1,10 +1,11 @@ { "completed_features": [], - "current_feature": "integrations-page", + "current_feature": "api-client-phase9", "started_at": "2026-05-23T06:02:21.166704", "attempted_features": [ "webhooks-config", "two-factor-auth-stub", - "billing-stub" + "billing-stub", + "integrations-page" ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index fbd822a..91b0396 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -1090,3 +1090,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 +- `06:06:07` **INFO** Committed feature integrations-page +- `06:06:08` **INFO** Pushed: rc=0 + +## Phase-3 Feature: api-client-phase9 (2026-05-23 06:06:08) + +- `06:06:08` **INFO** Description: API um Webhooks endpoints erweitert +- `06:06:08` **INFO** Generating apps/web/src/lib/api.ts (ERWEITERT — behalte ALLES. Füge: listWebhooks(), createWebhook({url, e…) +- `06:06:52` **INFO** wrote 5133 chars in 44.8s (attempt 1) +- `06:06:52` **INFO** Running tsc --noEmit on api… +- `06:06:54` **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 04b2bc7..cd97a38 100644 --- a/apps/web/src/lib/api.ts +++ b/apps/web/src/lib/api.ts @@ -158,14 +158,6 @@ export const api = { return request(`/projects${query}`) }, - async getProject(id: string) { - return request(`/projects/${id}`) - }, - - async getProjectStats(id: string) { - return request(`/projects/${id}/stats`) - }, - async createProject(data: Partial) { return request("/projects", { method: "POST", @@ -173,20 +165,46 @@ export const api = { }) }, + async updateProject(id: string, data: Partial) { + return request(`/projects/${id}`, { + method: "PATCH", + body: JSON.stringify(data) + }) + }, + async deleteProject(id: string) { return request(`/projects/${id}`, { method: "DELETE" }) }, - async listUsers() { - return request("/users") + async listWebhooks() { + return request("/webhooks") }, - async createUser(data: { email: string; name: string; role: "admin" | "user"; password: string }) { - return request("/users", { + async createWebhook(data: { url: string; event: string }) { + return request("/webhooks", { method: "POST", body: JSON.stringify(data) }) + }, + + async updateWebhook(id: string, data: { url?: string; event?: string }) { + return request(`/webhooks/${id}`, { + method: "PATCH", + body: JSON.stringify(data) + }) + }, + + async deleteWebhook(id: string) { + return request(`/webhooks/${id}`, { + method: "DELETE" + }) + }, + + async testWebhook(id: string) { + return request(`/webhooks/${id}/test`, { + method: "POST" + }) } } \ No newline at end of file