From 7a97505394a26474b24f92f298d06cf2f256c54e Mon Sep 17 00:00:00 2001 From: recurly-integrations Date: Tue, 16 Jul 2024 20:24:32 +0000 Subject: [PATCH] Updates recurly-js types --- types/recurly__recurly-js/lib/amazon-pay.d.ts | 4 ++-- types/recurly__recurly-js/lib/apple-pay/index.d.ts | 10 +++++----- types/recurly__recurly-js/lib/google-pay/index.d.ts | 2 +- types/recurly__recurly-js/lib/recurly.d.ts | 1 - types/recurly__recurly-js/package.json | 6 +++++- types/recurly__recurly-js/test/google-pay.ts | 2 +- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/types/recurly__recurly-js/lib/amazon-pay.d.ts b/types/recurly__recurly-js/lib/amazon-pay.d.ts index 63fdf0dbe5a568..c0037251394f01 100644 --- a/types/recurly__recurly-js/lib/amazon-pay.d.ts +++ b/types/recurly__recurly-js/lib/amazon-pay.d.ts @@ -17,7 +17,7 @@ export type AmazonPayOptions = { sandbox?: boolean; }; -export type AmazonPayEvent = 'ready' | 'token' | 'error' | 'close' | 'done'; +export type AmazonPayEvent = 'ready' | 'token' | 'error' | 'cancel' | 'done'; export interface AmazonPayInstance extends Emitter { /** @@ -37,4 +37,4 @@ export interface AmazonPayInstance extends Emitter { renderButton: (element: string) => void; } -export type AmazonPay = (amazonPayOptions?: AmazonPayOptions) => AmazonPayInstance; \ No newline at end of file +export type AmazonPay = (amazonPayOptions?: AmazonPayOptions) => AmazonPayInstance; diff --git a/types/recurly__recurly-js/lib/apple-pay/index.d.ts b/types/recurly__recurly-js/lib/apple-pay/index.d.ts index 5b9813d1a0c20d..37cb4211fa9388 100644 --- a/types/recurly__recurly-js/lib/apple-pay/index.d.ts +++ b/types/recurly__recurly-js/lib/apple-pay/index.d.ts @@ -77,15 +77,15 @@ export type ApplePayConfig = { * Callbacks for the events emitted by the payment session when a user selects options in the payment sheet. */ callbacks?: { -// eslint-disable-next-line @typescript-eslint/no-invalid-void-type + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type onPaymentMethodSelected?: (event: ApplePayPaymentMethodSelectedEvent) => Promise | ApplePaySelectionUpdate | void, -// eslint-disable-next-line @typescript-eslint/no-invalid-void-type + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type onShippingContactSelected?: (event: ApplePayShippingContactSelectedEvent) => Promise | ApplePaySelectionUpdate | void, -// eslint-disable-next-line @typescript-eslint/no-invalid-void-type + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type onShippingMethodSelected?: (event: ApplePayShippingMethodSelectedEvent) => Promise | ApplePaySelectionUpdate | void, -// eslint-disable-next-line @typescript-eslint/no-invalid-void-type + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type onCouponCodeChanged?: (event: ApplePayCouponCodeChangedEvent) => Promise | ApplePaySelectionUpdate | void, -// eslint-disable-next-line @typescript-eslint/no-invalid-void-type + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type onPaymentAuthorized?: (event: ApplePayPaymentAuthorizedEvent) => Promise | ApplePayErrorUpdate | void, }; diff --git a/types/recurly__recurly-js/lib/google-pay/index.d.ts b/types/recurly__recurly-js/lib/google-pay/index.d.ts index 3d1e6ed1e12164..3d27f3c3d919c3 100644 --- a/types/recurly__recurly-js/lib/google-pay/index.d.ts +++ b/types/recurly__recurly-js/lib/google-pay/index.d.ts @@ -91,7 +91,7 @@ export type GooglePayOptions = { */ callbacks?: { onPaymentDataChanged?: (intermediatePaymentData: GooglePayIntermediatePaymentData) => Promise; -// eslint-disable-next-line @typescript-eslint/no-invalid-void-type + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type onPaymentAuthorized?: (paymentData: GooglePayPaymentData) => Promise | void; }, }; diff --git a/types/recurly__recurly-js/lib/recurly.d.ts b/types/recurly__recurly-js/lib/recurly.d.ts index 9078713f509937..45765b43239cc6 100644 --- a/types/recurly__recurly-js/lib/recurly.d.ts +++ b/types/recurly__recurly-js/lib/recurly.d.ts @@ -90,7 +90,6 @@ export interface Recurly extends Emitter { */ PayPal: PayPal; - /** * Use Recurly to process Amazon Pay v2 transactions * diff --git a/types/recurly__recurly-js/package.json b/types/recurly__recurly-js/package.json index 54b6c349404808..31627f16b9ce34 100644 --- a/types/recurly__recurly-js/package.json +++ b/types/recurly__recurly-js/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/recurly__recurly-js", - "version": "4.26.9999", + "version": "4.29.9999", "nonNpm": true, "nonNpmDescription": "@recurly/recurly-js", "projects": [ @@ -14,6 +14,10 @@ { "name": "Christopher Rogers", "githubUsername": "chrissrogers" + }, + { + "name": "Douglas Miller", + "githubUsername": "douglasmiller" } ] } diff --git a/types/recurly__recurly-js/test/google-pay.ts b/types/recurly__recurly-js/test/google-pay.ts index 0c28e11305e0ed..75ed9d04e33c7d 100644 --- a/types/recurly__recurly-js/test/google-pay.ts +++ b/types/recurly__recurly-js/test/google-pay.ts @@ -35,7 +35,7 @@ export default function googlePay () { buttonColor: 'black', }, callbacks: { -// eslint-disable-next-line @typescript-eslint/no-invalid-void-type + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type onPaymentAuthorized: (paymentData: GooglePayPaymentData): Promise | void => { if (paymentData.email === 'test@example.com') { return Promise.reject({