@capitalos/react 0.2.1-rc2 → 1.0.0-rc.1

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.
@@ -0,0 +1,713 @@
1
+ import { IFrameComponent } from 'iframe-resizer';
2
+ import { IFrameMessageData } from 'iframe-resizer';
3
+ import { IFrameOptions } from 'iframe-resizer';
4
+ import { IFrameResizedData } from 'iframe-resizer';
5
+ import { IFrameScrollData } from 'iframe-resizer';
6
+ import { default as React_2 } from 'react';
7
+ import { ReactNode } from 'react';
8
+ import { z } from 'zod';
9
+ import * as z_2 from 'zod';
10
+
11
+ export declare type Account = {
12
+ status: AccountStatus;
13
+ };
14
+
15
+ /**
16
+ * Renders the CapitalOS Account Actions experience.
17
+ */
18
+ export declare function AccountActions(props: AccountActionsProps): JSX.Element;
19
+
20
+ export declare type AccountActionsProps = CommonProps;
21
+
22
+ /**
23
+ * Renders the CapitalOS Account Details experience.
24
+ */
25
+ export declare function AccountDetails(props: AccountDetailsProps): JSX.Element;
26
+
27
+ export declare type AccountDetailsProps = CommonProps;
28
+
29
+ export declare type AccountStatus = z_2.infer<typeof accountStatusSchema>;
30
+
31
+ declare const accountStatusSchema: z_2.ZodEnum<["eligible", "ineligible", "engaged", "onboarding", "approved", "processing", "pending", "declined", "closed", "waiting"]>;
32
+
33
+ declare type AllowedExitPoints = {
34
+ welcome: 'application' | 'activation';
35
+ application: 'application' | 'activation';
36
+ };
37
+
38
+ /** @deprecated Use {@link CardsApp} instead */
39
+ export declare const App: typeof CardsApp;
40
+
41
+ /**
42
+ * Renders the CapitalOS Bill Payment Dashboard experience.
43
+ */
44
+ export declare function BillPayApp(props: BillPayAppProps): JSX.Element;
45
+
46
+ export declare type BillPayAppProps = CommonProps;
47
+
48
+ /**
49
+ * The internal component that handles all the heavy lifting of connecting to the iframe and rendering the app.
50
+ * all user facing components are basically a syntactic sugar on top of this.
51
+ */
52
+ export declare function CapitalOS<T extends RenderingContext_2>(props: CapitalOsProps<T>): JSX.Element;
53
+
54
+ /**
55
+ * Base class for all SDK errors
56
+ */
57
+ export declare class CapitalOSError extends Error {
58
+ code: ErrorCode;
59
+ constructor({ message, code }: {
60
+ message: string;
61
+ code: ErrorCode;
62
+ });
63
+ }
64
+
65
+ declare type CapitalOsProps<T extends RenderingContext_2> = CommonProps & {
66
+ renderingContext: T;
67
+ methods?: Partial<IframeConnectionMethods>;
68
+ };
69
+
70
+ export declare type CardApiDto = z_2.infer<typeof cardApiDtoSchema>;
71
+
72
+ declare const cardApiDtoSchema: z_2.ZodObject<{
73
+ accountUserId: z_2.ZodNullable<z_2.ZodString>;
74
+ status: z_2.ZodEnum<["active", "inactive", "canceled", "frozen"]>;
75
+ id: z_2.ZodString;
76
+ last4: z_2.ZodString;
77
+ platformId: z_2.ZodString;
78
+ cardholderFirstName: z_2.ZodString;
79
+ cardholderLastName: z_2.ZodString;
80
+ cardholderPhoneNumber: z_2.ZodEffects<z_2.ZodString, string, string>;
81
+ nickname: z_2.ZodOptional<z_2.ZodNullable<z_2.ZodString>>;
82
+ spend: z_2.ZodObject<{
83
+ daily: z_2.ZodObject<{
84
+ limit: z_2.ZodOptional<z_2.ZodNumber>;
85
+ amount: z_2.ZodNumber;
86
+ }, "strip", z_2.ZodTypeAny, {
87
+ amount: number;
88
+ limit?: number | undefined;
89
+ }, {
90
+ amount: number;
91
+ limit?: number | undefined;
92
+ }>;
93
+ weekly: z_2.ZodObject<{
94
+ limit: z_2.ZodOptional<z_2.ZodNumber>;
95
+ amount: z_2.ZodNumber;
96
+ }, "strip", z_2.ZodTypeAny, {
97
+ amount: number;
98
+ limit?: number | undefined;
99
+ }, {
100
+ amount: number;
101
+ limit?: number | undefined;
102
+ }>;
103
+ monthly: z_2.ZodObject<{
104
+ limit: z_2.ZodOptional<z_2.ZodNumber>;
105
+ amount: z_2.ZodNumber;
106
+ }, "strip", z_2.ZodTypeAny, {
107
+ amount: number;
108
+ limit?: number | undefined;
109
+ }, {
110
+ amount: number;
111
+ limit?: number | undefined;
112
+ }>;
113
+ lifetime: z_2.ZodObject<{
114
+ limit: z_2.ZodOptional<z_2.ZodNumber>;
115
+ amount: z_2.ZodNumber;
116
+ }, "strip", z_2.ZodTypeAny, {
117
+ amount: number;
118
+ limit?: number | undefined;
119
+ }, {
120
+ amount: number;
121
+ limit?: number | undefined;
122
+ }>;
123
+ }, "strip", z_2.ZodTypeAny, {
124
+ daily: {
125
+ amount: number;
126
+ limit?: number | undefined;
127
+ };
128
+ weekly: {
129
+ amount: number;
130
+ limit?: number | undefined;
131
+ };
132
+ monthly: {
133
+ amount: number;
134
+ limit?: number | undefined;
135
+ };
136
+ lifetime: {
137
+ amount: number;
138
+ limit?: number | undefined;
139
+ };
140
+ }, {
141
+ daily: {
142
+ amount: number;
143
+ limit?: number | undefined;
144
+ };
145
+ weekly: {
146
+ amount: number;
147
+ limit?: number | undefined;
148
+ };
149
+ monthly: {
150
+ amount: number;
151
+ limit?: number | undefined;
152
+ };
153
+ lifetime: {
154
+ amount: number;
155
+ limit?: number | undefined;
156
+ };
157
+ }>;
158
+ allowedSpendCategories: z_2.ZodArray<z_2.ZodEnum<["airlines", "carRental", "carService", "education", "electronics", "gasPump", "gasStation", "generalMerchandise", "government", "hardwareAndConstruction", "insurance", "legal", "lodging", "medical", "other", "parking", "phoneAndInternet", "professionalServices", "recreationAndEntertainment", "restaurants", "shipping", "software", "taxisAndRideshare", "transportation", "travelMisc", "utilities"]>, "many">;
159
+ allowedMerchants: z_2.ZodArray<z_2.ZodObject<{
160
+ id: z_2.ZodUnion<[z_2.ZodString, z_2.ZodString]>;
161
+ name: z_2.ZodString;
162
+ logoUrl: z_2.ZodNullable<z_2.ZodString>;
163
+ }, "strip", z_2.ZodTypeAny, {
164
+ id: string;
165
+ name: string;
166
+ logoUrl: string | null;
167
+ }, {
168
+ id: string;
169
+ name: string;
170
+ logoUrl: string | null;
171
+ }>, "many">;
172
+ physicalCard: z_2.ZodNullable<z_2.ZodObject<{
173
+ status: z_2.ZodEnum<["active", "disabled", "canceled"]>;
174
+ shipment: z_2.ZodObject<{
175
+ address: z_2.ZodObject<{
176
+ addressLine1: z_2.ZodString;
177
+ addressLine2: z_2.ZodOptional<z_2.ZodNullable<z_2.ZodString>>;
178
+ city: z_2.ZodString;
179
+ state: z_2.ZodEffects<z_2.ZodString, string, string>;
180
+ zipcode: z_2.ZodString;
181
+ }, "strip", z_2.ZodTypeAny, {
182
+ addressLine1: string;
183
+ city: string;
184
+ state: string;
185
+ zipcode: string;
186
+ addressLine2?: string | null | undefined;
187
+ }, {
188
+ addressLine1: string;
189
+ city: string;
190
+ state: string;
191
+ zipcode: string;
192
+ addressLine2?: string | null | undefined;
193
+ }>;
194
+ method: z_2.ZodEnum<["usps", "fedexPriorityOvernight", "fedexTwoDay"]>;
195
+ recipientName: z_2.ZodString;
196
+ returnReason: z_2.ZodNullable<z_2.ZodString>;
197
+ shippedAt: z_2.ZodNullable<z_2.ZodString>;
198
+ status: z_2.ZodEnum<["canceled", "pending", "rejected", "returned", "shipped"]>;
199
+ trackingNumber: z_2.ZodNullable<z_2.ZodString>;
200
+ trackingUrl: z_2.ZodNullable<z_2.ZodString>;
201
+ }, "strip", z_2.ZodTypeAny, {
202
+ status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
203
+ method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
204
+ address: {
205
+ addressLine1: string;
206
+ city: string;
207
+ state: string;
208
+ zipcode: string;
209
+ addressLine2?: string | null | undefined;
210
+ };
211
+ recipientName: string;
212
+ returnReason: string | null;
213
+ shippedAt: string | null;
214
+ trackingNumber: string | null;
215
+ trackingUrl: string | null;
216
+ }, {
217
+ status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
218
+ method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
219
+ address: {
220
+ addressLine1: string;
221
+ city: string;
222
+ state: string;
223
+ zipcode: string;
224
+ addressLine2?: string | null | undefined;
225
+ };
226
+ recipientName: string;
227
+ returnReason: string | null;
228
+ shippedAt: string | null;
229
+ trackingNumber: string | null;
230
+ trackingUrl: string | null;
231
+ }>;
232
+ id: z_2.ZodOptional<z_2.ZodNullable<z_2.ZodString>>;
233
+ }, "strip", z_2.ZodTypeAny, {
234
+ status: "active" | "canceled" | "disabled";
235
+ shipment: {
236
+ status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
237
+ method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
238
+ address: {
239
+ addressLine1: string;
240
+ city: string;
241
+ state: string;
242
+ zipcode: string;
243
+ addressLine2?: string | null | undefined;
244
+ };
245
+ recipientName: string;
246
+ returnReason: string | null;
247
+ shippedAt: string | null;
248
+ trackingNumber: string | null;
249
+ trackingUrl: string | null;
250
+ };
251
+ id?: string | null | undefined;
252
+ }, {
253
+ status: "active" | "canceled" | "disabled";
254
+ shipment: {
255
+ status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
256
+ method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
257
+ address: {
258
+ addressLine1: string;
259
+ city: string;
260
+ state: string;
261
+ zipcode: string;
262
+ addressLine2?: string | null | undefined;
263
+ };
264
+ recipientName: string;
265
+ returnReason: string | null;
266
+ shippedAt: string | null;
267
+ trackingNumber: string | null;
268
+ trackingUrl: string | null;
269
+ };
270
+ id?: string | null | undefined;
271
+ }>>;
272
+ }, "strip", z_2.ZodTypeAny, {
273
+ status: "active" | "inactive" | "canceled" | "frozen";
274
+ id: string;
275
+ platformId: string;
276
+ accountUserId: string | null;
277
+ last4: string;
278
+ cardholderFirstName: string;
279
+ cardholderLastName: string;
280
+ cardholderPhoneNumber: string;
281
+ spend: {
282
+ daily: {
283
+ amount: number;
284
+ limit?: number | undefined;
285
+ };
286
+ weekly: {
287
+ amount: number;
288
+ limit?: number | undefined;
289
+ };
290
+ monthly: {
291
+ amount: number;
292
+ limit?: number | undefined;
293
+ };
294
+ lifetime: {
295
+ amount: number;
296
+ limit?: number | undefined;
297
+ };
298
+ };
299
+ allowedSpendCategories: ("airlines" | "carRental" | "carService" | "education" | "electronics" | "gasPump" | "gasStation" | "generalMerchandise" | "government" | "hardwareAndConstruction" | "insurance" | "legal" | "lodging" | "medical" | "other" | "parking" | "phoneAndInternet" | "professionalServices" | "recreationAndEntertainment" | "restaurants" | "shipping" | "software" | "taxisAndRideshare" | "transportation" | "travelMisc" | "utilities")[];
300
+ allowedMerchants: {
301
+ id: string;
302
+ name: string;
303
+ logoUrl: string | null;
304
+ }[];
305
+ physicalCard: {
306
+ status: "active" | "canceled" | "disabled";
307
+ shipment: {
308
+ status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
309
+ method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
310
+ address: {
311
+ addressLine1: string;
312
+ city: string;
313
+ state: string;
314
+ zipcode: string;
315
+ addressLine2?: string | null | undefined;
316
+ };
317
+ recipientName: string;
318
+ returnReason: string | null;
319
+ shippedAt: string | null;
320
+ trackingNumber: string | null;
321
+ trackingUrl: string | null;
322
+ };
323
+ id?: string | null | undefined;
324
+ } | null;
325
+ nickname?: string | null | undefined;
326
+ }, {
327
+ status: "active" | "inactive" | "canceled" | "frozen";
328
+ id: string;
329
+ platformId: string;
330
+ accountUserId: string | null;
331
+ last4: string;
332
+ cardholderFirstName: string;
333
+ cardholderLastName: string;
334
+ cardholderPhoneNumber: string;
335
+ spend: {
336
+ daily: {
337
+ amount: number;
338
+ limit?: number | undefined;
339
+ };
340
+ weekly: {
341
+ amount: number;
342
+ limit?: number | undefined;
343
+ };
344
+ monthly: {
345
+ amount: number;
346
+ limit?: number | undefined;
347
+ };
348
+ lifetime: {
349
+ amount: number;
350
+ limit?: number | undefined;
351
+ };
352
+ };
353
+ allowedSpendCategories: ("airlines" | "carRental" | "carService" | "education" | "electronics" | "gasPump" | "gasStation" | "generalMerchandise" | "government" | "hardwareAndConstruction" | "insurance" | "legal" | "lodging" | "medical" | "other" | "parking" | "phoneAndInternet" | "professionalServices" | "recreationAndEntertainment" | "restaurants" | "shipping" | "software" | "taxisAndRideshare" | "transportation" | "travelMisc" | "utilities")[];
354
+ allowedMerchants: {
355
+ id: string;
356
+ name: string;
357
+ logoUrl: string | null;
358
+ }[];
359
+ physicalCard: {
360
+ status: "active" | "canceled" | "disabled";
361
+ shipment: {
362
+ status: "pending" | "canceled" | "rejected" | "returned" | "shipped";
363
+ method: "usps" | "fedexPriorityOvernight" | "fedexTwoDay";
364
+ address: {
365
+ addressLine1: string;
366
+ city: string;
367
+ state: string;
368
+ zipcode: string;
369
+ addressLine2?: string | null | undefined;
370
+ };
371
+ recipientName: string;
372
+ returnReason: string | null;
373
+ shippedAt: string | null;
374
+ trackingNumber: string | null;
375
+ trackingUrl: string | null;
376
+ };
377
+ id?: string | null | undefined;
378
+ } | null;
379
+ nickname?: string | null | undefined;
380
+ }>;
381
+
382
+ /**
383
+ * Renders the CapitalOS Manage Card experience.
384
+ */
385
+ export declare function CardDetails(props: CardDetailsProps): JSX.Element;
386
+
387
+ export declare type CardDetailsProps = CommonProps & {
388
+ /**
389
+ * The ID of the card to manage.
390
+ */
391
+ cardId: string;
392
+ cardOnly?: boolean | undefined;
393
+ };
394
+
395
+ /**
396
+ * Renders the CapitalOS CardsApp.
397
+ */
398
+ export declare function CardsApp(props: CommonProps): JSX.Element;
399
+
400
+ export declare type CommonProps = {
401
+ /**
402
+ * The token provided by initiate-login.
403
+ */
404
+ token: string;
405
+ /**
406
+ * Optional CSS class name for the component.
407
+ */
408
+ className?: string;
409
+ /**
410
+ * Optional flag indicating whether to log events to the console.
411
+ */
412
+ enableLogging?: boolean;
413
+ /**
414
+ * Optional callback for when the app encounters an error.
415
+ */
416
+ onError?: (error: Error) => void;
417
+ /**
418
+ * Optional component to render while the app is loading.
419
+ */
420
+ loadingComponent?: ReactNode;
421
+ /**
422
+ * Optional theme to apply to the app or component.
423
+ */
424
+ theme?: 'light' | 'dark' | 'system';
425
+ };
426
+
427
+ export declare function decodeToken(token: string): any;
428
+
429
+ /**
430
+ * Renders the CapitalOS Dispute Transaction experience.
431
+ */
432
+ export declare function DisputeTransaction({ transactionId, onDone, onCancel, ...restOfProps }: DisputeTransactionProps): JSX.Element;
433
+
434
+ export declare type DisputeTransactionProps = CommonProps & {
435
+ /**
436
+ * The ID of the transaction to dispute.
437
+ */
438
+ transactionId: string;
439
+ /**
440
+ * Callback to invoke when the dispute was successfully submitted.
441
+ */
442
+ onDone: () => void;
443
+ /**
444
+ * Callback to invoke when the user cancels the dispute submission.
445
+ */
446
+ onCancel: () => void;
447
+ };
448
+
449
+ /**
450
+ * Encodes the rendering context as base64 and then URI encodes it.
451
+ */
452
+ export declare function encodeRenderingContext<T>(renderingContext: NonNullable<T>): string;
453
+
454
+ export declare type EntryPoint = RenderingContext_3['entryPoint'];
455
+
456
+ export declare const ErrorCode: {
457
+ readonly unauthorized: "unauthorized";
458
+ readonly invalid_account_status: "invalid_account_status";
459
+ readonly unsupported_entry_point: "unsupported_entry_point";
460
+ };
461
+
462
+ export declare type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode];
463
+
464
+ export declare type IframeConnectionMethods = {
465
+ onLoad: () => void;
466
+ onError: (error: RawErrorDetails) => void;
467
+ createCard?: {
468
+ onDone?: () => void;
469
+ onCancel?: () => void;
470
+ };
471
+ createDispute?: {
472
+ onDone?: () => void;
473
+ onCancel?: () => void;
474
+ };
475
+ onboarding?: {
476
+ onDone?: (account: Account) => void;
477
+ };
478
+ };
479
+
480
+ export declare const IframeResizer: React_2.ForwardRefExoticComponent<Omit<IFrameOptions, "closedCallback" | "scrollCallback" | "resizedCallback" | "messageCallback" | "initCallback"> & {
481
+ onClosed?(iframeId: string): void;
482
+ onInit?(iframe: IFrameComponent): void;
483
+ onMessage?(data: IFrameMessageData): void;
484
+ onResized?(data: IFrameResizedData): void;
485
+ onScroll?(data: IFrameScrollData): boolean;
486
+ } & React_2.IframeHTMLAttributes<HTMLIFrameElement> & React_2.RefAttributes<HTMLIFrameElement>>;
487
+
488
+ /**
489
+ * Renders the CapitalOS Insights Dashboard experience
490
+ */
491
+ export declare function InsightsDashboard(props: InsightsDashboardProps): JSX.Element;
492
+
493
+ export declare type InsightsDashboardProps = CommonProps;
494
+
495
+ /**
496
+ * Renders a specific CapitalOS Insights Widget
497
+ */
498
+ export declare function InsightsWidget(props: InsightsWidgetProps): JSX.Element;
499
+
500
+ export declare type InsightsWidgetProps = CommonProps & {
501
+ /**
502
+ * The specific widget to render.
503
+ */
504
+ widget: 'cards-by-month' | 'top-spenders';
505
+ };
506
+
507
+ /**
508
+ * Represents an error that occurs when an invalid token is encountered.
509
+ */
510
+ export declare class InvalidTokenError extends CapitalOSError {
511
+ constructor();
512
+ }
513
+
514
+ /**
515
+ * Renders the CapitalOS Issue Card experience.
516
+ */
517
+ export declare function IssueCard({ cardholder, onDone, onCancel, ...restOfProps }: IssueCardProps): JSX.Element;
518
+
519
+ export declare type IssueCardDefaultValues = z.infer<typeof issueCardDefaultValuesSchema>;
520
+
521
+ declare const issueCardDefaultValuesSchema: z.ZodUnion<[z.ZodObject<{
522
+ firstName: z.ZodString;
523
+ lastName: z.ZodString;
524
+ phone: z.ZodString;
525
+ }, "strip", z.ZodTypeAny, {
526
+ firstName: string;
527
+ lastName: string;
528
+ phone: string;
529
+ }, {
530
+ firstName: string;
531
+ lastName: string;
532
+ phone: string;
533
+ }>, z.ZodObject<{
534
+ userId: z.ZodString;
535
+ }, "strip", z.ZodTypeAny, {
536
+ userId: string;
537
+ }, {
538
+ userId: string;
539
+ }>]>;
540
+
541
+ export declare type IssueCardProps = CommonProps & {
542
+ /**
543
+ * Default values to prefill the form with.
544
+ *
545
+ * Either provide a userId, in which case the default values will be taken from that user's profile, or provide the cardholder's details directly.
546
+ */
547
+ cardholder?: IssueCardDefaultValues;
548
+ /**
549
+ * Callback to invoke when the card was created successfully.
550
+ */
551
+ onDone: () => void;
552
+ /**
553
+ * Callback to invoke when the card creation was cancelled by the user.
554
+ */
555
+ onCancel: () => void;
556
+ };
557
+
558
+ export declare function Onboarding<T extends OnboardingEntryPoint>({ onDone, entryPoint: onboardingEntryPoint, exitPoint: onboardingExitPoint, ...restOfProps }: OnboardingProps<T>): JSX.Element;
559
+
560
+ declare type OnboardingEntryPoint = keyof AllowedExitPoints;
561
+
562
+ declare type OnboardingProps<T extends keyof AllowedExitPoints> = CommonProps & {
563
+ entryPoint?: T;
564
+ exitPoint?: AllowedExitPoints[T];
565
+ onDone: (account: Account) => void;
566
+ };
567
+
568
+ /**
569
+ * An error type providing a reason code and message.
570
+ * Penpal only passes plain objects, so this does not inherit from Error.
571
+ */
572
+ export declare type RawErrorDetails = {
573
+ code: ErrorCode;
574
+ message: string;
575
+ };
576
+
577
+ declare type RenderingContext_2 = {
578
+ entryPoint?: EntryPoint;
579
+ referer?: string;
580
+ };
581
+
582
+ declare type RenderingContext_3 = z.infer<typeof renderingContextSchema>;
583
+
584
+ declare const renderingContextSchema: z.ZodIntersection<z.ZodDiscriminatedUnion<"entryPoint", [z.ZodObject<{
585
+ entryPoint: z.ZodLiteral<"createCard">;
586
+ cardholder: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodObject<{
587
+ firstName: z.ZodString;
588
+ lastName: z.ZodString;
589
+ phone: z.ZodString;
590
+ }, "strip", z.ZodTypeAny, {
591
+ firstName: string;
592
+ lastName: string;
593
+ phone: string;
594
+ }, {
595
+ firstName: string;
596
+ lastName: string;
597
+ phone: string;
598
+ }>, z.ZodObject<{
599
+ userId: z.ZodString;
600
+ }, "strip", z.ZodTypeAny, {
601
+ userId: string;
602
+ }, {
603
+ userId: string;
604
+ }>]>>>;
605
+ }, "strip", z.ZodTypeAny, {
606
+ entryPoint: "createCard";
607
+ cardholder?: {
608
+ firstName: string;
609
+ lastName: string;
610
+ phone: string;
611
+ } | {
612
+ userId: string;
613
+ } | null | undefined;
614
+ }, {
615
+ entryPoint: "createCard";
616
+ cardholder?: {
617
+ firstName: string;
618
+ lastName: string;
619
+ phone: string;
620
+ } | {
621
+ userId: string;
622
+ } | null | undefined;
623
+ }>, z.ZodObject<{
624
+ entryPoint: z.ZodLiteral<"createDispute">;
625
+ transactionId: z.ZodString;
626
+ }, "strip", z.ZodTypeAny, {
627
+ entryPoint: "createDispute";
628
+ transactionId: string;
629
+ }, {
630
+ entryPoint: "createDispute";
631
+ transactionId: string;
632
+ }>, z.ZodObject<{
633
+ entryPoint: z.ZodLiteral<"billPayApp">;
634
+ }, "strip", z.ZodTypeAny, {
635
+ entryPoint: "billPayApp";
636
+ }, {
637
+ entryPoint: "billPayApp";
638
+ }>, z.ZodObject<{
639
+ entryPoint: z.ZodLiteral<"cardDetails">;
640
+ cardId: z.ZodString;
641
+ cardOnly: z.ZodOptional<z.ZodBoolean>;
642
+ }, "strip", z.ZodTypeAny, {
643
+ cardId: string;
644
+ entryPoint: "cardDetails";
645
+ cardOnly?: boolean | undefined;
646
+ }, {
647
+ cardId: string;
648
+ entryPoint: "cardDetails";
649
+ cardOnly?: boolean | undefined;
650
+ }>, z.ZodObject<{
651
+ entryPoint: z.ZodLiteral<"accountDetails">;
652
+ }, "strip", z.ZodTypeAny, {
653
+ entryPoint: "accountDetails";
654
+ }, {
655
+ entryPoint: "accountDetails";
656
+ }>, z.ZodObject<{
657
+ entryPoint: z.ZodLiteral<"accountActions">;
658
+ }, "strip", z.ZodTypeAny, {
659
+ entryPoint: "accountActions";
660
+ }, {
661
+ entryPoint: "accountActions";
662
+ }>, z.ZodObject<{
663
+ entryPoint: z.ZodLiteral<"insightsDashboard">;
664
+ }, "strip", z.ZodTypeAny, {
665
+ entryPoint: "insightsDashboard";
666
+ }, {
667
+ entryPoint: "insightsDashboard";
668
+ }>, z.ZodObject<{
669
+ entryPoint: z.ZodLiteral<"insightsWidget">;
670
+ widget: z.ZodEnum<["cards-by-month", "top-spenders"]>;
671
+ }, "strip", z.ZodTypeAny, {
672
+ entryPoint: "insightsWidget";
673
+ widget: "cards-by-month" | "top-spenders";
674
+ }, {
675
+ entryPoint: "insightsWidget";
676
+ widget: "cards-by-month" | "top-spenders";
677
+ }>, z.ZodObject<{
678
+ entryPoint: z.ZodLiteral<"onboarding">;
679
+ onboardingEntryPoint: z.ZodDefault<z.ZodEnum<["welcome", "application"]>>;
680
+ onboardingExitPoint: z.ZodDefault<z.ZodEnum<["application", "activation"]>>;
681
+ }, "strip", z.ZodTypeAny, {
682
+ entryPoint: "onboarding";
683
+ onboardingEntryPoint: "welcome" | "application";
684
+ onboardingExitPoint: "application" | "activation";
685
+ }, {
686
+ entryPoint: "onboarding";
687
+ onboardingEntryPoint?: "welcome" | "application" | undefined;
688
+ onboardingExitPoint?: "application" | "activation" | undefined;
689
+ }>, z.ZodObject<{
690
+ entryPoint: z.ZodLiteral<"cardsApp">;
691
+ }, "strip", z.ZodTypeAny, {
692
+ entryPoint: "cardsApp";
693
+ }, {
694
+ entryPoint: "cardsApp";
695
+ }>]>, z.ZodObject<{
696
+ referer: z.ZodOptional<z.ZodNullable<z.ZodString>>;
697
+ }, "strip", z.ZodTypeAny, {
698
+ referer?: string | null | undefined;
699
+ }, {
700
+ referer?: string | null | undefined;
701
+ }>>;
702
+
703
+ /**
704
+ * connects to child iframe and returns whether the iframe is loaded or not.
705
+ */
706
+ export declare function useIframeConnection({ iframeRef, token, onError, methods, }: {
707
+ iframeRef: React.RefObject<HTMLIFrameElement>;
708
+ token: string;
709
+ onError: ((error: Error) => void) | undefined | null;
710
+ methods: IframeConnectionMethods;
711
+ }): void;
712
+
713
+ export { }