@@ -35,6 +35,17 @@ import type {
3535} from '@src/types/onyx/SearchResults' ;
3636import type Transaction from '@src/types/onyx/Transaction' ;
3737
38+ type SearchListActionProps = {
39+ /** The last payment method used per policy */
40+ lastPaymentMethod ?: OnyxEntry < LastPaymentMethod > ;
41+ /** The user's personal policy ID */
42+ personalPolicyID ?: string ;
43+ /** Billing grace period end dates for workspace owners (shared across all list items) */
44+ userBillingGracePeriodEnds ?: OnyxCollection < BillingGraceEndPeriod > ;
45+ /** The workspace owner's billing grace period end date */
46+ ownerBillingGracePeriodEnd ?: OnyxEntry < number > ;
47+ } ;
48+
3849type ChatListItemProps < TItem extends ListItem > = ListItemProps < TItem > & {
3950 queryJSONHash ?: number ;
4051
@@ -54,25 +65,14 @@ type ChatListItemProps<TItem extends ListItem> = ListItemProps<TItem> & {
5465 userBillingFundID : number | undefined ;
5566} ;
5667
57- type ExpenseReportListItemProps < TItem extends ListItem > = ListItemProps < TItem > & {
58- /** The visible columns for the report */
59- columns ?: SearchColumnType [ ] ;
60-
61- /** Whether the item's action is loading */
62- isLoading ?: boolean ;
63-
64- /** The last payment method used per policy */
65- lastPaymentMethod ?: OnyxEntry < LastPaymentMethod > ;
66-
67- /** The user's personal policy ID */
68- personalPolicyID ?: string ;
69-
70- /** Billing grace period end dates for workspace owners (shared across all list items) */
71- userBillingGracePeriodEnds ?: OnyxCollection < BillingGraceEndPeriod > ;
68+ type ExpenseReportListItemProps < TItem extends ListItem > = ListItemProps < TItem > &
69+ SearchListActionProps & {
70+ /** The visible columns for the report */
71+ columns ?: SearchColumnType [ ] ;
7272
73- /** The workspace owner 's billing grace period end date */
74- ownerBillingGracePeriodEnd ?: OnyxEntry < number > ;
75- } ;
73+ /** Whether the item 's action is loading */
74+ isLoading ?: boolean ;
75+ } ;
7676
7777type TransactionListItemType = ListItem &
7878 Transaction & {
@@ -417,31 +417,25 @@ type TransactionQuarterGroupListItemType = TransactionGroupListItemType & {group
417417 sortKey : number ;
418418 } ;
419419
420- type TransactionListItemProps < TItem extends ListItem > = ListItemProps < TItem > & {
421- /** Whether the item's action is loading */
422- isLoading ?: boolean ;
423- columns ?: SearchColumnType [ ] ;
424- violations ?: Record < string , TransactionViolations | undefined > | undefined ;
425- customCardNames ?: Record < number , string > ;
426- /** The last payment method used per policy */
427- lastPaymentMethod ?: OnyxEntry < LastPaymentMethod > ;
428- /** The user's personal policy ID */
429- personalPolicyID ?: string ;
430- } ;
420+ type TransactionListItemProps < TItem extends ListItem > = ListItemProps < TItem > &
421+ SearchListActionProps & {
422+ /** Whether the item's action is loading */
423+ isLoading ?: boolean ;
424+ columns ?: SearchColumnType [ ] ;
425+ violations ?: Record < string , TransactionViolations | undefined > | undefined ;
426+ customCardNames ?: Record < number , string > ;
427+ } ;
431428
432- type TransactionGroupListItemProps < TItem extends ListItem > = ListItemProps < TItem > & {
433- groupBy ?: SearchGroupBy ;
434- searchType ?: SearchDataTypes ;
435- policies ?: OnyxCollection < Policy > ;
436- accountID ?: number ;
437- columns ?: SearchColumnType [ ] ;
438- newTransactionID ?: string ;
439- violations ?: Record < string , TransactionViolations | undefined > | undefined ;
440- /** The last payment method used per policy */
441- lastPaymentMethod ?: OnyxEntry < LastPaymentMethod > ;
442- /** The user's personal policy ID */
443- personalPolicyID ?: string ;
444- } ;
429+ type TransactionGroupListItemProps < TItem extends ListItem > = ListItemProps < TItem > &
430+ SearchListActionProps & {
431+ groupBy ?: SearchGroupBy ;
432+ searchType ?: SearchDataTypes ;
433+ policies ?: OnyxCollection < Policy > ;
434+ accountID ?: number ;
435+ columns ?: SearchColumnType [ ] ;
436+ newTransactionID ?: string ;
437+ violations ?: Record < string , TransactionViolations | undefined > | undefined ;
438+ } ;
445439
446440type TransactionGroupListExpandedProps < TItem extends ListItem > = Pick <
447441 TransactionGroupListItemProps < TItem > ,
@@ -467,6 +461,7 @@ type UnreportedExpenseListItemType = Transaction & {
467461} ;
468462
469463export type {
464+ SearchListActionProps ,
470465 ChatListItemProps ,
471466 ExpenseReportListItemProps ,
472467 TransactionReportGroupListItemType ,
0 commit comments