Skip to content

Commit

Permalink
Add missing table types (#75)
Browse files Browse the repository at this point in the history
* Add missing table types
* Add link to docs for SchemaRecord
* Add link to docs for ColumnType

Co-authored-by: Benjamin Smith <[email protected]>

---------

Co-authored-by: Benjamin Smith <[email protected]>
  • Loading branch information
kuzdogan and bh2smith authored Jan 17, 2025
1 parent 2488450 commit de2d051
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/types/requestArgs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,20 +225,28 @@ export interface CreateQueryParams extends BaseCRUDParams {
is_private?: boolean;
}

// https://docs.dune.com/api-reference/tables/endpoint/create#body-schema-type
export enum ColumnType {
Varchar = "varchar",
Varbinary = "varbinary",
Uint256 = "uint256",
Int256 = "int256",
Bigint = "bigint",
Integer = "integer",
Double = "double",
Boolean = "boolean",
Timestamp = "timestamp",
Date = "date",
}

// https://docs.dune.com/api-reference/tables/endpoint/create#body-schema
export interface SchemaRecord {
/// The column name. Can contain letters, numbers, and underscores,
/// but must begin with a letter or an underscore.
name: string;
/// The column type.
type: ColumnType;
nullable?: boolean;
}

export interface DeleteTableArgs {
Expand Down

0 comments on commit de2d051

Please sign in to comment.