@primer-io/primer-js 0.7.0 → 0.7.2

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.
@@ -1777,6 +1777,7 @@ export interface VaultedMethodsUpdateData {
1777
1777
  export declare class PrimerJS {
1778
1778
  private headlessInstance;
1779
1779
  private paymentMethods;
1780
+ private paymentManagers;
1780
1781
  /**
1781
1782
  * Called when payment flow begins.
1782
1783
  * Use for analytics tracking or UI updates (e.g., disable form).
@@ -1901,6 +1902,11 @@ export declare class PrimerJS {
1901
1902
  * @internal - This is only used internally by the SDK
1902
1903
  */
1903
1904
  setPaymentMethods(methods: InitializedPayments): void;
1905
+ /**
1906
+ * Set the initialized payment managers
1907
+ * @internal - This is only used internally by the SDK
1908
+ */
1909
+ setPaymentManagers(managers: InitializedManagersMap): void;
1904
1910
  /**
1905
1911
  * Refetches a new client session from merchant backend.
1906
1912
  */
@@ -1929,6 +1935,24 @@ export declare class PrimerJS {
1929
1935
  * @internal - This is only used internally by the SDK
1930
1936
  */
1931
1937
  handleVaultedMethodsUpdate(vaultedPayments: InitializedVaultedPayments): void;
1938
+ /**
1939
+ * Sets the cardholder name value in the card payment form.
1940
+ *
1941
+ * ⚠️ Must be called after card hosted inputs have been rendered.
1942
+ * Calling too early will log a warning and fail gracefully.
1943
+ *
1944
+ * @param cardholderName - The cardholder name to set
1945
+ *
1946
+ * @example
1947
+ * ```typescript
1948
+ * const checkout = document.querySelector('primer-checkout');
1949
+ * checkout.addEventListener('primer:ready', (event) => {
1950
+ * const primerJS = event.detail;
1951
+ * primerJS.setCardholderName('John Doe');
1952
+ * });
1953
+ * ```
1954
+ */
1955
+ setCardholderName(cardholderName: string): void;
1932
1956
  }
1933
1957
  export interface CardSubmitResult {
1934
1958
  success?: boolean;
@@ -2462,6 +2486,9 @@ declare class HeadlessSdkController implements ReactiveController {
2462
2486
  initializePaymentMethodManager(paymentMethod: PaymentMethodInfo): () => Promise<{
2463
2487
  type: PaymentMethodType;
2464
2488
  manager: IKlarnaPaymentMethodManager;
2489
+ } | {
2490
+ type: PaymentMethodType;
2491
+ manager: ICardPaymentMethodManager;
2465
2492
  } | {
2466
2493
  type: PaymentMethodType;
2467
2494
  manager: IRedirectPaymentMethodManager;