dto

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BulkDeleteRowsInput

type BulkDeleteRowsInput struct {
	UserId     string
	DatabaseId string
	RowIds     []string
}

type CreateDatabaseInput

type CreateDatabaseInput struct {
	UserId      string
	SpaceId     string
	DocumentId  *string
	Name        string
	Description string
	Icon        string
	Schema      []PropertySchema
	Type        string // "spreadsheet" or "document", defaults to "spreadsheet"
}

Create database

type CreateDatabaseOutput

type CreateDatabaseOutput struct {
	Id          string
	Name        string
	Description string
	Icon        string
	Schema      []PropertySchema
	DefaultView string
	Type        string
	CreatedAt   time.Time
}

type CreateRowInput

type CreateRowInput struct {
	UserId        string
	DatabaseId    string
	Properties    map[string]interface{}
	Content       map[string]interface{}
	ShowInSidebar bool
}

Row operations

type CreateRowOutput

type CreateRowOutput struct {
	Id         string
	Properties map[string]interface{}
	CreatedAt  time.Time
}

type CreateViewInput

type CreateViewInput struct {
	UserId     string
	DatabaseId string
	Name       string
	Type       string
	Filter     map[string]interface{}
	Sort       []SortConfig
	Columns    []string
}

Create view

type CreateViewOutput

type CreateViewOutput struct {
	Id      string
	Name    string
	Type    string
	Filter  map[string]interface{}
	Sort    []SortConfig
	Columns []string
}

type DatabaseItem

