diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 718eaf8e..60a1e001 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.387.0" + ".": "0.388.0" } diff --git a/.stats.yml b/.stats.yml index e5b11df2..bc6173cc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 230 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-acaa7510acabd57dfdde78063277cef0c611dd42abd998e5f1f851c4655e8fd0.yml -openapi_spec_hash: d0684f4b10e09e2585ad70360531501c -config_hash: ff2eb5f192b4de36611b37b27961c2d8 +configured_endpoints: 231 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2304a782c25d2a6b9586de2f6e2b536b5abbf62735f9c18ed0551607f134b714.yml +openapi_spec_hash: 67d6de7181215abe88dcc3da557a1e0d +config_hash: 5a0bf28bf735edf93f36c6c808711847 diff --git a/CHANGELOG.md b/CHANGELOG.md index 79691e56..c8a9f0a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.388.0 (2025-12-18) + +Full Changelog: [v0.387.0...v0.388.0](https://github.com/Increase/increase-typescript/compare/v0.387.0...v0.388.0) + +### Features + +* **api:** api update ([9e2c146](https://github.com/Increase/increase-typescript/commit/9e2c1463001194af965a34e02501318e3357d386)) + ## 0.387.0 (2025-12-17) Full Changelog: [v0.386.0...v0.387.0](https://github.com/Increase/increase-typescript/compare/v0.386.0...v0.387.0) diff --git a/api.md b/api.md index 0f8735b7..4722ad6b 100644 --- a/api.md +++ b/api.md @@ -896,6 +896,12 @@ Methods: - client.simulations.documents.create({ ...params }) -> Document +## Exports + +Methods: + +- client.simulations.exports.create({ ...params }) -> Export + ## CardTokens Methods: diff --git a/package.json b/package.json index 3fb91490..98e79318 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "increase", - "version": "0.387.0", + "version": "0.388.0", "description": "The official TypeScript library for the Increase API", "author": "Increase ", "types": "dist/index.d.ts", diff --git a/src/resources/exports.ts b/src/resources/exports.ts index d211c682..d1478f5c 100644 --- a/src/resources/exports.ts +++ b/src/resources/exports.ts @@ -57,10 +57,10 @@ export class Exports extends APIResource { export type ExportsPage = Page; /** - * Exports are batch summaries of your Increase data. You can make them from the - * API or dashboard. Since they can take a while, they are generated - * asynchronously. We send a webhook when they are ready. For more information, - * please read our + * Exports are generated files. Some exports can contain a lot of data, like a CSV + * of your transactions. Others can be a single document, like a tax form. Since + * they can take a while, they are generated asynchronously. We send a webhook when + * they are ready. For more information, please read our * [Exports documentation](https://increase.com/documentation/exports). */ export interface Export { @@ -163,6 +163,8 @@ export interface ExportCreateParams { * - `entity_csv` - Export a CSV of entities with a given status. * - `vendor_csv` - Export a CSV of vendors added to the third-party risk * management dashboard. + * - `account_verification_letter` - A PDF of an account verification letter. + * - `funding_instructions` - A PDF of funding instructions. */ category: | 'account_statement_ofx' @@ -171,7 +173,9 @@ export interface ExportCreateParams { | 'balance_csv' | 'bookkeeping_account_balance_csv' | 'entity_csv' - | 'vendor_csv'; + | 'vendor_csv' + | 'account_verification_letter' + | 'funding_instructions'; /** * Options for the created export. Required if `category` is equal to @@ -185,6 +189,12 @@ export interface ExportCreateParams { */ account_statement_ofx?: ExportCreateParams.AccountStatementOfx; + /** + * Options for the created export. Required if `category` is equal to + * `account_verification_letter`. + */ + account_verification_letter?: ExportCreateParams.AccountVerificationLetter; + /** * Options for the created export. Required if `category` is equal to * `balance_csv`. @@ -202,6 +212,12 @@ export interface ExportCreateParams { */ entity_csv?: ExportCreateParams.EntityCsv; + /** + * Options for the created export. Required if `category` is equal to + * `funding_instructions`. + */ + funding_instructions?: ExportCreateParams.FundingInstructions; + /** * Options for the created export. Required if `category` is equal to * `transaction_csv`. @@ -290,6 +306,22 @@ export namespace ExportCreateParams { } } + /** + * Options for the created export. Required if `category` is equal to + * `account_verification_letter`. + */ + export interface AccountVerificationLetter { + /** + * The Account Number to create a letter for. + */ + account_number_id: string; + + /** + * The date of the balance to include in the letter. Defaults to the current date. + */ + balance_date?: string; + } + /** * Options for the created export. Required if `category` is equal to * `balance_csv`. @@ -412,6 +444,17 @@ export namespace ExportCreateParams { } } + /** + * Options for the created export. Required if `category` is equal to + * `funding_instructions`. + */ + export interface FundingInstructions { + /** + * The Account Number to create funding instructions for. + */ + account_number_id: string; + } + /** * Options for the created export. Required if `category` is equal to * `transaction_csv`. diff --git a/src/resources/simulations/exports.ts b/src/resources/simulations/exports.ts new file mode 100644 index 00000000..26bd8fe1 --- /dev/null +++ b/src/resources/simulations/exports.ts @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import { APIResource } from '../../core/resource'; +import * as ExportsAPI from '../exports'; +import { APIPromise } from '../../core/api-promise'; +import { RequestOptions } from '../../internal/request-options'; + +export class Exports extends APIResource { + /** + * Simulates a tax form export being generated. + * + * @example + * ```ts + * const _export = await client.simulations.exports.create({ + * account_id: 'account_in71c4amph0vgo2qllky', + * }); + * ``` + */ + create(body: ExportCreateParams, options?: RequestOptions): APIPromise { + return this._client.post('/simulations/exports', { body, ...options }); + } +} + +export interface ExportCreateParams { + /** + * The identifier of the Account the tax document is for. + */ + account_id: string; +} + +export declare namespace Exports { + export { type ExportCreateParams as ExportCreateParams }; +} diff --git a/src/resources/simulations/index.ts b/src/resources/simulations/index.ts index 3267b8ec..720b8403 100644 --- a/src/resources/simulations/index.ts +++ b/src/resources/simulations/index.ts @@ -33,6 +33,7 @@ export { type DigitalWalletTokenRequestCreateParams, } from './digital-wallet-token-requests'; export { Documents, type DocumentCreateParams } from './documents'; +export { Exports, type ExportCreateParams } from './exports'; export { InboundACHTransfers, type InboundACHTransferCreateParams } from './inbound-ach-transfers'; export { InboundCheckDeposits, type InboundCheckDepositCreateParams } from './inbound-check-deposits'; export { InboundFednowTransfers, type InboundFednowTransferCreateParams } from './inbound-fednow-transfers'; diff --git a/src/resources/simulations/simulations.ts b/src/resources/simulations/simulations.ts index 0da5f136..9182de1d 100644 --- a/src/resources/simulations/simulations.ts +++ b/src/resources/simulations/simulations.ts @@ -51,6 +51,8 @@ import { } from './digital-wallet-token-requests'; import * as DocumentsAPI from './documents'; import { DocumentCreateParams, Documents } from './documents'; +import * as ExportsAPI from './exports'; +import { ExportCreateParams, Exports } from './exports'; import * as InboundACHTransfersAPI from './inbound-ach-transfers'; import { InboundACHTransferCreateParams, InboundACHTransfers } from './inbound-ach-transfers'; import * as InboundCheckDepositsAPI from './inbound-check-deposits'; @@ -143,6 +145,7 @@ export class Simulations extends APIResource { this._client, ); documents: DocumentsAPI.Documents = new DocumentsAPI.Documents(this._client); + exports: ExportsAPI.Exports = new ExportsAPI.Exports(this._client); cardTokens: CardTokensAPI.CardTokens = new CardTokensAPI.CardTokens(this._client); } @@ -176,6 +179,7 @@ Simulations.InboundMailItems = InboundMailItems; Simulations.Programs = Programs; Simulations.AccountStatements = AccountStatements; Simulations.Documents = Documents; +Simulations.Exports = Exports; Simulations.CardTokens = CardTokens; export declare namespace Simulations { @@ -298,5 +302,7 @@ export declare namespace Simulations { export { Documents as Documents, type DocumentCreateParams as DocumentCreateParams }; + export { Exports as Exports, type ExportCreateParams as ExportCreateParams }; + export { CardTokens as CardTokens, type CardTokenCreateParams as CardTokenCreateParams }; } diff --git a/src/version.ts b/src/version.ts index 6596361e..4d17d703 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.387.0'; // x-release-please-version +export const VERSION = '0.388.0'; // x-release-please-version diff --git a/tests/api-resources/exports.test.ts b/tests/api-resources/exports.test.ts index 796685e1..ddafa713 100644 --- a/tests/api-resources/exports.test.ts +++ b/tests/api-resources/exports.test.ts @@ -36,6 +36,7 @@ describe('resource exports', () => { on_or_before: '2019-12-27T18:11:19.117Z', }, }, + account_verification_letter: { account_number_id: 'account_number_id', balance_date: '2019-12-27' }, balance_csv: { account_id: 'account_id', created_at: { @@ -56,6 +57,7 @@ describe('resource exports', () => { }, }, entity_csv: { status: { in: ['active'] } }, + funding_instructions: { account_number_id: 'account_number_id' }, transaction_csv: { account_id: 'account_in71c4amph0vgo2qllky', created_at: { diff --git a/tests/api-resources/simulations/exports.test.ts b/tests/api-resources/simulations/exports.test.ts new file mode 100644 index 00000000..e54b5320 --- /dev/null +++ b/tests/api-resources/simulations/exports.test.ts @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +import Increase from 'increase'; + +const client = new Increase({ + apiKey: 'My API Key', + baseURL: process.env['TEST_API_BASE_URL'] ?? 'http://127.0.0.1:4010', +}); + +describe('resource exports', () => { + test('create: only required params', async () => { + const responsePromise = client.simulations.exports.create({ account_id: 'account_in71c4amph0vgo2qllky' }); + const rawResponse = await responsePromise.asResponse(); + expect(rawResponse).toBeInstanceOf(Response); + const response = await responsePromise; + expect(response).not.toBeInstanceOf(Response); + const dataAndResponse = await responsePromise.withResponse(); + expect(dataAndResponse.data).toBe(response); + expect(dataAndResponse.response).toBe(rawResponse); + }); + + test('create: required and optional params', async () => { + const response = await client.simulations.exports.create({ account_id: 'account_in71c4amph0vgo2qllky' }); + }); +});