@onkernel/sdk 0.100.0 → 0.101.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.
Files changed (93) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +3 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/lib/browser-routing.d.mts.map +1 -1
  11. package/lib/browser-routing.d.ts.map +1 -1
  12. package/lib/browser-routing.js +23 -6
  13. package/lib/browser-routing.js.map +1 -1
  14. package/lib/browser-routing.mjs +23 -6
  15. package/lib/browser-routing.mjs.map +1 -1
  16. package/package.json +1 -1
  17. package/resources/browsers/telemetry.d.mts +4 -3
  18. package/resources/browsers/telemetry.d.mts.map +1 -1
  19. package/resources/browsers/telemetry.d.ts +4 -3
  20. package/resources/browsers/telemetry.d.ts.map +1 -1
  21. package/resources/config-registry/config-registry.d.mts +14 -7
  22. package/resources/config-registry/config-registry.d.mts.map +1 -1
  23. package/resources/config-registry/config-registry.d.ts +14 -7
  24. package/resources/config-registry/config-registry.d.ts.map +1 -1
  25. package/resources/config-registry/config-registry.js.map +1 -1
  26. package/resources/config-registry/config-registry.mjs.map +1 -1
  27. package/resources/index.d.mts +1 -0
  28. package/resources/index.d.mts.map +1 -1
  29. package/resources/index.d.ts +1 -0
  30. package/resources/index.d.ts.map +1 -1
  31. package/resources/index.js +3 -1
  32. package/resources/index.js.map +1 -1
  33. package/resources/index.mjs +1 -0
  34. package/resources/index.mjs.map +1 -1
  35. package/resources/invocations.d.mts +44 -15
  36. package/resources/invocations.d.mts.map +1 -1
  37. package/resources/invocations.d.ts +44 -15
  38. package/resources/invocations.d.ts.map +1 -1
  39. package/resources/organization/entitlements.d.mts +20 -0
  40. package/resources/organization/entitlements.d.mts.map +1 -1
  41. package/resources/organization/entitlements.d.ts +20 -0
  42. package/resources/organization/entitlements.d.ts.map +1 -1
  43. package/resources/organization/limits.d.mts +10 -1
  44. package/resources/organization/limits.d.mts.map +1 -1
  45. package/resources/organization/limits.d.ts +10 -1
  46. package/resources/organization/limits.d.ts.map +1 -1
  47. package/resources/organization/limits.js +1 -1
  48. package/resources/organization/limits.mjs +1 -1
  49. package/resources/proxies.d.mts +36 -18
  50. package/resources/proxies.d.mts.map +1 -1
  51. package/resources/proxies.d.ts +36 -18
  52. package/resources/proxies.d.ts.map +1 -1
  53. package/resources/vault-provider-configs.d.mts +179 -0
  54. package/resources/vault-provider-configs.d.mts.map +1 -0
  55. package/resources/vault-provider-configs.d.ts +179 -0
  56. package/resources/vault-provider-configs.d.ts.map +1 -0
  57. package/resources/vault-provider-configs.js +99 -0
  58. package/resources/vault-provider-configs.js.map +1 -0
  59. package/resources/vault-provider-configs.mjs +95 -0
  60. package/resources/vault-provider-configs.mjs.map +1 -0
  61. package/resources/vaults/items.d.mts +285 -22
  62. package/resources/vaults/items.d.mts.map +1 -1
  63. package/resources/vaults/items.d.ts +285 -22
  64. package/resources/vaults/items.d.ts.map +1 -1
  65. package/resources/vaults/items.js +85 -5
  66. package/resources/vaults/items.js.map +1 -1
  67. package/resources/vaults/items.mjs +85 -5
  68. package/resources/vaults/items.mjs.map +1 -1
  69. package/resources/vaults/vaults.d.mts +31 -2
  70. package/resources/vaults/vaults.d.mts.map +1 -1
  71. package/resources/vaults/vaults.d.ts +31 -2
  72. package/resources/vaults/vaults.d.ts.map +1 -1
  73. package/resources/vaults/vaults.js +31 -2
  74. package/resources/vaults/vaults.js.map +1 -1
  75. package/resources/vaults/vaults.mjs +31 -2
  76. package/resources/vaults/vaults.mjs.map +1 -1
  77. package/src/client.ts +19 -0
  78. package/src/lib/browser-routing.ts +27 -6
  79. package/src/resources/browsers/telemetry.ts +5 -2
  80. package/src/resources/config-registry/config-registry.ts +15 -7
  81. package/src/resources/index.ts +8 -0
  82. package/src/resources/invocations.ts +44 -15
  83. package/src/resources/organization/entitlements.ts +23 -0
  84. package/src/resources/organization/limits.ts +12 -1
  85. package/src/resources/proxies.ts +36 -18
  86. package/src/resources/vault-provider-configs.ts +250 -0
  87. package/src/resources/vaults/items.ts +322 -22
  88. package/src/resources/vaults/vaults.ts +31 -2
  89. package/src/version.ts +1 -1
  90. package/version.d.mts +1 -1
  91. package/version.d.ts +1 -1
  92. package/version.js +1 -1
  93. package/version.mjs +1 -1
