Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8138110
Add shouldApplyCashbackToBill field to ExpensifyCardSettingsBase type
allgandalf Apr 15, 2026
8648e3b
Create ToggleCardCashbackToBillParams API parameter type
allgandalf Apr 15, 2026
104faba
Register TOGGLE_CARD_CASHBACK_TO_BILL write command
allgandalf Apr 15, 2026
090e40e
Add toggleCashbackToBill action function
allgandalf Apr 15, 2026
fb6801e
Add cashback-to-bill translations for en and es
allgandalf Apr 15, 2026
3309561
Add cashback-to-bill toggle to workspace card settings page
allgandalf Apr 15, 2026
00dbe09
Fix curly quote syntax error in en.ts translations
allgandalf Apr 20, 2026
7725780
Add pendingFields to toggleCashbackToBill to drive OfflineWithFeedback
allgandalf Apr 20, 2026
1db74a4
Add cashback toggle translations for de
allgandalf Apr 20, 2026
7cee725
Add cashback toggle translations for fr
allgandalf Apr 20, 2026
cd66006
Add cashback toggle translations for it
allgandalf Apr 20, 2026
e60af3f
Add cashback toggle translations for ja
allgandalf Apr 20, 2026
1198b6d
Add cashback toggle translations for nl
allgandalf Apr 20, 2026
929c840
Add cashback toggle translations for pl
allgandalf Apr 20, 2026
121c2ae
Add cashback toggle translations for pt-BR
allgandalf Apr 20, 2026
2f25c7c
Add cashback toggle translations for zh-hans
allgandalf Apr 20, 2026
479c13d
Merge remote-tracking branch 'upstream/main' into toggle-card-cashbac…
allgandalf Apr 29, 2026
373653b
Add error feedback to toggleCashbackToBill failure path
allgandalf Apr 29, 2026
1e827f5
Merge branch 'Expensify:main' into toggle-card-cashback-to-bill
allgandalf May 4, 2026
d301b09
Use ToggleSettingOptionRow's built-in OfflineWithFeedback for cashbac…
allgandalf May 4, 2026
fe72e7f
Merge branch 'toggle-card-cashback-to-bill' of https://github.com/all…
allgandalf May 4, 2026
1e3c4d6
Merge branch 'Expensify:main' into toggle-card-cashback-to-bill
allgandalf May 5, 2026
2e26f9b
Add onCloseError handler to dismiss cashback toggle errors
allgandalf May 5, 2026
b08f45a
Merge branch 'toggle-card-cashback-to-bill' of https://github.com/all…
allgandalf May 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5387,6 +5387,8 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU
settlementFrequencyDescription: 'Wählen Sie, wie oft Sie den Saldo Ihrer Expensify Karte begleichen.',
settlementFrequencyInfo:
'Wenn du zur monatlichen Abrechnung wechseln möchtest, musst du dein Bankkonto über Plaid verbinden und eine positive Kontohistorie der letzten 90 Tage haben.',
applyCashbackToBill: 'Cashback auf meine Expensify-Rechnung anwenden',
applyCashbackToBillDescription: 'Das Cashback von der Expensify-Karte wird zur Begleichung deiner Expensify-Rechnung verwendet.',
frequency: {
daily: 'Täglich',
monthly: 'Monatlich',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5395,6 +5395,8 @@ const translations = {
settlementFrequency: 'Settlement frequency',
settlementFrequencyDescription: 'Choose how often you’ll pay your Expensify Card balance.',
settlementFrequencyInfo: 'If you’d like to switch to monthly settlement, you’ll need to connect your bank account via Plaid and have a positive 90-day balance history.',
applyCashbackToBill: 'Apply cash back to my Expensify bill',
applyCashbackToBillDescription: 'Cash back from the Expensify Card will be used towards payment for your Expensify bill.',
Comment thread
allgandalf marked this conversation as resolved.
frequency: {
daily: 'Daily',
monthly: 'Monthly',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5258,6 +5258,8 @@ ${amount} para ${merchant} - ${date}`,
settlementFrequencyDescription: 'Elige con qué frecuencia pagarás el saldo de tu Tarjeta Expensify',
settlementFrequencyInfo:
'Si deseas cambiar a la liquidación mensual, deberás conectar tu cuenta bancaria a través de Plaid y tener un historial de saldo positivo en los últimos 90 días.',
applyCashbackToBill: 'Aplicar reembolso a mi factura de Expensify',
applyCashbackToBillDescription: 'El reembolso de la Tarjeta Expensify se utilizará para el pago de tu factura de Expensify.',
frequency: {
daily: 'Cada día',
monthly: 'Mensual',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5396,6 +5396,8 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
settlementFrequencyDescription: 'Choisissez la fréquence à laquelle vous réglerez le solde de votre Carte Expensify.',
settlementFrequencyInfo:
'Si vous souhaitez passer à un règlement mensuel, vous devrez connecter votre compte bancaire via Plaid et disposer d’un historique de solde positif sur 90 jours.',
applyCashbackToBill: 'Appliquer le cashback à ma facture Expensify',
applyCashbackToBillDescription: 'Le cashback de la carte Expensify sera utilisé pour le paiement de votre facture Expensify.',
frequency: {
daily: 'Quotidien',
monthly: 'Mensuel',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5367,6 +5367,8 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
settlementFrequencyDescription: 'Scegli con quale frequenza pagherai il saldo della tua Carta Expensify.',
settlementFrequencyInfo:
'Se desideri passare alla liquidazione mensile, dovrai collegare il tuo conto bancario tramite Plaid e avere uno storico del saldo positivo di 90 giorni.',
applyCashbackToBill: 'Applica il cashback alla mia fattura Expensify',
applyCashbackToBillDescription: 'Il cashback della Carta Expensify verrà utilizzato per il pagamento della tua fattura Expensify.',
frequency: {
daily: 'Quotidiano',
monthly: 'Mensile',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5317,6 +5317,8 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
settlementFrequency: '清算頻度',
settlementFrequencyDescription: 'Expensify カードの残高を支払う頻度を選択してください。',
settlementFrequencyInfo: '月次清算に切り替えるには、Plaid を通じて銀行口座を連携し、直近90日間の残高履歴がプラスである必要があります。',
applyCashbackToBill: 'キャッシュバックを Expensify 請求書に適用する',
applyCashbackToBillDescription: 'Expensify カードのキャッシュバックは、Expensify 請求書の支払いに使用されます。',
frequency: {
daily: '毎日',
monthly: '毎月',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5359,6 +5359,8 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_
settlementFrequency: 'Uitbetalingsfrequentie',
settlementFrequencyDescription: 'Kies hoe vaak je het saldo van je Expensify Kaart betaalt.',
settlementFrequencyInfo: 'Als je wilt overschakelen naar maandelijkse afrekening, moet je je bankrekening koppelen via Plaid en een positieve saldohistorie van 90 dagen hebben.',
applyCashbackToBill: 'Cashback toepassen op mijn Expensify-factuur',
applyCashbackToBillDescription: 'De cashback van de Expensify Kaart wordt gebruikt voor het betalen van je Expensify-factuur.',
frequency: {
daily: 'Dagelijks',
monthly: 'Maandelijks',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5347,6 +5347,8 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy
settlementFrequency: 'Częstotliwość rozliczeń',
settlementFrequencyDescription: 'Wybierz, jak często będziesz spłacać saldo swojej Karty Expensify.',
settlementFrequencyInfo: 'Jeśli chcesz przejść na miesięczne rozliczenie, musisz podłączyć swoje konto bankowe przez Plaid i mieć dodatnią historię salda z ostatnich 90 dni.',
applyCashbackToBill: 'Zastosuj zwrot gotówki do mojego rachunku Expensify',
applyCashbackToBillDescription: 'Zwrot gotówki z Karty Expensify zostanie wykorzystany do opłacenia Twojego rachunku Expensify.',
frequency: {
daily: 'Codziennie',
monthly: 'Miesięcznie',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5350,6 +5350,8 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS
settlementFrequency: 'Frequência de liquidação',
settlementFrequencyDescription: 'Escolha com que frequência você vai pagar o saldo do seu Cartão Expensify.',
settlementFrequencyInfo: 'Se quiser mudar para liquidação mensal, você precisará conectar sua conta bancária via Plaid e ter um histórico de saldo positivo de 90 dias.',
applyCashbackToBill: 'Aplicar reembolso à minha fatura do Expensify',
applyCashbackToBillDescription: 'O reembolso do Cartão Expensify será usado para o pagamento da sua fatura do Expensify.',
frequency: {
daily: 'Diariamente',
monthly: 'Mensal',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5232,6 +5232,8 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
settlementFrequency: '结算频率',
settlementFrequencyDescription: '选择支付 Expensify 卡余额的频率。',
settlementFrequencyInfo: '如果你想切换为按月结算,你需要通过 Plaid 连接你的银行账户,并且拥有过去 90 天为正数的余额记录。',
applyCashbackToBill: '将返现用于抵扣我的 Expensify 账单',
applyCashbackToBillDescription: 'Expensify 卡的返现将用于支付你的 Expensify 账单。',
frequency: {
daily: '每日',
monthly: '每月',
Expand Down
6 changes: 6 additions & 0 deletions src/libs/API/parameters/ToggleCardCashbackToBillParams.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type ToggleCardCashbackToBillParams = {
workspaceAccountID: number;
Comment thread
allgandalf marked this conversation as resolved.
shouldApplyCashbackToBill: boolean;
};

export default ToggleCardCashbackToBillParams;
1 change: 1 addition & 0 deletions src/libs/API/parameters/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ export type {default as SetPolicyCategoryTaxParams} from './SetPolicyCategoryTax
export type {default as SetPolicyCategoryMaxAmountParams} from './SetPolicyCategoryMaxAmountParams';
export type {default as EnablePolicyCompanyCardsParams} from './EnablePolicyCompanyCardsParams';
export type {default as ToggleCardContinuousReconciliationParams} from './ToggleCardContinuousReconciliationParams';
export type {default as ToggleCardCashbackToBillParams} from './ToggleCardCashbackToBillParams';
export type {default as SetCardReconciliationBankAccountParams} from './SetCardReconciliationBankAccountParams';
export type {default as CardDeactivateParams} from './CardDeactivateParams';
export type {default as UpdateExpensifyCardLimitTypeParams} from './UpdateExpensifyCardLimitTypeParams';
Expand Down
2 changes: 2 additions & 0 deletions src/libs/API/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ const WRITE_COMMANDS = {
REMOVE_DELEGATE: 'RemoveDelegate',
UPDATE_DELEGATE_ROLE: 'UpdateDelegateRole',
TOGGLE_CARD_CONTINUOUS_RECONCILIATION: 'ToggleCardContinuousReconciliation',
TOGGLE_CARD_CASHBACK_TO_BILL: 'ToggleCardCashbackToBill',
SET_CARD_RECONCILIATION_BANK_ACCOUNT: 'SetCardReconciliationBankAccount',
SET_POLICY_TAG_APPROVER: 'SetPolicyTagApprover',
SAVE_SEARCH: 'SaveSearch',
Expand Down Expand Up @@ -1105,6 +1106,7 @@ type WriteCommandParameters = {
[WRITE_COMMANDS.UPDATE_DELEGATE_ROLE]: Parameters.UpdateDelegateRoleParams;
[WRITE_COMMANDS.REMOVE_DELEGATE]: Parameters.RemoveDelegateParams;
[WRITE_COMMANDS.TOGGLE_CARD_CONTINUOUS_RECONCILIATION]: Parameters.ToggleCardContinuousReconciliationParams;
[WRITE_COMMANDS.TOGGLE_CARD_CASHBACK_TO_BILL]: Parameters.ToggleCardCashbackToBillParams;
[WRITE_COMMANDS.SET_CARD_RECONCILIATION_BANK_ACCOUNT]: Parameters.SetCardReconciliationBankAccountParams;
[WRITE_COMMANDS.SAVE_SEARCH]: Parameters.SaveSearchParams;
[WRITE_COMMANDS.DELETE_SAVED_SEARCH]: Parameters.DeleteSavedSearchParams;
Expand Down
9 changes: 5 additions & 4 deletions src/libs/CardUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import type {
CurrencyList,
ExpensifyCardSettings,
ExpensifyCardSettingsBase,
NestedExpensifyCardSettings,
PersonalDetailsList,
Policy,
PolicyConnectionName,
Expand Down Expand Up @@ -1257,17 +1258,17 @@ function getCardProgramKey(cardSettings: OnyxEntry<ExpensifyCardSettings>): Card
});
}

function getCardSettings(cardSettings: OnyxEntry<ExpensifyCardSettings>, programKey?: CardProgramKey): ExpensifyCardSettingsBase | undefined {
function getCardSettings(cardSettings: OnyxEntry<ExpensifyCardSettings>, programKey?: CardProgramKey): NestedExpensifyCardSettings | undefined {
if (!cardSettings) {
return undefined;
}

const getMergedProgramSettings = (key: CardProgramKey): ExpensifyCardSettingsBase | undefined => {
const getMergedProgramSettings = (key: CardProgramKey): NestedExpensifyCardSettings | undefined => {
const programSettings = cardSettings[key];
if (programSettings && typeof programSettings === 'object' && !Array.isArray(programSettings)) {
// Nested program values take precedence — they are the authoritative source for
// program-specific fields (e.g. paymentBankAccountID, monthlySettlementDate).
return {...cardSettings, ...programSettings} as ExpensifyCardSettingsBase;
return {...cardSettings, ...programSettings} as NestedExpensifyCardSettings;
}
return undefined;
};
Expand All @@ -1285,7 +1286,7 @@ function getCardSettings(cardSettings: OnyxEntry<ExpensifyCardSettings>, program
getMergedProgramSettings(CONST.COUNTRY.US) ??
getMergedProgramSettings(CONST.EXPENSIFY_CARD.CARD_PROGRAM.CURRENT) ??
getMergedProgramSettings(CONST.COUNTRY.GB) ??
(cardSettings as ExpensifyCardSettingsBase)
(cardSettings as NestedExpensifyCardSettings)
);
}

Expand Down
48 changes: 48 additions & 0 deletions src/libs/actions/Card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,52 @@ function updateSettlementFrequency(
API.write(WRITE_COMMANDS.UPDATE_CARD_SETTLEMENT_FREQUENCY, parameters, {optimisticData, successData, failureData});
}

function toggleCashbackToBill(workspaceAccountID: number, programKey: CardProgramKey, shouldApplyCashbackToBill: boolean, currentValue?: boolean) {
const optimisticValue = {
[programKey]: {shouldApplyCashbackToBill, pendingFields: {shouldApplyCashbackToBill: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE}},
Comment thread
allgandalf marked this conversation as resolved.
};
const successValue = {[programKey]: {shouldApplyCashbackToBill, pendingFields: {shouldApplyCashbackToBill: null}}};
Comment thread
allgandalf marked this conversation as resolved.
const failureValue = {
[programKey]: {shouldApplyCashbackToBill: currentValue ?? true, pendingFields: {shouldApplyCashbackToBill: null}},
errors: ErrorUtils.getMicroSecondOnyxErrorWithTranslationKey('common.genericErrorMessage'),
};

const optimisticData: Array<OnyxUpdate<typeof ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_SETTINGS>> = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_SETTINGS}${workspaceAccountID}`,
value: optimisticValue,
},
];
Comment thread
allgandalf marked this conversation as resolved.

const successData: Array<OnyxUpdate<typeof ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_SETTINGS>> = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_SETTINGS}${workspaceAccountID}`,
value: successValue,
},
];

const failureData: Array<OnyxUpdate<typeof ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_SETTINGS>> = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_SETTINGS}${workspaceAccountID}`,
value: failureValue,
},
];

