Add .d.ts files
This commit is contained in:
Vendored
+64
@@ -0,0 +1,64 @@
|
||||
export = localGet;
|
||||
/**
|
||||
* @typedef {Object} LocalGetReturn
|
||||
* @property {boolean} success - Did the function run successfully?
|
||||
* @property {*} [payload] - GET request results
|
||||
* @property {string} [msg] - Message
|
||||
* @property {string} [error] - Error Message
|
||||
*/
|
||||
/**
|
||||
* @typedef {Object} LocalQueryObject
|
||||
* @property {string} query - Table Name
|
||||
* @property {string} [tableName] - Table Name
|
||||
* @property {string[]} [queryValues] - GET request results
|
||||
*/
|
||||
/**
|
||||
* Make a get request to Datasquirel API
|
||||
* ==============================================================================
|
||||
* @async
|
||||
*
|
||||
* @param {Object} params - Single object passed
|
||||
* @param {LocalQueryObject} params.options - SQL Query
|
||||
* @param {import("../../package-shared/types").DSQL_DatabaseSchemaType | undefined} [params.dbSchema] - Name of the table to query
|
||||
*
|
||||
* @returns { Promise<LocalGetReturn> } - Return Object
|
||||
*/
|
||||
declare function localGet({ options, dbSchema }: {
|
||||
options: LocalQueryObject;
|
||||
dbSchema?: import("../../package-shared/types").DSQL_DatabaseSchemaType | undefined;
|
||||
}): Promise<LocalGetReturn>;
|
||||
declare namespace localGet {
|
||||
export { LocalGetReturn, LocalQueryObject };
|
||||
}
|
||||
type LocalGetReturn = {
|
||||
/**
|
||||
* - Did the function run successfully?
|
||||
*/
|
||||
success: boolean;
|
||||
/**
|
||||
* - GET request results
|
||||
*/
|
||||
payload?: any;
|
||||
/**
|
||||
* - Message
|
||||
*/
|
||||
msg?: string;
|
||||
/**
|
||||
* - Error Message
|
||||
*/
|
||||
error?: string;
|
||||
};
|
||||
type LocalQueryObject = {
|
||||
/**
|
||||
* - Table Name
|
||||
*/
|
||||
query: string;
|
||||
/**
|
||||
* - Table Name
|
||||
*/
|
||||
tableName?: string;
|
||||
/**
|
||||
* - GET request results
|
||||
*/
|
||||
queryValues?: string[];
|
||||
};
|
||||
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
export = localPost;
|
||||
/**
|
||||
* Make a get request to Datasquirel API
|
||||
* ==============================================================================
|
||||
* @async
|
||||
*
|
||||
* @param {Object} params - Single object passed
|
||||
* @param {import("../../package-shared/types").LocalPostQueryObject} params.options
|
||||
* @param {import("../../package-shared/types").DSQL_DatabaseSchemaType | undefined} [params.dbSchema]
|
||||
*
|
||||
* @returns { Promise<import("../../package-shared/types").LocalPostReturn> }
|
||||
*/
|
||||
declare function localPost({ options, dbSchema }: {
|
||||
options: import("../../package-shared/types").LocalPostQueryObject;
|
||||
dbSchema?: import("../../package-shared/types").DSQL_DatabaseSchemaType | undefined;
|
||||
}): Promise<import("../../package-shared/types").LocalPostReturn>;
|
||||
@@ -0,0 +1,38 @@
|
||||
export = updateApiSchemaFromLocalDb;
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
/** ****************************************************************************** */
|
||||
/**
|
||||
* @typedef {Object} PostReturn
|
||||
* @property {boolean} success - Did the function run successfully?
|
||||
* @property {*} [payload] - The Y Coordinate
|
||||
* @property {string} [error] - The Y Coordinate
|
||||
*/
|
||||
/**
|
||||
* # Update API Schema From Local DB
|
||||
*
|
||||
* @async
|
||||
*
|
||||
* @returns { Promise<PostReturn> } - Return Object
|
||||
*/
|
||||
declare function updateApiSchemaFromLocalDb(): Promise<PostReturn>;
|
||||
declare namespace updateApiSchemaFromLocalDb {
|
||||
export { PostReturn };
|
||||
}
|
||||
type PostReturn = {
|
||||
/**
|
||||
* - Did the function run successfully?
|
||||
*/
|
||||
success: boolean;
|
||||
/**
|
||||
* - The Y Coordinate
|
||||
*/
|
||||
payload?: any;
|
||||
/**
|
||||
* - The Y Coordinate
|
||||
*/
|
||||
error?: string;
|
||||
};
|
||||
Reference in New Issue
Block a user