import { z } from 'zod'; /** * Configuration for the Kaiban SDK client. * * @example Browser — user identity (Firebase JWT, auto-refreshing): * ```ts * const client = new KaibanClient({ * tenant: "my-org", * getToken: () => getAuth().currentUser?.getIdToken() ?? Promise.resolve(undefined), * }); * ``` * * @example Server / agent — API key (tenant-scoped or shared): * ```ts * const client = new KaibanClient({ * tenant: "my-org", * apiKey: process.env.KAIBAN_API_KEY, // kb_t_... or kb_s_... * }); * ``` * * @example Static JWT (non-refreshing — useful in scripts / tests): * ```ts * const client = new KaibanClient({ * tenant: "my-org", * token: "eyJ...", * }); * ``` */ interface ClientConfig { /** * Tenant identifier — maps to the `x-tenant` header on every request. * In most deployments this is the organization slug. */ tenant: string; /** * API key for service / agent identity. * Sent as `X-Api-Key: ` on every request. * Format: `kb_t_{tenant}_{...}` (tenant-scoped) or `kb_s_{...}` (shared). * * Use this for agents, external integrations, and server-side automation * where no user Firebase session is available. */ apiKey?: string; /** * Static bearer token (Firebase ID token or any JWT). * Sent as `Authorization: Bearer ` on every request. * Use `getToken` instead when the token can expire (e.g. Firebase sessions). * * Ignored when `apiKey` is set. */ token?: string; /** * Async token factory — called before every request. * Return `undefined` to send the request without an Authorization header. * Takes precedence over `token` when both are provided. * * Ignored when `apiKey` is set. */ getToken?: () => Promise; /** * Base URL for the API. * Defaults to `https://agi.kaiban.ai/api/v2`. */ baseUrl?: string; /** * Request timeout in milliseconds. * Defaults to 30 000 ms (30 s). */ timeoutMs?: number; /** * Custom `fetch` implementation. * Defaults to `globalThis.fetch`. * Inject `node-fetch` or `undici` for Node < 18 environments. */ fetch?: typeof globalThis.fetch; } /** Per-request override options. */ interface RequestOptions { /** Override the request timeout for this specific call. */ timeoutMs?: number; /** AbortSignal to cancel the request from the caller. */ signal?: AbortSignal; /** Extra headers to merge into this request. */ headers?: Record; } declare const Team: z.ZodObject<{ id: z.ZodString; name: z.ZodString; alias: z.ZodOptional; description: z.ZodOptional; created_at: z.ZodDate; updated_at: z.ZodDate; }, z.core.$strip>; type Team = z.infer; declare const TeamCreate: z.ZodObject<{ name: z.ZodString; alias: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>; type TeamCreate = z.infer; declare const TeamUpdate: z.ZodObject<{ name: z.ZodOptional; description: z.ZodOptional>; }, z.core.$strip>; type TeamUpdate = z.infer; /** Input DTO — body for POST /teams/:id/invitations */ declare const InviteCreate: z.ZodObject<{ email: z.ZodString; role: z.ZodDefault>>; full_name: z.ZodOptional; }, z.core.$strip>; type InviteCreate = z.infer; /** Response DTO — returned by POST /teams/:id/invitations */ declare const Invite: z.ZodObject<{ is_new_user: z.ZodBoolean; temp_code: z.ZodOptional; member: z.ZodObject<{ id: z.ZodString; team_id: z.ZodString; user_id: z.ZodString; role: z.ZodEnum<{ [x: string]: string; }>; is_default: z.ZodOptional; profile: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; }, z.core.$strip>; }, z.core.$strip>; type Invite = z.infer; declare const TeamMemberRole: { readonly OWNER: "owner"; readonly ADMIN: "admin"; readonly MEMBER: "member"; readonly VIEWER: "viewer"; readonly CONTRIBUTOR: "contributor"; }; type TeamMemberRole = (typeof TeamMemberRole)[keyof typeof TeamMemberRole]; declare const TeamMember: z.ZodObject<{ id: z.ZodString; team_id: z.ZodString; user_id: z.ZodString; role: z.ZodEnum<{ [x: string]: string; }>; is_default: z.ZodOptional; profile: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; }, z.core.$strip>; type TeamMember = z.infer; declare const TeamMemberCreate: z.ZodObject<{ user_id: z.ZodString; is_default: z.ZodOptional; role: z.ZodDefault>; }, z.core.$strip>; type TeamMemberCreate = z.infer; declare const TeamMemberUpdate: z.ZodObject<{ role: z.ZodOptional>>; is_default: z.ZodOptional>; }, z.core.$strip>; type TeamMemberUpdate = z.infer; declare const ActivityType: { readonly BOARD_CREATED: "board_created"; readonly BOARD_UPDATED: "board_updated"; readonly BOARD_DELETED: "board_deleted"; readonly BOARD_RECYCLE_BIN_EMPTIED: "board_recycle_bin_emptied"; readonly CARD_CREATED: "card_created"; readonly CARD_DELETED: "card_deleted"; readonly CARD_CLONED: "card_cloned"; readonly CARD_RESTORED: "card_restored"; readonly CARD_COLUMN_CHANGED: "card_column_changed"; readonly CARD_STATUS_CHANGED: "card_status_changed"; readonly CARD_PRIORITY_CHANGED: "card_priority_changed"; readonly CARD_TITLE_CHANGED: "card_title_changed"; readonly CARD_DESCRIPTION_CHANGED: "card_description_changed"; readonly CARD_RESULT_CHANGED: "card_result_changed"; readonly CARD_RESULT_PREVIEW: "card_result_preview"; readonly CARD_AGENT_ADDED: "card_agent_added"; readonly CARD_AGENT_REMOVED: "card_agent_removed"; readonly CARD_TAGS_CHANGED: "card_tags_changed"; readonly CARD_MEMBER_ADDED: "card_member_added"; readonly CARD_MEMBER_REMOVED: "card_member_removed"; readonly CARD_COMMENT_ADDED: "card_comment_added"; readonly CARD_COMMENT_UPDATED: "card_comment_updated"; readonly CARD_COMMENT_DELETED: "card_comment_deleted"; readonly CARD_COMMENT_REPLY_ADDED: "card_comment_reply_added"; readonly CARD_TASK_STARTED: "card_task_started"; readonly CARD_TASK_COMPLETED: "card_task_completed"; readonly CARD_TASK_BLOCKED: "card_task_blocked"; readonly CARD_ATTACHMENT_ADDED: "card_attachment_added"; readonly CARD_ATTACHMENT_REMOVED: "card_attachment_removed"; readonly CARD_UPDATED: "card_updated"; readonly EVALUATION_ADDED: "evaluation_added"; readonly CARD_SESSION_CREATED: "card_session_created"; readonly CARD_SESSION_UPDATED: "card_session_updated"; readonly CARD_SESSION_DELETED: "card_session_deleted"; readonly CARD_SESSION_DATA_ADDED: "card_session_data_added"; readonly CARD_SESSION_DATA_UPDATED: "card_session_data_updated"; readonly CARD_SESSION_DATA_DELETED: "card_session_data_deleted"; readonly AGENT_CREATED: "agent_created"; readonly AGENT_UPDATED: "agent_updated"; readonly AGENT_DELETED: "agent_deleted"; readonly AGENT_STATUS_UPDATED: "agent_status_updated"; readonly AGENT_STATUS_OBSERVATION: "agent_status_observation"; readonly AGENT_STATUS_THINKING_END: "agent_status_thinking_end"; readonly AGENT_TASK_DOING: "agent_task_doing"; readonly AGENT_TASK_WAITING: "agent_task_waiting"; readonly AGENT_TASK_BLOCKED: "agent_task_blocked"; readonly AGENT_TASK_COMPLETED: "agent_task_completed"; readonly AGENT_TASK_DONE: "agent_task_done"; readonly AGENT_TASK_CANCELLED: "agent_task_cancelled"; readonly AGENT_TASK_FAILED: "agent_task_failed"; readonly AGENT_REGISTER_APPROVAL: "agent_register_approval"; readonly AGENT_REGISTER_REJECTED: "agent_register_rejected"; readonly AGENT_RESPOND_FEEDBACK: "agent_respond_feedback"; readonly AGENT_FEEDBACK_CREATED: "agent_feedback_created"; readonly AGENT_FEEDBACK_UPDATED: "agent_feedback_updated"; readonly AGENT_FEEDBACK_DELETED: "agent_feedback_deleted"; readonly AGENT_SUPERVISOR_FEEDBACK_CREATED: "agent_supervisor_feedback_created"; readonly AGENT_SUPERVISOR_FEEDBACK_UPDATED: "agent_supervisor_feedback_updated"; readonly AGENT_SUPERVISOR_FEEDBACK_DELETED: "agent_supervisor_feedback_deleted"; readonly TEAM_CREATED: "team_created"; readonly TEAM_UPDATED: "team_updated"; readonly TEAM_DELETED: "team_deleted"; readonly TEAM_MEMBER_ADDED: "team_member_added"; readonly TEAM_MEMBER_INVITED: "team_member_invited"; readonly TEAM_MEMBER_UPDATED: "team_member_updated"; readonly TEAM_MEMBER_REMOVED: "team_member_removed"; readonly RESOURCE_CREATED: "resource_created"; readonly RESOURCE_UPDATED: "resource_updated"; readonly RESOURCE_DELETED: "resource_deleted"; readonly POSITION_CREATED: "position_created"; readonly POSITION_UPDATED: "position_updated"; readonly POSITION_DELETED: "position_deleted"; readonly APP_CREATED: "app_created"; readonly APP_UPDATED: "app_updated"; readonly APP_DELETED: "app_deleted"; readonly APP_SETTINGS_CREATED: "app_settings_created"; readonly APP_SETTINGS_UPDATED: "app_settings_updated"; readonly APP_SETTINGS_DELETED: "app_settings_deleted"; readonly APP_SETTINGS_SECTION_REPLACED: "app_settings_section_replaced"; readonly APP_SETTINGS_SECTION_MERGED: "app_settings_section_merged"; readonly APP_SETTINGS_SECTION_DELETED: "app_settings_section_deleted"; readonly APP_SETTINGS_SECTIONS_CLEARED: "app_settings_sections_cleared"; readonly EXTERNAL_CHANNEL_CREATED: "external_channel_created"; readonly EXTERNAL_CHANNEL_UPDATED: "external_channel_updated"; readonly EXTERNAL_CHANNEL_DELETED: "external_channel_deleted"; readonly THREAD_USER_MESSAGE: "thread_user_message"; readonly THREAD_AGENT_MESSAGE: "thread_agent_message"; readonly THREAD_AGENT_MESSAGE_EVALUATION: "thread_agent_message_evaluation"; readonly THREAD_FEEDBACK: "thread_feedback"; readonly THREAD_STEP_COSTS: "thread_step_costs"; readonly A2A_TASK_STATUS_SUBMITTED: "submitted"; readonly A2A_TASK_STATUS_WORKING: "working"; readonly A2A_TASK_STATUS_INPUT_REQUIRED: "required"; readonly A2A_TASK_STATUS_COMPLETED: "completed"; readonly A2A_TASK_STATUS_CANCELED: "canceled"; readonly A2A_TASK_STATUS_FAILED: "failed"; readonly A2A_TASK_STATUS_REJECTED: "rejected"; readonly A2A_TASK_STATUS_AUTH_REQUIRED: "auth-required"; readonly A2A_TASK_STATUS_UNKNOWN: "unknown"; readonly RESULT_APPROVED: "result_approved"; readonly RESULT_REJECTED: "result_rejected"; readonly RESULT_FEEDBACK: "result_feedback"; readonly EMAIL_RECEIVED: "email_received"; readonly EMAIL_SENT: "email_sent"; readonly EMAIL_OPENED: "email_opened"; readonly EMAIL_CLICKED: "email_clicked"; readonly EMAIL_BOUNCED: "email_bounced"; readonly EMAIL_SPAM: "email_spam"; readonly AI_USAGE: "ai_usage"; readonly SYSTEM_TRACE: "system_trace"; readonly NOTIFICATION: "notification"; readonly RESOURCE_PUBLISHED: "resource_published"; readonly USER_SIGNUP: "user_signup"; readonly USER_PROFILE_UPDATED: "user_profile_updated"; readonly USER_PROFILE_DELETED: "user_profile_deleted"; readonly INTEGRATION_CREATED: "integration_created"; readonly INTEGRATION_UPDATED: "integration_updated"; readonly INTEGRATION_DELETED: "integration_deleted"; readonly AGENT_RETIRED: "agent_retired"; readonly AGENT_DRAFT_CREATED: "agent_draft_created"; readonly AGENT_DRAFT_UPDATED: "agent_draft_updated"; readonly AGENT_DRAFT_DELETED: "agent_draft_deleted"; readonly AGENT_DRAFT_PUBLISHED: "agent_draft_published"; readonly NOTIFICATION_CREATED: "notification_created"; readonly BENCHMARK_CREATED: "benchmark_created"; readonly BENCHMARK_UPDATED: "benchmark_updated"; readonly BENCHMARK_DELETED: "benchmark_deleted"; readonly BENCHMARK_EXECUTION_CREATED: "benchmark_execution_created"; readonly BENCHMARK_EXECUTION_STARTED: "benchmark_execution_started"; readonly BENCHMARK_EXECUTION_UPDATED: "benchmark_execution_updated"; readonly BENCHMARK_EXECUTION_DELETED: "benchmark_execution_deleted"; }; declare const ActorType: { readonly USER: "user"; readonly AGENT: "agent"; readonly SYSTEM: "system"; }; type ActorType = (typeof ActorType)[keyof typeof ActorType]; declare const Actor: z.ZodObject<{ id: z.ZodString; type: z.ZodEnum<{ [x: string]: string; }>; name: z.ZodString; }, z.core.$strip>; type Actor = z.infer; declare const Activity: z.ZodObject<{ id: z.ZodString; board_id: z.ZodOptional; card_id: z.ZodOptional; agent_id: z.ZodOptional; app_id: z.ZodOptional; notification_id: z.ZodOptional; type: z.ZodEnum<{ [x: string]: string; }>; description: z.ZodString; actor: z.ZodOptional; type: z.ZodOptional>; name: z.ZodOptional; }, z.core.$strip>>; team_id: z.ZodString; changes: z.ZodOptional; old_value: z.ZodOptional>; new_value: z.ZodOptional>; }, z.core.$strip>>>; created_by_session_id: z.ZodOptional; metadata: z.ZodOptional>; user_id: z.ZodOptional; marked_for_display: z.ZodOptional; created_at: z.ZodDate; board: z.ZodOptional; team_id: z.ZodOptional; owner_id: z.ZodOptional; created_by: z.ZodOptional; name: z.ZodOptional; description: z.ZodOptional>; alias: z.ZodOptional>; columns: z.ZodOptional; order: z.ZodNumber; }, z.core.$strip>>>>; agent_ids: z.ZodOptional>>; member_ids: z.ZodOptional>>; allowed_roles: z.ZodOptional>>; tags: z.ZodOptional>>; tag_definitions: z.ZodOptional>; }, z.core.$strip>>>>; dashboard_id: z.ZodOptional>>; is_favorite: z.ZodOptional>; active_cards: z.ZodOptional>; deleted_cards: z.ZodOptional>; created_at: z.ZodOptional>; updated_at: z.ZodOptional>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; agents: z.ZodOptional; name: z.ZodOptional; description: z.ZodOptional; team_id: z.ZodOptional; owner_id: z.ZodOptional; created_by: z.ZodOptional; type: z.ZodOptional>; status: z.ZodOptional>; alias: z.ZodOptional>; agent_team_alias: z.ZodOptional>; monthly_budget: z.ZodOptional>; roles: z.ZodOptional>>; integrations: z.ZodOptional>>; examples: z.ZodOptional>; output: z.ZodString; }, z.core.$strip>>>>; resources: z.ZodOptional; index_name: z.ZodOptional; }, z.core.$strip>>>>; config: z.ZodOptional>>; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; created_at: z.ZodOptional>; updated_at: z.ZodOptional>; active_cards: z.ZodOptional>; boards_count: z.ZodOptional>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>>>; }, z.core.$strip>>; card: z.ZodOptional; team_id: z.ZodOptional; board_id: z.ZodOptional; owner_id: z.ZodOptional; agent_id: z.ZodOptional>; title: z.ZodOptional; description: z.ZodOptional>; status: z.ZodOptional>; column_key: z.ZodOptional; priority: z.ZodOptional>>; result: z.ZodOptional>; tags: z.ZodOptional>>; member_ids: z.ZodOptional>>; related_card_ids: z.ZodOptional>>; related_cards_resolved: z.ZodOptional; board_name: z.ZodOptional; title: z.ZodOptional; status: z.ZodEnum<{ active: "active"; recycled: "recycled"; permanently_deleted: "permanently_deleted"; }>; permanent_deleted_at: z.ZodOptional; }, z.core.$strip>>>>; parts: z.ZodOptional; text: z.ZodOptional; metadata: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodOptional; url: z.ZodOptional; }, z.core.$strip>>; metadata: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"data">; data: z.ZodOptional>; metadata: z.ZodOptional>; }, z.core.$strip>], "type">>>>; metadata: z.ZodOptional>>; enabled: z.ZodOptional>; reference_code: z.ZodOptional>; deleted_at: z.ZodOptional>; deleted_by: z.ZodOptional>; permanent_deleted_at: z.ZodOptional>; created_at: z.ZodOptional; updated_at: z.ZodOptional; board: z.ZodOptional; team_id: z.ZodOptional; owner_id: z.ZodOptional; created_by: z.ZodOptional; name: z.ZodOptional; description: z.ZodOptional>; alias: z.ZodOptional>; columns: z.ZodOptional; order: z.ZodNumber; }, z.core.$strip>>>>; agent_ids: z.ZodOptional>>; member_ids: z.ZodOptional>>; allowed_roles: z.ZodOptional>>; tags: z.ZodOptional>>; tag_definitions: z.ZodOptional>; }, z.core.$strip>>>>; dashboard_id: z.ZodOptional>>; is_favorite: z.ZodOptional>; active_cards: z.ZodOptional>; deleted_cards: z.ZodOptional>; created_at: z.ZodOptional>; updated_at: z.ZodOptional>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; agents: z.ZodOptional; name: z.ZodOptional; description: z.ZodOptional; team_id: z.ZodOptional; owner_id: z.ZodOptional; created_by: z.ZodOptional; type: z.ZodOptional>; status: z.ZodOptional>; alias: z.ZodOptional>; agent_team_alias: z.ZodOptional>; monthly_budget: z.ZodOptional>; roles: z.ZodOptional>>; integrations: z.ZodOptional>>; examples: z.ZodOptional>; output: z.ZodString; }, z.core.$strip>>>>; resources: z.ZodOptional; index_name: z.ZodOptional; }, z.core.$strip>>>>; config: z.ZodOptional>>; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; created_at: z.ZodOptional>; updated_at: z.ZodOptional>; active_cards: z.ZodOptional>; boards_count: z.ZodOptional>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>>>; }, z.core.$strip>>>; agent: z.ZodOptional; name: z.ZodOptional; description: z.ZodOptional; team_id: z.ZodOptional; owner_id: z.ZodOptional; created_by: z.ZodOptional; type: z.ZodOptional>; status: z.ZodOptional>; alias: z.ZodOptional>; agent_team_alias: z.ZodOptional>; monthly_budget: z.ZodOptional>; roles: z.ZodOptional>>; integrations: z.ZodOptional>>; examples: z.ZodOptional>; output: z.ZodString; }, z.core.$strip>>>>; resources: z.ZodOptional; index_name: z.ZodOptional; }, z.core.$strip>>>>; config: z.ZodOptional>>; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; created_at: z.ZodOptional>; updated_at: z.ZodOptional>; active_cards: z.ZodOptional>; boards_count: z.ZodOptional>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>; }, z.core.$strip>; type Activity = z.infer; declare const ActivityCreate: z.ZodObject<{ type: z.ZodEnum<{ [x: string]: string; }>; user_id: z.ZodOptional; team_id: z.ZodString; description: z.ZodString; agent_id: z.ZodOptional; board_id: z.ZodOptional; metadata: z.ZodOptional>; card_id: z.ZodOptional; app_id: z.ZodOptional; notification_id: z.ZodOptional; actor: z.ZodOptional; type: z.ZodOptional>; name: z.ZodOptional; }, z.core.$strip>>; changes: z.ZodOptional; old_value: z.ZodOptional>; new_value: z.ZodOptional>; }, z.core.$strip>>>; created_by_session_id: z.ZodOptional; marked_for_display: z.ZodOptional; }, z.core.$strip>; type ActivityCreate = z.infer; declare const TagDefinitionColor: { readonly GRAY: "gray"; readonly RED: "red"; readonly ORANGE: "orange"; readonly YELLOW: "yellow"; readonly GREEN: "green"; readonly BLUE: "blue"; readonly PURPLE: "purple"; readonly PINK: "pink"; readonly TEAL: "teal"; }; type TagDefinitionColor = (typeof TagDefinitionColor)[keyof typeof TagDefinitionColor]; declare const TagDefinition: z.ZodObject<{ name: z.ZodString; color: z.ZodDefault>; }, z.core.$strip>; type TagDefinition = z.infer; declare const Column: z.ZodObject<{ column_key: z.ZodString; name: z.ZodString; process_stage: z.ZodOptional; order: z.ZodNumber; }, z.core.$strip>; type Column = z.infer; declare const Board: z.ZodObject<{ id: z.ZodString; team_id: z.ZodString; owner_id: z.ZodString; created_by: z.ZodString; name: z.ZodString; description: z.ZodOptional; alias: z.ZodOptional; columns: z.ZodOptional; order: z.ZodNumber; }, z.core.$strip>>>; agent_ids: z.ZodOptional>; member_ids: z.ZodOptional>; allowed_roles: z.ZodOptional>; tags: z.ZodOptional>; tag_definitions: z.ZodOptional>; }, z.core.$strip>>>; dashboard_id: z.ZodOptional>; is_favorite: z.ZodOptional; active_cards: z.ZodOptional; deleted_cards: z.ZodOptional; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>; agents: z.ZodOptional; name: z.ZodOptional; description: z.ZodOptional; team_id: z.ZodOptional; owner_id: z.ZodOptional; created_by: z.ZodOptional; type: z.ZodOptional>; status: z.ZodOptional>; alias: z.ZodOptional>; agent_team_alias: z.ZodOptional>; monthly_budget: z.ZodOptional>; roles: z.ZodOptional>>; integrations: z.ZodOptional>>; examples: z.ZodOptional>; output: z.ZodString; }, z.core.$strip>>>>; resources: z.ZodOptional; index_name: z.ZodOptional; }, z.core.$strip>>>>; config: z.ZodOptional>>; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; created_at: z.ZodOptional>; updated_at: z.ZodOptional>; active_cards: z.ZodOptional>; boards_count: z.ZodOptional>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>>; }, z.core.$strip>; type Board = z.infer; declare const BoardCreate: z.ZodObject<{ team_id: z.ZodString; name: z.ZodString; alias: z.ZodOptional; description: z.ZodOptional; created_by: z.ZodString; owner_id: z.ZodString; columns: z.ZodOptional; order: z.ZodNumber; }, z.core.$strip>>>; agent_ids: z.ZodOptional>; member_ids: z.ZodOptional>; allowed_roles: z.ZodOptional>; tags: z.ZodOptional>; tag_definitions: z.ZodOptional>; }, z.core.$strip>>>; dashboard_id: z.ZodOptional>; is_favorite: z.ZodOptional; }, z.core.$strip>; type BoardCreate = z.infer; declare const BoardUpdate: z.ZodObject<{ name: z.ZodOptional; description: z.ZodOptional>; columns: z.ZodOptional; order: z.ZodNumber; }, z.core.$strip>>>>; agent_ids: z.ZodOptional>>; member_ids: z.ZodOptional>>; allowed_roles: z.ZodOptional>>; tags: z.ZodOptional>>; tag_definitions: z.ZodOptional>; }, z.core.$strip>>>>; dashboard_id: z.ZodOptional>>; is_favorite: z.ZodOptional>; }, z.core.$strip>; type BoardUpdate = z.infer; declare const CardStatus: { readonly BACKLOG: "backlog"; readonly TODO: "todo"; readonly DOING: "doing"; readonly BLOCKED: "blocked"; readonly DONE: "done"; }; type CardStatus = (typeof CardStatus)[keyof typeof CardStatus]; declare const CardPriority: { readonly LOW: "low"; readonly NORMAL: "normal"; readonly MEDIUM: "medium"; readonly HIGH: "high"; readonly CRITICAL: "critical"; readonly URGENT: "urgent"; }; type CardPriority = (typeof CardPriority)[keyof typeof CardPriority]; declare const PartType: { readonly TEXT: "text"; readonly FILE: "file"; readonly DATA: "data"; }; type PartType = (typeof PartType)[keyof typeof PartType]; declare const TextPart: z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodOptional; metadata: z.ZodOptional>; }, z.core.$strip>; type TextPart = z.infer; declare const FilePart: z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodOptional; url: z.ZodOptional; }, z.core.$strip>>; metadata: z.ZodOptional>; }, z.core.$strip>; type FilePart = z.infer; declare const DataPart: z.ZodObject<{ type: z.ZodLiteral<"data">; data: z.ZodOptional>; metadata: z.ZodOptional>; }, z.core.$strip>; type DataPart = z.infer; /** Full Part union (response) — TextPart | FilePart | DataPart. */ declare const Part: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodOptional; metadata: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodOptional; url: z.ZodOptional; }, z.core.$strip>>; metadata: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"data">; data: z.ZodOptional>; metadata: z.ZodOptional>; }, z.core.$strip>], "type">; type Part = z.infer; declare const CardInputPart: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"text">; text: z.ZodString; metadata: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"data">; data: z.ZodRecord; metadata: z.ZodOptional>; }, z.core.$strip>], "type">; type CardInputPart = z.infer; /** * Resolved related card metadata — returned in GET /cards/:id responses. * Never stored in DB. Computed from related_card_ids by enrichCard(). * * status values: * active — card exists and is not deleted * recycled — card is soft-deleted (in recycle bin) * permanently_deleted — card was hard-deleted; only card_id is available */ declare const RelatedCardResolved: z.ZodObject<{ card_id: z.ZodString; board_id: z.ZodOptional; board_name: z.ZodOptional; title: z.ZodOptional; status: z.ZodEnum<{ active: "active"; recycled: "recycled"; permanently_deleted: "permanently_deleted"; }>; permanent_deleted_at: z.ZodOptional; }, z.core.$strip>; type RelatedCardResolved = z.infer; declare const Card: z.ZodObject<{ id: z.ZodString; team_id: z.ZodString; board_id: z.ZodString; owner_id: z.ZodString; agent_id: z.ZodOptional; title: z.ZodString; description: z.ZodOptional; status: z.ZodEnum<{ [x: string]: string; }>; column_key: z.ZodString; priority: z.ZodOptional>; result: z.ZodOptional; tags: z.ZodOptional>; member_ids: z.ZodOptional>; related_card_ids: z.ZodOptional>; related_cards_resolved: z.ZodOptional; board_name: z.ZodOptional; title: z.ZodOptional; status: z.ZodEnum<{ active: "active"; recycled: "recycled"; permanently_deleted: "permanently_deleted"; }>; permanent_deleted_at: z.ZodOptional; }, z.core.$strip>>>; parts: z.ZodOptional; text: z.ZodOptional; metadata: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodOptional; url: z.ZodOptional; }, z.core.$strip>>; metadata: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"data">; data: z.ZodOptional>; metadata: z.ZodOptional>; }, z.core.$strip>], "type">>>; metadata: z.ZodOptional>; enabled: z.ZodOptional; reference_code: z.ZodOptional; deleted_at: z.ZodOptional; deleted_by: z.ZodOptional; permanent_deleted_at: z.ZodOptional; created_at: z.ZodDate; updated_at: z.ZodDate; board: z.ZodOptional; team_id: z.ZodOptional; owner_id: z.ZodOptional; created_by: z.ZodOptional; name: z.ZodOptional; description: z.ZodOptional>; alias: z.ZodOptional>; columns: z.ZodOptional; order: z.ZodNumber; }, z.core.$strip>>>>; agent_ids: z.ZodOptional>>; member_ids: z.ZodOptional>>; allowed_roles: z.ZodOptional>>; tags: z.ZodOptional>>; tag_definitions: z.ZodOptional>; }, z.core.$strip>>>>; dashboard_id: z.ZodOptional>>; is_favorite: z.ZodOptional>; active_cards: z.ZodOptional>; deleted_cards: z.ZodOptional>; created_at: z.ZodOptional>; updated_at: z.ZodOptional>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; agents: z.ZodOptional; name: z.ZodOptional; description: z.ZodOptional; team_id: z.ZodOptional; owner_id: z.ZodOptional; created_by: z.ZodOptional; type: z.ZodOptional>; status: z.ZodOptional>; alias: z.ZodOptional>; agent_team_alias: z.ZodOptional>; monthly_budget: z.ZodOptional>; roles: z.ZodOptional>>; integrations: z.ZodOptional>>; examples: z.ZodOptional>; output: z.ZodString; }, z.core.$strip>>>>; resources: z.ZodOptional; index_name: z.ZodOptional; }, z.core.$strip>>>>; config: z.ZodOptional>>; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; created_at: z.ZodOptional>; updated_at: z.ZodOptional>; active_cards: z.ZodOptional>; boards_count: z.ZodOptional>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>>>; }, z.core.$strip>>; agent: z.ZodOptional; name: z.ZodOptional; description: z.ZodOptional; team_id: z.ZodOptional; owner_id: z.ZodOptional; created_by: z.ZodOptional; type: z.ZodOptional>; status: z.ZodOptional>; alias: z.ZodOptional>; agent_team_alias: z.ZodOptional>; monthly_budget: z.ZodOptional>; roles: z.ZodOptional>>; integrations: z.ZodOptional>>; examples: z.ZodOptional>; output: z.ZodString; }, z.core.$strip>>>>; resources: z.ZodOptional; index_name: z.ZodOptional; }, z.core.$strip>>>>; config: z.ZodOptional>>; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; created_at: z.ZodOptional>; updated_at: z.ZodOptional>; active_cards: z.ZodOptional>; boards_count: z.ZodOptional>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; type Card = z.infer; declare const CardCreate: z.ZodObject<{ title: z.ZodString; status: z.ZodEnum<{ [x: string]: string; }>; team_id: z.ZodString; description: z.ZodOptional; owner_id: z.ZodString; board_id: z.ZodString; column_key: z.ZodString; member_ids: z.ZodOptional>; tags: z.ZodOptional>; metadata: z.ZodOptional>; priority: z.ZodOptional>; result: z.ZodOptional; related_card_ids: z.ZodOptional>; enabled: z.ZodOptional; reference_code: z.ZodOptional; agent_id: z.ZodOptional>; parts: z.ZodOptional; text: z.ZodString; metadata: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"data">; data: z.ZodRecord; metadata: z.ZodOptional>; }, z.core.$strip>], "type">>>; }, z.core.$strip>; type CardCreate = z.infer; declare const CardUpdate: z.ZodObject<{ title: z.ZodOptional; status: z.ZodOptional>; team_id: z.ZodOptional; description: z.ZodOptional>; owner_id: z.ZodOptional; board_id: z.ZodOptional; column_key: z.ZodOptional; member_ids: z.ZodOptional>>; tags: z.ZodOptional>>; metadata: z.ZodOptional>>; priority: z.ZodOptional>>; result: z.ZodOptional>; related_card_ids: z.ZodOptional>>; enabled: z.ZodOptional>; reference_code: z.ZodOptional>; agent_id: z.ZodOptional>>; parts: z.ZodOptional; text: z.ZodString; metadata: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"data">; data: z.ZodRecord; metadata: z.ZodOptional>; }, z.core.$strip>], "type">>>>; }, z.core.$strip>; type CardUpdate = z.infer; declare const CardBulkUpdateItem: z.ZodObject<{ title: z.ZodOptional; status: z.ZodOptional>; team_id: z.ZodOptional; description: z.ZodOptional>; owner_id: z.ZodOptional; board_id: z.ZodOptional; column_key: z.ZodOptional; member_ids: z.ZodOptional>>; tags: z.ZodOptional>>; metadata: z.ZodOptional>>; priority: z.ZodOptional>>; result: z.ZodOptional>; related_card_ids: z.ZodOptional>>; enabled: z.ZodOptional>; reference_code: z.ZodOptional>; agent_id: z.ZodOptional>>; parts: z.ZodOptional; text: z.ZodString; metadata: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"data">; data: z.ZodRecord; metadata: z.ZodOptional>; }, z.core.$strip>], "type">>>>; card_id: z.ZodString; }, z.core.$strip>; type CardBulkUpdateItem = z.infer; declare const CardBulkMoveItem: z.ZodObject<{ card_id: z.ZodString; column_key: z.ZodString; }, z.core.$strip>; type CardBulkMoveItem = z.infer; declare const CardBulkDeleteItem: z.ZodObject<{ card_id: z.ZodString; }, z.core.$strip>; type CardBulkDeleteItem = z.infer; declare const Session: z.ZodObject<{ id: z.ZodString; card_id: z.ZodString; created_by: z.ZodString; metadata: z.ZodOptional>; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; }, z.core.$strip>; type Session = z.infer; declare const SessionCreate: z.ZodObject<{ metadata: z.ZodOptional>; }, z.core.$strip>; type SessionCreate = z.infer; declare const SessionUpdate: z.ZodObject<{ metadata: z.ZodRecord; }, z.core.$strip>; type SessionUpdate = z.infer; declare const SessionData: z.ZodObject<{ id: z.ZodString; session_id: z.ZodString; label: z.ZodOptional; data: z.ZodRecord; updated_by: z.ZodOptional; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; }, z.core.$strip>; type SessionData = z.infer; declare const SessionDataCreate: z.ZodObject<{ label: z.ZodOptional; data: z.ZodRecord; }, z.core.$strip>; type SessionDataCreate = z.infer; declare const SessionDataUpdate: z.ZodObject<{ label: z.ZodOptional; data: z.ZodOptional>; updated_by: z.ZodOptional; }, z.core.$strip>; type SessionDataUpdate = z.infer; declare const ExternalChannel: z.ZodObject<{ id: z.ZodString; type: z.ZodEnum<{ [x: string]: string; }>; name: z.ZodString; alias: z.ZodOptional; description: z.ZodOptional; agent_id: z.ZodString; board_id: z.ZodString; initial_column_key: z.ZodString; team_id: z.ZodString; status: z.ZodEnum<{ [x: string]: string; }>; priority: z.ZodEnum<{ [x: string]: string; }>; metadata: z.ZodOptional>; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; agent: z.ZodOptional; name: z.ZodOptional; description: z.ZodOptional; team_id: z.ZodOptional; owner_id: z.ZodOptional; created_by: z.ZodOptional; type: z.ZodOptional>; status: z.ZodOptional>; alias: z.ZodOptional>; agent_team_alias: z.ZodOptional>; monthly_budget: z.ZodOptional>; roles: z.ZodOptional>>; integrations: z.ZodOptional>>; examples: z.ZodOptional>; output: z.ZodString; }, z.core.$strip>>>>; resources: z.ZodOptional; index_name: z.ZodOptional; }, z.core.$strip>>>>; config: z.ZodOptional>>; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; created_at: z.ZodOptional>; updated_at: z.ZodOptional>; active_cards: z.ZodOptional>; boards_count: z.ZodOptional>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>; board: z.ZodOptional; team_id: z.ZodOptional; owner_id: z.ZodOptional; created_by: z.ZodOptional; name: z.ZodOptional; description: z.ZodOptional>; alias: z.ZodOptional>; columns: z.ZodOptional; order: z.ZodNumber; }, z.core.$strip>>>>; agent_ids: z.ZodOptional>>; member_ids: z.ZodOptional>>; allowed_roles: z.ZodOptional>>; tags: z.ZodOptional>>; tag_definitions: z.ZodOptional>; }, z.core.$strip>>>>; dashboard_id: z.ZodOptional>>; is_favorite: z.ZodOptional>; active_cards: z.ZodOptional>; deleted_cards: z.ZodOptional>; created_at: z.ZodOptional>; updated_at: z.ZodOptional>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; agents: z.ZodOptional; name: z.ZodOptional; description: z.ZodOptional; team_id: z.ZodOptional; owner_id: z.ZodOptional; created_by: z.ZodOptional; type: z.ZodOptional>; status: z.ZodOptional>; alias: z.ZodOptional>; agent_team_alias: z.ZodOptional>; monthly_budget: z.ZodOptional>; roles: z.ZodOptional>>; integrations: z.ZodOptional>>; examples: z.ZodOptional>; output: z.ZodString; }, z.core.$strip>>>>; resources: z.ZodOptional; index_name: z.ZodOptional; }, z.core.$strip>>>>; config: z.ZodOptional>>; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; created_at: z.ZodOptional>; updated_at: z.ZodOptional>; active_cards: z.ZodOptional>; boards_count: z.ZodOptional>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>>>; }, z.core.$strip>>; }, z.core.$strip>; type ExternalChannel = z.infer; declare const ExternalChannelCreate: z.ZodObject<{ type: z.ZodEnum<{ [x: string]: string; }>; status: z.ZodEnum<{ [x: string]: string; }>; team_id: z.ZodString; name: z.ZodString; alias: z.ZodOptional; description: z.ZodOptional; agent_id: z.ZodString; metadata: z.ZodOptional>; priority: z.ZodEnum<{ [x: string]: string; }>; initial_column_key: z.ZodString; }, z.core.$strip>; type ExternalChannelCreate = z.infer; declare const ExternalChannelUpdate: z.ZodObject<{ type: z.ZodOptional>; status: z.ZodOptional>; name: z.ZodOptional; description: z.ZodOptional>; agent_id: z.ZodOptional; metadata: z.ZodOptional>>; priority: z.ZodOptional>; initial_column_key: z.ZodOptional; }, z.core.$strip>; type ExternalChannelUpdate = z.infer; declare const FeedbackType: { readonly OPERATOR_EVALUATION: "operator_evaluation_added"; readonly USER_CONVERSATION: "user_conversation_feedback"; readonly USER_MESSAGE_EVALUATION: "user_message_evaluation"; }; declare const FeedbackStatus: { readonly UNPROCESSED: "unprocessed"; readonly REVIEWED: "reviewed"; readonly ANNOTATED: "annotated"; }; declare const FeedbackEvaluation: { readonly POSITIVE: "positive"; readonly NEGATIVE: "negative"; }; declare const AgentFeedback: z.ZodObject<{ id: z.ZodString; agent_id: z.ZodString; team_id: z.ZodString; created_by: z.ZodString; type: z.ZodEnum<{ [x: string]: string; }>; status: z.ZodEnum<{ [x: string]: string; }>; evaluation: z.ZodEnum<{ [x: string]: string; }>; comment: z.ZodString; activity_id: z.ZodOptional; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; agent: z.ZodOptional; name: z.ZodOptional; description: z.ZodOptional; team_id: z.ZodOptional; owner_id: z.ZodOptional; created_by: z.ZodOptional; type: z.ZodOptional>; status: z.ZodOptional>; alias: z.ZodOptional>; agent_team_alias: z.ZodOptional>; monthly_budget: z.ZodOptional>; roles: z.ZodOptional>>; integrations: z.ZodOptional>>; examples: z.ZodOptional>; output: z.ZodString; }, z.core.$strip>>>>; resources: z.ZodOptional; index_name: z.ZodOptional; }, z.core.$strip>>>>; config: z.ZodOptional>>; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; created_at: z.ZodOptional>; updated_at: z.ZodOptional>; active_cards: z.ZodOptional>; boards_count: z.ZodOptional>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>>; }, z.core.$strip>; type AgentFeedback = z.infer; declare const AgentFeedbackCreate: z.ZodObject<{ type: z.ZodEnum<{ [x: string]: string; }>; team_id: z.ZodString; created_by: z.ZodString; evaluation: z.ZodEnum<{ [x: string]: string; }>; comment: z.ZodString; activity_id: z.ZodOptional; }, z.core.$strip>; type AgentFeedbackCreate = z.infer; declare const AgentFeedbackUpdate: z.ZodObject<{ type: z.ZodOptional>; evaluation: z.ZodOptional>; comment: z.ZodOptional; activity_id: z.ZodOptional>; status: z.ZodOptional>; }, z.core.$strip>; type AgentFeedbackUpdate = z.infer; declare const SupervisorFeedback: z.ZodObject<{ id: z.ZodString; agent_id: z.ZodString; team_id: z.ZodString; created_by: z.ZodString; feedback: z.ZodString; board_id: z.ZodOptional; agent_feedback_id: z.ZodOptional; activity_id: z.ZodOptional; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; agent: z.ZodOptional; name: z.ZodOptional; description: z.ZodOptional; team_id: z.ZodOptional; owner_id: z.ZodOptional; created_by: z.ZodOptional; type: z.ZodOptional>; status: z.ZodOptional>; alias: z.ZodOptional>; agent_team_alias: z.ZodOptional>; monthly_budget: z.ZodOptional>; roles: z.ZodOptional>>; integrations: z.ZodOptional>>; examples: z.ZodOptional>; output: z.ZodString; }, z.core.$strip>>>>; resources: z.ZodOptional; index_name: z.ZodOptional; }, z.core.$strip>>>>; config: z.ZodOptional>>; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; created_at: z.ZodOptional>; updated_at: z.ZodOptional>; active_cards: z.ZodOptional>; boards_count: z.ZodOptional>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>>; board: z.ZodOptional>; }, z.core.$strip>; type SupervisorFeedback = z.infer; declare const SupervisorFeedbackCreate: z.ZodObject<{ team_id: z.ZodString; created_by: z.ZodString; activity_id: z.ZodOptional; feedback: z.ZodString; board_id: z.ZodOptional; agent_feedback_id: z.ZodOptional; }, z.core.$strip>; type SupervisorFeedbackCreate = z.infer; declare const SupervisorFeedbackUpdate: z.ZodObject<{ activity_id: z.ZodOptional>; feedback: z.ZodOptional; board_id: z.ZodOptional>; agent_feedback_id: z.ZodOptional>; }, z.core.$strip>; type SupervisorFeedbackUpdate = z.infer; declare const AgentKind: { readonly KAIBANJS: "kaibanjs"; readonly CREWAI: "crewai"; readonly EXTERNAL: "external"; readonly A2A: "a2a"; readonly CLAUDE_CODE: "claude_code"; }; declare const AgentStatus: { readonly ACTIVE: "active"; readonly DRAFT: "draft"; readonly INACTIVE: "inactive"; readonly IDLE: "idle"; }; declare const AgentExample: z.ZodObject<{ input: z.ZodOptional>; output: z.ZodString; }, z.core.$strip>; type AgentExample = z.infer; declare const AgentResource: z.ZodObject<{ resource_id: z.ZodString; language: z.ZodOptional; index_name: z.ZodOptional; }, z.core.$strip>; type AgentResource = z.infer; declare const Agent: z.ZodObject<{ id: z.ZodString; name: z.ZodString; description: z.ZodString; team_id: z.ZodString; owner_id: z.ZodString; created_by: z.ZodString; type: z.ZodEnum<{ [x: string]: string; }>; status: z.ZodEnum<{ [x: string]: string; }>; alias: z.ZodOptional; agent_team_alias: z.ZodOptional; monthly_budget: z.ZodOptional; roles: z.ZodOptional>; integrations: z.ZodOptional>; examples: z.ZodOptional>; output: z.ZodString; }, z.core.$strip>>>; resources: z.ZodOptional; index_name: z.ZodOptional; }, z.core.$strip>>>; config: z.ZodOptional>; avatar_id: z.ZodOptional; avatar_url: z.ZodOptional; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; active_cards: z.ZodOptional; boards_count: z.ZodOptional; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; type Agent = z.infer; declare const AgentCreate: z.ZodObject<{ type: z.ZodEnum<{ [x: string]: string; }>; status: z.ZodEnum<{ [x: string]: string; }>; team_id: z.ZodString; name: z.ZodString; alias: z.ZodOptional; description: z.ZodString; created_by: z.ZodString; owner_id: z.ZodString; agent_team_alias: z.ZodOptional; monthly_budget: z.ZodOptional; roles: z.ZodOptional>; integrations: z.ZodOptional>; examples: z.ZodOptional>; output: z.ZodString; }, z.core.$strip>>>; resources: z.ZodOptional; index_name: z.ZodOptional; }, z.core.$strip>>>; config: z.ZodOptional>; }, z.core.$strip>; type AgentCreate = z.infer; declare const AgentUpdate: z.ZodObject<{ type: z.ZodOptional>; status: z.ZodOptional>; name: z.ZodOptional; description: z.ZodOptional; agent_team_alias: z.ZodOptional>; monthly_budget: z.ZodOptional>; roles: z.ZodOptional>>; integrations: z.ZodOptional>>; examples: z.ZodOptional>; output: z.ZodString; }, z.core.$strip>>>>; resources: z.ZodOptional; index_name: z.ZodOptional; }, z.core.$strip>>>>; config: z.ZodOptional>>; }, z.core.$strip>; type AgentUpdate = z.infer; declare const AgentRetireAction: { readonly DEACTIVATE: "deactivate"; readonly REASSIGN: "reassign"; }; type AgentRetireAction = (typeof AgentRetireAction)[keyof typeof AgentRetireAction]; declare const AgentRetireBoardEntry: z.ZodObject<{ board_id: z.ZodString; action: z.ZodEnum<{ [x: string]: string; }>; reassign_to_agent_id: z.ZodOptional; }, z.core.$strip>; type AgentRetireBoardEntry = z.infer; declare const AgentRetireBody: z.ZodObject<{ boards: z.ZodArray; reassign_to_agent_id: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; type AgentRetireBody = z.infer; declare const AgentRetireResult: z.ZodObject<{ success: z.ZodBoolean; processed_boards: z.ZodNumber; processed_cards: z.ZodNumber; processed_channels: z.ZodNumber; }, z.core.$strip>; type AgentRetireResult = z.infer; declare const CardComment: z.ZodObject<{ id: z.ZodString; card_id: z.ZodString; author_id: z.ZodString; text: z.ZodNullable; reply_to_id: z.ZodNullable; deleted_at: z.ZodNullable>; team_id: z.ZodString; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; author: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; type CardComment = z.infer; declare const CardCommentCreate: z.ZodObject<{ author_id: z.ZodString; text: z.ZodString; mention_ids: z.ZodOptional>; }, z.core.$strip>; type CardCommentCreate = z.infer; declare const CardCommentUpdate: z.ZodObject<{ text: z.ZodString; mention_ids: z.ZodOptional>; }, z.core.$strip>; type CardCommentUpdate = z.infer; declare const NotificationType: { readonly CARD_ASSIGNED: "card_assigned"; readonly BOARD_CHANGE: "board_change"; readonly MENTION: "mention"; }; type NotificationType = (typeof NotificationType)[keyof typeof NotificationType]; declare const Notification: z.ZodObject<{ id: z.ZodString; user_id: z.ZodString; type: z.ZodEnum<{ [x: string]: string; }>; title: z.ZodString; message: z.ZodString; read: z.ZodBoolean; read_at: z.ZodOptional>>; card_id: z.ZodOptional; board_id: z.ZodOptional; team_id: z.ZodString; team_name: z.ZodOptional; email_sent: z.ZodBoolean; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; card: z.ZodOptional; team_id: z.ZodOptional; board_id: z.ZodOptional; owner_id: z.ZodOptional; agent_id: z.ZodOptional>; title: z.ZodOptional; description: z.ZodOptional>; status: z.ZodOptional>; column_key: z.ZodOptional; priority: z.ZodOptional>>; result: z.ZodOptional>; tags: z.ZodOptional>>; member_ids: z.ZodOptional>>; related_card_ids: z.ZodOptional>>; related_cards_resolved: z.ZodOptional; board_name: z.ZodOptional; title: z.ZodOptional; status: z.ZodEnum<{ active: "active"; recycled: "recycled"; permanently_deleted: "permanently_deleted"; }>; permanent_deleted_at: z.ZodOptional; }, z.core.$strip>>>>; parts: z.ZodOptional; text: z.ZodOptional; metadata: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"file">; file: z.ZodOptional; url: z.ZodOptional; }, z.core.$strip>>; metadata: z.ZodOptional>; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"data">; data: z.ZodOptional>; metadata: z.ZodOptional>; }, z.core.$strip>], "type">>>>; metadata: z.ZodOptional>>; enabled: z.ZodOptional>; reference_code: z.ZodOptional>; deleted_at: z.ZodOptional>; deleted_by: z.ZodOptional>; permanent_deleted_at: z.ZodOptional>; created_at: z.ZodOptional; updated_at: z.ZodOptional; board: z.ZodOptional; team_id: z.ZodOptional; owner_id: z.ZodOptional; created_by: z.ZodOptional; name: z.ZodOptional; description: z.ZodOptional>; alias: z.ZodOptional>; columns: z.ZodOptional; order: z.ZodNumber; }, z.core.$strip>>>>; agent_ids: z.ZodOptional>>; member_ids: z.ZodOptional>>; allowed_roles: z.ZodOptional>>; tags: z.ZodOptional>>; tag_definitions: z.ZodOptional>; }, z.core.$strip>>>>; dashboard_id: z.ZodOptional>>; is_favorite: z.ZodOptional>; active_cards: z.ZodOptional>; deleted_cards: z.ZodOptional>; created_at: z.ZodOptional>; updated_at: z.ZodOptional>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; agents: z.ZodOptional; name: z.ZodOptional; description: z.ZodOptional; team_id: z.ZodOptional; owner_id: z.ZodOptional; created_by: z.ZodOptional; type: z.ZodOptional>; status: z.ZodOptional>; alias: z.ZodOptional>; agent_team_alias: z.ZodOptional>; monthly_budget: z.ZodOptional>; roles: z.ZodOptional>>; integrations: z.ZodOptional>>; examples: z.ZodOptional>; output: z.ZodString; }, z.core.$strip>>>>; resources: z.ZodOptional; index_name: z.ZodOptional; }, z.core.$strip>>>>; config: z.ZodOptional>>; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; created_at: z.ZodOptional>; updated_at: z.ZodOptional>; active_cards: z.ZodOptional>; boards_count: z.ZodOptional>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>>>; }, z.core.$strip>>>; agent: z.ZodOptional; name: z.ZodOptional; description: z.ZodOptional; team_id: z.ZodOptional; owner_id: z.ZodOptional; created_by: z.ZodOptional; type: z.ZodOptional>; status: z.ZodOptional>; alias: z.ZodOptional>; agent_team_alias: z.ZodOptional>; monthly_budget: z.ZodOptional>; roles: z.ZodOptional>>; integrations: z.ZodOptional>>; examples: z.ZodOptional>; output: z.ZodString; }, z.core.$strip>>>>; resources: z.ZodOptional; index_name: z.ZodOptional; }, z.core.$strip>>>>; config: z.ZodOptional>>; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; created_at: z.ZodOptional>; updated_at: z.ZodOptional>; active_cards: z.ZodOptional>; boards_count: z.ZodOptional>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>>; owner: z.ZodOptional; user_id: z.ZodOptional; email: z.ZodOptional; full_name: z.ZodOptional; avatar_id: z.ZodOptional>; avatar_url: z.ZodOptional>; last_selected_team_id: z.ZodOptional>>; requires_password_change: z.ZodOptional>; mfa_enrolled: z.ZodOptional>; mfa_enrolled_at: z.ZodOptional>>>; created_at: z.ZodOptional; updated_at: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>; }, z.core.$strip>; type Notification = z.infer; declare const NotificationCreate: z.ZodObject<{ type: z.ZodEnum<{ [x: string]: string; }>; title: z.ZodString; user_id: z.ZodString; message: z.ZodString; team_id: z.ZodString; board_id: z.ZodOptional; card_id: z.ZodOptional; team_name: z.ZodOptional; read: z.ZodDefault>; email_sent: z.ZodDefault>; read_at: z.ZodOptional>>; }, z.core.$strip>; type NotificationCreate = z.infer; declare const NotificationUpdate: z.ZodObject<{ read: z.ZodOptional; read_at: z.ZodOptional>>; }, z.core.$strip>; type NotificationUpdate = z.infer; declare const MarkAllReadBody: z.ZodObject<{ user_id: z.ZodString; }, z.core.$strip>; type MarkAllReadBody = z.infer; declare const App: z.ZodObject<{ id: z.ZodString; name: z.ZodString; alias: z.ZodOptional; description: z.ZodOptional; team_id: z.ZodString; created_by: z.ZodString; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; settings: z.ZodOptional; name: z.ZodString; sections: z.ZodDefault>>; created_by: z.ZodString; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; app: z.ZodOptional>; }, z.core.$strip>>>>; }, z.core.$strip>; type App = z.infer; declare const AppCreate: z.ZodObject<{ team_id: z.ZodString; name: z.ZodString; alias: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>; type AppCreate = z.infer; declare const AppUpdate: z.ZodObject<{ name: z.ZodOptional; description: z.ZodOptional>; }, z.core.$strip>; type AppUpdate = z.infer; declare const AppSettings: z.ZodObject<{ id: z.ZodString; app_id: z.ZodString; alias: z.ZodOptional; name: z.ZodString; sections: z.ZodDefault>>; created_by: z.ZodString; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; app: z.ZodOptional>; }, z.core.$strip>; type AppSettings = z.infer; declare const AppSettingsCreate: z.ZodObject<{ name: z.ZodString; alias: z.ZodOptional; sections: z.ZodDefault>>; }, z.core.$strip>; type AppSettingsCreate = z.infer; declare const AppSettingsUpdate: z.ZodObject<{ name: z.ZodOptional; sections: z.ZodOptional>>; }, z.core.$strip>; type AppSettingsUpdate = z.infer; declare const Integration: z.ZodObject<{ id: z.ZodString; name: z.ZodString; description: z.ZodOptional; config: z.ZodRecord; tags: z.ZodOptional>; team_id: z.ZodString; created_by: z.ZodString; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; }, z.core.$strip>; type Integration = z.infer; declare const IntegrationCreate: z.ZodObject<{ team_id: z.ZodString; name: z.ZodString; description: z.ZodOptional; created_by: z.ZodString; config: z.ZodRecord; tags: z.ZodOptional>; }, z.core.$strip>; type IntegrationCreate = z.infer; declare const IntegrationUpdate: z.ZodObject<{ name: z.ZodOptional; description: z.ZodOptional>; config: z.ZodOptional>; tags: z.ZodOptional>>; }, z.core.$strip>; type IntegrationUpdate = z.infer; declare const AgentDraftStatus: { readonly BACKLOG: "backlog"; readonly TODO: "todo"; readonly DOING: "doing"; readonly BLOCKED: "blocked"; readonly DONE: "done"; }; type AgentDraftStatus = (typeof AgentDraftStatus)[keyof typeof AgentDraftStatus]; declare const AgentDraftPriority: { readonly LOW: "low"; readonly MEDIUM: "medium"; readonly HIGH: "high"; readonly CRITICAL: "critical"; }; type AgentDraftPriority = (typeof AgentDraftPriority)[keyof typeof AgentDraftPriority]; declare const AgentDraft: z.ZodObject<{ id: z.ZodString; name: z.ZodString; description: z.ZodOptional; status: z.ZodEnum<{ [x: string]: string; }>; vendor: z.ZodString; priority: z.ZodEnum<{ [x: string]: string; }>; team_id: z.ZodString; created_by: z.ZodString; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; }, z.core.$strip>; type AgentDraft = z.infer; declare const AgentDraftCreate: z.ZodObject<{ team_id: z.ZodString; name: z.ZodString; description: z.ZodOptional; created_by: z.ZodString; vendor: z.ZodString; status: z.ZodDefault>>; priority: z.ZodDefault>>; }, z.core.$strip>; type AgentDraftCreate = z.infer; declare const AgentDraftUpdate: z.ZodObject<{ name: z.ZodOptional; description: z.ZodOptional>; vendor: z.ZodOptional; status: z.ZodOptional>; priority: z.ZodOptional>; }, z.core.$strip>; type AgentDraftUpdate = z.infer; declare const AgentDraftPublishBody: z.ZodObject<{ type: z.ZodEnum<{ [x: string]: string; }>; owner_id: z.ZodString; alias: z.ZodOptional; monthly_budget: z.ZodOptional; roles: z.ZodOptional>; integrations: z.ZodOptional>; examples: z.ZodOptional>; output: z.ZodString; }, z.core.$strip>>>; resources: z.ZodOptional; index_name: z.ZodOptional; }, z.core.$strip>>>; config: z.ZodOptional>; }, z.core.$strip>; type AgentDraftPublishBody = z.infer; declare const PositionStatus: { readonly ACTIVE: "active"; readonly INACTIVE: "inactive"; readonly DRAFT: "draft"; }; type PositionStatus = (typeof PositionStatus)[keyof typeof PositionStatus]; declare const Position: z.ZodObject<{ id: z.ZodString; title: z.ZodString; job_description: z.ZodString; team_id: z.ZodString; created_by: z.ZodString; ai_skills: z.ZodOptional>; tools_to_integrate: z.ZodOptional>; monthly_budget: z.ZodOptional; status: z.ZodOptional>; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; }, z.core.$strip>; type Position = z.infer; declare const PositionCreate: z.ZodObject<{ title: z.ZodString; status: z.ZodOptional>; team_id: z.ZodString; created_by: z.ZodString; job_description: z.ZodString; ai_skills: z.ZodDefault>; tools_to_integrate: z.ZodDefault>; monthly_budget: z.ZodDefault; }, z.core.$strip>; type PositionCreate = z.infer; declare const PositionUpdate: z.ZodObject<{ title: z.ZodOptional; status: z.ZodOptional>>; job_description: z.ZodOptional; ai_skills: z.ZodOptional>; tools_to_integrate: z.ZodOptional>; monthly_budget: z.ZodOptional; }, z.core.$strip>; type PositionUpdate = z.infer; declare const ResourceStatus: { readonly DRAFT: "draft"; readonly INDEXING: "indexing"; readonly INDEXING_ERROR: "indexing_error"; readonly PUBLISHED: "published"; readonly ARCHIVED: "archived"; }; type ResourceStatus = (typeof ResourceStatus)[keyof typeof ResourceStatus]; declare const EmbeddingProvider: { readonly OPENAI: "openai"; readonly JINA: "jina"; }; type EmbeddingProvider = (typeof EmbeddingProvider)[keyof typeof EmbeddingProvider]; declare const DocumentParser: { readonly SEMANTIC_MARKDOWN: "semantic-markdown"; readonly FAQ_ENRICHED: "faq-enriched"; readonly ATA_CODES: "ata-codes"; }; type DocumentParser = (typeof DocumentParser)[keyof typeof DocumentParser]; declare const Resource: z.ZodObject<{ id: z.ZodString; title: z.ZodString; description: z.ZodString; version: z.ZodNumber; status: z.ZodEnum<{ [x: string]: string; }>; team_id: z.ZodString; created_by: z.ZodString; last_edited_by: z.ZodOptional; published_at: z.ZodOptional>; draft_content: z.ZodString; published_content: z.ZodString; vector_db_index_name: z.ZodOptional; language: z.ZodString; embedding_provider: z.ZodOptional>; document_parser: z.ZodOptional>; created_at: z.ZodCoercedDate; updated_at: z.ZodCoercedDate; }, z.core.$strip>; type Resource = z.infer; declare const ResourceCreate: z.ZodObject<{ title: z.ZodString; team_id: z.ZodString; description: z.ZodString; created_by: z.ZodString; last_edited_by: z.ZodOptional; vector_db_index_name: z.ZodOptional; embedding_provider: z.ZodOptional>; document_parser: z.ZodOptional>; status: z.ZodDefault>; version: z.ZodDefault; language: z.ZodDefault; draft_content: z.ZodDefault; published_content: z.ZodDefault; }, z.core.$strip>; type ResourceCreate = z.infer; declare const ResourceUpdate: z.ZodObject<{ title: z.ZodOptional; description: z.ZodOptional; last_edited_by: z.ZodOptional>; vector_db_index_name: z.ZodOptional>; embedding_provider: z.ZodOptional>>; document_parser: z.ZodOptional>>; status: z.ZodOptional>; version: z.ZodOptional; language: z.ZodOptional; draft_content: z.ZodOptional; published_content: z.ZodOptional; }, z.core.$strip>; type ResourceUpdate = z.infer; /** Cursor-paginated response envelope — returned by all list endpoints. */ interface Paginated { data: T[]; pagination: { limit: number; next_cursor: string | null; prev_cursor: string | null; }; } /** Common query parameters accepted by all list endpoints. */ interface ListParams { /** DSL filter string — e.g. `"name.iregex:acme"` */ q?: string; /** Sort string — e.g. `"created_at:desc"` */ sort?: string; /** Comma-separated field projection — e.g. `"id,name,created_at"` */ fields?: string; /** Page size (default 100). */ limit?: number; /** Forward pagination cursor from `pagination.next_cursor`. */ after?: string; /** Backward pagination cursor from `pagination.prev_cursor`. */ before?: string; /** Full-text search string (requires text index on the resource). */ fts?: string; } declare class Fetcher { private readonly config; constructor(config: ClientConfig); private resolveAuth; request(method: string, path: string, options?: { query?: Record; body?: unknown; request?: RequestOptions; }): Promise; get(path: string, query?: Record, opts?: RequestOptions): Promise; post(path: string, body?: unknown, opts?: RequestOptions): Promise; patch(path: string, body?: unknown, opts?: RequestOptions): Promise; delete(path: string, opts?: RequestOptions): Promise; list(path: string, params?: ListParams, opts?: RequestOptions): Promise>; stream(path: string, query?: Record, opts?: RequestOptions): Promise; } declare class TeamsClient { private readonly fetcher; constructor(fetcher: Fetcher); /** * Lists teams with cursor pagination and optional DSL filtering. * * @example * ```ts * const page = await client.teams.list({ limit: 20 }); * for (const team of page.data) console.log(team.name); * ``` */ list(params?: ListParams, opts?: RequestOptions): Promise>; /** * Creates a new team. * * @example * ```ts * const team = await client.teams.create({ name: "Engineering", description: "..." }); * ``` */ create(data: TeamCreate, opts?: RequestOptions): Promise; /** * Gets a single team by ID. * * @throws {NotFoundError} when no team with `id` exists. */ get(id: string, opts?: RequestOptions): Promise; /** * Partially updates a team. Only provided fields are changed. * * @throws {NotFoundError} when no team with `id` exists. */ update(id: string, data: TeamUpdate, opts?: RequestOptions): Promise; /** * Deletes a team and all its members. * * @throws {NotFoundError} when no team with `id` exists. */ delete(id: string, opts?: RequestOptions): Promise; /** * Lists members of a team. * * @example * ```ts * const members = await client.teams.listMembers(teamId); * ``` */ listMembers(teamId: string, params?: ListParams, opts?: RequestOptions): Promise>; /** * Adds a member to a team. * * @example * ```ts * const member = await client.teams.addMember(teamId, { * user_id: "user-123", role: "member", full_name: "Alice" * }); * ``` */ addMember(teamId: string, data: TeamMemberCreate, opts?: RequestOptions): Promise; /** * Updates a team member's role or profile fields. * * @throws {NotFoundError} when the member doesn't exist in the team. */ updateMember(teamId: string, memberId: string, data: TeamMemberUpdate, opts?: RequestOptions): Promise; /** * Removes a member from a team. * * @throws {NotFoundError} when the member doesn't exist in the team. */ removeMember(teamId: string, memberId: string, opts?: RequestOptions): Promise; /** * Invites a user to a team by email. * Creates a new Firebase user if the email doesn't exist yet. * Returns `is_new_user: true` and a `temp_code` for new accounts. * * @example * ```ts * const result = await client.teams.invite(teamId, { * email: "alice@example.com", * role: "member", * full_name: "Alice", * }); * if (result.is_new_user) console.log("Temp code:", result.temp_code); * ``` */ invite(teamId: string, data: InviteCreate, opts?: RequestOptions): Promise; /** * Lists pending invitations for a team. */ listInvitations(teamId: string, params?: ListParams, opts?: RequestOptions): Promise>; /** * Removes (cancels) a pending invitation. * * @throws {NotFoundError} when the invitation doesn't exist. */ deleteInvitation(teamId: string, uid: string, opts?: RequestOptions): Promise; } /** Options for `ActivitiesClient.stream()`. */ interface StreamOptions { /** DSL filter applied server-side — only matching activities are streamed. */ q?: string; /** Field projection — limits which fields are included in each event. */ fields?: string; /** AbortSignal to close the stream. Pass `controller.signal` to cancel. */ signal?: AbortSignal; /** Called for each activity received from the stream. */ onActivity: (activity: Activity) => void; /** Called when the stream encounters a parse or transport error. */ onError?: (err: Error) => void; /** Called when the stream closes (signal aborted or server closed). */ onClose?: () => void; } /** Return value of `stream()` — use `cancel()` to close the connection. */ interface StreamHandle { /** Aborts the underlying fetch request and closes the SSE connection. */ cancel: () => void; } declare class ActivitiesClient { #private; private readonly fetcher; constructor(fetcher: Fetcher); /** * Lists activities with cursor pagination and optional DSL filtering. * * @example * ```ts * const page = await client.activities.list({ * q: "card_id.eq:'card-abc'", * sort: "created_at:desc", * limit: 50, * }); * ``` */ list(params?: ListParams, opts?: RequestOptions): Promise>; /** * Creates a single activity. * * @example * ```ts * const activity = await client.activities.create({ * team_id: "team-abc", * type: "card_status_changed", * description: "Status changed to done", * card_id: "card-123", * actor: { id: "user-1", type: "user", name: "Alice" }, * }); * ``` */ create(data: ActivityCreate, opts?: RequestOptions): Promise; /** * Bulk-creates multiple activities in a single request. * More efficient than calling `create()` in a loop. * * @example * ```ts * const created = await client.activities.bulkCreate([ * { team_id: "t", type: "card_created", description: "...", ... }, * { team_id: "t", type: "card_member_added", description: "...", ... }, * ]); * ``` */ bulkCreate(items: ActivityCreate[], opts?: RequestOptions): Promise; /** * Opens a real-time SSE stream of activities. * * Activities are pushed server-side as soon as they are created. * The stream runs until `cancel()` is called or the optional `signal` is aborted. * * Works in **Node 18+** (native fetch streaming) and **all modern browsers**. * For Node < 18 inject a `fetch` that supports streaming via `ClientConfig.fetch`. * * @example * ```ts * const { cancel } = client.activities.stream({ * q: `board_id.eq:'${boardId}'`, * onActivity: (activity) => { * console.log(activity.type, activity.description); * }, * onError: (err) => console.error("SSE error:", err), * onClose: () => console.log("Stream closed"), * }); * * // Later — close the connection * cancel(); * ``` * * @example With AbortController: * ```ts * const ctrl = new AbortController(); * client.activities.stream({ signal: ctrl.signal, onActivity: handler }); * // Cancel from outside * ctrl.abort(); * ``` */ stream(options: StreamOptions): StreamHandle; } declare class BoardsClient { private readonly fetcher; constructor(fetcher: Fetcher); /** * Lists boards with cursor pagination and optional DSL filtering. * * @example * ```ts * const page = await client.boards.list({ q: "team_id.eq:'team-abc'" }); * for (const board of page.data) console.log(board.name); * ``` */ list(params?: ListParams, opts?: RequestOptions): Promise>; /** * Creates a new board. * * @example * ```ts * const board = await client.boards.create({ * team_id: "team-abc", * owner_id: "user-1", * created_by: "user-1", * name: "Sprint 1", * }); * ``` */ create(data: BoardCreate, opts?: RequestOptions): Promise; /** * Gets a single board by ID or URL-safe alias. * * @throws {NotFoundError} when no board with `id` exists. */ get(id: string, opts?: RequestOptions): Promise; /** * Partially updates a board. Only provided fields are changed. * * @throws {NotFoundError} when no board with `id` exists. */ update(id: string, data: BoardUpdate, opts?: RequestOptions): Promise; /** * Deletes a board and all its associated data. * * @throws {NotFoundError} when no board with `id` exists. */ delete(id: string, opts?: RequestOptions): Promise; /** * Returns all tags aggregated from cards on this board. * * @example * ```ts * const { tags } = await client.boards.listTags(boardId); * ``` */ listTags(id: string, opts?: RequestOptions): Promise<{ board_id: string; tags: string[]; }>; /** * Returns the aggregated member and agent IDs across all cards on this board. * * @example * ```ts * const { member_ids, agent_ids } = await client.boards.listMembers(boardId); * ``` */ listMembers(id: string, opts?: RequestOptions): Promise<{ board_id: string; member_ids: string[]; agent_ids: string[]; }>; /** * Hard-deletes all soft-deleted (recycled) cards on the board. * Returns the count of permanently deleted cards. * * @example * ```ts * const { deleted_count } = await client.boards.emptyRecycleBin(boardId); * ``` */ emptyRecycleBin(id: string, opts?: RequestOptions): Promise<{ deleted_count: number; }>; /** * Lists external channels linked to a board. * * @example * ```ts * const channels = await client.boards.listChannels(boardId); * ``` */ listChannels(boardId: string, params?: ListParams, opts?: RequestOptions): Promise>; /** * Links an external channel (e.g. Slack) to a board. * * @throws {NotFoundError} when no board with `boardId` exists. */ createChannel(boardId: string, data: ExternalChannelCreate, opts?: RequestOptions): Promise; /** * Gets a single external channel by ID. * * @throws {NotFoundError} when the channel doesn't exist. */ getChannel(boardId: string, channelId: string, opts?: RequestOptions): Promise; /** * Updates an external channel. * * @throws {NotFoundError} when the channel doesn't exist. */ updateChannel(boardId: string, channelId: string, data: ExternalChannelUpdate, opts?: RequestOptions): Promise; /** * Removes an external channel from a board. * * @throws {NotFoundError} when the channel doesn't exist. */ deleteChannel(boardId: string, channelId: string, opts?: RequestOptions): Promise; } declare class CardsClient { private readonly fetcher; constructor(fetcher: Fetcher); /** * Lists cards with cursor pagination and optional DSL filtering. * Pass `deleted: true` to list soft-deleted cards (recycle bin). * * @example * ```ts * // Active cards on a board * const page = await client.cards.list({ q: "board_id.eq:'board-abc'", limit: 50 }); * * // Recycle bin * const recycled = await client.cards.list({ deleted: true }); * ``` */ list(params?: ListParams & { deleted?: boolean; }, opts?: RequestOptions): Promise>; /** * Creates a new card. * * @example * ```ts * const card = await client.cards.create({ * team_id: "team-abc", * board_id: "board-xyz", * owner_id: "user-1", * title: "Implement auth", * status: "todo", * column_key: "todo", * }); * ``` */ create(data: CardCreate, opts?: RequestOptions): Promise; /** * Gets a single card by ID. * Includes `related_cards_resolved` with board name and lifecycle status. * * @throws {NotFoundError} when no card with `id` exists. */ get(id: string, opts?: RequestOptions): Promise; /** * Partially updates a card. Only provided fields are changed. * * @throws {NotFoundError} when no card with `id` exists. */ update(id: string, data: CardUpdate, opts?: RequestOptions): Promise; /** * Soft-deletes a card (moves it to the recycle bin). * Pass `permanent: true` to hard-delete immediately. * * @throws {NotFoundError} when no card with `id` exists. */ delete(id: string, options?: { permanent?: boolean; }, opts?: RequestOptions): Promise; /** * Creates multiple cards in a single request. * Returns the created cards in the same order as the input. * * @example * ```ts * const cards = await client.cards.bulkCreate([ * { team_id: "t", board_id: "b", owner_id: "u", title: "Task 1", status: "todo", column_key: "todo" }, * { team_id: "t", board_id: "b", owner_id: "u", title: "Task 2", status: "todo", column_key: "todo" }, * ]); * ``` */ bulkCreate(items: CardCreate[], opts?: RequestOptions): Promise; /** * Partially updates multiple cards in a single request. * Each item must include `card_id` plus the fields to update. * * @example * ```ts * await client.cards.bulkUpdate([ * { card_id: "card-1", status: "done" }, * { card_id: "card-2", status: "doing" }, * ]); * ``` */ bulkUpdate(items: CardBulkUpdateItem[], opts?: RequestOptions): Promise; /** * Deletes multiple cards in a single request. * Performs soft-delete by default; pass `permanent: true` for hard-delete. */ bulkDelete(items: CardBulkDeleteItem[], options?: { permanent?: boolean; }, opts?: RequestOptions): Promise; /** * Moves multiple cards to a target column in a single request. * * @example * ```ts * await client.cards.bulkMove([ * { card_id: "card-1", column_key: "done" }, * { card_id: "card-2", column_key: "done" }, * ]); * ``` */ bulkMove(items: CardBulkMoveItem[], opts?: RequestOptions): Promise; /** * Restores a soft-deleted card from the recycle bin. * * @throws {NotFoundError} when no recycled card with `id` exists. */ restore(id: string, opts?: RequestOptions): Promise; /** * Creates a full copy of a card (including parts and metadata). * The clone lands in the same board and column as the original. * * @throws {NotFoundError} when no card with `id` exists. */ clone(id: string, opts?: RequestOptions): Promise; /** * Assigns (or clears) the agent on a card. * Pass `agent_id: null` to remove the current agent assignment. * * @throws {NotFoundError} when no card with `id` exists. */ assignAgent(id: string, data: { agent_id: string | null; }, opts?: RequestOptions): Promise; /** * Adds a user as a member of a card. * * @throws {NotFoundError} when no card with `id` exists. */ addMember(id: string, data: { user_id: string; }, opts?: RequestOptions): Promise; /** * Removes a member from a card. * * @throws {NotFoundError} when no card with `id` exists. */ removeMember(id: string, userId: string, opts?: RequestOptions): Promise; /** * Attaches an already-uploaded file to a card. * The file must have been uploaded via the Storage API first. * * @example * ```ts * await client.cards.addAttachment(cardId, { * file_id: "file-abc", * file_name: "report.pdf", * mime_type: "application/pdf", * }); * ``` */ addAttachment(id: string, data: { file_id: string; file_name: string; mime_type: string; }, opts?: RequestOptions): Promise; /** * Removes an attachment from a card. * * @example * ```ts * await client.cards.removeAttachment(cardId, { file_id: "file-abc" }); * ``` */ removeAttachment(id: string, data: { file_id: string; }, opts?: RequestOptions): Promise; /** * Creates a new session on a card. * * @example * ```ts * const session = await client.cards.createSession(cardId, { metadata: { run_id: "r1" } }); * ``` */ createSession(cardId: string, data?: SessionCreate, opts?: RequestOptions): Promise; /** * Lists sessions for a card. */ listSessions(cardId: string, params?: ListParams, opts?: RequestOptions): Promise>; /** * Gets a single session by ID. * * @throws {NotFoundError} when the session doesn't exist. */ getSession(cardId: string, sessionId: string, opts?: RequestOptions): Promise; /** * Updates a session's metadata. * * @throws {NotFoundError} when the session doesn't exist. */ updateSession(cardId: string, sessionId: string, data: SessionUpdate, opts?: RequestOptions): Promise; /** * Deletes a session and all its data entries. * * @throws {NotFoundError} when the session doesn't exist. */ deleteSession(cardId: string, sessionId: string, opts?: RequestOptions): Promise; /** * Creates a session data entry (or batch of entries). * * @example Single entry: * ```ts * const entry = await client.cards.createSessionData(cardId, sessionId, { * label: "result", * data: { score: 0.95, tokens: 1200 }, * }); * ``` * * @example Batch: * ```ts * const entries = await client.cards.createSessionData(cardId, sessionId, { * items: [ * { label: "step-1", data: { output: "..." } }, * { label: "step-2", data: { output: "..." } }, * ], * }); * ``` */ createSessionData(cardId: string, sessionId: string, data: SessionDataCreate | { items: SessionDataCreate[]; }, opts?: RequestOptions): Promise; /** * Lists all data entries for a session. */ listSessionData(cardId: string, sessionId: string, params?: ListParams, opts?: RequestOptions): Promise>; /** * Gets a single session data entry by ID. * * @throws {NotFoundError} when the entry doesn't exist. */ getSessionData(cardId: string, sessionId: string, dataId: string, opts?: RequestOptions): Promise; /** * Updates a session data entry. * * @throws {NotFoundError} when the entry doesn't exist. */ updateSessionData(cardId: string, sessionId: string, dataId: string, data: SessionDataUpdate, opts?: RequestOptions): Promise; /** * Deletes a session data entry. * * @throws {NotFoundError} when the entry doesn't exist. */ deleteSessionData(cardId: string, sessionId: string, dataId: string, opts?: RequestOptions): Promise; /** * Adds a comment to a card. * Include `mention_ids` to trigger mention notifications for the listed users. * * @example * ```ts * const comment = await client.cards.createComment(cardId, { * author_id: "user-1", * text: "Looks good to me!", * mention_ids: ["user-2"], * }); * ``` */ createComment(cardId: string, data: CardCommentCreate, opts?: RequestOptions): Promise; /** * Lists comments on a card. */ listComments(cardId: string, params?: ListParams, opts?: RequestOptions): Promise>; /** * Updates a comment's text. * * @throws {NotFoundError} when the comment doesn't exist. */ updateComment(cardId: string, commentId: string, data: CardCommentUpdate, opts?: RequestOptions): Promise; /** * Deletes a comment. * * @throws {NotFoundError} when the comment doesn't exist. */ deleteComment(cardId: string, commentId: string, opts?: RequestOptions): Promise; /** * Adds a reply to a comment. * The reply author is identified by `author_id`. * * @example * ```ts * await client.cards.createReply(cardId, commentId, { * author_id: "user-2", * text: "Thanks for the review!", * }); * ``` */ createReply(cardId: string, commentId: string, data: CardCommentCreate, opts?: RequestOptions): Promise; /** * Lists replies on a comment. */ listReplies(cardId: string, commentId: string, params?: ListParams, opts?: RequestOptions): Promise>; } declare class AgentsClient { private readonly fetcher; constructor(fetcher: Fetcher); /** * Lists agents with cursor pagination and optional DSL filtering. * * @example * ```ts * const page = await client.agents.list({ q: "status.eq:active" }); * ``` */ list(params?: ListParams, opts?: RequestOptions): Promise>; /** * Creates a new agent. * * @example * ```ts * const agent = await client.agents.create({ * team_id: "team-abc", * name: "Baggage Agent", * kind: "task", * }); * ``` */ create(data: AgentCreate, opts?: RequestOptions): Promise; /** * Gets a single agent by ID. * * @throws {NotFoundError} when no agent with `id` exists. */ get(id: string, opts?: RequestOptions): Promise; /** * Partially updates an agent. Only provided fields are changed. * * @throws {NotFoundError} when no agent with `id` exists. */ update(id: string, data: AgentUpdate, opts?: RequestOptions): Promise; /** * Permanently deletes an agent. * * @throws {NotFoundError} when no agent with `id` exists. */ delete(id: string, opts?: RequestOptions): Promise; /** * Retires an agent — removes it from active boards according to the * specified action (`remove` or `keep`) per board. * * @example * ```ts * const result = await client.agents.retire(agentId, { * boards: [ * { board_id: "board-1", action: "remove" }, * { board_id: "board-2", action: "keep" }, * ], * }); * console.log(result.retired_from); // board IDs where agent was removed * ``` */ retire(id: string, data: AgentRetireBody, opts?: RequestOptions): Promise; /** * Lists feedback entries for an agent. * * @example * ```ts * const page = await client.agents.listFeedback(agentId, { * q: "evaluation.eq:positive", * }); * ``` */ listFeedback(agentId: string, params?: ListParams, opts?: RequestOptions): Promise>; /** * Creates a feedback entry for an agent. * * @example * ```ts * const feedback = await client.agents.createFeedback(agentId, { * type: "human", * evaluation: "positive", * comment: "Handled the baggage claim perfectly.", * card_id: "card-123", * }); * ``` */ createFeedback(agentId: string, data: AgentFeedbackCreate, opts?: RequestOptions): Promise; /** * Gets a single feedback entry by ID. * * @throws {NotFoundError} when the feedback entry doesn't exist. */ getFeedback(agentId: string, feedbackId: string, opts?: RequestOptions): Promise; /** * Updates a feedback entry. * * @throws {NotFoundError} when the feedback entry doesn't exist. */ updateFeedback(agentId: string, feedbackId: string, data: AgentFeedbackUpdate, opts?: RequestOptions): Promise; /** * Deletes a feedback entry. * * @throws {NotFoundError} when the feedback entry doesn't exist. */ deleteFeedback(agentId: string, feedbackId: string, opts?: RequestOptions): Promise; /** * Lists supervisor feedback entries for an agent. * * @example * ```ts * const page = await client.agents.listSupervisorFeedback(agentId); * ``` */ listSupervisorFeedback(agentId: string, params?: ListParams, opts?: RequestOptions): Promise>; /** * Creates a supervisor feedback entry for an agent. * * @example * ```ts * const sf = await client.agents.createSupervisorFeedback(agentId, { * comment: "Needs improvement on edge cases.", * card_id: "card-456", * }); * ``` */ createSupervisorFeedback(agentId: string, data: SupervisorFeedbackCreate, opts?: RequestOptions): Promise; /** * Gets a single supervisor feedback entry by ID. * * @throws {NotFoundError} when the entry doesn't exist. */ getSupervisorFeedback(agentId: string, supervisorFeedbackId: string, opts?: RequestOptions): Promise; /** * Updates a supervisor feedback entry. * * @throws {NotFoundError} when the entry doesn't exist. */ updateSupervisorFeedback(agentId: string, supervisorFeedbackId: string, data: SupervisorFeedbackUpdate, opts?: RequestOptions): Promise; /** * Deletes a supervisor feedback entry. * * @throws {NotFoundError} when the entry doesn't exist. */ deleteSupervisorFeedback(agentId: string, supervisorFeedbackId: string, opts?: RequestOptions): Promise; } declare class AgentDraftsClient { private readonly fetcher; constructor(fetcher: Fetcher); /** * Lists agent drafts with cursor pagination and optional DSL filtering. * * @example * ```ts * const page = await client.agentDrafts.list({ q: "status.eq:pending" }); * ``` */ list(params?: ListParams, opts?: RequestOptions): Promise>; /** * Creates a new agent draft. * * @example * ```ts * const draft = await client.agentDrafts.create({ * team_id: "team-abc", * name: "Baggage Agent v2", * kind: "task", * }); * ``` */ create(data: AgentDraftCreate, opts?: RequestOptions): Promise; /** * Gets a single agent draft by ID. * * @throws {NotFoundError} when no draft with `id` exists. */ get(id: string, opts?: RequestOptions): Promise; /** * Partially updates an agent draft. * * @throws {NotFoundError} when no draft with `id` exists. */ update(id: string, data: AgentDraftUpdate, opts?: RequestOptions): Promise; /** * Deletes an agent draft. * * @throws {NotFoundError} when no draft with `id` exists. */ delete(id: string, opts?: RequestOptions): Promise; /** * Publishes an agent draft — creates or updates the live `Agent` record. * Returns the resulting `Agent` after publish. * * @example * ```ts * const agent = await client.agentDrafts.publish(draftId, { * team_id: "team-abc", * }); * console.log("Live agent:", agent.id); * ``` * * @throws {NotFoundError} when no draft with `id` exists. */ publish(id: string, data: AgentDraftPublishBody, opts?: RequestOptions): Promise; } declare class NotificationsClient { private readonly fetcher; constructor(fetcher: Fetcher); /** * Lists notifications with cursor pagination and optional DSL filtering. * * @example * ```ts * const page = await client.notifications.list({ * q: "read.eq:false", * sort: "created_at:desc", * }); * ``` */ list(params?: ListParams, opts?: RequestOptions): Promise>; /** * Gets a single notification by ID. * * @throws {NotFoundError} when no notification with `id` exists. */ get(id: string, opts?: RequestOptions): Promise; /** * Updates a notification — typically used to mark it as read. * * @example * ```ts * await client.notifications.update(id, { read: true }); * ``` * * @throws {NotFoundError} when no notification with `id` exists. */ update(id: string, data: NotificationUpdate, opts?: RequestOptions): Promise; /** * Deletes a notification. * * @throws {NotFoundError} when no notification with `id` exists. */ delete(id: string, opts?: RequestOptions): Promise; /** * Marks all notifications as read for a given user. * Returns the count of updated notifications. * * @example * ```ts * const { updated } = await client.notifications.markAllRead({ user_id: "user-1" }); * ``` */ markAllRead(data: MarkAllReadBody, opts?: RequestOptions): Promise<{ updated: number; }>; } declare class AppsClient { private readonly fetcher; constructor(fetcher: Fetcher); /** * Lists apps with cursor pagination and optional DSL filtering. * * @example * ```ts * const page = await client.apps.list({ q: "team_id.eq:'team-abc'" }); * ``` */ list(params?: ListParams, opts?: RequestOptions): Promise>; /** * Creates a new app. * * @example * ```ts * const app = await client.apps.create({ team_id: "team-abc", name: "My App" }); * ``` */ create(data: AppCreate, opts?: RequestOptions): Promise; /** * Gets a single app by ID. * * @throws {NotFoundError} when no app with `id` exists. */ get(id: string, opts?: RequestOptions): Promise; /** * Partially updates an app. * * @throws {NotFoundError} when no app with `id` exists. */ update(id: string, data: AppUpdate, opts?: RequestOptions): Promise; /** * Deletes an app and all its settings. * * @throws {NotFoundError} when no app with `id` exists. */ delete(id: string, opts?: RequestOptions): Promise; /** * Lists settings entries for an app. * * @example * ```ts * const page = await client.apps.listSettings(appId); * ``` */ listSettings(appId: string, params?: ListParams, opts?: RequestOptions): Promise>; /** * Creates a new settings entry for an app. * * @example * ```ts * const settings = await client.apps.createSettings(appId, { * key: "api_token", * value: "sk-...", * }); * ``` */ createSettings(appId: string, data: AppSettingsCreate, opts?: RequestOptions): Promise; /** * Gets a single settings entry by ID. * * @throws {NotFoundError} when the settings entry doesn't exist. */ getSettings(appId: string, settingsId: string, opts?: RequestOptions): Promise; /** * Updates a settings entry. * * @throws {NotFoundError} when the settings entry doesn't exist. */ updateSettings(appId: string, settingsId: string, data: AppSettingsUpdate, opts?: RequestOptions): Promise; /** * Deletes a settings entry. * * @throws {NotFoundError} when the settings entry doesn't exist. */ deleteSettings(appId: string, settingsId: string, opts?: RequestOptions): Promise; } declare class IntegrationsClient { private readonly fetcher; constructor(fetcher: Fetcher); /** * Lists integrations with cursor pagination and optional DSL filtering. * * @example * ```ts * const page = await client.integrations.list({ q: "team_id.eq:'team-abc'" }); * ``` */ list(params?: ListParams, opts?: RequestOptions): Promise>; /** * Creates a new integration. * Authorization header values inside `config` are encrypted at rest (AES-256-GCM). * * @example * ```ts * const integration = await client.integrations.create({ * team_id: "team-abc", * name: "Slack Notifications", * type: "slack", * config: { webhook_url: "https://hooks.slack.com/..." }, * }); * ``` */ create(data: IntegrationCreate, opts?: RequestOptions): Promise; /** * Gets a single integration by ID. * Authorization header values in `config` are returned masked as `"[encrypted]"`. * * @throws {NotFoundError} when no integration with `id` exists. */ get(id: string, opts?: RequestOptions): Promise; /** * Gets an integration with its decrypted config. * Use only server-side — never expose decrypted credentials to the browser. * * @throws {NotFoundError} when no integration with `id` exists. */ getConfig(id: string, opts?: RequestOptions): Promise; /** * Partially updates an integration. * If `config` is provided, Authorization header values are re-encrypted before storage. * * @throws {NotFoundError} when no integration with `id` exists. */ update(id: string, data: IntegrationUpdate, opts?: RequestOptions): Promise; /** * Deletes an integration. * * @throws {NotFoundError} when no integration with `id` exists. */ delete(id: string, opts?: RequestOptions): Promise; } declare class PositionsClient { private readonly fetcher; constructor(fetcher: Fetcher); /** * Lists positions with cursor pagination and optional DSL filtering. * * @example * ```ts * const page = await client.positions.list({ q: "team_id.eq:'team-abc'" }); * ``` */ list(params?: ListParams, opts?: RequestOptions): Promise>; /** * Creates a new position. * * @example * ```ts * const position = await client.positions.create({ team_id: "team-abc", name: "Senior Engineer" }); * ``` */ create(data: PositionCreate, opts?: RequestOptions): Promise; /** * Gets a single position by ID. * * @throws {NotFoundError} when no position with `id` exists. */ get(id: string, opts?: RequestOptions): Promise; /** * Partially updates a position. * * @throws {NotFoundError} when no position with `id` exists. */ update(id: string, data: PositionUpdate, opts?: RequestOptions): Promise; /** * Deletes a position. * * @throws {NotFoundError} when no position with `id` exists. */ delete(id: string, opts?: RequestOptions): Promise; } declare class ResourcesClient { private readonly fetcher; constructor(fetcher: Fetcher); /** * Lists resources with cursor pagination and optional DSL filtering. * * @example * ```ts * const page = await client.resources.list({ q: "agent_id.eq:'agent-abc'" }); * ``` */ list(params?: ListParams, opts?: RequestOptions): Promise>; /** * Creates a new resource. * * @example * ```ts * const resource = await client.resources.create({ * team_id: "team-abc", * agent_id: "agent-xyz", * name: "Flight Policy Document", * type: "document", * }); * ``` */ create(data: ResourceCreate, opts?: RequestOptions): Promise; /** * Gets a single resource by ID. * * @throws {NotFoundError} when no resource with `id` exists. */ get(id: string, opts?: RequestOptions): Promise; /** * Partially updates a resource. * * @throws {NotFoundError} when no resource with `id` exists. */ update(id: string, data: ResourceUpdate, opts?: RequestOptions): Promise; /** * Deletes a resource. * * @throws {NotFoundError} when no resource with `id` exists. */ delete(id: string, opts?: RequestOptions): Promise; } declare class KaibanClient { /** Access the Boards domain and External Channels sub-resource. */ readonly boards: BoardsClient; /** Access the Cards domain, including bulk ops, sessions, and comments. */ readonly cards: CardsClient; /** Access the Agents domain, including Feedback and Supervisor Feedback. */ readonly agents: AgentsClient; /** Access the Agent Drafts domain, including publish workflow. */ readonly agentDrafts: AgentDraftsClient; /** Access the Teams domain and Invitations sub-resource. */ readonly teams: TeamsClient; /** Access the Activities domain, including real-time SSE streaming. */ readonly activities: ActivitiesClient; /** Access the Notifications domain. */ readonly notifications: NotificationsClient; /** Access the Apps domain and App Settings sub-resource. */ readonly apps: AppsClient; /** Access the Integrations domain. */ readonly integrations: IntegrationsClient; /** Access the Positions domain. */ readonly positions: PositionsClient; /** Access the Resources domain. */ readonly resources: ResourcesClient; private readonly fetcher; /** * Creates a new Kaiban API v2 client. * * @example Browser (Firebase — auto-refreshing token): * ```ts * import { KaibanClient } from "@kaiban/sdk-v2"; * import { getAuth } from "firebase/auth"; * * const client = new KaibanClient({ * tenant: "my-org", * getToken: () => getAuth().currentUser?.getIdToken() ?? Promise.resolve(undefined), * }); * ``` * * @example Server / agent (API key): * ```ts * import { KaibanClient } from "@kaiban/sdk-v2"; * * const client = new KaibanClient({ * tenant: "my-org", * apiKey: process.env.KAIBAN_API_KEY, // kb_t_... or kb_s_... * }); * ``` * * @example Local dev: * ```ts * const client = new KaibanClient({ * tenant: "my-org", * apiKey: "kb_t_...", * baseUrl: "http://localhost:3000/api/v2", * }); * ``` */ constructor(config: ClientConfig); } /** RFC 9457 problem detail shape returned by the API on errors. */ interface ProblemDetail { type: string; title: string; status: number; detail?: string; instance?: string; [key: string]: unknown; } /** Base class for all Kaiban SDK errors. */ declare class KaibanError extends Error { readonly status: number; readonly problem: ProblemDetail | undefined; constructor(message: string, status: number, problem?: ProblemDetail); } /** 400 — malformed request or invalid DSL query. */ declare class BadRequestError extends KaibanError { constructor(problem?: ProblemDetail); } /** 401 — missing or invalid authentication credentials. */ declare class UnauthorizedError extends KaibanError { constructor(problem?: ProblemDetail); } /** 403 — authenticated but insufficient permissions. */ declare class ForbiddenError extends KaibanError { constructor(problem?: ProblemDetail); } /** 404 — resource not found. */ declare class NotFoundError extends KaibanError { constructor(problem?: ProblemDetail); } /** 409 — conflict (e.g. alias already in use). */ declare class ConflictError extends KaibanError { constructor(problem?: ProblemDetail); } /** 422 — validation error. Includes `errors` array from the API response. */ declare class ValidationError extends KaibanError { readonly errors: Array<{ path: string[]; message: string; }>; constructor(problem?: ProblemDetail & { errors?: Array<{ path: string[]; message: string; }>; }); } /** 429 — rate limit exceeded. */ declare class RateLimitError extends KaibanError { constructor(problem?: ProblemDetail); } /** 500 — internal server error. */ declare class ServerError extends KaibanError { constructor(problem?: ProblemDetail); } /** 503 — service unavailable (e.g. cold start, DB not ready). */ declare class ServiceUnavailableError extends KaibanError { constructor(problem?: ProblemDetail); } /** Request timed out before the server responded. */ declare class TimeoutError extends KaibanError { constructor(); } /** Request was cancelled via AbortSignal. */ declare class AbortedError extends KaibanError { constructor(); } export { AbortedError, Activity, ActivityCreate, ActivityType, Actor, ActorType as ActorTypeValues, Agent, AgentCreate, AgentDraft, AgentDraftCreate, AgentDraftPriority, AgentDraftPublishBody, AgentDraftStatus, AgentDraftUpdate, AgentExample, AgentFeedback, AgentFeedbackCreate, AgentFeedbackUpdate, AgentKind, AgentResource, AgentRetireAction, AgentRetireBoardEntry, AgentRetireBody, AgentRetireResult, AgentStatus, AgentUpdate, App, AppCreate, AppSettings, AppSettingsCreate, AppSettingsUpdate, AppUpdate, BadRequestError, Board, BoardCreate, BoardUpdate, Card, CardBulkDeleteItem, CardBulkMoveItem, CardBulkUpdateItem, CardComment, CardCommentCreate, CardCommentUpdate, CardCreate, CardInputPart, CardPriority, CardStatus, CardUpdate, type ClientConfig, Column, ConflictError, DataPart, DocumentParser, EmbeddingProvider, ExternalChannel, ExternalChannelCreate, ExternalChannelUpdate, FeedbackEvaluation, FeedbackStatus, FeedbackType, FilePart, ForbiddenError, Integration, IntegrationCreate, IntegrationUpdate, Invite, InviteCreate, KaibanClient, KaibanError, type ListParams, MarkAllReadBody, NotFoundError, Notification, NotificationCreate, NotificationType, NotificationUpdate, type Paginated, Part, PartType, Position, PositionCreate, PositionStatus, PositionUpdate, type ProblemDetail, RateLimitError, RelatedCardResolved, type RequestOptions, Resource, ResourceCreate, ResourceStatus, ResourceUpdate, ServerError, ServiceUnavailableError, Session, SessionCreate, SessionData, SessionDataCreate, SessionDataUpdate, SessionUpdate, type StreamHandle, type StreamOptions, SupervisorFeedback, SupervisorFeedbackCreate, SupervisorFeedbackUpdate, TagDefinition, TagDefinitionColor, Team, TeamCreate, TeamMember, TeamMemberCreate, TeamMemberRole, TeamMemberUpdate, TeamUpdate, TextPart, TimeoutError, UnauthorizedError, ValidationError };