add import types and description from the server, add report data modal

This commit is contained in:
Gregor Vostrak
2024-04-16 23:23:26 +02:00
parent 43e096b153
commit fffa3639d3
7 changed files with 157 additions and 30 deletions

View File

@@ -433,7 +433,7 @@ const endpoints = makeApi([
tasks: z
.object({ created: z.number().int() })
.passthrough(),
'time-entries': z
time_entries: z
.object({ created: z.number().int() })
.passthrough(),
tags: z
@@ -476,6 +476,44 @@ const endpoints = makeApi([
},
],
},
{
method: 'get',
path: '/v1/organizations/:organization/importers',
alias: 'getImporters',
requestFormat: 'json',
parameters: [
{
name: 'organization',
type: 'Path',
schema: z.string().uuid(),
},
],
response: z
.object({
data: z.array(
z
.object({
key: z.string(),
name: z.string(),
description: z.string(),
})
.passthrough()
),
})
.passthrough(),
errors: [
{
status: 403,
description: `Authorization error`,
schema: z.object({ message: z.string() }).passthrough(),
},
{
status: 404,
description: `Not found`,
schema: z.object({ message: z.string() }).passthrough(),
},
],
},
{
method: 'get',
path: '/v1/organizations/:organization/invitations',
@@ -1545,6 +1583,8 @@ const endpoints = makeApi([
method: 'get',
path: '/v1/organizations/:organization/time-entries',
alias: 'getTimeEntries',
description: `If you only need time entries for a specific user, you can filter by `user_id`.
Users with the permission `time-entries:view:own` can only use this endpoint with their own user ID in the user_id filter.`,
requestFormat: 'json',
parameters: [
{