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 authored Oct 10, 2023
1 parent 183e4aa commit d0b60e0
Show file tree
Hide file tree
Showing 39 changed files with 2,506 additions and 2,509 deletions.
50 changes: 25 additions & 25 deletions types/recurly__recurly-js/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
// Type definitions for non-npm package @recurly/recurly-js 4.25
// Type definitions for non-npm package @recurly/recurly-js 4.26
// Project: https://github.com/recurly/recurly-js
// Definitions by: Christopher Rogers <https://github.com/chrissrogers>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.1
import { Recurly } from "./lib/recurly";
import { Recurly } from './lib/recurly';

declare global {
interface Window {
recurly: Recurly;
}
interface Window {
recurly: Recurly;
}

const recurly: Recurly;
const recurly: Recurly;
}

export * from "./lib/3d-secure";
export * from "./lib/address";
export * from "./lib/adyen";
export * from "./lib/apple-pay/index";
export * from "./lib/bank-account";
export * from "./lib/bank-redirect";
export * from "./lib/configure";
export * from "./lib/elements";
export * from "./lib/error";
export * from "./lib/gift-card";
export * from "./lib/google-pay/index";
export * from "./lib/paypal";
export * from "./lib/pricing/checkout";
export * from "./lib/pricing/index";
export * from "./lib/pricing/promise";
export * from "./lib/pricing/subscription";
export * from "./lib/recurly";
export * from "./lib/token";
export * from "./lib/validate";
export * from './lib/pricing/checkout';
export * from './lib/pricing/promise';
export * from './lib/pricing/subscription';
export * from './lib/pricing/index';
export * from './lib/3d-secure';
export * from './lib/address';
export * from './lib/adyen';
export * from './lib/bank-redirect';
export * from './lib/apple-pay/index';
export * from './lib/google-pay/index';
export * from './lib/bank-account';
export * from './lib/configure';
export * from './lib/elements';
export * from './lib/error';
export * from './lib/gift-card';
export * from './lib/paypal';
export * from './lib/recurly';
export * from './lib/token';
export * from './lib/validate';
34 changes: 17 additions & 17 deletions types/recurly__recurly-js/lib/3d-secure.d.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
import { Emitter } from "./emitter";
import { Emitter } from './emitter';

export type ThreeDSecureEvent = "token" | "error";
export type ThreeDSecureEvent = 'token' | 'error';

export interface ThreeDSecureEmitter extends Emitter<ThreeDSecureEvent> {
/**
* @see {@link https://developers.recurly.com/reference/recurly-js/index.html#fn-threedsecureattach|ThreeDSecure.attach}
*/
attach: (el: HTMLElement) => void;
/**
* @see {@link https://developers.recurly.com/reference/recurly-js/index.html#fn-threedsecureattach|ThreeDSecure.attach}
*/
attach: (el: HTMLElement) => void;
}

export type RiskOptions = {
/**
* `three_d_secure_action_token_id` returned by the Recurly API when 3-D Secure authentication is required for a
* transaction.
*
* @see {@link https://developers.recurly.com/reference/recurly-js/index.html#fn-recurlythreedsecure|ThreeDSecure}
*/
actionTokenId?: string;
/**
* `three_d_secure_action_token_id` returned by the Recurly API when 3-D Secure authentication is required for a
* transaction.
*
* @see {@link https://developers.recurly.com/reference/recurly-js/index.html#fn-recurlythreedsecure|ThreeDSecure}
*/
actionTokenId?: string;
};

export type ThreeDSecure = (riskOptions: RiskOptions) => ThreeDSecureEmitter;

export type Risk = () => {
/**
* @see {@link https://developers.recurly.com/reference/recurly-js/index.html#fn-recurlythreedsecure|ThreeDSecure}
*/
ThreeDSecure: ThreeDSecure;
/**
* @see {@link https://developers.recurly.com/reference/recurly-js/index.html#fn-recurlythreedsecure|ThreeDSecure}
*/
ThreeDSecure: ThreeDSecure
};
98 changes: 49 additions & 49 deletions types/recurly__recurly-js/lib/address.d.ts
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
export type Address = {
/**
* Cardholder first name
*/
first_name: string;

/**
* Cardholder last name
*/
last_name: string;

/**
* First line of a street address
*/
address1?: string;

/**
* Second line of a street address
*/
address2?: string;

/**
* Town or locality
*/
city?: string;

/**
* Province or region
*/
state?: string;

/**
* Postal code
*/
postal_code?: string;

/**
* {@link http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2| [ISO 3166-1 alpha-2]} country code
*/
country?: string;

/**
* Phone number
*/
phone?: string;

/**
* Customer VAT number. Used for VAT exclusion
*/
vat_number?: string;
/**
* Cardholder first name
*/
first_name: string;

/**
* Cardholder last name
*/
last_name: string;

/**
* First line of a street address
*/
address1?: string;

/**
* Second line of a street address
*/
address2?: string;

/**
* Town or locality
*/
city?: string;

/**
* Province or region
*/
state?: string;

/**
* Postal code
*/
postal_code?: string;

/**
* {@link http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2| [ISO 3166-1 alpha-2]} country code
*/
country?: string;

/**
* Phone number
*/
phone?: string;

/**
* Customer VAT number. Used for VAT exclusion
*/
vat_number?: string;
};
44 changes: 22 additions & 22 deletions types/recurly__recurly-js/lib/adyen.d.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
import { Emitter } from "./emitter";
import { Emitter } from './emitter';

export type AdyenOptions = {
/**
* Invoice Uuid from PendingPurchase
*/
invoiceUuid: string;
/**
* Invoice Uuid from PendingPurchase
*/
invoiceUuid: string;

/**
* 2 Digit Country Code
*/
countryCode?: string;
/**
* 2 Digit Country Code
*/
countryCode?: string;

/**
* Shopper locale for Payment Modal
*/
shopperLocale?: string;
/**
* Shopper locale for Payment Modal
*/
shopperLocale?: string;

/**
* Skin code provided by Adyen
*/
skinCode?: string;
/**
* Skin code provided by Adyen
*/
skinCode?: string;
};

export type AdyenEvent = "token" | "error";
export type AdyenEvent = 'token' | 'error';

export interface AdyenInstance extends Emitter<AdyenEvent> {
/**
* Invokes the Adyen Payment Modal
*/
start: (adyenOptions: AdyenOptions) => void;
/**
* Invokes the Adyen Payment Modal
*/
start: (adyenOptions: AdyenOptions) => void;
}

export type Adyen = (adyenOptions?: AdyenOptions) => AdyenInstance;
Loading

0 comments on commit d0b60e0

Please sign in to comment.