diff --git a/.phase20-state.json b/.phase20-state.json index 5a68f86..f9dece0 100644 --- a/.phase20-state.json +++ b/.phase20-state.json @@ -1,11 +1,12 @@ { "completed_features": [], - "current_feature": "budget-alerts", + "current_feature": "api-client-phase20", "started_at": "2026-05-23T07:57:43.412201", "attempted_features": [ "time-budget-per-project", "recurring-time-entries", "slack-integration-stub", - "github-link-on-entries" + "github-link-on-entries", + "budget-alerts" ] } \ No newline at end of file diff --git a/GENERATION_LOG.md b/GENERATION_LOG.md index 0b3dae0..7d258c1 100644 --- a/GENERATION_LOG.md +++ b/GENERATION_LOG.md @@ -2458,3 +2458,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 +- `08:08:01` **INFO** Committed feature budget-alerts +- `08:08:01` **INFO** Pushed: rc=0 + +## Phase-3 Feature: api-client-phase20 (2026-05-23 08:08:01) + +- `08:08:01` **INFO** Description: API: pinned-customers + budget-update Endpoints +- `08:08:01` **INFO** Generating apps/web/src/lib/api.ts (ERWEITERT — behalte ALLES. Füge: updateProjectBudget(id, hours), setEx…) +- `08:08:43` **INFO** wrote 4748 chars in 41.4s (attempt 1) +- `08:08:43` **INFO** Running tsc --noEmit on api… +- `08:08:44` **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 757826d..3761437 100644 --- a/apps/web/src/lib/api.ts +++ b/apps/web/src/lib/api.ts @@ -166,31 +166,24 @@ export const api = { }) }, - async createInvitation(data: { email: string; role: "admin" | "user" }) { - return request("/invitations", { + async updateProjectBudget(id: string, hours: number) { + return request(`/projects/${id}/budget`, { + method: "PATCH", + body: JSON.stringify({ hours }) + }) + }, + + 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", { method: "POST", - body: JSON.stringify(data) + body: JSON.stringify({ url, text: "Hello from EmberClone" }) }) - }, - - async listInvitations() { - return request("/invitations") - }, - - async deleteInvitation(id: string) { - return request(`/invitations/${id}`, { - method: "DELETE" - }) - }, - - async acceptInvite(token: string, name: string, password: string) { - return request("/invitations/accept", { - method: "POST", - body: JSON.stringify({ token, name, password }) - }) - }, - - async getPresence() { - return request("/presence") } } \ No newline at end of file