Entity Slices
Five normalized collections live under src/app/core/pyb/entities/. Each uses
createEntityAdapter with an explicit selectId, because the API keys are not
called id.
| Slice | Key | selectId |
|---|---|---|
Countries |
|
|
Marketplaces |
|
|
Supplier Marketplaces |
|
|
Onboarding |
|
|
Daily Summary Report |
|
|
Every slice re-exports the adapter’s selectors:
export const { selectIds, selectEntities, selectAll, selectTotal } = adapter.getSelectors();
countries
Model |
|
Module |
|
Purpose |
Reference data for every address form and the country/phone pickers. |
Actions |
|
marketplaces
Model |
|
Module |
|
Purpose |
The catalog of supported marketplaces — names, logos, connection capabilities. |
Config token |
|
Actions:
| Action | Purpose |
|---|---|
|
Load the catalog. |
|
Open the Amazon invite-Payability wizard. |
|
Open the Amazon grant-permissions wizard. |
|
The supplier abandoned the Amazon-suspended flow. |
|
The Amazon-suspended flow finished. |
Marketplace identities are fixed UUIDs in MarketplaceEnum — see
Marketplaces & Compliance.
supplierMarketplaces
Model |
|
Module |
|
Purpose |
The channels this supplier has connected, with per-channel connection health. |
Actions:
| Group | Actions |
|---|---|
Load |
|
Add |
|
Bulk add |
|
Bulk add (unsupported) |
|
Save |
|
Remove |
|
|
"Unsupported" marketplaces are channels a supplier reports selling on that Payability does not integrate with. They are recorded for underwriting context but never produce a connector. |
This slice is the input to the API connectors — ApiConnectorsService dispatches
fetchSupplierMarketplaces() on init and the Amazon and Shopify connectors watch
it for connection loss. See
Marketplace API Connectors.
DocusignVerificationService also re-dispatches fetchSupplierMarketplaces()
after a successful Advance Line withdrawal, since drawing funds can change
per-marketplace availability.
onboarding
Model |
|
Module |
|
Purpose |
Onboarding progress, modelled as a set of compliance records keyed by |
Actions |
|
Each compliance record is a step the supplier must satisfy. The keys are the
UUIDs in PayabilityComplianceEnum — link marketplace, personal information,
offer summary, sign an agreement, two-step verification, transfer information,
business information, KYC identity, personal details, sales call summary, bank
statement, other.
See Onboarding.
reports.dailySummaryReports
Model |
|
Module |
|
Purpose |
Paginated daily transaction summaries for the Daily Summary report. |
|
|
This is the one slice that still uses class-based actions rather than
createAction:
export enum DailySummaryReportActionTypes {
DailySummaryReportsRequest = '[DailySummaryReport] Request data',
DailySummaryReportsLoadSuccess = '[DailySummaryReport] Load data success',
DailySummaryReportsLoadFailed = '[DailySummaryReport] Load data failed',
AddDailySummaryReport = '[DailySummaryReport] Add DailySummaryReport',
AddDailySummaryReports = '[DailySummaryReport] Add DailySummaryReports',
ClearDailySummaryReports = '[DailySummaryReport] Clear DailySummaryReports',
}
export class DailySummaryReportsRequest implements Action {
readonly type = DailySummaryReportActionTypes.DailySummaryReportsRequest;
constructor(public payload: { page: QueryParamsModel }) {}
}
export class DailySummaryReportsLoadSuccess implements Action {
readonly type = DailySummaryReportActionTypes.DailySummaryReportsLoadSuccess;
constructor(public payload: { data: DailySummary[]; totalCount: number; page: QueryParamsModel }) {}
}
|
Paging is expressed with |
Load failures are counted as a CloudWatch metric via
initializeDailySummaryLoadDataErrorTrackerProvider — see
Observability.