From f1dbba57473a7db9c19dedfea284b97dc985b0d2 Mon Sep 17 00:00:00 2001 From: Remi Jannel Date: Tue, 3 Mar 2020 09:34:46 -0800 Subject: [PATCH] Fix multiple references to the old types file --- .../webhook-signing/typescript-node-express/express-ts.ts | 2 +- package.json | 2 +- types/lib.d.ts | 4 ++-- types/test/typescriptTest.ts | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/webhook-signing/typescript-node-express/express-ts.ts b/examples/webhook-signing/typescript-node-express/express-ts.ts index 4b194401a4..92a1141004 100644 --- a/examples/webhook-signing/typescript-node-express/express-ts.ts +++ b/examples/webhook-signing/typescript-node-express/express-ts.ts @@ -6,7 +6,7 @@ import env from 'dotenv'; env.config(); const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, { - apiVersion: '2019-12-03', + apiVersion: '2020-03-02', }); const webhookSecret: string = process.env.STRIPE_WEBHOOK_SECRET; diff --git a/package.json b/package.json index a871af3b65..6ef7705dbc 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "node": "^8.1 || >=10.*" }, "main": "lib/stripe.js", - "types": "types/2019-12-03/index.d.ts", + "types": "types/2020-03-02/index.d.ts", "devDependencies": { "@typescript-eslint/eslint-plugin": "^2.13.0", "@typescript-eslint/parser": "^2.13.0", diff --git a/types/lib.d.ts b/types/lib.d.ts index c2608f339c..f1e2e2d349 100644 --- a/types/lib.d.ts +++ b/types/lib.d.ts @@ -5,7 +5,7 @@ import {Agent} from 'http'; declare module 'stripe' { namespace Stripe { - export type LatestApiVersion = '2019-12-03'; + export type LatestApiVersion = '2020-03-02'; export type HttpAgent = Agent; export interface StripeConfig { @@ -92,7 +92,7 @@ declare module 'stripe' { stripe_account?: string; /** - * The [API Version](https://stripe.com/docs/upgrades) to use for a given request (e.g., '2019-12-03'). + * The [API Version](https://stripe.com/docs/upgrades) to use for a given request (e.g., '2020-03-02'). */ apiVersion?: string; /** @deprecated Please use apiVersion instead. */ diff --git a/types/test/typescriptTest.ts b/types/test/typescriptTest.ts index 0c6d79b012..43caa0221c 100644 --- a/types/test/typescriptTest.ts +++ b/types/test/typescriptTest.ts @@ -5,11 +5,11 @@ * and to perform a basic sanity check that types are exported as intended. */ -/// +/// import Stripe from 'stripe'; let stripe = new Stripe('sk_test_123', { - apiVersion: '2019-12-03', + apiVersion: '2020-03-02', }); // @ts-ignore lazily ignore apiVersion requirement. @@ -27,7 +27,7 @@ stripe = new Stripe('sk_test_123', { // Check config object. stripe = new Stripe('sk_test_123', { - apiVersion: '2019-12-03', + apiVersion: '2020-03-02', typescript: true, maxNetworkRetries: 1, timeout: 1000, @@ -48,7 +48,7 @@ stripe.setHost('host', 'port', 'protocol'); description: 'test', }; const opts: Stripe.RequestOptions = { - apiVersion: '2019-12-03', + apiVersion: '2020-03-02', }; const customer: Stripe.Customer = await stripe.customers.create(params, opts);