diff options
Diffstat (limited to 'ts')
-rw-r--r-- | ts/ngx_core.d.ts | 9 | ||||
-rw-r--r-- | ts/ngx_http_js_module.d.ts | 2 | ||||
-rw-r--r-- | ts/ngx_stream_js_module.d.ts | 2 | ||||
-rw-r--r-- | ts/njs_core.d.ts | 1 | ||||
-rw-r--r-- | ts/njs_webcrypto.d.ts | 15 |
5 files changed, 20 insertions, 9 deletions
diff --git a/ts/ngx_core.d.ts b/ts/ngx_core.d.ts index b459c929..d35cb40f 100644 --- a/ts/ngx_core.d.ts +++ b/ts/ngx_core.d.ts @@ -276,6 +276,7 @@ interface NgxSharedDict<V extends string | number = string | number> { * * @param key The key of the item to add. * @param value The value of the item to add. + * @param timeout Overrides the default timeout for this item in milliseconds. * @returns `true` if the value has been added successfully, `false` * if the `key` already exists in this dictionary. * @throws {SharedMemoryError} if there's not enough free space in this @@ -283,7 +284,7 @@ interface NgxSharedDict<V extends string | number = string | number> { * @throws {TypeError} if the `value` is of a different type than expected * by this dictionary. */ - add(key: string, value: V): boolean; + add(key: string, value: V, timeout?: number): boolean; /** * Removes all items from this dictionary. */ @@ -307,13 +308,14 @@ interface NgxSharedDict<V extends string | number = string | number> { * @param delta The number to increment/decrement the value by. * @param init The number to initialize the item with if it didn't exist * (default is `0`). + * @param timeout Overrides the default timeout for this item in milliseconds. * @returns The new value. * @throws {SharedMemoryError} if there's not enough free space in this * dictionary. * @throws {TypeError} if this dictionary does not expect numbers. */ incr: V extends number - ? (key: string, delta: V, init?: number) => number + ? (key: string, delta: V, init?: number, timeout?: number) => number : never; /** * @param maxCount The maximum number of pairs to retrieve (default is 1024). @@ -371,13 +373,14 @@ interface NgxSharedDict<V extends string | number = string | number> { * * @param key The key of the item to set. * @param value The value of the item to set. + * @param timeout Overrides the default timeout for this item in milliseconds. * @returns This dictionary (for method chaining). * @throws {SharedMemoryError} if there's not enough free space in this * dictionary. * @throws {TypeError} if the `value` is of a different type than expected * by this dictionary. */ - set(key: string, value: V): this; + set(key: string, value: V, timeout?: number): this; /** * @returns The number of items in this shared dictionary. */ diff --git a/ts/ngx_http_js_module.d.ts b/ts/ngx_http_js_module.d.ts index 37932893..d7dd1c9e 100644 --- a/ts/ngx_http_js_module.d.ts +++ b/ts/ngx_http_js_module.d.ts @@ -468,7 +468,7 @@ interface NginxHTTPRequest { /** * nginx variables as strings. * - * **Warning:** Bytes invalid in UTF-8 encoding may be converted into the replacement character. + * After 0.8.5 bytes invalid in UTF-8 encoding are converted into the replacement characters. * * @see rawVariables */ diff --git a/ts/ngx_stream_js_module.d.ts b/ts/ngx_stream_js_module.d.ts index 58c4d908..c78d008b 100644 --- a/ts/ngx_stream_js_module.d.ts +++ b/ts/ngx_stream_js_module.d.ts @@ -200,7 +200,7 @@ interface NginxStreamRequest { /** * nginx variables as strings. * - * **Warning:** Bytes invalid in UTF-8 encoding may be converted into the replacement character. + * After 0.8.5 bytes invalid in UTF-8 encoding are converted into the replacement characters. * * @see rawVariables */ diff --git a/ts/njs_core.d.ts b/ts/njs_core.d.ts index 2f1d45d0..f64c9576 100644 --- a/ts/njs_core.d.ts +++ b/ts/njs_core.d.ts @@ -581,6 +581,7 @@ interface NjsProcess { readonly env: NjsEnv; /** + * Send signal to a process by its PID. * @since 0.8.8 */ kill(pid: number, signal?: string | number): true; diff --git a/ts/njs_webcrypto.d.ts b/ts/njs_webcrypto.d.ts index 058359cb..4e6f2057 100644 --- a/ts/njs_webcrypto.d.ts +++ b/ts/njs_webcrypto.d.ts @@ -41,12 +41,12 @@ interface RsaHashedKeyGenParams { } interface EcKeyImportParams { - name: "ECDSA"; + name: "ECDSA" | "ECDH"; namedCurve: "P-256" | "P-384" | "P-521"; } interface EcKeyGenParams { - name: "ECDSA"; + name: "ECDSA" | "ECDH"; namedCurve: "P-256" | "P-384" | "P-521"; } @@ -68,7 +68,8 @@ type ImportAlgorithm = | AesImportParams | AesVariants | "PBKDF2" - | "HKDF"; + | "HKDF" + | "ECDH"; type GenerateAlgorithm = | RsaHashedKeyGenParams @@ -99,9 +100,15 @@ interface Pbkdf2Params { interations: number; } +interface EcdhParams { + name: "ECDH"; + public: CryptoKey; +} + type DeriveAlgorithm = | HkdfParams - | Pbkdf2Params; + | Pbkdf2Params + | EcdhParams; interface HmacKeyGenParams { name: "HMAC"; |