Skip to content

Open-source and local-first Slack and Notion alternative that puts you in control of your data

650 B
Raw Blame
import { DatabaseViewFilterAttributes } from '@colanode/core';

export type RecordFieldValueCountQueryInput = {
  type: 'record.field.value.count';
  databaseId: string;
  filters: DatabaseViewFilterAttributes[];
  fieldId: string;
  userId: string;
};

export type RecordFieldValueCount = {
  value: string;
  count: number;
};

export type RecordFieldValueCountQueryOutput = {
  values: RecordFieldValueCount[];
  noValueCount: number;
};

declare module '@colanode/client/queries' {
  interface QueryMap {
    'record.field.value.count': {
      input: RecordFieldValueCountQueryInput;
      output: RecordFieldValueCountQueryOutput;
    };
  }
}