Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract the meaningfull #1

Open
Tracked by #6285
lemanschik opened this issue May 12, 2023 · 0 comments
Open
Tracked by #6285

Extract the meaningfull #1

lemanschik opened this issue May 12, 2023 · 0 comments

Comments

@lemanschik
Copy link
Owner

ownCloud it self is a system that implements near no additional features on the backend side it is only boilerplate and abstractions we can reduce the code maybe to under 2000 sloc lets do so.

export interface Graph {
  applications: {
    listApplications: () => AxiosPromise<CollectionOfApplications>
  }
  tags: {
    getTags: () => AxiosPromise<CollectionOfTags>
    assignTags: (tagAssignment?: TagAssignment) => AxiosPromise<void>
    unassignTags: (tagUnassignment?: TagUnassignment) => AxiosPromise<void>
  }
  drives: {
    listMyDrives: (orderBy?: string, filter?: string) => Promise<AxiosResponse<CollectionOfDrives>>
    listAllDrives: (orderBy?: string, filter?: string) => Promise<AxiosResponse<CollectionOfDrives>>
    getDrive: (id: string) => AxiosPromise<Drive>
    createDrive: (drive: Drive, options: any) => AxiosPromise<Drive>
    updateDrive: (id: string, drive: Drive, options: any) => AxiosPromise<Drive>
    deleteDrive: (id: string, ifMatch?: string, options?: any) => AxiosPromise<void>
  }
  users: {
    getUser: (userId: string) => AxiosPromise<User>
    createUser: (user: User) => AxiosPromise<User>
    getMe: () => AxiosPromise<User>
    changeOwnPassword: (currentPassword: string, newPassword: string) => AxiosPromise<void>
    editUser: (userId: string, user: User) => AxiosPromise<User>
    deleteUser: (userId: string) => AxiosPromise<void>
    listUsers: (orderBy?: string, filter?: string) => AxiosPromise<CollectionOfUser>
    createUserAppRoleAssignment: (
      userId: string,
      appRoleAssignment: AppRoleAssignment
    ) => AxiosPromise<AppRoleAssignment>
    exportPersonalData: (
      userId: string,
      exportPersonalDataRequest?: ExportPersonalDataRequest
    ) => AxiosPromise<void>
  }
  groups: {
    listGroups: (orderBy?: string) => AxiosPromise<CollectionOfGroup>
    createGroup: (group: Group) => AxiosPromise<Group>
    getGroup: (groupId: string) => AxiosPromise<Group>
    editGroup: (groupId: string, group: Group) => AxiosPromise<void>
    deleteGroup: (groupId: string) => AxiosPromise<void>
    addMember: (groupId: string, userId: string, server: string) => AxiosPromise<void>
    deleteMember: (groupId: string, userId: string) => AxiosPromise<void>
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant