2021-10-15 09:31:13 +00:00
|
|
|
/**
|
|
|
|
* This module was automatically generated by `ts-interface-builder`
|
|
|
|
*/
|
|
|
|
import * as t from "ts-interface-checker";
|
|
|
|
// tslint:disable:object-literal-key-quotes
|
|
|
|
|
|
|
|
export const NewRecord = t.iface([], {
|
|
|
|
"fields": t.opt(t.iface([], {
|
|
|
|
[t.indexKey]: "CellValue",
|
|
|
|
})),
|
|
|
|
});
|
|
|
|
|
2022-10-20 19:24:14 +00:00
|
|
|
export const NewRecordWithStringId = t.iface([], {
|
|
|
|
"id": t.opt("string"),
|
|
|
|
"fields": t.opt(t.iface([], {
|
|
|
|
[t.indexKey]: "CellValue",
|
|
|
|
})),
|
|
|
|
});
|
|
|
|
|
2021-10-15 09:31:13 +00:00
|
|
|
export const Record = t.iface([], {
|
|
|
|
"id": "number",
|
|
|
|
"fields": t.iface([], {
|
|
|
|
[t.indexKey]: "CellValue",
|
|
|
|
}),
|
|
|
|
});
|
|
|
|
|
2022-10-20 19:24:14 +00:00
|
|
|
export const RecordWithStringId = t.iface([], {
|
|
|
|
"id": "string",
|
|
|
|
"fields": t.iface([], {
|
|
|
|
[t.indexKey]: "CellValue",
|
|
|
|
}),
|
|
|
|
});
|
|
|
|
|
2022-02-11 13:10:53 +00:00
|
|
|
export const AddOrUpdateRecord = t.iface([], {
|
|
|
|
"require": t.intersection(t.iface([], {
|
|
|
|
[t.indexKey]: "CellValue",
|
|
|
|
}), t.iface([], {
|
|
|
|
"id": t.opt("number"),
|
|
|
|
})),
|
|
|
|
"fields": t.opt(t.iface([], {
|
|
|
|
[t.indexKey]: "CellValue",
|
|
|
|
})),
|
|
|
|
});
|
|
|
|
|
2021-10-15 09:31:13 +00:00
|
|
|
export const RecordsPatch = t.iface([], {
|
|
|
|
"records": t.tuple("Record", t.rest(t.array("Record"))),
|
|
|
|
});
|
|
|
|
|
|
|
|
export const RecordsPost = t.iface([], {
|
|
|
|
"records": t.tuple("NewRecord", t.rest(t.array("NewRecord"))),
|
|
|
|
});
|
|
|
|
|
2022-02-11 13:10:53 +00:00
|
|
|
export const RecordsPut = t.iface([], {
|
|
|
|
"records": t.tuple("AddOrUpdateRecord", t.rest(t.array("AddOrUpdateRecord"))),
|
|
|
|
});
|
|
|
|
|
2022-03-15 14:35:15 +00:00
|
|
|
export const RecordId = t.name("number");
|
|
|
|
|
|
|
|
export const MinimalRecord = t.iface([], {
|
|
|
|
"id": "number",
|
|
|
|
});
|
|
|
|
|
2022-10-20 19:24:14 +00:00
|
|
|
export const ColumnsPost = t.iface([], {
|
|
|
|
"columns": t.tuple("NewRecordWithStringId", t.rest(t.array("NewRecordWithStringId"))),
|
|
|
|
});
|
|
|
|
|
|
|
|
export const ColumnsPatch = t.iface([], {
|
|
|
|
"columns": t.tuple("RecordWithStringId", t.rest(t.array("RecordWithStringId"))),
|
|
|
|
});
|
|
|
|
|
2023-08-11 13:12:43 +00:00
|
|
|
export const ColumnsPut = t.iface([], {
|
|
|
|
"columns": t.tuple("RecordWithStringId", t.rest(t.array("RecordWithStringId"))),
|
|
|
|
});
|
|
|
|
|
2022-10-20 19:24:14 +00:00
|
|
|
export const TablePost = t.iface(["ColumnsPost"], {
|
|
|
|
"id": t.opt("string"),
|
|
|
|
});
|
|
|
|
|
|
|
|
export const TablesPost = t.iface([], {
|
|
|
|
"tables": t.tuple("TablePost", t.rest(t.array("TablePost"))),
|
|
|
|
});
|
|
|
|
|
|
|
|
export const TablesPatch = t.iface([], {
|
|
|
|
"tables": t.tuple("RecordWithStringId", t.rest(t.array("RecordWithStringId"))),
|
|
|
|
});
|
|
|
|
|
2023-09-04 13:21:18 +00:00
|
|
|
export const SqlPost = t.iface([], {
|
|
|
|
"sql": "string",
|
|
|
|
"args": t.opt(t.array("any")),
|
|
|
|
"timeout": t.opt("number"),
|
|
|
|
});
|
|
|
|
|
2021-10-15 09:31:13 +00:00
|
|
|
const exportedTypeSuite: t.ITypeSuite = {
|
|
|
|
NewRecord,
|
2022-10-20 19:24:14 +00:00
|
|
|
NewRecordWithStringId,
|
2021-10-15 09:31:13 +00:00
|
|
|
Record,
|
2022-10-20 19:24:14 +00:00
|
|
|
RecordWithStringId,
|
2022-02-11 13:10:53 +00:00
|
|
|
AddOrUpdateRecord,
|
2021-10-15 09:31:13 +00:00
|
|
|
RecordsPatch,
|
|
|
|
RecordsPost,
|
2022-02-11 13:10:53 +00:00
|
|
|
RecordsPut,
|
2022-03-15 14:35:15 +00:00
|
|
|
RecordId,
|
|
|
|
MinimalRecord,
|
2022-10-20 19:24:14 +00:00
|
|
|
ColumnsPost,
|
|
|
|
ColumnsPatch,
|
2023-08-11 13:12:43 +00:00
|
|
|
ColumnsPut,
|
2022-10-20 19:24:14 +00:00
|
|
|
TablePost,
|
|
|
|
TablesPost,
|
|
|
|
TablesPatch,
|
2023-09-04 13:21:18 +00:00
|
|
|
SqlPost,
|
2021-10-15 09:31:13 +00:00
|
|
|
};
|
|
|
|
export default exportedTypeSuite;
|