Feature Slices

All feature slices live under src/app/core/pyb/features/ and are wired up by FeaturesModule. Entity-backed collections are documented separately in Entity Slices.

balance

Key

balance

Module

BalanceFeatureModule

Purpose

The supplier’s currently available balance.

Actions

loadBalance, loadBalanceSuccess, loadBalanceFailed

loadBalance() is dispatched from AuthEffects.loadUser$ at session start and again after any operation that moves money — advance withdrawals, instant transfers, card funding.

paymentMethods

Key

paymentMethods

Module

PaymentMethodsFeatureModule

Purpose

Configured payout methods, including prepaid cards, plus the Seller Card request/activate lifecycle.

Actions:

Group Actions

Load

loadPaymentMethods, loadPaymentMethodsSuccess, loadPaymentMethodsFailed

Trial days

loadPaymentTrialDays, loadPaymentTrialDaysSuccess, loadPaymentTrialDaysFailed

Mutate

savePaymentMethod, savePaymentMethodSuccess, savePaymentMethodFailed, updatePaymentMethod, replacePaymentMethod, removePaymentMethod, makePaymentMethodAsDefault

UI

openAddPaymentMethodModal

Seller Card

sellerCardRequest, sellerCardSuccessResponse, sellerCardErrorResponse, sellerCardActivate, sellerCardActivateSuccess, sellerCardActivateFailed

Key selectors: selectIsPaymentMethodsLoaded, selectPaymentsMethodLoading, selectPcardsPaymentMethods — all three are read by SellerCardListGuard.

The Marqeta Seller Card lives in this slice because it is modelled as a payment method. Airwallex cards are a separate slice (airwallexCards) because they came from a different provider integration. See Seller Card.

personalInformation

Key

personalInformation

Module

PersonalInformationFeatureModule

Purpose

Name, date of birth, phone, email, tax id, residential address.

Actions

updatePersonalInformation, loadedPersonalInformation, updatedPersonalInformation

businessInformation

Key

businessInformation

Module

BusinessInformationFeatureModule

Purpose

Legal name, business type, incorporation state, owner SSN, EIN, established date, business address.

Actions

updateBusinessInformation, loadedBusinessInformation, updatedBusinessInformation

Both information slices feed the Seller Card US-residency check — see Permissions System.

plaid

Key

plaid

Module

PlaidFeatureModule

Purpose

Plaid Link session and token exchange.

Actions

savePlaidToken, savePlaidTokenSuccess, savePlaidTokenFailed, savePlaidTokenRefresh

savePlaidTokenRefresh handles the re-authentication path when an existing item loses its connection. See Plaid.

2fa

Key

2fa

Module

TwoFactorAuthenticationFeatureModule

Purpose

Authy enrolment and SMS challenge state.

Fully documented in Two-Factor Authentication.

advanceLine and advanceLineOffers

AdvanceLineFeatureModule registers two slices.

Key

advanceLine (from summary/summary.reducer.ts)

Purpose

Advance Line summary — current amount, outstanding amount, expiration, status.

Actions

loadSummary, loadSummarySuccess, loadSummaryFailure, advanceLineWithdrawSuccess

Key

advanceLineOffers (from offers/offers.reducer.ts)

Purpose

Available draw offers and their terms.

Actions

loadOffers, loadOffersSuccess, loadOffersFailure, clearOffers, withdrawOffer

advanceLineWithdrawSuccess is dispatched by DocusignVerificationService after a confirmed withdrawal, alongside loadBalance, loadSummary, fetchSupplierMarketplaces and userStatusUpdateRequested. See Advance Line.

instantAdvance

Key

instantAdvance

Module

InstantAdvanceFeatureModule

Purpose

Instant Advance product data.

Actions

loadInstantAdvance, loadHttpInstantAdvance, loadCacheInstantAdvance, resetCacheInstantAdvance, loadInstantAdvanceSuccess, loadInstantAdvanceFailure

The slice implements a small cache: loadInstantAdvance decides between loadCacheInstantAdvance (serve what is already in the store) and loadHttpInstantAdvance (fetch). resetCacheInstantAdvance invalidates it after a mutation.

instantAdvanceRepayment

Key

instantAdvanceRepayment

Module

InstantAdvanceRepaymentModule

Purpose

Repayment schedule and history for the active Instant Advance.

Actions

loadInstantAdvanceRepayments, loadInstantAdvanceRepaymentsSuccess, loadInstantAdvanceRepaymentsError

fees

Key

fees

Module

FeesStoreModule

Purpose

The fee schedule used by fee displays and the fee report.

Actions

fetchFees, fetchFeesSuccess, fetchFeesError

fetchFees() is dispatched once from GlobalSubscriptionsService.init(). FeesScheduleHelperService derives display values from the slice.

dashboardNotifications

Key

dashboardNotifications

