Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@e2y/odata-client

Package Overview
Dependencies
Maintainers
6
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@e2y/odata-client - npm Package Compare versions

Comparing version 1.0.12 to 2.0.1

lib/o-handler.d.ts

2

lib/odata-client.d.ts

@@ -1,2 +0,2 @@

import { OHandler } from 'odata/dist/types/OHandler';
import { OHandler } from './o-handler';
import { ODataClientConfig } from './types';

@@ -3,0 +3,0 @@ export declare class ODataClient {

@@ -34,5 +34,5 @@ "use strict";

const md5_1 = __importDefault(require("md5"));
const odata_1 = require("odata");
const wait_for_expect_1 = __importDefault(require("wait-for-expect"));
const datetime_1 = require("./constants/datetime");
const o_handler_1 = require("./o-handler");
class ODataClient {

@@ -59,17 +59,14 @@ constructor({ baseURL, accessPassword, password, username, cronjob, headers }) {

const prePersitHook = hookBean ? { 'Pre-Persist-Hook': hookBean } : undefined;
const handler = (0, odata_1.o)(this.BASE_URL, {
const handler = new o_handler_1.OHandler({
headers: { ...headers, ...prePersitHook },
...rest,
headers: { ...headers, ...prePersitHook }
}), body = {
code,
job: { code }
};
rootUrl: this.BASE_URL
});
const body = { code, job: { code } };
await handler.post(this.CRONJOB_ENDPOINT, JSON.stringify(body)).query();
await this.cronjobHasFinishedSuccessfully(code, timeoutParameters);
}
createOHandlerDefaultInstance(baseURL, username, password, accessPassword, additionalHeaders) {
createOHandlerDefaultInstance(rootUrl, username, password, accessPassword, additionalHeaders) {
const Authorization = ODataClient.generateAuthorization(username, password), Cookie = accessPassword ? { Cookie: ODataClient.encryptMD5(accessPassword) } : undefined;
return (0, odata_1.o)(baseURL, {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
return new o_handler_1.OHandler({
agent: new https.Agent({

@@ -84,3 +81,4 @@ rejectUnauthorized: false

...additionalHeaders
}
},
rootUrl
});

@@ -90,7 +88,7 @@ }

await (0, wait_for_expect_1.default)(async () => {
const { d: { results: [cronjob] } } = (await this.handler.get(this.CRONJOB_ENDPOINT).query({
const { d: { results: [cronjob] } } = await this.handler.get(this.CRONJOB_ENDPOINT).query({
$expand: 'status,result',
$filter: `code eq '${code}'`,
$format: 'json'
}));
});
(0, expect_1.default)(cronjob).toMatchObject({ result: { code: 'SUCCESS' }, status: { code: 'FINISHED' } });

@@ -104,2 +102,2 @@ }, timeoutParameters.timeout, timeoutParameters.interval);

exports.ODataClient = ODataClient;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2RhdGEtY2xpZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL29kYXRhLWNsaWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLG9EQUE0QjtBQUM1QixvREFBNEI7QUFDNUIsNkNBQStCO0FBQy9CLDhDQUFzQjtBQUN0QixpQ0FBMEI7QUFFMUIsc0VBQTRDO0FBRTVDLG1EQUFzRTtBQUl0RSxNQUFhLFdBQVc7SUFNdEIsWUFBb0IsRUFBRSxPQUFPLEVBQUUsY0FBYyxFQUFFLFFBQVEsRUFBRSxRQUFRLEVBQUUsT0FBTyxFQUFFLE9BQU8sRUFBcUI7UUFDdEcsSUFBSSxDQUFDLFFBQVEsR0FBRyxPQUFPLENBQUM7UUFDeEIsSUFBSSxDQUFDLGdCQUFnQixHQUFHLE9BQU8sRUFBRSxRQUFRLElBQUksMEJBQTBCLENBQUM7UUFDeEUsSUFBSSxDQUFDLG9DQUFvQyxHQUFHLE9BQU8sRUFBRSx3QkFBd0IsQ0FBQztRQUM5RSxJQUFJLENBQUMsT0FBTyxHQUFHLElBQUksQ0FBQyw2QkFBNkIsQ0FBQyxPQUFPLEVBQUUsUUFBUSxFQUFFLFFBQVEsRUFBRSxjQUFjLEVBQUUsT0FB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0JBQWdCLENBQUMsQ0FBQyxLQUFLLENBQThCO2dCQUNuRixPQUFPLEVBQUUsZUFBZTtnQkFDeEIsT0FBTyxFQUFFLFlBQVksSUFBSSxHQUFHO2dCQUM1QixPQUFPLEVBQUUsTUFBTTthQUNoQixDQUFDLENBQUM7WUFFSCxJQUFBLGdCQUFNLEVBQUMsT0FBTyxDQUFDLENBQUMsYUFBYSxDQUFDLEVBQUUsTUFBTSxFQUFFLEVBQUUsSUFBSSxFQUFFLFNBQVMsRUFBRSxFQUFFLE1BQU0sRUFBRSxFQUFFLElBQUksRUFBRSxVQUFVLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDL0YsQ0FBQyxFQUNELGlCQUFpQixDQUFDLE9BQU8sRUFDekIsaUJBQWlCLENBQUMsUUFBUSxDQUMzQixDQUFDO0lBQ0osQ0FBQztJQUVPLGdEQUFnRDtRQUN0RCxJQUFBLGdCQUFNLEVBQ0osSUFBSSxDQUFDLG9DQUFvQyxFQUN6Qyx1R0FBdUcsQ0FDeEcsQ0FBQztJQUNKLENBQUM7Q0FDRjtBQXBHRCxrQ0FvR0MifQ==

@@ -1,2 +0,2 @@

export interface IODataGetResponse<T = any> {
export interface IODataGetResponse<T> {
d: {

@@ -3,0 +3,0 @@ results: T[];

@@ -1,3 +0,3 @@

export interface IODataPostResponse<T = any> {
export interface IODataPostResponse<T> {
d: T;
}
{
"name": "@e2y/odata-client",
"version": "1.0.12",
"version": "2.0.1",
"description": "odata client",

@@ -30,8 +30,9 @@ "author": "e2y",

"@types/md5": "^2.3.0",
"expect": "^27.2.4",
"@types/node-fetch": "^2.6.2",
"expect": "^29.2.2",
"md5": "^2.3.0",
"odata": "^1.3.1",
"node-fetch": "^2.6.7",
"wait-for-expect": "^3.0.2"
},
"gitHead": "d1974f91daf64edefbb4aadc4824a05054c9c23c"
"gitHead": "6f24ed2585c9c4373903233d5fcad21df32dade9"
}
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