@ovh-api/common
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -111,2 +111,3 @@ "use strict"; | ||
return target[p]; | ||
// return (target as unknown as EventEmitter)[p as 'addListener' | 'on' | 'once' | 'prependListener' | 'prependOnceListener' | 'removeListener' | 'off' | 'removeAllListeners' | 'setMaxListeners' | 'getMaxListeners' | 'listeners' | 'rawListeners' | 'emit' | 'eventNames' | 'listenerCount']; | ||
// legacy method only in root level | ||
@@ -118,3 +119,4 @@ // @deprecated | ||
case 'delete': | ||
return (path) => (params) => target._ovhEngine.request(key, path, params); | ||
// root level call do not have path parameter so pathTemplate == path | ||
return (path) => (params) => target._ovhEngine.doRequest(key, path, path, params); | ||
} | ||
@@ -121,0 +123,0 @@ return commonGet(key, target); |
@@ -68,3 +68,2 @@ /** | ||
*/ | ||
request(httpMethod: string, path: string, params?: OvhParamType): Promise<any>; | ||
/** | ||
@@ -71,0 +70,0 @@ * cache controle |
@@ -108,2 +108,3 @@ /** | ||
return target[p]; | ||
// return (target as unknown as EventEmitter)[p as 'addListener' | 'on' | 'once' | 'prependListener' | 'prependOnceListener' | 'removeListener' | 'off' | 'removeAllListeners' | 'setMaxListeners' | 'getMaxListeners' | 'listeners' | 'rawListeners' | 'emit' | 'eventNames' | 'listenerCount']; | ||
// legacy method only in root level | ||
@@ -115,3 +116,4 @@ // @deprecated | ||
case 'delete': | ||
return (path) => (params) => target._ovhEngine.request(key, path, params); | ||
// root level call do not have path parameter so pathTemplate == path | ||
return (path) => (params) => target._ovhEngine.doRequest(key, path, path, params); | ||
} | ||
@@ -118,0 +120,0 @@ return commonGet(key, target); |
{ | ||
"name": "@ovh-api/common", | ||
"description": "common class used to enable Ovh Api new calls Syntax", | ||
"version": "4.0.0", | ||
"type": "module", | ||
"version": "4.0.1", | ||
"main": "./lib/cjs/index.js", | ||
@@ -16,3 +15,3 @@ "typings": "./lib/esm/index.d.ts", | ||
"license": "MIT", | ||
"author": "Uriel Chemouni <uchemouni@gmail.com> (https://urielch.github.io/)", | ||
"author": "Uriel Chemouni <uchemouni@gmail.com> (https://uriel.deno.dev/)", | ||
"gitHead": "9054d4e68cd0b25c73f4d6d47a17e6b174a281db", | ||
@@ -34,4 +33,4 @@ "publishConfig": { | ||
"devDependencies": { | ||
"typescript": "^4.9.3" | ||
"typescript": "^5.0.2" | ||
} | ||
} |
@@ -34,3 +34,3 @@ /** | ||
*/ | ||
size?:number; | ||
size?: number; | ||
/** | ||
@@ -72,3 +72,3 @@ * max number of entry in your cache | ||
*/ | ||
request(httpMethod: string, path: string, params?: OvhParamType): Promise<any>; | ||
//request(httpMethod: string, path: string, params?: OvhParamType): Promise<any>; | ||
@@ -159,3 +159,3 @@ /** | ||
if (typeof p === 'symbol') | ||
return (<any>target)[p]; | ||
return (target as any)[p]; | ||
let key = p.toString(); | ||
@@ -171,3 +171,3 @@ switch (key) { | ||
// constructor | ||
return (target as any)[p]; | ||
return target[p as 'toString' | 'valueOf' | 'toLocaleString']; | ||
// EventEmitter | ||
@@ -190,2 +190,3 @@ case 'addListener': | ||
return (target as any)[p]; | ||
// return (target as unknown as EventEmitter)[p as 'addListener' | 'on' | 'once' | 'prependListener' | 'prependOnceListener' | 'removeListener' | 'off' | 'removeAllListeners' | 'setMaxListeners' | 'getMaxListeners' | 'listeners' | 'rawListeners' | 'emit' | 'eventNames' | 'listenerCount']; | ||
// legacy method only in root level | ||
@@ -197,3 +198,4 @@ // @deprecated | ||
case 'delete': | ||
return (path: string) => (params: OvhParamType) => target._ovhEngine.request(key, path, params) | ||
// root level call do not have path parameter so pathTemplate == path | ||
return (path: string) => (params: OvhParamType) => target._ovhEngine.doRequest(key, path, path, params) | ||
} | ||
@@ -200,0 +202,0 @@ return commonGet(key, target); |
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
19776
594
No