@capitalos/react 1.5.0-rc.1 → 1.6.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 +0 -8
- package/dist/_tsup-dts-rollup.d.mts +115 -50
- package/dist/_tsup-dts-rollup.d.ts +115 -50
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +11 -3
package/README.md
CHANGED
|
@@ -50,11 +50,3 @@ function MyComponent() {
|
|
|
50
50
|
## TypeScript support
|
|
51
51
|
|
|
52
52
|
TypeScript definitions for `@capitalos/react` are built into the npm package and should be automatically picked up by your editor.
|
|
53
|
-
|
|
54
|
-
## Error Handling
|
|
55
|
-
|
|
56
|
-
For details on how errors are managed within the SDK and how to handle them as a consumer or a maintainer, please see our [Error Handling Guidelines](./ERROR_HANDLING.md).
|
|
57
|
-
|
|
58
|
-
## Navigation Patterns
|
|
59
|
-
|
|
60
|
-
For guidance on modal dismissal, back button behavior, and callback semantics when integrating SDK components into your application, please see our [Navigation and Closing Patterns](./NAVIGATION_PATTERNS.md).
|
|
@@ -70,41 +70,73 @@ declare type AllowedExitPoints = {
|
|
|
70
70
|
export declare const App: typeof CardsApp;
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
73
|
+
* Application status indicating the account's onboarding state.
|
|
74
|
+
* - `ineligible`: Account cannot onboard to CapitalOS
|
|
75
|
+
* - `eligible`: Account is eligible to apply (may have already started the application)
|
|
76
|
+
* - `preapproved`: Account has completed underwriting and is either approved or just needs to sign documents
|
|
76
77
|
*/
|
|
77
|
-
export declare
|
|
78
|
+
export declare type ApplicationStatus = 'ineligible' | 'eligible' | 'preapproved';
|
|
78
79
|
|
|
79
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Application status indicating the account's onboarding state.
|
|
82
|
+
* - `ineligible`: Account cannot onboard to CapitalOS
|
|
83
|
+
* - `eligible`: Account is eligible to apply (may have already started the application)
|
|
84
|
+
* - `preapproved`: Account has completed underwriting and is either approved or just needs to sign documents
|
|
85
|
+
*/
|
|
86
|
+
export declare type ApplicationStatus_alias_1 = 'ineligible' | 'eligible' | 'preapproved';
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Bank account information returned from ConnectBankAccounts.
|
|
90
|
+
* Field names align with Platform API (LinkedBankAccountDto) for consistency.
|
|
91
|
+
*/
|
|
92
|
+
export declare type BankAccount = {
|
|
80
93
|
/**
|
|
81
|
-
*
|
|
94
|
+
* The unique identifier for the external account in CapitalOS
|
|
82
95
|
*/
|
|
83
|
-
|
|
96
|
+
id: string;
|
|
84
97
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* @param result - Object containing the bank account and routing numbers
|
|
88
|
-
* @param result.accountNumber - The bank account number
|
|
89
|
-
* @param result.routingNumber - The bank routing number
|
|
90
|
-
* @param result.externalAccountId - The ID of the external account in CapitalOS
|
|
98
|
+
* The name of the bank (e.g., "Chase", "Bank of America")
|
|
91
99
|
*/
|
|
92
|
-
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
export declare type BankAccountSelectorResult = {
|
|
100
|
+
bankName: string;
|
|
96
101
|
/**
|
|
97
|
-
* The
|
|
102
|
+
* The account name (e.g., "Checking Account")
|
|
103
|
+
*/
|
|
104
|
+
accountName: string;
|
|
105
|
+
/**
|
|
106
|
+
* Last 4 digits of the account number
|
|
107
|
+
*/
|
|
108
|
+
accountNumberMask: string;
|
|
109
|
+
/**
|
|
110
|
+
* Full account number
|
|
98
111
|
*/
|
|
99
112
|
accountNumber: string;
|
|
100
113
|
/**
|
|
101
|
-
*
|
|
114
|
+
* Bank routing number
|
|
102
115
|
*/
|
|
103
116
|
routingNumber: string;
|
|
104
117
|
/**
|
|
105
|
-
* The
|
|
118
|
+
* The account type (e.g., "checking", "savings")
|
|
119
|
+
*/
|
|
120
|
+
type: string;
|
|
121
|
+
/**
|
|
122
|
+
* Account status
|
|
106
123
|
*/
|
|
107
|
-
|
|
124
|
+
status: 'enabled' | 'disabled';
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Bank account information returned from ConnectBankAccounts.
|
|
129
|
+
* Field names align with Platform API (LinkedBankAccountDto) for consistency.
|
|
130
|
+
*/
|
|
131
|
+
export declare type BankAccount_alias_1 = {
|
|
132
|
+
id: string;
|
|
133
|
+
bankName: string;
|
|
134
|
+
accountName: string;
|
|
135
|
+
accountNumberMask: string;
|
|
136
|
+
accountNumber: string;
|
|
137
|
+
routingNumber: string;
|
|
138
|
+
type: string;
|
|
139
|
+
status: 'enabled' | 'disabled';
|
|
108
140
|
};
|
|
109
141
|
|
|
110
142
|
/**
|
|
@@ -336,7 +368,6 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
336
368
|
trackingUrl: z_2.ZodNullable<z_2.ZodString>;
|
|
337
369
|
}, "strip", z_2.ZodTypeAny, {
|
|
338
370
|
status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
|
|
339
|
-
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
340
371
|
address: {
|
|
341
372
|
addressLine1: string;
|
|
342
373
|
city: string;
|
|
@@ -344,6 +375,7 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
344
375
|
zipcode: string;
|
|
345
376
|
addressLine2?: string | null | undefined;
|
|
346
377
|
};
|
|
378
|
+
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
347
379
|
recipientName: string;
|
|
348
380
|
returnReason: string | null;
|
|
349
381
|
shippedAt: string | null;
|
|
@@ -359,7 +391,6 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
359
391
|
trackingUrl: string | null;
|
|
360
392
|
}, {
|
|
361
393
|
status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
|
|
362
|
-
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
363
394
|
address: {
|
|
364
395
|
addressLine1: string;
|
|
365
396
|
city: string;
|
|
@@ -367,6 +398,7 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
367
398
|
zipcode: string;
|
|
368
399
|
addressLine2?: string | null | undefined;
|
|
369
400
|
};
|
|
401
|
+
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
370
402
|
recipientName: string;
|
|
371
403
|
returnReason: string | null;
|
|
372
404
|
shippedAt: string | null;
|
|
@@ -387,7 +419,6 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
387
419
|
status: "active" | "canceled" | "disabled";
|
|
388
420
|
shipment: {
|
|
389
421
|
status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
|
|
390
|
-
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
391
422
|
address: {
|
|
392
423
|
addressLine1: string;
|
|
393
424
|
city: string;
|
|
@@ -395,6 +426,7 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
395
426
|
zipcode: string;
|
|
396
427
|
addressLine2?: string | null | undefined;
|
|
397
428
|
};
|
|
429
|
+
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
398
430
|
recipientName: string;
|
|
399
431
|
returnReason: string | null;
|
|
400
432
|
shippedAt: string | null;
|
|
@@ -414,7 +446,6 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
414
446
|
status: "active" | "canceled" | "disabled";
|
|
415
447
|
shipment: {
|
|
416
448
|
status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
|
|
417
|
-
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
418
449
|
address: {
|
|
419
450
|
addressLine1: string;
|
|
420
451
|
city: string;
|
|
@@ -422,6 +453,7 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
422
453
|
zipcode: string;
|
|
423
454
|
addressLine2?: string | null | undefined;
|
|
424
455
|
};
|
|
456
|
+
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
425
457
|
recipientName: string;
|
|
426
458
|
returnReason: string | null;
|
|
427
459
|
shippedAt: string | null;
|
|
@@ -476,7 +508,6 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
476
508
|
status: "active" | "canceled" | "disabled";
|
|
477
509
|
shipment: {
|
|
478
510
|
status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
|
|
479
|
-
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
480
511
|
address: {
|
|
481
512
|
addressLine1: string;
|
|
482
513
|
city: string;
|
|
@@ -484,6 +515,7 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
484
515
|
zipcode: string;
|
|
485
516
|
addressLine2?: string | null | undefined;
|
|
486
517
|
};
|
|
518
|
+
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
487
519
|
recipientName: string;
|
|
488
520
|
returnReason: string | null;
|
|
489
521
|
shippedAt: string | null;
|
|
@@ -539,7 +571,6 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
539
571
|
status: "active" | "canceled" | "disabled";
|
|
540
572
|
shipment: {
|
|
541
573
|
status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
|
|
542
|
-
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
543
574
|
address: {
|
|
544
575
|
addressLine1: string;
|
|
545
576
|
city: string;
|
|
@@ -547,6 +578,7 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
547
578
|
zipcode: string;
|
|
548
579
|
addressLine2?: string | null | undefined;
|
|
549
580
|
};
|
|
581
|
+
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
550
582
|
recipientName: string;
|
|
551
583
|
returnReason: string | null;
|
|
552
584
|
shippedAt: string | null;
|
|
@@ -680,6 +712,47 @@ export declare type ConfigureAutoPayProps = CommonProps & {
|
|
|
680
712
|
onClose: () => void;
|
|
681
713
|
};
|
|
682
714
|
|
|
715
|
+
/**
|
|
716
|
+
* Renders the CapitalOS Connect Bank Accounts experience.
|
|
717
|
+
* This component guides users through connecting their bank account via Plaid
|
|
718
|
+
* and returns all connected accounts along with the application status.
|
|
719
|
+
*/
|
|
720
|
+
export declare function ConnectBankAccounts({ onClose, onDone, ...restOfProps }: ConnectBankAccountsProps): JSX.Element;
|
|
721
|
+
|
|
722
|
+
export declare type ConnectBankAccountsProps = CommonProps & {
|
|
723
|
+
/**
|
|
724
|
+
* Callback to invoke when the user closes the bank account connection screen.
|
|
725
|
+
*/
|
|
726
|
+
onClose: () => void;
|
|
727
|
+
/**
|
|
728
|
+
* Callback to invoke when the bank account connection is completed successfully.
|
|
729
|
+
*
|
|
730
|
+
* @param result - Object containing the connected accounts and application status
|
|
731
|
+
* @param result.accounts - Array of connected bank accounts
|
|
732
|
+
* @param result.applicationStatus - The account's onboarding state
|
|
733
|
+
*/
|
|
734
|
+
onDone: (result: ConnectBankAccountsResult) => void;
|
|
735
|
+
};
|
|
736
|
+
|
|
737
|
+
export declare type ConnectBankAccountsResult = {
|
|
738
|
+
/**
|
|
739
|
+
* Array of connected bank accounts
|
|
740
|
+
*/
|
|
741
|
+
accounts: BankAccount[];
|
|
742
|
+
/**
|
|
743
|
+
* The application status indicating the account's onboarding state
|
|
744
|
+
*/
|
|
745
|
+
applicationStatus: ApplicationStatus;
|
|
746
|
+
};
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* Result from ConnectBankAccounts component.
|
|
750
|
+
*/
|
|
751
|
+
export declare type ConnectBankAccountsResult_alias_1 = {
|
|
752
|
+
accounts: BankAccount_alias_1[];
|
|
753
|
+
applicationStatus: ApplicationStatus_alias_1;
|
|
754
|
+
};
|
|
755
|
+
|
|
683
756
|
/**
|
|
684
757
|
* Renders the CapitalOS Connect To Vendors experience.
|
|
685
758
|
*/
|
|
@@ -710,13 +783,6 @@ export declare type ContactSupportProps = CommonProps & {
|
|
|
710
783
|
|
|
711
784
|
export declare function decodeOneTimeToken(token: string): any;
|
|
712
785
|
|
|
713
|
-
/**
|
|
714
|
-
* Renders the CapitalOS Demo Bill Payment Dashboard experience.
|
|
715
|
-
*/
|
|
716
|
-
export declare function DemoBillPayApp(props: DemoBillPayAppProps): JSX.Element;
|
|
717
|
-
|
|
718
|
-
export declare type DemoBillPayAppProps = CommonProps;
|
|
719
|
-
|
|
720
786
|
/**
|
|
721
787
|
* Renders the CapitalOS Dev Tools experience.
|
|
722
788
|
* Allows for simulating transactions, etc.
|
|
@@ -1049,7 +1115,7 @@ export declare interface ModalProps {
|
|
|
1049
1115
|
ariaLabel?: string;
|
|
1050
1116
|
}
|
|
1051
1117
|
|
|
1052
|
-
export declare function Onboarding<T extends OnboardingEntryPoint>({ onDone, entryPoint: onboardingEntryPoint, exitPoint: onboardingExitPoint, allowExitOnNonApproved, ...restOfProps }: OnboardingProps<T>): JSX.Element;
|
|
1118
|
+
export declare function Onboarding<T extends OnboardingEntryPoint>({ onDone, entryPoint: onboardingEntryPoint, exitPoint: onboardingExitPoint, allowExitOnNonApproved, doneButtonText, ...restOfProps }: OnboardingProps<T>): JSX.Element;
|
|
1053
1119
|
|
|
1054
1120
|
declare type OnboardingEntryPoint = keyof AllowedExitPoints;
|
|
1055
1121
|
|
|
@@ -1063,6 +1129,12 @@ declare type OnboardingProps<T extends keyof AllowedExitPoints> = CommonProps &
|
|
|
1063
1129
|
* @default true
|
|
1064
1130
|
*/
|
|
1065
1131
|
allowExitOnNonApproved?: boolean | undefined;
|
|
1132
|
+
/**
|
|
1133
|
+
* Custom text for the final "done" button shown at the end of the onboarding flow.
|
|
1134
|
+
* If not provided, the default text for each exit screen is used
|
|
1135
|
+
* (e.g. "Start using cards now", "Continue", or "Done" depending on the exit point).
|
|
1136
|
+
*/
|
|
1137
|
+
doneButtonText?: string | undefined;
|
|
1066
1138
|
onDone: (account: Account) => void;
|
|
1067
1139
|
};
|
|
1068
1140
|
|
|
@@ -1110,13 +1182,9 @@ export declare type ParentFunctions = {
|
|
|
1110
1182
|
policySettings?: {
|
|
1111
1183
|
onClose?: () => void;
|
|
1112
1184
|
};
|
|
1113
|
-
|
|
1185
|
+
connectBankAccounts?: {
|
|
1114
1186
|
onClose?: () => void;
|
|
1115
|
-
onDone?: (result:
|
|
1116
|
-
accountNumber: string;
|
|
1117
|
-
routingNumber: string;
|
|
1118
|
-
externalAccountId: string;
|
|
1119
|
-
}) => void;
|
|
1187
|
+
onDone?: (result: ConnectBankAccountsResult_alias_1) => void;
|
|
1120
1188
|
};
|
|
1121
1189
|
connectToVendors?: {
|
|
1122
1190
|
onClose?: () => void;
|
|
@@ -1246,12 +1314,6 @@ declare const renderingContextSchema: z.ZodIntersection<z.ZodDiscriminatedUnion<
|
|
|
1246
1314
|
entryPoint: "billPayApp";
|
|
1247
1315
|
}, {
|
|
1248
1316
|
entryPoint: "billPayApp";
|
|
1249
|
-
}>, z.ZodObject<{
|
|
1250
|
-
entryPoint: z.ZodLiteral<"demoBillPayApp">;
|
|
1251
|
-
}, "strip", z.ZodTypeAny, {
|
|
1252
|
-
entryPoint: "demoBillPayApp";
|
|
1253
|
-
}, {
|
|
1254
|
-
entryPoint: "demoBillPayApp";
|
|
1255
1317
|
}>, z.ZodObject<{
|
|
1256
1318
|
entryPoint: z.ZodLiteral<"cardDetails">;
|
|
1257
1319
|
cardId: z.ZodString;
|
|
@@ -1313,11 +1375,11 @@ declare const renderingContextSchema: z.ZodIntersection<z.ZodDiscriminatedUnion<
|
|
|
1313
1375
|
cardId?: string | undefined;
|
|
1314
1376
|
inlineCardOnFile?: boolean | undefined;
|
|
1315
1377
|
}>, z.ZodObject<{
|
|
1316
|
-
entryPoint: z.ZodLiteral<"
|
|
1378
|
+
entryPoint: z.ZodLiteral<"connectBankAccounts">;
|
|
1317
1379
|
}, "strip", z.ZodTypeAny, {
|
|
1318
|
-
entryPoint: "
|
|
1380
|
+
entryPoint: "connectBankAccounts";
|
|
1319
1381
|
}, {
|
|
1320
|
-
entryPoint: "
|
|
1382
|
+
entryPoint: "connectBankAccounts";
|
|
1321
1383
|
}>, z.ZodObject<{
|
|
1322
1384
|
entryPoint: z.ZodLiteral<"insightsDashboard">;
|
|
1323
1385
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1452,10 +1514,13 @@ declare const renderingContextSchema: z.ZodIntersection<z.ZodDiscriminatedUnion<
|
|
|
1452
1514
|
entryPoint: "transactions";
|
|
1453
1515
|
}>]>, z.ZodObject<{
|
|
1454
1516
|
referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1517
|
+
copy: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
1455
1518
|
}, "strip", z.ZodTypeAny, {
|
|
1456
1519
|
referer?: string | null | undefined;
|
|
1520
|
+
copy?: Record<string, string> | null | undefined;
|
|
1457
1521
|
}, {
|
|
1458
1522
|
referer?: string | null | undefined;
|
|
1523
|
+
copy?: Record<string, string> | null | undefined;
|
|
1459
1524
|
}>>;
|
|
1460
1525
|
|
|
1461
1526
|
export declare function ReplaceCard({ cardId, onDone, onClose, ...restOfProps }: ReplaceCardProps): JSX.Element;
|
|
@@ -70,41 +70,73 @@ declare type AllowedExitPoints = {
|
|
|
70
70
|
export declare const App: typeof CardsApp;
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
73
|
+
* Application status indicating the account's onboarding state.
|
|
74
|
+
* - `ineligible`: Account cannot onboard to CapitalOS
|
|
75
|
+
* - `eligible`: Account is eligible to apply (may have already started the application)
|
|
76
|
+
* - `preapproved`: Account has completed underwriting and is either approved or just needs to sign documents
|
|
76
77
|
*/
|
|
77
|
-
export declare
|
|
78
|
+
export declare type ApplicationStatus = 'ineligible' | 'eligible' | 'preapproved';
|
|
78
79
|
|
|
79
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Application status indicating the account's onboarding state.
|
|
82
|
+
* - `ineligible`: Account cannot onboard to CapitalOS
|
|
83
|
+
* - `eligible`: Account is eligible to apply (may have already started the application)
|
|
84
|
+
* - `preapproved`: Account has completed underwriting and is either approved or just needs to sign documents
|
|
85
|
+
*/
|
|
86
|
+
export declare type ApplicationStatus_alias_1 = 'ineligible' | 'eligible' | 'preapproved';
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Bank account information returned from ConnectBankAccounts.
|
|
90
|
+
* Field names align with Platform API (LinkedBankAccountDto) for consistency.
|
|
91
|
+
*/
|
|
92
|
+
export declare type BankAccount = {
|
|
80
93
|
/**
|
|
81
|
-
*
|
|
94
|
+
* The unique identifier for the external account in CapitalOS
|
|
82
95
|
*/
|
|
83
|
-
|
|
96
|
+
id: string;
|
|
84
97
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* @param result - Object containing the bank account and routing numbers
|
|
88
|
-
* @param result.accountNumber - The bank account number
|
|
89
|
-
* @param result.routingNumber - The bank routing number
|
|
90
|
-
* @param result.externalAccountId - The ID of the external account in CapitalOS
|
|
98
|
+
* The name of the bank (e.g., "Chase", "Bank of America")
|
|
91
99
|
*/
|
|
92
|
-
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
export declare type BankAccountSelectorResult = {
|
|
100
|
+
bankName: string;
|
|
96
101
|
/**
|
|
97
|
-
* The
|
|
102
|
+
* The account name (e.g., "Checking Account")
|
|
103
|
+
*/
|
|
104
|
+
accountName: string;
|
|
105
|
+
/**
|
|
106
|
+
* Last 4 digits of the account number
|
|
107
|
+
*/
|
|
108
|
+
accountNumberMask: string;
|
|
109
|
+
/**
|
|
110
|
+
* Full account number
|
|
98
111
|
*/
|
|
99
112
|
accountNumber: string;
|
|
100
113
|
/**
|
|
101
|
-
*
|
|
114
|
+
* Bank routing number
|
|
102
115
|
*/
|
|
103
116
|
routingNumber: string;
|
|
104
117
|
/**
|
|
105
|
-
* The
|
|
118
|
+
* The account type (e.g., "checking", "savings")
|
|
119
|
+
*/
|
|
120
|
+
type: string;
|
|
121
|
+
/**
|
|
122
|
+
* Account status
|
|
106
123
|
*/
|
|
107
|
-
|
|
124
|
+
status: 'enabled' | 'disabled';
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Bank account information returned from ConnectBankAccounts.
|
|
129
|
+
* Field names align with Platform API (LinkedBankAccountDto) for consistency.
|
|
130
|
+
*/
|
|
131
|
+
export declare type BankAccount_alias_1 = {
|
|
132
|
+
id: string;
|
|
133
|
+
bankName: string;
|
|
134
|
+
accountName: string;
|
|
135
|
+
accountNumberMask: string;
|
|
136
|
+
accountNumber: string;
|
|
137
|
+
routingNumber: string;
|
|
138
|
+
type: string;
|
|
139
|
+
status: 'enabled' | 'disabled';
|
|
108
140
|
};
|
|
109
141
|
|
|
110
142
|
/**
|
|
@@ -336,7 +368,6 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
336
368
|
trackingUrl: z_2.ZodNullable<z_2.ZodString>;
|
|
337
369
|
}, "strip", z_2.ZodTypeAny, {
|
|
338
370
|
status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
|
|
339
|
-
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
340
371
|
address: {
|
|
341
372
|
addressLine1: string;
|
|
342
373
|
city: string;
|
|
@@ -344,6 +375,7 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
344
375
|
zipcode: string;
|
|
345
376
|
addressLine2?: string | null | undefined;
|
|
346
377
|
};
|
|
378
|
+
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
347
379
|
recipientName: string;
|
|
348
380
|
returnReason: string | null;
|
|
349
381
|
shippedAt: string | null;
|
|
@@ -359,7 +391,6 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
359
391
|
trackingUrl: string | null;
|
|
360
392
|
}, {
|
|
361
393
|
status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
|
|
362
|
-
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
363
394
|
address: {
|
|
364
395
|
addressLine1: string;
|
|
365
396
|
city: string;
|
|
@@ -367,6 +398,7 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
367
398
|
zipcode: string;
|
|
368
399
|
addressLine2?: string | null | undefined;
|
|
369
400
|
};
|
|
401
|
+
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
370
402
|
recipientName: string;
|
|
371
403
|
returnReason: string | null;
|
|
372
404
|
shippedAt: string | null;
|
|
@@ -387,7 +419,6 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
387
419
|
status: "active" | "canceled" | "disabled";
|
|
388
420
|
shipment: {
|
|
389
421
|
status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
|
|
390
|
-
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
391
422
|
address: {
|
|
392
423
|
addressLine1: string;
|
|
393
424
|
city: string;
|
|
@@ -395,6 +426,7 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
395
426
|
zipcode: string;
|
|
396
427
|
addressLine2?: string | null | undefined;
|
|
397
428
|
};
|
|
429
|
+
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
398
430
|
recipientName: string;
|
|
399
431
|
returnReason: string | null;
|
|
400
432
|
shippedAt: string | null;
|
|
@@ -414,7 +446,6 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
414
446
|
status: "active" | "canceled" | "disabled";
|
|
415
447
|
shipment: {
|
|
416
448
|
status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
|
|
417
|
-
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
418
449
|
address: {
|
|
419
450
|
addressLine1: string;
|
|
420
451
|
city: string;
|
|
@@ -422,6 +453,7 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
422
453
|
zipcode: string;
|
|
423
454
|
addressLine2?: string | null | undefined;
|
|
424
455
|
};
|
|
456
|
+
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
425
457
|
recipientName: string;
|
|
426
458
|
returnReason: string | null;
|
|
427
459
|
shippedAt: string | null;
|
|
@@ -476,7 +508,6 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
476
508
|
status: "active" | "canceled" | "disabled";
|
|
477
509
|
shipment: {
|
|
478
510
|
status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
|
|
479
|
-
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
480
511
|
address: {
|
|
481
512
|
addressLine1: string;
|
|
482
513
|
city: string;
|
|
@@ -484,6 +515,7 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
484
515
|
zipcode: string;
|
|
485
516
|
addressLine2?: string | null | undefined;
|
|
486
517
|
};
|
|
518
|
+
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
487
519
|
recipientName: string;
|
|
488
520
|
returnReason: string | null;
|
|
489
521
|
shippedAt: string | null;
|
|
@@ -539,7 +571,6 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
539
571
|
status: "active" | "canceled" | "disabled";
|
|
540
572
|
shipment: {
|
|
541
573
|
status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
|
|
542
|
-
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
543
574
|
address: {
|
|
544
575
|
addressLine1: string;
|
|
545
576
|
city: string;
|
|
@@ -547,6 +578,7 @@ declare const cardApiDtoSchema: z_2.ZodObject<{
|
|
|
547
578
|
zipcode: string;
|
|
548
579
|
addressLine2?: string | null | undefined;
|
|
549
580
|
};
|
|
581
|
+
method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
|
|
550
582
|
recipientName: string;
|
|
551
583
|
returnReason: string | null;
|
|
552
584
|
shippedAt: string | null;
|
|
@@ -680,6 +712,47 @@ export declare type ConfigureAutoPayProps = CommonProps & {
|
|
|
680
712
|
onClose: () => void;
|
|
681
713
|
};
|
|
682
714
|
|
|
715
|
+
/**
|
|
716
|
+
* Renders the CapitalOS Connect Bank Accounts experience.
|
|
717
|
+
* This component guides users through connecting their bank account via Plaid
|
|
718
|
+
* and returns all connected accounts along with the application status.
|
|
719
|
+
*/
|
|
720
|
+
export declare function ConnectBankAccounts({ onClose, onDone, ...restOfProps }: ConnectBankAccountsProps): JSX.Element;
|
|
721
|
+
|
|
722
|
+
export declare type ConnectBankAccountsProps = CommonProps & {
|
|
723
|
+
/**
|
|
724
|
+
* Callback to invoke when the user closes the bank account connection screen.
|
|
725
|
+
*/
|
|
726
|
+
onClose: () => void;
|
|
727
|
+
/**
|
|
728
|
+
* Callback to invoke when the bank account connection is completed successfully.
|
|
729
|
+
*
|
|
730
|
+
* @param result - Object containing the connected accounts and application status
|
|
731
|
+
* @param result.accounts - Array of connected bank accounts
|
|
732
|
+
* @param result.applicationStatus - The account's onboarding state
|
|
733
|
+
*/
|
|
734
|
+
onDone: (result: ConnectBankAccountsResult) => void;
|
|
735
|
+
};
|
|
736
|
+
|
|
737
|
+
export declare type ConnectBankAccountsResult = {
|
|
738
|
+
/**
|
|
739
|
+
* Array of connected bank accounts
|
|
740
|
+
*/
|
|
741
|
+
accounts: BankAccount[];
|
|
742
|
+
/**
|
|
743
|
+
* The application status indicating the account's onboarding state
|
|
744
|
+
*/
|
|
745
|
+
applicationStatus: ApplicationStatus;
|
|
746
|
+
};
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* Result from ConnectBankAccounts component.
|
|
750
|
+
*/
|
|
751
|
+
export declare type ConnectBankAccountsResult_alias_1 = {
|
|
752
|
+
accounts: BankAccount_alias_1[];
|
|
753
|
+
applicationStatus: ApplicationStatus_alias_1;
|
|
754
|
+
};
|
|
755
|
+
|
|
683
756
|
/**
|
|
684
757
|
* Renders the CapitalOS Connect To Vendors experience.
|
|
685
758
|
*/
|
|
@@ -710,13 +783,6 @@ export declare type ContactSupportProps = CommonProps & {
|
|
|
710
783
|
|
|
711
784
|
export declare function decodeOneTimeToken(token: string): any;
|
|
712
785
|
|
|
713
|
-
/**
|
|
714
|
-
* Renders the CapitalOS Demo Bill Payment Dashboard experience.
|
|
715
|
-
*/
|
|
716
|
-
export declare function DemoBillPayApp(props: DemoBillPayAppProps): JSX.Element;
|
|
717
|
-
|
|
718
|
-
export declare type DemoBillPayAppProps = CommonProps;
|
|
719
|
-
|
|
720
786
|
/**
|
|
721
787
|
* Renders the CapitalOS Dev Tools experience.
|
|
722
788
|
* Allows for simulating transactions, etc.
|
|
@@ -1049,7 +1115,7 @@ export declare interface ModalProps {
|
|
|
1049
1115
|
ariaLabel?: string;
|
|
1050
1116
|
}
|
|
1051
1117
|
|
|
1052
|
-
export declare function Onboarding<T extends OnboardingEntryPoint>({ onDone, entryPoint: onboardingEntryPoint, exitPoint: onboardingExitPoint, allowExitOnNonApproved, ...restOfProps }: OnboardingProps<T>): JSX.Element;
|
|
1118
|
+
export declare function Onboarding<T extends OnboardingEntryPoint>({ onDone, entryPoint: onboardingEntryPoint, exitPoint: onboardingExitPoint, allowExitOnNonApproved, doneButtonText, ...restOfProps }: OnboardingProps<T>): JSX.Element;
|
|
1053
1119
|
|
|
1054
1120
|
declare type OnboardingEntryPoint = keyof AllowedExitPoints;
|
|
1055
1121
|
|
|
@@ -1063,6 +1129,12 @@ declare type OnboardingProps<T extends keyof AllowedExitPoints> = CommonProps &
|
|
|
1063
1129
|
* @default true
|
|
1064
1130
|
*/
|
|
1065
1131
|
allowExitOnNonApproved?: boolean | undefined;
|
|
1132
|
+
/**
|
|
1133
|
+
* Custom text for the final "done" button shown at the end of the onboarding flow.
|
|
1134
|
+
* If not provided, the default text for each exit screen is used
|
|
1135
|
+
* (e.g. "Start using cards now", "Continue", or "Done" depending on the exit point).
|
|
1136
|
+
*/
|
|
1137
|
+
doneButtonText?: string | undefined;
|
|
1066
1138
|
onDone: (account: Account) => void;
|
|
1067
1139
|
};
|
|
1068
1140
|
|
|
@@ -1110,13 +1182,9 @@ export declare type ParentFunctions = {
|
|
|
1110
1182
|
policySettings?: {
|
|
1111
1183
|
onClose?: () => void;
|
|
1112
1184
|
};
|
|
1113
|
-
|
|
1185
|
+
connectBankAccounts?: {
|
|
1114
1186
|
onClose?: () => void;
|
|
1115
|
-
onDone?: (result:
|
|
1116
|
-
accountNumber: string;
|
|
1117
|
-
routingNumber: string;
|
|
1118
|
-
externalAccountId: string;
|
|
1119
|
-
}) => void;
|
|
1187
|
+
onDone?: (result: ConnectBankAccountsResult_alias_1) => void;
|
|
1120
1188
|
};
|
|
1121
1189
|
connectToVendors?: {
|
|
1122
1190
|
onClose?: () => void;
|
|
@@ -1246,12 +1314,6 @@ declare const renderingContextSchema: z.ZodIntersection<z.ZodDiscriminatedUnion<
|
|
|
1246
1314
|
entryPoint: "billPayApp";
|
|
1247
1315
|
}, {
|
|
1248
1316
|
entryPoint: "billPayApp";
|
|
1249
|
-
}>, z.ZodObject<{
|
|
1250
|
-
entryPoint: z.ZodLiteral<"demoBillPayApp">;
|
|
1251
|
-
}, "strip", z.ZodTypeAny, {
|
|
1252
|
-
entryPoint: "demoBillPayApp";
|
|
1253
|
-
}, {
|
|
1254
|
-
entryPoint: "demoBillPayApp";
|
|
1255
1317
|
}>, z.ZodObject<{
|
|
1256
1318
|
entryPoint: z.ZodLiteral<"cardDetails">;
|
|
1257
1319
|
cardId: z.ZodString;
|
|
@@ -1313,11 +1375,11 @@ declare const renderingContextSchema: z.ZodIntersection<z.ZodDiscriminatedUnion<
|
|
|
1313
1375
|
cardId?: string | undefined;
|
|
1314
1376
|
inlineCardOnFile?: boolean | undefined;
|
|
1315
1377
|
}>, z.ZodObject<{
|
|
1316
|
-
entryPoint: z.ZodLiteral<"
|
|
1378
|
+
entryPoint: z.ZodLiteral<"connectBankAccounts">;
|
|
1317
1379
|
}, "strip", z.ZodTypeAny, {
|
|
1318
|
-
entryPoint: "
|
|
1380
|
+
entryPoint: "connectBankAccounts";
|
|
1319
1381
|
}, {
|
|
1320
|
-
entryPoint: "
|
|
1382
|
+
entryPoint: "connectBankAccounts";
|
|
1321
1383
|
}>, z.ZodObject<{
|
|
1322
1384
|
entryPoint: z.ZodLiteral<"insightsDashboard">;
|
|
1323
1385
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1452,10 +1514,13 @@ declare const renderingContextSchema: z.ZodIntersection<z.ZodDiscriminatedUnion<
|
|
|
1452
1514
|
entryPoint: "transactions";
|
|
1453
1515
|
}>]>, z.ZodObject<{
|
|
1454
1516
|
referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1517
|
+
copy: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
1455
1518
|
}, "strip", z.ZodTypeAny, {
|
|
1456
1519
|
referer?: string | null | undefined;
|
|
1520
|
+
copy?: Record<string, string> | null | undefined;
|
|
1457
1521
|
}, {
|
|
1458
1522
|
referer?: string | null | undefined;
|
|
1523
|
+
copy?: Record<string, string> | null | undefined;
|
|
1459
1524
|
}>>;
|
|
1460
1525
|
|
|
1461
1526
|
export declare function ReplaceCard({ cardId, onDone, onClose, ...restOfProps }: ReplaceCardProps): JSX.Element;
|