|
|
|
@ -14,8 +14,8 @@ export interface PatchOpts {
|
|
|
|
|
name?: string
|
|
|
|
|
icon?: string
|
|
|
|
|
des?: string
|
|
|
|
|
init_role_id?: string
|
|
|
|
|
typ?: string
|
|
|
|
|
init_role_id?: string
|
|
|
|
|
status?: string
|
|
|
|
|
}
|
|
|
|
|
export function Patch(app_id: string, json: PatchOpts) {
|
|
|
|
@ -37,14 +37,14 @@ export function Post(json: PostOpts) {
|
|
|
|
|
return webapi.Post<models.App>(`/app`, { json })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ListOpts {
|
|
|
|
|
export interface ListQuery {
|
|
|
|
|
name?: string
|
|
|
|
|
}
|
|
|
|
|
export function List(query: ListQuery) {
|
|
|
|
|
return webapi.Get<models.App[]>(`/app`, { query })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface AppUserGetOpts {
|
|
|
|
|
export interface AppUserGetQuery {
|
|
|
|
|
user_id: string
|
|
|
|
|
}
|
|
|
|
|
export function AppUserGet(app_id: string, app_user_id: string, query: AppUserGetQuery) {
|
|
|
|
@ -62,7 +62,7 @@ export function AppUserDelete(app_id: string, app_user_id: string) {
|
|
|
|
|
return webapi.Delete<models.AppUser>(`/app/${app_id}/app_user/${app_user_id}`, {})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface AppUserListOpts {
|
|
|
|
|
export interface AppUserListQuery {
|
|
|
|
|
user_id?: string
|
|
|
|
|
status?: string
|
|
|
|
|
}
|
|
|
|
@ -78,21 +78,6 @@ export function AppUserPost(app_id: string, json: AppUserPostOpts) {
|
|
|
|
|
return webapi.Post<models.AppUser>(`/app/${app_id}/app_user`, { json })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function ResourceList(app_id: string) {
|
|
|
|
|
return webapi.Get<models.Resource[]>(`/app/${app_id}/resource`, {})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ResourcePostOpts {
|
|
|
|
|
name: string
|
|
|
|
|
des: string
|
|
|
|
|
}
|
|
|
|
|
export function ResourcePost(app_id: string, json: ResourcePostOpts) {
|
|
|
|
|
return webapi.Post<models.Resource>(`/app/${app_id}/resource`, { json })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ResourceDeleteOpts {
|
|
|
|
|
name: string
|
|
|
|
|
}
|
|
|
|
|
export function ResourceGet(app_id: string, resource_id: string) {
|
|
|
|
|
return webapi.Get<models.Resource>(`/app/${app_id}/resource/${resource_id}`, {})
|
|
|
|
|
}
|
|
|
|
@ -108,13 +93,15 @@ export function ResourceDelete(app_id: string, resource_id: string) {
|
|
|
|
|
return webapi.Delete<models.Resource>(`/app/${app_id}/resource/${resource_id}`, {})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ListQuery {
|
|
|
|
|
name?: string
|
|
|
|
|
export function ResourceList(app_id: string) {
|
|
|
|
|
return webapi.Get<models.Resource[]>(`/app/${app_id}/resource`, {})
|
|
|
|
|
}
|
|
|
|
|
export interface AppUserGetQuery {
|
|
|
|
|
user_id: string
|
|
|
|
|
|
|
|
|
|
export interface ResourcePostOpts {
|
|
|
|
|
name: string
|
|
|
|
|
des: string
|
|
|
|
|
}
|
|
|
|
|
export interface AppUserListQuery {
|
|
|
|
|
user_id?: string
|
|
|
|
|
status?: string
|
|
|
|
|
export function ResourcePost(app_id: string, json: ResourcePostOpts) {
|
|
|
|
|
return webapi.Post<models.Resource>(`/app/${app_id}/resource`, { json })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|