Skip to content

Commit

Permalink
Merge pull request #39 from tablelandnetwork/export-schema-and-column
Browse files Browse the repository at this point in the history
Export Schema and Column types so they can be used externally
  • Loading branch information
asutula authored Sep 27, 2023
2 parents 47c3302 + 77cc447 commit 22fc45a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 19 deletions.
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion packages/sdk/src/validator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ import {
} from "../helpers/index.js";
import { getHealth } from "./health.js";
import { getVersion, type Version } from "./version.js";
import { getTable, type Table, type Params as TableParams } from "./tables.js";
import {
getTable,
type Table,
type Params as TableParams,
type Column,
type Schema,
} from "./tables.js";
import {
getQuery,
type Params as QueryParams,
Expand All @@ -29,6 +35,8 @@ export {
type TableFormat,
type ObjectsFormat,
type QueryParams,
type Column,
type Schema,
};

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk/src/validator/tables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import {
export type Params =
Paths["/tables/{chainId}/{tableId}"]["get"]["parameters"]["path"];

type Column = Components["schemas"]["Column"];
export type Column = Components["schemas"]["Column"];
type BaseSchema = Components["schemas"]["Schema"];
interface Schema extends BaseSchema {
export interface Schema extends BaseSchema {
readonly columns: Array<PartialRequired<Column, "constraints">>;
}

Expand Down

0 comments on commit 22fc45a

Please sign in to comment.