datasquirel/utils/get-schema.d.ts
Benjamin Toby c49513c189 Updates
2024-12-06 11:44:26 +01:00

27 lines
1.1 KiB
TypeScript

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
*/
declare function getSchema({ key, database, field, table, user_id }: import("../package-shared/types").GetSchemaAPIParam): Promise<GetSchemaReturn>;
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;
};