@moonpay/platform-sdk-core 1.26.1 → 1.27.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/dist/index.d.cts CHANGED
@@ -217,6 +217,12 @@ declare function applyPresentationParam(url: string, presentation?: Presentation
217
217
  * already carries one, and only when the client actually holds one.
218
218
  */
219
219
  declare function applyClientTokenParam(url: string, clientToken: string): string;
220
+ /**
221
+ * Set `resume=true` on an already-built challenge URL when the partner opts in
222
+ * to the Apple Pay / Google Pay hand-back — unless the URL already carries a
223
+ * `resume` param. Returns the URL untouched when not opted in.
224
+ */
225
+ declare function applyResumeParam(url: string, resume?: boolean): string;
220
226
 
221
227
  interface CoreClientOptions extends ClientContextOptions, UrlBuilderOptions {
222
228
  /**
@@ -399,4 +405,4 @@ declare function isTrustedFrameOrigin(origin: string): boolean;
399
405
  */
400
406
  declare function isTrustedFrameUrl(value: string): boolean;
401
407
 
402
- export { type ClientContext, type ClientContextOptions, type CoreClient, type CoreClientOptions, type Credentials, FRAME_PATHS, type FrameHandle, type FrameOptions, type FrameOrchestratorOptions, type FrameTransport, type GetCredentialsError, type GetPaymentMethodsParams, type KeyPair, type ListAssetsParams, type ListTransactionsParams, type PresentationMode, TRUSTED_FRAME_ORIGIN_PATTERNS, type ThemeOptions, type UrlBuilderOptions, apiFetch, applyClientTokenParam, applyPresentationParam, applyThemeParam, buildFrameUrl, createClientContext, createClientCore, createFrameOrchestrator, createIdentity, decryptCredentials, deletePaymentMethod, generateKeyPair, getAssets, getCustomer, getCustomerUploadUrl, getIdentity, getIdentityUploadUrl, getPaymentMethods, getQuote, getTransaction, isSecureRandomAvailable, isTrustedFrameOrigin, isTrustedFrameUrl, listTransactions, presentationParams, simulateBankTransfer, submitCustomerFiles, submitCustomerKyc, submitIdentityFiles, themeParams, updateIdentity, verifyIdentity };
408
+ export { type ClientContext, type ClientContextOptions, type CoreClient, type CoreClientOptions, type Credentials, FRAME_PATHS, type FrameHandle, type FrameOptions, type FrameOrchestratorOptions, type FrameTransport, type GetCredentialsError, type GetPaymentMethodsParams, type KeyPair, type ListAssetsParams, type ListTransactionsParams, type PresentationMode, TRUSTED_FRAME_ORIGIN_PATTERNS, type ThemeOptions, type UrlBuilderOptions, apiFetch, applyClientTokenParam, applyPresentationParam, applyResumeParam, applyThemeParam, buildFrameUrl, createClientContext, createClientCore, createFrameOrchestrator, createIdentity, decryptCredentials, deletePaymentMethod, generateKeyPair, getAssets, getCustomer, getCustomerUploadUrl, getIdentity, getIdentityUploadUrl, getPaymentMethods, getQuote, getTransaction, isSecureRandomAvailable, isTrustedFrameOrigin, isTrustedFrameUrl, listTransactions, presentationParams, simulateBankTransfer, submitCustomerFiles, submitCustomerKyc, submitIdentityFiles, themeParams, updateIdentity, verifyIdentity };
package/dist/index.d.ts CHANGED
@@ -217,6 +217,12 @@ declare function applyPresentationParam(url: string, presentation?: Presentation
217
217
  * already carries one, and only when the client actually holds one.
218
218
  */
219
219
  declare function applyClientTokenParam(url: string, clientToken: string): string;
220
+ /**
221
+ * Set `resume=true` on an already-built challenge URL when the partner opts in
222
+ * to the Apple Pay / Google Pay hand-back — unless the URL already carries a
223
+ * `resume` param. Returns the URL untouched when not opted in.
224
+ */
225
+ declare function applyResumeParam(url: string, resume?: boolean): string;
220
226
 
221
227
  interface CoreClientOptions extends ClientContextOptions, UrlBuilderOptions {
222
228
  /**
@@ -399,4 +405,4 @@ declare function isTrustedFrameOrigin(origin: string): boolean;
399
405
  */
400
406
  declare function isTrustedFrameUrl(value: string): boolean;
401
407
 
402
- export { type ClientContext, type ClientContextOptions, type CoreClient, type CoreClientOptions, type Credentials, FRAME_PATHS, type FrameHandle, type FrameOptions, type FrameOrchestratorOptions, type FrameTransport, type GetCredentialsError, type GetPaymentMethodsParams, type KeyPair, type ListAssetsParams, type ListTransactionsParams, type PresentationMode, TRUSTED_FRAME_ORIGIN_PATTERNS, type ThemeOptions, type UrlBuilderOptions, apiFetch, applyClientTokenParam, applyPresentationParam, applyThemeParam, buildFrameUrl, createClientContext, createClientCore, createFrameOrchestrator, createIdentity, decryptCredentials, deletePaymentMethod, generateKeyPair, getAssets, getCustomer, getCustomerUploadUrl, getIdentity, getIdentityUploadUrl, getPaymentMethods, getQuote, getTransaction, isSecureRandomAvailable, isTrustedFrameOrigin, isTrustedFrameUrl, listTransactions, presentationParams, simulateBankTransfer, submitCustomerFiles, submitCustomerKyc, submitIdentityFiles, themeParams, updateIdentity, verifyIdentity };
408
+ export { type ClientContext, type ClientContextOptions, type CoreClient, type CoreClientOptions, type Credentials, FRAME_PATHS, type FrameHandle, type FrameOptions, type FrameOrchestratorOptions, type FrameTransport, type GetCredentialsError, type GetPaymentMethodsParams, type KeyPair, type ListAssetsParams, type ListTransactionsParams, type PresentationMode, TRUSTED_FRAME_ORIGIN_PATTERNS, type ThemeOptions, type UrlBuilderOptions, apiFetch, applyClientTokenParam, applyPresentationParam, applyResumeParam, applyThemeParam, buildFrameUrl, createClientContext, createClientCore, createFrameOrchestrator, createIdentity, decryptCredentials, deletePaymentMethod, generateKeyPair, getAssets, getCustomer, getCustomerUploadUrl, getIdentity, getIdentityUploadUrl, getPaymentMethods, getQuote, getTransaction, isSecureRandomAvailable, isTrustedFrameOrigin, isTrustedFrameUrl, listTransactions, presentationParams, simulateBankTransfer, submitCustomerFiles, submitCustomerKyc, submitIdentityFiles, themeParams, updateIdentity, verifyIdentity };
package/dist/index.js CHANGED
@@ -1708,12 +1708,21 @@ function applyClientTokenParam(url, clientToken) {
1708
1708
  }
1709
1709
  return parsed.href;
1710
1710
  }
1711
+ function applyResumeParam(url, resume) {
1712
+ if (!resume) return url;
1713
+ const parsed = new URL(url);
1714
+ if (!parsed.searchParams.has("resume")) {
1715
+ parsed.searchParams.set("resume", "true");
1716
+ }
1717
+ return parsed.href;
1718
+ }
1711
1719
  export {
1712
1720
  FRAME_PATHS,
1713
1721
  TRUSTED_FRAME_ORIGIN_PATTERNS,
1714
1722
  apiFetch,
1715
1723
  applyClientTokenParam,
1716
1724
  applyPresentationParam,
1725
+ applyResumeParam,
1717
1726
  applyThemeParam,
1718
1727
  buildFrameUrl,
1719
1728
  createClientContext,