// // Copyright (C) 2024 veypi // 2024-10-11 14:36:07 // Distributed under terms of the MIT license. // import webapi from "./webapi" import * as models from "./models" export function Key(app_id: string) { return webapi.Get(`/app/${app_id}/key`, {}) } export function Get(app_id: string) { return webapi.Get(`/app/${app_id}`, {}) } export interface PatchOpts { name?: string icon?: string des?: string typ?: string init_role_id?: string init_url?: string status?: string } export function Patch(app_id: string, json: PatchOpts) { return webapi.Patch(`/app/${app_id}`, { json }) } export function Delete(app_id: string) { return webapi.Delete(`/app/${app_id}`, {}) } export interface PostOpts { name: string icon: string des?: string typ: string status: string } export function Post(json: PostOpts) { return webapi.Post(`/app`, { json }) } export interface ListQuery { name?: string } export function List(query: ListQuery) { return webapi.Get(`/app`, { query }) } export interface AppUserGetQuery { user_id: string } export function AppUserGet(app_id: string, app_user_id: string, query: AppUserGetQuery) { return webapi.Get(`/app/${app_id}/app_user/${app_user_id}`, { query }) } export interface AppUserPatchOpts { status?: string } export function AppUserPatch(app_id: string, app_user_id: string, json: AppUserPatchOpts) { return webapi.Patch(`/app/${app_id}/app_user/${app_user_id}`, { json }) } export function AppUserDelete(app_id: string, app_user_id: string) { return webapi.Delete(`/app/${app_id}/app_user/${app_user_id}`, {}) } export interface AppUserListQuery { user_id?: string status?: string } export function AppUserList(app_id: string, query: AppUserListQuery) { return webapi.Get(`/app/${app_id}/app_user`, { query }) } export interface AppUserPostOpts { status: string user_id: string } export function AppUserPost(app_id: string, json: AppUserPostOpts) { return webapi.Post(`/app/${app_id}/app_user`, { json }) } export function ResourceGet(app_id: string, resource_id: string) { return webapi.Get(`/app/${app_id}/resource/${resource_id}`, {}) } export interface ResourcePatchOpts { des?: string } export function ResourcePatch(app_id: string, resource_id: string, json: ResourcePatchOpts) { return webapi.Patch(`/app/${app_id}/resource/${resource_id}`, { json }) } export function ResourceDelete(app_id: string, resource_id: string) { return webapi.Delete(`/app/${app_id}/resource/${resource_id}`, {}) } export function ResourceList(app_id: string) { return webapi.Get(`/app/${app_id}/resource`, {}) } export interface ResourcePostOpts { name: string des: string } export function ResourcePost(app_id: string, json: ResourcePostOpts) { return webapi.Post(`/app/${app_id}/resource`, { json }) } export function RoleGet(app_id: string, role_id: string) { return webapi.Get(`/app/${app_id}/role/${role_id}`, {}) } export interface RolePatchOpts { name?: string des?: string } export function RolePatch(app_id: string, role_id: string, json: RolePatchOpts) { return webapi.Patch(`/app/${app_id}/role/${role_id}`, { json }) } export function RoleDelete(app_id: string, role_id: string) { return webapi.Delete(`/app/${app_id}/role/${role_id}`, {}) } export interface RoleListQuery { name?: string } export function RoleList(app_id: string, query: RoleListQuery) { return webapi.Get(`/app/${app_id}/role`, { query }) } export interface RolePostOpts { name: string des: string } export function RolePost(app_id: string, json: RolePostOpts) { return webapi.Post(`/app/${app_id}/role`, { json }) }