You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
911 B
TypeScript

//
// Copyright (C) 2024 veypi <i@veypi.com>
2 months ago
// 2024-10-11 14:36:07
// Distributed under terms of the MIT license.
//
import webapi from "./webapi"
import * as models from "./models"
2 months ago
export function Get(role_id: string) {
return webapi.Get<models.Role>(`/role/${role_id}`, { })
}
1 month ago
export interface PatchOpts {
2 months ago
name?: string
des?: string
app_id?: string
}
2 months ago
export function Patch(role_id: string, json: PatchOpts) {
return webapi.Patch<models.Role>(`/role/${role_id}`, { json })
}
2 months ago
export function Delete(role_id: string) {
return webapi.Delete<models.Role>(`/role/${role_id}`, { })
}
1 month ago
export interface PostOpts {
2 months ago
name: string
des: string
app_id: string
}
export function Post(json: PostOpts) {
return webapi.Post<models.Role>(`/role`, { json })
}
1 month ago
export interface ListOpts {
2 months ago
name?: string
}
export function List(json: ListOpts) {
1 month ago
return webapi.Get<[models.Role]>(`/role`, { json })
2 months ago
}