Initial project import

This commit is contained in:
drjones
2026-06-13 17:36:44 -07:00
commit ad2a18cc8d
18471 changed files with 4497570 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
export interface AccountOwner {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'financial_connections.account_owner';
/**
* The email address of the owner.
*/
email: string | null;
/**
* The full name of the owner.
*/
name: string;
/**
* The ownership object that this owner belongs to.
*/
ownership: string;
/**
* The raw phone number of the owner.
*/
phone: string | null;
/**
* The raw physical address of the owner.
*/
raw_address: string | null;
/**
* The timestamp of the refresh that updated this owner.
*/
refreshed_at: number | null;
}

View File

@@ -0,0 +1,4 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=AccountOwners.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"AccountOwners.js","sourceRoot":"","sources":["../../../src/resources/FinancialConnections/AccountOwners.ts"],"names":[],"mappings":";AAAA,uCAAuC"}

View File

@@ -0,0 +1,20 @@
import { AccountOwner } from './AccountOwners.js';
import { ApiList } from '../../lib.js';
export interface AccountOwnership {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'financial_connections.account_ownership';
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* A paginated list of owners for this account.
*/
owners: ApiList<AccountOwner>;
}

View File

@@ -0,0 +1,4 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=AccountOwnerships.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"AccountOwnerships.js","sourceRoot":"","sources":["../../../src/resources/FinancialConnections/AccountOwnerships.ts"],"names":[],"mappings":";AAAA,uCAAuC"}

View File

