|
|
@ -1,6 +1,6 @@
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Copyright (C) 2024 veypi <i@veypi.com>
|
|
|
|
// Copyright (C) 2024 veypi <i@veypi.com>
|
|
|
|
// 2024-10-11 00:18:06
|
|
|
|
// 2024-10-11 14:36:07
|
|
|
|
// Distributed under terms of the MIT license.
|
|
|
|
// Distributed under terms of the MIT license.
|
|
|
|
//
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
@ -13,14 +13,6 @@ export function Get(app_id: string, json: GetOpts) {
|
|
|
|
return webapi.Get<models.App>(`/app/${app_id}`, { json })
|
|
|
|
return webapi.Get<models.App>(`/app/${app_id}`, { json })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export function AppUserDelete(app_user_id: string, app_id: string) {
|
|
|
|
|
|
|
|
return webapi.Delete<models.AppUser>(`/app/${app_id}/app_user/${app_user_id}`, { })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function ResourcePatch(app_id: string) {
|
|
|
|
|
|
|
|
return webapi.Patch<models.Resource>(`/app/${app_id}/resource`, { })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export interface PatchOpts {
|
|
|
|
export interface PatchOpts {
|
|
|
|
name?: string
|
|
|
|
name?: string
|
|
|
|
icon?: string
|
|
|
|
icon?: string
|
|
|
@ -32,6 +24,10 @@ export function Patch(app_id: string, json: PatchOpts) {
|
|
|
|
return webapi.Patch<models.App>(`/app/${app_id}`, { json })
|
|
|
|
return webapi.Patch<models.App>(`/app/${app_id}`, { json })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function Delete(app_id: string) {
|
|
|
|
|
|
|
|
return webapi.Delete<models.App>(`/app/${app_id}`, { })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface PostOpts {
|
|
|
|
export interface PostOpts {
|
|
|
|
name: string
|
|
|
|
name: string
|
|
|
|
icon: string
|
|
|
|
icon: string
|
|
|
@ -42,34 +38,6 @@ export function Post(json: PostOpts) {
|
|
|
|
return webapi.Post<models.App>(`/app`, { json })
|
|
|
|
return webapi.Post<models.App>(`/app`, { json })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface AppUserListOpts {
|
|
|
|
|
|
|
|
user_id?: string
|
|
|
|
|
|
|
|
status?: string
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
export function AppUserList(app_id: string, json: AppUserListOpts) {
|
|
|
|
|
|
|
|
return webapi.Get<models.AppUser>(`/app/${app_id}/app_user`, { json })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export interface ResourceListQuery {
|
|
|
|
|
|
|
|
created_at?: Date
|
|
|
|
|
|
|
|
updated_at?: Date
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
export function ResourceList(app_id: string, query: ResourceListQuery) {
|
|
|
|
|
|
|
|
return webapi.Get<models.Resource>(`/app/${app_id}/resource`, { query })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 function Delete(app_id: string) {
|
|
|
|
|
|
|
|
return webapi.Delete<models.App>(`/app/${app_id}`, { })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export interface ListOpts {
|
|
|
|
export interface ListOpts {
|
|
|
|
name?: string
|
|
|
|
name?: string
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -84,10 +52,6 @@ export function AppUserGet(app_user_id: string, app_id: string, json: AppUserGet
|
|
|
|
return webapi.Get<models.AppUser>(`/app/${app_id}/app_user/${app_user_id}`, { json })
|
|
|
|
return webapi.Get<models.AppUser>(`/app/${app_id}/app_user/${app_user_id}`, { json })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export function ResourceGet(app_id: string) {
|
|
|
|
|
|
|
|
return webapi.Get<models.Resource>(`/app/${app_id}/resource`, { })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export interface AppUserPatchOpts {
|
|
|
|
export interface AppUserPatchOpts {
|
|
|
|
status?: string
|
|
|
|
status?: string
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -95,6 +59,18 @@ export function AppUserPatch(app_user_id: string, app_id: string, json: AppUserP
|
|
|
|
return webapi.Patch<models.AppUser>(`/app/${app_id}/app_user/${app_user_id}`, { json })
|
|
|
|
return webapi.Patch<models.AppUser>(`/app/${app_id}/app_user/${app_user_id}`, { json })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function AppUserDelete(app_user_id: string, app_id: string) {
|
|
|
|
|
|
|
|
return webapi.Delete<models.AppUser>(`/app/${app_id}/app_user/${app_user_id}`, { })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export interface AppUserListOpts {
|
|
|
|
|
|
|
|
user_id?: string
|
|
|
|
|
|
|
|
status?: string
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
export function AppUserList(app_id: string, json: AppUserListOpts) {
|
|
|
|
|
|
|
|
return webapi.Get<models.AppUser>(`/app/${app_id}/app_user`, { json })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface AppUserPostOpts {
|
|
|
|
export interface AppUserPostOpts {
|
|
|
|
status: string
|
|
|
|
status: string
|
|
|
|
user_id: string
|
|
|
|
user_id: string
|
|
|
@ -103,6 +79,22 @@ export function AppUserPost(app_id: string, json: AppUserPostOpts) {
|
|
|
|
return webapi.Post<models.AppUser>(`/app/${app_id}/app_user`, { json })
|
|
|
|
return webapi.Post<models.AppUser>(`/app/${app_id}/app_user`, { json })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export interface ResourceListQuery {
|
|
|
|
|
|
|
|
created_at?: Date
|
|
|
|
|
|
|
|
updated_at?: Date
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
export function ResourceList(app_id: string, query: ResourceListQuery) {
|
|
|
|
|
|
|
|
return webapi.Get<models.Resource>(`/app/${app_id}/resource`, { query })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 {
|
|
|
|
export interface ResourceDeleteOpts {
|
|
|
|
name: string
|
|
|
|
name: string
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -110,3 +102,11 @@ export function ResourceDelete(app_id: string, json: ResourceDeleteOpts) {
|
|
|
|
return webapi.Delete<models.Resource>(`/app/${app_id}/resource`, { json })
|
|
|
|
return webapi.Delete<models.Resource>(`/app/${app_id}/resource`, { json })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function ResourceGet(app_id: string) {
|
|
|
|
|
|
|
|
return webapi.Get<models.Resource>(`/app/${app_id}/resource`, { })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function ResourcePatch(app_id: string) {
|
|
|
|
|
|
|
|
return webapi.Patch<models.Resource>(`/app/${app_id}/resource`, { })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|