diff --git a/types/stripe/index.d.ts b/types/stripe/index.d.ts index 7017070d59..93a9b13300 100644 --- a/types/stripe/index.d.ts +++ b/types/stripe/index.d.ts @@ -14,6 +14,7 @@ // Troy Zarger // Ifiok Jr. // Simon Schick +// Slava Yultyyev Schick // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.2 @@ -462,6 +463,16 @@ declare namespace Stripe { */ reason: "fraud" | "terms_of_service" | "other" ; } + + interface ILoginLink { + object: "login_link"; + created: number; + + /** + * A single-use login link for an Express account to access their Stripe dashboard. + */ + url: string; + } } namespace applicationFees { @@ -2352,6 +2363,7 @@ declare namespace Stripe { end: number; } } + namespace invoiceItems { interface InvoiceItem extends IResourceObject { /** @@ -3969,16 +3981,9 @@ declare namespace Stripe { destination?: string; /** - * Only return transfers for the recipient specified by this - * recipient ID. + * Only return transfers with the specified transfer group. */ - recipient?: string; - - /** - * Only return transfers that have the given status: - * pending, paid, failed, in_transit, or canceled. - */ - status: Statuses; + transfer_group?: string | null; } type SourceTypes = "alipay_account" | "bank_account" | "bitcoin_receiver" | "card"; @@ -5498,6 +5503,14 @@ declare namespace Stripe { */ listExternalAccounts(accId: string, data: accounts.ICardListOptions, options: HeaderOptions, response?: IResponseFn>): Promise>; listExternalAccounts(accId: string, data: accounts.ICardListOptions, response?: IResponseFn>): Promise>; + + /** + * Creates a single-use login link for an Express account to access their Stripe dashboard. + * You may only create login links for Express accounts connected to your platform. + * Returns a login link object if the call succeeded. + */ + createLoginLink(accId: string, response?: IResponseFn): Promise; + createLoginLink(accId: string, redirectUrl?: string, response?: IResponseFn): Promise; } class ApplicationFees extends StripeResource { @@ -7499,6 +7512,7 @@ declare namespace Stripe { */ starting_after?: string; } + interface IListOptionsCreated extends IListOptions { /** * A filter on the list based on the object created field. The value can be a string with an integer Unix timestamp, or it can diff --git a/types/stripe/stripe-tests.ts b/types/stripe/stripe-tests.ts index a7d0e5c45c..30e454f6dc 100644 --- a/types/stripe/stripe-tests.ts +++ b/types/stripe/stripe-tests.ts @@ -725,6 +725,20 @@ stripe.accounts.retrieve("acct_17wV8KBoqMA9o2xk").then( const payouts_enabled: boolean = accounts.payouts_enabled; } ); +stripe.accounts.createLoginLink("acct_17wV8KBoqMA9o2xk").then( + (loginLink) => { + const object: string = loginLink.object; + const created: number = loginLink.created; + const url: string = loginLink.url; + } +); +stripe.accounts.createLoginLink("acct_17wV8KBoqMA9o2xk", "http://localhost:3000").then( + (loginLink) => { + const object: string = loginLink.object; + const created: number = loginLink.created; + const url: string = loginLink.url; + } +); //#endregion //#region Application Fee Refunds tests