Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.105.0"
".": "0.106.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 162
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-67859c948e3b903a317f4bd14135c7ee44254d2760068117bab34b7c4058be71.yml
openapi_spec_hash: 23a4716c6168e96f040ac8575582d075
config_hash: 227ad54062905d4ae964b24cef0505b0
configured_endpoints: 165
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-a0d3bcd9c54616729a7e43847e3134205e0695d78f357cc7a25c2775b588dbbd.yml
openapi_spec_hash: 36c423c286ca426f7510b27fadbdd66f
config_hash: 56632a1c934324aa46c1e5c610c2de85
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 0.106.0 (2025-06-27)

Full Changelog: [v0.105.0...v0.106.0](https://github.com/lithic-com/lithic-node/compare/v0.105.0...v0.106.0)

### Features

* **client:** adds support for on-demand Auth Rule Performance Reports ([bef8079](https://github.com/lithic-com/lithic-node/commit/bef807998eea5e4189f92fe037a3f34a13227a9c))


### Bug Fixes

* **ci:** release-doctor — report correct token name ([0551c7c](https://github.com/lithic-com/lithic-node/commit/0551c7c12b94bae5101c1c4e4fe93ec6d8dc5155))

## 0.105.0 (2025-06-23)

Full Changelog: [v0.104.0...v0.105.0](https://github.com/lithic-com/lithic-node/compare/v0.104.0...v0.105.0)
Expand Down
17 changes: 17 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Types:
- <code><a href="./src/resources/auth-rules/v2/v2.ts">AuthRuleCondition</a></code>
- <code><a href="./src/resources/auth-rules/v2/v2.ts">ConditionalAttribute</a></code>
- <code><a href="./src/resources/auth-rules/v2/v2.ts">ConditionalBlockParameters</a></code>
- <code><a href="./src/resources/auth-rules/v2/v2.ts">RuleStats</a></code>
- <code><a href="./src/resources/auth-rules/v2/v2.ts">VelocityLimitParams</a></code>
- <code><a href="./src/resources/auth-rules/v2/v2.ts">VelocityLimitParamsPeriodWindow</a></code>
- <code><a href="./src/resources/auth-rules/v2/v2.ts">V2CreateResponse</a></code>
Expand All @@ -82,6 +83,7 @@ Types:
- <code><a href="./src/resources/auth-rules/v2/v2.ts">V2DraftResponse</a></code>
- <code><a href="./src/resources/auth-rules/v2/v2.ts">V2PromoteResponse</a></code>
- <code><a href="./src/resources/auth-rules/v2/v2.ts">V2ReportResponse</a></code>
- <code><a href="./src/resources/auth-rules/v2/v2.ts">V2RetrieveReportResponse</a></code>

Methods:

Expand All @@ -94,6 +96,7 @@ Methods:
- <code title="post /v2/auth_rules/{auth_rule_token}/draft">client.authRules.v2.<a href="./src/resources/auth-rules/v2/v2.ts">draft</a>(authRuleToken, { ...params }) -> V2DraftResponse</code>
- <code title="post /v2/auth_rules/{auth_rule_token}/promote">client.authRules.v2.<a href="./src/resources/auth-rules/v2/v2.ts">promote</a>(authRuleToken) -> V2PromoteResponse</code>
- <code title="post /v2/auth_rules/{auth_rule_token}/report">client.authRules.v2.<a href="./src/resources/auth-rules/v2/v2.ts">report</a>(authRuleToken) -> V2ReportResponse</code>
- <code title="get /v2/auth_rules/{auth_rule_token}/report">client.authRules.v2.<a href="./src/resources/auth-rules/v2/v2.ts">retrieveReport</a>(authRuleToken, { ...params }) -> V2RetrieveReportResponse</code>

### Backtests

Expand Down Expand Up @@ -656,3 +659,17 @@ Methods:
- <code title="get /v1/funding_events/{funding_event_token}">client.fundingEvents.<a href="./src/resources/funding-events.ts">retrieve</a>(fundingEventToken) -> FundingEventRetrieveResponse</code>
- <code title="get /v1/funding_events">client.fundingEvents.<a href="./src/resources/funding-events.ts">list</a>({ ...params }) -> FundingEventListResponsesCursorPage</code>
- <code title="get /v1/funding_events/{funding_event_token}/details">client.fundingEvents.<a href="./src/resources/funding-events.ts">retrieveDetails</a>(fundingEventToken) -> FundingEventRetrieveDetailsResponse</code>

# Fraud

## Transactions

Types:

- <code><a href="./src/resources/fraud/transactions.ts">TransactionRetrieveResponse</a></code>
- <code><a href="./src/resources/fraud/transactions.ts">TransactionReportResponse</a></code>

Methods:

- <code title="get /v1/fraud/transactions/{transaction_token}">client.fraud.transactions.<a href="./src/resources/fraud/transactions.ts">retrieve</a>(transactionToken) -> TransactionRetrieveResponse</code>
- <code title="post /v1/fraud/transactions/{transaction_token}">client.fraud.transactions.<a href="./src/resources/fraud/transactions.ts">report</a>(transactionToken, { ...params }) -> TransactionReportResponse</code>
2 changes: 1 addition & 1 deletion bin/check-release-environment
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
errors=()

if [ -z "${NPM_TOKEN}" ]; then
errors+=("The LITHIC_NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
errors+=("The NPM_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets")
fi

lenErrors=${#errors[@]}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lithic",
"version": "0.105.0",
"version": "0.106.0",
"description": "The official TypeScript library for the Lithic API",
"author": "Lithic <sdk-feedback@lithic.com>",
"types": "dist/index.d.ts",
Expand Down
5 changes: 5 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ import {
FinancialAccountsSinglePage,
FinancialTransaction,
} from './resources/financial-accounts/financial-accounts';
import { Fraud } from './resources/fraud/fraud';
import {
Reports,
SettlementDetail,
Expand Down Expand Up @@ -418,6 +419,7 @@ export class Lithic extends Core.APIClient {
externalPayments: API.ExternalPayments = new API.ExternalPayments(this);
managementOperations: API.ManagementOperations = new API.ManagementOperations(this);
fundingEvents: API.FundingEvents = new API.FundingEvents(this);
fraud: API.Fraud = new API.Fraud(this);

/**
* Check whether the base URL is set to its default.
Expand Down Expand Up @@ -520,6 +522,7 @@ Lithic.ManagementOperations = ManagementOperations;
Lithic.ManagementOperationTransactionsCursorPage = ManagementOperationTransactionsCursorPage;
Lithic.FundingEvents = FundingEvents;
Lithic.FundingEventListResponsesCursorPage = FundingEventListResponsesCursorPage;
Lithic.Fraud = Fraud;
export declare namespace Lithic {
export type RequestOptions = Core.RequestOptions;

Expand Down Expand Up @@ -800,6 +803,8 @@ export declare namespace Lithic {
type FundingEventListParams as FundingEventListParams,
};

export { Fraud as Fraud };

export type AccountFinancialAccountType = API.AccountFinancialAccountType;
export type Address = API.Address;
export type Carrier = API.Carrier;
Expand Down
8 changes: 7 additions & 1 deletion src/resources/account-holders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ export class AccountHolders extends APIResource {
* ```ts
* const accountHolder = await client.accountHolders.update(
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
* {
* business_entity: { address: { postal_code: '61023' } },
* control_person: { address: { postal_code: '68023' } },
* website_url: 'https://www.mynewbusiness.com',
* },
* );
* ```
*/
Expand Down Expand Up @@ -218,7 +223,8 @@ export class AccountHolders extends APIResource {
* const document =
* await client.accountHolders.simulateEnrollmentDocumentReview(
* {
* document_upload_token: 'document_upload_token',
* document_upload_token:
* 'b11cd67b-0a52-4180-8365-314f3def5426',
* status: 'UPLOADED',
* },
* );
Expand Down
6 changes: 6 additions & 0 deletions src/resources/auth-rules/auth-rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
AuthRuleCondition,
ConditionalAttribute,
ConditionalBlockParameters,
RuleStats,
V2,
V2ApplyParams,
V2ApplyResponse,
Expand All @@ -19,6 +20,8 @@ import {
V2ListResponsesCursorPage,
V2PromoteResponse,
V2ReportResponse,
V2RetrieveReportParams,
V2RetrieveReportResponse,
V2RetrieveResponse,
V2UpdateParams,
V2UpdateResponse,
Expand All @@ -40,6 +43,7 @@ export declare namespace AuthRules {
type AuthRuleCondition as AuthRuleCondition,
type ConditionalAttribute as ConditionalAttribute,
type ConditionalBlockParameters as ConditionalBlockParameters,
type RuleStats as RuleStats,
type VelocityLimitParams as VelocityLimitParams,
type VelocityLimitParamsPeriodWindow as VelocityLimitParamsPeriodWindow,
type V2CreateResponse as V2CreateResponse,
Expand All @@ -50,11 +54,13 @@ export declare namespace AuthRules {
type V2DraftResponse as V2DraftResponse,
type V2PromoteResponse as V2PromoteResponse,
type V2ReportResponse as V2ReportResponse,
type V2RetrieveReportResponse as V2RetrieveReportResponse,
V2ListResponsesCursorPage as V2ListResponsesCursorPage,
type V2CreateParams as V2CreateParams,
type V2UpdateParams as V2UpdateParams,
type V2ListParams as V2ListParams,
type V2ApplyParams as V2ApplyParams,
type V2DraftParams as V2DraftParams,
type V2RetrieveReportParams as V2RetrieveReportParams,
};
}
3 changes: 3 additions & 0 deletions src/resources/auth-rules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export {
type AuthRuleCondition,
type ConditionalAttribute,
type ConditionalBlockParameters,
type RuleStats,
type VelocityLimitParams,
type VelocityLimitParamsPeriodWindow,
type V2CreateResponse,
Expand All @@ -18,9 +19,11 @@ export {
type V2DraftResponse,
type V2PromoteResponse,
type V2ReportResponse,
type V2RetrieveReportResponse,
type V2CreateParams,
type V2UpdateParams,
type V2ListParams,
type V2ApplyParams,
type V2DraftParams,
type V2RetrieveReportParams,
} from './v2/index';
140 changes: 11 additions & 129 deletions src/resources/auth-rules/v2/backtests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { APIResource } from '../../../resource';
import * as Core from '../../../core';
import * as V2API from './v2';

export class Backtests extends APIResource {
/**
Expand All @@ -22,13 +23,14 @@ export class Backtests extends APIResource {
* `/v2/auth_rules/{auth_rule_token}/backtests/{auth_rule_backtest_token}`
* endpoint.
*
* Lithic currently supports backtesting for `CONDITIONAL_BLOCK` rules. Backtesting
* for `VELOCITY_LIMIT` rules is generally not supported. In specific cases (i.e.
* where Lithic has pre-calculated the requested velocity metrics for historical
* transactions), a backtest may be feasible. However, such cases are uncommon and
* customers should not anticipate support for velocity backtests under most
* configurations. If a historical transaction does not feature the required inputs
* to evaluate the rule, then it will not be included in the final backtest report.
* Lithic currently supports backtesting for `CONDITIONAL_BLOCK` /
* `CONDITIONAL_3DS_ACTION` rules. Backtesting for `VELOCITY_LIMIT` rules is
* generally not supported. In specific cases (i.e. where Lithic has pre-calculated
* the requested velocity metrics for historical transactions), a backtest may be
* feasible. However, such cases are uncommon and customers should not anticipate
* support for velocity backtests under most configurations. If a historical
* transaction does not feature the required inputs to evaluate the rule, then it
* will not be included in the final backtest report.
*
* @example
* ```ts
Expand Down Expand Up @@ -96,129 +98,9 @@ export interface BacktestResults {

export namespace BacktestResults {
export interface Results {
current_version?: Results.CurrentVersion | null;
current_version?: V2API.RuleStats | null;

draft_version?: Results.DraftVersion | null;
}

export namespace Results {
export interface CurrentVersion {
/**
* The total number of historical transactions approved by this rule during the
* relevant period, or the number of transactions that would have been approved if
* the rule was evaluated in shadow mode.
*/
approved?: number;

/**
* The total number of historical transactions challenged by this rule during the
* relevant period, or the number of transactions that would have been challenged
* if the rule was evaluated in shadow mode. Currently applicable only for 3DS Auth
* Rules.
*/
challenged?: number;

/**
* The total number of historical transactions declined by this rule during the
* relevant period, or the number of transactions that would have been declined if
* the rule was evaluated in shadow mode.
*/
declined?: number;

/**
* Example events and their outcomes.
*/
examples?: Array<CurrentVersion.Example>;

/**
* The version of the rule, this is incremented whenever the rule's parameters
* change.
*/
version?: number;
}

export namespace CurrentVersion {
export interface Example {
/**
* Whether the rule would have approved the request.
*/
approved?: boolean;

/**
* The decision made by the rule for this event.
*/
decision?: 'APPROVED' | 'DECLINED' | 'CHALLENGED';

/**
* The event token.
*/
event_token?: string;

/**
* The timestamp of the event.
*/
timestamp?: string;
}
}

export interface DraftVersion {
/**
* The total number of historical transactions approved by this rule during the
* relevant period, or the number of transactions that would have been approved if
* the rule was evaluated in shadow mode.
*/
approved?: number;

/**
* The total number of historical transactions challenged by this rule during the
* relevant period, or the number of transactions that would have been challenged
* if the rule was evaluated in shadow mode. Currently applicable only for 3DS Auth
* Rules.
*/
challenged?: number;

/**
* The total number of historical transactions declined by this rule during the
* relevant period, or the number of transactions that would have been declined if
* the rule was evaluated in shadow mode.
*/
declined?: number;

/**
* Example events and their outcomes.
*/
examples?: Array<DraftVersion.Example>;

/**
* The version of the rule, this is incremented whenever the rule's parameters
* change.
*/
version?: number;
}

export namespace DraftVersion {
export interface Example {
/**
* Whether the rule would have approved the request.
*/
approved?: boolean;

/**
* The decision made by the rule for this event.
*/
decision?: 'APPROVED' | 'DECLINED' | 'CHALLENGED';

/**
* The event token.
*/
event_token?: string;

/**
* The timestamp of the event.
*/
timestamp?: string;
}
}
draft_version?: V2API.RuleStats | null;
}

export interface SimulationParameters {
Expand Down
3 changes: 3 additions & 0 deletions src/resources/auth-rules/v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export {
type AuthRuleCondition,
type ConditionalAttribute,
type ConditionalBlockParameters,
type RuleStats,
type VelocityLimitParams,
type VelocityLimitParamsPeriodWindow,
type V2CreateResponse,
Expand All @@ -23,9 +24,11 @@ export {
type V2DraftResponse,
type V2PromoteResponse,
type V2ReportResponse,
type V2RetrieveReportResponse,
type V2CreateParams,
type V2UpdateParams,
type V2ListParams,
type V2ApplyParams,
type V2DraftParams,
type V2RetrieveReportParams,
} from './v2';
Loading