feat(api-client-phase19): API erweitern um invitations, accept, presence [tsc:fail]
This commit is contained in:
parent
15cfd36b2e
commit
8b1755b085
@ -1,10 +1,11 @@
|
|||||||
{
|
{
|
||||||
"completed_features": [],
|
"completed_features": [],
|
||||||
"current_feature": "presence-stub",
|
"current_feature": "api-client-phase19",
|
||||||
"started_at": "2026-05-23T07:42:47.919364",
|
"started_at": "2026-05-23T07:42:47.919364",
|
||||||
"attempted_features": [
|
"attempted_features": [
|
||||||
"invitation-flow",
|
"invitation-flow",
|
||||||
"rate-limiting-stub",
|
"rate-limiting-stub",
|
||||||
"search-history"
|
"search-history",
|
||||||
|
"presence-stub"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -2326,3 +2326,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.
|
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<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
Argument of type 'Promise<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
||||||
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTy
|
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTy
|
||||||
|
- `07:47:20` **INFO** Committed feature presence-stub
|
||||||
|
- `07:47:20` **INFO** Pushed: rc=0
|
||||||
|
|
||||||
|
## Phase-3 Feature: api-client-phase19 (2026-05-23 07:47:20)
|
||||||
|
|
||||||
|
- `07:47:20` **INFO** Description: API erweitern um invitations, accept, presence
|
||||||
|
- `07:47:20` **INFO** Generating apps/web/src/lib/api.ts (ERWEITERT — behalte ALLES. Füge: createInvitation({email, role}), list…)
|
||||||
|
- `07:48:02` **INFO** wrote 4835 chars in 42.2s (attempt 1)
|
||||||
|
- `07:48:02` **INFO** Running tsc --noEmit on api…
|
||||||
|
- `07:48:04` **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<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginCallback<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
||||||
|
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, 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<FastifyMultipartPlugin>' is not assignable to parameter of type 'FastifyPluginAsync<{ limits: { fileSize: number; }; }, RawServerDefault, FastifyTypeProvider, FastifyBaseLogger>'.
|
||||||
|
Type 'Promise<FastifyMultipartPlugin>' provides no match for the signature '(instance: FastifyInstance<RawServerDefault, IncomingMessage, ServerResponse<IncomingMessage>, FastifyBaseLogger, FastifyTy
|
||||||
|
|||||||
@ -166,42 +166,31 @@ export const api = {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
async listApiKeys() {
|
async createInvitation(data: { email: string; role: "admin" | "user" }) {
|
||||||
return request<any[]>("/api-keys")
|
return request("/invitations", {
|
||||||
},
|
|
||||||
|
|
||||||
async createApiKey(name: string) {
|
|
||||||
return request("/api-keys", {
|
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify({ name })
|
body: JSON.stringify(data)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
async revokeApiKey(id: string) {
|
async listInvitations() {
|
||||||
return request(`/api-keys/${id}`, {
|
return request<any[]>("/invitations")
|
||||||
|
},
|
||||||
|
|
||||||
|
async deleteInvitation(id: string) {
|
||||||
|
return request(`/invitations/${id}`, {
|
||||||
method: "DELETE"
|
method: "DELETE"
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
async listAuditLog(filters?: Record<string, string>) {
|
async acceptInvite(token: string, name: string, password: string) {
|
||||||
const query = filters ? `?${new URLSearchParams(filters).toString()}` : ""
|
return request("/invitations/accept", {
|
||||||
return request<any[]>(`/audit-log${query}`)
|
|
||||||
},
|
|
||||||
|
|
||||||
async listEntryComments(entryId: string) {
|
|
||||||
return request<any[]>(`/time-entries/${entryId}/comments`)
|
|
||||||
},
|
|
||||||
|
|
||||||
async createEntryComment(entryId: string, body: string) {
|
|
||||||
return request(`/time-entries/${entryId}/comments`, {
|
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify({ body })
|
body: JSON.stringify({ token, name, password })
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
async deleteEntryComment(id: string) {
|
async getPresence() {
|
||||||
return request(`/comments/${id}`, {
|
return request<any[]>("/presence")
|
||||||
method: "DELETE"
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user