datasquirel/utils/get-schema.d.ts

27 lines
1.1 KiB
TypeScript
Raw Permalink Normal View History

2024-11-08 15:44:31 +00:00
export = getSchema;
/**
* @typedef {Object} GetSchemaReturn
* @property {boolean} success - Did the function run successfully?
* @property {import("../package-shared/types").DSQL_DatabaseSchemaType | import("../package-shared/types").DSQL_TableSchemaType | import("../package-shared/types").DSQL_FieldSchemaType | null} payload - Response payload
*/
/**
* # Get Schema for Database, table, or field *
* @param {import("../package-shared/types").GetSchemaAPIParam} params
*
* @returns { Promise<GetSchemaReturn> } - Return Object
*/
2024-12-06 10:44:26 +00:00
declare function getSchema({ key, database, field, table, user_id }: import("../package-shared/types").GetSchemaAPIParam): Promise<GetSchemaReturn>;
2024-11-08 15:44:31 +00:00
declare namespace getSchema {
export { GetSchemaReturn };
}
type GetSchemaReturn = {
/**
* - Did the function run successfully?
*/
success: boolean;
/**
* - Response payload
*/
payload: import("../package-shared/types").DSQL_DatabaseSchemaType | import("../package-shared/types").DSQL_TableSchemaType | import("../package-shared/types").DSQL_FieldSchemaType | null;
};