Skip to content

Commit

Permalink
Updates recurly-js types
Browse files Browse the repository at this point in the history
  • Loading branch information
recurly-integrations committed Jul 16, 2024
1 parent 8ea9167 commit 7a97505
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 11 deletions.
4 changes: 2 additions & 2 deletions types/recurly__recurly-js/lib/amazon-pay.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<AmazonPayEvent> {
/**
Expand All @@ -37,4 +37,4 @@ export interface AmazonPayInstance extends Emitter<AmazonPayEvent> {
renderButton: (element: string) => void;
}

export type AmazonPay = (amazonPayOptions?: AmazonPayOptions) => AmazonPayInstance;
export type AmazonPay = (amazonPayOptions?: AmazonPayOptions) => AmazonPayInstance;
10 changes: 5 additions & 5 deletions types/recurly__recurly-js/lib/apple-pay/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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> | 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> | 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> | 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> | 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> | ApplePayErrorUpdate | void,
};

Expand Down
2 changes: 1 addition & 1 deletion types/recurly__recurly-js/lib/google-pay/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export type GooglePayOptions = {
*/
callbacks?: {
onPaymentDataChanged?: (intermediatePaymentData: GooglePayIntermediatePaymentData) => Promise<GooglePayPaymentDataRequestUpdate>;
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
onPaymentAuthorized?: (paymentData: GooglePayPaymentData) => Promise<GooglePayPaymentAuthorizationResult> | void;
},
};
Expand Down
1 change: 0 additions & 1 deletion types/recurly__recurly-js/lib/recurly.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export interface Recurly extends Emitter<RecurlyEvent> {
*/
PayPal: PayPal;


/**
* Use Recurly to process Amazon Pay v2 transactions
*
Expand Down
6 changes: 5 additions & 1 deletion types/recurly__recurly-js/package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand All @@ -14,6 +14,10 @@
{
"name": "Christopher Rogers",
"githubUsername": "chrissrogers"
},
{
"name": "Douglas Miller",
"githubUsername": "douglasmiller"
}
]
}
2 changes: 1 addition & 1 deletion types/recurly__recurly-js/test/google-pay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<GooglePayPaymentAuthorizationResult> | void => {
if (paymentData.email === '[email protected]') {
return Promise.reject({
Expand Down

0 comments on commit 7a97505

Please sign in to comment.