-
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix ui exports, change api package bunder to vite, fix type exports
- Loading branch information
Showing
8 changed files
with
1,996 additions
and
126 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import type { ApiOf, ZodiosResponseByAlias, ZodiosBodyByAlias, ZodiosQueryParamsByAlias } from '@zodios/core'; | ||
Check warning on line 1 in resources/js/packages/api/src/index.d.ts GitHub Actions / build
|
||
export type SolidTimeApi = ApiOf<typeof api>; | ||
export type InvitationsIndexResponse = ZodiosResponseByAlias<SolidTimeApi, 'getInvitations'>; | ||
export type CreateInvitationBody = ZodiosBodyByAlias<SolidTimeApi, 'invite'>; | ||
export type Invitation = InvitationsIndexResponse['data'][0]; | ||
export type TimeEntryResponse = ZodiosResponseByAlias<SolidTimeApi, 'getTimeEntries'>; | ||
export type TimeEntry = TimeEntryResponse['data'][0]; | ||
export type CreateTimeEntryBody = ZodiosBodyByAlias<SolidTimeApi, 'createTimeEntry'>; | ||
export type ProjectResponse = ZodiosResponseByAlias<SolidTimeApi, 'getProjects'>; | ||
export type Project = ProjectResponse['data'][0]; | ||
export type CreateProjectBody = ZodiosBodyByAlias<SolidTimeApi, 'createProject'>; | ||
export type UpdateProjectBody = ZodiosBodyByAlias<SolidTimeApi, 'updateProject'>; | ||
export type ProjectMemberResponse = ZodiosResponseByAlias<SolidTimeApi, 'getProjectMembers'>; | ||
export type CreateProjectMemberBody = ZodiosBodyByAlias<SolidTimeApi, 'createProjectMember'>; | ||
export type UpdateProjectMemberBody = ZodiosBodyByAlias<SolidTimeApi, 'updateProjectMember'>; | ||
export type ProjectMember = ProjectMemberResponse['data'][0]; | ||
export type CreateTaskBody = ZodiosBodyByAlias<SolidTimeApi, 'createTask'>; | ||
export type CreateClientBody = ZodiosBodyByAlias<SolidTimeApi, 'createClient'>; | ||
export type UpdateClientBody = ZodiosBodyByAlias<SolidTimeApi, 'updateClient'>; | ||
export type TagIndexResponse = ZodiosResponseByAlias<SolidTimeApi, 'getTags'>; | ||
export type Tag = TagIndexResponse['data'][0]; | ||
export type TaskIndexResponse = ZodiosResponseByAlias<SolidTimeApi, 'getTasks'>; | ||
export type Task = TaskIndexResponse['data'][0]; | ||
export type UpdateTaskBody = ZodiosBodyByAlias<SolidTimeApi, 'updateTask'>; | ||
export type ClientIndexResponse = ZodiosResponseByAlias<SolidTimeApi, 'getClients'>; | ||
export type Client = ClientIndexResponse['data'][0]; | ||
export type MemberIndexResponse = ZodiosResponseByAlias<SolidTimeApi, 'getMembers'>; | ||
export type Member = MemberIndexResponse['data'][0]; | ||
export type UpdateMemberBody = ZodiosBodyByAlias<SolidTimeApi, 'updateMember'>; | ||
export type InviteMemberBody = ZodiosBodyByAlias<SolidTimeApi, 'invite'>; | ||
export type MemberRole = InviteMemberBody['role']; | ||
export type CreateTagBody = ZodiosBodyByAlias<SolidTimeApi, 'createTag'>; | ||
export type ImportType = ZodiosResponseByAlias<SolidTimeApi, 'getImporters'>['data'][0]; | ||
export type ImportReport = ZodiosResponseByAlias<SolidTimeApi, 'importData'>; | ||
export type ReportingResponse = ZodiosResponseByAlias<SolidTimeApi, 'getAggregatedTimeEntries'>; | ||
export type AggregatedTimeEntries = ReportingResponse['data']; | ||
export type GroupedDataEntries = ReportingResponse['data']['grouped_data']; | ||
export type AggregatedTimeEntriesQueryParams = ZodiosQueryParamsByAlias<SolidTimeApi, 'getAggregatedTimeEntries'>; | ||
export type OrganizationResponse = ZodiosResponseByAlias<SolidTimeApi, 'getOrganization'>; | ||
export type Organization = ZodiosResponseByAlias<SolidTimeApi, 'getOrganization'>['data']; | ||
export type UpdateOrganizationBody = ZodiosBodyByAlias<SolidTimeApi, 'updateOrganization'>; | ||
export type MyMemberships = ZodiosResponseByAlias<SolidTimeApi, 'getMyMemberships'>['data']; | ||
export type MyMembership = MyMemberships[0]; | ||
export declare const api: any; | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { resolve } from 'path' | ||
import { defineConfig } from 'vite' | ||
import dts from "vite-plugin-dts"; | ||
|
||
export default defineConfig({ | ||
plugins: [dts()], | ||
build: { | ||
lib: { | ||
// Could also be a dictionary or array of multiple entry points | ||
entry: resolve(__dirname, 'src/index.ts'), | ||
name: 'SolidtimeApi', | ||
// the proper extensions will be added | ||
fileName: 'solidtime-api', | ||
}, | ||
}, | ||
}) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters