diff --git a/types/slonik/index.d.ts b/types/slonik/index.d.ts index 104ce163cd..55a80d264d 100644 --- a/types/slonik/index.d.ts +++ b/types/slonik/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for slonik 21.4 +// Type definitions for slonik 22.1 // Project: https://github.com/gajus/slonik#readme // Definitions by: Sebastian Sebald // Misha Kaletsky @@ -471,8 +471,11 @@ export interface ClientConfigurationType { /** Number of times to retry establishing a new connection. (Default: 3) */ connectionRetryLimit?: number; - /** Timeout (in milliseconds) after which an error is raised if cannot cannot be established. (Default: 5000) */ - connectionTimeout?: number; + /** connectionTimeout Timeout (in milliseconds) after which an error is raised if connection cannot cannot be established. (Default: 5000) */ + connectionTimeout?: number | 'DISABLE_TIMEOUT'; + + /** idleInTransactionSessionTimeout Timeout (in milliseconds) after which idle clients are closed. Use 'DISABLE_TIMEOUT' constant to disable the timeout. (Default: 60000) */ + idleInTransactionSessionTimeout?: number | 'DISABLE_TIMEOUT'; /** Timeout (in milliseconds) after which idle clients are closed. (Default: 5000) */ idleTimeout?: number; @@ -483,6 +486,9 @@ export interface ClientConfigurationType { /** Uses libpq bindings when `pg-native` module is installed. (Default: true) */ preferNativeBindings?: boolean; + /** Timeout (in milliseconds) after which database is instructed to abort the query. Use 'DISABLE_TIMEOUT' constant to disable the timeout. (Default: 60000) */ + statementTimeout?: number | 'DISABLE_TIMEOUT'; + /** * An array of [Slonik interceptors](https://github.com/gajus/slonik#slonik-interceptors) */