Module

DashboardNotificationsFeatureModule

Purpose

Server-driven notifications rendered as CTA cards or auto-opened modals.

Actions:

Group Actions

Load

fetchDashboardNotifications, loadedDashboardNotifications, updatedDashboardNotifications, clearDashboardNotifications

Visibility

visitedDashboardNotifications, hideDashboardNotifications, showDashboardNotifications

Decline

declineDashboardNotifications, declineDashboardNotificationsSuccess, declineDashboardNotificationsError

Accept

acceptDashboardNotifications, acceptDashboardNotificationsSuccess, acceptDashboardNotificationsError

Other

enableOpenInvoices, deleteNotification

Accept and decline payloads accept a silent flag that suppresses the success modal — used when several notifications are resolved by one dialog. See Dashboard Notifications & CTAs.

blog

Key

blog

Module

BlogStoreModule

Purpose

CMS blog posts for the Blog page.

Actions

fetchPosts, fetchPostsSuccess, fetchPostsError, openPost, trackBlogNavigate

trackBlogNavigate exists purely to emit BlogEvents.CustomerBlogPostNavigate through EventLoggerService.

productSummary

Key

productSummary

Module

ProductSummaryModule

Purpose

The product offerings summary shown on the dashboard and the Product Offerings page.

Actions

ProductSummaryActions.fetchProductSummaryData, …Success, …Error

Refetched by DocusignVerificationService.refreshData() after a contract is signed in Dashboard mode.

airwallexCards

Key

airwallexCards

Module

AirwallexCardsFeatureModule

Purpose

The supplier’s Airwallex-issued cards.

Actions

loadAirwallexCards, loadAirwallexCardsSuccess, loadAirwallexCardsFailure

Selectors

selectAirwallexCardsLoaded, selectHasAirwallexCards

cardOrder

Key

cardOrder

Module

CardOrderFeatureModule

Purpose

The card-ordering wizard behind /newcard.

Actions

loadCardProviders, loadCardProvidersSuccess, loadCardProvidersFailure, orderCard, orderCardSuccess, orderCardFailure

loadCardProviders resolves which issuer (CardProvider.Marqeta or CardProvider.Airwallex) and which form factor (CardFormFactor.Physical or Virtual) the supplier is eligible for.

page-load-time-tracker (no store slice)

PageLoadTimeTrackerModule.forRoot(['/dashboard']) registers services rather than a reducer:

PageLoadTimeTrackerService

Measures navigation-to-render duration for allow-listed routes.

PageLoadTimeNotifierService

Emits completed measurements.

page-load-time-initializer.factory.ts

Bridges the notifier to CloudWatchService, and registers the Daily Summary load-error counter.

See Observability. == State type index

Slices are registered by key but read through their exported state interface. The two names rarely match, and only some slices export a distinctly named interface — the rest export a bare State that callers alias on import (import * as fromPlaid from './plaid.reducer' then fromPlaid.State).

Use this table when you have one name and need the other.

Directory Store key Exported state type

features/advance-line/summary/

advanceLine

SummaryState

features/advance-line/offers/

advanceLineOffers

OffersState

features/airwallex-cards/

airwallexCards

AirwallexCardsState

features/balance/

balance

State

features/blog/

blog

BlogState

features/business-information/

businessInformation

State

features/card-order/

cardOrder

CardOrderState

features/dashboard-notifications/

dashboardNotifications

DashboardNotificationsState

features/email-preferences/

emailPreferences

EmailPreferencesState

features/fees/

fees

FeesState

features/instant-advance/

instantAdvance

InstantAdvanceState

features/instant-advance-repayment/

instantAdvanceRepayment

InstantAdvanceRepaymentState

features/payment-methods/

paymentMethods

PaymentMethodState

features/personal-information/

personalInformation

State

features/plaid/

plaid

State

features/product-summary/

productSummary

ProductSummaryState

features/two-factor-authentication/

2fa

TwoFAState

Entity collections (Entity Slices):

Directory Store key Exported state type

entities/countries/

countries

CountriesState

entities/daily-summary-report/

reports.dailySummaryReports

State

entities/marketplaces/

marketplaces

State

entities/onboarding/

onboarding

State

entities/supplier-marketplaces/

supplierMarketplaces

SupplierMarketplacesState

Three naming inconsistencies to be aware of:

  • advance-line/ registers two slices from one directory, and the summary slice’s key (advanceLine) does not match its interface (SummaryState).

  • two-factor-authentication/ uses the key 2fa — a numeric-leading string, so it must be quoted when indexing state by hand.

  • daily-summary-report/ is the only dotted key (reports.dailySummaryReports). It is a plain string, not a nested path; NgRX does not split on the dot.

New slices should export a named interface (MyFeatureState) rather than a bare State, so it is greppable. See Adding a Feature.