mx-platform-node
Version:
A Node library for the MX Platform API.
660 lines • 1.1 MB
JavaScript
"use strict";
/* tslint:disable */
/* eslint-disable */
/**
* MX Platform API
* The MX Platform API is a powerful, fully-featured API designed to make aggregating and enhancing financial data easy and reliable. It can seamlessly connect your app or website to tens of thousands of financial institutions. Just getting started? See our [use case guides](/use-cases/).
*
* The version of the OpenAPI document: 20111101
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MerchantsApiAxiosParamCreator = exports.MembersApi = exports.MembersApiFactory = exports.MembersApiFp = exports.MembersApiAxiosParamCreator = exports.ManagedDataApi = exports.ManagedDataApiFactory = exports.ManagedDataApiFp = exports.ManagedDataApiAxiosParamCreator = exports.InvestmentHoldingsApi = exports.InvestmentHoldingsApiFactory = exports.InvestmentHoldingsApiFp = exports.InvestmentHoldingsApiAxiosParamCreator = exports.InstitutionsApi = exports.InstitutionsApiFactory = exports.InstitutionsApiFp = exports.InstitutionsApiAxiosParamCreator = exports.InsightsApi = exports.InsightsApiFactory = exports.InsightsApiFp = exports.InsightsApiAxiosParamCreator = exports.GoalsApi = exports.GoalsApiFactory = exports.GoalsApiFp = exports.GoalsApiAxiosParamCreator = exports.CategoriesApi = exports.CategoriesApiFactory = exports.CategoriesApiFp = exports.CategoriesApiAxiosParamCreator = exports.BudgetsApi = exports.BudgetsApiFactory = exports.BudgetsApiFp = exports.BudgetsApiAxiosParamCreator = exports.AchReturnApi = exports.AchReturnApiFactory = exports.AchReturnApiFp = exports.AchReturnApiAxiosParamCreator = exports.AccountsApi = exports.AccountsApiFactory = exports.AccountsApiFp = exports.AccountsApiAxiosParamCreator = exports.WidgetRequestUseCasesEnum = exports.TransactionIncludesResponseAllOfRepeatingTransactionRecurrenceTypeEnum = exports.TransactionIncludesResponseAllOfRepeatingTransactionRepeatingTransactionTypeEnum = exports.TransactionIncludesResponseAllOfClassificationParentClassEnum = exports.RepeatingTransactionResponseTransactionTypeEnum = exports.RepeatingTransactionResponseRepeatingTransactionTypeEnum = exports.MemberUpdateRequestUseCasesEnum = exports.MemberResponseUseCasesEnum = exports.MemberCreateRequestUseCasesEnum = void 0;
exports.UsersApiFactory = exports.UsersApiFp = exports.UsersApiAxiosParamCreator = exports.TransactionsApi = exports.TransactionsApiFactory = exports.TransactionsApiFp = exports.TransactionsApiAxiosParamCreator = exports.TransactionRulesApi = exports.TransactionRulesApiFactory = exports.TransactionRulesApiFp = exports.TransactionRulesApiAxiosParamCreator = exports.TagsApi = exports.TagsApiFactory = exports.TagsApiFp = exports.TagsApiAxiosParamCreator = exports.TaggingsApi = exports.TaggingsApiFactory = exports.TaggingsApiFp = exports.TaggingsApiAxiosParamCreator = exports.StatementsApi = exports.StatementsApiFactory = exports.StatementsApiFp = exports.StatementsApiAxiosParamCreator = exports.SpendingPlanApi = exports.SpendingPlanApiFactory = exports.SpendingPlanApiFp = exports.SpendingPlanApiAxiosParamCreator = exports.RewardsApi = exports.RewardsApiFactory = exports.RewardsApiFp = exports.RewardsApiAxiosParamCreator = exports.ProcessorTokenApi = exports.ProcessorTokenApiFactory = exports.ProcessorTokenApiFp = exports.ProcessorTokenApiAxiosParamCreator = exports.NotificationsApi = exports.NotificationsApiFactory = exports.NotificationsApiFp = exports.NotificationsApiAxiosParamCreator = exports.MonthlyCashFlowProfileApi = exports.MonthlyCashFlowProfileApiFactory = exports.MonthlyCashFlowProfileApiFp = exports.MonthlyCashFlowProfileApiAxiosParamCreator = exports.MicrodepositsApi = exports.MicrodepositsApiFactory = exports.MicrodepositsApiFp = exports.MicrodepositsApiAxiosParamCreator = exports.MerchantsApi = exports.MerchantsApiFactory = exports.MerchantsApiFp = void 0;
exports.WidgetsApi = exports.WidgetsApiFactory = exports.WidgetsApiFp = exports.WidgetsApiAxiosParamCreator = exports.VerifiableCredentialsApi = exports.VerifiableCredentialsApiFactory = exports.VerifiableCredentialsApiFp = exports.VerifiableCredentialsApiAxiosParamCreator = exports.UsersApi = void 0;
const axios_1 = require("axios");
// Some imports not used depending on template conditions
// @ts-ignore
const common_1 = require("./common");
// @ts-ignore
const base_1 = require("./base");
exports.MemberCreateRequestUseCasesEnum = {
MoneyMovement: 'MONEY_MOVEMENT',
Pfm: 'PFM'
};
exports.MemberResponseUseCasesEnum = {
MoneyMovement: 'MONEY_MOVEMENT',
Pfm: 'PFM'
};
exports.MemberUpdateRequestUseCasesEnum = {
MoneyMovement: 'MONEY_MOVEMENT',
Pfm: 'PFM'
};
exports.RepeatingTransactionResponseRepeatingTransactionTypeEnum = {
Bill: 'BILL',
Subscription: 'SUBSCRIPTION',
Income: 'INCOME',
Unknown: 'UNKNOWN'
};
exports.RepeatingTransactionResponseTransactionTypeEnum = {
Debit: 'DEBIT',
Credit: 'CREDIT'
};
exports.TransactionIncludesResponseAllOfClassificationParentClassEnum = {
Payroll: 'Payroll',
Deposit: 'Deposit',
Savings: 'Savings',
Transfer: 'Transfer',
Refunds: 'Refunds',
Spend: 'Spend',
Investment: 'Investment',
Buy: 'Buy',
Sell: 'Sell',
Income: 'Income',
Fees: 'Fees',
Expenses: 'Expenses',
CorporateActions: 'Corporate Actions',
Other: 'Other'
};
exports.TransactionIncludesResponseAllOfRepeatingTransactionRepeatingTransactionTypeEnum = {
Bill: 'BILL',
Subscription: 'SUBSCRIPTION',
Income: 'INCOME',
Unknown: 'UNKNOWN'
};
exports.TransactionIncludesResponseAllOfRepeatingTransactionRecurrenceTypeEnum = {
EveryOtherWeek: 'EVERY_OTHER_WEEK'
};
exports.WidgetRequestUseCasesEnum = {
MoneyMovement: 'MONEY_MOVEMENT',
Pfm: 'PFM'
};
/**
* AccountsApi - axios parameter creator
* @export
*/
const AccountsApiAxiosParamCreator = function (configuration) {
return {
/**
* This endpoint can only be used to create manual accounts. Creating a manual account will automatically create it under the Manual Institution member. Since a manual account has no credentials tied to the member, the account will never aggregate or include data from a data feed..
* @summary Create manual account
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {AccountCreateRequestBody} accountCreateRequestBody Manual account object to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createManualAccount: (userGuid_1, accountCreateRequestBody_1, ...args_1) => __awaiter(this, [userGuid_1, accountCreateRequestBody_1, ...args_1], void 0, function* (userGuid, accountCreateRequestBody, options = {}) {
// verify required parameter 'userGuid' is not null or undefined
(0, common_1.assertParamExists)('createManualAccount', 'userGuid', userGuid);
// verify required parameter 'accountCreateRequestBody' is not null or undefined
(0, common_1.assertParamExists)('createManualAccount', 'accountCreateRequestBody', accountCreateRequestBody);
const localVarPath = `/users/{user_guid}/accounts`
.replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication basicAuth required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(accountCreateRequestBody, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* This endpoint deletes accounts that were manually created. The API will respond with an empty object and a status of `204 No Content`.
* @summary Delete manual account
* @param {string} accountGuid The unique id for an `account`.
* @param {string} accept Specifies the media type expected in the response.
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteManualAccount: (accountGuid_1, accept_1, userGuid_1, ...args_1) => __awaiter(this, [accountGuid_1, accept_1, userGuid_1, ...args_1], void 0, function* (accountGuid, accept, userGuid, options = {}) {
// verify required parameter 'accountGuid' is not null or undefined
(0, common_1.assertParamExists)('deleteManualAccount', 'accountGuid', accountGuid);
// verify required parameter 'accept' is not null or undefined
(0, common_1.assertParamExists)('deleteManualAccount', 'accept', accept);
// verify required parameter 'userGuid' is not null or undefined
(0, common_1.assertParamExists)('deleteManualAccount', 'userGuid', userGuid);
const localVarPath = `/users/{user_guid}/accounts/{account_guid}`
.replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid)))
.replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication basicAuth required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
if (accept != null) {
localVarHeaderParameter['Accept'] = String(accept);
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* This endpoint returns a list of account numbers associated with the specified `account`.
* @summary List account numbers by account
* @param {string} accountGuid The unique id for an `account`.
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {number} [page] Results are paginated. Specify current page.
* @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listAccountNumbersByAccount: (accountGuid_1, userGuid_1, page_1, recordsPerPage_1, ...args_1) => __awaiter(this, [accountGuid_1, userGuid_1, page_1, recordsPerPage_1, ...args_1], void 0, function* (accountGuid, userGuid, page, recordsPerPage, options = {}) {
// verify required parameter 'accountGuid' is not null or undefined
(0, common_1.assertParamExists)('listAccountNumbersByAccount', 'accountGuid', accountGuid);
// verify required parameter 'userGuid' is not null or undefined
(0, common_1.assertParamExists)('listAccountNumbersByAccount', 'userGuid', userGuid);
const localVarPath = `/users/{user_guid}/accounts/{account_guid}/account_numbers`
.replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid)))
.replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication basicAuth required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
if (page !== undefined) {
localVarQueryParameter['page'] = page;
}
if (recordsPerPage !== undefined) {
localVarQueryParameter['records_per_page'] = recordsPerPage;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* This endpoint returns a list of account numbers associated with the specified `member`.
* @summary List account numbers by member
* @param {string} memberGuid The unique id for a `member`.
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {number} [page] Results are paginated. Specify current page.
* @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listAccountNumbersByMember: (memberGuid_1, userGuid_1, page_1, recordsPerPage_1, ...args_1) => __awaiter(this, [memberGuid_1, userGuid_1, page_1, recordsPerPage_1, ...args_1], void 0, function* (memberGuid, userGuid, page, recordsPerPage, options = {}) {
// verify required parameter 'memberGuid' is not null or undefined
(0, common_1.assertParamExists)('listAccountNumbersByMember', 'memberGuid', memberGuid);
// verify required parameter 'userGuid' is not null or undefined
(0, common_1.assertParamExists)('listAccountNumbersByMember', 'userGuid', userGuid);
const localVarPath = `/users/{user_guid}/members/{member_guid}/account_numbers`
.replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid)))
.replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication basicAuth required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
if (page !== undefined) {
localVarQueryParameter['page'] = page;
}
if (recordsPerPage !== undefined) {
localVarQueryParameter['records_per_page'] = recordsPerPage;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* This endpoint returns an array with information about every account associated with a particular member.
* @summary List account owners by member
* @param {string} memberGuid The unique id for a `member`.
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {number} [page] Results are paginated. Specify current page.
* @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listAccountOwnersByMember: (memberGuid_1, userGuid_1, page_1, recordsPerPage_1, ...args_1) => __awaiter(this, [memberGuid_1, userGuid_1, page_1, recordsPerPage_1, ...args_1], void 0, function* (memberGuid, userGuid, page, recordsPerPage, options = {}) {
// verify required parameter 'memberGuid' is not null or undefined
(0, common_1.assertParamExists)('listAccountOwnersByMember', 'memberGuid', memberGuid);
// verify required parameter 'userGuid' is not null or undefined
(0, common_1.assertParamExists)('listAccountOwnersByMember', 'userGuid', userGuid);
const localVarPath = `/users/{user_guid}/members/{member_guid}/account_owners`
.replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid)))
.replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication basicAuth required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
if (page !== undefined) {
localVarQueryParameter['page'] = page;
}
if (recordsPerPage !== undefined) {
localVarQueryParameter['records_per_page'] = recordsPerPage;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* This endpoint returns a list of all the accounts associated with the specified `member`.
* @summary List accounts by member
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {string} memberGuid The unique id for a `member`.
* @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user.
* @param {number} [page] Results are paginated. Specify current page.
* @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listMemberAccounts: (userGuid_1, memberGuid_1, memberIsManagedByUser_1, page_1, recordsPerPage_1, ...args_1) => __awaiter(this, [userGuid_1, memberGuid_1, memberIsManagedByUser_1, page_1, recordsPerPage_1, ...args_1], void 0, function* (userGuid, memberGuid, memberIsManagedByUser, page, recordsPerPage, options = {}) {
// verify required parameter 'userGuid' is not null or undefined
(0, common_1.assertParamExists)('listMemberAccounts', 'userGuid', userGuid);
// verify required parameter 'memberGuid' is not null or undefined
(0, common_1.assertParamExists)('listMemberAccounts', 'memberGuid', memberGuid);
const localVarPath = `/users/{user_guid}/members/{member_guid}/accounts`
.replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid)))
.replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication basicAuth required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
if (memberIsManagedByUser !== undefined) {
localVarQueryParameter['member_is_managed_by_user'] = memberIsManagedByUser;
}
if (page !== undefined) {
localVarQueryParameter['page'] = page;
}
if (recordsPerPage !== undefined) {
localVarQueryParameter['records_per_page'] = recordsPerPage;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* This endpoint returns a list of all the accounts associated with the specified `user`. :::warning This request will not return the full account number. It may return the last four digits of the account number if that information has been provided during aggregation. If you need the full account number, please refer to [List account numbers by member](https://docs.mx.com/api-reference/platform-api/reference/list-account-numbers-by-member/), [List account numbers by account](https://docs.mx.com/api-reference/platform-api/reference/list-account-numbers-by-account/), or the [Fetch Account and Routing Numbers](https://docs.mx.com/products/connectivity/instant-account-verification/fetch-account-routing-number-api/#4-read-the-account-numbers) guide. :::
* @summary List accounts
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {number} [page] Results are paginated. Specify current page.
* @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user.
* @param {boolean} [isManual] List only accounts that were manually created.
* @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead.
* @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listUserAccounts: (userGuid_1, page_1, memberIsManagedByUser_1, isManual_1, recordsPerPage_1, useCase_1, ...args_1) => __awaiter(this, [userGuid_1, page_1, memberIsManagedByUser_1, isManual_1, recordsPerPage_1, useCase_1, ...args_1], void 0, function* (userGuid, page, memberIsManagedByUser, isManual, recordsPerPage, useCase, options = {}) {
// verify required parameter 'userGuid' is not null or undefined
(0, common_1.assertParamExists)('listUserAccounts', 'userGuid', userGuid);
const localVarPath = `/users/{user_guid}/accounts`
.replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication basicAuth required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
if (page !== undefined) {
localVarQueryParameter['page'] = page;
}
if (memberIsManagedByUser !== undefined) {
localVarQueryParameter['member_is_managed_by_user'] = memberIsManagedByUser;
}
if (isManual !== undefined) {
localVarQueryParameter['is_manual'] = isManual;
}
if (recordsPerPage !== undefined) {
localVarQueryParameter['records_per_page'] = recordsPerPage;
}
if (useCase !== undefined) {
localVarQueryParameter['use_case'] = useCase;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* This endpoint returns the specified `account` resource.
* @summary Read account
* @param {string} accountGuid The unique id for an `account`.
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
readAccount: (accountGuid_1, userGuid_1, ...args_1) => __awaiter(this, [accountGuid_1, userGuid_1, ...args_1], void 0, function* (accountGuid, userGuid, options = {}) {
// verify required parameter 'accountGuid' is not null or undefined
(0, common_1.assertParamExists)('readAccount', 'accountGuid', accountGuid);
// verify required parameter 'userGuid' is not null or undefined
(0, common_1.assertParamExists)('readAccount', 'userGuid', userGuid);
const localVarPath = `/users/{user_guid}/accounts/{account_guid}`
.replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid)))
.replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication basicAuth required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* This endpoint allows you to read the attributes of an `account` resource.
* @summary Read account by member
* @param {string} accountGuid The unique id for an `account`.
* @param {string} memberGuid The unique id for a `member`.
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
readAccountByMember: (accountGuid_1, memberGuid_1, userGuid_1, ...args_1) => __awaiter(this, [accountGuid_1, memberGuid_1, userGuid_1, ...args_1], void 0, function* (accountGuid, memberGuid, userGuid, options = {}) {
// verify required parameter 'accountGuid' is not null or undefined
(0, common_1.assertParamExists)('readAccountByMember', 'accountGuid', accountGuid);
// verify required parameter 'memberGuid' is not null or undefined
(0, common_1.assertParamExists)('readAccountByMember', 'memberGuid', memberGuid);
// verify required parameter 'userGuid' is not null or undefined
(0, common_1.assertParamExists)('readAccountByMember', 'userGuid', userGuid);
const localVarPath = `/users/{user_guid}/members/{member_guid}/accounts/{account_guid}`
.replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid)))
.replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid)))
.replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication basicAuth required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* This endpoint allows you to update certain attributes of an `account` resource, including manual accounts. For manual accounts, you can update every field listed. For aggregated accounts, you can only update `is_business`, `is_hidden` and `metadata`.
* @summary Update account by member
* @param {string} accountGuid The unique id for an `account`.
* @param {string} memberGuid The unique id for a `member`.
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {AccountUpdateRequestBody} accountUpdateRequestBody
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateAccountByMember: (accountGuid_1, memberGuid_1, userGuid_1, accountUpdateRequestBody_1, ...args_1) => __awaiter(this, [accountGuid_1, memberGuid_1, userGuid_1, accountUpdateRequestBody_1, ...args_1], void 0, function* (accountGuid, memberGuid, userGuid, accountUpdateRequestBody, options = {}) {
// verify required parameter 'accountGuid' is not null or undefined
(0, common_1.assertParamExists)('updateAccountByMember', 'accountGuid', accountGuid);
// verify required parameter 'memberGuid' is not null or undefined
(0, common_1.assertParamExists)('updateAccountByMember', 'memberGuid', memberGuid);
// verify required parameter 'userGuid' is not null or undefined
(0, common_1.assertParamExists)('updateAccountByMember', 'userGuid', userGuid);
// verify required parameter 'accountUpdateRequestBody' is not null or undefined
(0, common_1.assertParamExists)('updateAccountByMember', 'accountUpdateRequestBody', accountUpdateRequestBody);
const localVarPath = `/users/{user_guid}/members/{member_guid}/accounts/{account_guid}`
.replace(`{${"account_guid"}}`, encodeURIComponent(String(accountGuid)))
.replace(`{${"member_guid"}}`, encodeURIComponent(String(memberGuid)))
.replace(`{${"user_guid"}}`, encodeURIComponent(String(userGuid)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication basicAuth required
// http basic authentication required
(0, common_1.setBasicAuthToObject)(localVarRequestOptions, configuration);
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(accountUpdateRequestBody, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
}),
};
};
exports.AccountsApiAxiosParamCreator = AccountsApiAxiosParamCreator;
/**
* AccountsApi - functional programming interface
* @export
*/
const AccountsApiFp = function (configuration) {
const localVarAxiosParamCreator = (0, exports.AccountsApiAxiosParamCreator)(configuration);
return {
/**
* This endpoint can only be used to create manual accounts. Creating a manual account will automatically create it under the Manual Institution member. Since a manual account has no credentials tied to the member, the account will never aggregate or include data from a data feed..
* @summary Create manual account
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {AccountCreateRequestBody} accountCreateRequestBody Manual account object to be created.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createManualAccount(userGuid, accountCreateRequestBody, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.createManualAccount(userGuid, accountCreateRequestBody, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* This endpoint deletes accounts that were manually created. The API will respond with an empty object and a status of `204 No Content`.
* @summary Delete manual account
* @param {string} accountGuid The unique id for an `account`.
* @param {string} accept Specifies the media type expected in the response.
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteManualAccount(accountGuid, accept, userGuid, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteManualAccount(accountGuid, accept, userGuid, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* This endpoint returns a list of account numbers associated with the specified `account`.
* @summary List account numbers by account
* @param {string} accountGuid The unique id for an `account`.
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {number} [page] Results are paginated. Specify current page.
* @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listAccountNumbersByAccount(accountGuid, userGuid, page, recordsPerPage, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.listAccountNumbersByAccount(accountGuid, userGuid, page, recordsPerPage, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* This endpoint returns a list of account numbers associated with the specified `member`.
* @summary List account numbers by member
* @param {string} memberGuid The unique id for a `member`.
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {number} [page] Results are paginated. Specify current page.
* @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listAccountNumbersByMember(memberGuid, userGuid, page, recordsPerPage, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.listAccountNumbersByMember(memberGuid, userGuid, page, recordsPerPage, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* This endpoint returns an array with information about every account associated with a particular member.
* @summary List account owners by member
* @param {string} memberGuid The unique id for a `member`.
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {number} [page] Results are paginated. Specify current page.
* @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listAccountOwnersByMember(memberGuid, userGuid, page, recordsPerPage, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.listAccountOwnersByMember(memberGuid, userGuid, page, recordsPerPage, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* This endpoint returns a list of all the accounts associated with the specified `member`.
* @summary List accounts by member
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {string} memberGuid The unique id for a `member`.
* @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user.
* @param {number} [page] Results are paginated. Specify current page.
* @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listMemberAccounts(userGuid, memberGuid, memberIsManagedByUser, page, recordsPerPage, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.listMemberAccounts(userGuid, memberGuid, memberIsManagedByUser, page, recordsPerPage, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* This endpoint returns a list of all the accounts associated with the specified `user`. :::warning This request will not return the full account number. It may return the last four digits of the account number if that information has been provided during aggregation. If you need the full account number, please refer to [List account numbers by member](https://docs.mx.com/api-reference/platform-api/reference/list-account-numbers-by-member/), [List account numbers by account](https://docs.mx.com/api-reference/platform-api/reference/list-account-numbers-by-account/), or the [Fetch Account and Routing Numbers](https://docs.mx.com/products/connectivity/instant-account-verification/fetch-account-routing-number-api/#4-read-the-account-numbers) guide. :::
* @summary List accounts
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {number} [page] Results are paginated. Specify current page.
* @param {boolean} [memberIsManagedByUser] List only accounts whose member is managed by the user.
* @param {boolean} [isManual] List only accounts that were manually created.
* @param {number} [recordsPerPage] This specifies the number of records to be returned on each page. Defaults to `25`. The valid range is from `10` to `1000`. If the value exceeds `1000`, the default value of `25` will be used instead.
* @param {string} [useCase] The use case associated with the member. Valid values are `PFM` and `MONEY_MOVEMENT`. For example, you can append either `?use_case=PFM` or `?use_case=MONEY_MOVEMENT`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listUserAccounts(userGuid, page, memberIsManagedByUser, isManual, recordsPerPage, useCase, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.listUserAccounts(userGuid, page, memberIsManagedByUser, isManual, recordsPerPage, useCase, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* This endpoint returns the specified `account` resource.
* @summary Read account
* @param {string} accountGuid The unique id for an `account`.
* @param {string} userGuid The unique identifier for a `user`, beginning with the prefix `USR-`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
readAccount(accountGuid, userGuid, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.readAccount(accountGuid, userGuid, options);
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* This endpoi