Updates
This commit is contained in:
+5
-1
@@ -11,12 +11,16 @@ type Params<T extends {
|
||||
};
|
||||
targetID?: string | number;
|
||||
apiKey?: string;
|
||||
/**
|
||||
* # Query datasquirel.com
|
||||
*/
|
||||
useDefault?: boolean;
|
||||
};
|
||||
export default function apiCrudDELETE<T extends {
|
||||
[key: string]: any;
|
||||
} = {
|
||||
[key: string]: any;
|
||||
}>({ dbName, tableName, deleteSpec, targetID, apiKey }: Params<T>): Promise<import("../../types").APIResponseObject<{
|
||||
}>({ dbName, tableName, deleteSpec, targetID, apiKey, useDefault }: Params<T>): Promise<import("../../types").APIResponseObject<{
|
||||
[k: string]: any;
|
||||
}>>;
|
||||
export {};
|
||||
|
||||
+2
-1
@@ -17,7 +17,7 @@ const path_1 = __importDefault(require("path"));
|
||||
const query_dsql_api_1 = __importDefault(require("../../functions/api/query-dsql-api"));
|
||||
const grab_api_base_path_1 = __importDefault(require("../../utils/grab-api-base-path"));
|
||||
function apiCrudDELETE(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ dbName, tableName, deleteSpec, targetID, apiKey }) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ dbName, tableName, deleteSpec, targetID, apiKey, useDefault }) {
|
||||
const basePath = (0, grab_api_base_path_1.default)({ paradigm: "crud" });
|
||||
const finalID = typeof targetID === "number" ? String(targetID) : targetID;
|
||||
const finalPath = path_1.default.join(basePath, dbName, tableName, finalID || "");
|
||||
@@ -26,6 +26,7 @@ function apiCrudDELETE(_a) {
|
||||
path: finalPath,
|
||||
body: deleteSpec,
|
||||
apiKey,
|
||||
useDefault,
|
||||
});
|
||||
return GET_RES;
|
||||
});
|
||||
|
||||
+5
-1
@@ -9,10 +9,14 @@ type Params<T extends {
|
||||
query?: DsqlCrudQueryObject<T>;
|
||||
targetId?: string | number;
|
||||
apiKey?: string;
|
||||
/**
|
||||
* # Query datasquirel.com
|
||||
*/
|
||||
useDefault?: boolean;
|
||||
};
|
||||
export default function apiCrudGET<T extends {
|
||||
[key: string]: any;
|
||||
} = {
|
||||
[key: string]: any;
|
||||
}>({ dbName, tableName, query, targetId, apiKey, }: Params<T>): Promise<APIResponseObject>;
|
||||
}>({ dbName, tableName, query, targetId, apiKey, useDefault, }: Params<T>): Promise<APIResponseObject>;
|
||||
export {};
|
||||
|
||||
Vendored
+2
-1
@@ -17,7 +17,7 @@ const path_1 = __importDefault(require("path"));
|
||||
const query_dsql_api_1 = __importDefault(require("../../functions/api/query-dsql-api"));
|
||||
const grab_api_base_path_1 = __importDefault(require("../../utils/grab-api-base-path"));
|
||||
function apiCrudGET(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ dbName, tableName, query, targetId, apiKey, }) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ dbName, tableName, query, targetId, apiKey, useDefault, }) {
|
||||
const basePath = (0, grab_api_base_path_1.default)({ paradigm: "crud" });
|
||||
const finalID = typeof targetId === "number" ? String(targetId) : targetId;
|
||||
const finalPath = path_1.default.join(basePath, dbName, tableName, finalID || "");
|
||||
@@ -26,6 +26,7 @@ function apiCrudGET(_a) {
|
||||
path: finalPath,
|
||||
query,
|
||||
apiKey,
|
||||
useDefault,
|
||||
});
|
||||
return GET_RES;
|
||||
});
|
||||
|
||||
+5
-1
@@ -9,9 +9,13 @@ export type APICrudPostParams<T extends {
|
||||
body: T;
|
||||
update?: boolean;
|
||||
apiKey?: string;
|
||||
/**
|
||||
* # Query datasquirel.com
|
||||
*/
|
||||
useDefault?: boolean;
|
||||
};
|
||||
export default function apiCrudPOST<T extends {
|
||||
[key: string]: any;
|
||||
} = {
|
||||
[key: string]: any;
|
||||
}>({ dbName, tableName, body, update, apiKey, }: APICrudPostParams<T>): Promise<APIResponseObject>;
|
||||
}>({ dbName, tableName, body, update, apiKey, useDefault, }: APICrudPostParams<T>): Promise<APIResponseObject>;
|
||||
|
||||
Vendored
+2
-1
@@ -17,7 +17,7 @@ const path_1 = __importDefault(require("path"));
|
||||
const query_dsql_api_1 = __importDefault(require("../../functions/api/query-dsql-api"));
|
||||
const grab_api_base_path_1 = __importDefault(require("../../utils/grab-api-base-path"));
|
||||
function apiCrudPOST(_a) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ dbName, tableName, body, update, apiKey, }) {
|
||||
return __awaiter(this, arguments, void 0, function* ({ dbName, tableName, body, update, apiKey, useDefault, }) {
|
||||
const basePath = (0, grab_api_base_path_1.default)({ paradigm: "crud" });
|
||||
const passedID = body.id;
|
||||
const finalID = update
|
||||
@@ -31,6 +31,7 @@ function apiCrudPOST(_a) {
|
||||
path: finalPath,
|
||||
body,
|
||||
apiKey,
|
||||
useDefault,
|
||||
});
|
||||
return GET_RES;
|
||||
});
|
||||
|
||||
+4
@@ -3,6 +3,10 @@ import { DSQL_DATASQUIREL_USER_MEDIA } from "../../types/dsql";
|
||||
type Params = {
|
||||
mediaID?: string | number;
|
||||
apiKey?: string;
|
||||
/**
|
||||
* # Query datasquirel.com
|
||||
*/
|
||||
useDefault?: boolean;
|
||||
};
|
||||
export default function apiMediaDELETE(params: Params): Promise<APIResponseObject<DSQL_DATASQUIREL_USER_MEDIA | DSQL_DATASQUIREL_USER_MEDIA[]>>;
|
||||
export {};
|
||||
|
||||
+1
@@ -29,6 +29,7 @@ function apiMediaDELETE(params) {
|
||||
method: "DELETE",
|
||||
path: finalPath,
|
||||
apiKey: params.apiKey,
|
||||
useDefault: params.useDefault,
|
||||
});
|
||||
return DELETE_MEDIA_RES;
|
||||
});
|
||||
|
||||
Vendored
+1
@@ -30,6 +30,7 @@ function apiMediaGET(params) {
|
||||
path: finalPath,
|
||||
query: params,
|
||||
apiKey: params.apiKey,
|
||||
useDefault: params.useDefault,
|
||||
});
|
||||
return GET_MEDIA_RES;
|
||||
});
|
||||
|
||||
+1
@@ -23,6 +23,7 @@ function apiMediaPOST(params) {
|
||||
path: basePath,
|
||||
body: params,
|
||||
apiKey: params.apiKey,
|
||||
useDefault: params.useDefault,
|
||||
});
|
||||
return POST_MEDIA_RES;
|
||||
});
|
||||
|
||||
Vendored
+8
@@ -1759,11 +1759,19 @@ export type APIGetMediaParams = {
|
||||
stream?: "stream";
|
||||
thumbnail?: "true" | "false";
|
||||
apiKey?: string;
|
||||
/**
|
||||
* # Query datasquirel.com
|
||||
*/
|
||||
useDefault?: boolean;
|
||||
};
|
||||
export type AddMediaAPIBody = {
|
||||
media: MediaUploadDataType[];
|
||||
folder?: string | null;
|
||||
type: (typeof MediaTypes)[number];
|
||||
apiKey?: string;
|
||||
/**
|
||||
* # Query datasquirel.com
|
||||
*/
|
||||
useDefault?: boolean;
|
||||
};
|
||||
export {};
|
||||
|
||||
Reference in New Issue
Block a user