@e2y/odata-client
Advanced tools
Comparing version 2.0.1 to 2.0.2
export * from './odata-client'; | ||
export * from './o-handler'; | ||
export * from './o-request'; | ||
export * from './types'; |
@@ -18,3 +18,5 @@ "use strict"; | ||
__exportStar(require("./odata-client"), exports); | ||
__exportStar(require("./o-handler"), exports); | ||
__exportStar(require("./o-request"), exports); | ||
__exportStar(require("./types"), exports); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLGlEQUErQjtBQUMvQiwwQ0FBd0IifQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLGlEQUErQjtBQUMvQiw4Q0FBNEI7QUFDNUIsOENBQTRCO0FBQzVCLDBDQUF3QiJ9 |
@@ -1,8 +0,10 @@ | ||
import { BodyInit } from 'node-fetch'; | ||
import { ORequest } from './o-request'; | ||
import { OdataConfig } from './types/OdataConfig'; | ||
import { OdataQuery } from './types/OdataQuery'; | ||
import { OdataConfig, OdataQuery } from './types'; | ||
interface URIBody { | ||
body: object | string; | ||
resource?: string; | ||
} | ||
export declare class OHandler { | ||
config: OdataConfig; | ||
private request?; | ||
private _request?; | ||
constructor(config: OdataConfig); | ||
@@ -22,3 +24,3 @@ query<T>(query?: OdataQuery): Promise<T>; | ||
*/ | ||
post(resource: string | undefined, body: BodyInit): this; | ||
post({ body, resource }: URIBody): this; | ||
/** | ||
@@ -30,3 +32,3 @@ * Put data to an endpoint + resource. | ||
*/ | ||
put(resource: string | undefined, body: BodyInit): this; | ||
put({ body, resource }: URIBody): this; | ||
/** | ||
@@ -38,3 +40,3 @@ * Patch data to an endpoint + resource. | ||
*/ | ||
patch(resource: string | undefined, body: BodyInit): this; | ||
patch({ body, resource }: URIBody): this; | ||
/** | ||
@@ -60,2 +62,4 @@ * Deletes a resource from the endpoint. | ||
getUrl(resource: string): string; | ||
get request(): ORequest | undefined; | ||
} | ||
export {}; |
@@ -10,14 +10,14 @@ "use strict"; | ||
async query(query) { | ||
if (!this.request) { | ||
throw 'Request not found'; | ||
if (!this._request) { | ||
throw new Error('Request not found'); | ||
} | ||
try { | ||
if (query) { | ||
this.request.applyQuery(query); | ||
this._request.applyQuery(query); | ||
} | ||
const response = await this.request.fetch(); | ||
const response = await this._request.fetch(); | ||
return response?.json(); | ||
} | ||
finally { | ||
this.request = undefined; | ||
this._request = undefined; | ||
} | ||
@@ -41,5 +41,9 @@ } | ||
*/ | ||
post(resource = '', body) { | ||
post({ body, resource = '' }) { | ||
const url = this.getUrl(resource); | ||
this.addRequest(new o_request_1.ORequest(url, { ...this.config, body, method: 'POST' })); | ||
this.addRequest(new o_request_1.ORequest(url, { | ||
...this.config, | ||
body: typeof body === 'string' ? body : JSON.stringify(body), | ||
method: 'POST' | ||
})); | ||
return this; | ||
@@ -53,5 +57,9 @@ } | ||
*/ | ||
put(resource = '', body) { | ||
put({ body, resource = '' }) { | ||
const url = this.getUrl(resource); | ||
this.addRequest(new o_request_1.ORequest(url, { ...this.config, body, method: 'PUT' })); | ||
this.addRequest(new o_request_1.ORequest(url, { | ||
...this.config, | ||
body: typeof body === 'string' ? body : JSON.stringify(body), | ||
method: 'PUT' | ||
})); | ||
return this; | ||
@@ -65,7 +73,7 @@ } | ||
*/ | ||
patch(resource = '', body) { | ||
patch({ body, resource = '' }) { | ||
const url = this.getUrl(resource); | ||
const request = new o_request_1.ORequest(url, { | ||
...this.config, | ||
body, | ||
body: typeof body === 'string' ? body : JSON.stringify(body), | ||
method: 'PATCH' | ||
@@ -99,3 +107,3 @@ }); | ||
addRequest(req) { | ||
this.request = req; | ||
this._request = req; | ||
} | ||
@@ -105,4 +113,7 @@ getUrl(resource) { | ||
} | ||
get request() { | ||
return this._request; | ||
} | ||
} | ||
exports.OHandler = OHandler; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiby1oYW5kbGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL28taGFuZGxlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFFQSwyQ0FBdUM7QUFJdkMsTUFBYSxRQUFRO0lBR25CLFlBQW1CLE1BQW1CO1FBQW5CLFdBQU0sR0FBTixNQUFNLENBQWE7SUFBRyxDQUFDO0lBRW5DLEtBQUssQ0FBQyxLQUFLLENBQUksS0FBa0I7UUFDdEMsSUFBSSxDQUFDLElBQUksQ0FBQyxPQUFPLEVBQUU7WUFDakIsTUFBTSxtQkFBbUIsQ0FBQztTQUMzQjtRQUVELElBQUk7WUFDRixJQUFJLEtBQUssRUFBRTtnQkFDVCxJQUFJLENBQUMsT0FBTyxDQUFDLFVBQVUsQ0FBQyxLQUFLLENBQUMsQ0FBQzthQUNoQztZQUVELE1BQU0sUUFBUSxHQUFHLE1BQU0sSUFBSSxDQUFDLE9BQU8sQ0FBQyxLQUFLLEVBQUUsQ0FBQztZQUM1QyxPQUFPLFFBQVEsRUFBRSxJQUFJLEVBQWdCLENBQUM7U0FDdkM7Z0JBQVM7WUFDUixJQUFJLENBQUMsT0FBTyxHQUFHLFNBQVMsQ0FBQztTQUMxQjtJQUNILENBQUM7SUFFRDs7OztPQUlHO0lBQ0ksR0FBRyxDQUFDLFFBQVEsR0FBRyxFQUFFO1FBQ3RCLE1BQU0sR0FBRyxHQUFHLElBQUksQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLENBQUM7UUFDbEMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxJQUFJL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9 |
import { RequestInit, Response } from 'node-fetch'; | ||
import { OdataQuery } from './types/OdataQuery'; | ||
import { OdataQuery } from './types'; | ||
export declare class ORequest { | ||
@@ -4,0 +4,0 @@ config: RequestInit; |
@@ -13,4 +13,10 @@ "use strict"; | ||
} | ||
fetch() { | ||
return (0, node_fetch_1.default)(this.url, this.config); | ||
async fetch() { | ||
const response = await (0, node_fetch_1.default)(this.url, this.config); | ||
if (response.status >= 400) { | ||
const propertySymbol = Object.getOwnPropertySymbols(response)[1]; | ||
console.error(await response.text()); | ||
throw new Error(JSON.stringify(response[propertySymbol])); | ||
} | ||
return response; | ||
} | ||
@@ -26,2 +32,2 @@ applyQuery(query) { | ||
exports.ORequest = ORequest; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiby1yZXF1ZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL28tcmVxdWVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSw0REFBMEQ7QUFJMUQsTUFBYSxRQUFRO0lBR25CLFlBQVksR0FBaUIsRUFBUyxNQUFtQjtRQUFuQixXQUFNLEdBQU4sTUFBTSxDQUFhO1FBQ3ZELElBQUksQ0FBQyxHQUFHLEdBQUcsT0FBTyxHQUFHLEtBQUssUUFBUSxDQUFDLENBQUMsQ0FBQyxJQUFJLEdBQUcsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFDO0lBQzFELENBQUM7SUFFTSxLQUFLO1FBQ1YsT0FBTyxJQUFBLG9CQUFLLEVBQUMsSUFBSSxDQUFDLEdBQUcsRUFBRSxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDdEMsQ0FBQztJQUVNLFVBQVUsQ0FBQyxLQUFpQjtRQUNqQyxLQUFLLE1BQU0sQ0FBQyxHQUFHLEVBQUUsS0FBSyxDQUFDLElBQUksTUFBTSxD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yxFQUFFO1lBQzFCLE1BQU0sY0FBYyxHQUFHLE1BQU0sQ0FBQyxxQkFBcUIsQ0FBQyxRQUFRLENBQUMsQ0FBQyxDQUFDLENBQWtDLENBQUM7WUFDbEcsT0FBTyxDQUFDLEtBQUssQ0FBQyxNQUFNLFFBQVEsQ0FBQyxJQUFJLEVBQUUsQ0FBQyxDQUFDO1lBQ3JDLE1BQU0sSUFBSSxLQUFLLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxRQUFRLENBQUMsY0FBYyxDQUFDLENBQUMsQ0FBQyxDQUFDO1NBQzNEO1FBRUQsT0FBTyxRQUFRLENBQUM7SUFDbEIsQ0FBQztJQUVNLFVBQVUsQ0FBQyxLQUFpQjtRQUNqQyxLQUFLLE1BQU0sQ0FBQyxHQUFHLEVBQUUsS0FBSyxDQUFDLElBQUksTUFBTSxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUMsRUFBRTtZQUNoRCxJQUFJLENBQUMsR0FBRyxDQUFDLFlBQVksQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDO2dCQUM1QixDQUFDLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxZQUFZLENBQUMsR0FBRyxDQUFDLEdBQUcsRUFBRSxNQUFNLENBQUMsS0FBSyxDQUFDLENBQUM7Z0JBQy9DLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLFlBQVksQ0FBQyxNQUFNLENBQUMsR0FBRyxFQUFFLE1BQU0sQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDO1NBQ3REO0lBQ0gsQ0FBQztDQUNGO0FBMUJELDRCQTBCQyJ9 |
@@ -64,3 +64,3 @@ "use strict"; | ||
const body = { code, job: { code } }; | ||
await handler.post(this.CRONJOB_ENDPOINT, JSON.stringify(body)).query(); | ||
await handler.post({ body: JSON.stringify(body), resource: this.CRONJOB_ENDPOINT }).query(); | ||
await this.cronjobHasFinishedSuccessfully(code, timeoutParameters); | ||
@@ -99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UMsYUFBYSxDQUFDLEVBQUUsTUFBTSxFQUFFLEVBQUUsSUFBSSxFQUFFLFNBQVMsRUFBRSxFQUFFLE1BQU0sRUFBRSxFQUFFLElBQUksRUFBRSxVQUFVLEVBQUUsRUFBRSxDQUFDLENBQUM7UUFDL0YsQ0FBQyxFQUNELGlCQUFpQixDQUFDLE9BQU8sRUFDekIsaUJBQWlCLENBQUMsUUFBUSxDQUMzQixDQUFDO0lBQ0osQ0FBQztJQUVPLGdEQUFnRDtRQUN0RCxJQUFBLGdCQUFNLEVBQ0osSUFBSSxDQUFDLG9DQUFvQyxFQUN6Qyx1R0FBdUcsQ0FDeEcsQ0FBQztJQUNKLENBQUM7Q0FDRjtBQXBHRCxrQ0FvR0MifQ== |
export * from './odata-client-config'; | ||
export * from './odata-get-response'; | ||
export * from './odata-post-response'; | ||
export * from './OdataQuery'; | ||
export * from './OdataConfig'; | ||
export * from './cronjob'; |
@@ -20,2 +20,5 @@ "use strict"; | ||
__exportStar(require("./odata-post-response"), exports); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLHdEQUFzQztBQUN0Qyx1REFBcUM7QUFDckMsd0RBQXNDIn0= | ||
__exportStar(require("./OdataQuery"), exports); | ||
__exportStar(require("./OdataConfig"), exports); | ||
__exportStar(require("./cronjob"), exports); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLHdEQUFzQztBQUN0Qyx1REFBcUM7QUFDckMsd0RBQXNDO0FBQ3RDLCtDQUE2QjtBQUM3QixnREFBOEI7QUFDOUIsNENBQTBCIn0= |
{ | ||
"name": "@e2y/odata-client", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "odata client", | ||
@@ -36,3 +36,3 @@ "author": "e2y", | ||
}, | ||
"gitHead": "6f24ed2585c9c4373903233d5fcad21df32dade9" | ||
"gitHead": "2037b2ca57d71aaaf22200ae55d7ef6246b86837" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31027
463