type DatabaseItem struct {
	Id          string
	DocumentId  *string
	Name        string
	Description string
	Icon        string
	Type        string
	RowCount    int64
	CreatedBy   string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type DatabasePermissionItem

type DatabasePermissionItem struct {
	Id        string  `json:"id"`
	UserId    *string `json:"user_id,omitempty"`
	Username  *string `json:"username,omitempty"`
	GroupId   *string `json:"group_id,omitempty"`
	GroupName *string `json:"group_name,omitempty"`
	Role      string  `json:"role"`
}

Permission item for listing

type DeleteDatabaseInput

type DeleteDatabaseInput struct {
	UserId     string
	DatabaseId string
}

Delete database

type DeleteDatabasePermissionInput

type DeleteDatabasePermissionInput struct {
	UserId       string  // The user making the request
	DatabaseId   string  // The database
	TargetUserId *string // The user to remove permission from (mutually exclusive with GroupId)
	GroupId      *string // The group to remove permission from (mutually exclusive with TargetUserId)
}

Delete permission

type DeleteRowInput

type DeleteRowInput struct {
	UserId     string
	DatabaseId string
	RowId      string
}

type DeleteViewInput

type DeleteViewInput struct {
	UserId     string
	DatabaseId string
	ViewId     string
}

Delete view

type GetDatabaseInput

type GetDatabaseInput struct {
	UserId     string
	DatabaseId string
}

Get database

type GetDatabaseOutput

type GetDatabaseOutput struct {
	Id          string
	SpaceId     string
	DocumentId  *string
	Name        string
	Description string
	Icon        string
	Schema      []PropertySchema
	Views       []ViewConfig
	DefaultView string
	Type        string
	CreatedBy   string
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type GetRowInput

type GetRowInput struct {
	UserId     string
	DatabaseId string
	RowId      string
}

type GetRowOutput

type GetRowOutput struct {
	Id            string
	DatabaseId    string
	Properties    map[string]interface{}
	Content       map[string]interface{}
	ShowInSidebar bool
	CreatedBy     string
	CreatedByUser *UserInfo
	UpdatedBy     string
	UpdatedByUser *UserInfo
	CreatedAt     time.Time
	UpdatedAt     time.Time
}

type ListDatabasePermissionsInput

type ListDatabasePermissionsInput struct {
	UserId     string
	DatabaseId string
}

List permissions

type ListDatabasePermissionsOutput

type ListDatabasePermissionsOutput struct {
	Permissions []DatabasePermissionItem `json:"permissions"`
}

type ListDatabasesInput

type ListDatabasesInput struct {
	UserId  string
	SpaceId string
}

List databases

type ListDatabasesOutput

type ListDatabasesOutput struct {
	Databases []DatabaseItem
}

type ListRowsInput

type ListRowsInput struct {
	UserId     string
	DatabaseId string
	ViewId     string
	Limit      int
	Offset     int
}

type ListRowsOutput

type ListRowsOutput struct {
	Rows       []RowItem
	TotalCount int64
}

type MoveDatabaseInput

type MoveDatabaseInput struct {
	UserId     string
	DatabaseId string
	DocumentId *string // nil = move to root (no parent document)
}

Move database

type MoveDatabaseOutput

type MoveDatabaseOutput struct {
	Id         string
	DocumentId *string
}

type PropertySchema

type PropertySchema struct {
	Id      string                 `json:"id"`
	Name    string                 `json:"name"`
	Type    string                 `json:"type"`
	Options map[string]interface{} `json:"options,omitempty"`
}

Property schema

type RowItem

type RowItem struct {
	Id            string
	Properties    map[string]interface{}
	Content       map[string]interface{}
	ShowInSidebar bool
	CreatedBy     string
	CreatedByUser *UserInfo
	UpdatedBy     string
	UpdatedByUser *UserInfo
	CreatedAt     time.Time
	UpdatedAt     time.Time
}

type SearchDatabaseResultItem

type SearchDatabaseResultItem struct {
	Id          string
	Name        string
	Description string
	Icon        string
	Type        string
	SpaceId     string
	SpaceName   string
	UpdatedAt   time.Time
}

type SearchDatabasesInput

type SearchDatabasesInput struct {
	UserId  string
	Query   string
	SpaceId *string
	Limit   int
}

Search databases

type SearchDatabasesOutput

type SearchDatabasesOutput struct {
	Results []SearchDatabaseResultItem
}

type SortConfig

type SortConfig struct {
	PropertyId string `json:"property_id"`
	Direction  string `json:"direction"` // "asc" or "desc"
}

type UpdateDatabaseInput

type UpdateDatabaseInput struct {
	UserId      string
	DatabaseId  string
	Name        *string
	Description *string
	Icon        *string
	Schema      *[]PropertySchema
	DefaultView *string
}

Update database

type UpdateRowInput

type UpdateRowInput struct {
	UserId        string
	DatabaseId    string
	RowId         string
	Properties    map[string]interface{}
	Content       map[string]interface{}
	ShowInSidebar *bool
}

type UpdateViewInput

type UpdateViewInput struct {
	UserId        string
	DatabaseId    string
	ViewId        string
	Name          *string
	Type          *string
	Filter        map[string]interface{}
	Sort          []SortConfig
	Columns       []string
	HiddenColumns []string
	GroupBy       *string
}

Update view

type UpsertDatabasePermissionInput

type UpsertDatabasePermissionInput struct {
	UserId       string  // The user making the request
	DatabaseId   string  // The database to add permission to
	TargetUserId *string // The user to add permission for (mutually exclusive with GroupId)
	GroupId      *string // The group to add permission for (mutually exclusive with TargetUserId)
	Role         string  // editor, viewer, denied
}

Upsert permission

type UserInfo

type UserInfo struct {
	Id        string
	Username  string
	AvatarUrl string
}

UserInfo contains basic user information

type ViewConfig

type ViewConfig struct {
	Id            string                 `json:"id"`
	Name          string                 `json:"name"`
	Type          string                 `json:"type"`
	Filter        map[string]interface{} `json:"filter,omitempty"`
	Sort          []SortConfig           `json:"sort,omitempty"`
	Columns       []string               `json:"columns,omitempty"`
	HiddenColumns []string               `json:"hidden_columns,omitempty"`
	GroupBy       string                 `json:"group_by,omitempty"`
}

View configuration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL