Updates
This commit is contained in:
parent
ad904622eb
commit
fcc668d3a1
6
dist/package-shared/api/crud/delete.d.ts
vendored
6
dist/package-shared/api/crud/delete.d.ts
vendored
@ -11,12 +11,16 @@ type Params<T extends {
|
|||||||
};
|
};
|
||||||
targetID?: string | number;
|
targetID?: string | number;
|
||||||
apiKey?: string;
|
apiKey?: string;
|
||||||
|
/**
|
||||||
|
* # Query datasquirel.com
|
||||||
|
*/
|
||||||
|
useDefault?: boolean;
|
||||||
};
|
};
|
||||||
export default function apiCrudDELETE<T extends {
|
export default function apiCrudDELETE<T extends {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
} = {
|
} = {
|
||||||
[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;
|
[k: string]: any;
|
||||||
}>>;
|
}>>;
|
||||||
export {};
|
export {};
|
||||||
|
3
dist/package-shared/api/crud/delete.js
vendored
3
dist/package-shared/api/crud/delete.js
vendored
@ -17,7 +17,7 @@ const path_1 = __importDefault(require("path"));
|
|||||||
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"));
|
||||||
function apiCrudDELETE(_a) {
|
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 basePath = (0, grab_api_base_path_1.default)({ paradigm: "crud" });
|
||||||
const finalID = typeof targetID === "number" ? String(targetID) : targetID;
|
const finalID = typeof targetID === "number" ? String(targetID) : targetID;
|
||||||
const finalPath = path_1.default.join(basePath, dbName, tableName, finalID || "");
|
const finalPath = path_1.default.join(basePath, dbName, tableName, finalID || "");
|
||||||
@ -26,6 +26,7 @@ function apiCrudDELETE(_a) {
|
|||||||
path: finalPath,
|
path: finalPath,
|
||||||
body: deleteSpec,
|
body: deleteSpec,
|
||||||
apiKey,
|
apiKey,
|
||||||
|
useDefault,
|
||||||
});
|
});
|
||||||
return GET_RES;
|
return GET_RES;
|
||||||
});
|
});
|
||||||
|
6
dist/package-shared/api/crud/get.d.ts
vendored
6
dist/package-shared/api/crud/get.d.ts
vendored
@ -9,10 +9,14 @@ type Params<T extends {
|
|||||||
query?: DsqlCrudQueryObject<T>;
|
query?: DsqlCrudQueryObject<T>;
|
||||||
targetId?: string | number;
|
targetId?: string | number;
|
||||||
apiKey?: string;
|
apiKey?: string;
|
||||||
|
/**
|
||||||
|
* # Query datasquirel.com
|
||||||
|
*/
|
||||||
|
useDefault?: boolean;
|
||||||
};
|
};
|
||||||
export default function apiCrudGET<T extends {
|
export default function apiCrudGET<T extends {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
} = {
|
} = {
|
||||||
[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 {};
|
export {};
|
||||||
|
3
dist/package-shared/api/crud/get.js
vendored
3
dist/package-shared/api/crud/get.js
vendored
@ -17,7 +17,7 @@ const path_1 = __importDefault(require("path"));
|
|||||||
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"));
|
||||||
function apiCrudGET(_a) {
|
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 basePath = (0, grab_api_base_path_1.default)({ paradigm: "crud" });
|
||||||
const finalID = typeof targetId === "number" ? String(targetId) : targetId;
|
const finalID = typeof targetId === "number" ? String(targetId) : targetId;
|
||||||
const finalPath = path_1.default.join(basePath, dbName, tableName, finalID || "");
|
const finalPath = path_1.default.join(basePath, dbName, tableName, finalID || "");
|
||||||
@ -26,6 +26,7 @@ function apiCrudGET(_a) {
|
|||||||
path: finalPath,
|
path: finalPath,
|
||||||
query,
|
query,
|
||||||
apiKey,
|
apiKey,
|
||||||
|
useDefault,
|
||||||
});
|
});
|
||||||
return GET_RES;
|
return GET_RES;
|
||||||
});
|
});
|
||||||
|
6
dist/package-shared/api/crud/post.d.ts
vendored
6
dist/package-shared/api/crud/post.d.ts
vendored
@ -9,9 +9,13 @@ export type APICrudPostParams<T extends {
|
|||||||
body: T;
|
body: T;
|
||||||
update?: boolean;
|
update?: boolean;
|
||||||
apiKey?: string;
|
apiKey?: string;
|
||||||
|
/**
|
||||||
|
* # Query datasquirel.com
|
||||||
|
*/
|
||||||
|
useDefault?: boolean;
|
||||||
};
|
};
|
||||||
export default function apiCrudPOST<T extends {
|
export default function apiCrudPOST<T extends {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
} = {
|
} = {
|
||||||
[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>;
|
||||||
|
3
dist/package-shared/api/crud/post.js
vendored
3
dist/package-shared/api/crud/post.js
vendored
@ -17,7 +17,7 @@ const path_1 = __importDefault(require("path"));
|
|||||||
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"));
|
||||||
function apiCrudPOST(_a) {
|
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 basePath = (0, grab_api_base_path_1.default)({ paradigm: "crud" });
|
||||||
const passedID = body.id;
|
const passedID = body.id;
|
||||||
const finalID = update
|
const finalID = update
|
||||||
@ -31,6 +31,7 @@ function apiCrudPOST(_a) {
|
|||||||
path: finalPath,
|
path: finalPath,
|
||||||
body,
|
body,
|
||||||
apiKey,
|
apiKey,
|
||||||
|
useDefault,
|
||||||
});
|
});
|
||||||
return GET_RES;
|
return GET_RES;
|
||||||
});
|
});
|
||||||
|
4
dist/package-shared/api/media/delete.d.ts
vendored
4
dist/package-shared/api/media/delete.d.ts
vendored
@ -3,6 +3,10 @@ import { DSQL_DATASQUIREL_USER_MEDIA } from "../../types/dsql";
|
|||||||
type Params = {
|
type Params = {
|
||||||
mediaID?: string | number;
|
mediaID?: string | number;
|
||||||
apiKey?: string;
|
apiKey?: string;
|
||||||
|
/**
|
||||||
|
* # Query datasquirel.com
|
||||||
|
*/
|
||||||
|
useDefault?: boolean;
|
||||||
};
|
};
|
||||||
export default function apiMediaDELETE(params: Params): Promise<APIResponseObject<DSQL_DATASQUIREL_USER_MEDIA | DSQL_DATASQUIREL_USER_MEDIA[]>>;
|
export default function apiMediaDELETE(params: Params): Promise<APIResponseObject<DSQL_DATASQUIREL_USER_MEDIA | DSQL_DATASQUIREL_USER_MEDIA[]>>;
|
||||||
export {};
|
export {};
|
||||||
|
1
dist/package-shared/api/media/delete.js
vendored
1
dist/package-shared/api/media/delete.js
vendored
@ -29,6 +29,7 @@ function apiMediaDELETE(params) {
|
|||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
path: finalPath,
|
path: finalPath,
|
||||||
apiKey: params.apiKey,
|
apiKey: params.apiKey,
|
||||||
|
useDefault: params.useDefault,
|
||||||
});
|
});
|
||||||
return DELETE_MEDIA_RES;
|
return DELETE_MEDIA_RES;
|
||||||
});
|
});
|
||||||
|
1
dist/package-shared/api/media/get.js
vendored
1
dist/package-shared/api/media/get.js
vendored
@ -30,6 +30,7 @@ function apiMediaGET(params) {
|
|||||||
path: finalPath,
|
path: finalPath,
|
||||||
query: params,
|
query: params,
|
||||||
apiKey: params.apiKey,
|
apiKey: params.apiKey,
|
||||||
|
useDefault: params.useDefault,
|
||||||
});
|
});
|
||||||
return GET_MEDIA_RES;
|
return GET_MEDIA_RES;
|
||||||
});
|
});
|
||||||
|
1
dist/package-shared/api/media/post.js
vendored
1
dist/package-shared/api/media/post.js
vendored
@ -23,6 +23,7 @@ function apiMediaPOST(params) {
|
|||||||
path: basePath,
|
path: basePath,
|
||||||
body: params,
|
body: params,
|
||||||
apiKey: params.apiKey,
|
apiKey: params.apiKey,
|
||||||
|
useDefault: params.useDefault,
|
||||||
});
|
});
|
||||||
return POST_MEDIA_RES;
|
return POST_MEDIA_RES;
|
||||||
});
|
});
|
||||||
|
8
dist/package-shared/types/index.d.ts
vendored
8
dist/package-shared/types/index.d.ts
vendored
@ -1759,11 +1759,19 @@ export type APIGetMediaParams = {
|
|||||||
stream?: "stream";
|
stream?: "stream";
|
||||||
thumbnail?: "true" | "false";
|
thumbnail?: "true" | "false";
|
||||||
apiKey?: string;
|
apiKey?: string;
|
||||||
|
/**
|
||||||
|
* # Query datasquirel.com
|
||||||
|
*/
|
||||||
|
useDefault?: boolean;
|
||||||
};
|
};
|
||||||
export type AddMediaAPIBody = {
|
export type AddMediaAPIBody = {
|
||||||
media: MediaUploadDataType[];
|
media: MediaUploadDataType[];
|
||||||
folder?: string | null;
|
folder?: string | null;
|
||||||
type: (typeof MediaTypes)[number];
|
type: (typeof MediaTypes)[number];
|
||||||
apiKey?: string;
|
apiKey?: string;
|
||||||
|
/**
|
||||||
|
* # Query datasquirel.com
|
||||||
|
*/
|
||||||
|
useDefault?: boolean;
|
||||||
};
|
};
|
||||||
export {};
|
export {};
|
||||||
|
@ -9,11 +9,15 @@ type Params<T extends { [key: string]: any } = { [key: string]: any }> = {
|
|||||||
deleteSpec?: T & { deleteKeyValues?: SQLDeleteData<T>[] };
|
deleteSpec?: T & { deleteKeyValues?: SQLDeleteData<T>[] };
|
||||||
targetID?: string | number;
|
targetID?: string | number;
|
||||||
apiKey?: string;
|
apiKey?: string;
|
||||||
|
/**
|
||||||
|
* # Query datasquirel.com
|
||||||
|
*/
|
||||||
|
useDefault?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default async function apiCrudDELETE<
|
export default async function apiCrudDELETE<
|
||||||
T extends { [key: string]: any } = { [key: string]: any }
|
T extends { [key: string]: any } = { [key: string]: any }
|
||||||
>({ dbName, tableName, deleteSpec, targetID, apiKey }: Params<T>) {
|
>({ dbName, tableName, deleteSpec, targetID, apiKey, useDefault }: Params<T>) {
|
||||||
const basePath = grabAPIBasePath({ paradigm: "crud" });
|
const basePath = grabAPIBasePath({ paradigm: "crud" });
|
||||||
|
|
||||||
const finalID = typeof targetID === "number" ? String(targetID) : targetID;
|
const finalID = typeof targetID === "number" ? String(targetID) : targetID;
|
||||||
@ -25,6 +29,7 @@ export default async function apiCrudDELETE<
|
|||||||
path: finalPath,
|
path: finalPath,
|
||||||
body: deleteSpec,
|
body: deleteSpec,
|
||||||
apiKey,
|
apiKey,
|
||||||
|
useDefault,
|
||||||
});
|
});
|
||||||
|
|
||||||
return GET_RES;
|
return GET_RES;
|
||||||
|
@ -9,6 +9,10 @@ type Params<T extends { [key: string]: any } = { [key: string]: any }> = {
|
|||||||
query?: DsqlCrudQueryObject<T>;
|
query?: DsqlCrudQueryObject<T>;
|
||||||
targetId?: string | number;
|
targetId?: string | number;
|
||||||
apiKey?: string;
|
apiKey?: string;
|
||||||
|
/**
|
||||||
|
* # Query datasquirel.com
|
||||||
|
*/
|
||||||
|
useDefault?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default async function apiCrudGET<
|
export default async function apiCrudGET<
|
||||||
@ -19,6 +23,7 @@ export default async function apiCrudGET<
|
|||||||
query,
|
query,
|
||||||
targetId,
|
targetId,
|
||||||
apiKey,
|
apiKey,
|
||||||
|
useDefault,
|
||||||
}: Params<T>): Promise<APIResponseObject> {
|
}: Params<T>): Promise<APIResponseObject> {
|
||||||
const basePath = grabAPIBasePath({ paradigm: "crud" });
|
const basePath = grabAPIBasePath({ paradigm: "crud" });
|
||||||
|
|
||||||
@ -31,6 +36,7 @@ export default async function apiCrudGET<
|
|||||||
path: finalPath,
|
path: finalPath,
|
||||||
query,
|
query,
|
||||||
apiKey,
|
apiKey,
|
||||||
|
useDefault,
|
||||||
});
|
});
|
||||||
|
|
||||||
return GET_RES;
|
return GET_RES;
|
||||||
|
@ -11,6 +11,10 @@ export type APICrudPostParams<
|
|||||||
body: T;
|
body: T;
|
||||||
update?: boolean;
|
update?: boolean;
|
||||||
apiKey?: string;
|
apiKey?: string;
|
||||||
|
/**
|
||||||
|
* # Query datasquirel.com
|
||||||
|
*/
|
||||||
|
useDefault?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default async function apiCrudPOST<
|
export default async function apiCrudPOST<
|
||||||
@ -21,6 +25,7 @@ export default async function apiCrudPOST<
|
|||||||
body,
|
body,
|
||||||
update,
|
update,
|
||||||
apiKey,
|
apiKey,
|
||||||
|
useDefault,
|
||||||
}: APICrudPostParams<T>): Promise<APIResponseObject> {
|
}: APICrudPostParams<T>): Promise<APIResponseObject> {
|
||||||
const basePath = grabAPIBasePath({ paradigm: "crud" });
|
const basePath = grabAPIBasePath({ paradigm: "crud" });
|
||||||
|
|
||||||
@ -39,6 +44,7 @@ export default async function apiCrudPOST<
|
|||||||
path: finalPath,
|
path: finalPath,
|
||||||
body,
|
body,
|
||||||
apiKey,
|
apiKey,
|
||||||
|
useDefault,
|
||||||
});
|
});
|
||||||
|
|
||||||
return GET_RES;
|
return GET_RES;
|
||||||
|
@ -7,6 +7,10 @@ import grabAPIBasePath from "../../utils/grab-api-base-path";
|
|||||||
type Params = {
|
type Params = {
|
||||||
mediaID?: string | number;
|
mediaID?: string | number;
|
||||||
apiKey?: string;
|
apiKey?: string;
|
||||||
|
/**
|
||||||
|
* # Query datasquirel.com
|
||||||
|
*/
|
||||||
|
useDefault?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default async function apiMediaDELETE(
|
export default async function apiMediaDELETE(
|
||||||
@ -30,6 +34,7 @@ export default async function apiMediaDELETE(
|
|||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
path: finalPath,
|
path: finalPath,
|
||||||
apiKey: params.apiKey,
|
apiKey: params.apiKey,
|
||||||
|
useDefault: params.useDefault,
|
||||||
});
|
});
|
||||||
|
|
||||||
return DELETE_MEDIA_RES as APIResponseObject<
|
return DELETE_MEDIA_RES as APIResponseObject<
|
||||||
|
@ -26,6 +26,7 @@ export default async function apiMediaGET(
|
|||||||
path: finalPath,
|
path: finalPath,
|
||||||
query: params,
|
query: params,
|
||||||
apiKey: params.apiKey,
|
apiKey: params.apiKey,
|
||||||
|
useDefault: params.useDefault,
|
||||||
});
|
});
|
||||||
|
|
||||||
return GET_MEDIA_RES as APIResponseObject<
|
return GET_MEDIA_RES as APIResponseObject<
|
||||||
|
@ -17,6 +17,7 @@ export default async function apiMediaPOST(
|
|||||||
path: basePath,
|
path: basePath,
|
||||||
body: params,
|
body: params,
|
||||||
apiKey: params.apiKey,
|
apiKey: params.apiKey,
|
||||||
|
useDefault: params.useDefault,
|
||||||
});
|
});
|
||||||
|
|
||||||
return POST_MEDIA_RES as APIResponseObject<
|
return POST_MEDIA_RES as APIResponseObject<
|
||||||
|
@ -2271,6 +2271,10 @@ export type APIGetMediaParams = {
|
|||||||
stream?: "stream";
|
stream?: "stream";
|
||||||
thumbnail?: "true" | "false";
|
thumbnail?: "true" | "false";
|
||||||
apiKey?: string;
|
apiKey?: string;
|
||||||
|
/**
|
||||||
|
* # Query datasquirel.com
|
||||||
|
*/
|
||||||
|
useDefault?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type AddMediaAPIBody = {
|
export type AddMediaAPIBody = {
|
||||||
@ -2278,4 +2282,8 @@ export type AddMediaAPIBody = {
|
|||||||
folder?: string | null;
|
folder?: string | null;
|
||||||
type: (typeof MediaTypes)[number];
|
type: (typeof MediaTypes)[number];
|
||||||
apiKey?: string;
|
apiKey?: string;
|
||||||
|
/**
|
||||||
|
* # Query datasquirel.com
|
||||||
|
*/
|
||||||
|
useDefault?: boolean;
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@moduletrace/datasquirel",
|
"name": "@moduletrace/datasquirel",
|
||||||
"version": "4.8.4",
|
"version": "4.8.5",
|
||||||
"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