system-prompts-and-models-o.../NotionAi/notion-ai_20260322/modules/notion/teamspaces/index.ts
2026-03-22 18:31:30 +08:00

31 lines
847 B
TypeScript

export type TeamspaceUrl = string
export type Cursor = string
export type TeamspaceAccessLevel = "default" | "open" | "closed" | "private"
export type TeamspaceResult = {
url: TeamspaceUrl
name: string
description?: string
icon?: string
accessLevel: TeamspaceAccessLevel
archived: boolean
}
export type ListTeamspaces = (args?: {
limit?: number
cursor?: Cursor
query?: string
includeArchived?: boolean
}) => Promise<{ results: TeamspaceResult[]; nextCursor?: Cursor }>
export type TeamspaceTopLevelItem =
| { type: "page"; url: string; title?: string; icon?: string }
| { type: "database"; url: string; title?: string; icon?: string }
export type GetTeamspaceTopLevelPagesAndDatabases = (args: {
teamspaceUrl: TeamspaceUrl
limit?: number
cursor?: Cursor
}) => Promise<{ results: TeamspaceTopLevelItem[]; nextCursor?: Cursor }>