@onkernel/sdk 0.140.0 → 0.141.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/CHANGELOG.md +15 -0
- package/package.json +1 -1
- package/resources/browsers/browsers.d.mts +6 -5
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +6 -5
- package/resources/browsers/browsers.d.ts.map +1 -1
- package/resources/browsers/browsers.js.map +1 -1
- package/resources/browsers/browsers.mjs.map +1 -1
- package/resources/search/providers.d.mts +1 -1
- package/resources/search/providers.d.mts.map +1 -1
- package/resources/search/providers.d.ts +1 -1
- package/resources/search/providers.d.ts.map +1 -1
- package/resources/search/search.d.mts +1 -124
- package/resources/search/search.d.mts.map +1 -1
- package/resources/search/search.d.ts +1 -124
- package/resources/search/search.d.ts.map +1 -1
- package/resources/search/search.js.map +1 -1
- package/resources/search/search.mjs.map +1 -1
- package/resources/vault-provider-configs.d.mts +59 -2
- package/resources/vault-provider-configs.d.mts.map +1 -1
- package/resources/vault-provider-configs.d.ts +59 -2
- package/resources/vault-provider-configs.d.ts.map +1 -1
- package/resources/vaults/index.d.mts +1 -1
- package/resources/vaults/index.d.mts.map +1 -1
- package/resources/vaults/index.d.ts +1 -1
- package/resources/vaults/index.d.ts.map +1 -1
- package/resources/vaults/index.js.map +1 -1
- package/resources/vaults/index.mjs.map +1 -1
- package/resources/vaults/items.d.mts +163 -30
- package/resources/vaults/items.d.mts.map +1 -1
- package/resources/vaults/items.d.ts +163 -30
- package/resources/vaults/items.d.ts.map +1 -1
- package/resources/vaults/vaults.d.mts +2 -2
- package/resources/vaults/vaults.d.mts.map +1 -1
- package/resources/vaults/vaults.d.ts +2 -2
- package/resources/vaults/vaults.d.ts.map +1 -1
- package/resources/vaults/vaults.js.map +1 -1
- package/resources/vaults/vaults.mjs.map +1 -1
- package/src/resources/browsers/browsers.ts +6 -5
- package/src/resources/search/providers.ts +1 -11
- package/src/resources/search/search.ts +1 -156
- package/src/resources/vault-provider-configs.ts +76 -2
- package/src/resources/vaults/index.ts +5 -0
- package/src/resources/vaults/items.ts +200 -29
- package/src/resources/vaults/vaults.ts +10 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -424,7 +424,8 @@ export type CardVaultItemSpec =
|
|
|
424
424
|
| CardVaultItemSpec.LinkCardVaultItemSpec
|
|
425
425
|
| CardVaultItemSpec.AgentCardCardVaultItemSpec
|
|
426
426
|
| KernelCardVaultItemSpec
|
|
427
|
-
| ShopPayCardVaultItemSpec
|
|
427
|
+
| ShopPayCardVaultItemSpec
|
|
428
|
+
| VgsCardVaultItemSpec;
|
|
428
429
|
|
|
429
430
|
export namespace CardVaultItemSpec {
|
|
430
431
|
/**
|
|
@@ -608,7 +609,8 @@ export type CardVaultItemState =
|
|
|
608
609
|
| CardVaultItemState.LinkCardState
|
|
609
610
|
| CardVaultItemState.AgentCardCardState
|
|
610
611
|
| KernelCardState
|
|
611
|
-
| ShopPayCardState
|
|
612
|
+
| ShopPayCardState
|
|
613
|
+
| VgsCardState;
|
|
612
614
|
|
|
613
615
|
export namespace CardVaultItemState {
|
|
614
616
|
/**
|
|
@@ -3915,6 +3917,166 @@ export interface VaultWebmcpBinding {
|
|
|
3915
3917
|
format?: string;
|
|
3916
3918
|
}
|
|
3917
3919
|
|
|
3920
|
+
/**
|
|
3921
|
+
* The card's aliases in the customer's VGS vault, its expiry and last four digits.
|
|
3922
|
+
* Write-only: stored encrypted and never returned in the item, its events or logs.
|
|
3923
|
+
* A repeated PUT with the same key must send the same card.
|
|
3924
|
+
*/
|
|
3925
|
+
export interface VgsCardInput {
|
|
3926
|
+
/**
|
|
3927
|
+
* A volatile alias of a freshly collected security code in the customer's vault.
|
|
3928
|
+
* It must still exist when authorize runs.
|
|
3929
|
+
*/
|
|
3930
|
+
cvc_alias: string;
|
|
3931
|
+
|
|
3932
|
+
exp_month: number;
|
|
3933
|
+
|
|
3934
|
+
exp_year: number;
|
|
3935
|
+
|
|
3936
|
+
/**
|
|
3937
|
+
* The card number's last four digits, checked against the revealed alias.
|
|
3938
|
+
*/
|
|
3939
|
+
last4: string;
|
|
3940
|
+
|
|
3941
|
+
/**
|
|
3942
|
+
* A persistent alias of the card number in the customer's vault.
|
|
3943
|
+
*/
|
|
3944
|
+
pan_alias: string;
|
|
3945
|
+
}
|
|
3946
|
+
|
|
3947
|
+
/**
|
|
3948
|
+
* A ready VGS card supports fill, then submit checkout, until expires_at. Kernel
|
|
3949
|
+
* does not observe whether the merchant charged the card. masks.last4 is the
|
|
3950
|
+
* card's last four digits.
|
|
3951
|
+
*/
|
|
3952
|
+
export interface VgsCardState {
|
|
3953
|
+
provider: 'vgs';
|
|
3954
|
+
|
|
3955
|
+
/**
|
|
3956
|
+
* requested until authorize reveals the aliases; if the reveal fails before
|
|
3957
|
+
* anything is stored, authorize returns 503 provider_unavailable and the card
|
|
3958
|
+
* stays requested. declined means authorize was refused: invalid_card for aliases
|
|
3959
|
+
* that do not match the card or a card that has expired (fix the input and create
|
|
3960
|
+
* a new card), alias_not_found when the customer's vault has no such alias,
|
|
3961
|
+
* usually an expired CVC alias (collect the CVC again and create a new card), or
|
|
3962
|
+
* provider_credentials_rejected when VGS refused the configuration's service
|
|
3963
|
+
* account (update the provider configuration and create a new card). ready lasts
|
|
3964
|
+
* until the CVC alias expires, then expired.
|
|
3965
|
+
*/
|
|
3966
|
+
status: 'requested' | 'pending_authorization' | 'ready' | 'expired' | 'declined' | 'recovery_required';
|
|
3967
|
+
|
|
3968
|
+
/**
|
|
3969
|
+
* Informational registrable domain. Fill is locked to merchant_url's exact origin.
|
|
3970
|
+
*/
|
|
3971
|
+
domains?: Array<string>;
|
|
3972
|
+
|
|
3973
|
+
masks?: VgsCardState.Masks;
|
|
3974
|
+
|
|
3975
|
+
status_reason?: string;
|
|
3976
|
+
}
|
|
3977
|
+
|
|
3978
|
+
export namespace VgsCardState {
|
|
3979
|
+
export interface Masks {
|
|
3980
|
+
brand?: string;
|
|
3981
|
+
|
|
3982
|
+
last4?: string;
|
|
3983
|
+
|
|
3984
|
+
/**
|
|
3985
|
+
* Last four digits of the network token presented to the merchant.
|
|
3986
|
+
*/
|
|
3987
|
+
token_last4?: string;
|
|
3988
|
+
|
|
3989
|
+
[k: string]: string | undefined;
|
|
3990
|
+
}
|
|
3991
|
+
}
|
|
3992
|
+
|
|
3993
|
+
/**
|
|
3994
|
+
* One live purchase with a card in the customer's VGS vault. authorize reveals
|
|
3995
|
+
* card.pan_alias and card.cvc_alias through Kernel's VGS outbound proxy, which
|
|
3996
|
+
* replaces both with aliases in Kernel's vault before they reach Kernel; Kernel
|
|
3997
|
+
* never receives the card number or security code. The card is then ready with no
|
|
3998
|
+
* further approval, until expires_at, by default five minutes after authorize.
|
|
3999
|
+
* fill types Kernel's aliases on merchant_url's origin, and Kernel's VGS proxy
|
|
4000
|
+
* replaces them with the card's details when the browser submits checkout. An
|
|
4001
|
+
* expired card requires a new purchase with a freshly collected CVC alias. The
|
|
4002
|
+
* amount and merchant are recorded but do not restrict payment requests sent by
|
|
4003
|
+
* the browser. Card updates are not supported; delete and create a new item
|
|
4004
|
+
* instead.
|
|
4005
|
+
*/
|
|
4006
|
+
export interface VgsCardVaultItemSpec {
|
|
4007
|
+
/**
|
|
4008
|
+
* Integer amount in minor currency units (at most 1000000).
|
|
4009
|
+
*/
|
|
4010
|
+
amount: number;
|
|
4011
|
+
|
|
4012
|
+
/**
|
|
4013
|
+
* ISO 4217 code. Supported: aud, brl, cad, chf, czk, dkk, eur, gbp, hkd, inr, jpy,
|
|
4014
|
+
* krw, mxn, nok, nzd, pln, sek, sgd, usd, zar.
|
|
4015
|
+
*/
|
|
4016
|
+
currency: string;
|
|
4017
|
+
|
|
4018
|
+
merchant_name: string;
|
|
4019
|
+
|
|
4020
|
+
/**
|
|
4021
|
+
* Merchant checkout URL. Fill is allowed only on this URL's origin.
|
|
4022
|
+
*/
|
|
4023
|
+
merchant_url: string;
|
|
4024
|
+
|
|
4025
|
+
provider: 'vgs';
|
|
4026
|
+
|
|
4027
|
+
/**
|
|
4028
|
+
* Key of the VGS wallet item whose configuration reads the aliases.
|
|
4029
|
+
*/
|
|
4030
|
+
wallet: string;
|
|
4031
|
+
|
|
4032
|
+
/**
|
|
4033
|
+
* Required when creating the card. Never returned.
|
|
4034
|
+
*/
|
|
4035
|
+
card?: VgsCardInput;
|
|
4036
|
+
}
|
|
4037
|
+
|
|
4038
|
+
export interface VgsWalletState {
|
|
4039
|
+
provider: 'vgs';
|
|
4040
|
+
|
|
4041
|
+
/**
|
|
4042
|
+
* A VGS wallet is connected on creation. pending_authorization or degraded means
|
|
4043
|
+
* its creation did not finish; reading the wallet retries it, and a wallet that
|
|
4044
|
+
* stays degraded can be deleted and created again. Whether its configuration's
|
|
4045
|
+
* credentials still work is checked when a card is authorized.
|
|
4046
|
+
*/
|
|
4047
|
+
status: 'pending_authorization' | 'connected' | 'degraded';
|
|
4048
|
+
|
|
4049
|
+
status_reason?: string;
|
|
4050
|
+
}
|
|
4051
|
+
|
|
4052
|
+
/**
|
|
4053
|
+
* Cards kept in the customer's own VGS vault. The wallet binds a VGS provider
|
|
4054
|
+
* configuration and is connected on creation; it holds no cards and has no payment
|
|
4055
|
+
* methods. Each purchase is a card item that carries the card's aliases from the
|
|
4056
|
+
* customer's vault. The configuration binding cannot be changed after creation.
|
|
4057
|
+
*/
|
|
4058
|
+
export interface VgsWalletVaultItemSpec {
|
|
4059
|
+
provider: 'vgs';
|
|
4060
|
+
|
|
4061
|
+
/**
|
|
4062
|
+
* Select a VGS configuration. Required, because there are no Kernel-managed VGS
|
|
4063
|
+
* credentials for this provider.
|
|
4064
|
+
*/
|
|
4065
|
+
provider_config: VgsWalletVaultItemSpec.ProviderConfig;
|
|
4066
|
+
}
|
|
4067
|
+
|
|
4068
|
+
export namespace VgsWalletVaultItemSpec {
|
|
4069
|
+
/**
|
|
4070
|
+
* Select a VGS configuration. Required, because there are no Kernel-managed VGS
|
|
4071
|
+
* credentials for this provider.
|
|
4072
|
+
*/
|
|
4073
|
+
export interface ProviderConfig {
|
|
4074
|
+
id?: string;
|
|
4075
|
+
|
|
4076
|
+
name?: string;
|
|
4077
|
+
}
|
|
4078
|
+
}
|
|
4079
|
+
|
|
3918
4080
|
/**
|
|
3919
4081
|
* AgentCard wallet. Omit provider_config to use Kernel-managed credentials, or
|
|
3920
4082
|
* select a customer-owned configuration. Mode (sandbox vs live) is determined by
|
|
@@ -3935,7 +4097,8 @@ export type WalletVaultItemSpec =
|
|
|
3935
4097
|
| WalletVaultItemSpec.LinkWalletVaultItemSpec
|
|
3936
4098
|
| WalletVaultItemSpec.AgentCardWalletVaultItemSpec
|
|
3937
4099
|
| KernelWalletVaultItemSpec
|
|
3938
|
-
| ShopPayWalletVaultItemSpec
|
|
4100
|
+
| ShopPayWalletVaultItemSpec
|
|
4101
|
+
| VgsWalletVaultItemSpec;
|
|
3939
4102
|
|
|
3940
4103
|
export namespace WalletVaultItemSpec {
|
|
3941
4104
|
export interface LinkWalletVaultItemSpec {
|
|
@@ -4035,7 +4198,8 @@ export type WalletVaultItemState =
|
|
|
4035
4198
|
| WalletVaultItemState.LinkWalletState
|
|
4036
4199
|
| WalletVaultItemState.AgentCardWalletState
|
|
4037
4200
|
| KernelWalletState
|
|
4038
|
-
| ShopPayWalletState
|
|
4201
|
+
| ShopPayWalletState
|
|
4202
|
+
| VgsWalletState;
|
|
4039
4203
|
|
|
4040
4204
|
export namespace WalletVaultItemState {
|
|
4041
4205
|
export interface LinkWalletState {
|
|
@@ -4784,7 +4948,8 @@ export declare namespace ItemUpsertParams {
|
|
|
4784
4948
|
| WalletVaultItemRequest.LinkWalletVaultItemRequestSpec
|
|
4785
4949
|
| WalletVaultItemRequest.AgentCardWalletVaultItemSpec
|
|
4786
4950
|
| KernelWalletVaultItemSpec
|
|
4787
|
-
| ShopPayWalletVaultItemSpec
|
|
4951
|
+
| ShopPayWalletVaultItemSpec
|
|
4952
|
+
| VgsWalletVaultItemSpec;
|
|
4788
4953
|
|
|
4789
4954
|
/**
|
|
4790
4955
|
* Body param
|
|
@@ -4831,30 +4996,31 @@ export declare namespace ItemUpsertParams {
|
|
|
4831
4996
|
* subsequent refresh-token rotation after a successful import; the customer must
|
|
4832
4997
|
* stop refreshing this grant. With token_refresh=customer, send only the access
|
|
4833
4998
|
* token: your backend keeps the refresh token and rotates the grant, and Kernel
|
|
4834
|
-
* never refreshes or revokes it.
|
|
4835
|
-
*
|
|
4836
|
-
*
|
|
4837
|
-
*
|
|
4838
|
-
*
|
|
4839
|
-
* token_refresh=kernel, Kernel owns subsequent
|
|
4840
|
-
* customer must stop refreshing this grant. Import
|
|
4841
|
-
* token: if it or the configured client credentials
|
|
4842
|
-
* refresh, the imported wallet becomes degraded. An
|
|
4843
|
-
* leaves it degraded; Kernel does not retry a refresh
|
|
4844
|
-
* been consumed. There is no in-place reauthorization
|
|
4845
|
-
* wallet. If this imported wallet's credentials become
|
|
4846
|
-
* Link OAuth grant in your backend and create a wallet
|
|
4847
|
-
* the new wallet for NEW cards and payments, not to
|
|
4848
|
-
* outcome is uncertain. This does not replace the old
|
|
4849
|
-
* cards, or resolve their payment outcomes. Retain the old
|
|
4850
|
-
* while reconciling any uncertain payments with the provider
|
|
4851
|
-
* repeat an uncertain payment on the new wallet, and do not
|
|
4852
|
-
* evidence that it did not execute. Deletion of the old wallet
|
|
4853
|
-
* by unresolved child cards. Repeating a create for the same
|
|
4854
|
-
* non-secret spec returns the existing wallet without replacing
|
|
4855
|
-
* they have rotated or the wallet needs reconnection. ID and name
|
|
4856
|
-
* resolving to the same config are equivalent. A different config or
|
|
4857
|
-
* spec returns 409. This create operation does not replace an existing
|
|
4999
|
+
* never refreshes or revokes it. When Link rejects the stored access token, any
|
|
5000
|
+
* operation that reaches Link, such as creating, authorizing or filling a card,
|
|
5001
|
+
* returns 409 with code access_token_rejected without contacting Link again. Push
|
|
5002
|
+
* a fresh access token with the wallet's update_access_token operation, then retry
|
|
5003
|
+
* the operation. The remainder of this description applies to
|
|
5004
|
+
* token_refresh=kernel. With token_refresh=kernel, Kernel owns subsequent
|
|
5005
|
+
* refresh-token rotation; the customer must stop refreshing this grant. Import
|
|
5006
|
+
* does not verify the refresh token: if it or the configured client credentials
|
|
5007
|
+
* are rejected during a later refresh, the imported wallet becomes degraded. An
|
|
5008
|
+
* unknown refresh outcome also leaves it degraded; Kernel does not retry a refresh
|
|
5009
|
+
* token that may already have been consumed. There is no in-place reauthorization
|
|
5010
|
+
* operation for an imported wallet. If this imported wallet's credentials become
|
|
5011
|
+
* unusable, obtain a fresh Link OAuth grant in your backend and create a wallet
|
|
5012
|
+
* under a NEW wallet key. Use the new wallet for NEW cards and payments, not to
|
|
5013
|
+
* retry an old payment whose outcome is uncertain. This does not replace the old
|
|
5014
|
+
* grant, rebind existing cards, or resolve their payment outcomes. Retain the old
|
|
5015
|
+
* wallet and its cards while reconciling any uncertain payments with the provider
|
|
5016
|
+
* or support. Do not repeat an uncertain payment on the new wallet, and do not
|
|
5017
|
+
* treat deletion as evidence that it did not execute. Deletion of the old wallet
|
|
5018
|
+
* can remain blocked by unresolved child cards. Repeating a create for the same
|
|
5019
|
+
* item key and non-secret spec returns the existing wallet without replacing
|
|
5020
|
+
* tokens, even if they have rotated or the wallet needs reconnection. ID and name
|
|
5021
|
+
* references resolving to the same config are equivalent. A different config or
|
|
5022
|
+
* non-secret spec returns 409. This create operation does not replace an existing
|
|
5023
|
+
* grant.
|
|
4858
5024
|
*/
|
|
4859
5025
|
export interface ImportedLinkAuthorizationInput {
|
|
4860
5026
|
client: ImportedLinkAuthorizationInput.Client;
|
|
@@ -5130,6 +5296,11 @@ export declare namespace Items {
|
|
|
5130
5296
|
type VaultItemOperationResponse as VaultItemOperationResponse,
|
|
5131
5297
|
type VaultPaymentMethod as VaultPaymentMethod,
|
|
5132
5298
|
type VaultWebmcpBinding as VaultWebmcpBinding,
|
|
5299
|
+
type VgsCardInput as VgsCardInput,
|
|
5300
|
+
type VgsCardState as VgsCardState,
|
|
5301
|
+
type VgsCardVaultItemSpec as VgsCardVaultItemSpec,
|
|
5302
|
+
type VgsWalletState as VgsWalletState,
|
|
5303
|
+
type VgsWalletVaultItemSpec as VgsWalletVaultItemSpec,
|
|
5133
5304
|
type WalletVaultItemSpec as WalletVaultItemSpec,
|
|
5134
5305
|
type WalletVaultItemState as WalletVaultItemState,
|
|
5135
5306
|
type WebmcpInvokeVaultItemOperationRequest as WebmcpInvokeVaultItemOperationRequest,
|
|
@@ -92,6 +92,11 @@ import {
|
|
|
92
92
|
VaultItemOperationResponse,
|
|
93
93
|
VaultPaymentMethod,
|
|
94
94
|
VaultWebmcpBinding,
|
|
95
|
+
VgsCardInput,
|
|
96
|
+
VgsCardState,
|
|
97
|
+
VgsCardVaultItemSpec,
|
|
98
|
+
VgsWalletState,
|
|
99
|
+
VgsWalletVaultItemSpec,
|
|
95
100
|
WalletVaultItemSpec,
|
|
96
101
|
WalletVaultItemState,
|
|
97
102
|
WebmcpInvokeVaultItemOperationRequest,
|
|
@@ -366,6 +371,11 @@ export declare namespace Vaults {
|
|
|
366
371
|
type VaultItemOperationResponse as VaultItemOperationResponse,
|
|
367
372
|
type VaultPaymentMethod as VaultPaymentMethod,
|
|
368
373
|
type VaultWebmcpBinding as VaultWebmcpBinding,
|
|
374
|
+
type VgsCardInput as VgsCardInput,
|
|
375
|
+
type VgsCardState as VgsCardState,
|
|
376
|
+
type VgsCardVaultItemSpec as VgsCardVaultItemSpec,
|
|
377
|
+
type VgsWalletState as VgsWalletState,
|
|
378
|
+
type VgsWalletVaultItemSpec as VgsWalletVaultItemSpec,
|
|
369
379
|
type WalletVaultItemSpec as WalletVaultItemSpec,
|
|
370
380
|
type WalletVaultItemState as WalletVaultItemState,
|
|
371
381
|
type WebmcpInvokeVaultItemOperationRequest as WebmcpInvokeVaultItemOperationRequest,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.141.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.141.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.141.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.141.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|