@@ -0,0 +1,383 @@
import { StripeResource } from '../../StripeResource.js';
import { AccountOwner } from './AccountOwners.js';
import { AccountOwnership } from './AccountOwnerships.js';
import { Customer } from './../Customers.js';
import { PaginationParams } from '../../shared.js';
import { RequestOptions, ApiListPromise, Response } from '../../lib.js';
export declare class AccountResource extends StripeResource {
/**
* Returns a list of Financial Connections Account objects.
*/
list(params?: FinancialConnections.AccountListParams, options?: RequestOptions): ApiListPromise<Account>;
/**
* Retrieves the details of an Financial Connections Account.
*/
retrieve(id: string, params?: FinancialConnections.AccountRetrieveParams, options?: RequestOptions): Promise<Response<Account>>;
/**
* Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).
*/
disconnect(id: string, params?: FinancialConnections.AccountDisconnectParams, options?: RequestOptions): Promise<Response<Account>>;
/**
* Refreshes the data associated with a Financial Connections Account.
*/
refresh(id: string, params: FinancialConnections.AccountRefreshParams, options?: RequestOptions): Promise<Response<Account>>;
/**
* Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day.
*/
subscribe(id: string, params: FinancialConnections.AccountSubscribeParams, options?: RequestOptions): Promise<Response<Account>>;
/**
* Unsubscribes from periodic refreshes of data associated with a Financial Connections Account.
*/
unsubscribe(id: string, params: FinancialConnections.AccountUnsubscribeParams, options?: RequestOptions): Promise<Response<Account>>;
/**
* Lists all owners for a given Account
*/
listOwners(id: string, params: FinancialConnections.AccountListOwnersParams, options?: RequestOptions): ApiListPromise<AccountOwner>;
}
export interface Account {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'financial_connections.account';
/**
* The account holder that this account belongs to.
*/
account_holder: FinancialConnections.Account.AccountHolder | null;
/**
* Details about the account numbers.
*/
account_numbers: Array<FinancialConnections.Account.AccountNumber> | null;
/**
* The most recent information about the account's balance.
*/
balance: FinancialConnections.Account.Balance | null;
/**
* The state of the most recent attempt to refresh the account balance.
*/
balance_refresh: FinancialConnections.Account.BalanceRefresh | null;
/**
* The type of the account. Account category is further divided in `subcategory`.
*/
category: FinancialConnections.Account.Category;
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created: number;
/**
* A human-readable name that has been assigned to this account, either by the account holder or by the institution.
*/
display_name: string | null;
/**
* The name of the institution that holds this account.
*/
institution_name: string;
/**
* The last 4 digits of the account number. If present, this will be 4 numeric characters.
*/
last4: string | null;
/**
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
*/
livemode: boolean;
/**
* The most recent information about the account's owners.
*/
ownership: string | AccountOwnership | null;
/**
* The state of the most recent attempt to refresh the account owners.
*/
ownership_refresh: FinancialConnections.Account.OwnershipRefresh | null;
/**
* The list of permissions granted by this account.
*/
permissions: Array<FinancialConnections.Account.Permission> | null;
/**
* The status of the link to the account.
*/
status: FinancialConnections.Account.Status;
/**
* If `category` is `cash`, one of:
*
* - `checking`
* - `savings`
* - `other`
*
* If `category` is `credit`, one of:
*
* - `mortgage`
* - `line_of_credit`
* - `credit_card`
* - `other`
*
* If `category` is `investment` or `other`, this will be `other`.
*/
subcategory: FinancialConnections.Account.Subcategory;
/**
* The list of data refresh subscriptions requested on this account.
*/
subscriptions: Array<'transactions'> | null;
/**
* The [PaymentMethod type](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account.
*/
supported_payment_method_types: Array<FinancialConnections.Account.SupportedPaymentMethodType>;
/**
* The state of the most recent attempt to refresh the account transactions.
*/
transaction_refresh: FinancialConnections.Account.TransactionRefresh | null;
}
export declare namespace FinancialConnections {
namespace Account {
interface AccountHolder {
/**
* The ID of the Stripe account that this account belongs to. Only available when `account_holder.type` is `account`.
*/
account?: string | Account;
/**
* The ID for an Account representing a customer that this account belongs to. Only available when `account_holder.type` is `customer`.
*/
customer?: string | Customer;
customer_account?: string;
/**
* Type of account holder that this account belongs to.
*/
type: AccountHolder.Type;
}
interface AccountNumber {
/**
* When the account number is expected to expire, if applicable.
*/
expected_expiry_date: number | null;
/**
* The type of account number associated with the account.
*/
identifier_type: AccountNumber.IdentifierType;
/**
* Whether the account number is currently active and usable for transactions.
*/
status: AccountNumber.Status;
/**
* The payment networks that the account number can be used for.
*/
supported_networks: Array<'ach'>;
}
interface Balance {
/**
* The time that the external institution calculated this balance. Measured in seconds since the Unix epoch.
*/
as_of: number;
cash?: Balance.Cash;
credit?: Balance.Credit;
/**
* The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions.
*
* Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
*
* Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
*/
current: {
[key: string]: number;
};
/**
* The `type` of the balance. An additional hash is included on the balance with a name matching this value.
*/
type: Balance.Type;
}
interface BalanceRefresh {
/**
* The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
*/
last_attempted_at: number;
/**
* Time at which the next balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch.
*/
next_refresh_available_at: number | null;
/**
* The status of the last refresh attempt.
*/
status: BalanceRefresh.Status;
}
type Category = 'cash' | 'credit' | 'investment' | 'other';
interface OwnershipRefresh {
/**
* The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
*/
last_attempted_at: number;
/**
* Time at which the next ownership refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch.
*/
next_refresh_available_at: number | null;
/**
* The status of the last refresh attempt.
*/
status: OwnershipRefresh.Status;
}
type Permission = 'balances' | 'ownership' | 'payment_method' | 'transactions';
type Status = 'active' | 'disconnected' | 'inactive';
type Subcategory = 'checking' | 'credit_card' | 'line_of_credit' | 'mortgage' | 'other' | 'savings';
type SupportedPaymentMethodType = 'link' | 'us_bank_account';
interface TransactionRefresh {
/**
* Unique identifier for the object.
*/
id: string;
/**
* The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
*/
last_attempted_at: number;
/**
* Time at which the next transaction refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch.
*/
next_refresh_available_at: number | null;
/**
* The status of the last refresh attempt.
*/
status: TransactionRefresh.Status;
}
namespace AccountHolder {
type Type = 'account' | 'customer';
}
namespace AccountNumber {
type IdentifierType = 'account_number' | 'tokenized_account_number';
type Status = 'deactivated' | 'transactable';
}
namespace Balance {
interface Cash {
/**
* The funds available to the account holder. Typically this is the current balance after subtracting any outbound pending transactions and adding any inbound pending transactions.
*
* Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
*
* Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
*/
available: {
[key: string]: number;
} | null;
}
interface Credit {
/**
* The credit that has been used by the account holder.
*
* Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
*
* Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
*/
used: {
[key: string]: number;
} | null;
}
type Type = 'cash' | 'credit';
}
namespace BalanceRefresh {
type Status = 'failed' | 'pending' | 'succeeded';
}
namespace OwnershipRefresh {
type Status = 'failed' | 'pending' | 'succeeded';
}
namespace TransactionRefresh {
type Status = 'failed' | 'pending' | 'succeeded';
}
}
}
export declare namespace FinancialConnections {
interface AccountRetrieveParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace FinancialConnections {
interface AccountListParams extends PaginationParams {
/**
* If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive.
*/
account_holder?: AccountListParams.AccountHolder;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* If present, only return accounts that were collected as part of the given session.
*/
session?: string;
}
namespace AccountListParams {
interface AccountHolder {
/**
* The ID of the Stripe account whose accounts you will retrieve.
*/
account?: string;
/**
* The ID of the Stripe customer whose accounts you will retrieve.
*/
customer?: string;
/**
* The ID of the Account representing a customer whose accounts you will retrieve.
*/
customer_account?: string;
}
}
}
export declare namespace FinancialConnections {
interface AccountDisconnectParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace FinancialConnections {
interface AccountListOwnersParams extends PaginationParams {
/**
* The ID of the ownership object to fetch owners from.
*/
ownership: string;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace FinancialConnections {
interface AccountRefreshParams {
/**
* The list of account features that you would like to refresh.
*/
features: Array<AccountRefreshParams.Feature>;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
namespace AccountRefreshParams {
type Feature = 'balance' | 'ownership' | 'transactions';
}
}
export declare namespace FinancialConnections {
interface AccountSubscribeParams {
/**
* The list of account features to which you would like to subscribe.
*/
features: Array<'transactions'>;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace FinancialConnections {
interface AccountUnsubscribeParams {
/**
* The list of account features from which you would like to unsubscribe.
*/
features: Array<'transactions'>;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}

View File

@@ -0,0 +1,55 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.AccountResource = void 0;
const StripeResource_js_1 = require("../../StripeResource.js");
class AccountResource extends StripeResource_js_1.StripeResource {
/**
* Returns a list of Financial Connections Account objects.
*/
list(params, options) {
return this._makeRequest('GET', '/v1/financial_connections/accounts', params, options, {
methodType: 'list',
});
}
/**
* Retrieves the details of an Financial Connections Account.
*/
retrieve(id, params, options) {
return this._makeRequest('GET', `/v1/financial_connections/accounts/${encodeURIComponent(id)}`, params, options);
}
/**
* Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).
*/
disconnect(id, params, options) {
return this._makeRequest('POST', `/v1/financial_connections/accounts/${encodeURIComponent(id)}/disconnect`, params, options);
}
/**
* Refreshes the data associated with a Financial Connections Account.
*/
refresh(id, params, options) {
return this._makeRequest('POST', `/v1/financial_connections/accounts/${encodeURIComponent(id)}/refresh`, params, options);
}
/**
* Subscribes to periodic refreshes of data associated with a Financial Connections Account. When the account status is active, data is typically refreshed once a day.
*/
subscribe(id, params, options) {
return this._makeRequest('POST', `/v1/financial_connections/accounts/${encodeURIComponent(id)}/subscribe`, params, options);
}
/**
* Unsubscribes from periodic refreshes of data associated with a Financial Connections Account.
*/
unsubscribe(id, params, options) {
return this._makeRequest('POST', `/v1/financial_connections/accounts/${encodeURIComponent(id)}/unsubscribe`, params, options);
}
/**
* Lists all owners for a given Account
*/
listOwners(id, params, options) {
return this._makeRequest('GET', `/v1/financial_connections/accounts/${encodeURIComponent(id)}/owners`, params, options, {
methodType: 'list',
});
}
}
exports.AccountResource = AccountResource;
//# sourceMappingURL=Accounts.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Accounts.js","sourceRoot":"","sources":["../../../src/resources/FinancialConnections/Accounts.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAEvC,+DAAuD;AAOvD,MAAa,eAAgB,SAAQ,kCAAc;IACjD;;OAEG;IACH,IAAI,CACF,MAA+C,EAC/C,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,oCAAoC,EACpC,MAAM,EACN,OAAO,EACP;YACE,UAAU,EAAE,MAAM;SACnB,CACK,CAAC;IACX,CAAC;IACD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAAmD,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,sCAAsC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAC9D,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,UAAU,CACR,EAAU,EACV,MAAqD,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,sCAAsC,kBAAkB,CAAC,EAAE,CAAC,aAAa,EACzE,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,OAAO,CACL,EAAU,EACV,MAAiD,EACjD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,sCAAsC,kBAAkB,CAAC,EAAE,CAAC,UAAU,EACtE,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,SAAS,CACP,EAAU,EACV,MAAmD,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,sCAAsC,kBAAkB,CAAC,EAAE,CAAC,YAAY,EACxE,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,WAAW,CACT,EAAU,EACV,MAAqD,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,sCAAsC,kBAAkB,CACtD,EAAE,CACH,cAAc,EACf,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,UAAU,CACR,EAAU,EACV,MAAoD,EACpD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,sCAAsC,kBAAkB,CAAC,EAAE,CAAC,SAAS,EACrE,MAAM,EACN,OAAO,EACP;YACE,UAAU,EAAE,MAAM;SACnB,CACK,CAAC;IACX,CAAC;CACF;AAjHD,0CAiHC"}

View File

@@ -0,0 +1,166 @@
import { StripeResource } from '../../StripeResource.js';
import { Account } from './Accounts.js';
import { Customer } from './../Customers.js';
import { RequestOptions, Response, ApiList } from '../../lib.js';
export declare class SessionResource extends StripeResource {
/**
* Retrieves the details of a Financial Connections Session
*/
retrieve(id: string, params?: FinancialConnections.SessionRetrieveParams, options?: RequestOptions): Promise<Response<Session>>;
/**
* To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js.
*/
create(params: FinancialConnections.SessionCreateParams, options?: RequestOptions): Promise<Response<Session>>;
}
export interface Session {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'financial_connections.session';
/**
* The account holder for whom accounts are collected in this session.
*/
account_holder: FinancialConnections.Session.AccountHolder | null;
/**
* The accounts that were collected as part of this Session.
*/
accounts: ApiList<Account>;
/**
* A value that will be passed to the client to launch the authentication flow.
*/
client_secret: string | null;
filters?: FinancialConnections.Session.Filters;
/**
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
*/
livemode: boolean;
/**
* Permissions requested for accounts collected during this session.
*/
permissions: Array<FinancialConnections.Session.Permission>;
/**
* Data features requested to be retrieved upon account creation.
*/
prefetch: Array<FinancialConnections.Session.Prefetch> | null;
/**
* For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
*/
return_url?: string;
}
export declare namespace FinancialConnections {
namespace Session {
interface AccountHolder {
/**
* The ID of the Stripe account that this account belongs to. Only available when `account_holder.type` is `account`.
*/
account?: string | Account;
/**
* The ID for an Account representing a customer that this account belongs to. Only available when `account_holder.type` is `customer`.
*/
customer?: string | Customer;
customer_account?: string;
/**
* Type of account holder that this account belongs to.
*/
type: AccountHolder.Type;
}
interface Filters {
/**
* Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`.
*/
account_subcategories: Array<Filters.AccountSubcategory> | null;
/**
* List of countries from which to filter accounts.
*/
countries: Array<string> | null;
}
type Permission = 'balances' | 'ownership' | 'payment_method' | 'transactions';
type Prefetch = 'balances' | 'ownership' | 'transactions';
namespace AccountHolder {
type Type = 'account' | 'customer';
}
namespace Filters {
type AccountSubcategory = 'checking' | 'credit_card' | 'line_of_credit' | 'mortgage' | 'savings';
}
}
}
export declare namespace FinancialConnections {
interface SessionCreateParams {
/**
* The account holder to link accounts for.
*/
account_holder: SessionCreateParams.AccountHolder;
/**
* List of data features that you would like to request access to.
*
* Possible values are `balances`, `transactions`, `ownership`, and `payment_method`.
*/
permissions: Array<SessionCreateParams.Permission>;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* Filters to restrict the kinds of accounts to collect.
*/
filters?: SessionCreateParams.Filters;
/**
* List of data features that you would like to retrieve upon account creation.
*/
prefetch?: Array<SessionCreateParams.Prefetch>;
/**
* For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
*/
return_url?: string;
}
namespace SessionCreateParams {
interface AccountHolder {
/**
* The ID of the Stripe account whose accounts you will retrieve. Only available when `type` is `account`.
*/
account?: string;
/**
* The ID of the Stripe customer whose accounts you will retrieve. Only available when `type` is `customer`.
*/
customer?: string;
/**
* The ID of Account representing a customer whose accounts you will retrieve. Only available when `type` is `customer`.
*/
customer_account?: string;
/**
* Type of account holder to collect accounts for.
*/
type: AccountHolder.Type;
}
type Permission = 'balances' | 'ownership' | 'payment_method' | 'transactions';
interface Filters {
/**
* Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`.
*/
account_subcategories?: Array<Filters.AccountSubcategory>;
/**
* List of countries from which to collect accounts.
*/
countries?: Array<string>;
}
type Prefetch = 'balances' | 'ownership' | 'transactions';
namespace AccountHolder {
type Type = 'account' | 'customer';
}
namespace Filters {
type AccountSubcategory = 'checking' | 'credit_card' | 'line_of_credit' | 'mortgage' | 'savings';
}
}
}
export declare namespace FinancialConnections {
interface SessionRetrieveParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}

View File

@@ -0,0 +1,21 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.SessionResource = void 0;
const StripeResource_js_1 = require("../../StripeResource.js");
class SessionResource extends StripeResource_js_1.StripeResource {
/**
* Retrieves the details of a Financial Connections Session
*/
retrieve(id, params, options) {
return this._makeRequest('GET', `/v1/financial_connections/sessions/${encodeURIComponent(id)}`, params, options);
}
/**
* To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js.
*/
create(params, options) {
return this._makeRequest('POST', '/v1/financial_connections/sessions', params, options);
}
}
exports.SessionResource = SessionResource;
//# sourceMappingURL=Sessions.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Sessions.js","sourceRoot":"","sources":["../../../src/resources/FinancialConnections/Sessions.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAEvC,+DAAuD;AAKvD,MAAa,eAAgB,SAAQ,kCAAc;IACjD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAAmD,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,sCAAsC,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAC9D,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;IACD;;OAEG;IACH,MAAM,CACJ,MAAgD,EAChD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,MAAM,EACN,oCAAoC,EACpC,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF;AA9BD,0CA8BC"}

View File

@@ -0,0 +1,111 @@
import { StripeResource } from '../../StripeResource.js';
import { PaginationParams, RangeQueryParam } from '../../shared.js';
import { RequestOptions, ApiListPromise, Response } from '../../lib.js';
export declare class TransactionResource extends StripeResource {
/**
* Returns a list of Financial Connections Transaction objects.
*/
list(params: FinancialConnections.TransactionListParams, options?: RequestOptions): ApiListPromise<Transaction>;
/**
* Retrieves the details of a Financial Connections Transaction
*/
retrieve(id: string, params?: FinancialConnections.TransactionRetrieveParams, options?: RequestOptions): Promise<Response<Transaction>>;
}
export interface Transaction {
/**
* Unique identifier for the object.
*/
id: string;
/**
* String representing the object's type. Objects of the same type share the same value.
*/
object: 'financial_connections.transaction';
/**
* The ID of the Financial Connections Account this transaction belongs to.
*/
account: string;
/**
* The amount of this transaction, in cents (or local equivalent).
*/
amount: number;
/**
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
*/
currency: string;
/**
* The description of this transaction.
*/
description: string;
/**
* If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
*/
livemode: boolean;
/**
* The status of the transaction.
*/
status: FinancialConnections.Transaction.Status;
status_transitions: FinancialConnections.Transaction.StatusTransitions;
/**
* Time at which the transaction was transacted. Measured in seconds since the Unix epoch.
*/
transacted_at: number;
/**
* The token of the transaction refresh that last updated or created this transaction.
*/
transaction_refresh: string;
/**
* Time at which the object was last updated. Measured in seconds since the Unix epoch.
*/
updated: number;
}
export declare namespace FinancialConnections {
namespace Transaction {
type Status = 'pending' | 'posted' | 'void';
interface StatusTransitions {
/**
* Time at which this transaction posted. Measured in seconds since the Unix epoch.
*/
posted_at: number | null;
/**
* Time at which this transaction was voided. Measured in seconds since the Unix epoch.
*/
void_at: number | null;
}
}
}
export declare namespace FinancialConnections {
interface TransactionRetrieveParams {
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
}
}
export declare namespace FinancialConnections {
interface TransactionListParams extends PaginationParams {
/**
* The ID of the Financial Connections Account whose transactions will be retrieved.
*/
account: string;
/**
* Specifies which fields in the response should be expanded.
*/
expand?: Array<string>;
/**
* A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:
*/
transacted_at?: RangeQueryParam | number;
/**
* A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options:
*/
transaction_refresh?: TransactionListParams.TransactionRefresh;
}
namespace TransactionListParams {
interface TransactionRefresh {
/**
* Return results where the transactions were created or updated by a refresh that took place after this refresh (non-inclusive).
*/
after: string;
}
}
}

View File

@@ -0,0 +1,23 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.TransactionResource = void 0;
const StripeResource_js_1 = require("../../StripeResource.js");
class TransactionResource extends StripeResource_js_1.StripeResource {
/**
* Returns a list of Financial Connections Transaction objects.
*/
list(params, options) {
return this._makeRequest('GET', '/v1/financial_connections/transactions', params, options, {
methodType: 'list',
});
}
/**
* Retrieves the details of a Financial Connections Transaction
*/
retrieve(id, params, options) {
return this._makeRequest('GET', `/v1/financial_connections/transactions/${encodeURIComponent(id)}`, params, options);
}
}
exports.TransactionResource = TransactionResource;
//# sourceMappingURL=Transactions.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Transactions.js","sourceRoot":"","sources":["../../../src/resources/FinancialConnections/Transactions.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAEvC,+DAAuD;AAIvD,MAAa,mBAAoB,SAAQ,kCAAc;IACrD;;OAEG;IACH,IAAI,CACF,MAAkD,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,wCAAwC,EACxC,MAAM,EACN,OAAO,EACP;YACE,UAAU,EAAE,MAAM;SACnB,CACK,CAAC;IACX,CAAC;IACD;;OAEG;IACH,QAAQ,CACN,EAAU,EACV,MAAuD,EACvD,OAAwB;QAExB,OAAO,IAAI,CAAC,YAAY,CACtB,KAAK,EACL,0CAA0C,kBAAkB,CAAC,EAAE,CAAC,EAAE,EAClE,MAAM,EACN,OAAO,CACD,CAAC;IACX,CAAC;CACF;AAjCD,kDAiCC"}

View File

@@ -0,0 +1,36 @@
import { Stripe } from '../../stripe.core.js';
import { FinancialConnections as FinancialConnectionsNamespace0, Account, AccountResource } from './Accounts.js';
import { FinancialConnections as FinancialConnectionsNamespace1, Session, SessionResource } from './Sessions.js';
import { FinancialConnections as FinancialConnectionsNamespace2, Transaction, TransactionResource } from './Transactions.js';
import { AccountOwner } from './AccountOwners.js';
import { AccountOwnership } from './AccountOwnerships.js';
export { Account } from './Accounts.js';
export { Session } from './Sessions.js';
export { Transaction } from './Transactions.js';
export { AccountOwner } from './AccountOwners.js';
export { AccountOwnership } from './AccountOwnerships.js';
export declare class FinancialConnections {
private readonly stripe;
accounts: AccountResource;
sessions: SessionResource;
transactions: TransactionResource;
constructor(stripe: Stripe);
}
export declare namespace FinancialConnections {
export import AccountListParams = FinancialConnectionsNamespace0.AccountListParams;
export import AccountRetrieveParams = FinancialConnectionsNamespace0.AccountRetrieveParams;
export import AccountDisconnectParams = FinancialConnectionsNamespace0.AccountDisconnectParams;
export import AccountRefreshParams = FinancialConnectionsNamespace0.AccountRefreshParams;
export import AccountSubscribeParams = FinancialConnectionsNamespace0.AccountSubscribeParams;
export import AccountUnsubscribeParams = FinancialConnectionsNamespace0.AccountUnsubscribeParams;
export import AccountListOwnersParams = FinancialConnectionsNamespace0.AccountListOwnersParams;
export { Account };
export import SessionRetrieveParams = FinancialConnectionsNamespace1.SessionRetrieveParams;
export import SessionCreateParams = FinancialConnectionsNamespace1.SessionCreateParams;
export { Session };
export import TransactionListParams = FinancialConnectionsNamespace2.TransactionListParams;
export import TransactionRetrieveParams = FinancialConnectionsNamespace2.TransactionRetrieveParams;
export { Transaction };
export { AccountOwner };
export { AccountOwnership };
}

View File

@@ -0,0 +1,17 @@
"use strict";
// File generated from our OpenAPI spec
Object.defineProperty(exports, "__esModule", { value: true });
exports.FinancialConnections = void 0;
const Accounts_js_1 = require("./Accounts.js");
const Sessions_js_1 = require("./Sessions.js");
const Transactions_js_1 = require("./Transactions.js");
class FinancialConnections {
constructor(stripe) {
this.stripe = stripe;
this.accounts = new Accounts_js_1.AccountResource(stripe);
this.sessions = new Sessions_js_1.SessionResource(stripe);
this.transactions = new Transactions_js_1.TransactionResource(stripe);
}
}
exports.FinancialConnections = FinancialConnections;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/FinancialConnections/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;;;AAGvC,+CAIuB;AACvB,+CAIuB;AACvB,uDAI2B;AAU3B,MAAa,oBAAoB;IAK/B,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;QACzC,IAAI,CAAC,QAAQ,GAAG,IAAI,6BAAe,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,CAAC,QAAQ,GAAG,IAAI,6BAAe,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,CAAC,YAAY,GAAG,IAAI,qCAAmB,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC;CACF;AAVD,oDAUC"}