diff --git a/src/shared.ts b/src/shared.ts index bd97518..cb6d2eb 100644 --- a/src/shared.ts +++ b/src/shared.ts @@ -36,7 +36,8 @@ export type ConnectElementHTMLName = | "stripe-connect-balances" | "stripe-connect-payouts-list" | "stripe-connect-app-install" - | "stripe-connect-app-viewport"; + | "stripe-connect-app-viewport" + | "stripe-connect-reporting-chart"; export const componentNameMapping: Record< ConnectElementTagName, @@ -66,7 +67,8 @@ export const componentNameMapping: Record< balances: "stripe-connect-balances", "payouts-list": "stripe-connect-payouts-list", "app-install": "stripe-connect-app-install", - "app-viewport": "stripe-connect-app-viewport" + "app-viewport": "stripe-connect-app-viewport", + "reporting-chart": "stripe-connect-reporting-chart" }; type StripeConnectInstanceExtended = StripeConnectInstance & { diff --git a/types/config.ts b/types/config.ts index 42e6e23..1f6b78d 100644 --- a/types/config.ts +++ b/types/config.ts @@ -49,6 +49,10 @@ export type FinancingProductType = { export type FinancingPromotionLayoutType = "full" | "banner"; +export type IntervalType = 'day' | 'week' | 'month' | 'quarter' | 'year'; + +export type ReportName = 'gross_volume' | 'net_volume'; + export type EmbeddedErrorType = /** * Failure to connect to Stripe's API. @@ -196,5 +200,11 @@ export const ConnectElementCustomMethodConfig = { setEligibilityCriteriaUrl: ( _eligibilityCriteriaUrl: string | undefined ): void => {} - } + }, + "reporting-chart": { + setReportName: (_reportName: ReportName): void => {}, + setIntervalStart: (_intervalStart: Date | undefined): void => {}, + setIntervalEnd: (_intervalEnd: Date | undefined): void => {}, + setIntervalType: (_intervalType: IntervalType | undefined): void => {}, + }, }; diff --git a/types/shared.d.ts b/types/shared.d.ts index 23419a3..8bbb93b 100644 --- a/types/shared.d.ts +++ b/types/shared.d.ts @@ -473,4 +473,5 @@ export type ConnectElementTagName = | "balances" | "payouts-list" | "app-install" - | "app-viewport"; + | "app-viewport" + | "reporting-chart";