diff --git a/.phase25-state.json b/.phase25-state.json index 1d4410d..6a67f77 100644 --- a/.phase25-state.json +++ b/.phase25-state.json @@ -1,10 +1,11 @@ { "completed_features": [], - "current_feature": "role-permissions-page", + "current_feature": "api-client-phase25", "started_at": "2026-05-23T08:41:41.344530", "attempted_features": [ "working-hours-config", "default-project-per-customer", - "holiday-calendar" + "holiday-calendar", + "role-permissions-page" ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index 8e38bc2..870de63 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -2956,3 +2956,21 @@ 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, +- `08:46:36` **INFO** Committed feature role-permissions-page +- `08:46:36` **INFO** Pushed: rc=0 + +## Phase-3 Feature: api-client-phase25 (2026-05-23 08:46:36) + +- `08:46:36` **INFO** Description: API um holidays endpoints +- `08:46:36` **INFO** Generating apps/web/src/lib/api.ts (ERWEITERT — behalte ALLES. Füge: listHolidays(), createHoliday({date,n…) +- `08:47:16` **INFO** wrote 4534 chars in 39.8s (attempt 1) +- `08:47:16` **INFO** Running tsc --noEmit on api… +- `08:47:18` **WARN** tsc errors: +src/db/schema.ts(37,14): error TS7022: 'customers' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. +src/db/schema.ts(43,59): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +src/db/schema.ts(47,14): error TS7022: 'projects' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer. +src/db/schema.ts(51,56): error TS7024: Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions. +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, diff --git a/apps/web/src/lib/api.ts b/apps/web/src/lib/api.ts index 3761437..93d7508 100644 --- a/apps/web/src/lib/api.ts +++ b/apps/web/src/lib/api.ts @@ -166,24 +166,20 @@ export const api = { }) }, - async updateProjectBudget(id: string, hours: number) { - return request(`/projects/${id}/budget`, { - method: "PATCH", - body: JSON.stringify({ hours }) - }) + async listHolidays() { + return request("/holidays") }, - async setExternalLink(entryId: string, url: string) { - return request(`/time-entries/${entryId}/external-link`, { - method: "PATCH", - body: JSON.stringify({ url }) - }) - }, - - async testSlackWebhook(url: string) { - return request("/integrations/slack/test", { + async createHoliday(data: { date: string; name: string }) { + return request("/holidays", { method: "POST", - body: JSON.stringify({ url, text: "Hello from EmberClone" }) + body: JSON.stringify(data) + }) + }, + + async deleteHoliday(id: string) { + return request(`/holidays/${id}`, { + method: "DELETE" }) } } \ No newline at end of file