@onkernel/sdk 0.142.0 → 0.144.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 +14 -0
- package/package.json +1 -1
- package/resources/vaults/items.d.mts +104 -38
- package/resources/vaults/items.d.mts.map +1 -1
- package/resources/vaults/items.d.ts +104 -38
- package/resources/vaults/items.d.ts.map +1 -1
- package/resources/vaults/items.js +2 -1
- package/resources/vaults/items.js.map +1 -1
- package/resources/vaults/items.mjs +2 -1
- package/resources/vaults/items.mjs.map +1 -1
- package/src/resources/vaults/items.ts +109 -38
- 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
|
@@ -157,7 +157,8 @@ export class Items extends APIResource {
|
|
|
157
157
|
* a failure, an `unknown` outcome, or a transport error.
|
|
158
158
|
*
|
|
159
159
|
* Connected Kernel wallets may advertise add_payment_method, which returns a
|
|
160
|
-
* single-use hosted card_enrollment link for a card,
|
|
160
|
+
* single-use hosted card_enrollment link for a card, or with enrollment server a
|
|
161
|
+
* single-use card_ingest URL for the card's issuer, and remove_payment_method,
|
|
161
162
|
* which removes one card without affecting the others. Both operations require
|
|
162
163
|
* vaults:write in addition to vaults:use on the vault for scoped API keys, and
|
|
163
164
|
* return 403 without both permissions.
|
|
@@ -215,22 +216,32 @@ export class Items extends APIResource {
|
|
|
215
216
|
}
|
|
216
217
|
|
|
217
218
|
/**
|
|
218
|
-
* Start
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
* the
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
219
|
+
* Start enrollment of a card in a connected Kernel wallet, including its first
|
|
220
|
+
* card, only when the wallet advertises add_payment_method. Returns a new payment
|
|
221
|
+
* method in pending_enrollment with a single-use action. Card details go directly
|
|
222
|
+
* to the card vault and are never accepted by this API. With enrollment hosted
|
|
223
|
+
* (the default) the action is a card_enrollment URL for the cardholder, which
|
|
224
|
+
* expires after 30 minutes. With enrollment server the action is a card_ingest URL
|
|
225
|
+
* that the card's issuer posts the card to from its backend, which expires after 5
|
|
226
|
+
* minutes; server enrollment returns 409 when it is not configured for the
|
|
227
|
+
* organization's card backend. A failed or expired enrollment does not affect the
|
|
228
|
+
* wallet's other payment methods. Scoped API keys require vaults:write in addition
|
|
229
|
+
* to vaults:use on this vault; otherwise the operation returns 403.
|
|
226
230
|
*/
|
|
227
231
|
export interface AddPaymentMethodVaultItemOperationRequest {
|
|
228
232
|
type: 'add_payment_method';
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* hosted returns a card_enrollment link for the cardholder. server returns a
|
|
236
|
+
* card_ingest URL for the card's issuer to post the card to server to server.
|
|
237
|
+
*/
|
|
238
|
+
enrollment?: 'hosted' | 'server';
|
|
229
239
|
}
|
|
230
240
|
|
|
231
241
|
/**
|
|
232
|
-
* The payment method created in pending_enrollment. Deliver
|
|
233
|
-
* cardholder; it is a single-use capability and must not be
|
|
242
|
+
* The payment method created in pending_enrollment. Deliver a card_enrollment
|
|
243
|
+
* action.url to the cardholder; it is a single-use capability and must not be
|
|
244
|
+
* logged. A card_ingest action.url is posted to by the card's issuer. Observe
|
|
234
245
|
* completion through the wallet's payment_methods expansion.
|
|
235
246
|
*/
|
|
236
247
|
export interface AddPaymentMethodVaultItemOperationResult {
|
|
@@ -3835,16 +3846,28 @@ export interface VaultPaymentMethod {
|
|
|
3835
3846
|
*/
|
|
3836
3847
|
type: string;
|
|
3837
3848
|
|
|
3849
|
+
/**
|
|
3850
|
+
* The open enrollment of a pending payment method. card_enrollment is a single-use
|
|
3851
|
+
* hosted link for the cardholder. card_ingest is a single-use URL on a Kernel
|
|
3852
|
+
* ingest hostname served by the card vault, which the card's issuer posts the card
|
|
3853
|
+
* to from its backend; Kernel never receives the card number or CVC.
|
|
3854
|
+
*/
|
|
3838
3855
|
action?: VaultPaymentMethod.Action;
|
|
3839
3856
|
|
|
3840
3857
|
/**
|
|
3841
|
-
* Expiry of a pending enrollment link.
|
|
3858
|
+
* Expiry of a pending enrollment link or ingest URL.
|
|
3842
3859
|
*/
|
|
3843
3860
|
expires_at?: string;
|
|
3844
3861
|
|
|
3845
3862
|
/**
|
|
3846
|
-
* Kernel wallets only.
|
|
3847
|
-
*
|
|
3863
|
+
* Kernel wallets only. The issuer's reference for a card it pushed with a
|
|
3864
|
+
* card_ingest URL.
|
|
3865
|
+
*/
|
|
3866
|
+
issuer_reference?: string;
|
|
3867
|
+
|
|
3868
|
+
/**
|
|
3869
|
+
* Kernel wallets only. pending_enrollment means a card_enrollment link or
|
|
3870
|
+
* card_ingest URL is open; active means the card is stored and can pay when
|
|
3848
3871
|
* capabilities.single_use_card.eligible is true; removal_pending means removal
|
|
3849
3872
|
* started but the provider outcome is unknown, so retry remove_payment_method;
|
|
3850
3873
|
* recovery_required means either an enrollment outcome is unknown (remove the
|
|
@@ -3855,6 +3878,12 @@ export interface VaultPaymentMethod {
|
|
|
3855
3878
|
status?: 'pending_enrollment' | 'active' | 'removal_pending' | 'recovery_required';
|
|
3856
3879
|
|
|
3857
3880
|
status_reason?: string;
|
|
3881
|
+
|
|
3882
|
+
/**
|
|
3883
|
+
* Kernel wallets only. When a card pushed with a card_ingest URL stops being
|
|
3884
|
+
* usable, as its issuer set.
|
|
3885
|
+
*/
|
|
3886
|
+
valid_until?: string;
|
|
3858
3887
|
}
|
|
3859
3888
|
|
|
3860
3889
|
export namespace VaultPaymentMethod {
|
|
@@ -3882,15 +3911,21 @@ export namespace VaultPaymentMethod {
|
|
|
3882
3911
|
last4?: string;
|
|
3883
3912
|
}
|
|
3884
3913
|
|
|
3914
|
+
/**
|
|
3915
|
+
* The open enrollment of a pending payment method. card_enrollment is a single-use
|
|
3916
|
+
* hosted link for the cardholder. card_ingest is a single-use URL on a Kernel
|
|
3917
|
+
* ingest hostname served by the card vault, which the card's issuer posts the card
|
|
3918
|
+
* to from its backend; Kernel never receives the card number or CVC.
|
|
3919
|
+
*/
|
|
3885
3920
|
export interface Action {
|
|
3886
|
-
name: 'card_enrollment';
|
|
3921
|
+
name: 'card_enrollment' | 'card_ingest';
|
|
3887
3922
|
|
|
3888
3923
|
url: string;
|
|
3889
3924
|
|
|
3890
3925
|
/**
|
|
3891
3926
|
* Secret bearer capability for embedded card capture with @onkernel/vault-react.
|
|
3892
|
-
* Present only for Kernel wallets; never for AgentCard. Treat
|
|
3893
|
-
* enrollment URL and do not log or persist it in browser storage.
|
|
3927
|
+
* Present only on card_enrollment for Kernel wallets; never for AgentCard. Treat
|
|
3928
|
+
* it like the enrollment URL and do not log or persist it in browser storage.
|
|
3894
3929
|
*/
|
|
3895
3930
|
capture_token?: string;
|
|
3896
3931
|
}
|
|
@@ -3918,30 +3953,43 @@ export interface VaultWebmcpBinding {
|
|
|
3918
3953
|
}
|
|
3919
3954
|
|
|
3920
3955
|
/**
|
|
3921
|
-
* The card
|
|
3922
|
-
*
|
|
3923
|
-
*
|
|
3956
|
+
* The card supplied to a purchase, as aliases in the customer's VGS vault. With
|
|
3957
|
+
* card_mode full it is a whole card: a persistent alias of its number, a freshly
|
|
3958
|
+
* collected volatile alias of its security code, its expiry and its last four
|
|
3959
|
+
* digits. With card_mode cvc_only it is a CVC alias alone, because the merchant
|
|
3960
|
+
* holds the rest on file. pan_alias, exp_month, exp_year and last4 are required
|
|
3961
|
+
* with card_mode full and rejected with card_mode cvc_only. Write-only: stored
|
|
3962
|
+
* encrypted and never returned in the item, its events or logs. A repeated PUT
|
|
3963
|
+
* with the same key must send the same card.
|
|
3924
3964
|
*/
|
|
3925
3965
|
export interface VgsCardInput {
|
|
3926
3966
|
/**
|
|
3927
3967
|
* A volatile alias of a freshly collected security code in the customer's vault.
|
|
3928
|
-
* It must still exist when authorize runs.
|
|
3968
|
+
* It must still exist when authorize runs. Required in both modes.
|
|
3929
3969
|
*/
|
|
3930
3970
|
cvc_alias: string;
|
|
3931
3971
|
|
|
3932
|
-
|
|
3972
|
+
/**
|
|
3973
|
+
* Required with card_mode full, rejected with card_mode cvc_only.
|
|
3974
|
+
*/
|
|
3975
|
+
exp_month?: number;
|
|
3933
3976
|
|
|
3934
|
-
|
|
3977
|
+
/**
|
|
3978
|
+
* Required with card_mode full, rejected with card_mode cvc_only.
|
|
3979
|
+
*/
|
|
3980
|
+
exp_year?: number;
|
|
3935
3981
|
|
|
3936
3982
|
/**
|
|
3937
|
-
* The card number's last four digits, checked against the revealed alias.
|
|
3983
|
+
* The card number's last four digits, checked against the revealed alias. Required
|
|
3984
|
+
* with card_mode full, rejected with card_mode cvc_only.
|
|
3938
3985
|
*/
|
|
3939
|
-
last4
|
|
3986
|
+
last4?: string;
|
|
3940
3987
|
|
|
3941
3988
|
/**
|
|
3942
|
-
* A persistent alias of the card number in the customer's vault.
|
|
3989
|
+
* A persistent alias of the card number in the customer's vault. Required with
|
|
3990
|
+
* card_mode full, rejected with card_mode cvc_only.
|
|
3943
3991
|
*/
|
|
3944
|
-
pan_alias
|
|
3992
|
+
pan_alias?: string;
|
|
3945
3993
|
}
|
|
3946
3994
|
|
|
3947
3995
|
/**
|
|
@@ -3991,17 +4039,24 @@ export namespace VgsCardState {
|
|
|
3991
4039
|
}
|
|
3992
4040
|
|
|
3993
4041
|
/**
|
|
3994
|
-
* One live purchase with a card in the customer's VGS vault.
|
|
3995
|
-
* card.pan_alias and card.cvc_alias through Kernel's VGS
|
|
3996
|
-
*
|
|
3997
|
-
*
|
|
3998
|
-
*
|
|
3999
|
-
*
|
|
4000
|
-
*
|
|
4001
|
-
*
|
|
4002
|
-
*
|
|
4003
|
-
* the browser
|
|
4004
|
-
*
|
|
4042
|
+
* One live purchase with a card in the customer's VGS vault. With card_mode full,
|
|
4043
|
+
* authorize reveals card.pan_alias and card.cvc_alias through Kernel's VGS
|
|
4044
|
+
* outbound proxy; with card_mode cvc_only, for a card the merchant already holds
|
|
4045
|
+
* on file whose checkout page asks only for the security code, it reveals
|
|
4046
|
+
* card.cvc_alias alone. The proxy replaces each revealed value with an alias in
|
|
4047
|
+
* Kernel's vault before it reaches Kernel; Kernel never receives the card number
|
|
4048
|
+
* or security code. The card is then ready with no further approval, until
|
|
4049
|
+
* expires_at, by default five minutes after authorize. fill types Kernel's aliases
|
|
4050
|
+
* on merchant_url's origin, and Kernel's VGS proxy replaces them with the card's
|
|
4051
|
+
* details when the browser submits checkout; a cvc_only card fills only the cvc
|
|
4052
|
+
* field, and reports no masks because it has no last4 to verify. A cvc_only card's
|
|
4053
|
+
* payment window routes all of the browser's egress through Kernel's VGS outbound
|
|
4054
|
+
* proxy, exactly as widely as a full card's: while it is open the proxy reveals
|
|
4055
|
+
* the card's aliases to any destination the browser sends them to, not only the
|
|
4056
|
+
* security code. An expired card requires a new purchase with a freshly collected
|
|
4057
|
+
* CVC alias. The amount and merchant are recorded but do not restrict payment
|
|
4058
|
+
* requests sent by the browser. Card updates are not supported; delete and create
|
|
4059
|
+
* a new item instead.
|
|
4005
4060
|
*/
|
|
4006
4061
|
export interface VgsCardVaultItemSpec {
|
|
4007
4062
|
/**
|
|
@@ -4033,6 +4088,15 @@ export interface VgsCardVaultItemSpec {
|
|
|
4033
4088
|
* Required when creating the card. Never returned.
|
|
4034
4089
|
*/
|
|
4035
4090
|
card?: VgsCardInput;
|
|
4091
|
+
|
|
4092
|
+
/**
|
|
4093
|
+
* Which card this purchase supplies, and the only part of it a read returns. full
|
|
4094
|
+
* is a whole card from the customer's vault. cvc_only is a card the merchant
|
|
4095
|
+
* already holds on file, whose checkout page asks for nothing but the security
|
|
4096
|
+
* code. It must match spec.card: a full card that is missing pan_alias is rejected
|
|
4097
|
+
* rather than treated as cvc_only. Omit it for full, which a read also omits.
|
|
4098
|
+
*/
|
|
4099
|
+
card_mode?: 'full' | 'cvc_only';
|
|
4036
4100
|
}
|
|
4037
4101
|
|
|
4038
4102
|
export interface VgsWalletState {
|
|
@@ -4894,6 +4958,13 @@ export declare namespace ItemPerformOperationParams {
|
|
|
4894
4958
|
* Body param
|
|
4895
4959
|
*/
|
|
4896
4960
|
type: 'add_payment_method';
|
|
4961
|
+
|
|
4962
|
+
/**
|
|
4963
|
+
* Body param: hosted returns a card_enrollment link for the cardholder. server
|
|
4964
|
+
* returns a card_ingest URL for the card's issuer to post the card to server to
|
|
4965
|
+
* server.
|
|
4966
|
+
*/
|
|
4967
|
+
enrollment?: 'hosted' | 'server';
|
|
4897
4968
|
}
|
|
4898
4969
|
|
|
4899
4970
|
export interface RemovePaymentMethodVaultItemOperationRequest {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.144.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.144.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.144.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.144.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|