New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@codat/bank-feeds

Package Overview
Dependencies
Maintainers
4
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codat/bank-feeds - npm Package Compare versions

Comparing version 4.0.1 to 4.1.0

dist/sdk/models/operations/createbankaccount.d.ts

31

dist/sdk/bankaccounts.d.ts

@@ -12,2 +12,33 @@ import * as utils from "../internal/utils";

/**
* Create bank account
*
* @remarks
* The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company's connection.
*
* [Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
*
* **Integration-specific behaviour**
*
* Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/bank-feeds-api#/operations/get-create-update-bankAccounts-model).
*
* Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating an account.
*/
create(req: operations.CreateBankAccountRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise<operations.CreateBankAccountResponse>;
/**
* Get create/update bank account model
*
* @remarks
* The *Get create/update bank account model* endpoint returns the expected data for the request payload when creating and updating a [bank account](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company and integration.
*
* [Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
*
* **Integration-specific behaviour**
*
* See the *response examples* for integration-specific indicative models.
*
* Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating and updating a bank account.
*
*/
getCreateModel(req: operations.GetCreateBankAccountsModelRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise<operations.GetCreateBankAccountsModelResponse>;
/**
* List bank accounts

@@ -14,0 +45,0 @@ *

@@ -75,2 +75,18 @@ "use strict";

};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -90,2 +106,192 @@ exports.BankAccounts = void 0;

/**
* Create bank account
*
* @remarks
* The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company's connection.
*
* [Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
*
* **Integration-specific behaviour**
*
* Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/bank-feeds-api#/operations/get-create-update-bankAccounts-model).
*
* Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating an account.
*/
BankAccounts.prototype.create = function (req, retries, config) {
var _a, _b;
return __awaiter(this, void 0, void 0, function () {
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, queryParams, globalRetryConfig, retryConfig, httpRes, responseContentType, res, decodedRes;
var _d;
return __generator(this, function (_e) {
switch (_e.label) {
case 0:
if (!(req instanceof utils.SpeakeasyBase)) {
req = new operations.CreateBankAccountRequest(req);
}
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
operationUrl = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/push/bankAccounts", req);
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
try {
_d = __read(utils.serializeRequestBody(req, "bankAccountPrototype", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
}
catch (e) {
if (e instanceof Error) {
throw new Error("Error serializing request body, cause: ".concat(e.message));
}
}
client = this.sdkConfiguration.defaultClient;
globalSecurity = this.sdkConfiguration.security;
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
return [4 /*yield*/, globalSecurity()];
case 1:
globalSecurity = _e.sent();
_e.label = 2;
case 2:
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
globalSecurity = new shared.Security(globalSecurity);
}
properties = utils.parseSecurityProperties(globalSecurity);
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
queryParams = utils.serializeQueryParams(req);
headers["Accept"] = "application/json";
headers["user-agent"] = this.sdkConfiguration.userAgent;
globalRetryConfig = this.sdkConfiguration.retryConfig;
retryConfig = retries;
if (!retryConfig) {
if (globalRetryConfig) {
retryConfig = globalRetryConfig;
}
else {
retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
}
}
return [4 /*yield*/, utils.Retry(function () {
return client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config));
}, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
case 3:
httpRes = _e.sent();
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
throw new Error("status code not found in response: ".concat(httpRes));
}
res = new operations.CreateBankAccountResponse({
statusCode: httpRes.status,
contentType: responseContentType,
rawResponse: httpRes,
});
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
switch (true) {
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
if (utils.matchContentType(responseContentType, "application/json")) {
res.bankAccountCreateResponse = utils.objectToClass(JSON.parse(decodedRes), shared.BankAccountCreateResponse);
}
else {
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
}
break;
case [400, 401, 402, 403, 404, 429, 500, 503].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
if (utils.matchContentType(responseContentType, "application/json")) {
res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
}
else {
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
}
break;
}
return [2 /*return*/, res];
}
});
});
};
/**
* Get create/update bank account model
*
* @remarks
* The *Get create/update bank account model* endpoint returns the expected data for the request payload when creating and updating a [bank account](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company and integration.
*
* [Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
*
* **Integration-specific behaviour**
*
* See the *response examples* for integration-specific indicative models.
*
* Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating and updating a bank account.
*
*/
BankAccounts.prototype.getCreateModel = function (req, retries, config) {
var _a, _b;
return __awaiter(this, void 0, void 0, function () {
var baseURL, operationUrl, client, globalSecurity, properties, headers, globalRetryConfig, retryConfig, httpRes, responseContentType, res, decodedRes;
return __generator(this, function (_c) {
switch (_c.label) {
case 0:
if (!(req instanceof utils.SpeakeasyBase)) {
req = new operations.GetCreateBankAccountsModelRequest(req);
}
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
operationUrl = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/options/bankAccounts", req);
client = this.sdkConfiguration.defaultClient;
globalSecurity = this.sdkConfiguration.security;
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
return [4 /*yield*/, globalSecurity()];
case 1:
globalSecurity = _c.sent();
_c.label = 2;
case 2:
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
globalSecurity = new shared.Security(globalSecurity);
}
properties = utils.parseSecurityProperties(globalSecurity);
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
headers["Accept"] = "application/json";
headers["user-agent"] = this.sdkConfiguration.userAgent;
globalRetryConfig = this.sdkConfiguration.retryConfig;
retryConfig = retries;
if (!retryConfig) {
if (globalRetryConfig) {
retryConfig = globalRetryConfig;
}
else {
retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
}
}
return [4 /*yield*/, utils.Retry(function () {
return client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "get", headers: headers, responseType: "arraybuffer" }, config));
}, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
case 3:
httpRes = _c.sent();
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
throw new Error("status code not found in response: ".concat(httpRes));
}
res = new operations.GetCreateBankAccountsModelResponse({
statusCode: httpRes.status,
contentType: responseContentType,
rawResponse: httpRes,
});
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
switch (true) {
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
if (utils.matchContentType(responseContentType, "application/json")) {
res.pushOption = utils.objectToClass(JSON.parse(decodedRes), shared.PushOption);
}
else {
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
}
break;
case [401, 402, 403, 404, 429, 500, 503].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
if (utils.matchContentType(responseContentType, "application/json")) {
res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
}
else {
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
}
break;
}
return [2 /*return*/, res];
}
});
});
};
/**
* List bank accounts

@@ -92,0 +298,0 @@ *

2

dist/sdk/models/operations/index.d.ts

@@ -0,1 +1,2 @@

export * from "./createbankaccount";
export * from "./createbankaccountmapping";

@@ -15,2 +16,3 @@ export * from "./createbanktransactions";

export * from "./getconnection";
export * from "./getcreatebankaccountsmodel";
export * from "./getcreateoperation";

@@ -17,0 +19,0 @@ export * from "./listbankaccounts";

@@ -20,2 +20,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./createbankaccount"), exports);
__exportStar(require("./createbankaccountmapping"), exports);

@@ -35,2 +36,3 @@ __exportStar(require("./createbanktransactions"), exports);

__exportStar(require("./getconnection"), exports);
__exportStar(require("./getcreatebankaccountsmodel"), exports);
__exportStar(require("./getcreateoperation"), exports);

@@ -37,0 +39,0 @@ __exportStar(require("./listbankaccounts"), exports);

16

dist/sdk/models/shared/bankaccounts.d.ts

@@ -10,3 +10,3 @@ import { SpeakeasyBase } from "../../../internal/utils";

*/
export declare enum BankAccountType {
export declare enum BankAccountsBankAccountType {
Unknown = "Unknown",

@@ -16,3 +16,3 @@ Credit = "Credit",

}
export declare class Metadata extends SpeakeasyBase {
export declare class BankAccountsMetadata extends SpeakeasyBase {
/**

@@ -30,3 +30,3 @@ * Indicates whether the record has been deleted in the third-party system this record originated from.

*/
export declare class SupplementalData extends SpeakeasyBase {
export declare class BankAccountsSupplementalData extends SpeakeasyBase {
content?: Record<string, Record<string, any>>;

@@ -54,3 +54,3 @@ }

*/
export declare class AccountingBankAccount extends SpeakeasyBase {
export declare class BankAccountsAccountingBankAccount extends SpeakeasyBase {
/**

@@ -79,3 +79,3 @@ * Name of the bank account in the accounting platform.

*/
accountType?: BankAccountType;
accountType?: BankAccountsBankAccountType;
/**

@@ -113,3 +113,3 @@ * Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example.

institution?: string;
metadata?: Metadata;
metadata?: BankAccountsMetadata;
modifiedDate?: string;

@@ -145,3 +145,3 @@ /**

*/
supplementalData?: SupplementalData;
supplementalData?: BankAccountsSupplementalData;
}

@@ -158,3 +158,3 @@ export declare class BankAccounts extends SpeakeasyBase {

pageSize: number;
results?: AccountingBankAccount[];
results?: BankAccountsAccountingBankAccount[];
/**

@@ -161,0 +161,0 @@ * Total number of items.

@@ -30,3 +30,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.BankAccounts = exports.AccountingBankAccount = exports.SupplementalData = exports.Metadata = exports.BankAccountType = void 0;
exports.BankAccounts = exports.BankAccountsAccountingBankAccount = exports.BankAccountsSupplementalData = exports.BankAccountsMetadata = exports.BankAccountsBankAccountType = void 0;
var utils_1 = require("../../../internal/utils");

@@ -42,11 +42,11 @@ var links_1 = require("./links");

*/
var BankAccountType;
(function (BankAccountType) {
BankAccountType["Unknown"] = "Unknown";
BankAccountType["Credit"] = "Credit";
BankAccountType["Debit"] = "Debit";
})(BankAccountType = exports.BankAccountType || (exports.BankAccountType = {}));
var Metadata = /** @class */ (function (_super) {
__extends(Metadata, _super);
function Metadata() {
var BankAccountsBankAccountType;
(function (BankAccountsBankAccountType) {
BankAccountsBankAccountType["Unknown"] = "Unknown";
BankAccountsBankAccountType["Credit"] = "Credit";
BankAccountsBankAccountType["Debit"] = "Debit";
})(BankAccountsBankAccountType = exports.BankAccountsBankAccountType || (exports.BankAccountsBankAccountType = {}));
var BankAccountsMetadata = /** @class */ (function (_super) {
__extends(BankAccountsMetadata, _super);
function BankAccountsMetadata() {
return _super !== null && _super.apply(this, arguments) || this;

@@ -58,6 +58,6 @@ }

__metadata("design:type", Boolean)
], Metadata.prototype, "isDeleted", void 0);
return Metadata;
], BankAccountsMetadata.prototype, "isDeleted", void 0);
return BankAccountsMetadata;
}(utils_1.SpeakeasyBase));
exports.Metadata = Metadata;
exports.BankAccountsMetadata = BankAccountsMetadata;
/**

@@ -70,5 +70,5 @@ * Supplemental data is additional data you can include in our standard data types.

*/
var SupplementalData = /** @class */ (function (_super) {
__extends(SupplementalData, _super);
function SupplementalData() {
var BankAccountsSupplementalData = /** @class */ (function (_super) {
__extends(BankAccountsSupplementalData, _super);
function BankAccountsSupplementalData() {
return _super !== null && _super.apply(this, arguments) || this;

@@ -80,6 +80,6 @@ }

__metadata("design:type", Object)
], SupplementalData.prototype, "content", void 0);
return SupplementalData;
], BankAccountsSupplementalData.prototype, "content", void 0);
return BankAccountsSupplementalData;
}(utils_1.SpeakeasyBase));
exports.SupplementalData = SupplementalData;
exports.BankAccountsSupplementalData = BankAccountsSupplementalData;
/**

@@ -105,5 +105,5 @@ * > **Accessing Bank Accounts through Banking API**

*/
var AccountingBankAccount = /** @class */ (function (_super) {
__extends(AccountingBankAccount, _super);
function AccountingBankAccount() {
var BankAccountsAccountingBankAccount = /** @class */ (function (_super) {
__extends(BankAccountsAccountingBankAccount, _super);
function BankAccountsAccountingBankAccount() {
return _super !== null && _super.apply(this, arguments) || this;

@@ -115,3 +115,3 @@ }

__metadata("design:type", String)
], AccountingBankAccount.prototype, "accountName", void 0);
], BankAccountsAccountingBankAccount.prototype, "accountName", void 0);
__decorate([

@@ -121,3 +121,3 @@ (0, utils_1.SpeakeasyMetadata)(),

__metadata("design:type", String)
], AccountingBankAccount.prototype, "accountNumber", void 0);
], BankAccountsAccountingBankAccount.prototype, "accountNumber", void 0);
__decorate([

@@ -127,3 +127,3 @@ (0, utils_1.SpeakeasyMetadata)(),

__metadata("design:type", String)
], AccountingBankAccount.prototype, "accountType", void 0);
], BankAccountsAccountingBankAccount.prototype, "accountType", void 0);
__decorate([

@@ -133,3 +133,3 @@ (0, utils_1.SpeakeasyMetadata)(),

__metadata("design:type", Number)
], AccountingBankAccount.prototype, "availableBalance", void 0);
], BankAccountsAccountingBankAccount.prototype, "availableBalance", void 0);
__decorate([

@@ -139,3 +139,3 @@ (0, utils_1.SpeakeasyMetadata)(),

__metadata("design:type", Number)
], AccountingBankAccount.prototype, "balance", void 0);
], BankAccountsAccountingBankAccount.prototype, "balance", void 0);
__decorate([

@@ -145,3 +145,3 @@ (0, utils_1.SpeakeasyMetadata)(),

__metadata("design:type", String)
], AccountingBankAccount.prototype, "currency", void 0);
], BankAccountsAccountingBankAccount.prototype, "currency", void 0);
__decorate([

@@ -151,3 +151,3 @@ (0, utils_1.SpeakeasyMetadata)(),

__metadata("design:type", String)
], AccountingBankAccount.prototype, "iBan", void 0);
], BankAccountsAccountingBankAccount.prototype, "iBan", void 0);
__decorate([

@@ -157,3 +157,3 @@ (0, utils_1.SpeakeasyMetadata)(),

__metadata("design:type", String)
], AccountingBankAccount.prototype, "id", void 0);
], BankAccountsAccountingBankAccount.prototype, "id", void 0);
__decorate([

@@ -163,9 +163,9 @@ (0, utils_1.SpeakeasyMetadata)(),

__metadata("design:type", String)
], AccountingBankAccount.prototype, "institution", void 0);
], BankAccountsAccountingBankAccount.prototype, "institution", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "metadata" }),
(0, class_transformer_1.Type)(function () { return Metadata; }),
__metadata("design:type", Metadata)
], AccountingBankAccount.prototype, "metadata", void 0);
(0, class_transformer_1.Type)(function () { return BankAccountsMetadata; }),
__metadata("design:type", BankAccountsMetadata)
], BankAccountsAccountingBankAccount.prototype, "metadata", void 0);
__decorate([

@@ -175,3 +175,3 @@ (0, utils_1.SpeakeasyMetadata)(),

__metadata("design:type", String)
], AccountingBankAccount.prototype, "modifiedDate", void 0);
], BankAccountsAccountingBankAccount.prototype, "modifiedDate", void 0);
__decorate([

@@ -181,3 +181,3 @@ (0, utils_1.SpeakeasyMetadata)(),

__metadata("design:type", String)
], AccountingBankAccount.prototype, "nominalCode", void 0);
], BankAccountsAccountingBankAccount.prototype, "nominalCode", void 0);
__decorate([

@@ -187,3 +187,3 @@ (0, utils_1.SpeakeasyMetadata)(),

__metadata("design:type", Number)
], AccountingBankAccount.prototype, "overdraftLimit", void 0);
], BankAccountsAccountingBankAccount.prototype, "overdraftLimit", void 0);
__decorate([

@@ -193,3 +193,3 @@ (0, utils_1.SpeakeasyMetadata)(),

__metadata("design:type", String)
], AccountingBankAccount.prototype, "sortCode", void 0);
], BankAccountsAccountingBankAccount.prototype, "sortCode", void 0);
__decorate([

@@ -199,12 +199,12 @@ (0, utils_1.SpeakeasyMetadata)(),

__metadata("design:type", String)
], AccountingBankAccount.prototype, "sourceModifiedDate", void 0);
], BankAccountsAccountingBankAccount.prototype, "sourceModifiedDate", void 0);
__decorate([
(0, utils_1.SpeakeasyMetadata)(),
(0, class_transformer_1.Expose)({ name: "supplementalData" }),
(0, class_transformer_1.Type)(function () { return SupplementalData; }),
__metadata("design:type", SupplementalData)
], AccountingBankAccount.prototype, "supplementalData", void 0);
return AccountingBankAccount;
(0, class_transformer_1.Type)(function () { return BankAccountsSupplementalData; }),
__metadata("design:type", BankAccountsSupplementalData)
], BankAccountsAccountingBankAccount.prototype, "supplementalData", void 0);
return BankAccountsAccountingBankAccount;
}(utils_1.SpeakeasyBase));
exports.AccountingBankAccount = AccountingBankAccount;
exports.BankAccountsAccountingBankAccount = BankAccountsAccountingBankAccount;
var BankAccounts = /** @class */ (function (_super) {

@@ -232,5 +232,5 @@ __extends(BankAccounts, _super);

__decorate([
(0, utils_1.SpeakeasyMetadata)({ elemType: AccountingBankAccount }),
(0, utils_1.SpeakeasyMetadata)({ elemType: BankAccountsAccountingBankAccount }),
(0, class_transformer_1.Expose)({ name: "results" }),
(0, class_transformer_1.Type)(function () { return AccountingBankAccount; }),
(0, class_transformer_1.Type)(function () { return BankAccountsAccountingBankAccount; }),
__metadata("design:type", Array)

@@ -237,0 +237,0 @@ ], BankAccounts.prototype, "results", void 0);

@@ -0,3 +1,5 @@

export * from "./bankaccountcreateresponse";
export * from "./bankaccountcredentials";
export * from "./bankaccountoption";
export * from "./bankaccountprototype";
export * from "./bankaccounts";

@@ -31,2 +33,3 @@ export * from "./bankfeedaccountmappingresponse";

export * from "./pushchangetype";
export * from "./pushfieldvalidation";
export * from "./pushoperation";

@@ -37,2 +40,7 @@ export * from "./pushoperationchange";

export * from "./pushoperationstatus";
export * from "./pushoption";
export * from "./pushoptionchoice";
export * from "./pushoptionproperty";
export * from "./pushoptiontype";
export * from "./pushvalidationinfo";
export * from "./security";

@@ -39,0 +47,0 @@ export * from "./sourceaccount";

@@ -20,4 +20,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./bankaccountcreateresponse"), exports);
__exportStar(require("./bankaccountcredentials"), exports);
__exportStar(require("./bankaccountoption"), exports);
__exportStar(require("./bankaccountprototype"), exports);
__exportStar(require("./bankaccounts"), exports);

@@ -51,2 +53,3 @@ __exportStar(require("./bankfeedaccountmappingresponse"), exports);

__exportStar(require("./pushchangetype"), exports);
__exportStar(require("./pushfieldvalidation"), exports);
__exportStar(require("./pushoperation"), exports);

@@ -57,2 +60,7 @@ __exportStar(require("./pushoperationchange"), exports);

__exportStar(require("./pushoperationstatus"), exports);
__exportStar(require("./pushoption"), exports);
__exportStar(require("./pushoptionchoice"), exports);
__exportStar(require("./pushoptionproperty"), exports);
__exportStar(require("./pushoptiontype"), exports);
__exportStar(require("./pushvalidationinfo"), exports);
__exportStar(require("./security"), exports);

@@ -59,0 +67,0 @@ __exportStar(require("./sourceaccount"), exports);

@@ -31,5 +31,5 @@ "use strict";

this.openapiDocVersion = "3.0.0";
this.sdkVersion = "4.0.1";
this.genVersion = "2.230.3";
this.userAgent = "speakeasy-sdk/typescript 4.0.1 2.230.3 3.0.0 @codat/bank-feeds";
this.sdkVersion = "4.1.0";
this.genVersion = "2.231.0";
this.userAgent = "speakeasy-sdk/typescript 4.1.0 2.231.0 3.0.0 @codat/bank-feeds";
Object.assign(this, init);

@@ -36,0 +36,0 @@ }

@@ -1,2 +0,2 @@

# AccountingBankAccount
# ~~AccountingBankAccount~~

@@ -20,3 +20,5 @@ > **Accessing Bank Accounts through Banking API**

> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible.
## Fields

@@ -28,3 +30,3 @@

| `accountNumber` | *string* | :heavy_minus_sign: | Account number for the bank account.<br/><br/>Xero integrations<br/>Only a UK account number shows for bank accounts with GBP currency and a combined total of sort code and account number that equals 14 digits, For non-GBP accounts, the full bank account number is populated.<br/><br/>FreeAgent integrations<br/>For Credit accounts, only the last four digits are required. For other types, the field is optional. | |
| `accountType` | [shared.BankAccountType](../../../sdk/models/shared/bankaccounttype.md) | :heavy_minus_sign: | The type of transactions and balances on the account. <br/>For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. <br/>For Debit accounts, positive balances are assets, and positive transactions **increase** assets. | |
| `accountType` | [shared.BankAccountCreateResponseBankAccountType](../../../sdk/models/shared/bankaccountcreateresponsebankaccounttype.md) | :heavy_minus_sign: | The type of transactions and balances on the account. <br/>For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. <br/>For Debit accounts, positive balances are assets, and positive transactions **increase** assets. | |
| `availableBalance` | *number* | :heavy_minus_sign: | Total available balance of the bank account as reported by the underlying data source. This may take into account overdrafts or pending transactions for example. | |

@@ -31,0 +33,0 @@ | `balance` | *number* | :heavy_minus_sign: | Balance of the bank account. | |

@@ -6,8 +6,8 @@ # BankAccounts

| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A |
| `pageNumber` | *number* | :heavy_check_mark: | Current page number. |
| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. |
| `results` | [shared.AccountingBankAccount](../../../sdk/models/shared/accountingbankaccount.md)[] | :heavy_minus_sign: | N/A |
| `totalResults` | *number* | :heavy_check_mark: | Total number of items. |
| Field | Type | Required | Description |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A |
| `pageNumber` | *number* | :heavy_check_mark: | Current page number. |
| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. |
| `results` | [shared.BankAccountsAccountingBankAccount](../../../sdk/models/shared/bankaccountsaccountingbankaccount.md)[] | :heavy_minus_sign: | N/A |
| `totalResults` | *number* | :heavy_check_mark: | Total number of items. |

@@ -10,4 +10,121 @@ # BankAccounts

* [create](#create) - Create bank account
* [getCreateModel](#getcreatemodel) - Get create/update bank account model
* [list](#list) - List bank accounts
## create
The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company's connection.
[Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
**Integration-specific behaviour**
Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/bank-feeds-api#/operations/get-create-update-bankAccounts-model).
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating an account.
### Example Usage
```typescript
import { CodatBankFeeds } from "@codat/bank-feeds";
import { BankAccountType } from "@codat/bank-feeds/dist/sdk/models/shared";
async function run() {
const sdk = new CodatBankFeeds({
security: {
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
},
});
const res = await sdk.bankAccounts.create({
bankAccountPrototype: {
currency: "USD",
},
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
});
if (res.statusCode == 200) {
// handle response
}
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| `request` | [operations.CreateBankAccountRequest](../../sdk/models/operations/createbankaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
### Response
**Promise<[operations.CreateBankAccountResponse](../../sdk/models/operations/createbankaccountresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| errors.SDKError | 4xx-5xx | */* |
## getCreateModel
The *Get create/update bank account model* endpoint returns the expected data for the request payload when creating and updating a [bank account](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) for a given company and integration.
[Bank accounts](https://docs.codat.io/bank-feeds-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.
**Integration-specific behaviour**
See the *response examples* for integration-specific indicative models.
Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating and updating a bank account.
### Example Usage
```typescript
import { CodatBankFeeds } from "@codat/bank-feeds";
async function run() {
const sdk = new CodatBankFeeds({
security: {
authHeader: "Basic BASE_64_ENCODED(API_KEY)",
},
});
const res = await sdk.bankAccounts.getCreateModel({
companyId: "8a210b68-6988-11ed-a1eb-0242ac120002",
connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171",
});
if (res.statusCode == 200) {
// handle response
}
}
run();
```
### Parameters
| Parameter | Type | Required | Description |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `request` | [operations.GetCreateBankAccountsModelRequest](../../sdk/models/operations/getcreatebankaccountsmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. |
| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. |
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
### Response
**Promise<[operations.GetCreateBankAccountsModelResponse](../../sdk/models/operations/getcreatebankaccountsmodelresponse.md)>**
### Errors
| Error Object | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| errors.SDKError | 4xx-5xx | */* |
## list

@@ -14,0 +131,0 @@

{
"name": "@codat/bank-feeds",
"version": "4.0.1",
"version": "4.1.0",
"author": "Codat",

@@ -5,0 +5,0 @@ "scripts": {

@@ -94,2 +94,4 @@ # Bank Feeds

* [create](docs/sdks/bankaccounts/README.md#create) - Create bank account
* [getCreateModel](docs/sdks/bankaccounts/README.md#getcreatemodel) - Get create/update bank account model
* [list](docs/sdks/bankaccounts/README.md#list) - List bank accounts

@@ -96,0 +98,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc