@capxul/sdk-react 2.1.1 → 2.3.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/README.md +13 -0
- package/dist/{controllers-D3_Q5d2t.d.mts → controllers-BT4YzBr9.d.mts} +1 -1
- package/dist/{controllers-Chqyy3HR.mjs → controllers-VwUPB619.mjs} +24 -0
- package/dist/index.d.mts +320 -3
- package/dist/index.mjs +777 -229
- package/dist/testing/index.d.mts +1 -1
- package/dist/testing/index.mjs +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -35,6 +35,19 @@ export function Providers({ children }: { children: React.ReactNode }) {
|
|
|
35
35
|
- Rich-data hooks such as `useCapxulProfile`, `useCapxulOrgs`, members, roles,
|
|
36
36
|
treasury, and money hooks remain TanStack Query projections. Personal
|
|
37
37
|
holdings and activity reads start only after the Account is claimed.
|
|
38
|
+
- `CapxulSendMoney` is the compound send component. One root owns the send
|
|
39
|
+
behaviour and draws nothing. The `.Asset`, `.Amount`, `.Recipient`, and
|
|
40
|
+
`.Actions` region parts each hand the screen one finished slice. The engine
|
|
41
|
+
hook stays module-scoped. This release ships the personal actor path;
|
|
42
|
+
`.Source` and the organization path follow the Access & session budgets
|
|
43
|
+
read.
|
|
44
|
+
- `CapxulContacts` is the compound address-book component. One root owns the
|
|
45
|
+
book behaviour and draws nothing. The `.Summary`, `.List`, and `.Add` region
|
|
46
|
+
parts each hand the screen one finished slice, and a `.List` row carries its
|
|
47
|
+
own `rename`, `hide`, and `unhide` verbs. A screen places any subset. Both
|
|
48
|
+
actor paths ship: a personal actor reads the account book, and an
|
|
49
|
+
organization actor reads the organization book. The `managePeople` capability
|
|
50
|
+
gate stays in the app, on `CapxulOrgMember.Can`.
|
|
38
51
|
|
|
39
52
|
The packed npm package exposes `@capxul/sdk-react` and
|
|
40
53
|
`@capxul/sdk-react/testing`. The workspace-only `@capxul/sdk-react/headless`
|
|
@@ -82,7 +82,7 @@ type OtpPendingState = Extract<IdentityState, {
|
|
|
82
82
|
phase: "otp_pending";
|
|
83
83
|
}>;
|
|
84
84
|
type PendingAuthState = Extract<IdentityState, {
|
|
85
|
-
phase: "otp_sending" | "otp_verifying" | "signing_out";
|
|
85
|
+
phase: "restoring" | "otp_sending" | "otp_verifying" | "signing_out";
|
|
86
86
|
}>;
|
|
87
87
|
type FaultedState = Extract<IdentityState, {
|
|
88
88
|
phase: "faulted";
|
|
@@ -80,6 +80,29 @@ const capxulKeys = {
|
|
|
80
80
|
orgId ?? "pending",
|
|
81
81
|
"permissions"
|
|
82
82
|
],
|
|
83
|
+
orgMe: (orgId) => [
|
|
84
|
+
"capxul",
|
|
85
|
+
"org",
|
|
86
|
+
orgId ?? "pending",
|
|
87
|
+
"me"
|
|
88
|
+
],
|
|
89
|
+
orgLifecycle: (orgId) => [
|
|
90
|
+
"capxul",
|
|
91
|
+
"org",
|
|
92
|
+
orgId ?? "pending",
|
|
93
|
+
"lifecycle"
|
|
94
|
+
],
|
|
95
|
+
contacts: (scope) => [
|
|
96
|
+
"capxul",
|
|
97
|
+
"contacts",
|
|
98
|
+
scope
|
|
99
|
+
],
|
|
100
|
+
contactsList: (scope, includeHidden) => [
|
|
101
|
+
"capxul",
|
|
102
|
+
"contacts",
|
|
103
|
+
scope,
|
|
104
|
+
includeHidden ? "all" : "visible"
|
|
105
|
+
],
|
|
83
106
|
activity: ["capxul", "activity"],
|
|
84
107
|
activityDetail: (reference) => [
|
|
85
108
|
"capxul",
|
|
@@ -583,6 +606,7 @@ function CapxulAuthenticationController({ slots }) {
|
|
|
583
606
|
verifyCode: auth.verifyCode,
|
|
584
607
|
back: () => action(send, { _tag: "Reset" })
|
|
585
608
|
});
|
|
609
|
+
case "restoring":
|
|
586
610
|
case "otp_sending":
|
|
587
611
|
case "otp_verifying":
|
|
588
612
|
case "signing_out": return slots.pending({ state });
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
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
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { QueryClient, UseMutationResult, UseQueryResult } from "@tanstack/react-query";
|
|
4
|
-
import { Account, AccountRequirement, ActivityAnnotationInput, ActivityDetail, ActivityListParams, ActivityPage, ActivityReference, CapxulClient, CapxulError, CapxulSigner, CreateOrgInput, CurrentHoldings, HostObservability, InviteMemberInput, MemberView, Money, MovementAnnotation, OrgId, OrgView, OrganizationPaymentBatchInput, OrganizationPaymentInput, Payment, PaymentTiming, PaymentsPayInput, Permission, PermissionReadResult, Profile, RoleView } from "@capxul/sdk";
|
|
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";
|
|
5
5
|
|
|
6
6
|
//#region src/provider.d.ts
|
|
7
7
|
type CapxulProviderSharedProps = {
|
|
@@ -112,6 +112,7 @@ type Address = Brand<string, "Address">;
|
|
|
112
112
|
type PermissionId = Brand<string, "PermissionId">;
|
|
113
113
|
type PermissionAssignmentId = Brand<string, "PermissionAssignmentId">;
|
|
114
114
|
type PaymentCommandId = Brand<string, "PaymentCommandId">;
|
|
115
|
+
type OrgId$1 = Brand<string, "OrgId">;
|
|
115
116
|
type WeiAmount = Brand<string, "WeiAmount">;
|
|
116
117
|
type RoleKey = Brand<string, "RoleKey">;
|
|
117
118
|
type AllowanceKey = Brand<string, "AllowanceKey">;
|
|
@@ -517,4 +518,320 @@ type UseCapxulImageUploadReturn = UseMutationResult<{
|
|
|
517
518
|
*/
|
|
518
519
|
declare function useCapxulImageUpload(): UseCapxulImageUploadReturn;
|
|
519
520
|
//#endregion
|
|
520
|
-
|
|
521
|
+
//#region src/headless/contacts/use-contacts.d.ts
|
|
522
|
+
type ContactsActor = {
|
|
523
|
+
readonly kind: "personal";
|
|
524
|
+
} | {
|
|
525
|
+
readonly kind: "organization";
|
|
526
|
+
readonly orgId: OrgId$1 | undefined;
|
|
527
|
+
};
|
|
528
|
+
/**
|
|
529
|
+
* How a contact entered the book. Taken from the shipped surface rather than
|
|
530
|
+
* re-declared, so the component can never advertise a provenance the wire
|
|
531
|
+
* cannot carry (ADR-0022 R2; #1532 owns the definition site).
|
|
532
|
+
*/
|
|
533
|
+
type ContactRelationship = AddressBookEntry["relationship"][number];
|
|
534
|
+
interface Contact {
|
|
535
|
+
/**
|
|
536
|
+
* The counterparty's `PartyId` — created once and claimed at signup, never
|
|
537
|
+
* re-keyed (ADR-0022 R1/R3). No email, no prefix, nothing to parse.
|
|
538
|
+
*/
|
|
539
|
+
readonly id: PartyId;
|
|
540
|
+
/** The saved label when there is one, else the party's display name. */
|
|
541
|
+
readonly name: string;
|
|
542
|
+
readonly relationship: readonly ContactRelationship[];
|
|
543
|
+
readonly hidden: boolean;
|
|
544
|
+
/** Epoch milliseconds. The seam never formats a date; the app writes the words. */
|
|
545
|
+
readonly lastActivityAt: number;
|
|
546
|
+
}
|
|
547
|
+
interface ContactRow extends Contact {
|
|
548
|
+
/** Ours: one initials rule, not one copy per screen. */
|
|
549
|
+
readonly initials: string;
|
|
550
|
+
readonly rename: (name: string) => void;
|
|
551
|
+
readonly hide: () => void;
|
|
552
|
+
readonly unhide: () => void;
|
|
553
|
+
}
|
|
554
|
+
/** ADR-0023 R1: refusal CODES, never sentences — the app owns the words. */
|
|
555
|
+
type ContactsRefusal = "loading" | "org-unavailable" | "unavailable";
|
|
556
|
+
/**
|
|
557
|
+
* The blocked facts, in the fixed order `.Add.blockedReason` names them.
|
|
558
|
+
* `"no-permission"` is absent by ruling, not by omission: the org screen places
|
|
559
|
+
* `CapxulOrgMember.Can do="managePeople"` around its own Add control.
|
|
560
|
+
*/
|
|
561
|
+
type ContactsAddBlockedReason = "org-unavailable" | "empty";
|
|
562
|
+
/**
|
|
563
|
+
* Why an add did not land, as a code. ADR-0023 R1 supersedes the contract's
|
|
564
|
+
* field-message carve-out: `"unresolved"` is the backend refusing to resolve
|
|
565
|
+
* what was typed (`INVALID_INPUT`), and every other code — offline, signed
|
|
566
|
+
* out, refused — is `"failed"`. A person can fix only one of them.
|
|
567
|
+
*/
|
|
568
|
+
type ContactsAddError = "unresolved" | "failed";
|
|
569
|
+
interface ContactsSummarySlice {
|
|
570
|
+
readonly total: number | null;
|
|
571
|
+
readonly activeCount: number | null;
|
|
572
|
+
readonly isLoading: boolean;
|
|
573
|
+
readonly reason: ContactsRefusal | null;
|
|
574
|
+
}
|
|
575
|
+
interface ContactsListSlice {
|
|
576
|
+
readonly rows: readonly ContactRow[];
|
|
577
|
+
readonly isLoading: boolean;
|
|
578
|
+
readonly reason: ContactsRefusal | null;
|
|
579
|
+
}
|
|
580
|
+
interface ContactsListOptions {
|
|
581
|
+
readonly limit?: number | undefined;
|
|
582
|
+
/** `"all"` forwards `includeHidden` to the backend, which already accepts it. */
|
|
583
|
+
readonly show?: "visible" | "all" | undefined;
|
|
584
|
+
}
|
|
585
|
+
interface ContactsAddSlice {
|
|
586
|
+
readonly value: string;
|
|
587
|
+
readonly change: (text: string) => void;
|
|
588
|
+
readonly submit: () => void;
|
|
589
|
+
readonly isSubmitting: boolean;
|
|
590
|
+
readonly blocked: boolean;
|
|
591
|
+
readonly blockedReason: ContactsAddBlockedReason | null;
|
|
592
|
+
readonly error: ContactsAddError | null;
|
|
593
|
+
}
|
|
594
|
+
//#endregion
|
|
595
|
+
//#region src/headless/contacts/contacts.d.ts
|
|
596
|
+
interface CapxulContactsProps {
|
|
597
|
+
readonly actor: ContactsActor;
|
|
598
|
+
readonly onAdded: (contact: Contact) => void;
|
|
599
|
+
/** ADR-0023 R1: the app maps `error.code` to its own copy; no SDK sentence. */
|
|
600
|
+
readonly onFailed: (error: CapxulError) => void;
|
|
601
|
+
readonly children: ReactNode;
|
|
602
|
+
}
|
|
603
|
+
declare function Root$3({
|
|
604
|
+
actor,
|
|
605
|
+
onAdded,
|
|
606
|
+
onFailed,
|
|
607
|
+
children
|
|
608
|
+
}: CapxulContactsProps): import("react/jsx-runtime").JSX.Element;
|
|
609
|
+
declare function Summary({
|
|
610
|
+
children
|
|
611
|
+
}: {
|
|
612
|
+
readonly children: (slice: ContactsSummarySlice) => ReactNode;
|
|
613
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
614
|
+
declare function List({
|
|
615
|
+
limit,
|
|
616
|
+
show,
|
|
617
|
+
children
|
|
618
|
+
}: ContactsListOptions & {
|
|
619
|
+
readonly children: (slice: ContactsListSlice) => ReactNode;
|
|
620
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
621
|
+
declare function Add({
|
|
622
|
+
children
|
|
623
|
+
}: {
|
|
624
|
+
readonly children: (slice: ContactsAddSlice) => ReactNode;
|
|
625
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
626
|
+
/** The compound shape the app's own design system already uses (`StatusTabs`). */
|
|
627
|
+
declare const CapxulContacts: typeof Root$3 & {
|
|
628
|
+
Summary: typeof Summary;
|
|
629
|
+
List: typeof List;
|
|
630
|
+
Add: typeof Add;
|
|
631
|
+
};
|
|
632
|
+
//#endregion
|
|
633
|
+
//#region src/headless/send-money/use-recipient-resolution.d.ts
|
|
634
|
+
type SendMoneyRecipientMethod = "username" | "email-address";
|
|
635
|
+
type SendMoneyRecipientStatus = "empty" | "checking" | "found" | "not-found" | "failed";
|
|
636
|
+
interface SendMoneyRecipientSlice {
|
|
637
|
+
readonly method: SendMoneyRecipientMethod;
|
|
638
|
+
readonly setMethod: (method: SendMoneyRecipientMethod) => void;
|
|
639
|
+
readonly value: string;
|
|
640
|
+
readonly change: (text: string) => void;
|
|
641
|
+
/** ADR-0023 R1: the status IS the failure code; the app owns the sentence. */
|
|
642
|
+
readonly status: SendMoneyRecipientStatus;
|
|
643
|
+
readonly label: string | null;
|
|
644
|
+
}
|
|
645
|
+
//#endregion
|
|
646
|
+
//#region src/headless/send-money/use-send-money.d.ts
|
|
647
|
+
type SendActor = {
|
|
648
|
+
readonly kind: "personal";
|
|
649
|
+
} | {
|
|
650
|
+
readonly kind: "organization";
|
|
651
|
+
readonly orgId: OrgId$1 | undefined;
|
|
652
|
+
};
|
|
653
|
+
type SentPayment = {
|
|
654
|
+
/** The backend payment row. */readonly payment: Payment; /** What we parsed and sent — `.value` is the comma-stripped major-unit string. */
|
|
655
|
+
readonly amount: Money; /** The trimmed text the person typed — the app's success toast interpolates it. */
|
|
656
|
+
readonly recipient: string;
|
|
657
|
+
};
|
|
658
|
+
/**
|
|
659
|
+
* Refusal CODES, never sentences (#1447 ruling 8). The app maps each code to
|
|
660
|
+
* the words it already prints; no English refusal string ships from here.
|
|
661
|
+
*/
|
|
662
|
+
type CapxulSendMoneyBlockedReason = "signer-not-ready" | "amount-invalid" | "recipient-unresolved" | "no-source" | "no-asset";
|
|
663
|
+
interface SendMoneyAssetOption {
|
|
664
|
+
readonly id: string;
|
|
665
|
+
readonly symbol: string;
|
|
666
|
+
readonly availableDisplay: string;
|
|
667
|
+
}
|
|
668
|
+
/** ADR-0023 R1: a code, never a sentence — the app owns the words. */
|
|
669
|
+
type SendMoneyAssetError = "read-failed";
|
|
670
|
+
interface SendMoneyAssetSlice {
|
|
671
|
+
readonly options: ReadonlyArray<SendMoneyAssetOption>;
|
|
672
|
+
readonly selected: SendMoneyAssetOption | null;
|
|
673
|
+
readonly select: (id: string) => void;
|
|
674
|
+
readonly error: SendMoneyAssetError | null;
|
|
675
|
+
}
|
|
676
|
+
interface SendMoneyAmountSlice {
|
|
677
|
+
readonly value: string;
|
|
678
|
+
readonly change: (text: string) => void;
|
|
679
|
+
/** ADR-0023 R1: the parse verdict as a closed code; the app maps it to copy. */
|
|
680
|
+
readonly error: MoneyParseErrorReason | null;
|
|
681
|
+
readonly availableDisplay: string | null;
|
|
682
|
+
}
|
|
683
|
+
interface SendMoneyActionsSlice {
|
|
684
|
+
readonly submit: () => void;
|
|
685
|
+
readonly isSubmitting: boolean;
|
|
686
|
+
readonly blocked: boolean;
|
|
687
|
+
readonly blockedReason: CapxulSendMoneyBlockedReason | null;
|
|
688
|
+
}
|
|
689
|
+
//#endregion
|
|
690
|
+
//#region src/headless/send-money/send-money.d.ts
|
|
691
|
+
interface CapxulSendMoneyProps {
|
|
692
|
+
readonly actor: SendActor;
|
|
693
|
+
readonly onSent: (sent: SentPayment) => void;
|
|
694
|
+
/** ADR-0023 R1: the app maps `error.code` to its own copy; no SDK sentence. */
|
|
695
|
+
readonly onFailed: (error: CapxulError) => void;
|
|
696
|
+
readonly children: ReactNode;
|
|
697
|
+
}
|
|
698
|
+
declare function Root$2({
|
|
699
|
+
actor,
|
|
700
|
+
onSent,
|
|
701
|
+
onFailed,
|
|
702
|
+
children
|
|
703
|
+
}: CapxulSendMoneyProps): import("react/jsx-runtime").JSX.Element;
|
|
704
|
+
declare function Asset({
|
|
705
|
+
children
|
|
706
|
+
}: {
|
|
707
|
+
readonly children: (slice: SendMoneyAssetSlice) => ReactNode;
|
|
708
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
709
|
+
declare function Amount({
|
|
710
|
+
children
|
|
711
|
+
}: {
|
|
712
|
+
readonly children: (slice: SendMoneyAmountSlice) => ReactNode;
|
|
713
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
714
|
+
declare function Recipient({
|
|
715
|
+
children
|
|
716
|
+
}: {
|
|
717
|
+
readonly children: (slice: SendMoneyRecipientSlice) => ReactNode;
|
|
718
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
719
|
+
declare function Actions({
|
|
720
|
+
children
|
|
721
|
+
}: {
|
|
722
|
+
readonly children: (slice: SendMoneyActionsSlice) => ReactNode;
|
|
723
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
724
|
+
/** The compound shape the app's own design system already uses (`StatusTabs`). */
|
|
725
|
+
declare const CapxulSendMoney: typeof Root$2 & {
|
|
726
|
+
Asset: typeof Asset;
|
|
727
|
+
Amount: typeof Amount;
|
|
728
|
+
Recipient: typeof Recipient;
|
|
729
|
+
Actions: typeof Actions;
|
|
730
|
+
};
|
|
731
|
+
//#endregion
|
|
732
|
+
//#region src/headless/access/org-member.d.ts
|
|
733
|
+
/** The two enforcement facts, named the way a screen asks for them. */
|
|
734
|
+
type OrgMemberAction = "spend" | "managePeople";
|
|
735
|
+
/**
|
|
736
|
+
* Why an action is refused — a closed list of CODES (ruling R1). `null` exactly
|
|
737
|
+
* when the action is allowed. The app owns every sentence these map to.
|
|
738
|
+
*/
|
|
739
|
+
type CanReason = "loading" | "no-permission" | "org-unavailable" | null;
|
|
740
|
+
interface OrgMemberCanSlice {
|
|
741
|
+
/** FAILS CLOSED: `false` until the read settles. */
|
|
742
|
+
readonly allowed: boolean;
|
|
743
|
+
readonly isLoading: boolean;
|
|
744
|
+
readonly reason: CanReason;
|
|
745
|
+
}
|
|
746
|
+
type OrgMemberStanding = "loading" | "unavailable" | "active" | "restricted";
|
|
747
|
+
interface OrgMemberStandingSlice {
|
|
748
|
+
readonly standing: OrgMemberStanding;
|
|
749
|
+
/** `standing === "active"` guarantees this is non-null — see the rule below. */
|
|
750
|
+
readonly roleLabel: string | null;
|
|
751
|
+
}
|
|
752
|
+
interface CapxulOrgMemberProps {
|
|
753
|
+
readonly orgId: OrgId | string | undefined;
|
|
754
|
+
readonly children: ReactNode;
|
|
755
|
+
}
|
|
756
|
+
declare function Root$1({
|
|
757
|
+
orgId,
|
|
758
|
+
children
|
|
759
|
+
}: CapxulOrgMemberProps): import("react/jsx-runtime").JSX.Element;
|
|
760
|
+
/**
|
|
761
|
+
* One part serves all four denial idioms the app already uses: disabled with no
|
|
762
|
+
* explanation, disabled plus a native `title`, a whole-surface swap, and
|
|
763
|
+
* buttons that vanish. The part branches on nothing — the root computes both
|
|
764
|
+
* slices and this picks the one the `do` prop names.
|
|
765
|
+
*/
|
|
766
|
+
declare function Can({
|
|
767
|
+
do: action,
|
|
768
|
+
children
|
|
769
|
+
}: {
|
|
770
|
+
readonly do: OrgMemberAction;
|
|
771
|
+
readonly children: (slice: OrgMemberCanSlice) => ReactNode;
|
|
772
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
773
|
+
declare function Standing({
|
|
774
|
+
children
|
|
775
|
+
}: {
|
|
776
|
+
readonly children: (slice: OrgMemberStandingSlice) => ReactNode;
|
|
777
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
778
|
+
/** The compound shape the app's own design system already uses (`StatusTabs`). */
|
|
779
|
+
declare const CapxulOrgMember: typeof Root$1 & {
|
|
780
|
+
Can: typeof Can;
|
|
781
|
+
Standing: typeof Standing;
|
|
782
|
+
};
|
|
783
|
+
//#endregion
|
|
784
|
+
//#region src/headless/access/dashboard-access.d.ts
|
|
785
|
+
type DashboardScope = {
|
|
786
|
+
readonly kind: "personal";
|
|
787
|
+
} | {
|
|
788
|
+
readonly kind: "organization";
|
|
789
|
+
readonly orgId?: string;
|
|
790
|
+
};
|
|
791
|
+
type DashboardAccessPhase = "checking" | "error" | "redirect" | "granted";
|
|
792
|
+
interface DashboardAccessErrorSlice {
|
|
793
|
+
readonly error: CapxulError;
|
|
794
|
+
/** Re-runs each failed probe. */
|
|
795
|
+
readonly retry: () => void;
|
|
796
|
+
}
|
|
797
|
+
interface DashboardAccessRedirectSlice {
|
|
798
|
+
readonly destination: IdentityDestination;
|
|
799
|
+
}
|
|
800
|
+
interface CapxulDashboardAccessProps {
|
|
801
|
+
readonly scope: DashboardScope;
|
|
802
|
+
readonly children: ReactNode;
|
|
803
|
+
}
|
|
804
|
+
declare function Root({
|
|
805
|
+
scope,
|
|
806
|
+
children
|
|
807
|
+
}: CapxulDashboardAccessProps): import("react/jsx-runtime").JSX.Element;
|
|
808
|
+
/** Hands nothing — today's app renders `null` here, exactly as it does now. */
|
|
809
|
+
declare function Checking({
|
|
810
|
+
children
|
|
811
|
+
}: {
|
|
812
|
+
readonly children?: ReactNode;
|
|
813
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
814
|
+
declare function DashboardError({
|
|
815
|
+
children
|
|
816
|
+
}: {
|
|
817
|
+
readonly children: (slice: DashboardAccessErrorSlice) => ReactNode;
|
|
818
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
819
|
+
declare function Redirect({
|
|
820
|
+
children
|
|
821
|
+
}: {
|
|
822
|
+
readonly children: (slice: DashboardAccessRedirectSlice) => ReactNode;
|
|
823
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
824
|
+
declare function Granted({
|
|
825
|
+
children
|
|
826
|
+
}: {
|
|
827
|
+
readonly children?: ReactNode;
|
|
828
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
829
|
+
/** The compound shape the app's own design system already uses (`StatusTabs`). */
|
|
830
|
+
declare const CapxulDashboardAccess: typeof Root & {
|
|
831
|
+
Checking: typeof Checking;
|
|
832
|
+
Error: typeof DashboardError;
|
|
833
|
+
Redirect: typeof Redirect;
|
|
834
|
+
Granted: typeof Granted;
|
|
835
|
+
};
|
|
836
|
+
//#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 };
|