@ovh-api/common
Advanced tools
Comparing version 3.0.1 to 3.1.0
@@ -8,2 +8,17 @@ /** | ||
/** | ||
* Public interface of a silot | ||
* you can have one silot per Ovh API call | ||
*/ | ||
export interface ICacheSilot { | ||
options: ICacheOptions; | ||
flush(): Promise<void>; | ||
store(path: string, value: any, size: number): Promise<boolean>; | ||
get(path: string): Promise<any | undefined>; | ||
discard(path: string): Promise<boolean>; | ||
} | ||
/** | ||
* constructor for a silot cache | ||
*/ | ||
export declare type SlotConstructor = new (template: string, options: ICacheOptions) => ICacheSilot; | ||
/** | ||
* params to configure cache | ||
@@ -24,5 +39,12 @@ */ | ||
count?: number; | ||
/** | ||
* explicite silot construtor used to overwrite in memory default silotCache | ||
*/ | ||
silotClass?: SlotConstructor; | ||
} | ||
export declare type CacheAction = 'flush' | 'disable'; | ||
/** | ||
* 'flush' and 'disable' are the main action, other can be add later | ||
*/ | ||
export declare type CacheAction = 'flush' | 'disable' | string; | ||
/** | ||
* common interface used to call ovh engine | ||
@@ -29,0 +51,0 @@ */ |
{ | ||
"name": "@ovh-api/common", | ||
"description": "common class used to enable Ovh Api new calls Syntax", | ||
"version": "3.0.1", | ||
"version": "3.1.0", | ||
"main": "index.js", | ||
"typings": "index.d.ts", | ||
"license": "MIT", | ||
"dependencies": {}, | ||
"gitHead": "b9fec53f25067fa01d341adc086a63ef2c2a5f62", | ||
"devDependencies": {}, | ||
"gitHead": "9054d4e68cd0b25c73f4d6d47a17e6b174a281db", | ||
"publishConfig": { | ||
@@ -12,0 +10,0 @@ "access": "public" |
7189
225