Updates
This commit is contained in:
parent
22434ee656
commit
5fcfc4dc2c
4
dist/package-shared/api/media/delete.js
vendored
4
dist/package-shared/api/media/delete.js
vendored
@ -16,6 +16,7 @@ exports.default = apiMediaDELETE;
|
||||
const query_dsql_api_1 = __importDefault(require("../../functions/api/query-dsql-api"));
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const grab_api_base_path_1 = __importDefault(require("../../utils/grab-api-base-path"));
|
||||
const grab_api_key_1 = __importDefault(require("../../utils/grab-api-key"));
|
||||
function apiMediaDELETE(params) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const basePath = (0, grab_api_base_path_1.default)({ paradigm: "media" });
|
||||
@ -25,10 +26,11 @@ function apiMediaDELETE(params) {
|
||||
: params.mediaID
|
||||
: undefined;
|
||||
const finalPath = path_1.default.join(basePath, mediaID || "");
|
||||
const apiKey = (0, grab_api_key_1.default)(params.apiKey);
|
||||
const DELETE_MEDIA_RES = yield (0, query_dsql_api_1.default)({
|
||||
method: "DELETE",
|
||||
path: finalPath,
|
||||
apiKey: params.apiKey,
|
||||
apiKey,
|
||||
useDefault: params.useDefault,
|
||||
});
|
||||
return DELETE_MEDIA_RES;
|
||||
|
||||
4
dist/package-shared/api/media/get.js
vendored
4
dist/package-shared/api/media/get.js
vendored
@ -16,6 +16,7 @@ exports.default = apiMediaGET;
|
||||
const query_dsql_api_1 = __importDefault(require("../../functions/api/query-dsql-api"));
|
||||
const path_1 = __importDefault(require("path"));
|
||||
const grab_api_base_path_1 = __importDefault(require("../../utils/grab-api-base-path"));
|
||||
const grab_api_key_1 = __importDefault(require("../../utils/grab-api-key"));
|
||||
function apiMediaGET(params) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const basePath = (0, grab_api_base_path_1.default)({ paradigm: "media" });
|
||||
@ -25,11 +26,12 @@ function apiMediaGET(params) {
|
||||
: params.mediaID
|
||||
: undefined;
|
||||
const finalPath = path_1.default.join(basePath, mediaID || "");
|
||||
const apiKey = (0, grab_api_key_1.default)(params.apiKey);
|
||||
const GET_MEDIA_RES = yield (0, query_dsql_api_1.default)({
|
||||
method: "GET",
|
||||
path: finalPath,
|
||||
query: params,
|
||||
apiKey: params.apiKey,
|
||||
apiKey,
|
||||
useDefault: params.useDefault,
|
||||
});
|
||||
return GET_MEDIA_RES;
|
||||
|
||||
4
dist/package-shared/api/media/post.js
vendored
4
dist/package-shared/api/media/post.js
vendored
@ -15,14 +15,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = apiMediaPOST;
|
||||
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"));
|
||||
const grab_api_key_1 = __importDefault(require("../../utils/grab-api-key"));
|
||||
function apiMediaPOST(params) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const basePath = (0, grab_api_base_path_1.default)({ paradigm: "media" });
|
||||
const apiKey = (0, grab_api_key_1.default)(params.apiKey);
|
||||
const POST_MEDIA_RES = yield (0, query_dsql_api_1.default)({
|
||||
method: "POST",
|
||||
path: basePath,
|
||||
body: params,
|
||||
apiKey: params.apiKey,
|
||||
apiKey,
|
||||
useDefault: params.useDefault,
|
||||
});
|
||||
return POST_MEDIA_RES;
|
||||
|
||||
@ -3,6 +3,7 @@ import { APIResponseObject } from "../../types";
|
||||
import { DSQL_DATASQUIREL_USER_MEDIA } from "../../types/dsql";
|
||||
import path from "path";
|
||||
import grabAPIBasePath from "../../utils/grab-api-base-path";
|
||||
import grabAPIKey from "../../utils/grab-api-key";
|
||||
|
||||
type Params = {
|
||||
mediaID?: string | number;
|
||||
@ -29,11 +30,12 @@ export default async function apiMediaDELETE(
|
||||
: undefined;
|
||||
|
||||
const finalPath = path.join(basePath, mediaID || "");
|
||||
const apiKey = grabAPIKey(params.apiKey);
|
||||
|
||||
const DELETE_MEDIA_RES = await queryDSQLAPI({
|
||||
method: "DELETE",
|
||||
path: finalPath,
|
||||
apiKey: params.apiKey,
|
||||
apiKey,
|
||||
useDefault: params.useDefault,
|
||||
});
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ import { APIGetMediaParams, APIResponseObject } from "../../types";
|
||||
import path from "path";
|
||||
import { DSQL_DATASQUIREL_USER_MEDIA } from "../../types/dsql";
|
||||
import grabAPIBasePath from "../../utils/grab-api-base-path";
|
||||
import grabAPIKey from "../../utils/grab-api-key";
|
||||
|
||||
export default async function apiMediaGET(
|
||||
params: APIGetMediaParams
|
||||
@ -20,12 +21,13 @@ export default async function apiMediaGET(
|
||||
: undefined;
|
||||
|
||||
const finalPath = path.join(basePath, mediaID || "");
|
||||
const apiKey = grabAPIKey(params.apiKey);
|
||||
|
||||
const GET_MEDIA_RES = await queryDSQLAPI<APIGetMediaParams>({
|
||||
method: "GET",
|
||||
path: finalPath,
|
||||
query: params,
|
||||
apiKey: params.apiKey,
|
||||
apiKey,
|
||||
useDefault: params.useDefault,
|
||||
});
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ import queryDSQLAPI from "../../functions/api/query-dsql-api";
|
||||
import { AddMediaAPIBody, APIResponseObject } from "../../types";
|
||||
import { DSQL_DATASQUIREL_USER_MEDIA } from "../../types/dsql";
|
||||
import grabAPIBasePath from "../../utils/grab-api-base-path";
|
||||
import grabAPIKey from "../../utils/grab-api-key";
|
||||
|
||||
export default async function apiMediaPOST(
|
||||
params: AddMediaAPIBody
|
||||
@ -12,11 +13,13 @@ export default async function apiMediaPOST(
|
||||
> {
|
||||
const basePath = grabAPIBasePath({ paradigm: "media" });
|
||||
|
||||
const apiKey = grabAPIKey(params.apiKey);
|
||||
|
||||
const POST_MEDIA_RES = await queryDSQLAPI<AddMediaAPIBody>({
|
||||
method: "POST",
|
||||
path: basePath,
|
||||
body: params,
|
||||
apiKey: params.apiKey,
|
||||
apiKey,
|
||||
useDefault: params.useDefault,
|
||||
});
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@moduletrace/datasquirel",
|
||||
"version": "5.4.0",
|
||||
"version": "5.4.1",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user