@flopay/shared 1.4.2 → 1.4.4

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
@@ -434,13 +434,18 @@ interface StripeSessionIntentRequest extends SessionIntentAuthorizationAttempt {
434
434
  paymentMethodId: string | null;
435
435
  intentKind: 'payment' | 'setup';
436
436
  }
437
- /** Direct PayPal order/subscription request. */
437
+ /**
438
+ * Direct PayPal intent request. Always `intentKind: 'payment'`: the backend
439
+ * derives order vs subscription from the session's products and returns that as
440
+ * the response `providerObjectType`. PayPal setup intents are unsupported —
441
+ * PayPal vaults during a successful Order capture, not via standalone setups.
442
+ */
438
443
  interface PayPalSessionIntentRequest extends SessionIntentAuthorizationAttempt {
439
444
  provider: 'paypal';
440
445
  paymentMethodCategory: 'wallet';
441
446
  paymentMethodType: 'paypal';
442
447
  paymentMethodId: null;
443
- intentKind: 'order' | 'subscription';
448
+ intentKind: 'payment';
444
449
  }
445
450
  type CreateSessionIntentRequest = StripeSessionIntentRequest | PayPalSessionIntentRequest;
446
451
  interface StripeSessionIntent extends StripeSessionIntentRequest {
@@ -450,6 +455,8 @@ interface StripeSessionIntent extends StripeSessionIntentRequest {
450
455
  interface PayPalSessionIntent extends PayPalSessionIntentRequest {
451
456
  clientSecret: null;
452
457
  providerObjectId: string;
458
+ /** Server-derived from the session's products (a subscription product → 'subscription'). */
459
+ providerObjectType: 'order' | 'subscription';
453
460
  }
454
461
  type SessionIntent = StripeSessionIntent | PayPalSessionIntent;
455
462
  type SessionIntentDeclineRequest = {
@@ -1490,7 +1497,7 @@ declare function getConfiguredBillingApiUrl(): string;
1490
1497
  declare function getFloPayEnvironment(): FloPayEnvironment;
1491
1498
 
1492
1499
  /** Current SDK version. */
1493
- declare const SDK_VERSION = "1.4.1";
1500
+ declare const SDK_VERSION = "1.4.4";
1494
1501
  /**
1495
1502
  * HTTP header the SDK sends on `POST /v1/checkouts/sessions` so the backend
1496
1503
  * provides compatibility visibility on session create/read requests. Vault
package/dist/index.d.ts CHANGED
@@ -434,13 +434,18 @@ interface StripeSessionIntentRequest extends SessionIntentAuthorizationAttempt {
434
434
  paymentMethodId: string | null;
435
435
  intentKind: 'payment' | 'setup';
436
436
  }
437
- /** Direct PayPal order/subscription request. */
437
+ /**
438
+ * Direct PayPal intent request. Always `intentKind: 'payment'`: the backend
439
+ * derives order vs subscription from the session's products and returns that as
440
+ * the response `providerObjectType`. PayPal setup intents are unsupported —
441
+ * PayPal vaults during a successful Order capture, not via standalone setups.
442
+ */
438
443
  interface PayPalSessionIntentRequest extends SessionIntentAuthorizationAttempt {
439
444
  provider: 'paypal';
440
445
  paymentMethodCategory: 'wallet';
441
446
  paymentMethodType: 'paypal';
442
447
  paymentMethodId: null;
443
- intentKind: 'order' | 'subscription';
448
+ intentKind: 'payment';
444
449
  }
445
450
  type CreateSessionIntentRequest = StripeSessionIntentRequest | PayPalSessionIntentRequest;
446
451
  interface StripeSessionIntent extends StripeSessionIntentRequest {
@@ -450,6 +455,8 @@ interface StripeSessionIntent extends StripeSessionIntentRequest {
450
455
  interface PayPalSessionIntent extends PayPalSessionIntentRequest {
451
456
  clientSecret: null;
452
457
  providerObjectId: string;
458
+ /** Server-derived from the session's products (a subscription product → 'subscription'). */
459
+ providerObjectType: 'order' | 'subscription';
453
460
  }
454
461
  type SessionIntent = StripeSessionIntent | PayPalSessionIntent;
455
462
  type SessionIntentDeclineRequest = {
@@ -1490,7 +1497,7 @@ declare function getConfiguredBillingApiUrl(): string;
1490
1497
  declare function getFloPayEnvironment(): FloPayEnvironment;
1491
1498
 
1492
1499
  /** Current SDK version. */
1493
- declare const SDK_VERSION = "1.4.1";
1500
+ declare const SDK_VERSION = "1.4.4";
1494
1501
  /**
1495
1502
  * HTTP header the SDK sends on `POST /v1/checkouts/sessions` so the backend
1496
1503
  * provides compatibility visibility on session create/read requests. Vault