@capxul/sdk-react 2.3.2 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { A as useCapxulAuth, C as CreateOrganizationSubmission, D as ProfileDetails, E as OrganizationDetails, M as useCapxulIdentity, N as useCapxulSend, O as SendResult, P as useCapxulTransitions, S as CapxulSend, T as InvocationOptions, _ as ReadyDestination, a as AuthenticationSlots, b as Slot, c as ControllerAction, d as OnboardingControllerProps, f as OrgFailure, g as ProfileSlotProps, h as PendingAuthState, i as AuthenticatedState, j as useCapxulDestination, k as entered, l as FaultedState, m as OtpPendingState, n as AccountProgress, o as CapxulAuthenticationController, p as OrgProgress, r as ActionResult, s as CapxulOnboardingController, t as AccountFailure, u as NavigationAction, v as RetryAction, w as Destination, x as CapxulAuth, y as SignedOutState } from "./controllers-BT4YzBr9.mjs";
2
- import { ReactNode } from "react";
2
+ import { ReactNode, RefCallback } from "react";
3
3
  import { QueryClient, UseMutationResult, UseQueryResult } from "@tanstack/react-query";
4
- import { Account, AccountRequirement, ActivityAnnotationInput, ActivityDetail, ActivityListParams, ActivityPage, ActivityReference, AddressBookEntry, CapxulClient, CapxulError, CapxulSigner, CreateOrgInput, CurrentHoldings, HostObservability, IdentityDestination, InviteMemberInput, MemberView, Money, MoneyParseErrorReason, MovementAnnotation, OrgId, OrgView, OrganizationPaymentBatchInput, OrganizationPaymentInput, PartyId, Payment, PaymentTiming, PaymentsPayInput, Permission, PermissionReadResult, Profile, RoleView, isClaimed, isRestoring } from "@capxul/sdk";
4
+ import { Account, AccountRequirement, ActivityAnnotation, ActivityAnnotationInput, ActivityDetail, ActivityKind, ActivityListParams, ActivityPage, ActivityPhase, ActivityRange, ActivityReference, ActorReference, AddressBookEntry, CapxulClient, CapxulError, CapxulResult, CapxulSigner, CreateOrgInput, CurrentHoldings, HostObservability, IdentityDestination, InviteMemberInput, MemberView, Money, MoneyParseErrorReason, OrgId, OrgView, OrganizationPaymentBatchInput, OrganizationPaymentInput, PartyId, Payment, PaymentDirection, PaymentDocumentRef, PaymentDocumentRender, PaymentStatus, PaymentTiming, PaymentType, PaymentsPayInput, PayrollGroupId, PayrollGroupInput, PayrollRunId, PayrollRunStatus, Permission, PermissionReadResult, Profile, RoleView, isClaimed, isRestoring } from "@capxul/sdk";
5
5
 
6
6
  //#region src/provider.d.ts
