From a960402a92594837b3b2af7068b9579ded5742c2 Mon Sep 17 00:00:00 2001 From: kostas-stripe <115740263+kostas-stripe@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:18:00 -0400 Subject: [PATCH] add recipients component to connect-js (#179) * changes * more * fix style issue * make strong type --- src/shared.ts | 2 ++ types/config.ts | 5 +++++ types/shared.d.ts | 1 + 3 files changed, 8 insertions(+) diff --git a/src/shared.ts b/src/shared.ts index cb6d2eb..a2d2336 100644 --- a/src/shared.ts +++ b/src/shared.ts @@ -26,6 +26,7 @@ export type ConnectElementHTMLName = | "stripe-connect-issuing-cards-list" | "stripe-connect-financial-account" | "stripe-connect-financial-account-transactions" + | "stripe-connect-recipients" | "stripe-connect-capital-financing" | "stripe-connect-capital-financing-application" | "stripe-connect-capital-financing-promotion" @@ -54,6 +55,7 @@ export const componentNameMapping: Record< "issuing-card": "stripe-connect-issuing-card", "issuing-cards-list": "stripe-connect-issuing-cards-list", "financial-account": "stripe-connect-financial-account", + recipients: "stripe-connect-recipients", "financial-account-transactions": "stripe-connect-financial-account-transactions", "capital-financing": "stripe-connect-capital-financing", diff --git a/types/config.ts b/types/config.ts index 499c9df..b032937 100644 --- a/types/config.ts +++ b/types/config.ts @@ -53,6 +53,8 @@ export type IntervalType = "day" | "week" | "month" | "quarter" | "year"; export type ReportName = "gross_volume" | "net_volume"; +export type RecipientDataSource = "customers"; + export type EmbeddedErrorType = /** * Failure to connect to Stripe's API. @@ -147,6 +149,9 @@ export const ConnectElementCustomMethodConfig = { "financial-account-transactions": { setFinancialAccount: (_financialAccount: string): void => {} }, + recipients: { + setDataSource: (_dataSource: RecipientDataSource): void => {} + }, "app-install": { setApp: (_app: string | undefined): void => {}, setOnAppInstallStateFetched: ( diff --git a/types/shared.d.ts b/types/shared.d.ts index 8bbb93b..6be45e2 100644 --- a/types/shared.d.ts +++ b/types/shared.d.ts @@ -463,6 +463,7 @@ export type ConnectElementTagName = | "issuing-cards-list" | "financial-account" | "financial-account-transactions" + | "recipients" | "capital-financing" | "capital-financing-application" | "capital-financing-promotion"