diff --git a/types/googlepay/googlepay-tests.ts b/types/googlepay/googlepay-tests.ts index bc5ccbbaa3bf39..481f1f9295fc0c 100644 --- a/types/googlepay/googlepay-tests.ts +++ b/types/googlepay/googlepay-tests.ts @@ -59,6 +59,7 @@ const shippingAddressParametersEmptyObjectIsValid: google.payments.api.ShippingA const getGooglePaymentsClient = (env?: google.payments.api.Environment) => { return new google.payments.api.PaymentsClient({ environment: env, + nonce: "abc123def456", paymentDataCallbacks: { onPaymentAuthorized: (paymentData) => ({ transactionState: "SUCCESS" }), onPaymentDataChanged: (paymentData) => { diff --git a/types/googlepay/index.d.ts b/types/googlepay/index.d.ts index 3829e6840f3292..aa344b1941b1e7 100644 --- a/types/googlepay/index.d.ts +++ b/types/googlepay/index.d.ts @@ -2170,6 +2170,12 @@ declare namespace google.payments.api { * This object declares the callbacks used for Dynamic Price Updates. */ paymentDataCallbacks?: PaymentDataCallbacks | undefined; + + /** + * Optional Content Security Policy (CSP) nonce to apply to all dynamically + * injected styles and scripts. + */ + nonce?: string; } /** diff --git a/types/pg/index.d.ts b/types/pg/index.d.ts index a96540d5024c3d..d7465295206422 100644 --- a/types/pg/index.d.ts +++ b/types/pg/index.d.ts @@ -20,6 +20,7 @@ export interface ClientConfig { stream?: () => stream.Duplex | undefined; statement_timeout?: false | number | undefined; ssl?: boolean | ConnectionOptions | undefined; + sslnegotiation?: "postgres" | "direct" | undefined; query_timeout?: number | undefined; lock_timeout?: number | undefined; keepAliveInitialDelayMillis?: number | undefined; @@ -30,6 +31,7 @@ export interface ClientConfig { types?: CustomTypesConfig | undefined; options?: string | undefined; client_encoding?: string | undefined; + pipeline?: boolean | undefined; } export type ConnectionConfig = ClientConfig; @@ -302,6 +304,7 @@ export class Client extends ClientBase { host: string; password?: string | undefined; ssl: boolean; + readonly pipeline: boolean; readonly connection: Connection; constructor(config?: string | ClientConfig); diff --git a/types/pg/package.json b/types/pg/package.json index 269bc95d40805f..d66adc4343a596 100644 --- a/types/pg/package.json +++ b/types/pg/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/pg", - "version": "8.21.9999", + "version": "8.23.9999", "projects": [ "https://github.com/brianc/node-postgres" ], diff --git a/types/pg/pg-tests.ts b/types/pg/pg-tests.ts index 82991a7bb57fdc..52205ab381b58f 100644 --- a/types/pg/pg-tests.ts +++ b/types/pg/pg-tests.ts @@ -38,7 +38,14 @@ const client = new Client({ password: "secretpassword!!", application_name: "DefinitelyTyped", keepAlive: true, -}); + ssl: true, + sslnegotiation: "direct", + pipeline: true, +}); +// $ExpectType boolean +client.pipeline; +// @ts-expect-error – pipeline is readonly +client.pipeline = false; client.setTypeParser(20, val => Number(val)); client.getTypeParser(20); @@ -244,6 +251,8 @@ const poolParameterlessCtor = new Pool(); const poolOne = new Pool({ connectionString: "postgresql://dbuser:secretpassword@database.server.com:3211/mydb", + sslnegotiation: "postgres", + pipeline: true, }); class MyClient extends Client {