@codat/lending 2.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -34
- package/dist/sdk/companies.js +2 -2
- package/dist/sdk/connections.js +2 -2
- package/dist/sdk/fileupload.js +1 -1
- package/dist/sdk/loanwriteback.d.ts +19 -0
- package/dist/sdk/loanwriteback.js +27 -0
- package/dist/sdk/loanwritebackaccounts.d.ts +40 -0
- package/dist/sdk/loanwritebackaccounts.js +294 -0
- package/dist/sdk/loanwritebackbankaccounts.d.ts +39 -0
- package/dist/sdk/loanwritebackbankaccounts.js +293 -0
- package/dist/sdk/loanwritebackbanktransactions.d.ts +40 -0
- package/dist/sdk/loanwritebackbanktransactions.js +294 -0
- package/dist/sdk/loanwritebackcreateoperations.d.ts +22 -0
- package/dist/sdk/loanwritebackcreateoperations.js +250 -0
- package/dist/sdk/loanwritebackdirectcosts.d.ts +40 -0
- package/dist/sdk/loanwritebackdirectcosts.js +294 -0
- package/dist/sdk/loanwritebacksuppliers.d.ts +40 -0
- package/dist/sdk/loanwritebacksuppliers.js +294 -0
- package/dist/sdk/loanwritebacktransfers.d.ts +40 -0
- package/dist/sdk/loanwritebacktransfers.js +294 -0
- package/dist/sdk/models/operations/createaccount.d.ts +27 -0
- package/dist/sdk/models/operations/createaccount.js +115 -0
- package/dist/sdk/models/operations/createbankaccount.d.ts +27 -0
- package/dist/sdk/models/operations/createbankaccount.js +115 -0
- package/dist/sdk/models/operations/createbanktransactions.d.ts +31 -0
- package/dist/sdk/models/operations/createbanktransactions.js +119 -0
- package/dist/sdk/models/operations/createdirectcost.d.ts +27 -0
- package/dist/sdk/models/operations/createdirectcost.js +115 -0
- package/dist/sdk/models/operations/createsupplier.d.ts +27 -0
- package/dist/sdk/models/operations/createsupplier.js +115 -0
- package/dist/sdk/models/operations/createtransfer.d.ts +27 -0
- package/dist/sdk/models/operations/createtransfer.js +115 -0
- package/dist/sdk/models/operations/getcreatebanktransactionsmodel.d.ts +24 -0
- package/dist/sdk/models/operations/getcreatebanktransactionsmodel.js +103 -0
- package/dist/sdk/models/operations/getcreatechartofaccountsmodel.d.ts +20 -0
- package/dist/sdk/models/operations/getcreatechartofaccountsmodel.js +99 -0
- package/dist/sdk/models/operations/getcreatedirectcostsmodel.d.ts +20 -0
- package/dist/sdk/models/operations/getcreatedirectcostsmodel.js +99 -0
- package/dist/sdk/models/operations/getcreateoperation.d.ts +23 -0
- package/dist/sdk/models/operations/getcreateoperation.js +99 -0
- package/dist/sdk/models/operations/getcreatetransfersmodel.d.ts +20 -0
- package/dist/sdk/models/operations/getcreatetransfersmodel.js +99 -0
- package/dist/sdk/models/operations/getcreateupdatebankaccountsmodel.d.ts +20 -0
- package/dist/sdk/models/operations/getcreateupdatebankaccountsmodel.js +99 -0
- package/dist/sdk/models/operations/getcreateupdatesuppliersmodel.d.ts +20 -0
- package/dist/sdk/models/operations/getcreateupdatesuppliersmodel.js +99 -0
- package/dist/sdk/models/operations/index.d.ts +14 -0
- package/dist/sdk/models/operations/index.js +14 -0
- package/dist/sdk/models/operations/listcreateoperations.d.ts +35 -0
- package/dist/sdk/models/operations/listcreateoperations.js +111 -0
- package/dist/sdk/models/shared/accountcategoriesupdatedwebhook.d.ts +40 -0
- package/dist/sdk/models/shared/accountcategoriesupdatedwebhook.js +90 -0
- package/dist/sdk/models/shared/accountcategoriesupdatedwebhookdata.d.ts +7 -0
- package/dist/sdk/models/shared/accountcategoriesupdatedwebhookdata.js +45 -0
- package/dist/sdk/models/shared/{addressesitems.d.ts → accountingaddress.d.ts} +1 -1
- package/dist/sdk/models/shared/{addressesitems.js → accountingaddress.js} +13 -13
- package/dist/sdk/models/shared/accountingbillcreditnote.d.ts +2 -2
- package/dist/sdk/models/shared/accountingbillcreditnote.js +3 -3
- package/dist/sdk/models/shared/accountingcompanyinfo.d.ts +6 -66
- package/dist/sdk/models/shared/accountingcompanyinfo.js +10 -100
- package/dist/sdk/models/shared/accountingcreateaccountresponse.d.ts +124 -0
- package/dist/sdk/models/shared/accountingcreateaccountresponse.js +118 -0
- package/dist/sdk/models/shared/accountingcreatebankaccountresponse.d.ts +112 -0
- package/dist/sdk/models/shared/accountingcreatebankaccountresponse.js +118 -0
- package/dist/sdk/models/shared/accountingcreatebanktransactions.d.ts +6 -0
- package/dist/sdk/models/shared/accountingcreatebanktransactions.js +52 -0
- package/dist/sdk/models/shared/accountingcreatebanktransactionsresponse.d.ts +92 -0
- package/dist/sdk/models/shared/accountingcreatebanktransactionsresponse.js +118 -0
- package/dist/sdk/models/shared/accountingcreatedirectcostresponse.d.ts +111 -0
- package/dist/sdk/models/shared/accountingcreatedirectcostresponse.js +118 -0
- package/dist/sdk/models/shared/accountingcreatesupplierresponse.d.ts +101 -0
- package/dist/sdk/models/shared/accountingcreatesupplierresponse.js +118 -0
- package/dist/sdk/models/shared/accountingcreatetransferresponse.d.ts +99 -0
- package/dist/sdk/models/shared/accountingcreatetransferresponse.js +118 -0
- package/dist/sdk/models/shared/accountingcreditnote.d.ts +2 -2
- package/dist/sdk/models/shared/accountingcreditnote.js +3 -3
- package/dist/sdk/models/shared/accountingcustomer.d.ts +2 -2
- package/dist/sdk/models/shared/accountingcustomer.js +3 -3
- package/dist/sdk/models/shared/accountinginvoice.d.ts +2 -2
- package/dist/sdk/models/shared/accountinginvoice.js +3 -3
- package/dist/sdk/models/shared/accountingsupplier.d.ts +2 -2
- package/dist/sdk/models/shared/accountingsupplier.js +3 -3
- package/dist/sdk/models/shared/clientratelimitreachedwebhook.d.ts +32 -0
- package/dist/sdk/models/shared/clientratelimitreachedwebhook.js +80 -0
- package/dist/sdk/models/shared/clientratelimitreachedwebhookdata.d.ts +31 -0
- package/dist/sdk/models/shared/clientratelimitreachedwebhookdata.js +50 -0
- package/dist/sdk/models/shared/clientratelimitresetwebhook.d.ts +32 -0
- package/dist/sdk/models/shared/clientratelimitresetwebhook.js +80 -0
- package/dist/sdk/models/shared/clientratelimitresetwebhookdata.d.ts +39 -0
- package/dist/sdk/models/shared/clientratelimitresetwebhookdata.js +60 -0
- package/dist/sdk/models/shared/commercecompanyinfo.d.ts +4 -4
- package/dist/sdk/models/shared/commercecompanyinfo.js +6 -6
- package/dist/sdk/models/shared/contact.d.ts +4 -4
- package/dist/sdk/models/shared/contact.js +6 -6
- package/dist/sdk/models/shared/createbankaccounttransaction.d.ts +31 -0
- package/dist/sdk/models/shared/createbankaccounttransaction.js +65 -0
- package/dist/sdk/models/shared/index.d.ts +31 -3
- package/dist/sdk/models/shared/index.js +31 -3
- package/dist/sdk/models/shared/items.d.ts +2 -9
- package/dist/sdk/models/shared/items.js +5 -6
- package/dist/sdk/models/shared/phonenumber.d.ts +12 -0
- package/dist/sdk/models/shared/{withholdingtaxitems.js → phonenumber.js} +12 -11
- package/dist/sdk/models/shared/pushchangetype.d.ts +7 -0
- package/dist/sdk/models/shared/pushchangetype.js +14 -0
- package/dist/sdk/models/shared/pushfieldvalidation.d.ts +6 -0
- package/dist/sdk/models/shared/pushfieldvalidation.js +55 -0
- package/dist/sdk/models/shared/pushoperation.d.ts +90 -0
- package/dist/sdk/models/shared/pushoperation.js +111 -0
- package/dist/sdk/models/shared/pushoperationchange.d.ts +8 -0
- package/dist/sdk/models/shared/pushoperationchange.js +58 -0
- package/dist/sdk/models/shared/pushoperationref.d.ts +9 -0
- package/dist/sdk/models/shared/pushoperationref.js +51 -0
- package/dist/sdk/models/shared/pushoperations.d.ts +10 -0
- package/dist/sdk/models/shared/pushoperations.js +69 -0
- package/dist/sdk/models/shared/pushoperationstatus.d.ts +9 -0
- package/dist/sdk/models/shared/pushoperationstatus.js +16 -0
- package/dist/sdk/models/shared/pushoption.d.ts +14 -0
- package/dist/sdk/models/shared/pushoption.js +89 -0
- package/dist/sdk/models/shared/pushoptionchoice.d.ts +12 -0
- package/dist/sdk/models/shared/pushoptionchoice.js +66 -0
- package/dist/sdk/models/shared/pushoptionproperty.d.ts +13 -0
- package/dist/sdk/models/shared/pushoptionproperty.js +88 -0
- package/dist/sdk/models/shared/pushoptiontype.d.ts +10 -0
- package/dist/sdk/models/shared/pushoptiontype.js +17 -0
- package/dist/sdk/models/shared/pushvalidationinfo.d.ts +6 -0
- package/dist/sdk/models/shared/pushvalidationinfo.js +53 -0
- package/dist/sdk/models/shared/validation.d.ts +9 -0
- package/dist/sdk/models/shared/validation.js +56 -0
- package/dist/sdk/models/shared/validationitem.d.ts +6 -0
- package/dist/sdk/models/shared/validationitem.js +55 -0
- package/dist/sdk/models/shared/{weblinksitems.d.ts → weblink.d.ts} +3 -3
- package/dist/sdk/models/shared/{weblinksitems.js → weblink.js} +14 -14
- package/dist/sdk/models/webhooks/accountcategoriesupdated.d.ts +7 -0
- package/dist/sdk/models/webhooks/accountcategoriesupdated.js +51 -0
- package/dist/sdk/models/webhooks/clientratelimitreached.d.ts +7 -0
- package/dist/sdk/models/webhooks/clientratelimitreached.js +51 -0
- package/dist/sdk/models/webhooks/clientratelimitreset.d.ts +7 -0
- package/dist/sdk/models/webhooks/clientratelimitreset.js +51 -0
- package/dist/sdk/models/webhooks/index.d.ts +3 -0
- package/dist/sdk/models/webhooks/index.js +22 -0
- package/dist/sdk/sdk.d.ts +2 -0
- package/dist/sdk/sdk.js +4 -2
- package/docs/models/operations/createaccountrequest.md +13 -0
- package/docs/models/operations/createaccountresponse.md +12 -0
- package/docs/models/operations/createbankaccountrequest.md +13 -0
- package/docs/models/operations/createbankaccountresponse.md +12 -0
- package/docs/models/operations/createbanktransactionsrequest.md +14 -0
- package/docs/models/operations/createbanktransactionsresponse.md +12 -0
- package/docs/models/operations/createdirectcostrequest.md +13 -0
- package/docs/models/operations/createdirectcostresponse.md +12 -0
- package/docs/models/operations/createsupplierrequest.md +13 -0
- package/docs/models/operations/createsupplierresponse.md +12 -0
- package/docs/models/operations/createtransferrequest.md +13 -0
- package/docs/models/operations/createtransferresponse.md +12 -0
- package/docs/models/operations/getcreatebanktransactionsmodelrequest.md +10 -0
- package/docs/models/operations/getcreatebanktransactionsmodelresponse.md +12 -0
- package/docs/models/operations/getcreatechartofaccountsmodelrequest.md +9 -0
- package/docs/models/operations/getcreatechartofaccountsmodelresponse.md +12 -0
- package/docs/models/operations/getcreatedirectcostsmodelrequest.md +9 -0
- package/docs/models/operations/getcreatedirectcostsmodelresponse.md +12 -0
- package/docs/models/operations/getcreateoperationrequest.md +9 -0
- package/docs/models/operations/getcreateoperationresponse.md +12 -0
- package/docs/models/operations/getcreatetransfersmodelrequest.md +9 -0
- package/docs/models/operations/getcreatetransfersmodelresponse.md +12 -0
- package/docs/models/operations/getcreateupdatebankaccountsmodelrequest.md +9 -0
- package/docs/models/operations/getcreateupdatebankaccountsmodelresponse.md +12 -0
- package/docs/models/operations/getcreateupdatesuppliersmodelrequest.md +9 -0
- package/docs/models/operations/getcreateupdatesuppliersmodelresponse.md +12 -0
- package/docs/models/operations/listcreateoperationsrequest.md +12 -0
- package/docs/models/operations/listcreateoperationsresponse.md +12 -0
- package/docs/models/shared/accountcategoriesupdatedwebhook.md +18 -0
- package/docs/models/shared/accountcategoriesupdatedwebhookdata.md +8 -0
- package/docs/models/shared/{addressesitems.md → accountingaddress.md} +1 -1
- package/docs/models/shared/accountingbillcreditnote.md +1 -1
- package/docs/models/shared/accountingcompanyinfo.md +3 -3
- package/docs/models/shared/accountingcreateaccountresponse.md +21 -0
- package/docs/models/shared/accountingcreatebankaccountresponse.md +21 -0
- package/docs/models/shared/accountingcreatebanktransactions.md +9 -0
- package/docs/models/shared/accountingcreatebanktransactionsresponse.md +21 -0
- package/docs/models/shared/accountingcreatedirectcostresponse.md +21 -0
- package/docs/models/shared/accountingcreatesupplierresponse.md +21 -0
- package/docs/models/shared/accountingcreatetransferresponse.md +21 -0
- package/docs/models/shared/accountingcreditnote.md +1 -1
- package/docs/models/shared/accountingcustomer.md +1 -1
- package/docs/models/shared/accountinginvoice.md +1 -1
- package/docs/models/shared/accountingsupplier.md +1 -1
- package/docs/models/shared/clientratelimitreachedwebhook.md +16 -0
- package/docs/models/shared/clientratelimitreachedwebhookdata.md +9 -0
- package/docs/models/shared/clientratelimitresetwebhook.md +16 -0
- package/docs/models/shared/clientratelimitresetwebhookdata.md +11 -0
- package/docs/models/shared/commercecompanyinfo.md +2 -2
- package/docs/models/shared/contact.md +2 -2
- package/docs/models/shared/createbankaccounttransaction.md +12 -0
- package/docs/models/shared/items.md +4 -4
- package/docs/models/shared/{accountingcompanyinfophone.md → phonenumber.md} +1 -1
- package/docs/models/shared/pushchangetype.md +12 -0
- package/docs/models/shared/pushfieldvalidation.md +10 -0
- package/docs/models/shared/pushoperation.md +20 -0
- package/docs/models/shared/pushoperationchange.md +10 -0
- package/docs/models/shared/pushoperationref.md +9 -0
- package/docs/models/shared/pushoperations.md +12 -0
- package/docs/models/shared/pushoperationstatus.md +13 -0
- package/docs/models/shared/pushoption.md +14 -0
- package/docs/models/shared/pushoptionchoice.md +12 -0
- package/docs/models/shared/pushoptionproperty.md +14 -0
- package/docs/models/shared/pushoptiontype.md +15 -0
- package/docs/models/shared/pushvalidationinfo.md +9 -0
- package/docs/models/shared/validation.md +11 -0
- package/docs/models/shared/validationitem.md +10 -0
- package/docs/models/shared/weblink.md +11 -0
- package/docs/models/shared/{itemstype.md → weblinktype.md} +1 -1
- package/docs/models/webhooks/accountcategoriesupdatedresponse.md +10 -0
- package/docs/models/webhooks/clientratelimitreachedresponse.md +10 -0
- package/docs/models/webhooks/clientratelimitresetresponse.md +10 -0
- package/docs/sdks/accountingbankdata/README.md +1 -1
- package/docs/sdks/accountingbankdataaccounts/README.md +3 -3
- package/docs/sdks/accountspayable/README.md +1 -1
- package/docs/sdks/accountspayablebillcreditnotes/README.md +3 -3
- package/docs/sdks/accountspayablebillpayments/README.md +3 -3
- package/docs/sdks/accountspayablebills/README.md +6 -6
- package/docs/sdks/accountspayablesuppliers/README.md +6 -6
- package/docs/sdks/accountsreceivable/README.md +1 -1
- package/docs/sdks/accountsreceivablecreditnotes/README.md +3 -3
- package/docs/sdks/accountsreceivablecustomers/README.md +6 -6
- package/docs/sdks/accountsreceivabledirectincomes/README.md +6 -6
- package/docs/sdks/accountsreceivableinvoices/README.md +8 -8
- package/docs/sdks/accountsreceivablepayments/README.md +3 -3
- package/docs/sdks/accountsreceivablereports/README.md +5 -5
- package/docs/sdks/banking/README.md +1 -1
- package/docs/sdks/bankingaccountbalances/README.md +2 -2
- package/docs/sdks/bankingcategorizedstatement/README.md +2 -2
- package/docs/sdks/bankingtransactioncategories/README.md +3 -3
- package/docs/sdks/companies/README.md +1 -1
- package/docs/sdks/companyinfo/README.md +1 -1
- package/docs/sdks/connections/README.md +1 -1
- package/docs/sdks/dataintegrity/README.md +1 -1
- package/docs/sdks/excelreports/README.md +1 -1
- package/docs/sdks/fileupload/README.md +1 -1
- package/docs/sdks/financialstatements/README.md +1 -1
- package/docs/sdks/financialstatementsaccounts/README.md +3 -3
- package/docs/sdks/financialstatementsbalancesheet/README.md +3 -3
- package/docs/sdks/financialstatementscashflow/README.md +2 -2
- package/docs/sdks/financialstatementsprofitandloss/README.md +3 -3
- package/docs/sdks/liabilities/README.md +1 -1
- package/docs/sdks/loanwriteback/README.md +4 -0
- package/docs/sdks/loanwritebackaccounts/README.md +134 -0
- package/docs/sdks/loanwritebackbankaccounts/README.md +126 -0
- package/docs/sdks/loanwritebackbanktransactions/README.md +121 -0
- package/docs/sdks/loanwritebackcreateoperations/README.md +89 -0
- package/docs/sdks/loanwritebackdirectcosts/README.md +200 -0
- package/docs/sdks/loanwritebacksuppliers/README.md +142 -0
- package/docs/sdks/loanwritebacktransfers/README.md +156 -0
- package/docs/sdks/managedata/README.md +1 -1
- package/docs/sdks/managedatapulloperations/README.md +4 -4
- package/docs/sdks/managedatarefresh/README.md +4 -4
- package/docs/sdks/sales/README.md +1 -1
- package/docs/sdks/salescustomers/README.md +2 -2
- package/docs/sdks/salesdisputes/README.md +2 -2
- package/docs/sdks/saleslocations/README.md +1 -1
- package/docs/sdks/salesmetrics/README.md +9 -9
- package/docs/sdks/salesorders/README.md +2 -2
- package/docs/sdks/salespaymentmethods/README.md +5 -5
- package/docs/sdks/salespayments/README.md +2 -2
- package/docs/sdks/salesproductcategories/README.md +5 -5
- package/docs/sdks/salesproducts/README.md +2 -2
- package/docs/sdks/salesreports/README.md +5 -5
- package/docs/sdks/salestransactions/README.md +2 -2
- package/docs/sdks/transactions/README.md +1 -1
- package/docs/sdks/transactionsaccounttransactions/README.md +5 -5
- package/docs/sdks/transactionsdirectcosts/README.md +11 -11
- package/docs/sdks/transactionsjournalentries/README.md +5 -5
- package/docs/sdks/transactionsjournals/README.md +2 -2
- package/docs/sdks/transactionstransfers/README.md +2 -2
- package/package.json +1 -1
- package/dist/sdk/models/shared/withholdingtaxitems.d.ts +0 -5
- package/docs/models/shared/accountingcompanyinfoaccountingaddress.md +0 -14
- package/docs/models/shared/accountingcompanyinfoweblink.md +0 -11
- package/docs/models/shared/accountingcompanyinfoweblinktype.md +0 -12
- package/docs/models/shared/weblinksitems.md +0 -11
- package/docs/models/shared/withholdingtaxitems.md +0 -9
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as utils from "../internal/utils";
|
|
2
|
+
import * as operations from "./models/operations";
|
|
3
|
+
import { SDKConfiguration } from "./sdk";
|
|
4
|
+
import { AxiosRequestConfig } from "axios";
|
|
5
|
+
export declare class LoanWritebackTransfers {
|
|
6
|
+
private sdkConfiguration;
|
|
7
|
+
constructor(sdkConfig: SDKConfiguration);
|
|
8
|
+
/**
|
|
9
|
+
* Create transfer
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* The *Create transfer* endpoint creates a new [transfer](https://docs.codat.io/accounting-api#/schemas/Transfer) for a given company's connection.
|
|
13
|
+
*
|
|
14
|
+
* [Transfers](https://docs.codat.io/accounting-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account.
|
|
15
|
+
*
|
|
16
|
+
* **Integration-specific behaviour**
|
|
17
|
+
*
|
|
18
|
+
* Required data may vary by integration. To see what data to post, first call [Get create transfer model](https://docs.codat.io/accounting-api#/operations/get-create-transfers-model).
|
|
19
|
+
*
|
|
20
|
+
* Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=transfers) for integrations that support creating an account.
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
create(req: operations.CreateTransferRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise<operations.CreateTransferResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Get create transfer model
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* The *Get create transfer model* endpoint returns the expected data for the request payload when creating a [transfer](https://docs.codat.io/accounting-api#/schemas/Transfer) for a given company and integration.
|
|
29
|
+
*
|
|
30
|
+
* [Transfers](https://docs.codat.io/accounting-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account.
|
|
31
|
+
*
|
|
32
|
+
* **Integration-specific behaviour**
|
|
33
|
+
*
|
|
34
|
+
* See the *response examples* for integration-specific indicative models.
|
|
35
|
+
*
|
|
36
|
+
* Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=transfers) for integrations that support creating a transfer.
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
getCreateModel(req: operations.GetCreateTransfersModelRequest, retries?: utils.RetryConfig, config?: AxiosRequestConfig): Promise<operations.GetCreateTransfersModelResponse>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
19
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
20
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
21
|
+
}
|
|
22
|
+
Object.defineProperty(o, k2, desc);
|
|
23
|
+
}) : (function(o, m, k, k2) {
|
|
24
|
+
if (k2 === undefined) k2 = k;
|
|
25
|
+
o[k2] = m[k];
|
|
26
|
+
}));
|
|
27
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
28
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
29
|
+
}) : function(o, v) {
|
|
30
|
+
o["default"] = v;
|
|
31
|
+
});
|
|
32
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
33
|
+
if (mod && mod.__esModule) return mod;
|
|
34
|
+
var result = {};
|
|
35
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
36
|
+
__setModuleDefault(result, mod);
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
40
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
41
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
42
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
43
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
44
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
45
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
49
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
50
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
51
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
52
|
+
function step(op) {
|
|
53
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
54
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
55
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
56
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
57
|
+
switch (op[0]) {
|
|
58
|
+
case 0: case 1: t = op; break;
|
|
59
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
60
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
61
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
62
|
+
default:
|
|
63
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
64
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
65
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
66
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
67
|
+
if (t[2]) _.ops.pop();
|
|
68
|
+
_.trys.pop(); continue;
|
|
69
|
+
}
|
|
70
|
+
op = body.call(thisArg, _);
|
|
71
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
72
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
var __read = (this && this.__read) || function (o, n) {
|
|
76
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
77
|
+
if (!m) return o;
|
|
78
|
+
var i = m.call(o), r, ar = [], e;
|
|
79
|
+
try {
|
|
80
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
81
|
+
}
|
|
82
|
+
catch (error) { e = { error: error }; }
|
|
83
|
+
finally {
|
|
84
|
+
try {
|
|
85
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
86
|
+
}
|
|
87
|
+
finally { if (e) throw e.error; }
|
|
88
|
+
}
|
|
89
|
+
return ar;
|
|
90
|
+
};
|
|
91
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
92
|
+
exports.LoanWritebackTransfers = void 0;
|
|
93
|
+
var utils = __importStar(require("../internal/utils"));
|
|
94
|
+
var errors = __importStar(require("./models/errors"));
|
|
95
|
+
var operations = __importStar(require("./models/operations"));
|
|
96
|
+
var shared = __importStar(require("./models/shared"));
|
|
97
|
+
var LoanWritebackTransfers = /** @class */ (function () {
|
|
98
|
+
function LoanWritebackTransfers(sdkConfig) {
|
|
99
|
+
this.sdkConfiguration = sdkConfig;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Create transfer
|
|
103
|
+
*
|
|
104
|
+
* @remarks
|
|
105
|
+
* The *Create transfer* endpoint creates a new [transfer](https://docs.codat.io/accounting-api#/schemas/Transfer) for a given company's connection.
|
|
106
|
+
*
|
|
107
|
+
* [Transfers](https://docs.codat.io/accounting-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account.
|
|
108
|
+
*
|
|
109
|
+
* **Integration-specific behaviour**
|
|
110
|
+
*
|
|
111
|
+
* Required data may vary by integration. To see what data to post, first call [Get create transfer model](https://docs.codat.io/accounting-api#/operations/get-create-transfers-model).
|
|
112
|
+
*
|
|
113
|
+
* Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=transfers) for integrations that support creating an account.
|
|
114
|
+
*
|
|
115
|
+
*/
|
|
116
|
+
LoanWritebackTransfers.prototype.create = function (req, retries, config) {
|
|
117
|
+
var _a, _b;
|
|
118
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
119
|
+
var baseURL, url, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, queryParams, globalRetryConfig, retryConfig, httpRes, contentType, res, decodedRes;
|
|
120
|
+
var _d;
|
|
121
|
+
return __generator(this, function (_e) {
|
|
122
|
+
switch (_e.label) {
|
|
123
|
+
case 0:
|
|
124
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
125
|
+
req = new operations.CreateTransferRequest(req);
|
|
126
|
+
}
|
|
127
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
128
|
+
url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/push/transfers", req);
|
|
129
|
+
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
|
|
130
|
+
try {
|
|
131
|
+
_d = __read(utils.serializeRequestBody(req, "accountingTransfer", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
|
|
132
|
+
}
|
|
133
|
+
catch (e) {
|
|
134
|
+
if (e instanceof Error) {
|
|
135
|
+
throw new Error("Error serializing request body, cause: ".concat(e.message));
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
client = this.sdkConfiguration.defaultClient;
|
|
139
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
140
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
141
|
+
return [4 /*yield*/, globalSecurity()];
|
|
142
|
+
case 1:
|
|
143
|
+
globalSecurity = _e.sent();
|
|
144
|
+
_e.label = 2;
|
|
145
|
+
case 2:
|
|
146
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
147
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
148
|
+
}
|
|
149
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
150
|
+
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
151
|
+
queryParams = utils.serializeQueryParams(req);
|
|
152
|
+
headers["Accept"] = "application/json";
|
|
153
|
+
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
154
|
+
globalRetryConfig = this.sdkConfiguration.retryConfig;
|
|
155
|
+
retryConfig = retries;
|
|
156
|
+
if (!retryConfig) {
|
|
157
|
+
if (globalRetryConfig) {
|
|
158
|
+
retryConfig = globalRetryConfig;
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return [4 /*yield*/, utils.Retry(function () {
|
|
165
|
+
return client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config));
|
|
166
|
+
}, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
|
|
167
|
+
case 3:
|
|
168
|
+
httpRes = _e.sent();
|
|
169
|
+
contentType = (_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 : "";
|
|
170
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
171
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
172
|
+
}
|
|
173
|
+
res = new operations.CreateTransferResponse({
|
|
174
|
+
statusCode: httpRes.status,
|
|
175
|
+
contentType: contentType,
|
|
176
|
+
rawResponse: httpRes,
|
|
177
|
+
});
|
|
178
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
179
|
+
switch (true) {
|
|
180
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
181
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
182
|
+
res.accountingCreateTransferResponse = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingCreateTransferResponse);
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
186
|
+
}
|
|
187
|
+
break;
|
|
188
|
+
case [400, 401, 404, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
|
|
189
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
190
|
+
res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
194
|
+
}
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
return [2 /*return*/, res];
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
};
|
|
202
|
+
/**
|
|
203
|
+
* Get create transfer model
|
|
204
|
+
*
|
|
205
|
+
* @remarks
|
|
206
|
+
* The *Get create transfer model* endpoint returns the expected data for the request payload when creating a [transfer](https://docs.codat.io/accounting-api#/schemas/Transfer) for a given company and integration.
|
|
207
|
+
*
|
|
208
|
+
* [Transfers](https://docs.codat.io/accounting-api#/schemas/Transfer) record the movement of money between two bank accounts, or between a bank account and a nominal account.
|
|
209
|
+
*
|
|
210
|
+
* **Integration-specific behaviour**
|
|
211
|
+
*
|
|
212
|
+
* See the *response examples* for integration-specific indicative models.
|
|
213
|
+
*
|
|
214
|
+
* Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=transfers) for integrations that support creating a transfer.
|
|
215
|
+
*
|
|
216
|
+
*/
|
|
217
|
+
LoanWritebackTransfers.prototype.getCreateModel = function (req, retries, config) {
|
|
218
|
+
var _a, _b;
|
|
219
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
220
|
+
var baseURL, url, client, globalSecurity, properties, headers, globalRetryConfig, retryConfig, httpRes, contentType, res, decodedRes;
|
|
221
|
+
return __generator(this, function (_c) {
|
|
222
|
+
switch (_c.label) {
|
|
223
|
+
case 0:
|
|
224
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
225
|
+
req = new operations.GetCreateTransfersModelRequest(req);
|
|
226
|
+
}
|
|
227
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
228
|
+
url = utils.generateURL(baseURL, "/companies/{companyId}/connections/{connectionId}/options/transfers", req);
|
|
229
|
+
client = this.sdkConfiguration.defaultClient;
|
|
230
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
231
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
232
|
+
return [4 /*yield*/, globalSecurity()];
|
|
233
|
+
case 1:
|
|
234
|
+
globalSecurity = _c.sent();
|
|
235
|
+
_c.label = 2;
|
|
236
|
+
case 2:
|
|
237
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
238
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
239
|
+
}
|
|
240
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
241
|
+
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
242
|
+
headers["Accept"] = "application/json";
|
|
243
|
+
headers["user-agent"] = "speakeasy-sdk/".concat(this.sdkConfiguration.language, " ").concat(this.sdkConfiguration.sdkVersion, " ").concat(this.sdkConfiguration.genVersion, " ").concat(this.sdkConfiguration.openapiDocVersion);
|
|
244
|
+
globalRetryConfig = this.sdkConfiguration.retryConfig;
|
|
245
|
+
retryConfig = retries;
|
|
246
|
+
if (!retryConfig) {
|
|
247
|
+
if (globalRetryConfig) {
|
|
248
|
+
retryConfig = globalRetryConfig;
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
retryConfig = new utils.RetryConfig("backoff", new utils.BackoffStrategy(500, 60000, 1.5, 3600000), true);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
return [4 /*yield*/, utils.Retry(function () {
|
|
255
|
+
return client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config));
|
|
256
|
+
}, new utils.Retries(retryConfig, ["408", "429", "5XX"]))];
|
|
257
|
+
case 3:
|
|
258
|
+
httpRes = _c.sent();
|
|
259
|
+
contentType = (_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 : "";
|
|
260
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
261
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
262
|
+
}
|
|
263
|
+
res = new operations.GetCreateTransfersModelResponse({
|
|
264
|
+
statusCode: httpRes.status,
|
|
265
|
+
contentType: contentType,
|
|
266
|
+
rawResponse: httpRes,
|
|
267
|
+
});
|
|
268
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
269
|
+
switch (true) {
|
|
270
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
271
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
272
|
+
res.pushOption = utils.objectToClass(JSON.parse(decodedRes), shared.PushOption);
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
276
|
+
}
|
|
277
|
+
break;
|
|
278
|
+
case [401, 404, 429].includes(httpRes === null || httpRes === void 0 ? void 0 : httpRes.status):
|
|
279
|
+
if (utils.matchContentType(contentType, "application/json")) {
|
|
280
|
+
res.errorMessage = utils.objectToClass(JSON.parse(decodedRes), shared.ErrorMessage);
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
throw new errors.SDKError("unknown content-type received: " + contentType, httpRes.status, decodedRes, httpRes);
|
|
284
|
+
}
|
|
285
|
+
break;
|
|
286
|
+
}
|
|
287
|
+
return [2 /*return*/, res];
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
});
|
|
291
|
+
};
|
|
292
|
+
return LoanWritebackTransfers;
|
|
293
|
+
}());
|
|
294
|
+
exports.LoanWritebackTransfers = LoanWritebackTransfers;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SpeakeasyBase } from "../../../internal/utils";
|
|
2
|
+
import * as shared from "../shared";
|
|
3
|
+
import { AxiosResponse } from "axios";
|
|
4
|
+
export declare class CreateAccountRequest extends SpeakeasyBase {
|
|
5
|
+
accountingAccount?: shared.AccountingAccount;
|
|
6
|
+
allowSyncOnPushComplete?: boolean;
|
|
7
|
+
companyId: string;
|
|
8
|
+
connectionId: string;
|
|
9
|
+
/**
|
|
10
|
+
* When updating data in the destination platform Codat checks the `sourceModifiedDate` against the `lastupdated` date from the accounting platform, if they're different Codat will return an error suggesting you should initiate another pull of the data. If this is set to `true` then the update will override this check.
|
|
11
|
+
*/
|
|
12
|
+
forceUpdate?: boolean;
|
|
13
|
+
timeoutInMinutes?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class CreateAccountResponse extends SpeakeasyBase {
|
|
16
|
+
/**
|
|
17
|
+
* Success
|
|
18
|
+
*/
|
|
19
|
+
accountingCreateAccountResponse?: shared.AccountingCreateAccountResponse;
|
|
20
|
+
contentType: string;
|
|
21
|
+
/**
|
|
22
|
+
* The request made is not valid.
|
|
23
|
+
*/
|
|
24
|
+
errorMessage?: shared.ErrorMessage;
|
|
25
|
+
statusCode: number;
|
|
26
|
+
rawResponse?: AxiosResponse;
|
|
27
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __extends = (this && this.__extends) || (function () {
|
|
6
|
+
var extendStatics = function (d, b) {
|
|
7
|
+
extendStatics = Object.setPrototypeOf ||
|
|
8
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
9
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
10
|
+
return extendStatics(d, b);
|
|
11
|
+
};
|
|
12
|
+
return function (d, b) {
|
|
13
|
+
if (typeof b !== "function" && b !== null)
|
|
14
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
15
|
+
extendStatics(d, b);
|
|
16
|
+
function __() { this.constructor = d; }
|
|
17
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25
|
+
}
|
|
26
|
+
Object.defineProperty(o, k2, desc);
|
|
27
|
+
}) : (function(o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
}));
|
|
31
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
32
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
33
|
+
}) : function(o, v) {
|
|
34
|
+
o["default"] = v;
|
|
35
|
+
});
|
|
36
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
37
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
38
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
39
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
40
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
41
|
+
};
|
|
42
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
50
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
51
|
+
};
|
|
52
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
+
exports.CreateAccountResponse = exports.CreateAccountRequest = void 0;
|
|
54
|
+
var utils_1 = require("../../../internal/utils");
|
|
55
|
+
var shared = __importStar(require("../shared"));
|
|
56
|
+
var CreateAccountRequest = /** @class */ (function (_super) {
|
|
57
|
+
__extends(CreateAccountRequest, _super);
|
|
58
|
+
function CreateAccountRequest() {
|
|
59
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
60
|
+
}
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "request, media_type=application/json" }),
|
|
63
|
+
__metadata("design:type", shared.AccountingAccount)
|
|
64
|
+
], CreateAccountRequest.prototype, "accountingAccount", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "queryParam, style=form;explode=true;name=allowSyncOnPushComplete" }),
|
|
67
|
+
__metadata("design:type", Boolean)
|
|
68
|
+
], CreateAccountRequest.prototype, "allowSyncOnPushComplete", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "pathParam, style=simple;explode=false;name=companyId" }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], CreateAccountRequest.prototype, "companyId", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "pathParam, style=simple;explode=false;name=connectionId" }),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], CreateAccountRequest.prototype, "connectionId", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "queryParam, style=form;explode=true;name=forceUpdate" }),
|
|
79
|
+
__metadata("design:type", Boolean)
|
|
80
|
+
], CreateAccountRequest.prototype, "forceUpdate", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "queryParam, style=form;explode=true;name=timeoutInMinutes" }),
|
|
83
|
+
__metadata("design:type", Number)
|
|
84
|
+
], CreateAccountRequest.prototype, "timeoutInMinutes", void 0);
|
|
85
|
+
return CreateAccountRequest;
|
|
86
|
+
}(utils_1.SpeakeasyBase));
|
|
87
|
+
exports.CreateAccountRequest = CreateAccountRequest;
|
|
88
|
+
var CreateAccountResponse = /** @class */ (function (_super) {
|
|
89
|
+
__extends(CreateAccountResponse, _super);
|
|
90
|
+
function CreateAccountResponse() {
|
|
91
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
92
|
+
}
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
95
|
+
__metadata("design:type", shared.AccountingCreateAccountResponse)
|
|
96
|
+
], CreateAccountResponse.prototype, "accountingCreateAccountResponse", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
99
|
+
__metadata("design:type", String)
|
|
100
|
+
], CreateAccountResponse.prototype, "contentType", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
103
|
+
__metadata("design:type", shared.ErrorMessage)
|
|
104
|
+
], CreateAccountResponse.prototype, "errorMessage", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
107
|
+
__metadata("design:type", Number)
|
|
108
|
+
], CreateAccountResponse.prototype, "statusCode", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
111
|
+
__metadata("design:type", Object)
|
|
112
|
+
], CreateAccountResponse.prototype, "rawResponse", void 0);
|
|
113
|
+
return CreateAccountResponse;
|
|
114
|
+
}(utils_1.SpeakeasyBase));
|
|
115
|
+
exports.CreateAccountResponse = CreateAccountResponse;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { SpeakeasyBase } from "../../../internal/utils";
|
|
2
|
+
import * as shared from "../shared";
|
|
3
|
+
import { AxiosResponse } from "axios";
|
|
4
|
+
export declare class CreateBankAccountRequest extends SpeakeasyBase {
|
|
5
|
+
accountingBankAccount?: shared.AccountingBankAccount;
|
|
6
|
+
allowSyncOnPushComplete?: boolean;
|
|
7
|
+
companyId: string;
|
|
8
|
+
connectionId: string;
|
|
9
|
+
/**
|
|
10
|
+
* When updating data in the destination platform Codat checks the `sourceModifiedDate` against the `lastupdated` date from the accounting platform, if they're different Codat will return an error suggesting you should initiate another pull of the data. If this is set to `true` then the update will override this check.
|
|
11
|
+
*/
|
|
12
|
+
forceUpdate?: boolean;
|
|
13
|
+
timeoutInMinutes?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class CreateBankAccountResponse extends SpeakeasyBase {
|
|
16
|
+
/**
|
|
17
|
+
* Success
|
|
18
|
+
*/
|
|
19
|
+
accountingCreateBankAccountResponse?: shared.AccountingCreateBankAccountResponse;
|
|
20
|
+
contentType: string;
|
|
21
|
+
/**
|
|
22
|
+
* The request made is not valid.
|
|
23
|
+
*/
|
|
24
|
+
errorMessage?: shared.ErrorMessage;
|
|
25
|
+
statusCode: number;
|
|
26
|
+
rawResponse?: AxiosResponse;
|
|
27
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __extends = (this && this.__extends) || (function () {
|
|
6
|
+
var extendStatics = function (d, b) {
|
|
7
|
+
extendStatics = Object.setPrototypeOf ||
|
|
8
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
9
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
10
|
+
return extendStatics(d, b);
|
|
11
|
+
};
|
|
12
|
+
return function (d, b) {
|
|
13
|
+
if (typeof b !== "function" && b !== null)
|
|
14
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
15
|
+
extendStatics(d, b);
|
|
16
|
+
function __() { this.constructor = d; }
|
|
17
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25
|
+
}
|
|
26
|
+
Object.defineProperty(o, k2, desc);
|
|
27
|
+
}) : (function(o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
}));
|
|
31
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
32
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
33
|
+
}) : function(o, v) {
|
|
34
|
+
o["default"] = v;
|
|
35
|
+
});
|
|
36
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
37
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
38
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
39
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
40
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
41
|
+
};
|
|
42
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
43
|
+
if (mod && mod.__esModule) return mod;
|
|
44
|
+
var result = {};
|
|
45
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
46
|
+
__setModuleDefault(result, mod);
|
|
47
|
+
return result;
|
|
48
|
+
};
|
|
49
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
50
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
51
|
+
};
|
|
52
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
53
|
+
exports.CreateBankAccountResponse = exports.CreateBankAccountRequest = void 0;
|
|
54
|
+
var utils_1 = require("../../../internal/utils");
|
|
55
|
+
var shared = __importStar(require("../shared"));
|
|
56
|
+
var CreateBankAccountRequest = /** @class */ (function (_super) {
|
|
57
|
+
__extends(CreateBankAccountRequest, _super);
|
|
58
|
+
function CreateBankAccountRequest() {
|
|
59
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
60
|
+
}
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "request, media_type=application/json" }),
|
|
63
|
+
__metadata("design:type", shared.AccountingBankAccount)
|
|
64
|
+
], CreateBankAccountRequest.prototype, "accountingBankAccount", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "queryParam, style=form;explode=true;name=allowSyncOnPushComplete" }),
|
|
67
|
+
__metadata("design:type", Boolean)
|
|
68
|
+
], CreateBankAccountRequest.prototype, "allowSyncOnPushComplete", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "pathParam, style=simple;explode=false;name=companyId" }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], CreateBankAccountRequest.prototype, "companyId", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "pathParam, style=simple;explode=false;name=connectionId" }),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], CreateBankAccountRequest.prototype, "connectionId", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "queryParam, style=form;explode=true;name=forceUpdate" }),
|
|
79
|
+
__metadata("design:type", Boolean)
|
|
80
|
+
], CreateBankAccountRequest.prototype, "forceUpdate", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, utils_1.SpeakeasyMetadata)({ data: "queryParam, style=form;explode=true;name=timeoutInMinutes" }),
|
|
83
|
+
__metadata("design:type", Number)
|
|
84
|
+
], CreateBankAccountRequest.prototype, "timeoutInMinutes", void 0);
|
|
85
|
+
return CreateBankAccountRequest;
|
|
86
|
+
}(utils_1.SpeakeasyBase));
|
|
87
|
+
exports.CreateBankAccountRequest = CreateBankAccountRequest;
|
|
88
|
+
var CreateBankAccountResponse = /** @class */ (function (_super) {
|
|
89
|
+
__extends(CreateBankAccountResponse, _super);
|
|
90
|
+
function CreateBankAccountResponse() {
|
|
91
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
92
|
+
}
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
95
|
+
__metadata("design:type", shared.AccountingCreateBankAccountResponse)
|
|
96
|
+
], CreateBankAccountResponse.prototype, "accountingCreateBankAccountResponse", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
99
|
+
__metadata("design:type", String)
|
|
100
|
+
], CreateBankAccountResponse.prototype, "contentType", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
103
|
+
__metadata("design:type", shared.ErrorMessage)
|
|
104
|
+
], CreateBankAccountResponse.prototype, "errorMessage", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
107
|
+
__metadata("design:type", Number)
|
|
108
|
+
], CreateBankAccountResponse.prototype, "statusCode", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
111
|
+
__metadata("design:type", Object)
|
|
112
|
+
], CreateBankAccountResponse.prototype, "rawResponse", void 0);
|
|
113
|
+
return CreateBankAccountResponse;
|
|
114
|
+
}(utils_1.SpeakeasyBase));
|
|
115
|
+
exports.CreateBankAccountResponse = CreateBankAccountResponse;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { SpeakeasyBase } from "../../../internal/utils";
|
|
2
|
+
import * as shared from "../shared";
|
|
3
|
+
import { AxiosResponse } from "axios";
|
|
4
|
+
export declare class CreateBankTransactionsRequest extends SpeakeasyBase {
|
|
5
|
+
accountingCreateBankTransactions?: shared.AccountingCreateBankTransactions;
|
|
6
|
+
/**
|
|
7
|
+
* Unique identifier for an account
|
|
8
|
+
*/
|
|
9
|
+
accountId: string;
|
|
10
|
+
allowSyncOnPushComplete?: boolean;
|
|
11
|
+
companyId: string;
|
|
12
|
+
connectionId: string;
|
|
13
|
+
/**
|
|
14
|
+
* When updating data in the destination platform Codat checks the `sourceModifiedDate` against the `lastupdated` date from the accounting platform, if they're different Codat will return an error suggesting you should initiate another pull of the data. If this is set to `true` then the update will override this check.
|
|
15
|
+
*/
|
|
16
|
+
forceUpdate?: boolean;
|
|
17
|
+
timeoutInMinutes?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare class CreateBankTransactionsResponse extends SpeakeasyBase {
|
|
20
|
+
/**
|
|
21
|
+
* Success
|
|
22
|
+
*/
|
|
23
|
+
accountingCreateBankTransactionsResponse?: shared.AccountingCreateBankTransactionsResponse;
|
|
24
|
+
contentType: string;
|
|
25
|
+
/**
|
|
26
|
+
* Your API request was not properly authorized.
|
|
27
|
+
*/
|
|
28
|
+
errorMessage?: shared.ErrorMessage;
|
|
29
|
+
statusCode: number;
|
|
30
|
+
rawResponse?: AxiosResponse;
|
|
31
|
+
}
|