From 91ee3b5837e439946ba9c2a4beff1b6e44c7bca0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 15:36:50 +0000 Subject: [PATCH 01/11] feat(api): update SDK from prod (523b1fdd6cc6b5732ccdad5095c21f69fe1f7489) --- .stats.yml | 4 ++-- src/resources/invoices.ts | 12 ++++++------ src/resources/transactions.ts | 36 +++++++++++++++++------------------ 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.stats.yml b/.stats.yml index d469da0..a4874a9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-1ac1d5e34a8fbabcecc040255a4c5f3d9e6e986bb1b57ec76ed8cd146e5e2bf4.yml -openapi_spec_hash: ec746b4b585a33e6f5f722537e37c956 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-d9af2f7a25f1b257ad41d419f9a436f0bc0b3a3fc1dd70db7ca50845f58dfb4e.yml +openapi_spec_hash: 142080b0b3d94edee6efa27b8c37ea51 config_hash: afc05056f5a776aa1501387e38c4820e diff --git a/src/resources/invoices.ts b/src/resources/invoices.ts index 4d67376..d7d43a0 100644 --- a/src/resources/invoices.ts +++ b/src/resources/invoices.ts @@ -744,7 +744,7 @@ export namespace InvoiceRetrieveResponse { type: 'payin' | 'payout'; /** - * User reference in API responses: Fragment user id and optional external_id. + * User reference in API responses: Fragment user id and external_id. */ user: Payment.User; } @@ -788,7 +788,7 @@ export namespace InvoiceRetrieveResponse { } /** - * User reference in API responses: Fragment user id and optional external_id. + * User reference in API responses: Fragment user id and external_id. */ export interface User { /** @@ -799,7 +799,7 @@ export namespace InvoiceRetrieveResponse { /** * External ID of the user */ - external_id?: string; + external_id: string; } } @@ -1879,7 +1879,7 @@ export namespace InvoiceSearchResponse { type: 'payin' | 'payout'; /** - * User reference in API responses: Fragment user id and optional external_id. + * User reference in API responses: Fragment user id and external_id. */ user: Payment.User; } @@ -1923,7 +1923,7 @@ export namespace InvoiceSearchResponse { } /** - * User reference in API responses: Fragment user id and optional external_id. + * User reference in API responses: Fragment user id and external_id. */ export interface User { /** @@ -1934,7 +1934,7 @@ export namespace InvoiceSearchResponse { /** * External ID of the user */ - external_id?: string; + external_id: string; } } diff --git a/src/resources/transactions.ts b/src/resources/transactions.ts index 13a6d1a..0ff520d 100644 --- a/src/resources/transactions.ts +++ b/src/resources/transactions.ts @@ -440,14 +440,14 @@ export namespace Transaction { type: 'invoice_payin' | 'invoice_payout'; /** - * User reference in API responses: Fragment user id and optional external_id. + * User reference in API responses: Fragment user id and external_id. */ user: Allocation.User; } export namespace Allocation { /** - * User reference in API responses: Fragment user id and optional external_id. + * User reference in API responses: Fragment user id and external_id. */ export interface User { /** @@ -458,7 +458,7 @@ export namespace Transaction { /** * External ID of the user */ - external_id?: string; + external_id: string; } } @@ -573,14 +573,14 @@ export namespace TransactionListHistoryResponse { type: 'invoice_payin' | 'invoice_payout'; /** - * User reference in API responses: Fragment user id and optional external_id. + * User reference in API responses: Fragment user id and external_id. */ user: Item.User; } export namespace Item { /** - * User reference in API responses: Fragment user id and optional external_id. + * User reference in API responses: Fragment user id and external_id. */ export interface User { /** @@ -591,7 +591,7 @@ export namespace TransactionListHistoryResponse { /** * External ID of the user */ - external_id?: string; + external_id: string; } } } @@ -629,14 +629,14 @@ export namespace TransactionListHistoryResponse { type: 'invoice_payin' | 'invoice_payout'; /** - * User reference in API responses: Fragment user id and optional external_id. + * User reference in API responses: Fragment user id and external_id. */ user: Item.User; } export namespace Item { /** - * User reference in API responses: Fragment user id and optional external_id. + * User reference in API responses: Fragment user id and external_id. */ export interface User { /** @@ -647,7 +647,7 @@ export namespace TransactionListHistoryResponse { /** * External ID of the user */ - external_id?: string; + external_id: string; } } } @@ -736,14 +736,14 @@ export namespace TransactionSearchResponse { type: 'invoice_payin' | 'invoice_payout'; /** - * User reference in API responses: Fragment user id and optional external_id. + * User reference in API responses: Fragment user id and external_id. */ user: Item.User; } export namespace Item { /** - * User reference in API responses: Fragment user id and optional external_id. + * User reference in API responses: Fragment user id and external_id. */ export interface User { /** @@ -754,7 +754,7 @@ export namespace TransactionSearchResponse { /** * External ID of the user */ - external_id?: string; + external_id: string; } } } @@ -792,14 +792,14 @@ export namespace TransactionSearchResponse { type: 'invoice_payin' | 'invoice_payout'; /** - * User reference in API responses: Fragment user id and optional external_id. + * User reference in API responses: Fragment user id and external_id. */ user: Item.User; } export namespace Item { /** - * User reference in API responses: Fragment user id and optional external_id. + * User reference in API responses: Fragment user id and external_id. */ export interface User { /** @@ -810,7 +810,7 @@ export namespace TransactionSearchResponse { /** * External ID of the user */ - external_id?: string; + external_id: string; } } } @@ -882,7 +882,7 @@ export namespace TransactionSearchAllocationsResponse { type: 'invoice_payin' | 'invoice_payout'; /** - * User reference in API responses: Fragment user id and optional external_id. + * User reference in API responses: Fragment user id and external_id. */ user: Data.User; } @@ -904,7 +904,7 @@ export namespace TransactionSearchAllocationsResponse { } /** - * User reference in API responses: Fragment user id and optional external_id. + * User reference in API responses: Fragment user id and external_id. */ export interface User { /** @@ -915,7 +915,7 @@ export namespace TransactionSearchAllocationsResponse { /** * External ID of the user */ - external_id?: string; + external_id: string; } } } From a6843ba30ed876c02ace9e0746986ee1ce0c6e93 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 16:44:58 +0000 Subject: [PATCH 02/11] feat(api): update SDK from prod (a5eb093078fe5947a299bccafd30a0c7f2e90790) --- .stats.yml | 4 +- src/resources/invoices.ts | 658 +--------------------------------- src/resources/transactions.ts | 317 +--------------- 3 files changed, 5 insertions(+), 974 deletions(-) diff --git a/.stats.yml b/.stats.yml index a4874a9..c7f89b5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-d9af2f7a25f1b257ad41d419f9a436f0bc0b3a3fc1dd70db7ca50845f58dfb4e.yml -openapi_spec_hash: 142080b0b3d94edee6efa27b8c37ea51 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-bd5f8e1bae80ccdcb630450411e3919da9a89a6045f7c56d44e80bf492bd6f03.yml +openapi_spec_hash: c373020f7be240137ee660bacb9703cb config_hash: afc05056f5a776aa1501387e38c4820e diff --git a/src/resources/invoices.ts b/src/resources/invoices.ts index d7d43a0..7aa8508 100644 --- a/src/resources/invoices.ts +++ b/src/resources/invoices.ts @@ -903,663 +903,7 @@ export interface InvoiceListResponse { * Version history of an invoice */ export interface InvoiceListHistoryResponse { - data: Array; -} - -export namespace InvoiceListHistoryResponse { - /** - * A versioned snapshot of an invoice - */ - export interface Data extends Omit { - /** - * Cumulative diff of changes applied to the invoice - */ - diff?: Array; - - /** - * Version number of this invoice snapshot - */ - version?: number; - } - - export namespace Data { - export interface AddDiffEntry { - /** - * Invoice line item object - */ - item: AddDiffEntry.Item; - - /** - * A line item was added - */ - op: 'add'; - } - - export namespace AddDiffEntry { - /** - * Invoice line item object - */ - export interface Item { - /** - * Unique identifier for the line item - */ - id: string; - - /** - * @deprecated Deprecated: use price.amount instead. Total amount in smallest - * currency unit (represented as string for bigint) - */ - amount: string; - - /** - * Currency code (ISO 4217 or crypto) - */ - currency_code: - | 'ADA' - | 'BTC' - | 'DAI' - | 'ETH' - | 'SOL' - | 'USDC' - | 'USDT' - | 'USDG' - | 'EURC' - | 'CADC' - | 'CADT' - | 'XLM' - | 'UNI' - | 'BCH' - | 'LTC' - | 'AAVE' - | 'LINK' - | 'MATIC' - | 'PTS' - | 'AED' - | 'AFN' - | 'ALL' - | 'AMD' - | 'ANG' - | 'AOA' - | 'ARS' - | 'AUD' - | 'AWG' - | 'AZN' - | 'BAM' - | 'BBD' - | 'BDT' - | 'BGN' - | 'BHD' - | 'BIF' - | 'BMD' - | 'BND' - | 'BOB' - | 'BRL' - | 'BSD' - | 'BTN' - | 'BWP' - | 'BYR' - | 'BZD' - | 'CAD' - | 'CDF' - | 'CHF' - | 'CLP' - | 'CNY' - | 'COP' - | 'CRC' - | 'CUC' - | 'CUP' - | 'CVE' - | 'CZK' - | 'DJF' - | 'DKK' - | 'DOP' - | 'DZD' - | 'EGP' - | 'ERN' - | 'ETB' - | 'EUR' - | 'FJD' - | 'FKP' - | 'GBP' - | 'GEL' - | 'GGP' - | 'GHS' - | 'GIP' - | 'GMD' - | 'GNF' - | 'GTQ' - | 'GYD' - | 'HKD' - | 'HNL' - | 'HRK' - | 'HTG' - | 'HUF' - | 'IDR' - | 'ILS' - | 'IMP' - | 'INR' - | 'IQD' - | 'IRR' - | 'ISK' - | 'JMD' - | 'JOD' - | 'JPY' - | 'KES' - | 'KGS' - | 'KHR' - | 'KMF' - | 'KPW' - | 'KRW' - | 'KWD' - | 'KYD' - | 'KZT' - | 'LAK' - | 'LBP' - | 'LKR' - | 'LRD' - | 'LSL' - | 'LYD' - | 'MAD' - | 'MDL' - | 'MGA' - | 'MKD' - | 'MMK' - | 'MNT' - | 'MOP' - | 'MUR' - | 'MVR' - | 'MWK' - | 'MXN' - | 'MYR' - | 'MZN' - | 'NAD' - | 'NGN' - | 'NIO' - | 'NOK' - | 'NPR' - | 'NZD' - | 'OMR' - | 'PAB' - | 'PEN' - | 'PGK' - | 'PHP' - | 'PKR' - | 'PLN' - | 'PYG' - | 'QAR' - | 'RON' - | 'RSD' - | 'RUB' - | 'RWF' - | 'SAR' - | 'SBD' - | 'SCR' - | 'SDG' - | 'SEK' - | 'SGD' - | 'SHP' - | 'SLL' - | 'SOS' - | 'SPL' - | 'SRD' - | 'SVC' - | 'SYP' - | 'STN' - | 'SZL' - | 'THB' - | 'TJS' - | 'TMT' - | 'TND' - | 'TOP' - | 'TRY' - | 'TTD' - | 'TVD' - | 'TWD' - | 'TZS' - | 'UAH' - | 'UGX' - | 'USD' - | 'UYU' - | 'UZS' - | 'VEF' - | 'VND' - | 'VUV' - | 'WST' - | 'XAF' - | 'XCD' - | 'XOF' - | 'XPF' - | 'YER' - | 'ZAR' - | 'ZMW' - | 'LOGICAL' - | 'CUSTOM'; - - /** - * Description of the line item - */ - description: string; - - /** - * Price breakdown containing amount, unit price, and quantity - */ - price: Item.Price; - - /** - * ID of the product/catalog item - */ - product_id: string; - - /** - * Metadata tags for this line item - */ - tags: Array; - - /** - * The type of the line item - */ - type: 'payin' | 'payout'; - - /** - * External ID of the user associated with this line item - */ - user_id: string; - } - - export namespace Item { - /** - * Price breakdown containing amount, unit price, and quantity - */ - export interface Price { - /** - * Total amount in smallest currency unit (represented as string for bigint) - */ - amount: string; - - /** - * Quantity of units for this line item - */ - quantity: number; - - /** - * Unit price in smallest currency unit (represented as string for bigint) - */ - unit_price: string; - } - - /** - * A key-value tag pair - */ - export interface Tag { - /** - * Tag key - */ - key: string; - - /** - * Tag value - */ - value: string; - } - } - } - - export interface UpdateDiffEntry { - /** - * ID of the updated line item - */ - id: string; - - /** - * @deprecated Deprecated: use new_price.amount instead. New amount after the - * update - */ - new_amount: string; - - /** - * Price breakdown containing amount, unit price, and quantity - */ - new_price: UpdateDiffEntry.NewPrice; - - /** - * @deprecated Deprecated: use old_price.amount instead. Amount before the update - */ - old_amount: string; - - /** - * Price breakdown containing amount, unit price, and quantity - */ - old_price: UpdateDiffEntry.OldPrice; - - /** - * A line item was updated - */ - op: 'update'; - } - - export namespace UpdateDiffEntry { - /** - * Price breakdown containing amount, unit price, and quantity - */ - export interface NewPrice { - /** - * Total amount in smallest currency unit (represented as string for bigint) - */ - amount: string; - - /** - * Quantity of units for this line item - */ - quantity: number; - - /** - * Unit price in smallest currency unit (represented as string for bigint) - */ - unit_price: string; - } - - /** - * Price breakdown containing amount, unit price, and quantity - */ - export interface OldPrice { - /** - * Total amount in smallest currency unit (represented as string for bigint) - */ - amount: string; - - /** - * Quantity of units for this line item - */ - quantity: number; - - /** - * Unit price in smallest currency unit (represented as string for bigint) - */ - unit_price: string; - } - } - - export interface DeleteDiffEntry { - /** - * Invoice line item object - */ - item: DeleteDiffEntry.Item; - - /** - * A line item was deleted - */ - op: 'delete'; - } - - export namespace DeleteDiffEntry { - /** - * Invoice line item object - */ - export interface Item { - /** - * Unique identifier for the line item - */ - id: string; - - /** - * @deprecated Deprecated: use price.amount instead. Total amount in smallest - * currency unit (represented as string for bigint) - */ - amount: string; - - /** - * Currency code (ISO 4217 or crypto) - */ - currency_code: - | 'ADA' - | 'BTC' - | 'DAI' - | 'ETH' - | 'SOL' - | 'USDC' - | 'USDT' - | 'USDG' - | 'EURC' - | 'CADC' - | 'CADT' - | 'XLM' - | 'UNI' - | 'BCH' - | 'LTC' - | 'AAVE' - | 'LINK' - | 'MATIC' - | 'PTS' - | 'AED' - | 'AFN' - | 'ALL' - | 'AMD' - | 'ANG' - | 'AOA' - | 'ARS' - | 'AUD' - | 'AWG' - | 'AZN' - | 'BAM' - | 'BBD' - | 'BDT' - | 'BGN' - | 'BHD' - | 'BIF' - | 'BMD' - | 'BND' - | 'BOB' - | 'BRL' - | 'BSD' - | 'BTN' - | 'BWP' - | 'BYR' - | 'BZD' - | 'CAD' - | 'CDF' - | 'CHF' - | 'CLP' - | 'CNY' - | 'COP' - | 'CRC' - | 'CUC' - | 'CUP' - | 'CVE' - | 'CZK' - | 'DJF' - | 'DKK' - | 'DOP' - | 'DZD' - | 'EGP' - | 'ERN' - | 'ETB' - | 'EUR' - | 'FJD' - | 'FKP' - | 'GBP' - | 'GEL' - | 'GGP' - | 'GHS' - | 'GIP' - | 'GMD' - | 'GNF' - | 'GTQ' - | 'GYD' - | 'HKD' - | 'HNL' - | 'HRK' - | 'HTG' - | 'HUF' - | 'IDR' - | 'ILS' - | 'IMP' - | 'INR' - | 'IQD' - | 'IRR' - | 'ISK' - | 'JMD' - | 'JOD' - | 'JPY' - | 'KES' - | 'KGS' - | 'KHR' - | 'KMF' - | 'KPW' - | 'KRW' - | 'KWD' - | 'KYD' - | 'KZT' - | 'LAK' - | 'LBP' - | 'LKR' - | 'LRD' - | 'LSL' - | 'LYD' - | 'MAD' - | 'MDL' - | 'MGA' - | 'MKD' - | 'MMK' - | 'MNT' - | 'MOP' - | 'MUR' - | 'MVR' - | 'MWK' - | 'MXN' - | 'MYR' - | 'MZN' - | 'NAD' - | 'NGN' - | 'NIO' - | 'NOK' - | 'NPR' - | 'NZD' - | 'OMR' - | 'PAB' - | 'PEN' - | 'PGK' - | 'PHP' - | 'PKR' - | 'PLN' - | 'PYG' - | 'QAR' - | 'RON' - | 'RSD' - | 'RUB' - | 'RWF' - | 'SAR' - | 'SBD' - | 'SCR' - | 'SDG' - | 'SEK' - | 'SGD' - | 'SHP' - | 'SLL' - | 'SOS' - | 'SPL' - | 'SRD' - | 'SVC' - | 'SYP' - | 'STN' - | 'SZL' - | 'THB' - | 'TJS' - | 'TMT' - | 'TND' - | 'TOP' - | 'TRY' - | 'TTD' - | 'TVD' - | 'TWD' - | 'TZS' - | 'UAH' - | 'UGX' - | 'USD' - | 'UYU' - | 'UZS' - | 'VEF' - | 'VND' - | 'VUV' - | 'WST' - | 'XAF' - | 'XCD' - | 'XOF' - | 'XPF' - | 'YER' - | 'ZAR' - | 'ZMW' - | 'LOGICAL' - | 'CUSTOM'; - - /** - * Description of the line item - */ - description: string; - - /** - * Price breakdown containing amount, unit price, and quantity - */ - price: Item.Price; - - /** - * ID of the product/catalog item - */ - product_id: string; - - /** - * Metadata tags for this line item - */ - tags: Array; - - /** - * The type of the line item - */ - type: 'payin' | 'payout'; - - /** - * External ID of the user associated with this line item - */ - user_id: string; - } - - export namespace Item { - /** - * Price breakdown containing amount, unit price, and quantity - */ - export interface Price { - /** - * Total amount in smallest currency unit (represented as string for bigint) - */ - amount: string; - - /** - * Quantity of units for this line item - */ - quantity: number; - - /** - * Unit price in smallest currency unit (represented as string for bigint) - */ - unit_price: string; - } - - /** - * A key-value tag pair - */ - export interface Tag { - /** - * Tag key - */ - key: string; - - /** - * Tag value - */ - value: string; - } - } - } - } + data: Array; } /** diff --git a/src/resources/transactions.ts b/src/resources/transactions.ts index 0ff520d..808f062 100644 --- a/src/resources/transactions.ts +++ b/src/resources/transactions.ts @@ -1,7 +1,6 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; -import * as TransactionsAPI from './transactions'; import { APIPromise } from '../core/api-promise'; import { RequestOptions } from '../internal/request-options'; import { path } from '../internal/utils/path'; @@ -517,326 +516,14 @@ export interface TransactionCreateAllocationsResponse { * Version history of a transaction */ export interface TransactionListHistoryResponse { - data: Array; -} - -export namespace TransactionListHistoryResponse { - /** - * A versioned snapshot of a transaction - */ - export interface Data extends Omit { - /** - * Allocation changes applied in this version. Absent on version 1 (initial - * creation). Each entry describes an allocation that was added or deleted. - */ - diff?: Array< - Data.AddAllocationDiffEntry | Data.DeleteAllocationDiffEntry | Data.UpdateAllocationDiffEntry - >; - - /** - * Version number of this transaction snapshot. - */ - version?: number; - } - - export namespace Data { - export interface AddAllocationDiffEntry { - /** - * Transaction allocation against an invoice. - */ - item: AddAllocationDiffEntry.Item; - - /** - * An allocation was added - */ - op: 'add'; - } - - export namespace AddAllocationDiffEntry { - /** - * Transaction allocation against an invoice. - */ - export interface Item { - /** - * Allocated amount in smallest currency unit as stringified bigint. - */ - amount: string; - - /** - * The invoice this allocation is applied against. - */ - invoice_id: string; - - /** - * The type of allocation. - */ - type: 'invoice_payin' | 'invoice_payout'; - - /** - * User reference in API responses: Fragment user id and external_id. - */ - user: Item.User; - } - - export namespace Item { - /** - * User reference in API responses: Fragment user id and external_id. - */ - export interface User { - /** - * FRAGMENT generated ID of the user - */ - id: string; - - /** - * External ID of the user - */ - external_id: string; - } - } - } - - export interface DeleteAllocationDiffEntry { - /** - * Transaction allocation against an invoice. - */ - item: DeleteAllocationDiffEntry.Item; - - /** - * An allocation was deleted - */ - op: 'delete'; - } - - export namespace DeleteAllocationDiffEntry { - /** - * Transaction allocation against an invoice. - */ - export interface Item { - /** - * Allocated amount in smallest currency unit as stringified bigint. - */ - amount: string; - - /** - * The invoice this allocation is applied against. - */ - invoice_id: string; - - /** - * The type of allocation. - */ - type: 'invoice_payin' | 'invoice_payout'; - - /** - * User reference in API responses: Fragment user id and external_id. - */ - user: Item.User; - } - - export namespace Item { - /** - * User reference in API responses: Fragment user id and external_id. - */ - export interface User { - /** - * FRAGMENT generated ID of the user - */ - id: string; - - /** - * External ID of the user - */ - external_id: string; - } - } - } - - export interface UpdateAllocationDiffEntry { - /** - * The ID of the updated allocation. - */ - id: string; - - /** - * New amount in smallest currency unit as stringified bigint. - */ - new_amount: string; - - /** - * Previous amount in smallest currency unit as stringified bigint. - */ - old_amount: string; - - /** - * An allocation was updated - */ - op: 'update'; - } - } + data: Array; } /** * Search results for transactions. */ export interface TransactionSearchResponse { - data: Array; -} - -export namespace TransactionSearchResponse { - /** - * A versioned snapshot of a transaction - */ - export interface Data extends Omit { - /** - * Allocation changes applied in this version. Absent on version 1 (initial - * creation). Each entry describes an allocation that was added or deleted. - */ - diff?: Array< - Data.AddAllocationDiffEntry | Data.DeleteAllocationDiffEntry | Data.UpdateAllocationDiffEntry - >; - - /** - * Version number of this transaction snapshot. - */ - version?: number; - } - - export namespace Data { - export interface AddAllocationDiffEntry { - /** - * Transaction allocation against an invoice. - */ - item: AddAllocationDiffEntry.Item; - - /** - * An allocation was added - */ - op: 'add'; - } - - export namespace AddAllocationDiffEntry { - /** - * Transaction allocation against an invoice. - */ - export interface Item { - /** - * Allocated amount in smallest currency unit as stringified bigint. - */ - amount: string; - - /** - * The invoice this allocation is applied against. - */ - invoice_id: string; - - /** - * The type of allocation. - */ - type: 'invoice_payin' | 'invoice_payout'; - - /** - * User reference in API responses: Fragment user id and external_id. - */ - user: Item.User; - } - - export namespace Item { - /** - * User reference in API responses: Fragment user id and external_id. - */ - export interface User { - /** - * FRAGMENT generated ID of the user - */ - id: string; - - /** - * External ID of the user - */ - external_id: string; - } - } - } - - export interface DeleteAllocationDiffEntry { - /** - * Transaction allocation against an invoice. - */ - item: DeleteAllocationDiffEntry.Item; - - /** - * An allocation was deleted - */ - op: 'delete'; - } - - export namespace DeleteAllocationDiffEntry { - /** - * Transaction allocation against an invoice. - */ - export interface Item { - /** - * Allocated amount in smallest currency unit as stringified bigint. - */ - amount: string; - - /** - * The invoice this allocation is applied against. - */ - invoice_id: string; - - /** - * The type of allocation. - */ - type: 'invoice_payin' | 'invoice_payout'; - - /** - * User reference in API responses: Fragment user id and external_id. - */ - user: Item.User; - } - - export namespace Item { - /** - * User reference in API responses: Fragment user id and external_id. - */ - export interface User { - /** - * FRAGMENT generated ID of the user - */ - id: string; - - /** - * External ID of the user - */ - external_id: string; - } - } - } - - export interface UpdateAllocationDiffEntry { - /** - * The ID of the updated allocation. - */ - id: string; - - /** - * New amount in smallest currency unit as stringified bigint. - */ - new_amount: string; - - /** - * Previous amount in smallest currency unit as stringified bigint. - */ - old_amount: string; - - /** - * An allocation was updated - */ - op: 'update'; - } - } + data: Array; } /** From b4893492a7003c791297067170805d88e1a08a72 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 17:52:23 +0000 Subject: [PATCH 03/11] fix(internal): gitignore generated `oidc` dir --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c85fe68..9487e48 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,4 @@ dist-deno /*.tgz .idea/ .eslintcache - +oidc From 99ffd26009fa316ca340db2e8e83155a970b2c62 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 20:20:36 +0000 Subject: [PATCH 04/11] feat(api): update SDK from prod (729db28098a20ebc22e879a2cd1c6ad860f9ce4c) --- .stats.yml | 8 +- api.md | 2 - src/client.ts | 4 - src/resources/index.ts | 2 - src/resources/invoices.ts | 52 ++++++++- src/resources/transactions.ts | 141 ++++------------------- tests/api-resources/invoices.test.ts | 6 +- tests/api-resources/transactions.test.ts | 42 +------ 8 files changed, 85 insertions(+), 172 deletions(-) diff --git a/.stats.yml b/.stats.yml index c7f89b5..d0b6146 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 23 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-bd5f8e1bae80ccdcb630450411e3919da9a89a6045f7c56d44e80bf492bd6f03.yml -openapi_spec_hash: c373020f7be240137ee660bacb9703cb -config_hash: afc05056f5a776aa1501387e38c4820e +configured_endpoints: 22 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-60daf02b324d50717c8ca7667f5b10b59be952cd10e241d1b0c4bc1480f0622e.yml +openapi_spec_hash: 42c18143f558432ff26fbcc94b8844ca +config_hash: e9de8e5044d45256185649ca63b8490f diff --git a/api.md b/api.md index c607b14..d6a3daa 100644 --- a/api.md +++ b/api.md @@ -69,7 +69,6 @@ Types: - TransactionRetrieveResponse - TransactionUpdateResponse - TransactionListResponse -- TransactionCreateAllocationsResponse - TransactionListHistoryResponse - TransactionSearchResponse - TransactionSearchAllocationsResponse @@ -80,7 +79,6 @@ Methods: - client.transactions.retrieve(transactionRef) -> TransactionRetrieveResponse - client.transactions.update(transactionRef, { ...params }) -> TransactionUpdateResponse - client.transactions.list({ ...params }) -> TransactionListResponse -- client.transactions.createAllocations(transactionRef, { ...params }) -> TransactionCreateAllocationsResponse - client.transactions.listHistory(transactionRef) -> TransactionListHistoryResponse - client.transactions.search({ ...params }) -> TransactionSearchResponse - client.transactions.searchAllocations({ ...params }) -> TransactionSearchAllocationsResponse diff --git a/src/client.ts b/src/client.ts index 5892552..db6c424 100644 --- a/src/client.ts +++ b/src/client.ts @@ -48,8 +48,6 @@ import { import { Role, RoleCreateParams, RoleCreateResponse, RoleListResponse, Roles } from './resources/roles'; import { Transaction, - TransactionCreateAllocationsParams, - TransactionCreateAllocationsResponse, TransactionCreateParams, TransactionCreateResponse, TransactionListHistoryResponse, @@ -919,14 +917,12 @@ export declare namespace Fragment { type TransactionRetrieveResponse as TransactionRetrieveResponse, type TransactionUpdateResponse as TransactionUpdateResponse, type TransactionListResponse as TransactionListResponse, - type TransactionCreateAllocationsResponse as TransactionCreateAllocationsResponse, type TransactionListHistoryResponse as TransactionListHistoryResponse, type TransactionSearchResponse as TransactionSearchResponse, type TransactionSearchAllocationsResponse as TransactionSearchAllocationsResponse, type TransactionCreateParams as TransactionCreateParams, type TransactionUpdateParams as TransactionUpdateParams, type TransactionListParams as TransactionListParams, - type TransactionCreateAllocationsParams as TransactionCreateAllocationsParams, type TransactionSearchParams as TransactionSearchParams, type TransactionSearchAllocationsParams as TransactionSearchAllocationsParams, }; diff --git a/src/resources/index.ts b/src/resources/index.ts index 504d4b1..0c7be81 100644 --- a/src/resources/index.ts +++ b/src/resources/index.ts @@ -42,14 +42,12 @@ export { type TransactionRetrieveResponse, type TransactionUpdateResponse, type TransactionListResponse, - type TransactionCreateAllocationsResponse, type TransactionListHistoryResponse, type TransactionSearchResponse, type TransactionSearchAllocationsResponse, type TransactionCreateParams, type TransactionUpdateParams, type TransactionListParams, - type TransactionCreateAllocationsParams, type TransactionSearchParams, type TransactionSearchAllocationsParams, } from './transactions'; diff --git a/src/resources/invoices.ts b/src/resources/invoices.ts index 7aa8508..f5cee96 100644 --- a/src/resources/invoices.ts +++ b/src/resources/invoices.ts @@ -2044,7 +2044,7 @@ export namespace InvoiceUpdateParams { export interface Tags { /** - * Tags to add + * Tags to add. Prefer `set` unless you specifically want create-only validation. */ create?: Array; @@ -2053,8 +2053,15 @@ export namespace InvoiceUpdateParams { */ delete?: Array; + /** + * Tags to create or overwrite without requiring the caller to distinguish between + * create and update. + */ + set?: Array; + /** * Tags to update. The key identifies the existing tag; the value is the new value. + * Prefer `set` unless you specifically want update-only validation. */ update?: Array; } @@ -2084,6 +2091,23 @@ export namespace InvoiceUpdateParams { key: string; } + /** + * A key-value tag pair for metadata + */ + export interface Set { + /** + * Tag key. Must be a valid safe string (no special characters like #, /, :). Max + * 50 characters. + */ + key: string; + + /** + * Tag value. Must be a valid safe string (no special characters like #, /, :). Max + * 200 characters. + */ + value: string; + } + /** * A key-value tag pair for metadata */ @@ -2106,7 +2130,7 @@ export namespace InvoiceUpdateParams { export interface Tags { /** - * Tags to add + * Tags to add. Prefer `set` unless you specifically want create-only validation. */ create?: Array; @@ -2115,8 +2139,15 @@ export namespace InvoiceUpdateParams { */ delete?: Array; + /** + * Tags to create or overwrite without requiring the caller to distinguish between + * create and update. + */ + set?: Array; + /** * Tags to update. The key identifies the existing tag; the value is the new value. + * Prefer `set` unless you specifically want update-only validation. */ update?: Array; } @@ -2146,6 +2177,23 @@ export namespace InvoiceUpdateParams { key: string; } + /** + * A key-value tag pair for metadata + */ + export interface Set { + /** + * Tag key. Must be a valid safe string (no special characters like #, /, :). Max + * 50 characters. + */ + key: string; + + /** + * Tag value. Must be a valid safe string (no special characters like #, /, :). Max + * 200 characters. + */ + value: string; + } + /** * A key-value tag pair for metadata */ diff --git a/src/resources/transactions.ts b/src/resources/transactions.ts index 808f062..801da42 100644 --- a/src/resources/transactions.ts +++ b/src/resources/transactions.ts @@ -83,37 +83,6 @@ export class Transactions extends APIResource { return this._client.get('/transactions', { query, ...options }); } - /** - * Updates allocations on an existing transaction - * - * @example - * ```ts - * const response = - * await client.transactions.createAllocations( - * 'txn_abc123', - * { - * allocation_updates: [ - * { - * amount: '1000', - * invoice_id: 'inv_abc123', - * op: 'add', - * type: 'invoice_payin', - * user: { id: 'user_abc123' }, - * }, - * ], - * version: 0, - * }, - * ); - * ``` - */ - createAllocations( - transactionRef: string, - body: TransactionCreateAllocationsParams, - options?: RequestOptions, - ): APIPromise { - return this._client.post(path`/transactions/${transactionRef}/allocations`, { body, ...options }); - } - /** * Gets the version history of a transaction * @@ -505,13 +474,6 @@ export interface TransactionListResponse { data: Array; } -export interface TransactionCreateAllocationsResponse { - /** - * Transaction object. - */ - data: Transaction; -} - /** * Version history of a transaction */ @@ -980,7 +942,7 @@ export namespace TransactionUpdateParams { export interface Tags { /** - * Tags to add + * Tags to add. Prefer `set` unless you specifically want create-only validation. */ create?: Array; @@ -989,8 +951,15 @@ export namespace TransactionUpdateParams { */ delete?: Array; + /** + * Tags to create or overwrite without requiring the caller to distinguish between + * create and update. + */ + set?: Array; + /** * Tags to update. The key identifies the existing tag; the value is the new value. + * Prefer `set` unless you specifically want update-only validation. */ update?: Array; } @@ -1020,6 +989,23 @@ export namespace TransactionUpdateParams { key: string; } + /** + * A key-value tag pair for metadata + */ + export interface Set { + /** + * Tag key. Must be a valid safe string (no special characters like #, /, :). Max + * 50 characters. + */ + key: string; + + /** + * Tag value. Must be a valid safe string (no special characters like #, /, :). Max + * 200 characters. + */ + value: string; + } + /** * A key-value tag pair for metadata */ @@ -1053,81 +1039,6 @@ export interface TransactionListParams { reconciliation_status?: 'reconciled' | 'unreconciled'; } -export interface TransactionCreateAllocationsParams { - /** - * Allocation operations to apply - */ - allocation_updates: Array< - | TransactionCreateAllocationsParams.AddAllocationOperation - | TransactionCreateAllocationsParams.DeleteAllocationOperation - >; - - /** - * Current transaction version for optimistic concurrency control - */ - version: number; -} - -export namespace TransactionCreateAllocationsParams { - /** - * Transaction allocation against an invoice. - */ - export interface AddAllocationOperation { - /** - * Amount to allocate in smallest currency unit as stringified bigint. - */ - amount: string; - - /** - * The invoice to allocate against. - */ - invoice_id: string; - - /** - * Add a new allocation - */ - op: 'add'; - - /** - * The type of allocation. - */ - type: 'invoice_payin' | 'invoice_payout'; - - /** - * Identifies a user by Fragment-generated id or external_id (request body). - */ - user: AddAllocationOperation.ID | AddAllocationOperation.ExternalID; - } - - export namespace AddAllocationOperation { - export interface ID { - /** - * FRAGMENT generated ID of the user - */ - id: string; - } - - export interface ExternalID { - /** - * External ID of the user - */ - external_id: string; - } - } - - export interface DeleteAllocationOperation { - /** - * The ID of the allocation to remove. - */ - id: string; - - /** - * Delete an allocation - */ - op: 'delete'; - } -} - export interface TransactionSearchParams { /** * Filter criteria for searching transactions. @@ -1202,14 +1113,12 @@ export declare namespace Transactions { type TransactionRetrieveResponse as TransactionRetrieveResponse, type TransactionUpdateResponse as TransactionUpdateResponse, type TransactionListResponse as TransactionListResponse, - type TransactionCreateAllocationsResponse as TransactionCreateAllocationsResponse, type TransactionListHistoryResponse as TransactionListHistoryResponse, type TransactionSearchResponse as TransactionSearchResponse, type TransactionSearchAllocationsResponse as TransactionSearchAllocationsResponse, type TransactionCreateParams as TransactionCreateParams, type TransactionUpdateParams as TransactionUpdateParams, type TransactionListParams as TransactionListParams, - type TransactionCreateAllocationsParams as TransactionCreateAllocationsParams, type TransactionSearchParams as TransactionSearchParams, type TransactionSearchAllocationsParams as TransactionSearchAllocationsParams, }; diff --git a/tests/api-resources/invoices.test.ts b/tests/api-resources/invoices.test.ts index 7cfbe6c..473215b 100644 --- a/tests/api-resources/invoices.test.ts +++ b/tests/api-resources/invoices.test.ts @@ -113,7 +113,8 @@ describe('resource invoices', () => { tags: { create: [{ key: 'region', value: 'us-east' }], delete: [{ key: 'key' }], - update: [{ key: 'region', value: 'eu-west-1' }], + set: [{ key: 'region', value: 'eu-west-1' }], + update: [{ key: 'region', value: 'us-east' }], }, }, ], @@ -121,7 +122,8 @@ describe('resource invoices', () => { tags: { create: [{ key: 'region', value: 'us-east' }], delete: [{ key: 'key' }], - update: [{ key: 'region', value: 'eu-west-1' }], + set: [{ key: 'region', value: 'eu-west-1' }], + update: [{ key: 'region', value: 'us-east' }], }, }); }); diff --git a/tests/api-resources/transactions.test.ts b/tests/api-resources/transactions.test.ts index 9286478..fc44282 100644 --- a/tests/api-resources/transactions.test.ts +++ b/tests/api-resources/transactions.test.ts @@ -97,7 +97,8 @@ describe('resource transactions', () => { tags: { create: [{ key: 'region', value: 'us-east' }], delete: [{ key: 'key' }], - update: [{ key: 'region', value: 'eu-west-1' }], + set: [{ key: 'region', value: 'eu-west-1' }], + update: [{ key: 'region', value: 'us-east' }], }, }); }); @@ -125,45 +126,6 @@ describe('resource transactions', () => { ).rejects.toThrow(Fragment.NotFoundError); }); - // Mock server tests are disabled - test.skip('createAllocations: only required params', async () => { - const responsePromise = client.transactions.createAllocations('txn_abc123', { - allocation_updates: [ - { - amount: '1000', - invoice_id: 'inv_abc123', - op: 'add', - type: 'invoice_payin', - user: { id: 'user_abc123' }, - }, - ], - version: 0, - }); - 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); - }); - - // Mock server tests are disabled - test.skip('createAllocations: required and optional params', async () => { - const response = await client.transactions.createAllocations('txn_abc123', { - allocation_updates: [ - { - amount: '1000', - invoice_id: 'inv_abc123', - op: 'add', - type: 'invoice_payin', - user: { id: 'user_abc123' }, - }, - ], - version: 0, - }); - }); - // Mock server tests are disabled test.skip('listHistory', async () => { const responsePromise = client.transactions.listHistory('txn_abc123'); From 484943a2f97b25aa4949d112a892884a03f28534 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 12:33:39 +0000 Subject: [PATCH 05/11] feat(api): update SDK from prod (511af1bcd4001be60c589fed1d05a5814e416679) --- .stats.yml | 4 ++-- src/resources/external-accounts.ts | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index d0b6146..4eeb19b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-60daf02b324d50717c8ca7667f5b10b59be952cd10e241d1b0c4bc1480f0622e.yml -openapi_spec_hash: 42c18143f558432ff26fbcc94b8844ca +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-2398fe7cbcc1f6d8c10d2e5557cd7543c2d82c32f1b6988fc9e86fdbddc3e2d8.yml +openapi_spec_hash: 4ae386787af2c8da5c2232f9e46c0764 config_hash: e9de8e5044d45256185649ca63b8490f diff --git a/src/resources/external-accounts.ts b/src/resources/external-accounts.ts index cd25721..955ce31 100644 --- a/src/resources/external-accounts.ts +++ b/src/resources/external-accounts.ts @@ -6,7 +6,7 @@ import { RequestOptions } from '../internal/request-options'; export class ExternalAccounts extends APIResource { /** - * Creates a new external account + * Creates a new external account. * * @example * ```ts @@ -25,7 +25,7 @@ export class ExternalAccounts extends APIResource { } /** - * Lists all external accounts for the workspace + * Lists all external accounts. * * @example * ```ts @@ -39,34 +39,34 @@ export class ExternalAccounts extends APIResource { } /** - * External account object + * External account object. */ export interface ExternalAccount { /** - * Fragment-generated unique ID for the external account + * FRAGMENT generated unique ID. */ id: string; /** - * User-provided external ID + * Unique user-provided external ID. */ external_id: string; /** - * Human-readable name for the external account + * Human-readable name. */ name: string; } export interface ExternalAccountCreateResponse { /** - * External account object + * External account object. */ data: ExternalAccount; } /** - * List of external accounts + * List of external accounts. */ export interface ExternalAccountListResponse { data: Array; @@ -74,12 +74,12 @@ export interface ExternalAccountListResponse { export interface ExternalAccountCreateParams { /** - * External ID for the account (user-provided, unique, mutable) + * Unique user-provided external ID. */ external_id: string; /** - * Human-readable name for the external account (mutable) + * Human-readable name. */ name: string; } From b0123c3ca8e5b901d945eca65808ff5948bb357b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 16:35:51 +0000 Subject: [PATCH 06/11] feat(api): update SDK from prod (b3080493fb6bb118abdd03644b9ef6f59d417a3c) --- .stats.yml | 6 +- src/resources/external-accounts.ts | 4 +- src/resources/invoices.ts | 407 +++++++++++++---------- src/resources/products.ts | 62 ++-- src/resources/roles.ts | 17 +- src/resources/transactions.ts | 214 ++++++------ src/resources/users.ts | 20 +- tests/api-resources/transactions.test.ts | 4 +- 8 files changed, 395 insertions(+), 339 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4eeb19b..50303e2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-2398fe7cbcc1f6d8c10d2e5557cd7543c2d82c32f1b6988fc9e86fdbddc3e2d8.yml -openapi_spec_hash: 4ae386787af2c8da5c2232f9e46c0764 -config_hash: e9de8e5044d45256185649ca63b8490f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-d1b5cc19383470227e1435e227958a95c540e527eaefb5fcc206d7f8b89bca69.yml +openapi_spec_hash: 1bf0e3c6be232b10ea36d85fb1aa22c5 +config_hash: 0bc054caf56d79dc6e95b7ad898419d1 diff --git a/src/resources/external-accounts.ts b/src/resources/external-accounts.ts index 955ce31..06be604 100644 --- a/src/resources/external-accounts.ts +++ b/src/resources/external-accounts.ts @@ -48,7 +48,7 @@ export interface ExternalAccount { id: string; /** - * Unique user-provided external ID. + * User-provided unique external ID. */ external_id: string; @@ -74,7 +74,7 @@ export interface ExternalAccountListResponse { export interface ExternalAccountCreateParams { /** - * Unique user-provided external ID. + * User-provided unique external ID. */ external_id: string; diff --git a/src/resources/invoices.ts b/src/resources/invoices.ts index f5cee96..0bc16f2 100644 --- a/src/resources/invoices.ts +++ b/src/resources/invoices.ts @@ -11,7 +11,7 @@ import { path } from '../internal/utils/path'; */ export class Invoices extends APIResource { /** - * Creates a new invoice + * Creates an invoice. * * @example * ```ts @@ -33,7 +33,7 @@ export class Invoices extends APIResource { } /** - * Gets an invoice by ID with balance details + * Fetches an invoice. * * @example * ```ts @@ -47,7 +47,7 @@ export class Invoices extends APIResource { } /** - * Updates an invoice + * Updates an invoice. * * @example * ```ts @@ -62,7 +62,7 @@ export class Invoices extends APIResource { } /** - * Lists all invoices for the workspace + * Lists all invoices. * * @example * ```ts @@ -74,7 +74,7 @@ export class Invoices extends APIResource { } /** - * Gets the version history of an invoice + * Gets the version history of an invoice. * * @example * ```ts @@ -88,7 +88,7 @@ export class Invoices extends APIResource { } /** - * Searches invoices + * Searches invoices. * * @example * ```ts @@ -104,47 +104,46 @@ export class Invoices extends APIResource { } /** - * Invoice object + * Invoice object. */ export interface Invoice { /** - * Unique identifier for the invoice + * Unique invoice ID. */ id: string; /** - * ISO 8601 timestamp when the invoice was created + * Timestamp when the invoice was created. Uses ISO 8601 format. */ created: string; /** - * @deprecated Deprecated: The status of the invoice + * @deprecated Status of the invoice. Deprecated. */ status: 'active'; /** - * Metadata tags for this invoice + * Tags for the invoice. */ tags: Array; /** - * The current version of the invoice. Pass this value when updating to ensure - * thread safety. + * Current version of the invoice. */ version: number; /** - * Workspace ID this invoice belongs to + * Workspace the invoice belongs to. */ workspace_id: string; /** - * List of line items associated with this invoice + * Line items for the invoice. */ line_items?: Array; /** - * ISO 8601 timestamp when the invoice was last modified + * Timestamp when the invoice was last modified. Uses ISO 8601 format. */ modified?: string; } @@ -155,33 +154,33 @@ export namespace Invoice { */ export interface Tag { /** - * Tag key + * Tag key. */ key: string; /** - * Tag value + * Tag value. */ value: string; } /** - * Invoice line item object + * Invoice line item. */ export interface LineItem { /** - * Unique identifier for the line item + * Unique invoice ID. */ id: string; /** - * @deprecated Deprecated: use price.amount instead. Total amount in smallest - * currency unit (represented as string for bigint) + * @deprecated Total amount as a string in the smallest unit of the currency (for + * example, cents for USD). Deprecated, use price.amount instead. */ amount: string; /** - * Currency code (ISO 4217 or crypto) + * Currency code (ISO 4217 or crypto). */ currency_code: | 'ADA' @@ -365,53 +364,55 @@ export namespace Invoice { | 'CUSTOM'; /** - * Description of the line item + * Description of the line item. */ description: string; /** - * Price breakdown containing amount, unit price, and quantity + * Price breakdown. */ price: LineItem.Price; /** - * ID of the product/catalog item + * Unique identifier for the product. */ product_id: string; /** - * Metadata tags for this line item + * Tags for the line item. */ tags: Array; /** - * The type of the line item + * Type of the line item. */ type: 'payin' | 'payout'; /** - * External ID of the user associated with this line item + * User-provided unique external ID. */ user_id: string; } export namespace LineItem { /** - * Price breakdown containing amount, unit price, and quantity + * Price breakdown. */ export interface Price { /** - * Total amount in smallest currency unit (represented as string for bigint) + * Total amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ amount: string; /** - * Quantity of units for this line item + * Number of units. */ quantity: number; /** - * Unit price in smallest currency unit (represented as string for bigint) + * Unit price as a string in the smallest unit of the currency (for example, cents + * for USD). */ unit_price: string; } @@ -421,12 +422,12 @@ export namespace Invoice { */ export interface Tag { /** - * Tag key + * Tag key. */ key: string; /** - * Tag value + * Tag value. */ value: string; } @@ -435,35 +436,35 @@ export namespace Invoice { export interface InvoiceCreateResponse { /** - * Invoice object + * Invoice object. */ data: Invoice; } export interface InvoiceRetrieveResponse { /** - * Invoice with balance details + * Invoice with balance details. */ data: InvoiceRetrieveResponse.Data; } export namespace InvoiceRetrieveResponse { /** - * Invoice with balance details + * Invoice with balance details. */ export interface Data extends InvoicesAPI.Invoice { /** - * Invoice-level balances by currency: payins, payouts, and net (payins - payouts) + * Invoice-level balances by currency. */ balances: Array; /** - * Transaction allocations (payments) associated with this invoice. + * Payments allocated to the invoice. */ payments: Array; /** - * Users/parties involved in the invoice + * Users involved in the invoice. */ users: Array; } @@ -471,7 +472,7 @@ export namespace InvoiceRetrieveResponse { export namespace Data { export interface Balance { /** - * Currency code + * Currency code (ISO 4217 or crypto). */ currency: string; @@ -485,67 +486,77 @@ export namespace InvoiceRetrieveResponse { export namespace Balance { export interface Net { /** - * Actual amount (represented as string) + * Actual amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ actual: string; /** - * Expected amount (represented as string) + * Expected amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ expected: string; /** - * Remaining amount (expected - actual, represented as string) + * Remaining amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ remaining: string; } export interface Payins { /** - * Actual amount (represented as string) + * Actual amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ actual: string; /** - * Expected amount (represented as string) + * Expected amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ expected: string; /** - * Remaining amount (expected - actual, represented as string) + * Remaining amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ remaining: string; } export interface Payouts { /** - * Actual amount (represented as string) + * Actual amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ actual: string; /** - * Expected amount (represented as string) + * Expected amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ expected: string; /** - * Remaining amount (expected - actual, represented as string) + * Remaining amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ remaining: string; } } /** - * A payment allocated to this invoice. + * A payment allocated to the invoice. */ export interface Payment { /** - * Amount allocated in smallest currency unit as stringified bigint. + * Amount allocated as a string in the smallest unit of the currency (for example, + * cents for USD). */ amount: string; /** - * Currency code (ISO 4217 or crypto) + * Currency code (ISO 4217 or crypto). */ currency: | 'ADA' @@ -729,43 +740,43 @@ export namespace InvoiceRetrieveResponse { | 'CUSTOM'; /** - * Posted timestamp of the parent transaction in ISO 8601 format. + * Timestamp when the parent transaction was posted. Uses ISO 8601 format. */ posted: string; /** - * Reference to a transaction by encoded ID and external ID. + * Transaction reference. */ transaction: Payment.Transaction; /** - * The type of the payment. + * Type of the payment. */ type: 'payin' | 'payout'; /** - * User reference in API responses: Fragment user id and external_id. + * User reference. */ user: Payment.User; } export namespace Payment { /** - * Reference to a transaction by encoded ID and external ID. + * Transaction reference. */ export interface Transaction { /** - * Encoded transaction ID. + * FRAGMENT generated unique ID. */ id: string; /** - * External transaction ID. + * Unique user-provided external ID for the transaction. */ external_id: string; /** - * Metadata tags from the parent transaction. + * Tags from the parent transaction. */ tags: Array; } @@ -776,28 +787,28 @@ export namespace InvoiceRetrieveResponse { */ export interface Tag { /** - * Tag key + * Tag key. */ key: string; /** - * Tag value + * Tag value. */ value: string; } } /** - * User reference in API responses: Fragment user id and external_id. + * User reference. */ export interface User { /** - * FRAGMENT generated ID of the user + * FRAGMENT generated unique ID. */ id: string; /** - * External ID of the user + * User-provided unique external ID. */ external_id: string; } @@ -805,12 +816,12 @@ export namespace InvoiceRetrieveResponse { export interface User { /** - * User/party ID + * User-provided unique external ID. */ id: string; /** - * Per-currency balance breakdown for this user + * Per-currency balance breakdown for the user. */ balances: Array; } @@ -818,7 +829,7 @@ export namespace InvoiceRetrieveResponse { export namespace User { export interface Balance { /** - * Currency code + * Currency code (ISO 4217 or crypto). */ currency: string; @@ -832,51 +843,60 @@ export namespace InvoiceRetrieveResponse { export namespace Balance { export interface Net { /** - * Actual amount (represented as string) + * Actual amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ actual: string; /** - * Expected amount (represented as string) + * Expected amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ expected: string; /** - * Remaining amount (expected - actual, represented as string) + * Remaining amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ remaining: string; } export interface Payins { /** - * Actual amount (represented as string) + * Actual amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ actual: string; /** - * Expected amount (represented as string) + * Expected amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ expected: string; /** - * Remaining amount (expected - actual, represented as string) + * Remaining amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ remaining: string; } export interface Payouts { /** - * Actual amount (represented as string) + * Actual amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ actual: string; /** - * Expected amount (represented as string) + * Expected amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ expected: string; /** - * Remaining amount (expected - actual, represented as string) + * Remaining amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ remaining: string; } @@ -887,27 +907,27 @@ export namespace InvoiceRetrieveResponse { export interface InvoiceUpdateResponse { /** - * Invoice object + * Invoice object. */ data: Invoice; } -/** - * List of invoices - */ export interface InvoiceListResponse { + /** + * List of invoices. + */ data: Array; } -/** - * Version history of an invoice - */ export interface InvoiceListHistoryResponse { + /** + * Version history of the invoice. + */ data: Array; } /** - * Response body for searching invoices + * Search results for invoices. */ export interface InvoiceSearchResponse { data: InvoiceSearchResponse.Data; @@ -916,7 +936,7 @@ export interface InvoiceSearchResponse { export namespace InvoiceSearchResponse { export interface Data { /** - * List of invoices matching the search criteria + * Invoices matching the search criteria. */ invoices: Array; @@ -928,21 +948,21 @@ export namespace InvoiceSearchResponse { export namespace Data { /** - * Invoice with balance details + * Invoice with balance details. */ export interface Invoice extends InvoicesAPI.Invoice { /** - * Invoice-level balances by currency: payins, payouts, and net (payins - payouts) + * Invoice-level balances by currency. */ balances: Array; /** - * Transaction allocations (payments) associated with this invoice. + * Payments allocated to the invoice. */ payments: Array; /** - * Users/parties involved in the invoice + * Users involved in the invoice. */ users: Array; } @@ -950,7 +970,7 @@ export namespace InvoiceSearchResponse { export namespace Invoice { export interface Balance { /** - * Currency code + * Currency code (ISO 4217 or crypto). */ currency: string; @@ -964,67 +984,77 @@ export namespace InvoiceSearchResponse { export namespace Balance { export interface Net { /** - * Actual amount (represented as string) + * Actual amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ actual: string; /** - * Expected amount (represented as string) + * Expected amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ expected: string; /** - * Remaining amount (expected - actual, represented as string) + * Remaining amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ remaining: string; } export interface Payins { /** - * Actual amount (represented as string) + * Actual amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ actual: string; /** - * Expected amount (represented as string) + * Expected amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ expected: string; /** - * Remaining amount (expected - actual, represented as string) + * Remaining amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ remaining: string; } export interface Payouts { /** - * Actual amount (represented as string) + * Actual amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ actual: string; /** - * Expected amount (represented as string) + * Expected amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ expected: string; /** - * Remaining amount (expected - actual, represented as string) + * Remaining amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ remaining: string; } } /** - * A payment allocated to this invoice. + * A payment allocated to the invoice. */ export interface Payment { /** - * Amount allocated in smallest currency unit as stringified bigint. + * Amount allocated as a string in the smallest unit of the currency (for example, + * cents for USD). */ amount: string; /** - * Currency code (ISO 4217 or crypto) + * Currency code (ISO 4217 or crypto). */ currency: | 'ADA' @@ -1208,43 +1238,43 @@ export namespace InvoiceSearchResponse { | 'CUSTOM'; /** - * Posted timestamp of the parent transaction in ISO 8601 format. + * Timestamp when the parent transaction was posted. Uses ISO 8601 format. */ posted: string; /** - * Reference to a transaction by encoded ID and external ID. + * Transaction reference. */ transaction: Payment.Transaction; /** - * The type of the payment. + * Type of the payment. */ type: 'payin' | 'payout'; /** - * User reference in API responses: Fragment user id and external_id. + * User reference. */ user: Payment.User; } export namespace Payment { /** - * Reference to a transaction by encoded ID and external ID. + * Transaction reference. */ export interface Transaction { /** - * Encoded transaction ID. + * FRAGMENT generated unique ID. */ id: string; /** - * External transaction ID. + * Unique user-provided external ID for the transaction. */ external_id: string; /** - * Metadata tags from the parent transaction. + * Tags from the parent transaction. */ tags: Array; } @@ -1255,28 +1285,28 @@ export namespace InvoiceSearchResponse { */ export interface Tag { /** - * Tag key + * Tag key. */ key: string; /** - * Tag value + * Tag value. */ value: string; } } /** - * User reference in API responses: Fragment user id and external_id. + * User reference. */ export interface User { /** - * FRAGMENT generated ID of the user + * FRAGMENT generated unique ID. */ id: string; /** - * External ID of the user + * User-provided unique external ID. */ external_id: string; } @@ -1284,12 +1314,12 @@ export namespace InvoiceSearchResponse { export interface User { /** - * User/party ID + * User-provided unique external ID. */ id: string; /** - * Per-currency balance breakdown for this user + * Per-currency balance breakdown for the user. */ balances: Array; } @@ -1297,7 +1327,7 @@ export namespace InvoiceSearchResponse { export namespace User { export interface Balance { /** - * Currency code + * Currency code (ISO 4217 or crypto). */ currency: string; @@ -1311,51 +1341,60 @@ export namespace InvoiceSearchResponse { export namespace Balance { export interface Net { /** - * Actual amount (represented as string) + * Actual amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ actual: string; /** - * Expected amount (represented as string) + * Expected amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ expected: string; /** - * Remaining amount (expected - actual, represented as string) + * Remaining amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ remaining: string; } export interface Payins { /** - * Actual amount (represented as string) + * Actual amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ actual: string; /** - * Expected amount (represented as string) + * Expected amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ expected: string; /** - * Remaining amount (expected - actual, represented as string) + * Remaining amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ remaining: string; } export interface Payouts { /** - * Actual amount (represented as string) + * Actual amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ actual: string; /** - * Expected amount (represented as string) + * Expected amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ expected: string; /** - * Remaining amount (expected - actual, represented as string) + * Remaining amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ remaining: string; } @@ -1368,7 +1407,7 @@ export namespace InvoiceSearchResponse { */ export interface PageInfo { /** - * Cursor to fetch the next page of results + * Cursor to fetch the next page of results. */ next_cursor?: string; } @@ -1377,18 +1416,17 @@ export namespace InvoiceSearchResponse { export interface InvoiceCreateParams { /** - * Unique identifier for the invoice. Make this the canonical ID from your system - * for the transaction. + * Unique ID for the invoice. */ invoice_id: string; /** - * List of line items to create with the invoice + * Line items to create with the invoice. */ line_items: Array; /** - * Optional metadata tags for this invoice + * Tags for the invoice. */ tags?: Array; } @@ -1399,33 +1437,33 @@ export namespace InvoiceCreateParams { */ export interface LineItem { /** - * Description of the line item + * Description of the line item. */ description: string; /** - * ID of the product/catalog item + * Unique identifier for the product. */ product_id: string; /** - * The type of the line item + * Type of the line item. */ type: 'payin' | 'payout'; /** - * Identifies a user by Fragment-generated id or external_id (request body). + * Identifies a user by `id` or `external_id`. */ user: LineItem.ID | LineItem.ExternalID; /** - * @deprecated Deprecated: use price instead. Total amount in smallest currency - * unit. + * @deprecated Total amount as a string in the smallest unit of the currency (for + * example, cents for USD). Deprecated, use price instead. */ amount?: string; /** - * Currency code (ISO 4217 or crypto) + * Currency code (ISO 4217 or crypto). */ currency_code?: | 'ADA' @@ -1609,12 +1647,12 @@ export namespace InvoiceCreateParams { | 'CUSTOM'; /** - * Price breakdown. Provide amount, or unit_price + quantity, or all three. + * Price breakdown. Provide amount, or unit_price and quantity, or all three. */ price?: LineItem.Price; /** - * Optional metadata tags for this line item + * Tags for the line item. */ tags?: Array; } @@ -1622,35 +1660,36 @@ export namespace InvoiceCreateParams { export namespace LineItem { export interface ID { /** - * FRAGMENT generated ID of the user + * FRAGMENT generated unique ID. */ id: string; } export interface ExternalID { /** - * External ID of the user + * User-provided unique external ID. */ external_id: string; } /** - * Price breakdown. Provide amount, or unit_price + quantity, or all three. + * Price breakdown. Provide amount, or unit_price and quantity, or all three. */ export interface Price { /** - * Total amount in smallest currency unit. Required if unit_price and quantity are - * not provided. + * Total amount as a string in the smallest unit of the currency (for example, + * cents for USD). Required if unit_price and quantity are not provided. */ amount?: string; /** - * Number of units for this line item. + * Number of units for the line item. */ quantity?: number; /** - * Price per unit in smallest currency unit. + * Price per unit as a string in the smallest unit of the currency (for example, + * cents for USD). */ unit_price?: string; } @@ -1693,8 +1732,7 @@ export namespace InvoiceCreateParams { export interface InvoiceUpdateParams { /** - * The current version of the invoice. Must match the stored version for the update - * to succeed (optimistic concurrency). + * Current version of the invoice. Must match the stored version. */ current_invoice_version: number; @@ -1706,17 +1744,17 @@ export interface InvoiceUpdateParams { export namespace InvoiceUpdateParams { export interface LineItems { /** - * Line items to add to the invoice + * Line items to add to the invoice. */ create?: Array; /** - * Line items to remove from the invoice + * Line items to remove from the invoice. */ delete?: Array; /** - * Existing line items to update + * Existing line items to update. */ update?: Array; } @@ -1727,33 +1765,33 @@ export namespace InvoiceUpdateParams { */ export interface Create { /** - * Description of the line item + * Description of the line item. */ description: string; /** - * ID of the product/catalog item + * Unique identifier for the product. */ product_id: string; /** - * The type of the line item + * Type of the line item. */ type: 'payin' | 'payout'; /** - * Identifies a user by Fragment-generated id or external_id (request body). + * Identifies a user by `id` or `external_id`. */ user: Create.ID | Create.ExternalID; /** - * @deprecated Deprecated: use price instead. Total amount in smallest currency - * unit. + * @deprecated Total amount as a string in the smallest unit of the currency (for + * example, cents for USD). Deprecated, use price instead. */ amount?: string; /** - * Currency code (ISO 4217 or crypto) + * Currency code (ISO 4217 or crypto). */ currency_code?: | 'ADA' @@ -1937,12 +1975,12 @@ export namespace InvoiceUpdateParams { | 'CUSTOM'; /** - * Price breakdown. Provide amount, or unit_price + quantity, or all three. + * Price breakdown. Provide amount, or unit_price and quantity, or all three. */ price?: Create.Price; /** - * Optional metadata tags for this line item + * Tags for the line item. */ tags?: Array; } @@ -1950,35 +1988,36 @@ export namespace InvoiceUpdateParams { export namespace Create { export interface ID { /** - * FRAGMENT generated ID of the user + * FRAGMENT generated unique ID. */ id: string; } export interface ExternalID { /** - * External ID of the user + * User-provided unique external ID. */ external_id: string; } /** - * Price breakdown. Provide amount, or unit_price + quantity, or all three. + * Price breakdown. Provide amount, or unit_price and quantity, or all three. */ export interface Price { /** - * Total amount in smallest currency unit. Required if unit_price and quantity are - * not provided. + * Total amount as a string in the smallest unit of the currency (for example, + * cents for USD). Required if unit_price and quantity are not provided. */ amount?: string; /** - * Number of units for this line item. + * Number of units for the line item. */ quantity?: number; /** - * Price per unit in smallest currency unit. + * Price per unit as a string in the smallest unit of the currency (for example, + * cents for USD). */ unit_price?: string; } @@ -2003,17 +2042,17 @@ export namespace InvoiceUpdateParams { export interface Delete { /** - * ID of the line item to delete + * Unique identifier for the line item to delete. */ id: string; } /** - * Partial update for an existing line item. All fields except id are optional. + * Updates an existing line item. */ export interface Update { /** - * ID of the line item to update + * Unique identifier for the line item to update. */ id: string; @@ -2027,17 +2066,19 @@ export namespace InvoiceUpdateParams { export namespace Update { export interface Price { /** - * Number of units for this line item. + * Number of units for the line item. */ quantity: number; /** - * Price per unit in smallest currency unit. + * Price per unit as a string in the smallest unit of the currency (for example, + * cents for USD). */ unit_price: string; /** - * Total amount in smallest currency unit. + * Total amount as a string in the smallest unit of the currency (for example, + * cents for USD). */ amount?: string; } @@ -2049,7 +2090,7 @@ export namespace InvoiceUpdateParams { create?: Array; /** - * Tags to remove by key + * Tags to remove by key. */ delete?: Array; @@ -2135,7 +2176,7 @@ export namespace InvoiceUpdateParams { create?: Array; /** - * Tags to remove by key + * Tags to remove by key. */ delete?: Array; @@ -2215,7 +2256,7 @@ export namespace InvoiceUpdateParams { export interface InvoiceSearchParams { /** - * Filter criteria for the search + * Filter criteria for the search. */ filter: InvoiceSearchParams.Filter; @@ -2227,7 +2268,7 @@ export interface InvoiceSearchParams { export namespace InvoiceSearchParams { /** - * Filter criteria for the search + * Filter criteria for the search. */ export interface Filter { /** @@ -2302,7 +2343,7 @@ export namespace InvoiceSearchParams { */ export interface PageInfo { /** - * Cursor for fetching the next page of results + * Cursor for fetching the next page of results. */ after?: string; diff --git a/src/resources/products.ts b/src/resources/products.ts index cf063a8..ac8c9fa 100644 --- a/src/resources/products.ts +++ b/src/resources/products.ts @@ -10,7 +10,7 @@ import { path } from '../internal/utils/path'; */ export class Products extends APIResource { /** - * Creates a new product + * Creates a new product. * * @example * ```ts @@ -24,7 +24,7 @@ export class Products extends APIResource { } /** - * Gets a product by code + * Gets a product by code. * * @example * ```ts @@ -36,7 +36,7 @@ export class Products extends APIResource { } /** - * Lists all products for the workspace + * Lists all products. * * @example * ```ts @@ -49,46 +49,46 @@ export class Products extends APIResource { } /** - * Product object + * Product object. */ export interface Product { /** - * Unique identifier for the product + * FRAGMENT generated unique ID. */ id: string; /** - * User-defined product identifier. + * Product code. */ code: string; /** - * ISO 8601 timestamp when the product was created + * Timestamp when the product was created. Uses ISO 8601 format. */ created: string; /** - * User roles that can pay for this product + * Roles that can pay for the product. */ paid_by_roles: Array; /** - * User roles that receive payment for this product + * Roles that can receive payment for the product. */ paid_to_roles: Array; /** - * Version number for optimistic locking + * Current version of the product. */ update_version: number; /** - * Workspace ID this product belongs to + * Workspace ID of the product. */ workspace_id: string; /** - * Description of the product + * Product description. */ description?: string; } @@ -99,12 +99,12 @@ export namespace Product { */ export interface PaidByRole { /** - * The unique ID of the role + * FRAGMENT generated unique ID. */ id: string; /** - * The name of the role + * Name of the role. */ name: string; } @@ -114,12 +114,12 @@ export namespace Product { */ export interface PaidToRole { /** - * The unique ID of the role + * FRAGMENT generated unique ID. */ id: string; /** - * The name of the role + * Name of the role. */ name: string; } @@ -127,45 +127,45 @@ export namespace Product { export interface ProductCreateResponse { /** - * Product object + * Product object. */ data: Product; } export interface ProductRetrieveResponse { /** - * Product object + * Product object. */ data: Product; } -/** - * List of products - */ export interface ProductListResponse { + /** + * List of products. + */ data: Array; } export interface ProductCreateParams { /** - * Product code (unique identifier) + * Unique product code. */ code: string; /** - * Description of the product + * Product description. */ description?: string; /** - * Roles that can pay for this product. Reference roles by id or name. At least one - * of paid_by_roles or paid_to_roles must be provided. + * Roles that can pay for the product. Reference roles by `id` or `name`. At least + * one of `paid_by_roles` or `paid_to_roles` must be provided. */ paid_by_roles?: Array; /** - * Roles that receive payment for this product. Reference roles by id or name. At - * least one of paid_by_roles or paid_to_roles must be provided. + * Roles that can receive payment for the product. Reference roles by `id` or + * `name`. At least one of `paid_by_roles` or `paid_to_roles` must be provided. */ paid_to_roles?: Array; } @@ -173,28 +173,28 @@ export interface ProductCreateParams { export namespace ProductCreateParams { export interface ID { /** - * The unique ID of the role + * FRAGMENT generated unique ID. */ id: string; } export interface Name { /** - * The name of the role + * Name of the role. */ name: string; } export interface ID { /** - * The unique ID of the role + * FRAGMENT generated unique ID. */ id: string; } export interface Name { /** - * The name of the role + * Name of the role. */ name: string; } diff --git a/src/resources/roles.ts b/src/resources/roles.ts index b9b9730..52ae1d1 100644 --- a/src/resources/roles.ts +++ b/src/resources/roles.ts @@ -9,7 +9,7 @@ import { RequestOptions } from '../internal/request-options'; */ export class Roles extends APIResource { /** - * Creates a new role + * Creates a new role. * * @example * ```ts @@ -21,7 +21,7 @@ export class Roles extends APIResource { } /** - * Lists all roles for the workspace + * Lists all roles. * * @example * ```ts @@ -34,23 +34,23 @@ export class Roles extends APIResource { } /** - * Role object + * Role object. */ export interface Role { /** - * Unique role ID + * FRAGMENT generated unique ID. */ id: string; /** - * Name of the role + * Name of the role. */ role: string; } export interface RoleCreateResponse { /** - * Role object + * Role object. */ data: Role; } @@ -59,12 +59,15 @@ export interface RoleCreateResponse { * List of roles */ export interface RoleListResponse { + /** + * List of roles. + */ data: Array; } export interface RoleCreateParams { /** - * Name of the role + * Name of the role. */ role: string; } diff --git a/src/resources/transactions.ts b/src/resources/transactions.ts index 801da42..92f1150 100644 --- a/src/resources/transactions.ts +++ b/src/resources/transactions.ts @@ -10,7 +10,7 @@ import { path } from '../internal/utils/path'; */ export class Transactions extends APIResource { /** - * Syncs a transaction, optionally with allocations + * Creates a transaction. * * @example * ```ts @@ -27,7 +27,7 @@ export class Transactions extends APIResource { * amount: '-1000', * currency: 'USD', * external_id: 'bank_txn_123', - * posted: '2026-02-12T00:00:00.000Z', + * posted: '2024-01-13T00:00:00Z', * }); * ``` */ @@ -36,7 +36,7 @@ export class Transactions extends APIResource { } /** - * Gets a transaction by ID or external ID + * Fetches a transaction by ID or external ID. * * @example * ```ts @@ -50,7 +50,7 @@ export class Transactions extends APIResource { } /** - * Updates a transaction (tags, allocations, or both) + * Updates a transaction. * * @example * ```ts @@ -69,7 +69,7 @@ export class Transactions extends APIResource { } /** - * Lists all transactions for the workspace + * Lists all transactions. * * @example * ```ts @@ -84,7 +84,7 @@ export class Transactions extends APIResource { } /** - * Gets the version history of a transaction + * Gets the version history of a transaction. * * @example * ```ts @@ -98,7 +98,7 @@ export class Transactions extends APIResource { } /** - * Searches transactions by filter criteria + * Searches transactions. * * @example * ```ts @@ -112,7 +112,7 @@ export class Transactions extends APIResource { } /** - * Searches transaction allocations by filter criteria + * Searches transaction allocations. * * @example * ```ts @@ -135,30 +135,33 @@ export class Transactions extends APIResource { */ export interface Transaction { /** - * User-facing encoded transaction ID. + * FRAGMENT generated unique ID. */ id: string; /** - * External account reference on transaction responses. + * External account for the transaction. */ account: Transaction.Account; + /** + * Allocations applied to the transaction. + */ allocations: Array; /** - * Amount in smallest currency unit as stringified bigint (can be positive or - * negative). + * Transaction amount, as a string in the smallest unit of the currency (for + * example, cents for USD). Can be positive or negative. */ amount: string; /** - * Creation timestamp. + * Timestamp when the transaction was created. Uses ISO 8601 format. */ created: string; /** - * Currency code (ISO 4217 or crypto) + * Currency code (ISO 4217 or crypto). */ currency: | 'ADA' @@ -342,89 +345,90 @@ export interface Transaction { | 'CUSTOM'; /** - * External idempotency key provided by the user. + * Unique user-provided external ID for the transaction. */ external_id: string; /** - * Posted timestamp in ISO 8601 format. + * Timestamp when the transaction was posted. Uses ISO 8601 format. */ posted: string; /** - * Metadata tags associated with this transaction. + * Tags for the transaction. */ tags: Array; /** - * Read-only amount not yet allocated. + * Amount not yet allocated, as a string. */ unallocated_amount: string; /** - * Current version of the transaction, used for optimistic concurrency control. + * Current version of the transaction. */ version: number; /** - * Last modified timestamp. + * Timestamp when the transaction was last modified. Uses ISO 8601 format. */ modified?: string; } export namespace Transaction { /** - * External account reference on transaction responses. + * External account for the transaction. */ export interface Account { /** - * User-facing encoded account ID. + * FRAGMENT generated unique ID. */ id: string; /** - * External account reference ID. + * Unique user-provided external ID for the external account. */ external_id: string; } /** - * Transaction allocation against an invoice. + * An allocation linking a transaction to an invoice. */ export interface Allocation { /** - * Allocated amount in smallest currency unit as stringified bigint. + * Allocated amount, as a positive string in the smallest unit of the currency (for + * example, cents for USD). */ amount: string; /** - * The invoice this allocation is applied against. + * Invoice the allocation is applied against. */ invoice_id: string; /** - * The type of allocation. + * Type of allocation. */ type: 'invoice_payin' | 'invoice_payout'; /** - * User reference in API responses: Fragment user id and external_id. + * User reference. */ user: Allocation.User; } export namespace Allocation { /** - * User reference in API responses: Fragment user id and external_id. + * User reference. */ export interface User { /** - * FRAGMENT generated ID of the user + * FRAGMENT generated unique ID. */ id: string; /** - * External ID of the user + * User-provided unique external ID. */ external_id: string; } @@ -435,12 +439,12 @@ export namespace Transaction { */ export interface Tag { /** - * Tag key + * Tag key. */ key: string; /** - * Tag value + * Tag value. */ value: string; } @@ -467,102 +471,103 @@ export interface TransactionUpdateResponse { data: Transaction; } -/** - * List of transactions - */ export interface TransactionListResponse { + /** + * List of transaction objects matching the filter criteria. + */ data: Array; } -/** - * Version history of a transaction - */ export interface TransactionListHistoryResponse { + /** + * List of transaction versions over time, ordered by version, oldest first. + */ data: Array; } -/** - * Search results for transactions. - */ export interface TransactionSearchResponse { + /** + * List of transaction search results. + */ data: Array; } -/** - * Search results for transaction allocations. - */ export interface TransactionSearchAllocationsResponse { + /** + * List of allocation search results. + */ data: Array; } export namespace TransactionSearchAllocationsResponse { /** - * A flattened allocation with a reference to its parent transaction. + * An allocation with a reference to its parent transaction. */ export interface Data { /** - * Allocation ID. + * FRAGMENT generated unique ID. */ id: string; /** - * Allocated amount in smallest currency unit as stringified bigint. + * Allocated amount, as a positive string in the smallest unit of the currency (for + * example, cents for USD). */ amount: string; /** - * The invoice this allocation is applied against. + * Invoice the allocation is applied against. */ invoice_id: string; /** - * Posted timestamp of the parent transaction in ISO 8601 format. + * Timestamp when the parent transaction was posted. Uses ISO 8601 format. */ posted: string; /** - * Reference to a transaction by encoded ID and external ID. + * Transaction reference. */ transaction: Data.Transaction; /** - * The type of allocation. + * Type of allocation. */ type: 'invoice_payin' | 'invoice_payout'; /** - * User reference in API responses: Fragment user id and external_id. + * User reference. */ user: Data.User; } export namespace Data { /** - * Reference to a transaction by encoded ID and external ID. + * Transaction reference. */ export interface Transaction { /** - * Encoded transaction ID. + * FRAGMENT generated unique ID. */ id: string; /** - * External transaction ID. + * Unique user-provided external ID for the transaction. */ external_id: string; } /** - * User reference in API responses: Fragment user id and external_id. + * User reference. */ export interface User { /** - * FRAGMENT generated ID of the user + * FRAGMENT generated unique ID. */ id: string; /** - * External ID of the user + * User-provided unique external ID. */ external_id: string; } @@ -571,23 +576,24 @@ export namespace TransactionSearchAllocationsResponse { export interface TransactionCreateParams { /** - * Account reference. Provide id, external_id, or both. + * External account for the transaction. Identify it by `id`, `external_id`, or + * both. */ account: TransactionCreateParams.Account; /** - * Allocation entries for this transaction. Empty indicates unreconciled funds. + * Allocations for the transaction. An empty array indicates unreconciled funds. */ allocations: Array; /** - * Amount in smallest currency unit as stringified bigint (can be positive or - * negative). + * Transaction amount, as a string in the smallest unit of the currency (for + * example, cents for USD). Can be positive or negative. */ amount: string; /** - * Currency code (ISO 4217 or crypto) + * Currency code (ISO 4217 or crypto). */ currency: | 'ADA' @@ -771,58 +777,60 @@ export interface TransactionCreateParams { | 'CUSTOM'; /** - * External transaction ID used for idempotent sync. + * Unique user-provided external ID for the transaction. */ external_id: string; /** - * Posted timestamp in ISO 8601 format. + * Timestamp when the transaction was posted. Uses ISO 8601 format. */ posted: string; /** - * Optional metadata tags for this transaction + * Tags for the transaction. */ tags?: Array; } export namespace TransactionCreateParams { /** - * Account reference. Provide id, external_id, or both. + * External account for the transaction. Identify it by `id`, `external_id`, or + * both. */ export interface Account { /** - * User-facing encoded account ID. + * FRAGMENT generated unique ID. */ id?: string; /** - * External account reference ID. + * Unique user-provided external ID for the external account. */ external_id?: string; } /** - * Transaction allocation against an invoice. + * An allocation linking a transaction to an invoice. */ export interface Allocation { /** - * Amount to allocate in smallest currency unit as stringified bigint. + * Allocation amount, as a positive string in the smallest unit of the currency + * (for example, cents for USD). */ amount: string; /** - * The invoice to allocate against. + * Invoice to allocate against. */ invoice_id: string; /** - * The type of allocation. + * Type of allocation. */ type: 'invoice_payin' | 'invoice_payout'; /** - * Identifies a user by Fragment-generated id or external_id (request body). + * Identifies a user by `id` or `external_id`. */ user: Allocation.ID | Allocation.ExternalID; } @@ -830,14 +838,14 @@ export namespace TransactionCreateParams { export namespace Allocation { export interface ID { /** - * FRAGMENT generated ID of the user + * FRAGMENT generated unique ID. */ id: string; } export interface ExternalID { /** - * External ID of the user + * User-provided unique external ID. */ external_id: string; } @@ -863,7 +871,7 @@ export namespace TransactionCreateParams { export interface TransactionUpdateParams { /** - * Current transaction version for optimistic concurrency control. + * Current version of the transaction. Must match the stored version. */ current_transaction_version: number; @@ -875,38 +883,39 @@ export interface TransactionUpdateParams { export namespace TransactionUpdateParams { export interface Allocations { /** - * Allocations to add to the transaction + * Creates a new allocation. */ create?: Array; /** - * Existing allocations to update + * Updates an existing allocation. */ update?: Array; } export namespace Allocations { /** - * Transaction allocation against an invoice. + * An allocation linking a transaction to an invoice. */ export interface Create { /** - * Amount to allocate in smallest currency unit as stringified bigint. + * Allocation amount, as a positive string in the smallest unit of the currency + * (for example, cents for USD). */ amount: string; /** - * The invoice to allocate against. + * Invoice to allocate against. */ invoice_id: string; /** - * The type of allocation. + * Type of allocation. */ type: 'invoice_payin' | 'invoice_payout'; /** - * Identifies a user by Fragment-generated id or external_id (request body). + * Identifies a user by `id` or `external_id`. */ user: Create.ID | Create.ExternalID; } @@ -914,14 +923,14 @@ export namespace TransactionUpdateParams { export namespace Create { export interface ID { /** - * FRAGMENT generated ID of the user + * FRAGMENT generated unique ID. */ id: string; } export interface ExternalID { /** - * External ID of the user + * User-provided unique external ID. */ external_id: string; } @@ -929,12 +938,13 @@ export namespace TransactionUpdateParams { export interface Update { /** - * The ID of the allocation to update. + * Allocation to update. */ id: string; /** - * New amount in smallest currency unit as stringified bigint. + * Updated allocation amount, as a positive string in the smallest unit of the + * currency (for example, cents for USD). */ amount: string; } @@ -947,7 +957,7 @@ export namespace TransactionUpdateParams { create?: Array; /** - * Tags to remove by key + * Tags to remove by key. */ delete?: Array; @@ -1027,28 +1037,29 @@ export namespace TransactionUpdateParams { export interface TransactionListParams { /** - * Filter by account. Encoded account ID (ext_account_xxx) or external_id. If the - * account does not exist, returns an empty list. + * Filter by account `id` or `external_id`. If the account does not exist, returns + * an empty list. */ account?: string; /** - * Filter by reconciliation state. reconciled = unallocated_amount === 0; - * unreconciled = unallocated_amount !== 0. Omit for all transactions. + * Filter by reconciliation status. `reconciled` returns transactions where + * unallocated_amount is 0. `unreconciled` returns transactions where + * unallocated_amount is not 0. Omit for all transactions. */ reconciliation_status?: 'reconciled' | 'unreconciled'; } export interface TransactionSearchParams { /** - * Filter criteria for searching transactions. + * Filter for searching transactions. */ filter: TransactionSearchParams.Filter; } export namespace TransactionSearchParams { /** - * Filter criteria for searching transactions. + * Filter for searching transactions. */ export interface Filter { account: Filter.Account; @@ -1064,16 +1075,17 @@ export namespace TransactionSearchParams { export namespace Account { /** - * Account reference. Provide id, external_id, or both. + * External account for the transaction. Identify it by `id`, `external_id`, or + * both. */ export interface Any { /** - * User-facing encoded account ID. + * FRAGMENT generated unique ID. */ id?: string; /** - * External account reference ID. + * Unique user-provided external ID for the external account. */ external_id?: string; } @@ -1083,14 +1095,14 @@ export namespace TransactionSearchParams { export interface TransactionSearchAllocationsParams { /** - * Filter criteria for searching transaction allocations. + * Filter for searching transaction allocations. */ filter: TransactionSearchAllocationsParams.Filter; } export namespace TransactionSearchAllocationsParams { /** - * Filter criteria for searching transaction allocations. + * Filter for searching transaction allocations. */ export interface Filter { invoice_id: Filter.InvoiceID; diff --git a/src/resources/users.ts b/src/resources/users.ts index bff0394..0ca9fdd 100644 --- a/src/resources/users.ts +++ b/src/resources/users.ts @@ -6,7 +6,7 @@ import { RequestOptions } from '../internal/request-options'; export class Users extends APIResource { /** - * Creates a new user + * Creates a new user. * * @example * ```ts @@ -21,7 +21,7 @@ export class Users extends APIResource { } /** - * Lists all users for the workspace + * Lists all users. * * @example * ```ts @@ -34,34 +34,34 @@ export class Users extends APIResource { } /** - * User object + * User object. */ export interface User { /** - * Unique user ID + * FRAGMENT generated unique ID. */ id: string; /** - * External ID for the user + * User-provided unique external ID. */ external_id: string; /** - * Role of the user + * Name of the user's role. */ role: string; } export interface UserCreateResponse { /** - * User object + * User object. */ data: User; } /** - * List of users + * List of users. */ export interface UserListResponse { data: Array; @@ -69,12 +69,12 @@ export interface UserListResponse { export interface UserCreateParams { /** - * External ID for the user + * User-provided unique external ID. */ external_id: string; /** - * Role of the user + * Name of the role to assign. Must match an existing role. */ role: string; } diff --git a/tests/api-resources/transactions.test.ts b/tests/api-resources/transactions.test.ts index fc44282..5d41ee5 100644 --- a/tests/api-resources/transactions.test.ts +++ b/tests/api-resources/transactions.test.ts @@ -24,7 +24,7 @@ describe('resource transactions', () => { amount: '-1000', currency: 'USD', external_id: 'bank_txn_123', - posted: '2026-02-12T00:00:00.000Z', + posted: '2024-01-13T00:00:00Z', }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); @@ -50,7 +50,7 @@ describe('resource transactions', () => { amount: '-1000', currency: 'USD', external_id: 'bank_txn_123', - posted: '2026-02-12T00:00:00.000Z', + posted: '2024-01-13T00:00:00Z', tags: [{ key: 'region', value: 'us-east' }], }); }); From 79a14d16c8774e9226d928a7634d1c26cf2044b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 21:20:16 +0000 Subject: [PATCH 07/11] feat(api): update SDK from prod (8051461980fb65468797d0b82dfa42dee9014004) --- .stats.yml | 4 +- src/resources/external-accounts.ts | 6 +-- src/resources/invoices.ts | 62 +++++++++++++++++------------- src/resources/products.ts | 4 +- src/resources/roles.ts | 4 +- src/resources/transactions.ts | 40 +++++++++---------- src/resources/users.ts | 6 +-- 7 files changed, 68 insertions(+), 58 deletions(-) diff --git a/.stats.yml b/.stats.yml index 50303e2..7c785cb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-d1b5cc19383470227e1435e227958a95c540e527eaefb5fcc206d7f8b89bca69.yml -openapi_spec_hash: 1bf0e3c6be232b10ea36d85fb1aa22c5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-e4fc605988664c55f173328194e6516e6cc87c1390eb2053c9932d5447f10c42.yml +openapi_spec_hash: a7b2486e11f00309dfbed884389a8a9a config_hash: 0bc054caf56d79dc6e95b7ad898419d1 diff --git a/src/resources/external-accounts.ts b/src/resources/external-accounts.ts index 06be604..830fe03 100644 --- a/src/resources/external-accounts.ts +++ b/src/resources/external-accounts.ts @@ -6,7 +6,7 @@ import { RequestOptions } from '../internal/request-options'; export class ExternalAccounts extends APIResource { /** - * Creates a new external account. + * Creates an external account. * * @example * ```ts @@ -48,7 +48,7 @@ export interface ExternalAccount { id: string; /** - * User-provided unique external ID. + * User-provided unique ID. */ external_id: string; @@ -74,7 +74,7 @@ export interface ExternalAccountListResponse { export interface ExternalAccountCreateParams { /** - * User-provided unique external ID. + * User-provided unique ID. */ external_id: string; diff --git a/src/resources/invoices.ts b/src/resources/invoices.ts index 0bc16f2..33d78a3 100644 --- a/src/resources/invoices.ts +++ b/src/resources/invoices.ts @@ -33,7 +33,7 @@ export class Invoices extends APIResource { } /** - * Fetches an invoice. + * Retrieves an invoice. * * @example * ```ts @@ -74,7 +74,7 @@ export class Invoices extends APIResource { } /** - * Gets the version history of an invoice. + * Retrieves the version history of an invoice. * * @example * ```ts @@ -150,7 +150,7 @@ export interface Invoice { export namespace Invoice { /** - * A key-value tag pair + * A key-value tag pair. */ export interface Tag { /** @@ -418,7 +418,7 @@ export namespace Invoice { } /** - * A key-value tag pair + * A key-value tag pair. */ export interface Tag { /** @@ -771,7 +771,7 @@ export namespace InvoiceRetrieveResponse { id: string; /** - * Unique user-provided external ID for the transaction. + * User-provided unique ID. */ external_id: string; @@ -783,7 +783,7 @@ export namespace InvoiceRetrieveResponse { export namespace Transaction { /** - * A key-value tag pair + * A key-value tag pair. */ export interface Tag { /** @@ -808,7 +808,7 @@ export namespace InvoiceRetrieveResponse { id: string; /** - * User-provided unique external ID. + * User-provided unique ID. */ external_id: string; } @@ -824,6 +824,11 @@ export namespace InvoiceRetrieveResponse { * Per-currency balance breakdown for the user. */ balances: Array; + + /** + * User-provided unique ID. + */ + external_id: string; } export namespace User { @@ -1269,7 +1274,7 @@ export namespace InvoiceSearchResponse { id: string; /** - * Unique user-provided external ID for the transaction. + * User-provided unique ID. */ external_id: string; @@ -1281,7 +1286,7 @@ export namespace InvoiceSearchResponse { export namespace Transaction { /** - * A key-value tag pair + * A key-value tag pair. */ export interface Tag { /** @@ -1306,7 +1311,7 @@ export namespace InvoiceSearchResponse { id: string; /** - * User-provided unique external ID. + * User-provided unique ID. */ external_id: string; } @@ -1322,6 +1327,11 @@ export namespace InvoiceSearchResponse { * Per-currency balance breakdown for the user. */ balances: Array; + + /** + * User-provided unique ID. + */ + external_id: string; } export namespace User { @@ -1667,7 +1677,7 @@ export namespace InvoiceCreateParams { export interface ExternalID { /** - * User-provided unique external ID. + * User-provided unique ID. */ external_id: string; } @@ -1695,7 +1705,7 @@ export namespace InvoiceCreateParams { } /** - * A key-value tag pair for metadata + * A key-value tag pair for metadata. */ export interface Tag { /** @@ -1713,7 +1723,7 @@ export namespace InvoiceCreateParams { } /** - * A key-value tag pair for metadata + * A key-value tag pair for metadata. */ export interface Tag { /** @@ -1995,7 +2005,7 @@ export namespace InvoiceUpdateParams { export interface ExternalID { /** - * User-provided unique external ID. + * User-provided unique ID. */ external_id: string; } @@ -2023,7 +2033,7 @@ export namespace InvoiceUpdateParams { } /** - * A key-value tag pair for metadata + * A key-value tag pair for metadata. */ export interface Tag { /** @@ -2048,7 +2058,7 @@ export namespace InvoiceUpdateParams { } /** - * Updates an existing line item. + * Data for updating a line item. */ export interface Update { /** @@ -2109,7 +2119,7 @@ export namespace InvoiceUpdateParams { export namespace Tags { /** - * A key-value tag pair for metadata + * A key-value tag pair for metadata. */ export interface Create { /** @@ -2127,13 +2137,13 @@ export namespace InvoiceUpdateParams { export interface Delete { /** - * Tag key to delete + * Tag key to delete. */ key: string; } /** - * A key-value tag pair for metadata + * A key-value tag pair for metadata. */ export interface Set { /** @@ -2150,7 +2160,7 @@ export namespace InvoiceUpdateParams { } /** - * A key-value tag pair for metadata + * A key-value tag pair for metadata. */ export interface Update { /** @@ -2195,7 +2205,7 @@ export namespace InvoiceUpdateParams { export namespace Tags { /** - * A key-value tag pair for metadata + * A key-value tag pair for metadata. */ export interface Create { /** @@ -2213,13 +2223,13 @@ export namespace InvoiceUpdateParams { export interface Delete { /** - * Tag key to delete + * Tag key to delete. */ key: string; } /** - * A key-value tag pair for metadata + * A key-value tag pair for metadata. */ export interface Set { /** @@ -2236,7 +2246,7 @@ export namespace InvoiceUpdateParams { } /** - * A key-value tag pair for metadata + * A key-value tag pair for metadata. */ export interface Update { /** @@ -2261,7 +2271,7 @@ export interface InvoiceSearchParams { filter: InvoiceSearchParams.Filter; /** - * Pagination parameters + * Pagination parameters. */ page_info: InvoiceSearchParams.PageInfo; } @@ -2339,7 +2349,7 @@ export namespace InvoiceSearchParams { } /** - * Pagination parameters + * Pagination parameters. */ export interface PageInfo { /** diff --git a/src/resources/products.ts b/src/resources/products.ts index ac8c9fa..9c2443a 100644 --- a/src/resources/products.ts +++ b/src/resources/products.ts @@ -10,7 +10,7 @@ import { path } from '../internal/utils/path'; */ export class Products extends APIResource { /** - * Creates a new product. + * Creates a product. * * @example * ```ts @@ -24,7 +24,7 @@ export class Products extends APIResource { } /** - * Gets a product by code. + * Retrieves a product by code. * * @example * ```ts diff --git a/src/resources/roles.ts b/src/resources/roles.ts index 52ae1d1..75ad303 100644 --- a/src/resources/roles.ts +++ b/src/resources/roles.ts @@ -9,7 +9,7 @@ import { RequestOptions } from '../internal/request-options'; */ export class Roles extends APIResource { /** - * Creates a new role. + * Creates a role. * * @example * ```ts @@ -56,7 +56,7 @@ export interface RoleCreateResponse { } /** - * List of roles + * List of roles. */ export interface RoleListResponse { /** diff --git a/src/resources/transactions.ts b/src/resources/transactions.ts index 92f1150..fa75362 100644 --- a/src/resources/transactions.ts +++ b/src/resources/transactions.ts @@ -36,7 +36,7 @@ export class Transactions extends APIResource { } /** - * Fetches a transaction by ID or external ID. + * Retrieves a transaction by ID or external ID. * * @example * ```ts @@ -84,7 +84,7 @@ export class Transactions extends APIResource { } /** - * Gets the version history of a transaction. + * Retrieves the version history of a transaction. * * @example * ```ts @@ -345,7 +345,7 @@ export interface Transaction { | 'CUSTOM'; /** - * Unique user-provided external ID for the transaction. + * User-provided unique ID. */ external_id: string; @@ -386,7 +386,7 @@ export namespace Transaction { id: string; /** - * Unique user-provided external ID for the external account. + * User-provided unique ID. */ external_id: string; } @@ -428,14 +428,14 @@ export namespace Transaction { id: string; /** - * User-provided unique external ID. + * User-provided unique ID. */ external_id: string; } } /** - * A key-value tag pair + * A key-value tag pair. */ export interface Tag { /** @@ -552,7 +552,7 @@ export namespace TransactionSearchAllocationsResponse { id: string; /** - * Unique user-provided external ID for the transaction. + * User-provided unique ID. */ external_id: string; } @@ -567,7 +567,7 @@ export namespace TransactionSearchAllocationsResponse { id: string; /** - * User-provided unique external ID. + * User-provided unique ID. */ external_id: string; } @@ -777,7 +777,7 @@ export interface TransactionCreateParams { | 'CUSTOM'; /** - * Unique user-provided external ID for the transaction. + * User-provided unique ID. */ external_id: string; @@ -804,7 +804,7 @@ export namespace TransactionCreateParams { id?: string; /** - * Unique user-provided external ID for the external account. + * User-provided unique ID. */ external_id?: string; } @@ -845,14 +845,14 @@ export namespace TransactionCreateParams { export interface ExternalID { /** - * User-provided unique external ID. + * User-provided unique ID. */ external_id: string; } } /** - * A key-value tag pair for metadata + * A key-value tag pair for metadata. */ export interface Tag { /** @@ -883,12 +883,12 @@ export interface TransactionUpdateParams { export namespace TransactionUpdateParams { export interface Allocations { /** - * Creates a new allocation. + * Allocations to create. */ create?: Array; /** - * Updates an existing allocation. + * Allocations to update. */ update?: Array; } @@ -930,7 +930,7 @@ export namespace TransactionUpdateParams { export interface ExternalID { /** - * User-provided unique external ID. + * User-provided unique ID. */ external_id: string; } @@ -976,7 +976,7 @@ export namespace TransactionUpdateParams { export namespace Tags { /** - * A key-value tag pair for metadata + * A key-value tag pair for metadata. */ export interface Create { /** @@ -994,13 +994,13 @@ export namespace TransactionUpdateParams { export interface Delete { /** - * Tag key to delete + * Tag key to delete. */ key: string; } /** - * A key-value tag pair for metadata + * A key-value tag pair for metadata. */ export interface Set { /** @@ -1017,7 +1017,7 @@ export namespace TransactionUpdateParams { } /** - * A key-value tag pair for metadata + * A key-value tag pair for metadata. */ export interface Update { /** @@ -1085,7 +1085,7 @@ export namespace TransactionSearchParams { id?: string; /** - * Unique user-provided external ID for the external account. + * User-provided unique ID. */ external_id?: string; } diff --git a/src/resources/users.ts b/src/resources/users.ts index 0ca9fdd..f2a0189 100644 --- a/src/resources/users.ts +++ b/src/resources/users.ts @@ -6,7 +6,7 @@ import { RequestOptions } from '../internal/request-options'; export class Users extends APIResource { /** - * Creates a new user. + * Creates a user. * * @example * ```ts @@ -43,7 +43,7 @@ export interface User { id: string; /** - * User-provided unique external ID. + * User-provided unique ID. */ external_id: string; @@ -69,7 +69,7 @@ export interface UserListResponse { export interface UserCreateParams { /** - * User-provided unique external ID. + * User-provided unique ID. */ external_id: string; From 68cebf44aacd4feba688a21d83d1848aa4a1e684 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 04:47:04 +0000 Subject: [PATCH 08/11] feat(api): update SDK from prod (b8f6f1940acd3d10fc17aaeb59cd75281f3c6436) --- .stats.yml | 4 ++-- src/client.ts | 6 ++++++ src/resources/external-accounts.ts | 3 +++ src/resources/invoices.ts | 2 +- src/resources/users.ts | 3 +++ 5 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7c785cb..9ecf3c2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-e4fc605988664c55f173328194e6516e6cc87c1390eb2053c9932d5447f10c42.yml -openapi_spec_hash: a7b2486e11f00309dfbed884389a8a9a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-19313c1dfa734f2f19d644b8603387a37c7fa0c30afbf628e74760e81c88b51d.yml +openapi_spec_hash: 241697e6c3b32ba9a8fb8f72f78ae863 config_hash: 0bc054caf56d79dc6e95b7ad898419d1 diff --git a/src/client.ts b/src/client.ts index db6c424..d6a6bbe 100644 --- a/src/client.ts +++ b/src/client.ts @@ -841,6 +841,9 @@ export class Fragment { static toFile = Uploads.toFile; + /** + * External account management operations + */ externalAccounts: API.ExternalAccounts = new API.ExternalAccounts(this); /** * Invoice management operations @@ -858,6 +861,9 @@ export class Fragment { * Transaction sync operations */ transactions: API.Transactions = new API.Transactions(this); + /** + * User management operations + */ users: API.Users = new API.Users(this); } diff --git a/src/resources/external-accounts.ts b/src/resources/external-accounts.ts index 830fe03..e3556bc 100644 --- a/src/resources/external-accounts.ts +++ b/src/resources/external-accounts.ts @@ -4,6 +4,9 @@ import { APIResource } from '../core/resource'; import { APIPromise } from '../core/api-promise'; import { RequestOptions } from '../internal/request-options'; +/** + * External account management operations + */ export class ExternalAccounts extends APIResource { /** * Creates an external account. diff --git a/src/resources/invoices.ts b/src/resources/invoices.ts index 33d78a3..fdab041 100644 --- a/src/resources/invoices.ts +++ b/src/resources/invoices.ts @@ -169,7 +169,7 @@ export namespace Invoice { */ export interface LineItem { /** - * Unique invoice ID. + * FRAGMENT generated unique ID. */ id: string; diff --git a/src/resources/users.ts b/src/resources/users.ts index f2a0189..b638753 100644 --- a/src/resources/users.ts +++ b/src/resources/users.ts @@ -4,6 +4,9 @@ import { APIResource } from '../core/resource'; import { APIPromise } from '../core/api-promise'; import { RequestOptions } from '../internal/request-options'; +/** + * User management operations + */ export class Users extends APIResource { /** * Creates a user. From 558e630e873639730aa5c1a967ada782791378d5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 15:48:08 +0000 Subject: [PATCH 09/11] chore(internal): codegen related update --- src/internal/utils/env.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal/utils/env.ts b/src/internal/utils/env.ts index 2d84800..cc5fa0f 100644 --- a/src/internal/utils/env.ts +++ b/src/internal/utils/env.ts @@ -9,10 +9,10 @@ */ export const readEnv = (env: string): string | undefined => { if (typeof (globalThis as any).process !== 'undefined') { - return (globalThis as any).process.env?.[env]?.trim() ?? undefined; + return (globalThis as any).process.env?.[env]?.trim() || undefined; } if (typeof (globalThis as any).Deno !== 'undefined') { - return (globalThis as any).Deno.env?.get?.(env)?.trim(); + return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined; } return undefined; }; From aeff3566c323f4bb81fc93ea3c9c9812b493d4a1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 21:04:23 +0000 Subject: [PATCH 10/11] feat(api): update SDK from prod (e1ebb9e4d62034855202a8ff99690880c072d953) --- .stats.yml | 6 +- src/resources/external-accounts.ts | 4 +- src/resources/invoices.ts | 389 +++++++++++++---------- src/resources/transactions.ts | 221 ++++++++++--- src/resources/users.ts | 3 + tests/api-resources/invoices.test.ts | 28 +- tests/api-resources/transactions.test.ts | 19 +- 7 files changed, 429 insertions(+), 241 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9ecf3c2..7e70f72 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 22 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-19313c1dfa734f2f19d644b8603387a37c7fa0c30afbf628e74760e81c88b51d.yml -openapi_spec_hash: 241697e6c3b32ba9a8fb8f72f78ae863 -config_hash: 0bc054caf56d79dc6e95b7ad898419d1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-8472a9bd15eaa5b8aa9c12513d02b06ae385d06dd48e94a23f121678981de98a.yml +openapi_spec_hash: 4c42faa5ab6443bab546568adc330b7a +config_hash: 8e4b2d3ac55a0b2cdecfba99a1925e6f diff --git a/src/resources/external-accounts.ts b/src/resources/external-accounts.ts index e3556bc..81781e3 100644 --- a/src/resources/external-accounts.ts +++ b/src/resources/external-accounts.ts @@ -56,7 +56,7 @@ export interface ExternalAccount { external_id: string; /** - * Human-readable name. + * Name of the account. */ name: string; } @@ -82,7 +82,7 @@ export interface ExternalAccountCreateParams { external_id: string; /** - * Human-readable name. + * Name of the account. */ name: string; } diff --git a/src/resources/invoices.ts b/src/resources/invoices.ts index fdab041..b3b6ce9 100644 --- a/src/resources/invoices.ts +++ b/src/resources/invoices.ts @@ -94,7 +94,6 @@ export class Invoices extends APIResource { * ```ts * const response = await client.invoices.search({ * filter: {}, - * page_info: {}, * }); * ``` */ @@ -174,13 +173,13 @@ export namespace Invoice { id: string; /** - * @deprecated Total amount as a string in the smallest unit of the currency (for - * example, cents for USD). Deprecated, use price.amount instead. + * @deprecated Total amount as a string in the smallest currency unit, such as + * cents for USD. Deprecated, use price.amount instead. */ amount: string; /** - * Currency code (ISO 4217 or crypto). + * ISO 4217 or crypto currency code. */ currency_code: | 'ADA' @@ -400,8 +399,7 @@ export namespace Invoice { */ export interface Price { /** - * Total amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Total amount as a string in the smallest currency unit, such as cents for USD. */ amount: string; @@ -411,8 +409,7 @@ export namespace Invoice { quantity: number; /** - * Unit price as a string in the smallest unit of the currency (for example, cents - * for USD). + * Unit price as a string in the smallest currency unit, such as cents for USD. */ unit_price: string; } @@ -472,74 +469,89 @@ export namespace InvoiceRetrieveResponse { export namespace Data { export interface Balance { /** - * Currency code (ISO 4217 or crypto). + * ISO 4217 or crypto currency code. */ currency: string; + /** + * Net balance breakdown. + */ net: Balance.Net; + /** + * Payins balance breakdown. + */ payins: Balance.Payins; + /** + * Payouts balance breakdown. + */ payouts: Balance.Payouts; } export namespace Balance { + /** + * Net balance breakdown. + */ export interface Net { /** - * Actual amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Actual amount as a string in the smallest currency unit, such as cents for USD. */ actual: string; /** - * Expected amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Expected amount as a string in the smallest currency unit, such as cents for + * USD. */ expected: string; /** - * Remaining amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Remaining amount as a string in the smallest currency unit, such as cents for + * USD. */ remaining: string; } + /** + * Payins balance breakdown. + */ export interface Payins { /** - * Actual amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Actual amount as a string in the smallest currency unit, such as cents for USD. */ actual: string; /** - * Expected amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Expected amount as a string in the smallest currency unit, such as cents for + * USD. */ expected: string; /** - * Remaining amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Remaining amount as a string in the smallest currency unit, such as cents for + * USD. */ remaining: string; } + /** + * Payouts balance breakdown. + */ export interface Payouts { /** - * Actual amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Actual amount as a string in the smallest currency unit, such as cents for USD. */ actual: string; /** - * Expected amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Expected amount as a string in the smallest currency unit, such as cents for + * USD. */ expected: string; /** - * Remaining amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Remaining amount as a string in the smallest currency unit, such as cents for + * USD. */ remaining: string; } @@ -550,13 +562,13 @@ export namespace InvoiceRetrieveResponse { */ export interface Payment { /** - * Amount allocated as a string in the smallest unit of the currency (for example, - * cents for USD). + * Amount allocated as a string in the smallest currency unit, such as cents for + * USD. */ amount: string; /** - * Currency code (ISO 4217 or crypto). + * ISO 4217 or crypto currency code. */ currency: | 'ADA' @@ -745,7 +757,7 @@ export namespace InvoiceRetrieveResponse { posted: string; /** - * Transaction reference. + * Transaction the payment is applied to. */ transaction: Payment.Transaction; @@ -755,14 +767,14 @@ export namespace InvoiceRetrieveResponse { type: 'payin' | 'payout'; /** - * User reference. + * User associated with the payment. */ user: Payment.User; } export namespace Payment { /** - * Transaction reference. + * Transaction the payment is applied to. */ export interface Transaction { /** @@ -799,7 +811,7 @@ export namespace InvoiceRetrieveResponse { } /** - * User reference. + * User associated with the payment. */ export interface User { /** @@ -834,74 +846,89 @@ export namespace InvoiceRetrieveResponse { export namespace User { export interface Balance { /** - * Currency code (ISO 4217 or crypto). + * ISO 4217 or crypto currency code. */ currency: string; + /** + * Net balance breakdown. + */ net: Balance.Net; + /** + * Payins balance breakdown. + */ payins: Balance.Payins; + /** + * Payouts balance breakdown. + */ payouts: Balance.Payouts; } export namespace Balance { + /** + * Net balance breakdown. + */ export interface Net { /** - * Actual amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Actual amount as a string in the smallest currency unit, such as cents for USD. */ actual: string; /** - * Expected amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Expected amount as a string in the smallest currency unit, such as cents for + * USD. */ expected: string; /** - * Remaining amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Remaining amount as a string in the smallest currency unit, such as cents for + * USD. */ remaining: string; } + /** + * Payins balance breakdown. + */ export interface Payins { /** - * Actual amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Actual amount as a string in the smallest currency unit, such as cents for USD. */ actual: string; /** - * Expected amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Expected amount as a string in the smallest currency unit, such as cents for + * USD. */ expected: string; /** - * Remaining amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Remaining amount as a string in the smallest currency unit, such as cents for + * USD. */ remaining: string; } + /** + * Payouts balance breakdown. + */ export interface Payouts { /** - * Actual amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Actual amount as a string in the smallest currency unit, such as cents for USD. */ actual: string; /** - * Expected amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Expected amount as a string in the smallest currency unit, such as cents for + * USD. */ expected: string; /** - * Remaining amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Remaining amount as a string in the smallest currency unit, such as cents for + * USD. */ remaining: string; } @@ -935,10 +962,16 @@ export interface InvoiceListHistoryResponse { * Search results for invoices. */ export interface InvoiceSearchResponse { + /** + * Search results for invoices. + */ data: InvoiceSearchResponse.Data; } export namespace InvoiceSearchResponse { + /** + * Search results for invoices. + */ export interface Data { /** * Invoices matching the search criteria. @@ -975,74 +1008,89 @@ export namespace InvoiceSearchResponse { export namespace Invoice { export interface Balance { /** - * Currency code (ISO 4217 or crypto). + * ISO 4217 or crypto currency code. */ currency: string; + /** + * Net balance breakdown. + */ net: Balance.Net; + /** + * Payins balance breakdown. + */ payins: Balance.Payins; + /** + * Payouts balance breakdown. + */ payouts: Balance.Payouts; } export namespace Balance { + /** + * Net balance breakdown. + */ export interface Net { /** - * Actual amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Actual amount as a string in the smallest currency unit, such as cents for USD. */ actual: string; /** - * Expected amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Expected amount as a string in the smallest currency unit, such as cents for + * USD. */ expected: string; /** - * Remaining amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Remaining amount as a string in the smallest currency unit, such as cents for + * USD. */ remaining: string; } + /** + * Payins balance breakdown. + */ export interface Payins { /** - * Actual amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Actual amount as a string in the smallest currency unit, such as cents for USD. */ actual: string; /** - * Expected amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Expected amount as a string in the smallest currency unit, such as cents for + * USD. */ expected: string; /** - * Remaining amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Remaining amount as a string in the smallest currency unit, such as cents for + * USD. */ remaining: string; } + /** + * Payouts balance breakdown. + */ export interface Payouts { /** - * Actual amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Actual amount as a string in the smallest currency unit, such as cents for USD. */ actual: string; /** - * Expected amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Expected amount as a string in the smallest currency unit, such as cents for + * USD. */ expected: string; /** - * Remaining amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Remaining amount as a string in the smallest currency unit, such as cents for + * USD. */ remaining: string; } @@ -1053,13 +1101,13 @@ export namespace InvoiceSearchResponse { */ export interface Payment { /** - * Amount allocated as a string in the smallest unit of the currency (for example, - * cents for USD). + * Amount allocated as a string in the smallest currency unit, such as cents for + * USD. */ amount: string; /** - * Currency code (ISO 4217 or crypto). + * ISO 4217 or crypto currency code. */ currency: | 'ADA' @@ -1248,7 +1296,7 @@ export namespace InvoiceSearchResponse { posted: string; /** - * Transaction reference. + * Transaction the payment is applied to. */ transaction: Payment.Transaction; @@ -1258,14 +1306,14 @@ export namespace InvoiceSearchResponse { type: 'payin' | 'payout'; /** - * User reference. + * User associated with the payment. */ user: Payment.User; } export namespace Payment { /** - * Transaction reference. + * Transaction the payment is applied to. */ export interface Transaction { /** @@ -1302,7 +1350,7 @@ export namespace InvoiceSearchResponse { } /** - * User reference. + * User associated with the payment. */ export interface User { /** @@ -1337,74 +1385,89 @@ export namespace InvoiceSearchResponse { export namespace User { export interface Balance { /** - * Currency code (ISO 4217 or crypto). + * ISO 4217 or crypto currency code. */ currency: string; + /** + * Net balance breakdown. + */ net: Balance.Net; + /** + * Payins balance breakdown. + */ payins: Balance.Payins; + /** + * Payouts balance breakdown. + */ payouts: Balance.Payouts; } export namespace Balance { + /** + * Net balance breakdown. + */ export interface Net { /** - * Actual amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Actual amount as a string in the smallest currency unit, such as cents for USD. */ actual: string; /** - * Expected amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Expected amount as a string in the smallest currency unit, such as cents for + * USD. */ expected: string; /** - * Remaining amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Remaining amount as a string in the smallest currency unit, such as cents for + * USD. */ remaining: string; } + /** + * Payins balance breakdown. + */ export interface Payins { /** - * Actual amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Actual amount as a string in the smallest currency unit, such as cents for USD. */ actual: string; /** - * Expected amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Expected amount as a string in the smallest currency unit, such as cents for + * USD. */ expected: string; /** - * Remaining amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Remaining amount as a string in the smallest currency unit, such as cents for + * USD. */ remaining: string; } + /** + * Payouts balance breakdown. + */ export interface Payouts { /** - * Actual amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Actual amount as a string in the smallest currency unit, such as cents for USD. */ actual: string; /** - * Expected amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Expected amount as a string in the smallest currency unit, such as cents for + * USD. */ expected: string; /** - * Remaining amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Remaining amount as a string in the smallest currency unit, such as cents for + * USD. */ remaining: string; } @@ -1467,13 +1530,13 @@ export namespace InvoiceCreateParams { user: LineItem.ID | LineItem.ExternalID; /** - * @deprecated Total amount as a string in the smallest unit of the currency (for - * example, cents for USD). Deprecated, use price instead. + * @deprecated Total amount as a string in the smallest currency unit, such as + * cents for USD. Deprecated, use price instead. */ amount?: string; /** - * Currency code (ISO 4217 or crypto). + * ISO 4217 or crypto currency code. */ currency_code?: | 'ADA' @@ -1687,8 +1750,8 @@ export namespace InvoiceCreateParams { */ export interface Price { /** - * Total amount as a string in the smallest unit of the currency (for example, - * cents for USD). Required if unit_price and quantity are not provided. + * Total amount as a string in the smallest currency unit, such as cents for USD. + * Required if unit_price and quantity are not provided. */ amount?: string; @@ -1698,8 +1761,7 @@ export namespace InvoiceCreateParams { quantity?: number; /** - * Price per unit as a string in the smallest unit of the currency (for example, - * cents for USD). + * Price per unit as a string in the smallest currency unit, such as cents for USD. */ unit_price?: string; } @@ -1709,14 +1771,12 @@ export namespace InvoiceCreateParams { */ export interface Tag { /** - * Tag key. Must be a valid safe string (no special characters like #, /, :). Max - * 50 characters. + * Tag key. Must not contain #, /, or :. Max 50 characters. */ key: string; /** - * Tag value. Must be a valid safe string (no special characters like #, /, :). Max - * 200 characters. + * Tag value. Must not contain #, /, or :. Max 200 characters. */ value: string; } @@ -1727,14 +1787,12 @@ export namespace InvoiceCreateParams { */ export interface Tag { /** - * Tag key. Must be a valid safe string (no special characters like #, /, :). Max - * 50 characters. + * Tag key. Must not contain #, /, or :. Max 50 characters. */ key: string; /** - * Tag value. Must be a valid safe string (no special characters like #, /, :). Max - * 200 characters. + * Tag value. Must not contain #, /, or :. Max 200 characters. */ value: string; } @@ -1746,12 +1804,21 @@ export interface InvoiceUpdateParams { */ current_invoice_version: number; + /** + * Line item updates. + */ line_items?: InvoiceUpdateParams.LineItems; + /** + * Tag updates. + */ tags?: InvoiceUpdateParams.Tags; } export namespace InvoiceUpdateParams { + /** + * Line item updates. + */ export interface LineItems { /** * Line items to add to the invoice. @@ -1795,13 +1862,13 @@ export namespace InvoiceUpdateParams { user: Create.ID | Create.ExternalID; /** - * @deprecated Total amount as a string in the smallest unit of the currency (for - * example, cents for USD). Deprecated, use price instead. + * @deprecated Total amount as a string in the smallest currency unit, such as + * cents for USD. Deprecated, use price instead. */ amount?: string; /** - * Currency code (ISO 4217 or crypto). + * ISO 4217 or crypto currency code. */ currency_code?: | 'ADA' @@ -2015,8 +2082,8 @@ export namespace InvoiceUpdateParams { */ export interface Price { /** - * Total amount as a string in the smallest unit of the currency (for example, - * cents for USD). Required if unit_price and quantity are not provided. + * Total amount as a string in the smallest currency unit, such as cents for USD. + * Required if unit_price and quantity are not provided. */ amount?: string; @@ -2026,8 +2093,7 @@ export namespace InvoiceUpdateParams { quantity?: number; /** - * Price per unit as a string in the smallest unit of the currency (for example, - * cents for USD). + * Price per unit as a string in the smallest currency unit, such as cents for USD. */ unit_price?: string; } @@ -2037,14 +2103,12 @@ export namespace InvoiceUpdateParams { */ export interface Tag { /** - * Tag key. Must be a valid safe string (no special characters like #, /, :). Max - * 50 characters. + * Tag key. Must not contain #, /, or :. Max 50 characters. */ key: string; /** - * Tag value. Must be a valid safe string (no special characters like #, /, :). Max - * 200 characters. + * Tag value. Must not contain #, /, or :. Max 200 characters. */ value: string; } @@ -2070,6 +2134,9 @@ export namespace InvoiceUpdateParams { price?: Update.Price; + /** + * Tag updates. + */ tags?: Update.Tags; } @@ -2081,38 +2148,37 @@ export namespace InvoiceUpdateParams { quantity: number; /** - * Price per unit as a string in the smallest unit of the currency (for example, - * cents for USD). + * Price per unit as a string in the smallest currency unit, such as cents for USD. */ unit_price: string; /** - * Total amount as a string in the smallest unit of the currency (for example, - * cents for USD). + * Total amount as a string in the smallest currency unit, such as cents for USD. */ amount?: string; } + /** + * Tag updates. + */ export interface Tags { /** - * Tags to add. Prefer `set` unless you specifically want create-only validation. + * Tags to create. The tag key must not already exist. */ create?: Array; /** - * Tags to remove by key. + * Tags to remove. */ delete?: Array; /** - * Tags to create or overwrite without requiring the caller to distinguish between - * create and update. + * Tags to set. Creates a new tag or updates an existing tag. */ set?: Array; /** - * Tags to update. The key identifies the existing tag; the value is the new value. - * Prefer `set` unless you specifically want update-only validation. + * Tags to update. The tag key must already exist. */ update?: Array; } @@ -2123,14 +2189,12 @@ export namespace InvoiceUpdateParams { */ export interface Create { /** - * Tag key. Must be a valid safe string (no special characters like #, /, :). Max - * 50 characters. + * Tag key. Must not contain #, /, or :. Max 50 characters. */ key: string; /** - * Tag value. Must be a valid safe string (no special characters like #, /, :). Max - * 200 characters. + * Tag value. Must not contain #, /, or :. Max 200 characters. */ value: string; } @@ -2147,14 +2211,12 @@ export namespace InvoiceUpdateParams { */ export interface Set { /** - * Tag key. Must be a valid safe string (no special characters like #, /, :). Max - * 50 characters. + * Tag key. Must not contain #, /, or :. Max 50 characters. */ key: string; /** - * Tag value. Must be a valid safe string (no special characters like #, /, :). Max - * 200 characters. + * Tag value. Must not contain #, /, or :. Max 200 characters. */ value: string; } @@ -2164,14 +2226,12 @@ export namespace InvoiceUpdateParams { */ export interface Update { /** - * Tag key. Must be a valid safe string (no special characters like #, /, :). Max - * 50 characters. + * Tag key. Must not contain #, /, or :. Max 50 characters. */ key: string; /** - * Tag value. Must be a valid safe string (no special characters like #, /, :). Max - * 200 characters. + * Tag value. Must not contain #, /, or :. Max 200 characters. */ value: string; } @@ -2179,26 +2239,27 @@ export namespace InvoiceUpdateParams { } } + /** + * Tag updates. + */ export interface Tags { /** - * Tags to add. Prefer `set` unless you specifically want create-only validation. + * Tags to create. The tag key must not already exist. */ create?: Array; /** - * Tags to remove by key. + * Tags to remove. */ delete?: Array; /** - * Tags to create or overwrite without requiring the caller to distinguish between - * create and update. + * Tags to set. Creates a new tag or updates an existing tag. */ set?: Array; /** - * Tags to update. The key identifies the existing tag; the value is the new value. - * Prefer `set` unless you specifically want update-only validation. + * Tags to update. The tag key must already exist. */ update?: Array; } @@ -2209,14 +2270,12 @@ export namespace InvoiceUpdateParams { */ export interface Create { /** - * Tag key. Must be a valid safe string (no special characters like #, /, :). Max - * 50 characters. + * Tag key. Must not contain #, /, or :. Max 50 characters. */ key: string; /** - * Tag value. Must be a valid safe string (no special characters like #, /, :). Max - * 200 characters. + * Tag value. Must not contain #, /, or :. Max 200 characters. */ value: string; } @@ -2233,14 +2292,12 @@ export namespace InvoiceUpdateParams { */ export interface Set { /** - * Tag key. Must be a valid safe string (no special characters like #, /, :). Max - * 50 characters. + * Tag key. Must not contain #, /, or :. Max 50 characters. */ key: string; /** - * Tag value. Must be a valid safe string (no special characters like #, /, :). Max - * 200 characters. + * Tag value. Must not contain #, /, or :. Max 200 characters. */ value: string; } @@ -2250,14 +2307,12 @@ export namespace InvoiceUpdateParams { */ export interface Update { /** - * Tag key. Must be a valid safe string (no special characters like #, /, :). Max - * 50 characters. + * Tag key. Must not contain #, /, or :. Max 50 characters. */ key: string; /** - * Tag value. Must be a valid safe string (no special characters like #, /, :). Max - * 200 characters. + * Tag value. Must not contain #, /, or :. Max 200 characters. */ value: string; } @@ -2273,7 +2328,7 @@ export interface InvoiceSearchParams { /** * Pagination parameters. */ - page_info: InvoiceSearchParams.PageInfo; + page_info?: InvoiceSearchParams.PageInfo; } export namespace InvoiceSearchParams { @@ -2301,12 +2356,12 @@ export namespace InvoiceSearchParams { */ export interface Tags { /** - * Returns invoices matching every specified tag (AND). + * Returns invoices matching every specified tag, using AND logic. */ all?: Array; /** - * Returns invoices matching at least one of the specified tags (OR). + * Returns invoices matching at least one of the specified tags, using OR logic. */ any?: Array; } diff --git a/src/resources/transactions.ts b/src/resources/transactions.ts index fa75362..bf2af2a 100644 --- a/src/resources/transactions.ts +++ b/src/resources/transactions.ts @@ -1,6 +1,7 @@ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; +import * as TransactionsAPI from './transactions'; import { APIPromise } from '../core/api-promise'; import { RequestOptions } from '../internal/request-options'; import { path } from '../internal/utils/path'; @@ -103,7 +104,7 @@ export class Transactions extends APIResource { * @example * ```ts * const response = await client.transactions.search({ - * filter: { account: { any: [{}] } }, + * filter: {}, * }); * ``` */ @@ -150,8 +151,8 @@ export interface Transaction { allocations: Array; /** - * Transaction amount, as a string in the smallest unit of the currency (for - * example, cents for USD). Can be positive or negative. + * Transaction amount, as a string in the smallest currency unit, such as cents for + * USD. Can be positive or negative. */ amount: string; @@ -161,7 +162,7 @@ export interface Transaction { created: string; /** - * Currency code (ISO 4217 or crypto). + * ISO 4217 or crypto currency code. */ currency: | 'ADA' @@ -396,8 +397,8 @@ export namespace Transaction { */ export interface Allocation { /** - * Allocated amount, as a positive string in the smallest unit of the currency (for - * example, cents for USD). + * Allocated amount, as a positive string in the smallest currency unit, such as + * cents for USD. */ amount: string; @@ -412,14 +413,14 @@ export namespace Transaction { type: 'invoice_payin' | 'invoice_payout'; /** - * User reference. + * User associated with the allocation. */ user: Allocation.User; } export namespace Allocation { /** - * User reference. + * User associated with the allocation. */ export interface User { /** @@ -487,9 +488,38 @@ export interface TransactionListHistoryResponse { export interface TransactionSearchResponse { /** - * List of transaction search results. + * @deprecated Deprecated. Use `data_v2.transactions` instead. Returns the full + * unpaginated list of matching transactions. */ data: Array; + + data_v2: TransactionSearchResponse.DataV2; +} + +export namespace TransactionSearchResponse { + export interface DataV2 { + /** + * Pagination cursors. + */ + page_info: DataV2.PageInfo; + + /** + * Transactions matching the search criteria. + */ + transactions: Array; + } + + export namespace DataV2 { + /** + * Pagination cursors. + */ + export interface PageInfo { + /** + * Cursor to fetch the next page of results. + */ + next_cursor?: string; + } + } } export interface TransactionSearchAllocationsResponse { @@ -510,8 +540,8 @@ export namespace TransactionSearchAllocationsResponse { id: string; /** - * Allocated amount, as a positive string in the smallest unit of the currency (for - * example, cents for USD). + * Allocated amount, as a positive string in the smallest currency unit, such as + * cents for USD. */ amount: string; @@ -526,7 +556,7 @@ export namespace TransactionSearchAllocationsResponse { posted: string; /** - * Transaction reference. + * Transaction the allocation is applied to. */ transaction: Data.Transaction; @@ -536,14 +566,14 @@ export namespace TransactionSearchAllocationsResponse { type: 'invoice_payin' | 'invoice_payout'; /** - * User reference. + * User associated with the allocation. */ user: Data.User; } export namespace Data { /** - * Transaction reference. + * Transaction the allocation is applied to. */ export interface Transaction { /** @@ -558,7 +588,7 @@ export namespace TransactionSearchAllocationsResponse { } /** - * User reference. + * User associated with the allocation. */ export interface User { /** @@ -587,13 +617,13 @@ export interface TransactionCreateParams { allocations: Array; /** - * Transaction amount, as a string in the smallest unit of the currency (for - * example, cents for USD). Can be positive or negative. + * Transaction amount, as a string in the smallest currency unit, such as cents for + * USD. Can be positive or negative. */ amount: string; /** - * Currency code (ISO 4217 or crypto). + * ISO 4217 or crypto currency code. */ currency: | 'ADA' @@ -814,8 +844,8 @@ export namespace TransactionCreateParams { */ export interface Allocation { /** - * Allocation amount, as a positive string in the smallest unit of the currency - * (for example, cents for USD). + * Allocation amount, as a positive string in the smallest currency unit, such as + * cents for USD. */ amount: string; @@ -856,14 +886,12 @@ export namespace TransactionCreateParams { */ export interface Tag { /** - * Tag key. Must be a valid safe string (no special characters like #, /, :). Max - * 50 characters. + * Tag key. Must not contain #, /, or :. Max 50 characters. */ key: string; /** - * Tag value. Must be a valid safe string (no special characters like #, /, :). Max - * 200 characters. + * Tag value. Must not contain #, /, or :. Max 200 characters. */ value: string; } @@ -875,12 +903,21 @@ export interface TransactionUpdateParams { */ current_transaction_version: number; + /** + * Allocation updates. + */ allocations?: TransactionUpdateParams.Allocations; + /** + * Tag updates. + */ tags?: TransactionUpdateParams.Tags; } export namespace TransactionUpdateParams { + /** + * Allocation updates. + */ export interface Allocations { /** * Allocations to create. @@ -899,8 +936,8 @@ export namespace TransactionUpdateParams { */ export interface Create { /** - * Allocation amount, as a positive string in the smallest unit of the currency - * (for example, cents for USD). + * Allocation amount, as a positive string in the smallest currency unit, such as + * cents for USD. */ amount: string; @@ -943,33 +980,34 @@ export namespace TransactionUpdateParams { id: string; /** - * Updated allocation amount, as a positive string in the smallest unit of the - * currency (for example, cents for USD). + * Updated allocation amount, as a positive string in the smallest currency unit, + * such as cents for USD. */ amount: string; } } + /** + * Tag updates. + */ export interface Tags { /** - * Tags to add. Prefer `set` unless you specifically want create-only validation. + * Tags to create. The tag key must not already exist. */ create?: Array; /** - * Tags to remove by key. + * Tags to remove. */ delete?: Array; /** - * Tags to create or overwrite without requiring the caller to distinguish between - * create and update. + * Tags to set. Creates a new tag or updates an existing tag. */ set?: Array; /** - * Tags to update. The key identifies the existing tag; the value is the new value. - * Prefer `set` unless you specifically want update-only validation. + * Tags to update. The tag key must already exist. */ update?: Array; } @@ -980,14 +1018,12 @@ export namespace TransactionUpdateParams { */ export interface Create { /** - * Tag key. Must be a valid safe string (no special characters like #, /, :). Max - * 50 characters. + * Tag key. Must not contain #, /, or :. Max 50 characters. */ key: string; /** - * Tag value. Must be a valid safe string (no special characters like #, /, :). Max - * 200 characters. + * Tag value. Must not contain #, /, or :. Max 200 characters. */ value: string; } @@ -1004,14 +1040,12 @@ export namespace TransactionUpdateParams { */ export interface Set { /** - * Tag key. Must be a valid safe string (no special characters like #, /, :). Max - * 50 characters. + * Tag key. Must not contain #, /, or :. Max 50 characters. */ key: string; /** - * Tag value. Must be a valid safe string (no special characters like #, /, :). Max - * 200 characters. + * Tag value. Must not contain #, /, or :. Max 200 characters. */ value: string; } @@ -1021,14 +1055,12 @@ export namespace TransactionUpdateParams { */ export interface Update { /** - * Tag key. Must be a valid safe string (no special characters like #, /, :). Max - * 50 characters. + * Tag key. Must not contain #, /, or :. Max 50 characters. */ key: string; /** - * Tag value. Must be a valid safe string (no special characters like #, /, :). Max - * 200 characters. + * Tag value. Must not contain #, /, or :. Max 200 characters. */ value: string; } @@ -1055,6 +1087,11 @@ export interface TransactionSearchParams { * Filter for searching transactions. */ filter: TransactionSearchParams.Filter; + + /** + * Pagination parameters. + */ + page_info?: TransactionSearchParams.PageInfo; } export namespace TransactionSearchParams { @@ -1062,13 +1099,25 @@ export namespace TransactionSearchParams { * Filter for searching transactions. */ export interface Filter { - account: Filter.Account; + /** + * Account filter. + */ + account?: Filter.Account; + + /** + * Tag-based filter criteria. When both `any` and `all` are provided, results must + * match every entry in `all` AND at least one entry in `any`. + */ + tags?: Filter.Tags; } export namespace Filter { + /** + * Account filter. + */ export interface Account { /** - * Match transactions belonging to any of these accounts (OR). + * Match transactions belonging to any of these accounts, using OR logic. */ any: Array; } @@ -1090,6 +1139,74 @@ export namespace TransactionSearchParams { external_id?: string; } } + + /** + * Tag-based filter criteria. When both `any` and `all` are provided, results must + * match every entry in `all` AND at least one entry in `any`. + */ + export interface Tags { + /** + * Returns transactions matching every specified tag, using AND logic. + */ + all?: Array; + + /** + * Returns transactions matching at least one of the specified tags, using OR + * logic. + */ + any?: Array; + } + + export namespace Tags { + /** + * A tag filter. + */ + export interface All { + /** + * Tag key to filter on. Must be an exact match; wildcards are not supported. + */ + key: string; + + /** + * Tag value pattern to filter on. Supports wildcards: `*` matches any characters, + * `?` matches a single character. Use `\*` or `\?` to match literal asterisks or + * question marks. Use `*` to match any value for the given key. + */ + value: string; + } + + /** + * A tag filter. + */ + export interface Any { + /** + * Tag key to filter on. Must be an exact match; wildcards are not supported. + */ + key: string; + + /** + * Tag value pattern to filter on. Supports wildcards: `*` matches any characters, + * `?` matches a single character. Use `\*` or `\?` to match literal asterisks or + * question marks. Use `*` to match any value for the given key. + */ + value: string; + } + } + } + + /** + * Pagination parameters. + */ + export interface PageInfo { + /** + * Cursor for fetching the next page of results. + */ + after?: string; + + /** + * Number of results to return. Defaults to 20. + */ + limit?: number; } } @@ -1105,13 +1222,19 @@ export namespace TransactionSearchAllocationsParams { * Filter for searching transaction allocations. */ export interface Filter { + /** + * Invoice ID filter. + */ invoice_id: Filter.InvoiceID; } export namespace Filter { + /** + * Invoice ID filter. + */ export interface InvoiceID { /** - * Match allocations where invoice_id is any of these values (OR). + * Match allocations where invoice_id is any of these values, using OR logic. */ any: Array; } diff --git a/src/resources/users.ts b/src/resources/users.ts index b638753..bfc83f3 100644 --- a/src/resources/users.ts +++ b/src/resources/users.ts @@ -67,6 +67,9 @@ export interface UserCreateResponse { * List of users. */ export interface UserListResponse { + /** + * List of users. + */ data: Array; } diff --git a/tests/api-resources/invoices.test.ts b/tests/api-resources/invoices.test.ts index 473215b..0200c27 100644 --- a/tests/api-resources/invoices.test.ts +++ b/tests/api-resources/invoices.test.ts @@ -48,10 +48,10 @@ describe('resource invoices', () => { quantity: 2, unit_price: '500', }, - tags: [{ key: 'region', value: 'us-east' }], + tags: [{ key: 'department', value: 'engineering' }], }, ], - tags: [{ key: 'region', value: 'us-east' }], + tags: [{ key: 'department', value: 'engineering' }], }); }); @@ -97,7 +97,7 @@ describe('resource invoices', () => { quantity: 2, unit_price: '500', }, - tags: [{ key: 'region', value: 'us-east' }], + tags: [{ key: 'department', value: 'engineering' }], }, ], delete: [{ id: 'id' }], @@ -111,19 +111,19 @@ describe('resource invoices', () => { amount: '2000', }, tags: { - create: [{ key: 'region', value: 'us-east' }], + create: [{ key: 'department', value: 'engineering' }], delete: [{ key: 'key' }], - set: [{ key: 'region', value: 'eu-west-1' }], - update: [{ key: 'region', value: 'us-east' }], + set: [{ key: 'department', value: 'engineering' }], + update: [{ key: 'department', value: 'engineering' }], }, }, ], }, tags: { - create: [{ key: 'region', value: 'us-east' }], + create: [{ key: 'department', value: 'engineering' }], delete: [{ key: 'key' }], - set: [{ key: 'region', value: 'eu-west-1' }], - update: [{ key: 'region', value: 'us-east' }], + set: [{ key: 'department', value: 'engineering' }], + update: [{ key: 'department', value: 'engineering' }], }, }); }); @@ -154,10 +154,7 @@ describe('resource invoices', () => { // Mock server tests are disabled test.skip('search: only required params', async () => { - const responsePromise = client.invoices.search({ - filter: {}, - page_info: {}, - }); + const responsePromise = client.invoices.search({ filter: {} }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -172,7 +169,10 @@ describe('resource invoices', () => { const response = await client.invoices.search({ filter: { status: 'open', - tags: { all: [{ key: 'env', value: 'prod' }], any: [{ key: 'region', value: 'us-*' }] }, + tags: { + all: [{ key: 'department', value: 'engineering' }], + any: [{ key: 'department', value: 'eng*' }], + }, }, page_info: { after: 'after', limit: 20 }, }); diff --git a/tests/api-resources/transactions.test.ts b/tests/api-resources/transactions.test.ts index 5d41ee5..98d3e67 100644 --- a/tests/api-resources/transactions.test.ts +++ b/tests/api-resources/transactions.test.ts @@ -51,7 +51,7 @@ describe('resource transactions', () => { currency: 'USD', external_id: 'bank_txn_123', posted: '2024-01-13T00:00:00Z', - tags: [{ key: 'region', value: 'us-east' }], + tags: [{ key: 'department', value: 'engineering' }], }); }); @@ -95,10 +95,10 @@ describe('resource transactions', () => { update: [{ id: 'alloc_abc123', amount: '2000' }], }, tags: { - create: [{ key: 'region', value: 'us-east' }], + create: [{ key: 'department', value: 'engineering' }], delete: [{ key: 'key' }], - set: [{ key: 'region', value: 'eu-west-1' }], - update: [{ key: 'region', value: 'us-east' }], + set: [{ key: 'department', value: 'engineering' }], + update: [{ key: 'department', value: 'engineering' }], }, }); }); @@ -140,7 +140,7 @@ describe('resource transactions', () => { // Mock server tests are disabled test.skip('search: only required params', async () => { - const responsePromise = client.transactions.search({ filter: { account: { any: [{}] } } }); + const responsePromise = client.transactions.search({ filter: {} }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -153,7 +153,14 @@ describe('resource transactions', () => { // Mock server tests are disabled test.skip('search: required and optional params', async () => { const response = await client.transactions.search({ - filter: { account: { any: [{ id: 'ext_account_YWJjMTIz', external_id: 'acct_external_123' }] } }, + filter: { + account: { any: [{ id: 'ext_account_YWJjMTIz', external_id: 'acct_external_123' }] }, + tags: { + all: [{ key: 'department', value: 'engineering' }], + any: [{ key: 'department', value: 'eng*' }], + }, + }, + page_info: { after: 'after', limit: 20 }, }); }); From f7dd8dba2004da00c414f1e3b1daa186775c84c7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 21:04:40 +0000 Subject: [PATCH 11/11] release: 0.21.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 25 +++++++++++++++++++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 71e95ba..d353515 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.20.0" + ".": "0.21.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index d7370e7..6b5318c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## 0.21.0 (2026-04-13) + +Full Changelog: [v0.20.0...v0.21.0](https://github.com/fragment-dev/fragment-typescript/compare/v0.20.0...v0.21.0) + +### Features + +* **api:** update SDK from prod (511af1bcd4001be60c589fed1d05a5814e416679) ([484943a](https://github.com/fragment-dev/fragment-typescript/commit/484943a2f97b25aa4949d112a892884a03f28534)) +* **api:** update SDK from prod (523b1fdd6cc6b5732ccdad5095c21f69fe1f7489) ([91ee3b5](https://github.com/fragment-dev/fragment-typescript/commit/91ee3b5837e439946ba9c2a4beff1b6e44c7bca0)) +* **api:** update SDK from prod (729db28098a20ebc22e879a2cd1c6ad860f9ce4c) ([99ffd26](https://github.com/fragment-dev/fragment-typescript/commit/99ffd26009fa316ca340db2e8e83155a970b2c62)) +* **api:** update SDK from prod (8051461980fb65468797d0b82dfa42dee9014004) ([79a14d1](https://github.com/fragment-dev/fragment-typescript/commit/79a14d16c8774e9226d928a7634d1c26cf2044b0)) +* **api:** update SDK from prod (a5eb093078fe5947a299bccafd30a0c7f2e90790) ([a6843ba](https://github.com/fragment-dev/fragment-typescript/commit/a6843ba30ed876c02ace9e0746986ee1ce0c6e93)) +* **api:** update SDK from prod (b3080493fb6bb118abdd03644b9ef6f59d417a3c) ([b0123c3](https://github.com/fragment-dev/fragment-typescript/commit/b0123c3ca8e5b901d945eca65808ff5948bb357b)) +* **api:** update SDK from prod (b8f6f1940acd3d10fc17aaeb59cd75281f3c6436) ([68cebf4](https://github.com/fragment-dev/fragment-typescript/commit/68cebf44aacd4feba688a21d83d1848aa4a1e684)) +* **api:** update SDK from prod (e1ebb9e4d62034855202a8ff99690880c072d953) ([aeff356](https://github.com/fragment-dev/fragment-typescript/commit/aeff3566c323f4bb81fc93ea3c9c9812b493d4a1)) + + +### Bug Fixes + +* **internal:** gitignore generated `oidc` dir ([b489349](https://github.com/fragment-dev/fragment-typescript/commit/b4893492a7003c791297067170805d88e1a08a72)) + + +### Chores + +* **internal:** codegen related update ([558e630](https://github.com/fragment-dev/fragment-typescript/commit/558e630e873639730aa5c1a967ada782791378d5)) + ## 0.20.0 (2026-03-27) Full Changelog: [v0.19.0...v0.20.0](https://github.com/fragment-dev/fragment-typescript/compare/v0.19.0...v0.20.0) diff --git a/package.json b/package.json index 741ecba..a99da10 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@fragment-dev/ts-node", - "version": "0.20.0", + "version": "0.21.0", "description": "The official TypeScript library for the Fragment API", "author": "Fragment <>", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index b4e51da..bc95435 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '0.20.0'; // x-release-please-version +export const VERSION = '0.21.0'; // x-release-please-version