@@ -14,6 +14,13 @@ export class Items extends APIResource {
14
14
  * description before using it. Expanded data is fetched from the provider and is
15
15
  * not persisted in the vault item. Requesting an unavailable expansion returns 409
16
16
  * instead of a partial item.
17
+ *
18
+ * @example
19
+ * ```ts
20
+ * const vaultItem = await client.vaults.items.retrieve('x', {
21
+ * id_or_name: 'id_or_name',
22
+ * });
23
+ * ```
17
24
  */
18
25
  retrieve(key: string, params: ItemRetrieveParams, options?: RequestOptions): APIPromise<VaultItem> {
19
26
  const { id_or_name, ...query } = params;
@@ -21,7 +28,31 @@ export class Items extends APIResource {
21
28
  }
22
29
 
23
30
  /**
24
- * Update a card specification before or between authorizations
31
+ * Requested cards accept a replacement specification. Pending issuance requests
32
+ * may update provider-supported fields on their existing request, subject to
33
+ * atomic provider approval checks; omitted optional fields remain unchanged and
34
+ * explicit empty lists clear them. Wallet/provider binding and unsupported fields
35
+ * cannot change after authorization starts. An uncertain update enters
36
+ * recovery_required and must not be retried. Checkout cards may be edited between
37
+ * authorizations.
38
+ *
39
+ * @example
40
+ * ```ts
41
+ * const vaultItem = await client.vaults.items.update('x', {
42
+ * id_or_name: 'id_or_name',
43
+ * spec: {
44
+ * provider: 'link',
45
+ * wallet: 'link-wallet',
46
+ * payment_method_id: 'pm_example',
47
+ * amount: 3000,
48
+ * currency: 'usd',
49
+ * merchant_name: 'Example Store',
50
+ * merchant_url: 'https://store.example.com',
51
+ * context:
52
+ * 'The order total changed to USD 30.00 including shipping and taxes for one notebook. Update this unapproved request rather than creating a second payment.',
53
+ * },
54
+ * });
55
+ * ```
25
56
  */
26
57
  update(key: string, params: ItemUpdateParams, options?: RequestOptions): APIPromise<VaultItem> {
27
58
  const { id_or_name, ...body } = params;
@@ -30,13 +61,29 @@ export class Items extends APIResource {
30
61
 
31
62
  /**
32
63
  * List vault items without secret values
64
+ *
65
+ * @example
66
+ * ```ts
67
+ * const vaultItems = await client.vaults.items.list(
68
+ * 'id_or_name',
69
+ * );
70
+ * ```
33
71
  */
34
72
  list(idOrName: string, options?: RequestOptions): APIPromise<ItemListResponse> {
35
73
  return this._client.get(path`/vaults/${idOrName}/items`, options);
36
74
  }
37
75
 
38
76
  /**
39
- * Delete a vault item and invalidate its secret value
77
+ * Unresolved payment operations block deletion, including operations on child
78
+ * cards of a wallet. Reconcile the original attempt with the provider or support
79
+ * first; deleting or recreating an item is not proof that a payment did not occur.
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * await client.vaults.items.delete('x', {
84
+ * id_or_name: 'id_or_name',
85
+ * });
86
+ * ```
40
87
  */
41
88
  delete(key: string, params: ItemDeleteParams, options?: RequestOptions): APIPromise<void> {
42
89
  const { id_or_name } = params;
@@ -48,6 +95,14 @@ export class Items extends APIResource {
48
95
 
49
96
  /**
50
97
  * List immutable audit events for a vault item
98
+ *
99
+ * @example
100
+ * ```ts
101
+ * const vaultItemEvents = await client.vaults.items.events(
102
+ * 'key',
103
+ * { id_or_name: 'id_or_name' },
104
+ * );
105
+ * ```
51
106
  */
52
107
  events(key: string, params: ItemEventsParams, options?: RequestOptions): APIPromise<ItemEventsResponse> {
53
108
  const { id_or_name, ...query } = params;
@@ -57,9 +112,20 @@ export class Items extends APIResource {
57
112
  /**
58
113
  * Retrieve the item first and invoke only an operation listed in
59
114
  * `available_operations`, following its natural-language description. Operations
60
- * may call an external provider and can return the item's updated state. If the
61
- * provider rate limits spend-request creation, returns HTTP 429 with code
115
+ * may call an external provider and return updated state. Link cards advertise
116
+ * authorize. AgentCard cards are created with PUT and request approval when their
117
+ * aliases are used at checkout; they do not expose this operation. If
118
+ * spend-request creation is rate limited, returns HTTP 429 with code
62
119
  * `spend_request_rate_limited`; stop and back off before retrying.
120
+ *
121
+ * @example
122
+ * ```ts
123
+ * const vaultItem =
124
+ * await client.vaults.items.performOperation('key', {
125
+ * id_or_name: 'id_or_name',
126
+ * type: 'authorize',
127
+ * });
128
+ * ```
63
129
  */
64
130
  performOperation(
65
131
  key: string,
@@ -71,7 +137,21 @@ export class Items extends APIResource {
71
137
  }
72
138
 
73
139
  /**
74
- * Create or retrieve an identical vault item by immutable key
140
+ * Create an item under a key unique within its vault, or retrieve the existing
141
+ * item when its specification matches. An identical card PUT returns the existing
142
+ * card in any lifecycle state without polling the provider, reauthorizing,
143
+ * replacing aliases, or resetting recovery. Conflicting specifications return 409.
144
+ * Provider-specific authorization requirements and retry behavior are described in
145
+ * the item's request schema.
146
+ *
147
+ * @example
148
+ * ```ts
149
+ * const vaultItem = await client.vaults.items.upsert('x', {
150
+ * id_or_name: 'id_or_name',
151
+ * spec: { provider: 'link' },
152
+ * type: 'card',
153
+ * });
154
+ * ```
75
155
  */
76
156
  upsert(key: string, params: ItemUpsertParams, options?: RequestOptions): APIPromise<VaultItem> {
77
157
  const { id_or_name, ...body } = params;
@@ -279,7 +359,21 @@ export namespace CardVaultItemState {
279
359
  export interface LinkCardState {
280
360
  provider: 'link';
281
361
 
282
- status: 'requested' | 'pending_authorization' | 'ready' | 'consumed' | 'expired' | 'declined';
362
+ /**
363
+ * recovery_required means an original provider operation has an unresolved
364
+ * outcome. Do not retry, delete, or replace it. Known references may be observed
365
+ * safely, but unknown creation without an ID and uncertain card-material retrieval
366
+ * require manual reconciliation with the provider or support. There is no reset or
367
+ * caller-asserted reconciliation operation.
368
+ */
369
+ status:
370
+ | 'requested'
371
+ | 'pending_authorization'
372
+ | 'ready'
373
+ | 'consumed'
374
+ | 'expired'
375
+ | 'declined'
376
+ | 'recovery_required';
283
377
 
284
378
  aliases?: ItemsAPI.VaultCardAliases;
285
379
 
@@ -303,7 +397,13 @@ export namespace CardVaultItemState {
303
397
  export interface AgentCardCardState {
304
398
  provider: 'agentcard';
305
399
 
306
- status: 'requested' | 'ready' | 'pending_approval' | 'degraded';
400
+ /**
401
+ * recovery_required means the original checkout outcome is unresolved. Do not
402
+ * retry, delete, or replace it. Known authorization IDs may be reconciled through
403
+ * provider observations; otherwise contact the provider or support for manual
404
+ * reconciliation. It does not mean declined or expired.
405
+ */
406
+ status: 'requested' | 'ready' | 'pending_approval' | 'degraded' | 'recovery_required';
307
407
 
308
408
  aliases?: ItemsAPI.VaultCardAliases;
309
409
 
@@ -357,9 +457,12 @@ export namespace VaultItem {
357
457
  key: string;
358
458
 
359
459
  /**
360
- * AgentCard wallet. Mode (sandbox vs live) is fixed by the deployment's AgentCard
361
- * credential; there is no per-item test flag. user_id may only reference a user
362
- * already enrolled by a wallet in this organization.
460
+ * AgentCard wallet. Omit provider_config to use Kernel-managed credentials, or
461
+ * select a customer-owned configuration. Mode (sandbox vs live) is determined by
462
+ * the selected credential; there is no per-item test flag. Without user_id,
463
+ * creation returns a hosted enrollment action and Kernel polls until the user
464
+ * connects. user_id may only reference a user already enrolled by a wallet in this
465
+ * organization under the same configuration.
363
466
  */
364
467
  spec: ItemsAPI.WalletVaultItemSpec;
365
468
 
@@ -572,9 +675,12 @@ export namespace VaultPaymentMethod {
572
675
  }
573
676
 
574
677
  /**
575
- * AgentCard wallet. Mode (sandbox vs live) is fixed by the deployment's AgentCard
576
- * credential; there is no per-item test flag. user_id may only reference a user
577
- * already enrolled by a wallet in this organization.
678
+ * AgentCard wallet. Omit provider_config to use Kernel-managed credentials, or
679
+ * select a customer-owned configuration. Mode (sandbox vs live) is determined by
680
+ * the selected credential; there is no per-item test flag. Without user_id,
681
+ * creation returns a hosted enrollment action and Kernel polls until the user
682
+ * connects. user_id may only reference a user already enrolled by a wallet in this
683
+ * organization under the same configuration.
578
684
  */
579
685
  export type WalletVaultItemSpec =
580
686
  | WalletVaultItemSpec.LinkWalletVaultItemSpec
@@ -589,28 +695,73 @@ export namespace WalletVaultItemSpec {
589
695
 
590
696
  export namespace LinkWalletVaultItemSpec {
591
697
  export interface Authorization {
592
- client: Authorization.Client;
698
+ client: Authorization.KernelManagedOAuthClient | Authorization.CustomerManagedOAuthClient;
593
699
 
594
700
  method: 'oauth';
595
701
  }
596
702
 
597
703
  export namespace Authorization {
598
- export interface Client {
704
+ export interface KernelManagedOAuthClient {
599
705
  type: 'kernel_managed';
600
706
  }
707
+
708
+ export interface CustomerManagedOAuthClient {
709
+ /**
710
+ * Select a provider config by ID or name. Responses return the ID. Renaming a
711
+ * config does not change existing wallet bindings; a wallet cannot switch to a
712
+ * different config after creation.
713
+ */
714
+ provider_config: CustomerManagedOAuthClient.ProviderConfig;
715
+
716
+ type: 'customer_managed';
717
+ }
718
+
719
+ export namespace CustomerManagedOAuthClient {
720
+ /**
721
+ * Select a provider config by ID or name. Responses return the ID. Renaming a
722
+ * config does not change existing wallet bindings; a wallet cannot switch to a
723
+ * different config after creation.
724
+ */
725
+ export interface ProviderConfig {
726
+ id?: string;
727
+
728
+ name?: string;
729
+ }
730
+ }
601
731
  }
602
732
  }
603
733
 
604
734
  /**
605
- * AgentCard wallet. Mode (sandbox vs live) is fixed by the deployment's AgentCard
606
- * credential; there is no per-item test flag. user_id may only reference a user
607
- * already enrolled by a wallet in this organization.
735
+ * AgentCard wallet. Omit provider_config to use Kernel-managed credentials, or
736
+ * select a customer-owned configuration. Mode (sandbox vs live) is determined by
737
+ * the selected credential; there is no per-item test flag. Without user_id,
738
+ * creation returns a hosted enrollment action and Kernel polls until the user
739
+ * connects. user_id may only reference a user already enrolled by a wallet in this
740
+ * organization under the same configuration.
608
741
  */
609
742
  export interface AgentCardWalletVaultItemSpec {
610
743
  provider: 'agentcard';
611
744
 
745
+ /**
746
+ * Select an AgentCard configuration. The wallet's configuration cannot be changed
747
+ * after creation.
748
+ */
749
+ provider_config?: AgentCardWalletVaultItemSpec.ProviderConfig;
750
+
612
751
  user_id?: string;
613
752
  }
753
+
754
+ export namespace AgentCardWalletVaultItemSpec {
755
+ /**
756
+ * Select an AgentCard configuration. The wallet's configuration cannot be changed
757
+ * after creation.
758
+ */
759
+ export interface ProviderConfig {
760
+ id?: string;
761
+
762
+ name?: string;
763
+ }
764
+ }
614
765
  }
615
766
 
616
767
  export type WalletVaultItemState =
@@ -720,11 +871,16 @@ export declare namespace ItemUpsertParams {
720
871
  id_or_name: string;
721
872
 
722
873
  /**
723
- * Body param: AgentCard wallet. Mode (sandbox vs live) is fixed by the
724
- * deployment's AgentCard credential; there is no per-item test flag. user_id may
725
- * only reference a user already enrolled by a wallet in this organization.
874
+ * Body param: AgentCard wallet. Omit provider_config to use Kernel-managed
875
+ * credentials, or select a customer-owned configuration. Mode (sandbox vs live) is
876
+ * determined by the selected credential; there is no per-item test flag. Without
877
+ * user_id, creation returns a hosted enrollment action and Kernel polls until the
878
+ * user connects. user_id may only reference a user already enrolled by a wallet in
879
+ * this organization under the same configuration.
726
880
  */
727
- spec: WalletVaultItemSpec;
881
+ spec:
882
+ | WalletVaultItemRequest.LinkWalletVaultItemRequestSpec
883
+ | WalletVaultItemRequest.AgentCardWalletVaultItemSpec;
728
884
 
729
885
  /**
730
886
  * Body param
@@ -732,6 +888,150 @@ export declare namespace ItemUpsertParams {
732
888
  type: 'wallet';
733
889
  }
734
890
 
891
+ export namespace WalletVaultItemRequest {
892
+ export interface LinkWalletVaultItemRequestSpec {
893
+ /**
894
+ * Kernel starts and completes the user's Link authorization flow.
895
+ */
896
+ authorization:
897
+ | LinkWalletVaultItemRequestSpec.KernelManagedLinkAuthorizationInput
898
+ | LinkWalletVaultItemRequestSpec.ImportedLinkAuthorizationInput;
899
+
900
+ provider: 'link';
901
+ }
902
+
903
+ export namespace LinkWalletVaultItemRequestSpec {
904
+ /**
905
+ * Kernel starts and completes the user's Link authorization flow.
906
+ */
907
+ export interface KernelManagedLinkAuthorizationInput {
908
+ client: KernelManagedLinkAuthorizationInput.Client;
909
+
910
+ method: 'oauth';
911
+ }
912
+
913
+ export namespace KernelManagedLinkAuthorizationInput {
914
+ export interface Client {
915
+ type: 'kernel_managed';
916
+ }
917
+ }
918
+
919
+ /**
920
+ * The customer's backend completes Link OAuth and supplies the resulting tokens.
921
+ * For a new wallet, Kernel verifies the access token can access Link payment
922
+ * methods without consuming or rotating the refresh token. Valid access creates a
923
+ * wallet with state.status=connected. An expired, invalid, revoked, or
924
+ * insufficiently scoped access token returns 400 and no wallet is created. Refresh
925
+ * expired tokens in your backend before importing them. A failed import does not
926
+ * modify existing wallets. After successful import, Kernel owns subsequent
927
+ * refresh-token rotation; the customer must stop refreshing this grant. Import
928
+ * does not verify the refresh token: if it or the configured client credentials
929
+ * are rejected during a later refresh, the imported wallet becomes degraded. An
930
+ * unknown refresh outcome also leaves it degraded; Kernel does not retry a refresh
931
+ * token that may already have been consumed. There is no in-place reauthorization
932
+ * operation for an imported wallet. If this imported wallet's credentials become
933
+ * unusable, obtain a fresh Link OAuth grant in your backend and create a wallet
934
+ * under a NEW wallet key. Use the new wallet for NEW cards and payments, not to
935
+ * retry an old payment whose outcome is uncertain. This does not replace the old
936
+ * grant, rebind existing cards, or resolve their payment outcomes. Retain the old
937
+ * wallet and its cards while reconciling any uncertain payments with the provider
938
+ * or support. Do not repeat an uncertain payment on the new wallet, and do not
939
+ * treat deletion as evidence that it did not execute. Deletion of the old wallet
940
+ * can remain blocked by unresolved child cards. Repeating a create for the same
941
+ * item key and non-secret spec returns the existing wallet without replacing
942
+ * tokens, even if they have rotated or the wallet needs reconnection. ID and name
943
+ * references resolving to the same config are equivalent. A different config or
944
+ * non-secret spec returns 409. This create operation does not replace an existing
945
+ * grant.
946
+ */
947
+ export interface ImportedLinkAuthorizationInput {
948
+ client: ImportedLinkAuthorizationInput.Client;
949
+
950
+ method: 'oauth';
951
+
952
+ /**
953
+ * Send the token pair from your backend. Both tokens must be from the same Link
954
+ * grant under the referenced client. Supply a currently valid access token. Kernel
955
+ * refreshes when needed after import and uses the expiry returned by Link for
956
+ * subsequent tokens. Tokens are never returned in wallet responses, events, or
957
+ * logs.
958
+ */
959
+ tokens: ImportedLinkAuthorizationInput.Tokens;
960
+ }
961
+
962
+ export namespace ImportedLinkAuthorizationInput {
963
+ export interface Client {
964
+ /**
965
+ * Select a provider config by ID or name. Responses return the ID. Renaming a
966
+ * config does not change existing wallet bindings; a wallet cannot switch to a
967
+ * different config after creation.
968
+ */
969
+ provider_config: Client.ProviderConfig;
970
+
971
+ type: 'customer_managed';
972
+ }
973
+
974
+ export namespace Client {
975
+ /**
976
+ * Select a provider config by ID or name. Responses return the ID. Renaming a
977
+ * config does not change existing wallet bindings; a wallet cannot switch to a
978
+ * different config after creation.
979
+ */
980
+ export interface ProviderConfig {
981
+ id?: string;
982
+
983
+ name?: string;
984
+ }
985
+ }
986
+
987
+ /**
988
+ * Send the token pair from your backend. Both tokens must be from the same Link
989
+ * grant under the referenced client. Supply a currently valid access token. Kernel
990
+ * refreshes when needed after import and uses the expiry returned by Link for
991
+ * subsequent tokens. Tokens are never returned in wallet responses, events, or
992
+ * logs.
993
+ */
994
+ export interface Tokens {
995
+ access_token: string;
996
+
997
+ refresh_token: string;
998
+ }
999
+ }
1000
+ }
1001
+
1002
+ /**
1003
+ * AgentCard wallet. Omit provider_config to use Kernel-managed credentials, or
1004
+ * select a customer-owned configuration. Mode (sandbox vs live) is determined by
1005
+ * the selected credential; there is no per-item test flag. Without user_id,
1006
+ * creation returns a hosted enrollment action and Kernel polls until the user
1007
+ * connects. user_id may only reference a user already enrolled by a wallet in this
1008
+ * organization under the same configuration.
1009
+ */
1010
+ export interface AgentCardWalletVaultItemSpec {
1011
+ provider: 'agentcard';
1012
+
1013
+ /**
1014
+ * Select an AgentCard configuration. The wallet's configuration cannot be changed
1015
+ * after creation.
1016
+ */
1017
+ provider_config?: AgentCardWalletVaultItemSpec.ProviderConfig;
1018
+
1019
+ user_id?: string;
1020
+ }
1021
+
1022
+ export namespace AgentCardWalletVaultItemSpec {
1023
+ /**
1024
+ * Select an AgentCard configuration. The wallet's configuration cannot be changed
1025
+ * after creation.
1026
+ */
1027
+ export interface ProviderConfig {
1028
+ id?: string;
1029
+
1030
+ name?: string;
1031
+ }
1032
+ }
1033
+ }
1034
+
735
1035
  export interface CardVaultItemRequest {
736
1036
  /**
737
1037
  * Path param
@@ -34,6 +34,11 @@ export class Vaults extends APIResource {
34
34
 
35
35
  /**
36
36
  * Get a vault
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * const vault = await client.vaults.retrieve('id_or_name');
41
+ * ```
37
42
  */
38
43
  retrieve(idOrName: string, options?: RequestOptions): APIPromise<Vault> {
39
44
  return this._client.get(path`/vaults/${idOrName}`, options);
@@ -41,6 +46,14 @@ export class Vaults extends APIResource {
41
46
 
42
47
  /**
43
48
  * List vaults in the current project
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * // Automatically fetches more pages as needed.
53
+ * for await (const vault of client.vaults.list()) {
54
+ * // ...
55
+ * }
56
+ * ```
44
57
  */
45
58
  list(
46
59
  query: VaultListParams | null | undefined = {},
@@ -50,7 +63,14 @@ export class Vaults extends APIResource {
50
63
  }
51
64
 
52
65
  /**
53
- * Delete a vault and invalidate its items
66
+ * Unresolved payment operations block deletion. Reconcile the original attempt
67
+ * with the provider or support first; deleting or recreating an item is not proof
68
+ * that a payment did not occur.
69
+ *
70
+ * @example
71
+ * ```ts
72
+ * await client.vaults.delete('id_or_name');
73
+ * ```
54
74
  */
55
75
  delete(idOrName: string, options?: RequestOptions): APIPromise<void> {
56
76
  return this._client.delete(path`/vaults/${idOrName}`, {
@@ -60,7 +80,16 @@ export class Vaults extends APIResource {
60
80
  }
61
81
 
62
82
  /**
63
- * Create or retrieve a vault by immutable name
83
+ * Free organizations can store up to 3 non-deleted vaults across all projects.
84
+ * Paid plans and active trials have no vault cap. Retrieving an existing vault by
85
+ * name succeeds even at the limit.
86
+ *
87
+ * @example
88
+ * ```ts
89
+ * const vault = await client.vaults.upsert({
90
+ * name: 'checkout',
91
+ * });
92
+ * ```
64
93
  */
65
94
  upsert(body: VaultUpsertParams, options?: RequestOptions): APIPromise<Vault> {
66
95
  return this._client.post('/vaults', { body, ...options });
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.100.0'; // x-release-please-version
1
+ export const VERSION = '0.101.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.100.0";
1
+ export declare const VERSION = "0.101.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.100.0";
1
+ export declare const VERSION = "0.101.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.100.0'; // x-release-please-version
4
+ exports.VERSION = '0.101.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.100.0'; // x-release-please-version
1
+ export const VERSION = '0.101.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map