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.
OneAuth/oaweb/composables/api/access.ts

35 lines
711 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"
1 month ago
export interface ListOpts {
2 months ago
app_id: string
user_id?: string
role_id?: string
name?: string
}
1 month ago
export interface ListQuery {
created_at?: Date
updated_at?: Date
}
export function List(json: ListOpts, query: ListQuery) {
4 weeks ago
return webapi.Get<models.Access[]>(`/access`, { json, query })
}
1 month ago
export interface PostOpts {
2 months ago
app_id: string
user_id?: string
role_id?: string
name: string
t_id: string
level: number
}
export function Post(json: PostOpts) {
return webapi.Post<models.Access>(`/access`, { json })
}