@amos.com/amos-js 0.9.17 → 0.9.18

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/src/types.ts CHANGED
@@ -454,12 +454,18 @@ export type Message =
454
454
  /** Parent → embed: confirm a payment intent with an embed token. */
455
455
  type: "CONFIRM_PAYMENT_INTENT";
456
456
  } & Pick<components["schemas"]["PaymentIntent"], "id"> &
457
- Pick<components["schemas"]["EmbedToken"], "token">)
457
+ Pick<components["schemas"]["EmbedToken"], "token"> & {
458
+ /** Present when ACH verification completed via Plaid Link in the parent. */
459
+ plaid?: components["schemas"]["PlaidCredentialsInput"];
460
+ })
458
461
  | ({
459
462
  /** Parent → embed: confirm a setup intent with an embed token. */
460
463
  type: "CONFIRM_SETUP_INTENT";
461
464
  } & Pick<components["schemas"]["SetupIntent"], "id"> &
462
- Pick<components["schemas"]["EmbedToken"], "token">)
465
+ Pick<components["schemas"]["EmbedToken"], "token"> & {
466
+ /** Present when ACH verification completed via Plaid Link in the parent. */
467
+ plaid?: components["schemas"]["PlaidCredentialsInput"];
468
+ })
463
469
  | {
464
470
  /**
465
471
  * Embed → parent: the interactive confirmation flow finished.
@@ -498,6 +504,29 @@ export type Message =
498
504
  */
499
505
  type: "FORM_VALIDITY_CHANGE";
500
506
  isValid: boolean;
507
+ }
508
+ | {
509
+ /**
510
+ * Embed → parent: merchant ACH verification threshold for this
511
+ * render token. `achThreshold` is cents, or `null` when the
512
+ * merchant has no threshold (manual ACH). `requireVerification`
513
+ * is true when the fetch failed in production (fail closed).
514
+ */
515
+ type: "ACH_THRESHOLD";
516
+ achThreshold?: number | null;
517
+ requireVerification?: boolean;
518
+ }
519
+ | {
520
+ /** Parent → embed: mint a Plaid Link token for Connect. */
521
+ type: "CREATE_PLAID_LINK_TOKEN";
522
+ requestId: string;
523
+ }
524
+ | {
525
+ /** Embed → parent: minted Plaid Link token, or `error`. */
526
+ type: "PLAID_LINK_TOKEN";
527
+ requestId: string;
528
+ link_token?: string;
529
+ error?: string;
501
530
  };
502
531
 
503
532
  /**