@capxul/sdk-react 4.20.0-beta.1 → 4.20.0-beta.10
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/README.md +15 -0
- package/dist/{controllers-DXmEHrnw.mjs → controllers-L1UqwWS1.mjs} +5 -2
- package/dist/index.d.mts +102 -50
- package/dist/index.mjs +572 -225
- package/dist/testing/index.mjs +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -56,6 +56,8 @@ export function Providers({ children }: { children: React.ReactNode }) {
|
|
|
56
56
|
engine hook stays module-scoped. Both actor paths ship: a personal actor omits
|
|
57
57
|
`.Source` and spends the personal Account; an organization actor holds the
|
|
58
58
|
Budget the payment is drawn from and spends the treasury Account.
|
|
59
|
+
The submitted amount uses the selected registry AssetId and precision. This
|
|
60
|
+
includes 18-decimal WETH.
|
|
59
61
|
- `CapxulContacts` is the compound address-book component. One root owns the
|
|
60
62
|
book behaviour and draws nothing. The `.Summary`, `.List`, and `.Add` region
|
|
61
63
|
parts each hand the screen one finished slice, and a `.List` row carries its
|
|
@@ -75,6 +77,9 @@ export function Providers({ children }: { children: React.ReactNode }) {
|
|
|
75
77
|
and an amount the caller passed in `prefill` wins over it. Both engine hooks
|
|
76
78
|
stay module-scoped.
|
|
77
79
|
|
|
80
|
+
Activity groups use AssetId. The SDK resolves symbols and precision only for
|
|
81
|
+
display and CSV output. Assets with the same peg remain separate.
|
|
82
|
+
|
|
78
83
|
Payroll confirmation restores a saved run before enabling submission. An
|
|
79
84
|
uncertain run keeps its period, amounts, recipients, and SDK request key across
|
|
80
85
|
close/reopen and reload. Its fields remain fixed until Core confirms success or terminal closure.
|
|
@@ -98,6 +103,16 @@ The testing harness uses the real public provider and controllers and imports
|
|
|
98
103
|
its client factory only through `@capxul/sdk/testing`; it owns no renderer or
|
|
99
104
|
parallel identity state.
|
|
100
105
|
|
|
106
|
+
## Activity documents
|
|
107
|
+
|
|
108
|
+
`CapxulActivity.Detail` exposes `documents`, `selectedDocument`, and
|
|
109
|
+
`selectDocument({ documentHash, contentHash })`. Selection defaults to the
|
|
110
|
+
instruction, then the Movement Memo. `renderDocument()` returns safe semantic
|
|
111
|
+
HTML. `downloadDocument()` returns exact bytes for a deliberate download.
|
|
112
|
+
The host owns the panel and download action. Do not log these results.
|
|
113
|
+
Account or Organization changes clear selection and cancel pending reads.
|
|
114
|
+
These methods replace the receipt-only selector and action.
|
|
115
|
+
|
|
101
116
|
## Documentation
|
|
102
117
|
|
|
103
118
|
- [Maintainer context](./CONTEXT.md)
|
|
@@ -565,7 +565,7 @@ function CapxulIdentityProvider({ client, children }) {
|
|
|
565
565
|
if (!active) return;
|
|
566
566
|
state = runtime.snapshot();
|
|
567
567
|
}
|
|
568
|
-
if (state.phase === "authenticated" && state.profileComplete && state.account.at === "unknown") await runtime.send({ _tag: "EnsureAccount" }, { signal: controller.signal });
|
|
568
|
+
if (client._internal.accountSetup !== "explicit" && state.phase === "authenticated" && state.profileComplete && state.account.at === "unknown") await runtime.send({ _tag: "EnsureAccount" }, { signal: controller.signal });
|
|
569
569
|
}).catch(() => void 0);
|
|
570
570
|
return () => {
|
|
571
571
|
active = false;
|
|
@@ -720,6 +720,7 @@ function clearClientScopedQueries(queryClient, ownsQueryClient) {
|
|
|
720
720
|
}
|
|
721
721
|
function CapxulProvider(props) {
|
|
722
722
|
const { publishableKey, client: injectedClient, requirement, signer, observability, bootstrapBaseUrl, queryClient, children } = props;
|
|
723
|
+
const accountSetup = "accountSetup" in props ? props.accountSetup : void 0;
|
|
723
724
|
const [resolvedQueryClient] = useState(() => queryClient ?? makeDefaultQueryClient());
|
|
724
725
|
const [ownsQueryClient] = useState(() => queryClient === void 0);
|
|
725
726
|
const [attempt, setAttempt] = useState(0);
|
|
@@ -731,13 +732,15 @@ function CapxulProvider(props) {
|
|
|
731
732
|
...requirement === void 0 ? {} : { requirement },
|
|
732
733
|
...signer === void 0 ? {} : { signer },
|
|
733
734
|
...observability === void 0 ? {} : { observability },
|
|
734
|
-
...bootstrapBaseUrl === void 0 ? {} : { bootstrapBaseUrl }
|
|
735
|
+
...bootstrapBaseUrl === void 0 ? {} : { bootstrapBaseUrl },
|
|
736
|
+
...accountSetup === void 0 ? {} : { accountSetup }
|
|
735
737
|
}, [
|
|
736
738
|
publishableKey,
|
|
737
739
|
requirement,
|
|
738
740
|
signer,
|
|
739
741
|
observability,
|
|
740
742
|
bootstrapBaseUrl,
|
|
743
|
+
accountSetup,
|
|
741
744
|
attempt
|
|
742
745
|
]);
|
|
743
746
|
const [ownedBootstrap, setOwnedBootstrap] = useState(null);
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { A as entered, C as CreateOrganizationFailure, D as OrganizationDetails, E as InvocationOptions, F as useCapxulTransitions, M as useCapxulDestination, N as useCapxulIdentity, O as ProfileDetails, P as useCapxulSend, S as CapxulSend, T as Destination, _ 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 useCapxulAuth, k as SendResult, 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 CreateOrganizationSubmission, x as CapxulAuth, y as SignedOutState } from "./controllers-BWmKRFy6.mjs";
|
|
2
2
|
import { ReactNode, RefCallback } from "react";
|
|
3
3
|
import { QueryClient, UseMutationResult, UseQueryResult } from "@tanstack/react-query";
|
|
4
|
-
import { Account, AccountRequirement, ActivityAnnotation, ActivityAnnotationInput, ActivityDetail, ActivityKind, ActivityListParams, ActivityPage, ActivityPhase, ActivityRange, ActivityReference, ActorReference, AddressBookEntry, BudgetId, CapxulClient, CapxulError, CapxulResult, CapxulSigner, CreateOrgInput, CurrentHoldings, HostObservability, IdentityDestination, IdentityState,
|
|
4
|
+
import { Account, AccountRequirement, ActivityAnnotation, ActivityAnnotationInput, ActivityDetail, ActivityKind, ActivityListParams, ActivityPage, ActivityPhase, ActivityRange, ActivityReference, ActivitySummaryTotal, ActorReference, AddressBookEntry, AssetAmount, AssetId, BudgetId, CapxulClient, CapxulError, CapxulResult, CapxulSigner, CreateOrgInput, CurrentHoldings, HostObservability, IdentityDestination, IdentityState, MemberView, Money, MoneyParseErrorReason, OrgId, OrgView, OrganizationAccess, OrganizationPaymentBatchInput, OrganizationPaymentInput, PartyId, Payment, PaymentDirection, PaymentDocumentDownload, PaymentDocumentReadRef, PaymentDocumentRef, PaymentDocumentRender, PaymentStatus, PaymentTiming, PaymentType, PaymentsPayInput, PayrollGroupId, PayrollGroupInput, PayrollRunId, PayrollRunStatus, Permission, PermissionMethods, PermissionReadResult, Profile, RoleView, SubmittedPermissionExecution, isClaimed, isRestoring } from "@capxul/sdk";
|
|
5
5
|
//#region src/provider.d.ts
|
|
6
6
|
type CapxulProviderSharedProps = {
|
|
7
7
|
/** Bring your own QueryClient; otherwise the provider creates one. */
|
|
@@ -28,6 +28,11 @@ type CapxulProviderPublishableKeyProps = CapxulProviderSharedProps & {
|
|
|
28
28
|
* route cross-origin for the publishable key's allowed origins.
|
|
29
29
|
*/
|
|
30
30
|
readonly bootstrapBaseUrl?: string;
|
|
31
|
+
/**
|
|
32
|
+
* AUTH A3. Pass `"explicit"` on `/connect` so restore and OTP do not write
|
|
33
|
+
* Profile, Account, or invitations. Default automatic.
|
|
34
|
+
*/
|
|
35
|
+
readonly accountSetup?: "automatic" | "explicit";
|
|
31
36
|
};
|
|
32
37
|
/**
|
|
33
38
|
* Node / server / test path — a pre-built client is supplied; lifecycle stays
|
|
@@ -77,7 +82,7 @@ declare function useCapxulAccountBalance(options?: UseCapxulAccountBalanceOption
|
|
|
77
82
|
//#region src/hooks/use-capxul-account-fund.d.ts
|
|
78
83
|
type UseCapxulAccountFundReturn = UseMutationResult<{
|
|
79
84
|
readonly txHash: string;
|
|
80
|
-
}, CapxulError,
|
|
85
|
+
}, CapxulError, AssetAmount>;
|
|
81
86
|
declare function useCapxulAccountFund(): UseCapxulAccountFundReturn;
|
|
82
87
|
//#endregion
|
|
83
88
|
//#region src/hooks/use-capxul-money.d.ts
|
|
@@ -143,7 +148,7 @@ declare function useCapxulHoldings(params?: UseCapxulHoldingsParams): UseQueryRe
|
|
|
143
148
|
* List the Organizations that the current user can access. Binds directly to
|
|
144
149
|
* the locked `capxul.orgs()` SDK method.
|
|
145
150
|
*/
|
|
146
|
-
type UseCapxulOrgsReturn = UseQueryResult<readonly
|
|
151
|
+
type UseCapxulOrgsReturn = UseQueryResult<readonly OrganizationAccess[], CapxulError>;
|
|
147
152
|
type UseCapxulOrgsOptions = {
|
|
148
153
|
/**
|
|
149
154
|
* Gate the query on auth readiness. `client.orgs()` is a session-scoped
|
|
@@ -199,24 +204,6 @@ declare function useCapxulOrgTreasury(orgId: OrgId | undefined, options?: UseCap
|
|
|
199
204
|
type UseCapxulCreateOrgReturn = UseMutationResult<OrgView, CapxulError, CreateOrgInput>;
|
|
200
205
|
declare function useCapxulCreateOrg(): UseCapxulCreateOrgReturn;
|
|
201
206
|
//#endregion
|
|
202
|
-
//#region src/hooks/use-capxul-invite-member.d.ts
|
|
203
|
-
/**
|
|
204
|
-
* R06 (#1964): `options` is the browser attempt the caller captured before the
|
|
205
|
-
* person pressed Send. It reaches the SDK operation unchanged, so the durable
|
|
206
|
-
* `org_invite_sent` and the later `org_invite_progressed` carry that attempt's
|
|
207
|
-
* correlation. Absent, the invitation keeps its own invocation context.
|
|
208
|
-
*/
|
|
209
|
-
type UseCapxulInviteMemberInput = InviteMemberInput & {
|
|
210
|
-
readonly options?: InvocationOptions;
|
|
211
|
-
};
|
|
212
|
-
/**
|
|
213
|
-
* Invite a member to an Organization by email. The hook uses the closed-over `orgId`.
|
|
214
|
-
* It binds directly to
|
|
215
|
-
* `capxul.org(orgId).invite(input)`. On success, invalidates the member list.
|
|
216
|
-
*/
|
|
217
|
-
type UseCapxulInviteMemberReturn = UseMutationResult<MemberView, CapxulError, UseCapxulInviteMemberInput>;
|
|
218
|
-
declare function useCapxulInviteMember(orgId: OrgId | undefined): UseCapxulInviteMemberReturn;
|
|
219
|
-
//#endregion
|
|
220
207
|
//#region src/headless/journey/journey-state.d.ts
|
|
221
208
|
type OnboardingIntent = "personal" | "organization";
|
|
222
209
|
type OnboardingStep = "profile" | "organization" | "provisioning";
|
|
@@ -456,7 +443,7 @@ interface CapxulContactsProps {
|
|
|
456
443
|
readonly onFailed: (error: CapxulError, options?: InvocationOptions) => void;
|
|
457
444
|
readonly children: ReactNode;
|
|
458
445
|
}
|
|
459
|
-
declare function Root$
|
|
446
|
+
declare function Root$7({ actor, onAdded, onFailed, children }: CapxulContactsProps): import("react/jsx-runtime").JSX.Element;
|
|
460
447
|
declare function Summary$3({ children }: {
|
|
461
448
|
readonly children: (slice: ContactsSummarySlice) => ReactNode;
|
|
462
449
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -467,7 +454,7 @@ declare function Add({ children }: {
|
|
|
467
454
|
readonly children: (slice: ContactsAddSlice) => ReactNode;
|
|
468
455
|
}): import("react/jsx-runtime").JSX.Element;
|
|
469
456
|
/** The compound shape the app's own design system already uses (`StatusTabs`). */
|
|
470
|
-
declare const CapxulContacts: typeof Root$
|
|
457
|
+
declare const CapxulContacts: typeof Root$7 & {
|
|
471
458
|
Summary: typeof Summary$3;
|
|
472
459
|
List: typeof List;
|
|
473
460
|
Add: typeof Add;
|
|
@@ -487,6 +474,7 @@ interface ActivityReceipt {
|
|
|
487
474
|
*/
|
|
488
475
|
type ActivityRow = {
|
|
489
476
|
readonly kind: "payment";
|
|
477
|
+
readonly execution?: Payment["execution"];
|
|
490
478
|
readonly reference: ActivityReference;
|
|
491
479
|
readonly direction: PaymentDirection;
|
|
492
480
|
readonly counterpartyLabel: string;
|
|
@@ -519,8 +507,8 @@ type ActivityRow = {
|
|
|
519
507
|
*/
|
|
520
508
|
type SummaryWindow = "all" | "last30days" | ActivityRange;
|
|
521
509
|
/**
|
|
522
|
-
* Finished
|
|
523
|
-
*
|
|
510
|
+
* Finished valuation strings in the display currency. Unrated assets remain
|
|
511
|
+
* separate. All four strings are `null` and `count` is `0`
|
|
524
512
|
* when the window holds no activity — we say there is nothing, the app says it
|
|
525
513
|
* in its own words.
|
|
526
514
|
*/
|
|
@@ -531,6 +519,7 @@ interface ActivitySummarySlice {
|
|
|
531
519
|
readonly moneyOut: string | null;
|
|
532
520
|
readonly net: string | null;
|
|
533
521
|
readonly pending: string | null;
|
|
522
|
+
readonly unrated: readonly ActivitySummaryTotal[];
|
|
534
523
|
/** A count is not money, so it is not formatted. */
|
|
535
524
|
readonly count: number;
|
|
536
525
|
readonly isLoading: boolean;
|
|
@@ -592,9 +581,14 @@ interface ActivityLoadMoreSlice {
|
|
|
592
581
|
readonly sentinelRef: RefCallback<HTMLElement>;
|
|
593
582
|
}
|
|
594
583
|
interface ActivityDetailSlice {
|
|
595
|
-
/**
|
|
596
|
-
readonly
|
|
597
|
-
readonly
|
|
584
|
+
/** Current Payment state from the existing detail read; absent for Movements. */
|
|
585
|
+
readonly payment?: Pick<Payment, "status" | "execution">;
|
|
586
|
+
readonly documents: readonly PaymentDocumentRef[];
|
|
587
|
+
readonly selectedDocument: PaymentDocumentRef | null;
|
|
588
|
+
readonly selectDocument: (ref: PaymentDocumentReadRef) => void;
|
|
589
|
+
readonly renderDocument: () => Promise<PaymentDocumentRender>;
|
|
590
|
+
/** Return exact bytes on a deliberate action. The host owns the download URL. */
|
|
591
|
+
readonly downloadDocument: () => Promise<PaymentDocumentDownload>;
|
|
598
592
|
readonly isOpeningDocument: boolean;
|
|
599
593
|
readonly memo: string;
|
|
600
594
|
readonly setMemo: (text: string) => void;
|
|
@@ -634,7 +628,7 @@ interface CapxulActivityProps {
|
|
|
634
628
|
readonly pageSize?: number;
|
|
635
629
|
readonly children: ReactNode;
|
|
636
630
|
}
|
|
637
|
-
declare function Root$
|
|
631
|
+
declare function Root$6({ actor, pageSize, children }: CapxulActivityProps): import("react/jsx-runtime").JSX.Element;
|
|
638
632
|
/**
|
|
639
633
|
* The one part that holds a query rather than reading the engine's: it takes a
|
|
640
634
|
* `window` prop, and two placements can ask for different windows, so a single
|
|
@@ -665,7 +659,7 @@ declare function Export({ children }: {
|
|
|
665
659
|
readonly children: (slice: ActivityExportSlice) => ReactNode;
|
|
666
660
|
}): import("react/jsx-runtime").JSX.Element;
|
|
667
661
|
/** The compound shape the app's own design system already uses (`StatusTabs`). */
|
|
668
|
-
declare const CapxulActivity: typeof Root$
|
|
662
|
+
declare const CapxulActivity: typeof Root$6 & {
|
|
669
663
|
Summary: typeof Summary$2;
|
|
670
664
|
Filters: typeof Filters;
|
|
671
665
|
Search: typeof Search;
|
|
@@ -700,7 +694,7 @@ type SentPayment = {
|
|
|
700
694
|
/** The backend payment row. */
|
|
701
695
|
readonly payment: Payment;
|
|
702
696
|
/** What we parsed and sent — `.value` is the comma-stripped major-unit string. */
|
|
703
|
-
readonly amount:
|
|
697
|
+
readonly amount: AssetAmount;
|
|
704
698
|
/** The trimmed text the person typed — the app's success toast interpolates it. */
|
|
705
699
|
readonly recipient: string;
|
|
706
700
|
};
|
|
@@ -708,7 +702,7 @@ type SentPayment = {
|
|
|
708
702
|
* Refusal CODES, never sentences (#1447 ruling 8). The app maps each code to
|
|
709
703
|
* the words it already prints; no English refusal string ships from here.
|
|
710
704
|
*/
|
|
711
|
-
type CapxulSendMoneyBlockedReason = "signer-not-ready" | "amount-invalid" | "recipient-unresolved" | "no-source" | "no-asset";
|
|
705
|
+
type CapxulSendMoneyBlockedReason = "signer-not-ready" | "amount-invalid" | "recipient-unresolved" | "no-source" | "no-asset" | "asset-unnamed";
|
|
712
706
|
/**
|
|
713
707
|
* One Budget the member can spend from — the id the payment carries, and
|
|
714
708
|
* nothing else.
|
|
@@ -733,7 +727,7 @@ interface SendMoneySourceSlice {
|
|
|
733
727
|
readonly isPending: boolean;
|
|
734
728
|
}
|
|
735
729
|
interface SendMoneyAssetOption {
|
|
736
|
-
readonly id:
|
|
730
|
+
readonly id: AssetId;
|
|
737
731
|
readonly symbol: string;
|
|
738
732
|
readonly availableDisplay: string;
|
|
739
733
|
}
|
|
@@ -768,7 +762,7 @@ interface CapxulSendMoneyProps {
|
|
|
768
762
|
readonly onFailed: (error: CapxulError) => void;
|
|
769
763
|
readonly children: ReactNode;
|
|
770
764
|
}
|
|
771
|
-
declare function Root$
|
|
765
|
+
declare function Root$5({ actor, onSent, onFailed, children }: CapxulSendMoneyProps): import("react/jsx-runtime").JSX.Element;
|
|
772
766
|
declare function Source({ children }: {
|
|
773
767
|
readonly children: (slice: SendMoneySourceSlice) => ReactNode;
|
|
774
768
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -785,7 +779,7 @@ declare function Actions$1({ children }: {
|
|
|
785
779
|
readonly children: (slice: SendMoneyActionsSlice) => ReactNode;
|
|
786
780
|
}): import("react/jsx-runtime").JSX.Element;
|
|
787
781
|
/** The compound shape the app's own design system already uses (`StatusTabs`). */
|
|
788
|
-
declare const CapxulSendMoney: typeof Root$
|
|
782
|
+
declare const CapxulSendMoney: typeof Root$5 & {
|
|
789
783
|
Source: typeof Source;
|
|
790
784
|
Asset: typeof Asset$1;
|
|
791
785
|
Amount: typeof Amount;
|
|
@@ -817,7 +811,7 @@ interface CapxulOrgMemberProps {
|
|
|
817
811
|
readonly orgId: OrgId | string | undefined;
|
|
818
812
|
readonly children: ReactNode;
|
|
819
813
|
}
|
|
820
|
-
declare function Root$
|
|
814
|
+
declare function Root$4({ orgId, children }: CapxulOrgMemberProps): import("react/jsx-runtime").JSX.Element;
|
|
821
815
|
/**
|
|
822
816
|
* One part serves all four denial idioms the app already uses: disabled with no
|
|
823
817
|
* explanation, disabled plus a native `title`, a whole-surface swap, and
|
|
@@ -832,7 +826,7 @@ declare function Standing({ children }: {
|
|
|
832
826
|
readonly children: (slice: OrgMemberStandingSlice) => ReactNode;
|
|
833
827
|
}): import("react/jsx-runtime").JSX.Element;
|
|
834
828
|
/** The compound shape the app's own design system already uses (`StatusTabs`). */
|
|
835
|
-
declare const CapxulOrgMember: typeof Root$
|
|
829
|
+
declare const CapxulOrgMember: typeof Root$4 & {
|
|
836
830
|
Can: typeof Can;
|
|
837
831
|
Standing: typeof Standing;
|
|
838
832
|
};
|
|
@@ -868,9 +862,9 @@ interface CapxulDashboardAccessProps {
|
|
|
868
862
|
readonly scope: DashboardScope;
|
|
869
863
|
readonly children: ReactNode;
|
|
870
864
|
}
|
|
871
|
-
declare function Root$
|
|
865
|
+
declare function Root$3({ scope, children }: CapxulDashboardAccessProps): import("react/jsx-runtime").JSX.Element;
|
|
872
866
|
/** Hands nothing — today's app renders `null` here, exactly as it does now. */
|
|
873
|
-
declare function Checking({ children }: {
|
|
867
|
+
declare function Checking$1({ children }: {
|
|
874
868
|
readonly children?: ReactNode;
|
|
875
869
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
876
870
|
declare function DashboardError({ children }: {
|
|
@@ -889,8 +883,8 @@ declare function Granted({ children }: {
|
|
|
889
883
|
readonly children?: ReactNode;
|
|
890
884
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
891
885
|
/** The compound shape the app's own design system already uses (`StatusTabs`). */
|
|
892
|
-
declare const CapxulDashboardAccess: typeof Root$
|
|
893
|
-
Checking: typeof Checking;
|
|
886
|
+
declare const CapxulDashboardAccess: typeof Root$3 & {
|
|
887
|
+
Checking: typeof Checking$1;
|
|
894
888
|
Error: typeof DashboardError;
|
|
895
889
|
Redirect: typeof Redirect;
|
|
896
890
|
Granted: typeof Granted;
|
|
@@ -938,7 +932,7 @@ interface CapxulPayrollProps {
|
|
|
938
932
|
readonly orgId: OrgId | undefined;
|
|
939
933
|
readonly children: ReactNode;
|
|
940
934
|
}
|
|
941
|
-
declare function Root$
|
|
935
|
+
declare function Root$2({ orgId, children }: CapxulPayrollProps): import("react/jsx-runtime").JSX.Element;
|
|
942
936
|
declare function Summary$1({ children }: {
|
|
943
937
|
readonly children: (slice: PayrollSummarySlice) => ReactNode;
|
|
944
938
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -950,7 +944,7 @@ declare function Groups({ children }: {
|
|
|
950
944
|
* There is NO `.Runs` part (ruling Q6): no shipped region has the right shape
|
|
951
945
|
* for a run list, and a part without a production caller may not ship.
|
|
952
946
|
*/
|
|
953
|
-
declare const CapxulPayroll: typeof Root$
|
|
947
|
+
declare const CapxulPayroll: typeof Root$2 & {
|
|
954
948
|
Summary: typeof Summary$1;
|
|
955
949
|
Groups: typeof Groups;
|
|
956
950
|
};
|
|
@@ -972,10 +966,10 @@ interface PayrollRecipientOption {
|
|
|
972
966
|
//#region src/headless/payroll/use-payroll-run.d.ts
|
|
973
967
|
/**
|
|
974
968
|
* Refusal CODES, never sentences (ADR-0023 R1). `blockedReason` names the FIRST
|
|
975
|
-
* false fact in the fixed order
|
|
976
|
-
*
|
|
969
|
+
* false fact in the fixed order below, so the same composer state always
|
|
970
|
+
* yields the same code.
|
|
977
971
|
*/
|
|
978
|
-
type CapxulPayrollRunBlockedReason = "signer-not-ready" | "no-source" | "ambiguous-source" | "no-asset" | "no-recipients" | "amount-invalid" | "insufficient-funds";
|
|
972
|
+
type CapxulPayrollRunBlockedReason = "signer-not-ready" | "no-source" | "ambiguous-source" | "no-asset" | "no-recipients" | "amount-invalid" | "insufficient-funds" | "asset-unnamed";
|
|
979
973
|
interface PayrollRunGroupOption {
|
|
980
974
|
readonly id: PayrollGroupId;
|
|
981
975
|
readonly label: string;
|
|
@@ -1002,7 +996,7 @@ interface PayrollRunAmountEntry {
|
|
|
1002
996
|
/** True while the value is one we seeded and the employer has not edited. */
|
|
1003
997
|
readonly prefilled: boolean;
|
|
1004
998
|
/** The treasury asset's currency. Rows stay absent until this value exists. */
|
|
1005
|
-
readonly currency:
|
|
999
|
+
readonly currency: string;
|
|
1006
1000
|
}
|
|
1007
1001
|
interface PayrollRunAmountsSlice {
|
|
1008
1002
|
readonly entries: readonly PayrollRunAmountEntry[];
|
|
@@ -1055,7 +1049,7 @@ interface CapxulPayrollRunProps {
|
|
|
1055
1049
|
readonly onFailed: (error: CapxulError) => void;
|
|
1056
1050
|
readonly children: ReactNode;
|
|
1057
1051
|
}
|
|
1058
|
-
declare function Root({ orgId, prefill, onRun, onFailed, children }: CapxulPayrollRunProps): import("react/jsx-runtime").JSX.Element;
|
|
1052
|
+
declare function Root$1({ orgId, prefill, onRun, onFailed, children }: CapxulPayrollRunProps): import("react/jsx-runtime").JSX.Element;
|
|
1059
1053
|
declare function Recipients({ children }: {
|
|
1060
1054
|
readonly children: (slice: PayrollRunRecipientsSlice) => ReactNode;
|
|
1061
1055
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1072,7 +1066,7 @@ declare function Actions({ children }: {
|
|
|
1072
1066
|
readonly children: (slice: PayrollRunActionsSlice) => ReactNode;
|
|
1073
1067
|
}): import("react/jsx-runtime").JSX.Element;
|
|
1074
1068
|
/** The compound shape the app's own design system already uses (`StatusTabs`). */
|
|
1075
|
-
declare const CapxulPayrollRun: typeof Root & {
|
|
1069
|
+
declare const CapxulPayrollRun: typeof Root$1 & {
|
|
1076
1070
|
Recipients: typeof Recipients;
|
|
1077
1071
|
Amounts: typeof Amounts;
|
|
1078
1072
|
Asset: typeof Asset;
|
|
@@ -1080,6 +1074,64 @@ declare const CapxulPayrollRun: typeof Root & {
|
|
|
1080
1074
|
Actions: typeof Actions;
|
|
1081
1075
|
};
|
|
1082
1076
|
//#endregion
|
|
1077
|
+
//#region src/headless/client-connection/use-client-connection.d.ts
|
|
1078
|
+
interface OtpSlice {
|
|
1079
|
+
readonly email: string;
|
|
1080
|
+
readonly pending: boolean;
|
|
1081
|
+
readonly canResend: boolean;
|
|
1082
|
+
readonly verifyCode: (code: string) => Promise<void>;
|
|
1083
|
+
readonly resend: () => Promise<void>;
|
|
1084
|
+
}
|
|
1085
|
+
interface ConsentSlice {
|
|
1086
|
+
readonly verifiedEmail: string;
|
|
1087
|
+
readonly clientLabel: string;
|
|
1088
|
+
readonly scopeCodes: readonly string[];
|
|
1089
|
+
readonly purpose: "login" | "signup";
|
|
1090
|
+
readonly setupState: "not_required" | "new" | "resumable";
|
|
1091
|
+
readonly pending: boolean;
|
|
1092
|
+
readonly accept: () => Promise<void>;
|
|
1093
|
+
readonly cancel: () => Promise<void>;
|
|
1094
|
+
}
|
|
1095
|
+
interface CompleteSlice {
|
|
1096
|
+
readonly outcome: "connected";
|
|
1097
|
+
}
|
|
1098
|
+
interface FailureSlice {
|
|
1099
|
+
readonly code: string;
|
|
1100
|
+
readonly field?: string;
|
|
1101
|
+
readonly retry: () => Promise<void>;
|
|
1102
|
+
readonly cancel: () => Promise<void>;
|
|
1103
|
+
}
|
|
1104
|
+
//#endregion
|
|
1105
|
+
//#region src/headless/client-connection/client-connection.d.ts
|
|
1106
|
+
interface CapxulClientConnectionProps {
|
|
1107
|
+
readonly client: CapxulClient;
|
|
1108
|
+
readonly requestId: string;
|
|
1109
|
+
readonly children: ReactNode;
|
|
1110
|
+
}
|
|
1111
|
+
declare function Root({ client, requestId, children }: CapxulClientConnectionProps): import("react/jsx-runtime").JSX.Element;
|
|
1112
|
+
declare function Checking({ children }: {
|
|
1113
|
+
readonly children: ReactNode;
|
|
1114
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
1115
|
+
declare function Otp({ children }: {
|
|
1116
|
+
readonly children: (slice: OtpSlice) => ReactNode;
|
|
1117
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
1118
|
+
declare function Consent({ children }: {
|
|
1119
|
+
readonly children: (slice: ConsentSlice) => ReactNode;
|
|
1120
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
1121
|
+
declare function Complete({ children }: {
|
|
1122
|
+
readonly children: (slice: CompleteSlice) => ReactNode;
|
|
1123
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
1124
|
+
declare function Failure({ children }: {
|
|
1125
|
+
readonly children: (slice: FailureSlice) => ReactNode;
|
|
1126
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
1127
|
+
declare const CapxulClientConnection: typeof Root & {
|
|
1128
|
+
Checking: typeof Checking;
|
|
1129
|
+
Otp: typeof Otp;
|
|
1130
|
+
Consent: typeof Consent;
|
|
1131
|
+
Complete: typeof Complete;
|
|
1132
|
+
Failure: typeof Failure;
|
|
1133
|
+
};
|
|
1134
|
+
//#endregion
|
|
1083
1135
|
//#region src/internal/reactivity-keys.d.ts
|
|
1084
1136
|
declare const capxulKeys: {
|
|
1085
1137
|
root: readonly ["capxul"];
|
|
@@ -1110,4 +1162,4 @@ declare const capxulKeys: {
|
|
|
1110
1162
|
payment: (paymentId: string | undefined) => readonly ["capxul", "payments", string];
|
|
1111
1163
|
};
|
|
1112
1164
|
//#endregion
|
|
1113
|
-
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 CreateOrganizationFailure, type CreateOrganizationSubmission, type CsvExport, type DashboardAccessErrorSlice, type DashboardAccessPhase, type DashboardAccessProbe, type DashboardAccessRedirectSlice, type DashboardScope, type Destination, type FaultedState, type HandleAvailability, 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 SendMoneyRecipientSlice, type SendMoneyRecipientStatus, type SendMoneySourceError, type SendMoneySourceOption, type SendMoneySourceSlice, type SendResult, type SentPayment, type SentPayrollRun, type SignedOutState, type Slot, type SummaryWindow, type UseCapxulAccountBalanceOptions, type UseCapxulAccountBalanceReturn, type UseCapxulAccountFundReturn, type UseCapxulCreateCommitmentReturn, type UseCapxulCreateOrgReturn, type UseCapxulHandleAvailabilityReturn, type UseCapxulImageUploadReturn, type
|
|
1165
|
+
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, CapxulClientConnection, type CapxulClientConnectionProps, 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 CompleteSlice as ClientConnectionCompleteSlice, type ConsentSlice as ClientConnectionConsentSlice, type FailureSlice as ClientConnectionFailureSlice, type OtpSlice as ClientConnectionOtpSlice, 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 CreateOrganizationFailure, type CreateOrganizationSubmission, type CsvExport, type DashboardAccessErrorSlice, type DashboardAccessPhase, type DashboardAccessProbe, type DashboardAccessRedirectSlice, type DashboardScope, type Destination, type FaultedState, type HandleAvailability, 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 SendMoneyRecipientSlice, type SendMoneyRecipientStatus, type SendMoneySourceError, type SendMoneySourceOption, type SendMoneySourceSlice, type SendResult, type SentPayment, type SentPayrollRun, type SignedOutState, type Slot, type SummaryWindow, type UseCapxulAccountBalanceOptions, type UseCapxulAccountBalanceReturn, type UseCapxulAccountFundReturn, type UseCapxulCreateCommitmentReturn, type UseCapxulCreateOrgReturn, type UseCapxulHandleAvailabilityReturn, type UseCapxulImageUploadReturn, 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 UseCapxulUploadImageReturn, 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, useCapxulHandleAvailability, useCapxulHoldings, useCapxulIdentity, useCapxulImageUpload, useCapxulOrgMembers, useCapxulOrgRoles, useCapxulOrgTreasury, useCapxulOrganizationPay, useCapxulOrganizationPayBatch, useCapxulOrgs, useCapxulPay, useCapxulPayment, useCapxulPayments, useCapxulPermission, useCapxulPermissionAssign, useCapxulPermissionChange, useCapxulPermissionCreate, useCapxulPermissionReplace, useCapxulPermissionRevoke, useCapxulPermissions, useCapxulProfile, useCapxulRedirectPayment, useCapxulSend, useCapxulTransitions, useCapxulUploadImage };
|