7
7
  type CapxulProviderSharedProps = {
@@ -113,9 +113,32 @@ type PermissionId = Brand<string, "PermissionId">;
113
113
  type PermissionAssignmentId = Brand<string, "PermissionAssignmentId">;
114
114
  type PaymentCommandId = Brand<string, "PaymentCommandId">;
115
115
  type OrgId$1 = Brand<string, "OrgId">;
116
+ type CurrencyCode = Brand<SupportedCurrencyCode, "CurrencyCode">;
116
117
  type WeiAmount = Brand<string, "WeiAmount">;
117
118
  type RoleKey = Brand<string, "RoleKey">;
118
119
  type AllowanceKey = Brand<string, "AllowanceKey">;
120
+ declare const SUPPORTED_CURRENCIES: readonly [{
121
+ readonly code: "USD";
122
+ readonly symbol: "$";
123
+ readonly name: "US Dollar";
124
+ }, {
125
+ readonly code: "NGN";
126
+ readonly symbol: "NGN";
127
+ readonly name: "Nigerian Naira";
128
+ }, {
129
+ readonly code: "GHS";
130
+ readonly symbol: "GHS";
131
+ readonly name: "Ghanaian Cedi";
132
+ }, {
133
+ readonly code: "KES";
134
+ readonly symbol: "KSh";
135
+ readonly name: "Kenyan Shilling";
136
+ }, {
137
+ readonly code: "UGX";
138
+ readonly symbol: "USh";
139
+ readonly name: "Ugandan Shilling";
140
+ }];
141
+ type SupportedCurrencyCode = (typeof SUPPORTED_CURRENCIES)[number]["code"];
119
142
  //#endregion
120
143
  //#region src/hooks/use-capxul-permissions.d.ts
121
144
  declare const useCapxulPermissionCreate: (orgId: OrgId) => UseMutationResult<{
@@ -315,11 +338,15 @@ declare function useCapxulPermission(orgId: OrgId, permissionId: string | undefi
315
338
  //#endregion
316
339
  //#region src/hooks/use-capxul-activity.d.ts
317
340
  declare function useCapxulActivity(params?: ActivityListParams): UseQueryResult<ActivityPage, CapxulError>;
318
- declare function useCapxulActivityDetail(reference: ActivityReference | undefined): UseQueryResult<ActivityDetail | null, CapxulError>;
319
- declare function useCapxulAnnotateMovement(): UseMutationResult<MovementAnnotation, CapxulError, ActivityAnnotationInput>;
341
+ declare function useCapxulActivityDetail(reference: ActivityReference | undefined, actor?: ActorReference): UseQueryResult<ActivityDetail | null, CapxulError>;
342
+ declare function useCapxulAnnotateMovement(): UseMutationResult<ActivityAnnotation, CapxulError, ActivityAnnotationInput>;
320
343
  //#endregion
321
344
  //#region src/hooks/use-capxul-holdings.d.ts
322
- declare function useCapxulHoldings(): UseQueryResult<CurrentHoldings, CapxulError>;
345
+ interface UseCapxulHoldingsParams {
346
+ /** Omitted = the signed-in person. SDK core already accepts one. */
347
+ readonly actor?: ActorReference;
348
+ }
349
+ declare function useCapxulHoldings(params?: UseCapxulHoldingsParams): UseQueryResult<CurrentHoldings, CapxulError>;
323
350
  //#endregion
324
351
  //#region src/hooks/use-capxul-orgs.d.ts
325
352
  /**
@@ -600,13 +627,13 @@ interface CapxulContactsProps {
600
627
  readonly onFailed: (error: CapxulError) => void;
601
628
  readonly children: ReactNode;
602
629
  }
603
- declare function Root$3({
630
+ declare function Root$6({
604
631
  actor,
605
632
  onAdded,
606
633
  onFailed,
607
634
  children
608
635
  }: CapxulContactsProps): import("react/jsx-runtime").JSX.Element;
609
- declare function Summary({
636
+ declare function Summary$3({
610
637
  children
611
638
  }: {
612
639
  readonly children: (slice: ContactsSummarySlice) => ReactNode;
@@ -624,12 +651,218 @@ declare function Add({
624
651
  readonly children: (slice: ContactsAddSlice) => ReactNode;
625
652
  }): import("react/jsx-runtime").JSX.Element;
626
653
  /** The compound shape the app's own design system already uses (`StatusTabs`). */
627
- declare const CapxulContacts: typeof Root$3 & {
628
- Summary: typeof Summary;
654
+ declare const CapxulContacts: typeof Root$6 & {
655
+ Summary: typeof Summary$3;
629
656
  List: typeof List;
630
657
  Add: typeof Add;
631
658
  };
632
659
  //#endregion
660
+ //#region src/headless/activity/types.d.ts
661
+ /** The settled transfer a row was built from. The app builds the explorer URL. */
662
+ interface ActivityReceipt {
663
+ readonly chainId: number;
664
+ readonly transactionHash: string;
665
+ }
666
+ /**
667
+ * One finished row. A DISCRIMINATED UNION on `kind`, because a Movement has no
668
+ * payment status: one flat shape carrying `status` for both kinds cannot
669
+ * compile. The two branches match the two branches every app mapper already
670
+ * writes.
671
+ */
672
+ type ActivityRow = {
673
+ readonly kind: "payment";
674
+ readonly reference: ActivityReference;
675
+ readonly direction: PaymentDirection;
676
+ readonly counterpartyLabel: string;
677
+ readonly amountDisplay: string;
678
+ readonly signedAmountDisplay: string;
679
+ readonly currency: string;
680
+ readonly createdAt: number;
681
+ readonly ledgerKind: "Payment" | "Payout" | "Deposit";
682
+ readonly paymentType: PaymentType;
683
+ readonly status: PaymentStatus;
684
+ readonly phase: ActivityPhase;
685
+ readonly receipt: ActivityReceipt | null;
686
+ } | {
687
+ readonly kind: "movement";
688
+ readonly reference: ActivityReference;
689
+ readonly direction: PaymentDirection;
690
+ readonly counterpartyLabel: string;
691
+ readonly amountDisplay: string;
692
+ readonly signedAmountDisplay: string;
693
+ readonly currency: string;
694
+ readonly createdAt: number;
695
+ readonly classification: "movement_only_outflow";
696
+ readonly phase: ActivityPhase;
697
+ readonly receipt: ActivityReceipt;
698
+ };
699
+ /**
700
+ * `"last30days"` is the last 30 whole UTC days including today. Quantizing to
701
+ * the UTC day keeps the cache key stable for a whole day instead of changing
702
+ * on every render.
703
+ */
704
+ type SummaryWindow = "all" | "last30days" | ActivityRange;
705
+ /**
706
+ * Finished money strings for ONE currency bucket, so no consumer indexes an
707
+ * array of per-currency totals. All four strings are `null` and `count` is `0`
708
+ * when the window holds no activity — we say there is nothing, the app says it
709
+ * in its own words.
710
+ */
711
+ interface ActivitySummarySlice {
712
+ readonly currency: string | null;
713
+ readonly moneyIn: string | null;
714
+ readonly moneyOut: string | null;
715
+ readonly net: string | null;
716
+ readonly pending: string | null;
717
+ /** A count is not money, so it is not formatted. */
718
+ readonly count: number;
719
+ readonly isLoading: boolean;
720
+ readonly error: CapxulError | null;
721
+ }
722
+ interface ActivityFilterValues {
723
+ readonly kind?: ActivityKind;
724
+ readonly direction?: PaymentDirection;
725
+ readonly status?: readonly PaymentStatus[];
726
+ }
727
+ interface ActivityFiltersSlice {
728
+ readonly values: ActivityFilterValues;
729
+ readonly set: {
730
+ readonly kind: (value?: ActivityKind) => void;
731
+ readonly direction: (value?: PaymentDirection) => void; /** REPLACES the array; it does not toggle one value. */
732
+ readonly status: (value: readonly PaymentStatus[]) => void;
733
+ readonly clear: () => void;
734
+ };
735
+ /** CODES, never labels. There is no `{value, label}` pair in this seam. */
736
+ readonly options: {
737
+ readonly kind: readonly ActivityKind[];
738
+ readonly direction: readonly PaymentDirection[];
739
+ readonly status: readonly PaymentStatus[];
740
+ };
741
+ }
742
+ interface ActivitySearchSlice {
743
+ readonly value: string;
744
+ readonly change: (text: string) => void;
745
+ }
746
+ interface ActivityRowsSlice {
747
+ /** Already filtered and already searched. */
748
+ readonly rows: readonly ActivityRow[];
749
+ readonly isLoading: boolean;
750
+ readonly error: CapxulError | null;
751
+ readonly retry: () => void;
752
+ /** Server read time of the newest page, so the app can say which read is older. */
753
+ readonly observedAt: number | null;
754
+ }
755
+ interface ActivityLoadMoreSlice {
756
+ readonly hasMore: boolean;
757
+ readonly loadMore: () => void;
758
+ readonly isLoadingMore: boolean;
759
+ /**
760
+ * Attach to whatever the screen renders at the bottom of the list. Where
761
+ * `IntersectionObserver` is undefined — server rendering, and the jsdom test
762
+ * environment — attaching is a no-op and `loadMore()` stays callable.
763
+ *
764
+ * A CALLBACK ref, not the wider `Ref<HTMLElement>`: `RefObject` is invariant,
765
+ * so `Ref<HTMLElement>` refuses to attach to a `<div>`, which is exactly what
766
+ * a screen renders at the bottom of its list.
767
+ */
768
+ readonly sentinelRef: RefCallback<HTMLElement>;
769
+ }
770
+ interface ActivityDetailSlice {
771
+ /** ONE finished document, never the array, so no consumer writes `documents[0]`. */
772
+ readonly receiptDocument: PaymentDocumentRef | null;
773
+ readonly openReceiptDocument: () => Promise<PaymentDocumentRender>;
774
+ readonly isOpeningDocument: boolean;
775
+ readonly memo: string;
776
+ readonly setMemo: (text: string) => void;
777
+ readonly saveMemo: () => void;
778
+ readonly isSavingMemo: boolean;
779
+ readonly isLoading: boolean;
780
+ readonly error: CapxulError | null;
781
+ }
782
+ interface CsvExport {
783
+ readonly text: string;
784
+ readonly rowCount: number;
785
+ /** The 5,000-row ceiling was reached and rows were left unread. */
786
+ readonly truncated: boolean;
787
+ }
788
+ interface ActivityExportSlice {
789
+ readonly toCsv: () => Promise<CsvExport>;
790
+ readonly isExporting: boolean;
791
+ }
792
+ //#endregion
793
+ //#region src/headless/activity/activity.d.ts
794
+ interface CapxulActivityProps {
795
+ /** Omitted = the signed-in person. */
796
+ readonly actor?: ActorReference;
797
+ /**
798
+ * 1..100, default 25. The root CLAMPS an out-of-range value into that band
799
+ * and warns once in development; it never throws, because a bad prop must not
800
+ * blank a screen. The band is the backend's own.
801
+ */
802
+ readonly pageSize?: number;
803
+ readonly children: ReactNode;
804
+ }
805
+ declare function Root$5({
806
+ actor,
807
+ pageSize,
808
+ children
809
+ }: CapxulActivityProps): import("react/jsx-runtime").JSX.Element;
810
+ /**
811
+ * The one part that holds a query rather than reading the engine's: it takes a
812
+ * `window` prop, and two placements can ask for different windows, so a single
813
+ * pre-fetched result cannot serve both. It still holds no logic and draws
814
+ * nothing.
815
+ */
816
+ declare function Summary$2({
817
+ window,
818
+ children
819
+ }: {
820
+ readonly window?: SummaryWindow;
821
+ readonly children: (slice: ActivitySummarySlice) => ReactNode;
822
+ }): import("react/jsx-runtime").JSX.Element;
823
+ declare function Filters({
824
+ children
825
+ }: {
826
+ readonly children: (slice: ActivityFiltersSlice) => ReactNode;
827
+ }): import("react/jsx-runtime").JSX.Element;
828
+ declare function Search({
829
+ children
830
+ }: {
831
+ readonly children: (slice: ActivitySearchSlice) => ReactNode;
832
+ }): import("react/jsx-runtime").JSX.Element;
833
+ declare function Rows({
834
+ children
835
+ }: {
836
+ readonly children: (slice: ActivityRowsSlice) => ReactNode;
837
+ }): import("react/jsx-runtime").JSX.Element;
838
+ declare function LoadMore({
839
+ children
840
+ }: {
841
+ readonly children: (slice: ActivityLoadMoreSlice) => ReactNode;
842
+ }): import("react/jsx-runtime").JSX.Element;
843
+ declare function Detail({
844
+ reference,
845
+ children
846
+ }: {
847
+ readonly reference?: ActivityReference;
848
+ readonly children: (slice: ActivityDetailSlice) => ReactNode;
849
+ }): import("react/jsx-runtime").JSX.Element;
850
+ declare function Export({
851
+ children
852
+ }: {
853
+ readonly children: (slice: ActivityExportSlice) => ReactNode;
854
+ }): import("react/jsx-runtime").JSX.Element;
855
+ /** The compound shape the app's own design system already uses (`StatusTabs`). */
856
+ declare const CapxulActivity: typeof Root$5 & {
857
+ Summary: typeof Summary$2;
858
+ Filters: typeof Filters;
859
+ Search: typeof Search;
860
+ Rows: typeof Rows;
861
+ LoadMore: typeof LoadMore;
862
+ Detail: typeof Detail;
863
+ Export: typeof Export;
864
+ };
865
+ //#endregion
633
866
  //#region src/headless/send-money/use-recipient-resolution.d.ts
634
867
  type SendMoneyRecipientMethod = "username" | "email-address";
635
868
  type SendMoneyRecipientStatus = "empty" | "checking" | "found" | "not-found" | "failed";
@@ -695,13 +928,13 @@ interface CapxulSendMoneyProps {
695
928
  readonly onFailed: (error: CapxulError) => void;
696
929
  readonly children: ReactNode;
697
930
  }
698
- declare function Root$2({
931
+ declare function Root$4({
699
932
  actor,
700
933
  onSent,
701
934
  onFailed,
702
935
  children
703
936
  }: CapxulSendMoneyProps): import("react/jsx-runtime").JSX.Element;
704
- declare function Asset({
937
+ declare function Asset$1({
705
938
  children
706
939
  }: {
707
940
  readonly children: (slice: SendMoneyAssetSlice) => ReactNode;
@@ -716,17 +949,17 @@ declare function Recipient({
716
949
  }: {
717
950
  readonly children: (slice: SendMoneyRecipientSlice) => ReactNode;
718
951
  }): import("react/jsx-runtime").JSX.Element;
719
- declare function Actions({
952
+ declare function Actions$1({
720
953
  children
721
954
  }: {
722
955
  readonly children: (slice: SendMoneyActionsSlice) => ReactNode;
723
956
  }): import("react/jsx-runtime").JSX.Element;
724
957
  /** The compound shape the app's own design system already uses (`StatusTabs`). */
725
- declare const CapxulSendMoney: typeof Root$2 & {
726
- Asset: typeof Asset;
958
+ declare const CapxulSendMoney: typeof Root$4 & {
959
+ Asset: typeof Asset$1;
727
960
  Amount: typeof Amount;
728
961
  Recipient: typeof Recipient;
729
- Actions: typeof Actions;
962
+ Actions: typeof Actions$1;
730
963
  };
731
964
  //#endregion
732
965
  //#region src/headless/access/org-member.d.ts
@@ -753,7 +986,7 @@ interface CapxulOrgMemberProps {
753
986
  readonly orgId: OrgId | string | undefined;
754
987
  readonly children: ReactNode;
755
988
  }
756
- declare function Root$1({
989
+ declare function Root$3({
757
990
  orgId,
758
991
  children
759
992
  }: CapxulOrgMemberProps): import("react/jsx-runtime").JSX.Element;
@@ -776,7 +1009,7 @@ declare function Standing({
776
1009
  readonly children: (slice: OrgMemberStandingSlice) => ReactNode;
777
1010
  }): import("react/jsx-runtime").JSX.Element;
778
1011
  /** The compound shape the app's own design system already uses (`StatusTabs`). */
779
- declare const CapxulOrgMember: typeof Root$1 & {
1012
+ declare const CapxulOrgMember: typeof Root$3 & {
780
1013
  Can: typeof Can;
781
1014
  Standing: typeof Standing;
782
1015
  };
@@ -801,7 +1034,7 @@ interface CapxulDashboardAccessProps {
801
1034
  readonly scope: DashboardScope;
802
1035
  readonly children: ReactNode;
803
1036
  }
804
- declare function Root({
1037
+ declare function Root$2({
805
1038
  scope,
806
1039
  children
807
1040
  }: CapxulDashboardAccessProps): import("react/jsx-runtime").JSX.Element;
@@ -827,11 +1060,231 @@ declare function Granted({
827
1060
  readonly children?: ReactNode;
828
1061
  }): import("react/jsx-runtime").JSX.Element | null;
829
1062
  /** The compound shape the app's own design system already uses (`StatusTabs`). */
830
- declare const CapxulDashboardAccess: typeof Root & {
1063
+ declare const CapxulDashboardAccess: typeof Root$2 & {
831
1064
  Checking: typeof Checking;
832
1065
  Error: typeof DashboardError;
833
1066
  Redirect: typeof Redirect;
834
1067
  Granted: typeof Granted;
835
1068
  };
836
1069
  //#endregion
837
- export { type AccountFailure, type AccountProgress, type ActionResult, type AuthenticatedState, type AuthenticationSlots, type CanReason, type CapxulAuth, CapxulAuthenticationController, type CapxulBootstrapState, type CapxulBootstrapStatus, CapxulContacts, type CapxulContactsProps, CapxulDashboardAccess, type CapxulDashboardAccessProps, CapxulOnboardingController, CapxulOrgMember, type CapxulOrgMemberProps, CapxulProvider, type CapxulProviderProps, type CapxulSend, CapxulSendMoney, type CapxulSendMoneyBlockedReason, type CapxulSendMoneyProps, type Contact, type ContactRelationship, type ContactRow, type ContactsActor, type ContactsAddBlockedReason, type ContactsAddError, type ContactsAddSlice, type ContactsListOptions, type ContactsListSlice, type ContactsRefusal, type ContactsSummarySlice, type ControllerAction, type CreateOrganizationSubmission, type DashboardAccessErrorSlice, type DashboardAccessPhase, type DashboardAccessRedirectSlice, type DashboardScope, type Destination, type FaultedState, type ImageUploadInput, type ImageUploadTarget, type InvocationOptions, type NavigationAction, type OnboardingControllerProps, type OnboardingIntent, type OnboardingJourney, type OnboardingJourneyPosition, type OnboardingOrigin, type OnboardingStep, type OrgFailure, type OrgMemberAction, type OrgMemberCanSlice, type OrgMemberStanding, type OrgMemberStandingSlice, type OrgProgress, type OrganizationDetails, type OrganizationDraft, type OtpPendingState, type PayoutDraftChain, type PayoutDraftEntry, type PendingAuthState, type ProfileDetails, type ProfileDraft, type ProfileSlotProps, type ReadyDestination, type RetryAction, type SendActor, type SendMoneyActionsSlice, type SendMoneyAmountSlice, type SendMoneyAssetError, type SendMoneyAssetOption, type SendMoneyAssetSlice, type SendMoneyRecipientMethod, type SendMoneyRecipientSlice, type SendMoneyRecipientStatus, type SendResult, type SentPayment, type SignedOutState, type Slot, type UseCapxulAccountBalanceOptions, type UseCapxulAccountBalanceReturn, type UseCapxulAccountFundReturn, type UseCapxulCreateCommitmentReturn, type UseCapxulCreateOrgReturn, type UseCapxulImageUploadReturn, type UseCapxulInviteMemberReturn, type UseCapxulOrgMembersOptions, type UseCapxulOrgMembersReturn, type UseCapxulOrgRolesOptions, type UseCapxulOrgRolesReturn, type UseCapxulOrgTreasuryOptions, type UseCapxulOrgTreasuryReturn, type UseCapxulOrgsReturn, type UseCapxulPayReturn, type UseCapxulPaymentReturn, type UseCapxulPaymentsReturn, type UseCapxulProfileReturn, type UseCapxulRedirectPaymentReturn, type UseCapxulUsernameAvailabilityReturn, type UsernameAvailability, acknowledgeOnboardingDestination, activeOnboardingRecovery, clearOnboardingJourney, currentOnboardingJourneyId, entered, invalidateOnboardingJourneyObservation, isClaimed, isRestoring, loadOnboardingJourney, onboardingJourneyPosition, saveOnboardingJourney, startOnboardingJourney, useCapxul, useCapxulAccountBalance, useCapxulAccountFund, useCapxulActivity, useCapxulActivityDetail, useCapxulAnnotateMovement, useCapxulAuth, useCapxulCancelPayment, useCapxulClaimPayment, useCapxulClientOrNull, useCapxulCreateCommitment, useCapxulCreateOrg, useCapxulDestination, useCapxulHoldings, useCapxulIdentity, useCapxulImageUpload, useCapxulInviteMember, useCapxulOrgMembers, useCapxulOrgRoles, useCapxulOrgTreasury, useCapxulOrganizationPay, useCapxulOrganizationPayBatch, useCapxulOrgs, useCapxulPay, useCapxulPayment, useCapxulPayments, useCapxulPermission, useCapxulPermissionAssign, useCapxulPermissionChange, useCapxulPermissionCreate, useCapxulPermissionReplace, useCapxulPermissionRevoke, useCapxulPermissions, useCapxulProfile, useCapxulRedirectPayment, useCapxulSend, useCapxulTransitions, useCapxulUsernameAvailability };
1070
+ //#region src/headless/payroll/use-payroll.d.ts
1071
+ interface PayrollGroupRow {
1072
+ readonly id: PayrollGroupId;
1073
+ readonly name: string;
1074
+ /** A stored display preference; the app narrows it to its own DS union. */
1075
+ readonly tone: string;
1076
+ readonly memberCount: number;
1077
+ /** `formatMoney` over the amounts the employer typed on this group. */
1078
+ readonly totalDisplay: string;
1079
+ readonly members: readonly {
1080
+ /** The `partyId` — the stable id (ruling Q1), never an email. */readonly recipientId: string;
1081
+ readonly amount: string;
1082
+ readonly currency: CurrencyCode;
1083
+ }[];
1084
+ }
1085
+ interface PayrollSummarySlice {
1086
+ readonly walletBalanceDisplay: string | null;
1087
+ readonly paidThisMonthDisplay: string | null;
1088
+ readonly isLoading: boolean;
1089
+ readonly error: CapxulError | null;
1090
+ }
1091
+ interface PayrollGroupsSlice {
1092
+ readonly groups: readonly PayrollGroupRow[];
1093
+ readonly save: (input: PayrollGroupInput) => Promise<CapxulResult<PayrollGroupRow>>;
1094
+ readonly remove: (id: PayrollGroupId) => Promise<CapxulResult<void>>;
1095
+ readonly isSaving: boolean;
1096
+ readonly isLoading: boolean;
1097
+ readonly error: CapxulError | null;
1098
+ }
1099
+ //#endregion
1100
+ //#region src/headless/payroll/payroll.d.ts
1101
+ interface CapxulPayrollProps {
1102
+ readonly orgId: OrgId | undefined;
1103
+ readonly children: ReactNode;
1104
+ }
1105
+ declare function Root$1({
1106
+ orgId,
1107
+ children
1108
+ }: CapxulPayrollProps): import("react/jsx-runtime").JSX.Element;
1109
+ declare function Summary$1({
1110
+ children
1111
+ }: {
1112
+ readonly children: (slice: PayrollSummarySlice) => ReactNode;
1113
+ }): import("react/jsx-runtime").JSX.Element;
1114
+ declare function Groups({
1115
+ children
1116
+ }: {
1117
+ readonly children: (slice: PayrollGroupsSlice) => ReactNode;
1118
+ }): import("react/jsx-runtime").JSX.Element;
1119
+ /**
1120
+ * The compound shape the app's own design system already uses (`StatusTabs`).
1121
+ * There is NO `.Runs` part (ruling Q6): no shipped region has the right shape
1122
+ * for a run list, and a part without a production caller may not ship.
1123
+ */
1124
+ declare const CapxulPayroll: typeof Root$1 & {
1125
+ Summary: typeof Summary$1;
1126
+ Groups: typeof Groups;
1127
+ };
1128
+ //#endregion
1129
+ //#region src/headless/payroll/reads.d.ts
1130
+ /**
1131
+ * One payable person, as the run composer and the group sheet see them.
1132
+ *
1133
+ * `id` is the `PartyId` — the stable key ADR-0022 R1 exists to provide, and the
1134
+ * end of the email-keyed recipient ids the deleted app hook minted.
1135
+ */
1136
+ interface PayrollRecipientOption {
1137
+ readonly id: string;
1138
+ /** The party's real display name, never an email local-part. */
1139
+ readonly name: string;
1140
+ readonly email: string | null;
1141
+ }
1142
+ //#endregion
1143
+ //#region src/headless/payroll/use-payroll-run.d.ts
1144
+ /**
1145
+ * Refusal CODES, never sentences (ADR-0023 R1). `blockedReason` names the FIRST
1146
+ * false fact in the fixed order of the contract's seven-row table, so the same
1147
+ * composer state always yields the same code.
1148
+ */
1149
+ type CapxulPayrollRunBlockedReason = "signer-not-ready" | "no-source" | "ambiguous-source" | "no-asset" | "no-recipients" | "amount-invalid" | "insufficient-funds";
1150
+ interface PayrollRunGroupOption {
1151
+ readonly id: PayrollGroupId;
1152
+ readonly label: string;
1153
+ /** The member count as text — the app supplies any word beside it. */
1154
+ readonly badgeLabel: string;
1155
+ readonly recipientIds: readonly string[];
1156
+ }
1157
+ interface PayrollRunRecipientsSlice {
1158
+ readonly options: readonly PayrollRecipientOption[];
1159
+ readonly groups: readonly PayrollRunGroupOption[];
1160
+ readonly selected: readonly string[];
1161
+ readonly toggle: (id: string) => void;
1162
+ readonly remove: (id: string) => void;
1163
+ readonly isLoading: boolean;
1164
+ readonly error: CapxulError | null;
1165
+ }
1166
+ interface PayrollRunAmountEntry {
1167
+ readonly recipientId: string;
1168
+ readonly name: string;
1169
+ readonly value: string;
1170
+ readonly change: (text: string) => void;
1171
+ /** The `parseMoney` verdict as a closed code; the app maps it to copy. */
1172
+ readonly error: MoneyParseErrorReason | null;
1173
+ /** True while the value is one we seeded and the employer has not edited. */
1174
+ readonly prefilled: boolean;
1175
+ /** The treasury asset's currency — the one-option dropdown stays. */
1176
+ readonly currency: CurrencyCode;
1177
+ }
1178
+ interface PayrollRunAmountsSlice {
1179
+ readonly entries: readonly PayrollRunAmountEntry[];
1180
+ }
1181
+ /** The SAME slice shape as `CapxulSendMoney.Asset` — the cross-item rule. */
1182
+ type PayrollRunAssetSlice = SendMoneyAssetSlice;
1183
+ interface PayrollRunSummarySlice {
1184
+ readonly recipientCount: number;
1185
+ /** Null until every selected amount parses. */
1186
+ readonly totalDisplay: string | null;
1187
+ readonly balanceAfterDisplay: string | null;
1188
+ readonly funds: "available" | "insufficient" | "unknown";
1189
+ }
1190
+ interface PayrollRunActionsSlice {
1191
+ readonly submit: () => void;
1192
+ readonly isSubmitting: boolean;
1193
+ readonly blocked: boolean;
1194
+ readonly blockedReason: CapxulPayrollRunBlockedReason | null;
1195
+ }
1196
+ interface PayrollRunPrefill {
1197
+ /** `partyId`s — how a group card opens pay-now pre-filled. */
1198
+ readonly recipientIds: readonly string[];
1199
+ readonly amounts?: readonly {
1200
+ readonly recipientId: string;
1201
+ readonly amount: string;
1202
+ }[];
1203
+ }
1204
+ interface SentPayrollRun {
1205
+ readonly id: PayrollRunId;
1206
+ readonly totalDisplay: string;
1207
+ readonly recipientCount: number;
1208
+ }
1209
+ //#endregion
1210
+ //#region src/headless/payroll/payroll-run.d.ts
1211
+ interface CapxulPayrollRunProps {
1212
+ readonly orgId: OrgId | undefined;
1213
+ /** How a group card opens pay-now pre-filled — today's group-context merge. */
1214
+ readonly prefill?: PayrollRunPrefill;
1215
+ readonly onRun: (run: SentPayrollRun) => void;
1216
+ /** ADR-0023 R1: the app maps `error.code` to its own copy; no SDK sentence. */
1217
+ readonly onFailed: (error: CapxulError) => void;
1218
+ readonly children: ReactNode;
1219
+ }
1220
+ declare function Root({
1221
+ orgId,
1222
+ prefill,
1223
+ onRun,
1224
+ onFailed,
1225
+ children
1226
+ }: CapxulPayrollRunProps): import("react/jsx-runtime").JSX.Element;
1227
+ declare function Recipients({
1228
+ children
1229
+ }: {
1230
+ readonly children: (slice: PayrollRunRecipientsSlice) => ReactNode;
1231
+ }): import("react/jsx-runtime").JSX.Element;
1232
+ declare function Amounts({
1233
+ children
1234
+ }: {
1235
+ readonly children: (slice: PayrollRunAmountsSlice) => ReactNode;
1236
+ }): import("react/jsx-runtime").JSX.Element;
1237
+ declare function Asset({
1238
+ children
1239
+ }: {
1240
+ readonly children: (slice: PayrollRunAssetSlice) => ReactNode;
1241
+ }): import("react/jsx-runtime").JSX.Element;
1242
+ declare function Summary({
1243
+ children
1244
+ }: {
1245
+ readonly children: (slice: PayrollRunSummarySlice) => ReactNode;
1246
+ }): import("react/jsx-runtime").JSX.Element;
1247
+ declare function Actions({
1248
+ children
1249
+ }: {
1250
+ readonly children: (slice: PayrollRunActionsSlice) => ReactNode;
1251
+ }): import("react/jsx-runtime").JSX.Element;
1252
+ /** The compound shape the app's own design system already uses (`StatusTabs`). */
1253
+ declare const CapxulPayrollRun: typeof Root & {
1254
+ Recipients: typeof Recipients;
1255
+ Amounts: typeof Amounts;
1256
+ Asset: typeof Asset;
1257
+ Summary: typeof Summary;
1258
+ Actions: typeof Actions;
1259
+ };
1260
+ //#endregion
1261
+ //#region src/internal/reactivity-keys.d.ts
1262
+ declare const capxulKeys: {
1263
+ root: readonly ["capxul"];
1264
+ profile: readonly ["capxul", "profile"];
1265
+ usernameAvailability: (username: string) => readonly ["capxul", "profile", "username-availability", string];
1266
+ account: readonly ["capxul", "account"];
1267
+ provisioning: readonly ["capxul", "provisioning"];
1268
+ binding: readonly ["capxul", "binding"];
1269
+ accountBalance: readonly ["capxul", "accountBalance"];
1270
+ orgs: readonly ["capxul", "orgs"];
1271
+ org: (orgId: OrgId | undefined) => readonly ["capxul", "org", "pending" | OrgId];
1272
+ orgMembers: (orgId: OrgId | undefined) => readonly ["capxul", "org", "pending" | OrgId, "members"];
1273
+ orgRoles: (orgId: OrgId | undefined) => readonly ["capxul", "org", "pending" | OrgId, "roles"];
1274
+ orgTreasury: (orgId: OrgId | undefined) => readonly ["capxul", "org", "pending" | OrgId, "treasury"];
1275
+ orgPermissions: (orgId: OrgId | undefined) => readonly ["capxul", "org", "pending" | OrgId, "permissions"];
1276
+ orgMe: (orgId: OrgId | undefined) => readonly ["capxul", "org", "pending" | OrgId, "me"];
1277
+ orgLifecycle: (orgId: OrgId | undefined) => readonly ["capxul", "org", "pending" | OrgId, "lifecycle"];
1278
+ contacts: (scope: string) => readonly ["capxul", "contacts", string];
1279
+ contactsList: (scope: string, includeHidden: boolean) => readonly ["capxul", "contacts", string, "all" | "visible"];
1280
+ payrollRuns: (orgId: OrgId | undefined) => readonly ["capxul", "org", "pending" | OrgId, "payroll", "runs"];
1281
+ payrollGroups: (orgId: OrgId | undefined) => readonly ["capxul", "org", "pending" | OrgId, "payroll", "groups"];
1282
+ activity: readonly ["capxul", "activity"];
1283
+ activityDetail: (reference: ActivityReference | undefined, actor?: ActorReference | undefined) => readonly ["capxul", "activity", "self" | ActorReference, "pending" | ActivityReference];
1284
+ activitySummary: (actor?: ActorReference, window?: ActivityRange) => readonly ["capxul", "activity", "summary", "self" | ActorReference, "all" | ActivityRange];
1285
+ holdings: (actor?: ActorReference) => readonly ["capxul", "holdings", "self" | ActorReference];
1286
+ payments: readonly ["capxul", "payments"];
1287
+ payment: (paymentId: string | undefined) => readonly ["capxul", "payments", string];
1288
+ };
1289
+ //#endregion
1290
+ export { type AccountFailure, type AccountProgress, type ActionResult, type ActivityDetailSlice, type ActivityExportSlice, type ActivityFilterValues, type ActivityFiltersSlice, type ActivityLoadMoreSlice, type ActivityReceipt, type ActivityRow, type ActivityRowsSlice, type ActivitySearchSlice, type ActivitySummarySlice, type AuthenticatedState, type AuthenticationSlots, type CanReason, CapxulActivity, type CapxulActivityProps, type CapxulAuth, CapxulAuthenticationController, type CapxulBootstrapState, type CapxulBootstrapStatus, CapxulContacts, type CapxulContactsProps, CapxulDashboardAccess, type CapxulDashboardAccessProps, CapxulOnboardingController, CapxulOrgMember, type CapxulOrgMemberProps, CapxulPayroll, type CapxulPayrollProps, CapxulPayrollRun, type CapxulPayrollRunBlockedReason, type CapxulPayrollRunProps, CapxulProvider, type CapxulProviderProps, type CapxulSend, CapxulSendMoney, type CapxulSendMoneyBlockedReason, type CapxulSendMoneyProps, type Contact, type ContactRelationship, type ContactRow, type ContactsActor, type ContactsAddBlockedReason, type ContactsAddError, type ContactsAddSlice, type ContactsListOptions, type ContactsListSlice, type ContactsRefusal, type ContactsSummarySlice, type ControllerAction, type CreateOrganizationSubmission, type CsvExport, type DashboardAccessErrorSlice, type DashboardAccessPhase, type DashboardAccessRedirectSlice, type DashboardScope, type Destination, type FaultedState, type ImageUploadInput, type ImageUploadTarget, type InvocationOptions, type NavigationAction, type OnboardingControllerProps, type OnboardingIntent, type OnboardingJourney, type OnboardingJourneyPosition, type OnboardingOrigin, type OnboardingStep, type OrgFailure, type OrgMemberAction, type OrgMemberCanSlice, type OrgMemberStanding, type OrgMemberStandingSlice, type OrgProgress, type OrganizationDetails, type OrganizationDraft, type OtpPendingState, type PayoutDraftChain, type PayoutDraftEntry, type PayrollGroupRow, type PayrollGroupsSlice, type PayrollRecipientOption, type PayrollRunActionsSlice, type PayrollRunAmountEntry, type PayrollRunAmountsSlice, type PayrollRunAssetSlice, type PayrollRunGroupOption, type PayrollRunPrefill, type PayrollRunRecipientsSlice, type PayrollRunStatus, type PayrollRunSummarySlice, type PayrollSummarySlice, type PendingAuthState, type ProfileDetails, type ProfileDraft, type ProfileSlotProps, type ReadyDestination, type RetryAction, type SendActor, type SendMoneyActionsSlice, type SendMoneyAmountSlice, type SendMoneyAssetError, type SendMoneyAssetOption, type SendMoneyAssetSlice, type SendMoneyRecipientMethod, type SendMoneyRecipientSlice, type SendMoneyRecipientStatus, type SendResult, type SentPayment, type SentPayrollRun, type SignedOutState, type Slot, type SummaryWindow, type UseCapxulAccountBalanceOptions, type UseCapxulAccountBalanceReturn, type UseCapxulAccountFundReturn, type UseCapxulCreateCommitmentReturn, type UseCapxulCreateOrgReturn, type UseCapxulImageUploadReturn, type UseCapxulInviteMemberReturn, type UseCapxulOrgMembersOptions, type UseCapxulOrgMembersReturn, type UseCapxulOrgRolesOptions, type UseCapxulOrgRolesReturn, type UseCapxulOrgTreasuryOptions, type UseCapxulOrgTreasuryReturn, type UseCapxulOrgsReturn, type UseCapxulPayReturn, type UseCapxulPaymentReturn, type UseCapxulPaymentsReturn, type UseCapxulProfileReturn, type UseCapxulRedirectPaymentReturn, type UseCapxulUsernameAvailabilityReturn, type UsernameAvailability, acknowledgeOnboardingDestination, activeOnboardingRecovery, capxulKeys, clearOnboardingJourney, currentOnboardingJourneyId, entered, invalidateOnboardingJourneyObservation, isClaimed, isRestoring, loadOnboardingJourney, onboardingJourneyPosition, saveOnboardingJourney, startOnboardingJourney, useCapxul, useCapxulAccountBalance, useCapxulAccountFund, useCapxulActivity, useCapxulActivityDetail, useCapxulAnnotateMovement, useCapxulAuth, useCapxulCancelPayment, useCapxulClaimPayment, useCapxulClientOrNull, useCapxulCreateCommitment, useCapxulCreateOrg, useCapxulDestination, useCapxulHoldings, useCapxulIdentity, useCapxulImageUpload, useCapxulInviteMember, useCapxulOrgMembers, useCapxulOrgRoles, useCapxulOrgTreasury, useCapxulOrganizationPay, useCapxulOrganizationPayBatch, useCapxulOrgs, useCapxulPay, useCapxulPayment, useCapxulPayments, useCapxulPermission, useCapxulPermissionAssign, useCapxulPermissionChange, useCapxulPermissionCreate, useCapxulPermissionReplace, useCapxulPermissionRevoke, useCapxulPermissions, useCapxulProfile, useCapxulRedirectPayment, useCapxulSend, useCapxulTransitions, useCapxulUsernameAvailability };