Skip to content

Commit

Permalink
Add reporting chart beta component (#159)
Browse files Browse the repository at this point in the history
* Add beta reporting chart component

* Add setters for reporting-chart component
  • Loading branch information
neerajsamtani-stripe authored Oct 3, 2024
1 parent 8de9009 commit 154918b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 & {
Expand Down
12 changes: 11 additions & 1 deletion types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 => {},
},
};
3 changes: 2 additions & 1 deletion types/shared.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -473,4 +473,5 @@ export type ConnectElementTagName =
| "balances"
| "payouts-list"
| "app-install"
| "app-viewport";
| "app-viewport"
| "reporting-chart";

0 comments on commit 154918b

Please sign in to comment.