|
|
|
@ -7,7 +7,7 @@
|
|
|
|
|
import webapi from "./webapi"
|
|
|
|
|
import * as models from "./models"
|
|
|
|
|
export function Get(app_id: string) {
|
|
|
|
|
return webapi.Get<models.App>(`/app/${app_id}`, { })
|
|
|
|
|
return webapi.Get<models.App>(`/app/${app_id}`, {})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface PatchOpts {
|
|
|
|
@ -22,7 +22,7 @@ export function Patch(app_id: string, json: PatchOpts) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function Delete(app_id: string) {
|
|
|
|
|
return webapi.Delete<models.App>(`/app/${app_id}`, { })
|
|
|
|
|
return webapi.Delete<models.App>(`/app/${app_id}`, {})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface PostOpts {
|
|
|
|
@ -39,7 +39,7 @@ export interface ListOpts {
|
|
|
|
|
name?: string
|
|
|
|
|
}
|
|
|
|
|
export function List(json: ListOpts) {
|
|
|
|
|
return webapi.Get<[models.App]>(`/app`, { json })
|
|
|
|
|
return webapi.Get<models.App[]>(`/app`, { json })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface AppUserGetOpts {
|
|
|
|
@ -57,7 +57,7 @@ export function AppUserPatch(app_user_id: string, app_id: string, json: AppUserP
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function AppUserDelete(app_user_id: string, app_id: string) {
|
|
|
|
|
return webapi.Delete<models.AppUser>(`/app/${app_id}/app_user/${app_user_id}`, { })
|
|
|
|
|
return webapi.Delete<models.AppUser>(`/app/${app_id}/app_user/${app_user_id}`, {})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface AppUserListOpts {
|
|
|
|
@ -65,7 +65,7 @@ export interface AppUserListOpts {
|
|
|
|
|
status?: string
|
|
|
|
|
}
|
|
|
|
|
export function AppUserList(app_id: string, json: AppUserListOpts) {
|
|
|
|
|
return webapi.Get<[models.AppUser]>(`/app/${app_id}/app_user`, { json })
|
|
|
|
|
return webapi.Get<models.AppUser[]>(`/app/${app_id}/app_user`, { json })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface AppUserPostOpts {
|
|
|
|
@ -81,7 +81,7 @@ export interface ResourceListQuery {
|
|
|
|
|
updated_at?: Date
|
|
|
|
|
}
|
|
|
|
|
export function ResourceList(app_id: string, query: ResourceListQuery) {
|
|
|
|
|
return webapi.Get<[models.Resource]>(`/app/${app_id}/resource`, { query })
|
|
|
|
|
return webapi.Get<models.Resource[]>(`/app/${app_id}/resource`, { query })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface ResourcePostOpts {
|
|
|
|
@ -100,10 +100,10 @@ export function ResourceDelete(app_id: string, json: ResourceDeleteOpts) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function ResourceGet(app_id: string) {
|
|
|
|
|
return webapi.Get<models.Resource>(`/app/${app_id}/resource`, { })
|
|
|
|
|
return webapi.Get<models.Resource>(`/app/${app_id}/resource`, {})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function ResourcePatch(app_id: string) {
|
|
|
|
|
return webapi.Patch<models.Resource>(`/app/${app_id}/resource`, { })
|
|
|
|
|
return webapi.Patch<models.Resource>(`/app/${app_id}/resource`, {})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|