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;
|
||||
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 {};
|
||||
|
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 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;
|
||||
});
|
||||
|
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>;
|
||||
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 {};
|
||||
|
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 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;
|
||||
});
|
||||
|
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;
|
||||
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>;
|
||||
|
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 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
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 = {
|
||||
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
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",
|
||||
path: finalPath,
|
||||
apiKey: params.apiKey,
|
||||
useDefault: params.useDefault,
|
||||
});
|
||||
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,
|
||||
query: params,
|
||||
apiKey: params.apiKey,
|
||||
useDefault: params.useDefault,
|
||||
});
|
||||
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,
|
||||
body: params,
|
||||
apiKey: params.apiKey,
|
||||
useDefault: params.useDefault,
|
||||
});
|
||||
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";
|
||||
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 {};
|
||||
|
@ -9,11 +9,15 @@ type Params<T extends { [key: string]: any } = { [key: string]: any }> = {
|
||||
deleteSpec?: T & { deleteKeyValues?: SQLDeleteData<T>[] };
|
||||
targetID?: string | number;
|
||||
apiKey?: string;
|
||||
/**
|
||||
* # Query datasquirel.com
|
||||
*/
|
||||
useDefault?: boolean;
|
||||
};
|
||||
|
||||
export default async function apiCrudDELETE<
|
||||
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 finalID = typeof targetID === "number" ? String(targetID) : targetID;
|
||||
@ -25,6 +29,7 @@ export default async function apiCrudDELETE<
|
||||
path: finalPath,
|
||||
body: deleteSpec,
|
||||
apiKey,
|
||||
useDefault,
|
||||
});
|
||||
|
||||
return GET_RES;
|
||||
|
@ -9,6 +9,10 @@ type Params<T extends { [key: string]: any } = { [key: string]: any }> = {
|
||||
query?: DsqlCrudQueryObject<T>;
|
||||
targetId?: string | number;
|
||||
apiKey?: string;
|
||||
/**
|
||||
* # Query datasquirel.com
|
||||
*/
|
||||
useDefault?: boolean;
|
||||
};
|
||||
|
||||
export default async function apiCrudGET<
|
||||
@ -19,6 +23,7 @@ export default async function apiCrudGET<
|
||||
query,
|
||||
targetId,
|
||||
apiKey,
|
||||
useDefault,
|
||||
}: Params<T>): Promise<APIResponseObject> {
|
||||
const basePath = grabAPIBasePath({ paradigm: "crud" });
|
||||
|
||||
@ -31,6 +36,7 @@ export default async function apiCrudGET<
|
||||
path: finalPath,
|
||||
query,
|
||||
apiKey,
|
||||
useDefault,
|
||||
});
|
||||
|
||||
return GET_RES;
|
||||
|
@ -11,6 +11,10 @@ export type APICrudPostParams<
|
||||
body: T;
|
||||
update?: boolean;
|
||||
apiKey?: string;
|
||||
/**
|
||||
* # Query datasquirel.com
|
||||
*/
|
||||
useDefault?: boolean;
|
||||
};
|
||||
|
||||
export default async function apiCrudPOST<
|
||||
@ -21,6 +25,7 @@ export default async function apiCrudPOST<
|
||||
body,
|
||||
update,
|
||||
apiKey,
|
||||
useDefault,
|
||||
}: APICrudPostParams<T>): Promise<APIResponseObject> {
|
||||
const basePath = grabAPIBasePath({ paradigm: "crud" });
|
||||
|
||||
@ -39,6 +44,7 @@ export default async function apiCrudPOST<
|
||||
path: finalPath,
|
||||
body,
|
||||
apiKey,
|
||||
useDefault,
|
||||
});
|
||||
|
||||
return GET_RES;
|
||||
|
@ -7,6 +7,10 @@ import grabAPIBasePath from "../../utils/grab-api-base-path";
|
||||
type Params = {
|
||||
mediaID?: string | number;
|
||||
apiKey?: string;
|
||||
/**
|
||||
* # Query datasquirel.com
|
||||
*/
|
||||
useDefault?: boolean;
|
||||
};
|
||||
|
||||
export default async function apiMediaDELETE(
|
||||
@ -30,6 +34,7 @@ export default async function apiMediaDELETE(
|
||||
method: "DELETE",
|
||||
path: finalPath,
|
||||
apiKey: params.apiKey,
|
||||
useDefault: params.useDefault,
|
||||
});
|
||||
|
||||
return DELETE_MEDIA_RES as APIResponseObject<
|
||||
|
@ -26,6 +26,7 @@ export default async function apiMediaGET(
|
||||
path: finalPath,
|
||||
query: params,
|
||||
apiKey: params.apiKey,
|
||||
useDefault: params.useDefault,
|
||||
});
|
||||
|
||||
return GET_MEDIA_RES as APIResponseObject<
|
||||
|
@ -17,6 +17,7 @@ export default async function apiMediaPOST(
|
||||
path: basePath,
|
||||
body: params,
|
||||
apiKey: params.apiKey,
|
||||
useDefault: params.useDefault,
|
||||
});
|
||||
|
||||
return POST_MEDIA_RES as APIResponseObject<
|
||||
|
@ -2271,6 +2271,10 @@ export type APIGetMediaParams = {
|
||||
stream?: "stream";
|
||||
thumbnail?: "true" | "false";
|
||||
apiKey?: string;
|
||||
/**
|
||||
* # Query datasquirel.com
|
||||
*/
|
||||
useDefault?: boolean;
|
||||
};
|
||||
|
||||
export type AddMediaAPIBody = {
|
||||
@ -2278,4 +2282,8 @@ export type AddMediaAPIBody = {
|
||||
folder?: string | null;
|
||||
type: (typeof MediaTypes)[number];
|
||||
apiKey?: string;
|
||||
/**
|
||||
* # Query datasquirel.com
|
||||
*/
|
||||
useDefault?: boolean;
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@moduletrace/datasquirel",
|
||||
"version": "4.8.4",
|
||||
"version": "4.8.5",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
|
Loading…
Reference in New Issue
Block a user