New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@newageerp/mp-types

Package Overview
Dependencies
Maintainers
0
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@newageerp/mp-types - npm Package Compare versions

Comparing version 1.0.26 to 1.0.27

29

dist/index.d.ts

@@ -132,9 +132,2 @@ type MpAggregateFunction = 'max' | 'min' | 'sum' | 'count' | 'countDistinct' | 'sumPercent' | 'countPercent' | 'countDistinctPercent' | 'cr';

type GetRequestParams = {
dataSource: string;
fields?: string[];
dataFilter?: MpFilterFactorySetUniversalItem[];
options?: AuthOptions;
};
type InsertRequestBody = {

@@ -149,2 +142,22 @@ table: string;

type GetRequestParams<T> = {
dataSource: string;
fields?: string[];
dataFilter?: MpFilterFactorySetUniversalItem[];
options?: AuthOptions;
};
declare function getResults<T>(props: GetRequestParams<T>): Promise<{
success: number;
data: T[];
records: number;
info: {
order: MpOrderColumn[];
sql?: {
sql: string;
countSql: string;
statements: (string | number)[];
};
};
}>;
declare const _default: {

@@ -155,3 +168,3 @@ insert: {

results: {
get: (props: GetRequestParams) => Promise<any>;
get: typeof getResults;
};

@@ -158,0 +171,0 @@ };

@@ -64,14 +64,16 @@ "use strict";

// src/requests/get-request.ts
var getResults = (props) => __async(void 0, null, function* () {
let requestUrl = `${props.options ? props.options.baseUrl : process.env.MP_URL}/data-source/${props.dataSource}/results?_t=${(/* @__PURE__ */ new Date()).getTime()}`;
if (props.fields) {
requestUrl += `&fields=${encodeURIComponent(JSON.stringify(props.fields))}`;
}
if (props.dataFilter) {
requestUrl += `&dataFilter=${encodeURIComponent(JSON.stringify(props.dataFilter))}`;
}
const res = yield fetch(requestUrl, { headers: { "Authorization": `Bearer ${process.env.MP_KEY}` } });
const resJson = yield res.json();
return resJson;
});
function getResults(props) {
return __async(this, null, function* () {
let requestUrl = `${props.options ? props.options.baseUrl : process.env.MP_URL}/data-source/${props.dataSource}/results?_t=${(/* @__PURE__ */ new Date()).getTime()}`;
if (props.fields) {
requestUrl += `&fields=${encodeURIComponent(JSON.stringify(props.fields))}`;
}
if (props.dataFilter) {
requestUrl += `&dataFilter=${encodeURIComponent(JSON.stringify(props.dataFilter))}`;
}
const res = yield fetch(requestUrl, { headers: { "Authorization": `Bearer ${process.env.MP_KEY}` } });
const resJson = yield res.json();
return resJson;
});
}

@@ -78,0 +80,0 @@ // src/requests/index.ts

{
"name": "@newageerp/mp-types",
"version": "1.0.26",
"version": "1.0.27",
"description": "",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc