Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

652 B
Raw Blame
import type { ResultAsync } from 'neverthrow';
import type { Accessor } from 'solid-js';
import type { DatabaseSqlFailure } from '../../../lib/core/database-sql/driver';
import type { DatabaseRelatedRow } from '../core/database-relations';

/** The related table's schema could not be read, or its rows could not. */
export type DatabaseRelationFailure =
  | { kind: 'table-unavailable' }
  | DatabaseSqlFailure;

export type DatabaseRelationSource = {
  name: Accessor<string>;
  rows: Accessor<DatabaseRelatedRow[]>;
  loading: Accessor<boolean>;
  error: Accessor<string | undefined>;
  refresh: () => ResultAsync<void, DatabaseRelationFailure>;
};