mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-03-01 12:44:17 +00:00
assigne types to category types
This commit is contained in:
parent
d8148c30f5
commit
693e68b4f9
@ -7,6 +7,9 @@ import { useSetPermissionData, useSetPermissionApi, useSetAdminRole } from './ho
|
||||
import type { ItemsApi } from '#types/ItemsApi'
|
||||
import type { Permission } from '#types/Permission'
|
||||
|
||||
/**
|
||||
* @category Types
|
||||
*/
|
||||
export interface PermissionsProps {
|
||||
data?: Permission[]
|
||||
api?: ItemsApi<Permission>
|
||||
|
||||
3
src/types/AssetsApi.d.ts
vendored
3
src/types/AssetsApi.d.ts
vendored
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* @category Types
|
||||
*/
|
||||
export interface AssetsApi {
|
||||
upload(file: Blob, title: string): Promise<{ id: string }>
|
||||
url: string
|
||||
|
||||
3
src/types/Item.d.ts
vendored
3
src/types/Item.d.ts
vendored
@ -15,6 +15,9 @@ interface GalleryItem {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @category Types
|
||||
*/
|
||||
export interface Item {
|
||||
id: string
|
||||
name: string
|
||||
|
||||
3
src/types/ItemsApi.d.ts
vendored
3
src/types/ItemsApi.d.ts
vendored
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* @category Types
|
||||
*/
|
||||
export interface ItemsApi<T> {
|
||||
getItems(): Promise<T[]>
|
||||
getItem?(id: string): Promise<T>
|
||||
|
||||
3
src/types/LayerProps.d.ts
vendored
3
src/types/LayerProps.d.ts
vendored
@ -3,6 +3,9 @@ import type { ItemFormPopupProps } from './ItemFormPopupProps'
|
||||
import type { ItemsApi } from './ItemsApi'
|
||||
import type { ItemType } from './ItemType'
|
||||
|
||||
/**
|
||||
* @category Types
|
||||
*/
|
||||
export interface LayerProps {
|
||||
id?: string
|
||||
data?: Item[]
|
||||
|
||||
3
src/types/Permission.d.ts
vendored
3
src/types/Permission.d.ts
vendored
@ -1,6 +1,9 @@
|
||||
import type { PermissionAction } from './PermissionAction'
|
||||
import type { PermissionCondition } from './PermissionCondition'
|
||||
|
||||
/**
|
||||
* @category Types
|
||||
*/
|
||||
export interface Permission {
|
||||
id?: string
|
||||
policy?: { name: string }
|
||||
|
||||
3
src/types/Tag.d.ts
vendored
3
src/types/Tag.d.ts
vendored
@ -1,3 +1,6 @@
|
||||
/**
|
||||
* @category Types
|
||||
*/
|
||||
export interface Tag {
|
||||
color: string
|
||||
id: string
|
||||
|
||||
3
src/types/UserApi.d.ts
vendored
3
src/types/UserApi.d.ts
vendored
@ -1,5 +1,8 @@
|
||||
import type { UserItem } from './UserItem'
|
||||
|
||||
/**
|
||||
* @category Types
|
||||
*/
|
||||
export interface UserApi {
|
||||
register(email: string, password: string, userName: string): Promise<void>
|
||||
login(email: string, password: string): Promise<UserItem | undefined>
|
||||
|
||||
3
src/types/UserItem.d.ts
vendored
3
src/types/UserItem.d.ts
vendored
@ -1,5 +1,8 @@
|
||||
import type { Profile } from './Profile'
|
||||
|
||||
/**
|
||||
* @category Types
|
||||
*/
|
||||
export interface UserItem {
|
||||
id?: string
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user