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