diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 768a5b8e..af43dc96 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.123.0" + ".": "0.124.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 8734dbdb..12e80b59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.124.0](https://github.com/kernel/kernel-node-sdk/compare/v0.123.0...v0.124.0) (2026-10-10) + + +### Features + +* Complete Visa vault verification and transaction reporting ([41d139b](https://github.com/kernel/kernel-node-sdk/commit/41d139b651d5231e6e32a0d43f6343a2c5bd34ac)) + ## [0.123.0](https://github.com/kernel/kernel-node-sdk/compare/v0.122.0...v0.123.0) (2026-10-09) diff --git a/api.md b/api.md index dc9f57e2..a53eb145 100644 --- a/api.md +++ b/api.md @@ -514,6 +514,7 @@ Types: - CardVaultItemSpec - CardVaultItemState - CollectVaultItemOperationRequest +- ConfirmTransactionVaultItemOperationRequest - CredentialAccountVaultItem - CredentialAccountVaultItemRequest - CredentialCollectionAction diff --git a/package.json b/package.json index 12f3695d..30855bd6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@onkernel/sdk", - "version": "0.123.0", + "version": "0.124.0", "description": "The official TypeScript library for the Kernel API", "author": "Kernel <>", "types": "dist/index.d.ts", diff --git a/src/resources/vaults/index.ts b/src/resources/vaults/index.ts index 8c888192..aa582417 100644 --- a/src/resources/vaults/index.ts +++ b/src/resources/vaults/index.ts @@ -9,6 +9,7 @@ export { type CardVaultItemSpec, type CardVaultItemState, type CollectVaultItemOperationRequest, + type ConfirmTransactionVaultItemOperationRequest, type CredentialAccountVaultItem, type CredentialAccountVaultItemRequest, type CredentialCollectionAction, diff --git a/src/resources/vaults/items.ts b/src/resources/vaults/items.ts index c70f7665..ebf219ba 100644 --- a/src/resources/vaults/items.ts +++ b/src/resources/vaults/items.ts @@ -600,6 +600,44 @@ export interface CollectVaultItemOperationRequest { type: 'collect'; } +/** + * Report a real merchant transaction outcome for an issued Kernel Visa credential. + * Never infer success from filling checkout or receiving a credential. Supply the + * observed status, transaction type, actual amount, currency and timestamp. + * Unknown outcomes require manual reconciliation, not retry. Each purchase accepts + * one report. + */ +export interface ConfirmTransactionVaultItemOperationRequest { + /** + * Actual transaction amount in minor units, no greater than the approved limit. + */ + amount: number; + + /** + * Must match the approved purchase currency. + */ + currency: string; + + /** + * Time the merchant outcome was observed. + */ + occurred_at: string; + + status: 'APPROVED' | 'DECLINED' | 'PENDING' | 'ERROR' | 'CANCELLED'; + + transaction_type: + | 'PURCHASE' + | 'AUTHORIZATION' + | 'CAPTURE' + | 'REFUND' + | 'REVERSAL' + | 'VERIFICATION' + | 'CHARGEBACK' + | 'FRAUD'; + + type: 'confirm_transaction'; +} + export interface CredentialAccountVaultItem { id: string; @@ -652,6 +690,7 @@ export namespace CredentialAccountVaultItem { type: | 'authorize' + | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' @@ -960,6 +999,7 @@ export namespace CredentialVaultItem { type: | 'authorize' + | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' @@ -1257,6 +1297,17 @@ export interface KernelCardVaultItemSpec { */ wallet: string; + /** + * Actual merchant category when known. Omit rather than invent a category. + */ + merchant_category?: string; + + /** + * Actual merchant MCC when known. Omit rather than invent a code. 0000 is not + * accepted. + */ + merchant_category_code?: string; + /** * The merchant's ISO 3166-1 alpha-2 country code. Required for Visa cards, whose * one-time code is issued for the merchant's country. @@ -2059,6 +2110,7 @@ export namespace VaultItem { type: | 'authorize' + | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' @@ -2132,6 +2184,7 @@ export namespace VaultItem { type: | 'authorize' + | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' @@ -2281,6 +2334,7 @@ export namespace VaultItemOperationResponse { type: | 'authorize' + | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' @@ -2354,6 +2408,7 @@ export namespace VaultItemOperationResponse { type: | 'authorize' + | 'confirm_transaction' | 'collect' | 'prepare_checkout' | 'fill' @@ -2739,6 +2794,7 @@ export interface ItemEventsParams { export type ItemPerformOperationParams = | ItemPerformOperationParams.AuthorizeVaultItemOperationRequest + | ItemPerformOperationParams.ConfirmTransactionVaultItemOperationRequest | ItemPerformOperationParams.CollectVaultItemOperationRequest | ItemPerformOperationParams.PrepareCheckoutVaultItemOperationRequest | ItemPerformOperationParams.FillVaultItemOperationRequest @@ -2762,6 +2818,52 @@ export declare namespace ItemPerformOperationParams { type: 'authorize'; } + export interface ConfirmTransactionVaultItemOperationRequest { + /** + * Path param + */ + id_or_name: string; + + /** + * Body param: Actual transaction amount in minor units, no greater than the + * approved limit. + */ + amount: number; + + /** + * Body param: Must match the approved purchase currency. + */ + currency: string; + + /** + * Body param: Time the merchant outcome was observed. + */ + occurred_at: string; + + /** + * Body param + */ + status: 'APPROVED' | 'DECLINED' | 'PENDING' | 'ERROR' | 'CANCELLED'; + + /** + * Body param + */ + transaction_type: + | 'PURCHASE' + | 'AUTHORIZATION' + | 'CAPTURE' + | 'REFUND' + | 'REVERSAL' + | 'VERIFICATION' + | 'CHARGEBACK' + | 'FRAUD'; + + /** + * Body param + */ + type: 'confirm_transaction'; + } + export interface CollectVaultItemOperationRequest { /** * Path param @@ -3233,6 +3335,7 @@ export declare namespace Items { type CardVaultItemSpec as CardVaultItemSpec, type CardVaultItemState as CardVaultItemState, type CollectVaultItemOperationRequest as CollectVaultItemOperationRequest, + type ConfirmTransactionVaultItemOperationRequest as ConfirmTransactionVaultItemOperationRequest, type CredentialAccountVaultItem as CredentialAccountVaultItem, type CredentialAccountVaultItemRequest as CredentialAccountVaultItemRequest, type CredentialCollectionAction as CredentialCollectionAction, diff --git a/src/resources/vaults/vaults.ts b/src/resources/vaults/vaults.ts index befee853..a72397a2 100644 --- a/src/resources/vaults/vaults.ts +++ b/src/resources/vaults/vaults.ts @@ -10,6 +10,7 @@ import { CardVaultItemSpec, CardVaultItemState, CollectVaultItemOperationRequest, + ConfirmTransactionVaultItemOperationRequest, CredentialAccountVaultItem, CredentialAccountVaultItemRequest, CredentialCollectionAction, @@ -270,6 +271,7 @@ export declare namespace Vaults { type CardVaultItemSpec as CardVaultItemSpec, type CardVaultItemState as CardVaultItemState, type CollectVaultItemOperationRequest as CollectVaultItemOperationRequest, + type ConfirmTransactionVaultItemOperationRequest as ConfirmTransactionVaultItemOperationRequest, type CredentialAccountVaultItem as CredentialAccountVaultItem, type CredentialAccountVaultItemRequest as CredentialAccountVaultItemRequest, type CredentialCollectionAction as CredentialCollectionAction, diff --git a/src/version.ts b/src/version.ts index 197f7f0d..f8a5815b 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.123.0'; // x-release-please-version +export const VERSION = '0.124.0'; // x-release-please-version