const parameters = {
workspaceAccountID,
shouldApplyCashbackToBill,
};

API.write(WRITE_COMMANDS.TOGGLE_CARD_CASHBACK_TO_BILL, parameters, {optimisticData, successData, failureData});
}

function clearCashbackToBillError(workspaceAccountID: number) {
Onyx.merge(`${ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_SETTINGS}${workspaceAccountID}`, {errors: null});
}

function updateSettlementAccount(
domainName: string,
workspaceAccountID: number,
Expand Down Expand Up @@ -1860,6 +1906,8 @@ export {
unassignCard,
updateAssignedCardName,
updateAssignedCardTransactionStartDate,
toggleCashbackToBill,
clearCashbackToBillError,
toggleContinuousReconciliation,
setCardReconciliationAccount,
updateExpensifyCardLimitType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ import TextLink from '@components/TextLink';
import useDefaultFundID from '@hooks/useDefaultFundID';
import useLocalize from '@hooks/useLocalize';
import useOnyx from '@hooks/useOnyx';
import usePrivateSubscription from '@hooks/usePrivateSubscription';
import useThemeStyles from '@hooks/useThemeStyles';
import {clearCashbackToBillError, toggleCashbackToBill} from '@libs/actions/Card';
import {getLastFourDigits} from '@libs/BankAccountUtils';
import {getCardSettings} from '@libs/CardUtils';
import {getCardProgramKey, getCardSettings} from '@libs/CardUtils';
import type {PlatformStackScreenProps} from '@libs/Navigation/PlatformStackNavigation/types';
import {isSubscriptionTypeOfInvoicing} from '@libs/SubscriptionUtils';
import Navigation from '@navigation/Navigation';
import type {SettingsNavigatorParamList} from '@navigation/types';
import AccessOrNotFoundWrapper from '@pages/workspace/AccessOrNotFoundWrapper';
import ToggleSettingOptionRow from '@pages/workspace/workflows/ToggleSettingsOptionRow';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
Expand All @@ -32,6 +36,11 @@ function WorkspaceCardSettingsPage({route}: WorkspaceCardSettingsPageProps) {
const [bankAccountList] = useOnyx(ONYXKEYS.BANK_ACCOUNT_LIST);
const [cardSettings] = useOnyx(`${ONYXKEYS.COLLECTION.PRIVATE_EXPENSIFY_CARD_SETTINGS}${defaultFundID}`);
Comment thread
allgandalf marked this conversation as resolved.
const settings = getCardSettings(cardSettings);
const programKey = getCardProgramKey(cardSettings);
const privateSubscription = usePrivateSubscription();
const isUSProgram = programKey === CONST.COUNTRY.US || programKey === CONST.EXPENSIFY_CARD.CARD_PROGRAM.CURRENT;
const shouldShowCashbackToggle = isUSProgram && !isSubscriptionTypeOfInvoicing(privateSubscription?.type);
Comment thread
allgandalf marked this conversation as resolved.
const shouldApplyCashbackToBill = settings?.shouldApplyCashbackToBill ?? true;
Comment thread
allgandalf marked this conversation as resolved.

const paymentBankAccountID = settings?.paymentBankAccountID;
const paymentBankAccountNumber = settings?.paymentBankAccountNumber;
Expand Down Expand Up @@ -88,6 +97,25 @@ function WorkspaceCardSettingsPage({route}: WorkspaceCardSettingsPageProps) {
}
/>
</OfflineWithFeedback>
{shouldShowCashbackToggle && (
<ToggleSettingOptionRow
title={translate('workspace.expensifyCard.applyCashbackToBill')}
subtitle={translate('workspace.expensifyCard.applyCashbackToBillDescription')}
switchAccessibilityLabel={translate('workspace.expensifyCard.applyCashbackToBill')}
isActive={shouldApplyCashbackToBill}
shouldPlaceSubtitleBelowSwitch
wrapperStyle={[styles.mv3, styles.mh5]}
pendingAction={settings?.pendingFields?.shouldApplyCashbackToBill}
errors={settings?.errors}
onCloseError={() => clearCashbackToBillError(defaultFundID)}
onToggle={(isEnabled: boolean) => {
if (!programKey) {
return;
}
toggleCashbackToBill(defaultFundID, programKey, isEnabled, settings?.shouldApplyCashbackToBill);
}}
/>
)}
</View>
</ScrollView>
</ScreenWrapper>
Expand Down
16 changes: 11 additions & 5 deletions src/types/onyx/ExpensifyCardSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ type ExpensifyCardSettingsBase = {
/** Number of the bank account used for the card settlement */
paymentBankAccountNumber?: string;

/** Whether Expensify Card cash back should be applied toward payment of the Expensify bill */
shouldApplyCashbackToBill?: boolean;

/** Collections of form field errors */
errorFields?: OnyxCommon.ErrorFields;

Expand Down Expand Up @@ -104,6 +107,9 @@ type ExpensifyCardRule = OnyxCommon.OnyxValueWithOfflineFeedback<{
action: ValueOf<typeof CONST.SPEND_RULES.ACTION>;
}>;

/** Nested program settings with offline feedback support for optimistic updates */
type NestedExpensifyCardSettings = OnyxCommon.OnyxValueWithOfflineFeedback<ExpensifyCardSettingsBase>;

/** Model of Expensify card settings for a workspace - can have nested feed types from backend */
type ExpensifyCardSettings = OnyxCommon.OnyxValueWithOfflineFeedback<
ExpensifyCardSettingsBase & {
Expand All @@ -112,25 +118,25 @@ type ExpensifyCardSettings = OnyxCommon.OnyxValueWithOfflineFeedback<
/**
*
*/
US?: ExpensifyCardSettingsBase;
US?: NestedExpensifyCardSettings;
/** Nested settings for pre-2024 US card program from backend */

/**
*
*/
CURRENT?: ExpensifyCardSettingsBase;
CURRENT?: NestedExpensifyCardSettings;
/** Nested settings for UK/EU card program from backend */

/**
*
*/
GB?: ExpensifyCardSettingsBase;
GB?: NestedExpensifyCardSettings;
/** Nested Travel Invoicing settings from backend */

/**
*
*/
TRAVEL_US?: ExpensifyCardSettingsBase;
TRAVEL_US?: NestedExpensifyCardSettings;

/** Spend rules for the feed keyed by rule ID - stringified JSON of ExpensifyCardRule */
cardRules?: Record<string, ExpensifyCardRule>;
Expand All @@ -141,4 +147,4 @@ type ExpensifyCardSettings = OnyxCommon.OnyxValueWithOfflineFeedback<
>;

export default ExpensifyCardSettings;
export type {ExpensifyCardSettingsBase, ExpensifyCardRule, ExpensifyCardRuleFilter};
export type {ExpensifyCardSettingsBase, NestedExpensifyCardSettings, ExpensifyCardRule, ExpensifyCardRuleFilter};
Loading
Loading