@onkernel/sdk 0.129.0 → 0.130.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.
@@ -368,7 +368,8 @@ export namespace CardVaultItemSpec {
368
368
  */
369
369
  export interface LinkCardVaultItemSpec {
370
370
  /**
371
- * Integer amount in minor currency units, at most 50000.
371
+ * Integer amount in minor currency units, at most 50000. With recurring, the
372
+ * spending limit per period, not a lifetime total.
372
373
  */
373
374
  amount: number;
374
375
 
@@ -398,6 +399,19 @@ export namespace CardVaultItemSpec {
398
399
 
399
400
  metadata?: { [key: string]: string };
400
401
 
402
+ /**
403
+ * Recurring terms for a subscription or other repeated purchase. The amount
404
+ * becomes the spending limit for each period of interval_count intervals, for
405
+ * example every 2 weeks. The merchant schedules charges. The card stays ready
406
+ * after each charge until it expires or is deleted; do not create a new card each
407
+ * period. Deleting the card, its wallet or its vault first cancels the credential
408
+ * with Link, so later charges decline; if Link cannot be reached, deletion returns
409
+ * 409 provider_revocation_pending and should be retried. Deletion does not cancel
410
+ * the subscription with the merchant. Recurring terms cannot be changed once the
411
+ * card is authorized.
412
+ */
413
+ recurring?: LinkCardVaultItemSpec.Recurring;
414
+
401
415
  totals?: Array<LinkCardVaultItemSpec.Total>;
402
416
  }
403
417
 
@@ -438,6 +452,26 @@ export namespace CardVaultItemSpec {
438
452
  }
439
453
  }
440
454
 
455
+ /**
456
+ * Recurring terms for a subscription or other repeated purchase. The amount
457
+ * becomes the spending limit for each period of interval_count intervals, for
458
+ * example every 2 weeks. The merchant schedules charges. The card stays ready
459
+ * after each charge until it expires or is deleted; do not create a new card each
460
+ * period. Deleting the card, its wallet or its vault first cancels the credential
461
+ * with Link, so later charges decline; if Link cannot be reached, deletion returns
462
+ * 409 provider_revocation_pending and should be retried. Deletion does not cancel
463
+ * the subscription with the merchant. Recurring terms cannot be changed once the
464
+ * card is authorized.
465
+ */
466
+ export interface Recurring {
467
+ interval: 'day' | 'week' | 'month' | 'year';
468
+
469
+ /**
470
+ * Number of intervals per period. Link defaults it to 1.
471
+ */
472
+ interval_count?: number;
473
+ }
474
+
441
475
  export interface Total {
442
476
  /**
443
477
  * Total amount in minor currency units.
@@ -713,7 +747,7 @@ export namespace CredentialAccountVaultItem {
713
747
  export interface AvailableExpansion {
714
748
  description: string;
715
749
 
716
- type: 'payment_methods';
750
+ type: 'payment_methods' | 'link_user_info' | 'link_shipping_addresses';
717
751
  }
718
752
 
719
753
  /**
@@ -1088,7 +1122,7 @@ export namespace CredentialVaultItem {
1088
1122
  export interface AvailableExpansion {
1089
1123
  description: string;
1090
1124
 
1091
- type: 'payment_methods';
1125
+ type: 'payment_methods' | 'link_user_info' | 'link_shipping_addresses';
1092
1126
  }
1093
1127
 
1094
1128
  /**
@@ -1291,7 +1325,8 @@ export interface FillVaultItemOperationRequest {
1291
1325
  page_url?: string;
1292
1326
 
1293
1327
  /**
1294
- * Total operation deadline in milliseconds, not a per-field timeout.
1328
+ * @deprecated Ignored. Fill sets no operation deadline; typing pace adapts to the
1329
+ * length of the values instead. Accepted for compatibility.
1295
1330
  */
1296
1331
  timeout_ms?: number;
1297
1332
  }
@@ -1327,8 +1362,11 @@ export interface KernelCardState {
1327
1362
  provider: 'kernel';
1328
1363
 
1329
1364
  /**
1330
- * pending_authorization on a Visa purchase waits for the cardholder to approve it
1331
- * through the spend_approval action; an unused link expires after 30 minutes.
1365
+ * pending_authorization waits for cardholder approval on Visa purchases or fresh
1366
+ * security-code collection on alias-mode purchases through the spend_approval
1367
+ * action; an unused link expires after 30 minutes. Alias-mode cards become ready
1368
+ * after collection and expire at the temporary security-code alias deadline, by
1369
+ * default five minutes later. An expired alias purchase requires a new card.
1332
1370
  * recovery_required means verification, approving the purchase or issuing the
1333
1371
  * one-time code has an unresolved outcome. A server-classified initial attestation
1334
1372
  * failure before intent dispatch may advertise restart_verification to prepare a
@@ -1386,12 +1424,13 @@ export namespace KernelCardState {
1386
1424
  * spend_approval action: the cardholder approves it with a Visa passkey, and
1387
1425
  * Kernel registers a Visa intent for one transaction up to the amount before
1388
1426
  * issuing the code. For supported cards whose network cannot be enrolled for
1389
- * agentic tokens, authorize prepares checkout details without issuing a one-time
1390
- * code. The card can be filled into one checkout before its expires_at, one hour
1391
- * after authorization. Fill types those details on merchant_url's origin. The
1392
- * amount, merchant_url and merchant_country are recorded but do not restrict
1393
- * payment requests sent by the browser. Card updates are not supported; delete and
1394
- * create a new item instead.
1427
+ * agentic tokens, authorize returns pending_authorization with a spend_approval
1428
+ * action to collect a fresh security code in a hosted field. Once collected, the
1429
+ * card is ready and can be filled before its expires_at, by default five minutes
1430
+ * after collection. An expired card requires a new purchase. Fill types those
1431
+ * details on merchant_url's origin. The amount, merchant_url and merchant_country
1432
+ * are recorded but do not restrict payment requests sent by the browser. Card
1433
+ * updates are not supported; delete and create a new item instead.
1395
1434
  */
1396
1435
  export interface KernelCardVaultItemSpec {
1397
1436
  /**
@@ -1527,6 +1566,196 @@ export interface KernelWalletVaultItemSpec {
1527
1566
  provider: 'kernel';
1528
1567
  }
1529
1568
 
1569
+ /**
1570
+ * One entry of Link's `GET /shipping_addresses` response, passed through as Link
1571
+ * reports it. Kernel never stores it.
1572
+ */
1573
+ export interface LinkShippingAddress {
1574
+ /**
1575
+ * Link shipping address ID.
1576
+ */
1577
+ id: string;
1578
+
1579
+ is_default: boolean;
1580
+
1581
+ nickname: string | null;
1582
+
1583
+ /**
1584
+ * Link's nullable postal address fields. Omitted from the shipping address when
1585
+ * Link reports null.
1586
+ */
1587
+ address?: LinkShippingAddress.Address;
1588
+ }
1589
+
1590
+ export namespace LinkShippingAddress {
1591
+ /**
1592
+ * Link's nullable postal address fields. Omitted from the shipping address when
1593
+ * Link reports null.
1594
+ */
1595
+ export interface Address {
1596
+ /**
1597
+ * State, province or region.
1598
+ */
1599
+ administrative_area: string | null;
1600
+
1601
+ country_code: string | null;
1602
+
1603
+ dependent_locality: string | null;
1604
+
1605
+ line_1: string | null;
1606
+
1607
+ line_2: string | null;
1608
+
1609
+ /**
1610
+ * City or town.
1611
+ */
1612
+ locality: string | null;
1613
+
1614
+ name: string | null;
1615
+
1616
+ postal_code: string | null;
1617
+
1618
+ sorting_code: string | null;
1619
+ }
1620
+ }
1621
+
1622
+ /**
1623
+ * Link's `GET /userinfo` response for the connected wallet, passed through as Link
1624
+ * reports it when the `link_user_info` expansion is requested. Kernel never stores
1625
+ * it. Null fields are null at Link; omitted fields were not reported. Amounts are
1626
+ * in the minor unit of `default_spend_request_currency`.
1627
+ */
1628
+ export interface LinkUserInfo {
1629
+ /**
1630
+ * Stable Link user ID.
1631
+ */
1632
+ id: string | null;
1633
+
1634
+ email: string | null;
1635
+
1636
+ first_name: string | null;
1637
+
1638
+ last_name: string | null;
1639
+
1640
+ name: string | null;
1641
+
1642
+ phone: string | null;
1643
+
1644
+ /**
1645
+ * The Link user's postal address. Omitted when Link reports none.
1646
+ */
1647
+ address?: LinkUserInfo.Address;
1648
+
1649
+ /**
1650
+ * Link's agent wallet spend limits, per transaction and over rolling periods.
1651
+ */
1652
+ agent_wallet_spend_limits?: LinkUserInfo.AgentWalletSpendLimits;
1653
+
1654
+ /**
1655
+ * Verification Link requires from the user before the agent wallet can spend.
1656
+ */
1657
+ agent_wallet_step_up?: LinkUserInfo.AgentWalletStepUp;
1658
+
1659
+ /**
1660
+ * Lowercase ISO currency Link applies to a spend request created without one.
1661
+ */
1662
+ default_spend_request_currency?: string;
1663
+
1664
+ /**
1665
+ * Whether the user can fund purchases from a Link balance.
1666
+ */
1667
+ eligible_for_balance?: boolean;
1668
+ }
1669
+
1670
+ export namespace LinkUserInfo {
1671
+ /**
1672
+ * The Link user's postal address. Omitted when Link reports none.
1673
+ */
1674
+ export interface Address {
1675
+ city: string | null;
1676
+
1677
+ country: string | null;
1678
+
1679
+ line1: string | null;
1680
+
1681
+ line2: string | null;
1682
+
1683
+ postal_code: string | null;
1684
+
1685
+ state: string | null;
1686
+ }
1687
+
1688
+ /**
1689
+ * Link's agent wallet spend limits, per transaction and over rolling periods.
1690
+ */
1691
+ export interface AgentWalletSpendLimits {
1692
+ daily: AgentWalletSpendLimits.Daily;
1693
+
1694
+ per_transaction: AgentWalletSpendLimits.PerTransaction;
1695
+
1696
+ thirty_day: AgentWalletSpendLimits.ThirtyDay;
1697
+ }
1698
+
1699
+ export namespace AgentWalletSpendLimits {
1700
+ export interface Daily {
1701
+ /**
1702
+ * Null means unlimited.
1703
+ */
1704
+ limit: number | null;
1705
+
1706
+ /**
1707
+ * Amount still available in the rolling period; null means unlimited.
1708
+ */
1709
+ remaining: number | null;
1710
+
1711
+ /**
1712
+ * Amount already spent in the rolling period.
1713
+ */
1714
+ used: number;
1715
+ }
1716
+
1717
+ export interface PerTransaction {
1718
+ /**
1719
+ * Null means unlimited.
1720
+ */
1721
+ limit: number | null;
1722
+ }
1723
+
1724
+ export interface ThirtyDay {
1725
+ /**
1726
+ * Null means unlimited.
1727
+ */
1728
+ limit: number | null;
1729
+
1730
+ /**
1731
+ * Amount still available in the rolling period; null means unlimited.
1732
+ */
1733
+ remaining: number | null;
1734
+
1735
+ /**
1736
+ * Amount already spent in the rolling period.
1737
+ */
1738
+ used: number;
1739
+ }
1740
+ }
1741
+
1742
+ /**
1743
+ * Verification Link requires from the user before the agent wallet can spend.
1744
+ */
1745
+ export interface AgentWalletStepUp {
1746
+ /**
1747
+ * URL where the user completes verification; null when no action is available.
1748
+ */
1749
+ action_url: string | null;
1750
+
1751
+ /**
1752
+ * Link status such as not_required, ssn_verification, identity_verification,
1753
+ * contact_support or complete.
1754
+ */
1755
+ status: string;
1756
+ }
1757
+ }
1758
+
1530
1759
  export interface ManagedAuthCredentialVaultField {
1531
1760
  /**
1532
1761
  * Text, email, and password have form inputs; totp and passkey do not and are
@@ -2255,7 +2484,7 @@ export namespace VaultItem {
2255
2484
  export interface AvailableExpansion {
2256
2485
  description: string;
2257
2486
 
2258
- type: 'payment_methods';
2487
+ type: 'payment_methods' | 'link_user_info' | 'link_shipping_addresses';
2259
2488
  }
2260
2489
 
2261
2490
  /**
@@ -2284,6 +2513,20 @@ export namespace VaultItem {
2284
2513
  * Live, non-persisted data requested through the item GET expand parameter.
2285
2514
  */
2286
2515
  export interface Expanded {
2516
+ /**
2517
+ * Link's saved shipping addresses, present when the `link_shipping_addresses`
2518
+ * expansion is requested.
2519
+ */
2520
+ link_shipping_addresses?: Array<ItemsAPI.LinkShippingAddress>;
2521
+
2522
+ /**
2523
+ * Link's `GET /userinfo` response for the connected wallet, passed through as Link
2524
+ * reports it when the `link_user_info` expansion is requested. Kernel never stores
2525
+ * it. Null fields are null at Link; omitted fields were not reported. Amounts are
2526
+ * in the minor unit of `default_spend_request_currency`.
2527
+ */
2528
+ link_user_info?: ItemsAPI.LinkUserInfo;
2529
+
2287
2530
  payment_methods?: Array<ItemsAPI.VaultPaymentMethod>;
2288
2531
  }
2289
2532
  }
@@ -2335,7 +2578,7 @@ export namespace VaultItem {
2335
2578
  export interface AvailableExpansion {
2336
2579
  description: string;
2337
2580
 
2338
- type: 'payment_methods';
2581
+ type: 'payment_methods' | 'link_user_info' | 'link_shipping_addresses';
2339
2582
  }
2340
2583
 
2341
2584
  /**
@@ -2506,7 +2749,7 @@ export namespace VaultItemOperationResponse {
2506
2749
  export interface AvailableExpansion {
2507
2750
  description: string;
2508
2751
 
2509
- type: 'payment_methods';
2752
+ type: 'payment_methods' | 'link_user_info' | 'link_shipping_addresses';
2510
2753
  }
2511
2754
 
2512
2755
  /**
@@ -2535,6 +2778,20 @@ export namespace VaultItemOperationResponse {
2535
2778
  * Live, non-persisted data requested through the item GET expand parameter.
2536
2779
  */
2537
2780
  export interface Expanded {
2781
+ /**
2782
+ * Link's saved shipping addresses, present when the `link_shipping_addresses`
2783
+ * expansion is requested.
2784
+ */
2785
+ link_shipping_addresses?: Array<ItemsAPI.LinkShippingAddress>;
2786
+
2787
+ /**
2788
+ * Link's `GET /userinfo` response for the connected wallet, passed through as Link
2789
+ * reports it when the `link_user_info` expansion is requested. Kernel never stores
2790
+ * it. Null fields are null at Link; omitted fields were not reported. Amounts are
2791
+ * in the minor unit of `default_spend_request_currency`.
2792
+ */
2793
+ link_user_info?: ItemsAPI.LinkUserInfo;
2794
+
2538
2795
  payment_methods?: Array<ItemsAPI.VaultPaymentMethod>;
2539
2796
  }
2540
2797
  }
@@ -2586,7 +2843,7 @@ export namespace VaultItemOperationResponse {
2586
2843
  export interface AvailableExpansion {
2587
2844
  description: string;
2588
2845
 
2589
- type: 'payment_methods';
2846
+ type: 'payment_methods' | 'link_user_info' | 'link_shipping_addresses';
2590
2847
  }
2591
2848
 
2592
2849
  /**
@@ -2912,7 +3169,7 @@ export interface ItemRetrieveParams {
2912
3169
  * Query param: Live fields advertised by `available_expansions` to include in
2913
3170
  * `expanded`.
2914
3171
  */
2915
- expand?: Array<'payment_methods'>;
3172
+ expand?: Array<'payment_methods' | 'link_user_info' | 'link_shipping_addresses'>;
2916
3173
 
2917
3174
  /**
2918
3175
  * Query param: Hold for up to this many seconds while the item is pending
@@ -3172,7 +3429,8 @@ export declare namespace ItemPerformOperationParams {
3172
3429
  page_url?: string;
3173
3430
 
3174
3431
  /**
3175
- * Body param: Total operation deadline in milliseconds, not a per-field timeout.
3432
+ * @deprecated Body param: Ignored. Fill sets no operation deadline; typing pace
3433
+ * adapts to the length of the values instead. Accepted for compatibility.
3176
3434
  */
3177
3435
  timeout_ms?: number;
3178
3436
  }
@@ -3624,6 +3882,8 @@ export declare namespace Items {
3624
3882
  type KernelCredentialVaultItemState as KernelCredentialVaultItemState,
3625
3883
  type KernelWalletState as KernelWalletState,
3626
3884
  type KernelWalletVaultItemSpec as KernelWalletVaultItemSpec,
3885
+ type LinkShippingAddress as LinkShippingAddress,
3886
+ type LinkUserInfo as LinkUserInfo,
3627
3887
  type ManagedAuthCredentialVaultField as ManagedAuthCredentialVaultField,
3628
3888
  type ManagedAuthCredentialVaultItemSpec as ManagedAuthCredentialVaultItemSpec,
3629
3889
  type ManagedAuthCredentialVaultItemSpecInput as ManagedAuthCredentialVaultItemSpecInput,
@@ -45,6 +45,8 @@ import {
45
45
  KernelCredentialVaultItemState,
46
46
  KernelWalletState,
47
47
  KernelWalletVaultItemSpec,
48
+ LinkShippingAddress,
49
+ LinkUserInfo,
48
50
  ManagedAuthCredentialVaultField,
49
51
  ManagedAuthCredentialVaultItemSpec,
50
52
  ManagedAuthCredentialVaultItemSpecInput,
@@ -299,6 +301,8 @@ export declare namespace Vaults {
299
301
  type KernelCredentialVaultItemState as KernelCredentialVaultItemState,
300
302
  type KernelWalletState as KernelWalletState,
301
303
  type KernelWalletVaultItemSpec as KernelWalletVaultItemSpec,
304
+ type LinkShippingAddress as LinkShippingAddress,
305
+ type LinkUserInfo as LinkUserInfo,
302
306
  type ManagedAuthCredentialVaultField as ManagedAuthCredentialVaultField,
303
307
  type ManagedAuthCredentialVaultItemSpec as ManagedAuthCredentialVaultItemSpec,
304
308
  type ManagedAuthCredentialVaultItemSpecInput as ManagedAuthCredentialVaultItemSpecInput,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.129.0'; // x-release-please-version
1
+ export const VERSION = '0.130.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.129.0";
1
+ export declare const VERSION = "0.130.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.129.0";
1
+ export declare const VERSION = "0.130.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.129.0'; // x-release-please-version
4
+ exports.VERSION = '0.130.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.129.0'; // x-release-please-version
1
+ export const VERSION = '0.130.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map