From ab6cc894d483a2c129c9ac74b4954157dc311dbb Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Wed, 4 Mar 2026 15:09:03 +0000 Subject: [PATCH] =?UTF-8?q?##=20Typescript=20SDK=20Changes:=20*=20`codatsy?= =?UTF-8?q?ncexpenses.connections.create()`:=20=20`response.connectionInfo?= =?UTF-8?q?.Map`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*?= =?UTF-8?q?=20`codatsyncexpenses.companies.list()`:=20=20=20*=20=20`reques?= =?UTF-8?q?t.tags`=20**Added**=20=20=20*=20=20`response.results[].dataConn?= =?UTF-8?q?ections[].connectionInfo.Map`=20**Changed**=20(Breaking=20?= =?UTF-8?q?=E2=9A=A0=EF=B8=8F)=20*=20`codatsyncexpenses.companies.create()?= =?UTF-8?q?`:=20=20`response.dataConnections[].connectionInfo.Map`=20?= =?UTF-8?q?**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`codatsynce?= =?UTF-8?q?xpenses.companies.update()`:=20=20=20*=20=20`request`=20**Chang?= =?UTF-8?q?ed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20=20=20*=20=20`response?= =?UTF-8?q?.dataConnections[].connectionInfo.Map`=20**Changed**=20(Br?= =?UTF-8?q?eaking=20=E2=9A=A0=EF=B8=8F)=20*=20`codatsyncexpenses.companies?= =?UTF-8?q?.get()`:=20=20`response.dataConnections[].connectionInfo.Map`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)=20*=20`coda?= =?UTF-8?q?tsyncexpenses.connections.list()`:=20=20`response.results[].con?= =?UTF-8?q?nectionInfo.Map`=20**Changed**=20(Breaking=20=E2=9A=A0?= =?UTF-8?q?=EF=B8=8F)=20*=20`codatsyncexpenses.connections.get()`:=20=20`r?= =?UTF-8?q?esponse.connectionInfo.Map`=20**Changed**=20(Breaking=20?= =?UTF-8?q?=E2=9A=A0=EF=B8=8F)=20*=20`codatsyncexpenses.connections.unlink?= =?UTF-8?q?()`:=20=20`response.connectionInfo.Map`=20**Changed**=20(B?= =?UTF-8?q?reaking=20=E2=9A=A0=EF=B8=8F)=20*=20`codatsyncexpenses.connecti?= =?UTF-8?q?ons.createPartnerExpenseConnection()`:=20=20`response.connectio?= =?UTF-8?q?nInfo.Map`=20**Changed**=20(Breaking=20=E2=9A=A0=EF=B8=8F)?= =?UTF-8?q?=20*=20`codatsyncexpenses.companies.replace()`:=20**Added**=20*?= =?UTF-8?q?=20`codatsyncexpenses.manageData.refreshAllDataTypes()`:=20=20`?= =?UTF-8?q?error.status[400]`=20**Added**=20*=20`codatsyncexpenses.manageD?= =?UTF-8?q?ata.get()`:=20=20`response.accountTransactions.lastSuccessfulSy?= =?UTF-8?q?nc`=20**Changed**=20*=20`codatsyncexpenses.manageData.refreshDa?= =?UTF-8?q?taType()`:=20=20`error.status[400]`=20**Added**?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .speakeasy/logs/changes/changes.html | 29 +- .speakeasy/logs/changes/changes.md | 23 +- .speakeasy/logs/changes/new.openapi.yaml | 13973 ++++++++++++---- .speakeasy/logs/changes/old.openapi.yaml | 13408 +++++++++++---- .speakeasy/workflow.lock | 15 +- sync-for-expenses/.eslintrc.cjs | 28 - sync-for-expenses/.gitignore | 13 + sync-for-expenses/.npmignore | 11 +- sync-for-expenses/.speakeasy/gen.lock | 3790 ++++- sync-for-expenses/.speakeasy/gen.yaml | 45 +- sync-for-expenses/FUNCTIONS.md | 30 +- sync-for-expenses/README.md | 216 +- sync-for-expenses/RELEASES.md | 12 +- sync-for-expenses/RUNTIMES.md | 34 +- sync-for-expenses/USAGE.md | 4 +- .../models/operations/createaccountrequest.md | 13 - .../createadjustmenttransactionrequest.md | 27 - .../operations/createbankaccountrequest.md | 6 - .../operations/createconnectionrequest.md | 3 - .../operations/createcustomerrequest.md | 18 - .../createexpensetransactionrequest.md | 43 - ...tereimbursableexpensetransactionrequest.md | 42 - .../operations/createsupplierrequest.md | 38 - .../createtransfertransactionrequest.md | 17 - .../models/operations/getcustomerrequest.md | 10 +- .../operations/getdatastatusdatastatuses.md | 166 +- .../operations/getpulloperationrequest.md | 2 +- .../operations/getpushoperationrequest.md | 2 +- .../models/operations/getsupplierrequest.md | 10 +- .../models/operations/listcompaniesrequest.md | 16 +- .../operations/listconnectionsrequest.md | 2 - .../models/operations/listcustomersrequest.md | 2 - .../operations/listpulloperationsrequest.md | 2 - .../operations/listpushoperationsrequest.md | 2 - .../models/operations/listsuppliersrequest.md | 2 - .../operations/listsynctransactionsrequest.md | 2 - .../operations/replacecompanyrequest.md | 18 + .../setcompanyconfigurationrequest.md | 7 - .../models/operations/updatecompanyrequest.md | 12 +- .../operations/updatecustomerrequest.md | 22 +- .../updateexpensetransactionrequest.md | 40 - ...tereimbursableexpensetransactionrequest.md | 39 - .../operations/updatesupplierrequest.md | 40 +- .../sdk/models/shared/accountingaccount.md | 10 +- .../sdk/models/shared/accountingaddress.md | 2 +- .../models/shared/accountingaddresstype.md | 2 +- .../models/shared/accountingbankaccount.md | 8 +- .../sdk/models/shared/accountingcustomer.md | 19 +- .../sdk/models/shared/accountingsupplier.md | 14 +- .../sdk/models/shared/accountprototype.md | 8 +- .../shared/adjustmenttransactionline.md | 1 - .../shared/adjustmenttransactionrequest.md | 27 +- .../docs/sdk/models/shared/bankaccount.md | 8 +- .../shared/clientratelimitreachedwebhook.md | 35 - .../clientratelimitreachedwebhookdata.md | 18 - .../shared/clientratelimitresetwebhook.md | 37 - .../shared/clientratelimitresetwebhookdata.md | 20 - .../models/shared/clientratelimitwebhook.md | 4 +- .../shared/clientratelimitwebhookpayload.md | 2 +- .../docs/sdk/models/shared/company.md | 8 +- .../sdk/models/shared/companyinformation.md | 6 +- .../companyinformationphonenumberstype.md | 17 + .../models/shared/companyinformationtype.md | 2 +- .../sdk/models/shared/companysyncstatus.md | 6 +- .../sdk/models/shared/companyupdaterequest.md | 20 + .../docs/sdk/models/shared/connection.md | 6 +- .../docs/sdk/models/shared/contact.md | 8 +- .../models/shared/createaccountresponse.md | 26 +- .../shared/createbankaccountresponse.md | 16 +- ...reatebankaccountresponsebankaccounttype.md | 2 +- .../models/shared/createcustomerresponse.md | 23 +- .../models/shared/createsupplierresponse.md | 46 +- .../docs/sdk/models/shared/customer.md | 15 +- .../sdk/models/shared/dataconnectionerror.md | 4 +- .../sdk/models/shared/dataconnectionstatus.md | 2 +- .../docs/sdk/models/shared/datasetstatus.md | 2 +- .../docs/sdk/models/shared/datastatus.md | 6 +- .../sdk/models/shared/expensecontactref.md | 1 - .../sdk/models/shared/expensessyncwebhook.md | 6 +- .../sdk/models/shared/expensetransaction.md | 7 +- .../models/shared/expensetransactionline.md | 1 - .../docs/sdk/models/shared/from.md | 2 +- .../docs/sdk/models/shared/items.md | 2 +- .../{phonenumbertype.md => itemstype.md} | 6 +- .../docs/sdk/models/shared/mappingoptions.md | 14 +- .../docs/sdk/models/shared/phone.md | 12 +- .../sdk/models/shared/phonenumberitems.md | 8 +- .../docs/sdk/models/shared/pulloperation.md | 4 +- .../docs/sdk/models/shared/pushchangetype.md | 2 +- .../docs/sdk/models/shared/pushoperation.md | 18 +- .../docs/sdk/models/shared/pushoption.md | 4 +- .../sdk/models/shared/pushoptionproperty.md | 7 +- .../shared/reimbursableexpensetransaction.md | 5 +- .../reimbursableexpensetransactionline.md | 5 +- .../docs/sdk/models/shared/supplier.md | 14 +- .../docs/sdk/models/shared/supplierstatus.md | 2 +- .../sdk/models/shared/synccompletewebhook.md | 37 - .../models/shared/synccompletewebhookdata.md | 18 - .../sdk/models/shared/syncfailedwebhook.md | 38 - .../models/shared/syncfailedwebhookdata.md | 19 - .../docs/sdk/models/shared/to.md | 2 +- .../docs/sdk/models/shared/trackingref.md | 1 - .../trackingrefadjustmenttransaction.md | 1 - .../docs/sdk/models/shared/transaction.md | 1 - .../sdk/models/shared/transactionstatus1.md | 2 +- .../shared/transfertransactionrequest.md | 16 +- .../models/shared/updatecustomerresponse.md | 23 +- ...pdatecustomerresponseaccountingcustomer.md | 17 +- .../sdk/models/shared/updateexpenserequest.md | 2 - .../models/shared/updateexpenseresponse.md | 10 +- ...tereimbursableexpensetransactionrequest.md | 5 +- .../models/shared/updatesupplierresponse.md | 48 +- ...pdatesupplierresponseaccountingsupplier.md | 14 +- .../docs/sdks/accounts/README.md | 510 +- .../docs/sdks/adjustments/README.md | 153 +- .../docs/sdks/attachments/README.md | 44 +- .../docs/sdks/bankaccounts/README.md | 603 +- .../docs/sdks/codatsyncexpenses/README.md | 37 - .../docs/sdks/companies/README.md | 744 +- .../docs/sdks/companyinfo/README.md | 25 +- .../docs/sdks/configuration/README.md | 49 +- .../docs/sdks/connections/README.md | 198 +- .../docs/sdks/customers/README.md | 2007 ++- .../docs/sdks/expenses/README.md | 553 +- .../docs/sdks/managedata/README.md | 127 +- .../docs/sdks/mappingoptions/README.md | 25 +- .../docs/sdks/pushoperations/README.md | 57 +- .../docs/sdks/reimbursements/README.md | 599 +- .../docs/sdks/suppliers/README.md | 2124 ++- sync-for-expenses/docs/sdks/sync/README.md | 97 +- .../docs/sdks/transactionstatus/README.md | 53 +- .../docs/sdks/transfers/README.md | 221 +- sync-for-expenses/eslint.config.mjs | 22 + sync-for-expenses/examples/.env.template | 3 + sync-for-expenses/examples/README.md | 31 + .../examples/companiesList.example.ts | 30 + sync-for-expenses/examples/package-lock.json | 611 + sync-for-expenses/examples/package.json | 18 + sync-for-expenses/jsr.json | 2 +- sync-for-expenses/package-lock.json | 3366 +--- sync-for-expenses/package.json | 23 +- sync-for-expenses/src/funcs/accountsCreate.ts | 89 +- .../src/funcs/accountsGetCreateModel.ts | 92 +- .../src/funcs/adjustmentsCreate.ts | 87 +- .../src/funcs/attachmentsUpload.ts | 143 +- .../src/funcs/bankAccountsCreate.ts | 89 +- .../src/funcs/bankAccountsGetCreateModel.ts | 92 +- .../src/funcs/companiesCreate.ts | 90 +- .../src/funcs/companiesDelete.ts | 92 +- sync-for-expenses/src/funcs/companiesGet.ts | 90 +- sync-for-expenses/src/funcs/companiesList.ts | 101 +- .../src/funcs/companiesReplace.ts | 193 + .../src/funcs/companiesUpdate.ts | 99 +- sync-for-expenses/src/funcs/companyInfoGet.ts | 87 +- .../src/funcs/configurationGet.ts | 90 +- .../src/funcs/configurationSet.ts | 87 +- .../src/funcs/connectionsCreate.ts | 90 +- ...nnectionsCreatePartnerExpenseConnection.ts | 87 +- .../src/funcs/connectionsDelete.ts | 92 +- sync-for-expenses/src/funcs/connectionsGet.ts | 90 +- .../src/funcs/connectionsList.ts | 87 +- .../src/funcs/connectionsUnlink.ts | 90 +- .../src/funcs/customersCreate.ts | 89 +- sync-for-expenses/src/funcs/customersGet.ts | 87 +- sync-for-expenses/src/funcs/customersList.ts | 87 +- .../src/funcs/customersUpdate.ts | 89 +- sync-for-expenses/src/funcs/expensesCreate.ts | 89 +- sync-for-expenses/src/funcs/expensesUpdate.ts | 98 +- sync-for-expenses/src/funcs/manageDataGet.ts | 90 +- .../src/funcs/manageDataGetPullOperation.ts | 90 +- .../src/funcs/manageDataListPullOperations.ts | 87 +- .../funcs/manageDataRefreshAllDataTypes.ts | 102 +- .../src/funcs/manageDataRefreshDataType.ts | 100 +- .../funcs/mappingOptionsGetMappingOptions.ts | 90 +- .../src/funcs/pushOperationsGet.ts | 90 +- .../src/funcs/pushOperationsList.ts | 87 +- .../src/funcs/reimbursementsCreate.ts | 89 +- .../src/funcs/reimbursementsUpdate.ts | 89 +- .../src/funcs/suppliersCreate.ts | 102 +- sync-for-expenses/src/funcs/suppliersGet.ts | 102 +- sync-for-expenses/src/funcs/suppliersList.ts | 102 +- .../src/funcs/suppliersUpdate.ts | 97 +- sync-for-expenses/src/funcs/syncGet.ts | 90 +- .../src/funcs/syncGetLastSuccessfulSync.ts | 90 +- .../src/funcs/syncGetLatestSync.ts | 90 +- sync-for-expenses/src/funcs/syncList.ts | 92 +- .../src/funcs/transactionStatusGet.ts | 92 +- .../src/funcs/transactionStatusList.ts | 87 +- .../src/funcs/transfersCreate.ts | 103 +- .../src/funcs/validateWebhook.ts | 63 + sync-for-expenses/src/hooks/hooks.ts | 20 + sync-for-expenses/src/hooks/types.ts | 14 +- sync-for-expenses/src/index.ts | 2 + sync-for-expenses/src/lib/base64.ts | 2 +- sync-for-expenses/src/lib/config.ts | 16 +- sync-for-expenses/src/lib/encodings.ts | 176 +- sync-for-expenses/src/lib/files.ts | 44 +- sync-for-expenses/src/lib/matchers.ts | 110 +- sync-for-expenses/src/lib/primitives.ts | 28 + sync-for-expenses/src/lib/retries.ts | 1 - sync-for-expenses/src/lib/schemas.ts | 7 +- sync-for-expenses/src/lib/sdks.ts | 67 +- sync-for-expenses/src/lib/security.ts | 27 +- sync-for-expenses/src/lib/url.ts | 2 +- sync-for-expenses/src/sdk/accounts.ts | 4 +- sync-for-expenses/src/sdk/attachments.ts | 19 +- sync-for-expenses/src/sdk/bankaccounts.ts | 4 +- sync-for-expenses/src/sdk/companies.ts | 39 +- sync-for-expenses/src/sdk/customers.ts | 4 +- sync-for-expenses/src/sdk/expenses.ts | 13 +- .../models/errors/codatsyncexpenseserror.ts | 35 + .../src/sdk/models/errors/errormessage.ts | 68 +- .../src/sdk/models/errors/index.ts | 2 + .../models/errors/responsevalidationerror.ts | 50 + .../src/sdk/models/errors/sdkerror.ts | 45 +- .../sdk/models/errors/sdkvalidationerror.ts | 14 +- .../sdk/models/operations/createaccount.ts | 41 +- .../operations/createadjustmenttransaction.ts | 45 +- .../models/operations/createbankaccount.ts | 45 +- .../sdk/models/operations/createconnection.ts | 75 +- .../sdk/models/operations/createcustomer.ts | 45 +- .../operations/createexpensetransaction.ts | 42 +- .../createpartnerexpenseconnection.ts | 40 +- .../createreimbursableexpensetransaction.ts | 52 +- .../sdk/models/operations/createsupplier.ts | 45 +- .../operations/createtransfertransaction.ts | 44 +- .../sdk/models/operations/deletecompany.ts | 37 +- .../sdk/models/operations/deleteconnection.ts | 38 +- .../src/sdk/models/operations/getcompany.ts | 37 +- .../operations/getcompanyconfiguration.ts | 37 +- .../sdk/models/operations/getcompanyinfo.ts | 37 +- .../sdk/models/operations/getconnection.ts | 38 +- .../operations/getcreatebankaccountsmodel.ts | 39 +- .../getcreatechartofaccountsmodel.ts | 41 +- .../src/sdk/models/operations/getcustomer.ts | 38 +- .../sdk/models/operations/getdatastatus.ts | 171 +- .../operations/getlastsuccessfulsync.ts | 37 +- .../sdk/models/operations/getlatestsync.ts | 37 +- .../models/operations/getmappingoptions.ts | 37 +- .../sdk/models/operations/getpulloperation.ts | 38 +- .../sdk/models/operations/getpushoperation.ts | 38 +- .../src/sdk/models/operations/getsupplier.ts | 38 +- .../src/sdk/models/operations/getsyncbyid.ts | 38 +- .../models/operations/getsynctransaction.ts | 39 +- .../src/sdk/models/operations/index.ts | 1 + .../sdk/models/operations/listcompanies.ts | 46 +- .../sdk/models/operations/listconnections.ts | 41 +- .../sdk/models/operations/listcustomers.ts | 41 +- .../models/operations/listpulloperations.ts | 41 +- .../models/operations/listpushoperations.ts | 41 +- .../sdk/models/operations/listsuppliers.ts | 41 +- .../src/sdk/models/operations/listsyncs.ts | 37 +- .../models/operations/listsynctransactions.ts | 40 +- .../models/operations/refreshalldatatypes.ts | 37 +- .../sdk/models/operations/refreshdatatype.ts | 39 +- .../sdk/models/operations/replacecompany.ts | 43 + .../operations/setcompanyconfiguration.ts | 42 +- .../sdk/models/operations/unlinkconnection.ts | 76 +- .../sdk/models/operations/updatecompany.ts | 50 +- .../sdk/models/operations/updatecustomer.ts | 47 +- .../operations/updateexpensetransaction.ts | 43 +- .../updatereimbursableexpensetransaction.ts | 54 +- .../sdk/models/operations/updatesupplier.ts | 47 +- .../operations/uploadexpenseattachment.ts | 44 +- .../models/shared/accountingaddresstype.ts | 14 +- .../sdk/models/shared/accountmappinginfo.ts | 77 +- .../src/sdk/models/shared/accountprototype.ts | 92 +- .../src/sdk/models/shared/accountstatus.ts | 14 +- .../src/sdk/models/shared/accounttype.ts | 14 +- .../shared/adjustmenttransactionline.ts | 46 +- .../shared/adjustmenttransactionrequest.ts | 44 +- .../shared/adjustmenttransactionresponse.ts | 39 +- .../src/sdk/models/shared/apaccountref.ts | 37 +- .../src/sdk/models/shared/attachment.ts | 37 +- .../src/sdk/models/shared/attachmentupload.ts | 38 +- .../src/sdk/models/shared/bankaccount.ts | 76 +- .../sdk/models/shared/bankaccountdetails.ts | 17 +- .../sdk/models/shared/bankaccountstatus.ts | 14 +- .../shared/clientratelimitreachedwebhook.ts | 142 - .../clientratelimitreachedwebhookdata.ts | 108 - .../shared/clientratelimitresetwebhook.ts | 142 - .../shared/clientratelimitresetwebhookdata.ts | 125 - .../models/shared/clientratelimitwebhook.ts | 17 +- .../shared/clientratelimitwebhookpayload.ts | 17 +- .../src/sdk/models/shared/codatfile.ts | 43 +- .../src/sdk/models/shared/companies.ts | 59 +- .../src/sdk/models/shared/company.ts | 65 +- .../sdk/models/shared/companyconfiguration.ts | 17 +- .../sdk/models/shared/companyinformation.ts | 233 +- .../src/sdk/models/shared/companyreference.ts | 32 +- .../sdk/models/shared/companyrequestbody.ts | 39 +- .../sdk/models/shared/companysyncstatus.ts | 51 +- .../sdk/models/shared/companyupdaterequest.ts | 46 + .../src/sdk/models/shared/connection.ts | 78 +- .../src/sdk/models/shared/connections.ts | 59 +- .../src/sdk/models/shared/contact.ts | 17 +- .../models/shared/createaccountresponse.ts | 244 +- .../shared/createbankaccountresponse.ts | 183 +- .../models/shared/createcustomerresponse.ts | 161 +- .../models/shared/createexpenseresponse.ts | 37 +- .../createreimbursableexpenseresponse.ts | 40 +- .../models/shared/createsupplierresponse.ts | 152 +- .../src/sdk/models/shared/customer.ts | 17 +- .../src/sdk/models/shared/customerdetails.ts | 17 +- .../src/sdk/models/shared/customers.ts | 63 +- .../src/sdk/models/shared/customerstatus.ts | 14 +- .../sdk/models/shared/dataconnectionerror.ts | 62 +- .../sdk/models/shared/dataconnectionstatus.ts | 14 +- .../src/sdk/models/shared/datastatus.ts | 66 +- .../src/sdk/models/shared/datatype.ts | 19 +- .../models/shared/definitiontransaction.ts | 29 +- .../src/sdk/models/shared/errorvalidation.ts | 39 +- .../sdk/models/shared/errorvalidationitem.ts | 41 +- .../sdk/models/shared/expensecontactref.ts | 56 +- .../sdk/models/shared/expensessyncwebhook.ts | 17 +- .../shared/expensessyncwebhookpayload.ts | 17 +- .../sdk/models/shared/expensetransaction.ts | 100 +- .../models/shared/expensetransactionline.ts | 47 +- .../src/sdk/models/shared/halref.ts | 33 +- .../src/sdk/models/shared/index.ts | 10 +- .../src/sdk/models/shared/integrationtype.ts | 18 +- .../src/sdk/models/shared/invoiceto.ts | 56 +- .../src/sdk/models/shared/itemref.ts | 34 +- .../src/sdk/models/shared/items.ts | 17 +- .../src/sdk/models/shared/links.ts | 46 +- .../src/sdk/models/shared/mappingoptions.ts | 50 +- .../src/sdk/models/shared/metadata.ts | 17 +- .../src/sdk/models/shared/phonenumberitems.ts | 51 +- .../src/sdk/models/shared/phonenumbertype.ts | 42 - .../sdk/models/shared/propertiedatatype.ts | 18 +- .../src/sdk/models/shared/pulloperation.ts | 71 +- .../src/sdk/models/shared/pulloperations.ts | 59 +- .../src/sdk/models/shared/pushchangetype.ts | 18 +- .../sdk/models/shared/pushfieldvalidation.ts | 41 +- .../src/sdk/models/shared/pushoperation.ts | 68 +- .../sdk/models/shared/pushoperationchange.ts | 44 +- .../src/sdk/models/shared/pushoperationref.ts | 40 +- .../src/sdk/models/shared/pushoperations.ts | 59 +- .../sdk/models/shared/pushoperationstatus.ts | 18 +- .../src/sdk/models/shared/pushoption.ts | 53 +- .../src/sdk/models/shared/pushoptionchoice.ts | 46 +- .../sdk/models/shared/pushoptionproperty.ts | 56 +- .../src/sdk/models/shared/pushoptiontype.ts | 18 +- .../sdk/models/shared/pushvalidationinfo.ts | 42 +- .../src/sdk/models/shared/recordref.ts | 37 +- .../shared/reimbursableexpensetransaction.ts | 50 +- .../reimbursableexpensetransactionline.ts | 50 +- .../models/shared/reimbursementcontactref.ts | 37 +- .../src/sdk/models/shared/security.ts | 41 +- .../src/sdk/models/shared/status.ts | 17 +- .../src/sdk/models/shared/supplementaldata.ts | 17 +- .../src/sdk/models/shared/supplier.ts | 17 +- .../src/sdk/models/shared/supplierdetails.ts | 17 +- .../src/sdk/models/shared/suppliers.ts | 63 +- .../src/sdk/models/shared/supplierstatus.ts | 14 +- .../sdk/models/shared/synccompletewebhook.ts | 149 - .../models/shared/synccompletewebhookdata.ts | 76 - .../sdk/models/shared/syncfailedwebhook.ts | 149 - .../models/shared/syncfailedwebhookdata.ts | 92 - .../sdk/models/shared/taxratemappinginfo.ts | 53 +- .../shared/trackingcategorymappinginfo.ts | 45 +- .../src/sdk/models/shared/trackingref.ts | 56 +- .../trackingrefadjustmenttransaction.ts | 60 +- .../src/sdk/models/shared/transaction.ts | 45 +- .../src/sdk/models/shared/transactions.ts | 59 +- .../sdk/models/shared/transactionstatus.ts | 18 +- .../shared/transfertransactionrequest.ts | 171 +- .../shared/transfertransactionresponse.ts | 39 +- .../models/shared/updatecustomerresponse.ts | 168 +- .../sdk/models/shared/updateexpenserequest.ts | 108 +- .../models/shared/updateexpenseresponse.ts | 37 +- ...tereimbursableexpensetransactionrequest.ts | 58 +- .../models/shared/updatesupplierresponse.ts | 159 +- .../src/sdk/models/shared/validation.ts | 37 +- .../src/sdk/models/shared/validationitem.ts | 37 +- .../src/sdk/models/shared/validfor.ts | 17 +- .../models/shared/validtransactiontypes.ts | 18 +- sync-for-expenses/src/sdk/reimbursements.ts | 4 + sync-for-expenses/src/sdk/sdk.ts | 21 + sync-for-expenses/src/sdk/suppliers.ts | 55 +- sync-for-expenses/src/sdk/transfers.ts | 16 +- sync-for-expenses/src/sdk/types/async.ts | 68 + sync-for-expenses/src/sdk/types/blobs.ts | 13 +- .../src/sdk/types/constdatetime.ts | 4 +- sync-for-expenses/src/sdk/types/enums.ts | 47 +- sync-for-expenses/src/sdk/types/index.ts | 5 +- .../src/sdk/types/unrecognized.ts | 35 + sync-for-expenses/src/sdk/types/webhooks.ts | 7 + sync-for-expenses/tsconfig.json | 8 +- 389 files changed, 38855 insertions(+), 20691 deletions(-) delete mode 100644 sync-for-expenses/.eslintrc.cjs create mode 100644 sync-for-expenses/docs/sdk/models/operations/replacecompanyrequest.md delete mode 100644 sync-for-expenses/docs/sdk/models/shared/clientratelimitreachedwebhook.md delete mode 100644 sync-for-expenses/docs/sdk/models/shared/clientratelimitreachedwebhookdata.md delete mode 100644 sync-for-expenses/docs/sdk/models/shared/clientratelimitresetwebhook.md delete mode 100644 sync-for-expenses/docs/sdk/models/shared/clientratelimitresetwebhookdata.md create mode 100644 sync-for-expenses/docs/sdk/models/shared/companyinformationphonenumberstype.md create mode 100644 sync-for-expenses/docs/sdk/models/shared/companyupdaterequest.md rename sync-for-expenses/docs/sdk/models/shared/{phonenumbertype.md => itemstype.md} (51%) delete mode 100644 sync-for-expenses/docs/sdk/models/shared/synccompletewebhook.md delete mode 100644 sync-for-expenses/docs/sdk/models/shared/synccompletewebhookdata.md delete mode 100644 sync-for-expenses/docs/sdk/models/shared/syncfailedwebhook.md delete mode 100644 sync-for-expenses/docs/sdk/models/shared/syncfailedwebhookdata.md delete mode 100644 sync-for-expenses/docs/sdks/codatsyncexpenses/README.md create mode 100644 sync-for-expenses/eslint.config.mjs create mode 100644 sync-for-expenses/examples/.env.template create mode 100644 sync-for-expenses/examples/README.md create mode 100644 sync-for-expenses/examples/companiesList.example.ts create mode 100644 sync-for-expenses/examples/package-lock.json create mode 100644 sync-for-expenses/examples/package.json create mode 100644 sync-for-expenses/src/funcs/companiesReplace.ts create mode 100644 sync-for-expenses/src/funcs/validateWebhook.ts create mode 100644 sync-for-expenses/src/sdk/models/errors/codatsyncexpenseserror.ts create mode 100644 sync-for-expenses/src/sdk/models/errors/responsevalidationerror.ts create mode 100644 sync-for-expenses/src/sdk/models/operations/replacecompany.ts delete mode 100644 sync-for-expenses/src/sdk/models/shared/clientratelimitreachedwebhook.ts delete mode 100644 sync-for-expenses/src/sdk/models/shared/clientratelimitreachedwebhookdata.ts delete mode 100644 sync-for-expenses/src/sdk/models/shared/clientratelimitresetwebhook.ts delete mode 100644 sync-for-expenses/src/sdk/models/shared/clientratelimitresetwebhookdata.ts create mode 100644 sync-for-expenses/src/sdk/models/shared/companyupdaterequest.ts delete mode 100644 sync-for-expenses/src/sdk/models/shared/phonenumbertype.ts delete mode 100644 sync-for-expenses/src/sdk/models/shared/synccompletewebhook.ts delete mode 100644 sync-for-expenses/src/sdk/models/shared/synccompletewebhookdata.ts delete mode 100644 sync-for-expenses/src/sdk/models/shared/syncfailedwebhook.ts delete mode 100644 sync-for-expenses/src/sdk/models/shared/syncfailedwebhookdata.ts create mode 100644 sync-for-expenses/src/sdk/types/async.ts create mode 100644 sync-for-expenses/src/sdk/types/unrecognized.ts create mode 100644 sync-for-expenses/src/sdk/types/webhooks.ts diff --git a/.speakeasy/logs/changes/changes.html b/.speakeasy/logs/changes/changes.html index 0d3b03636..17e85681b 100644 --- a/.speakeasy/logs/changes/changes.html +++ b/.speakeasy/logs/changes/changes.html @@ -98,13 +98,34 @@

Typescript SDK Changes:

    -
  • codatplatform.companies.getCompanySyncSettings(): Added
  • -
  • codatplatform.companies.setCompanySyncSettings(): Added
  • -
  • codatplatform.companies.refreshProductData(): +
  • codatsyncexpenses.connections.create(): response.connectionInfo.Map<any> Changed (Breaking ⚠️)
  • +
  • codatsyncexpenses.companies.list():
      -
    • request.requestBody Added
    • +
    • request.tags Added
    • +
    • response.results[].dataConnections[].connectionInfo.Map<any> Changed (Breaking ⚠️)
  • +
  • codatsyncexpenses.companies.create(): response.dataConnections[].connectionInfo.Map<any> Changed (Breaking ⚠️)
  • +
  • codatsyncexpenses.companies.update(): + +
      +
    • request Changed (Breaking ⚠️) + +
        +
      • companyRequestBody Removed (Breaking ⚠️)
      • +
      • companyUpdateRequest Added
      • +
    • +
    • response.dataConnections[].connectionInfo.Map<any> Changed (Breaking ⚠️)
    • +
  • +
  • codatsyncexpenses.companies.get(): response.dataConnections[].connectionInfo.Map<any> Changed (Breaking ⚠️)
  • +
  • codatsyncexpenses.connections.list(): response.results[].connectionInfo.Map<any> Changed (Breaking ⚠️)
  • +
  • codatsyncexpenses.connections.get(): response.connectionInfo.Map<any> Changed (Breaking ⚠️)
  • +
  • codatsyncexpenses.connections.unlink(): response.connectionInfo.Map<any> Changed (Breaking ⚠️)
  • +
  • codatsyncexpenses.connections.createPartnerExpenseConnection(): response.connectionInfo.Map<any> Changed (Breaking ⚠️)
  • +
  • codatsyncexpenses.companies.replace(): Added
  • +
  • codatsyncexpenses.manageData.refreshAllDataTypes(): error.status[400] Added
  • +
  • codatsyncexpenses.manageData.get(): response.accountTransactions.lastSuccessfulSync Changed
  • +
  • codatsyncexpenses.manageData.refreshDataType(): error.status[400] Added
\ No newline at end of file diff --git a/.speakeasy/logs/changes/changes.md b/.speakeasy/logs/changes/changes.md index 83638f6fd..89063f8e8 100644 --- a/.speakeasy/logs/changes/changes.md +++ b/.speakeasy/logs/changes/changes.md @@ -1,5 +1,20 @@ ## Typescript SDK Changes: -* `codatplatform.companies.getCompanySyncSettings()`: **Added** -* `codatplatform.companies.setCompanySyncSettings()`: **Added** -* `codatplatform.companies.refreshProductData()`: - * `request.requestBody` **Added** +* `codatsyncexpenses.connections.create()`: `response.connectionInfo.Map` **Changed** (Breaking ⚠️) +* `codatsyncexpenses.companies.list()`: + * `request.tags` **Added** + * `response.results[].dataConnections[].connectionInfo.Map` **Changed** (Breaking ⚠️) +* `codatsyncexpenses.companies.create()`: `response.dataConnections[].connectionInfo.Map` **Changed** (Breaking ⚠️) +* `codatsyncexpenses.companies.update()`: + * `request` **Changed** (Breaking ⚠️) + - `companyRequestBody` **Removed** (Breaking ⚠️) + - `companyUpdateRequest` **Added** + * `response.dataConnections[].connectionInfo.Map` **Changed** (Breaking ⚠️) +* `codatsyncexpenses.companies.get()`: `response.dataConnections[].connectionInfo.Map` **Changed** (Breaking ⚠️) +* `codatsyncexpenses.connections.list()`: `response.results[].connectionInfo.Map` **Changed** (Breaking ⚠️) +* `codatsyncexpenses.connections.get()`: `response.connectionInfo.Map` **Changed** (Breaking ⚠️) +* `codatsyncexpenses.connections.unlink()`: `response.connectionInfo.Map` **Changed** (Breaking ⚠️) +* `codatsyncexpenses.connections.createPartnerExpenseConnection()`: `response.connectionInfo.Map` **Changed** (Breaking ⚠️) +* `codatsyncexpenses.companies.replace()`: **Added** +* `codatsyncexpenses.manageData.refreshAllDataTypes()`: `error.status[400]` **Added** +* `codatsyncexpenses.manageData.get()`: `response.accountTransactions.lastSuccessfulSync` **Changed** +* `codatsyncexpenses.manageData.refreshDataType()`: `error.status[400]` **Added** diff --git a/.speakeasy/logs/changes/new.openapi.yaml b/.speakeasy/logs/changes/new.openapi.yaml index 12f8f7100..624c47077 100644 --- a/.speakeasy/logs/changes/new.openapi.yaml +++ b/.speakeasy/logs/changes/new.openapi.yaml @@ -1,19 +1,21 @@ openapi: 3.1.0 -x-stoplight: - id: 466k6ayziv9at -servers: - - description: Production - url: 'https://api.codat.io' info: - title: Platform API - version: 3.0.0 - summary: Platform API + title: Expenses + version: prealpha + contact: + name: Codat + url: 'https://www.codat.io/' + email: expenses@codat.io description: |- - An API for the common components of all of Codat's products. + The API for Codat's Expenses solution. + + Expenses is an API and a set of supporting tools. It has been built to + enable corporate card and expense management platforms to provide high-quality + integrations with multiple accounting software through a standardized API. - These end points cover creating and managing your companies, data connections, and integrations. + [Explore solution](https://docs.codat.io/sync-for-expenses/overview) | [See our OpenAPI spec](https://github.com/codatio/oas) - [Read about the building blocks of Codat...](https://docs.codat.io/core-concepts/companies) | [See our OpenAPI spec](https://github.com/codatio/oas) + Not seeing the endpoints you're expecting? We've [reorganized our solutions](https://docs.codat.io/updates/230901-new-products), and you may be using a [different version of Expenses](https://docs.codat.io/sync-for-expenses-v1-api#/). --- @@ -23,18 +25,19 @@ info: | :- |:- | | Companies | Create and manage your SMB users' companies. | | Connections | Create new and manage existing data connections for a company. | - | Connection management | Configure connection management UI and retrieve access tokens for authentication. | - | Webhooks | Create and manage webhooks that listen to Codat's events. | - | Integrations | Get a list of integrations supported by Codat and their logos. | - | Refresh data | Initiate data refreshes, view pull status and history. | - | Settings | Manage company profile configuration, sync settings, and API keys. | - | Push data | Initiate and monitor Create, Update, and Delete operations. | - | Supplemental data | Configure and pull additional data you can include in Codat's standard data types. | - | Custom data type | Configure and pull additional data types that are not included in Codat's standardized data model. | + | Configuration | View and manage mapping configuration and defaults for expense transactions. | + | Sync | Monitor the status of data syncs. | + | Expenses | Create and update transactions that represent your customers' spend. | + | Transfers | Create and update transactions that represent the movement of your customers' money. | + | Reimbursements | Create and update transactions that represent your customers' repayable spend. | + | Attachments | Attach receipts to a transaction for a complete audit trail. | + | Transaction status | Monitor the status of individual transactions in data syncs. | + | Manage data | Control and monitor the retrieval of data from an integration. | + | Push operations | View historic push operations. | + | Accounts | Create accounts and view account schemas. | + | Customers | Get, create, and update customers. | + | Suppliers | Get, create, and update suppliers. | - contact: - name: Codat - email: support@codat.io termsOfService: 'https://www.codat.io/legals/' security: - auth_header: [] @@ -75,7 +78,7 @@ x-speakeasy-name-override: methodNameOverride: download-attachment - operationId: ^upload-.*?-attachment methodNameOverride: upload-attachment -x-codat-docs-path: platform-api +x-codat-docs-path: sync-for-expenses-api x-codat-keep-docs-paths-local: true x-codat-speakeasy-pagination: type: offsetLimit @@ -88,26 +91,42 @@ x-codat-speakeasy-pagination: tags: - name: Companies description: Create and manage your SMB users' companies. - - name: Connection management - description: Configure UI and retrieve access tokens for authentication used by **Connections SDK**. - name: Connections description: Create new and manage existing data connections for a company. - - name: Webhooks - description: Create and manage webhooks that listen to Codat's events. - - name: Integrations - description: Get a list of integrations supported by Codat and their logos. - - name: Refresh data - description: 'Initiate data refreshes, view pull status and history.' - - name: Settings - description: 'Manage company profile configuration, sync settings, and API keys.' - - name: Push data - description: 'Initiate and monitor Create, Update, and Delete operations.' - - name: Read data - description: View validation outcomes for completed read data operations. - - name: Supplemental data - description: Configure and pull additional data you can include in Codat's standard data types. - - name: Custom data type - description: Configure and pull additional data types that are not included in Codat's standardized data model. + - name: Company info + description: View the company information of your customers' linked accounting software. + - name: Manage data + description: Control and monitor the retrieval of data from an integration. + - name: Mapping options + description: 'Get accounts, trackingCategories and taxRates that can be used in your create and update requests.' + - name: Accounts + description: Create accounts and view create account options. + - name: Bank accounts + description: Create bank accounts and view create bank account options. + - name: Customers + description: 'Get, create, and update customers.' + - name: Suppliers + description: 'Get, create, and update suppliers.' + - name: Push operations + description: View historic push operations. + - name: Configuration + description: View and manage mapping configuration and defaults for expense transactions. + - name: Expenses + description: Create and update transactions that represent your customers' spend. + - name: Reimbursements + description: Create and update transactions that represent your customers' repayable spend. + - name: Transfers + description: Create and update transactions that represent the movement of your customers' money. + - name: Adjustments + description: Create transactions that represent your adjustments to your customers' spend. + - name: Attachments + description: Attach receipts to a transaction for a complete audit trail. + - name: Sync + description: Monitor the status of data syncs. + - name: Transaction status + description: Monitor the status of individual transactions in data syncs. +servers: + - url: 'https://api.codat.io' paths: /companies: get: @@ -277,7 +296,7 @@ paths: '503': $ref: '#/components/responses/Service-Unavailable' operationId: list-companies - description: "\uFEFFThe *List companies* endpoint returns a list of [companies](https://docs.codat.io/platform-api#/schemas/Company) associated to your instances.\n\nA [company](https://docs.codat.io/platform-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/platform-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n\n## Filter by tags\n\nThe *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying):\n\n- equals (`=`)\n- not equals (`!=`)\n- contains (`~`)\n\nFor example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team: \n- Foreign key: `uid = {yourCustomerId}`\n- Region: `region != uk`\n- Owning team and region: `region = uk && owningTeam = invoice-finance`" + description: "\uFEFFThe *List companies* endpoint returns a list of [companies](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) associated to your instances.\n\nA [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n\n## Filter by tags\n\nThe *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying):\n\n- equals (`=`)\n- not equals (`!=`)\n- contains (`~`)\n\nFor example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team: \n- Foreign key: `uid = {yourCustomerId}`\n- Region: `region != uk`\n- Owning team and region: `region = uk && owningTeam = invoice-finance`" parameters: - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/pageSize' @@ -345,7 +364,7 @@ paths: region: us referenceSubsidiaryCompanies: [] '400': - $ref: '#/components/responses/Bad-Request' + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -358,7 +377,7 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - description: "\uFEFFUse the *Create company* endpoint to create a new [company](https://docs.codat.io/platform-api#/schemas/Company) that represents your customer in Codat. \n\nA [company](https://docs.codat.io/platform-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/platform-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n\nIf forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`." + description: "\uFEFFUse the *Create company* endpoint to create a new [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) that represents your customer in Codat. \n\nA [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n\nIf forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`." requestBody: content: application/json: @@ -373,10 +392,120 @@ paths: name: Technicalium description: 'Technology services, including web and app design and development' '/companies/{companyId}': + put: + summary: Replace company + description: "\uFEFFUse the *Replace company* endpoint to replace the existing name, description, and tags of the company. Calling the endpoint will replace existing values even if new values haven't been defined in the payload.\n\nA [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data." + operationId: replace-company + x-speakeasy-name-override: replace + parameters: + - $ref: '#/components/parameters/companyId' + tags: + - Companies + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Company' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyRequestBody' + examples: + Update name: + value: + name: New Name + Update description: + value: + name: Same name + description: Additional documents required + patch: + summary: Update company + description: "\uFEFFUse the *Update company* endpoint to update the name, description, or tags of the company.\n\nThe *Update company* endpoint doesn't have any required fields. If any of the fields provided are `null` or not provided, they won't be included in the update. \n\nA [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data." + operationId: update-company + parameters: + - $ref: '#/components/parameters/companyId' + tags: + - Companies + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Company' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyUpdateRequest' + examples: + Update tags: + value: + tags: + refrence: new reference + Update name: + value: + name: New Name + delete: + summary: Delete a company + operationId: delete-company + parameters: + - $ref: '#/components/parameters/companyId' + description: "\uFEFFThe *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company), its [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) and any cached data. This operation is irreversible.\n\nA [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n" + tags: + - Companies + responses: + '204': + description: No Content + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' get: summary: Get company operationId: get-company - description: "\uFEFFThe *Get company* endpoint returns a single company for a given `companyId`.\n\nA [company](https://docs.codat.io/platform-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/platform-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n" + description: "\uFEFFThe *Get company* endpoint returns a single company for a given `companyId`.\n\nA [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n" parameters: - $ref: '#/components/parameters/companyId' tags: @@ -474,17 +603,54 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - delete: - summary: Delete a company - operationId: delete-company + '/companies/{companyId}/connections': + get: + summary: List connections + description: "\uFEFFList the connections for a company." + operationId: list-connections + tags: + - Connections parameters: - $ref: '#/components/parameters/companyId' - description: "\uFEFFThe *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/platform-api#/schemas/Company), its [connections](https://docs.codat.io/platform-api#/schemas/Connection) and any cached data. This operation is irreversible.\n\nA [company](https://docs.codat.io/platform-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/platform-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data.\n" - tags: - - Companies + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/query' + - $ref: '#/components/parameters/orderBy' responses: - '204': - description: No Content + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Connections' + examples: + Connections: + value: + results: + - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd + integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c + integrationKey: dfxm + sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee + platformName: Basiq + linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Linked + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking + pageNumber: 0 + pageSize: 0 + totalResults: 0 + _links: + self: + href: string + current: + href: string + next: + href: string + previous: + href: string + '400': + $ref: '#/components/responses/Malformed-Query' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -499,22 +665,47 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - put: - summary: Replace company - description: "\uFEFFUse the *Replace company* endpoint to replace the existing name, description, and tags of the company. Calling the endpoint will replace existing values even if new values haven't been defined in the payload.\n\nA [company](https://docs.codat.io/platform-api#/schemas/Company) represents a business sharing access to their data.\nEach company can have multiple [connections](https://docs.codat.io/platform-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data." - operationId: replace-company - x-speakeasy-name-override: replace + post: + summary: Create connection + description: "\uFEFFCreates a connection for the company by providing a valid `platformKey`. \n\nUse the [List Integrations](https://docs.codat.io/platform-api#/operations/list-integrations) endpoint to access valid platform keys. " parameters: - $ref: '#/components/parameters/companyId' tags: - - Companies + - Connections + operationId: create-connection + requestBody: + content: + application/json: + schema: + type: object + properties: + platformKey: + type: string + minLength: 4 + maxLength: 4 + pattern: '[a-z]{4}' + example: gbol + description: 'A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys.' responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Company' + $ref: '#/components/schemas/Connection' + examples: + Connection: + value: + id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd + integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c + integrationKey: dfxm + sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee + platformName: Basiq + linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Linked + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking '401': $ref: '#/components/responses/Unauthorized' '402': @@ -529,34 +720,36 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CompanyRequestBody' - examples: - Update name: - value: - name: New Name - Update description: - value: - name: Same name - description: Additional documents required - patch: - summary: Update company - description: "\uFEFFUse the *Update company* endpoint to update the name, description, or tags of the company.\n\nThe *Update company* endpoint doesn't have any required fields. If any of the fields provided are `null` or not provided, they won't be included in the update. \n\nA [company](https://docs.codat.io/platform-api#/schemas/Company) represents a business sharing access to their data." - operationId: update-company + '/companies/{companyId}/connections/{connectionId}': + get: + summary: Get connection + operationId: get-connection + description: "\uFEFFReturns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned." + tags: + - Connections parameters: - $ref: '#/components/parameters/companyId' - tags: - - Companies + - $ref: '#/components/parameters/connectionId' responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Company' + $ref: '#/components/schemas/Connection' + examples: + Connection: + value: + id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd + integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c + integrationKey: dfxm + sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee + platformName: Basiq + linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' + status: Linked + lastSync: '2022-10-27T10:22:43.6464237Z' + created: '2022-10-27T09:53:29Z' + sourceType: Banking '401': $ref: '#/components/responses/Unauthorized' '402': @@ -571,35 +764,17 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CompanyUpdateRequest' - examples: - Update tags: - value: - tags: - refrence: new reference - Update name: - value: - name: New Name - '/companies/{companyId}/products/{productIdentifier}': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/productIdentifier' - put: - summary: Add product - operationId: add-product - x-speakeasy-name-override: add-product - description: |- - Use the *Add product* endpoint to enable a product for the company specified by `companyId`. - - > Note: This feature is currently in alpha and available only to participants in the development program. + delete: + summary: Delete connection + operationId: delete-connection + description: "\uFEFFRevoke and remove a connection from a company.\nThis operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company." + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' tags: - - Companies + - Connections responses: - '204': + '200': description: OK '401': $ref: '#/components/responses/Unauthorized' @@ -615,19 +790,23 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - delete: - summary: Remove product - operationId: remove-product - x-speakeasy-name-override: remove-product - description: |- - Use the *Remove product* endpoint to disable a product for the company specified by `companyId`. - - > Note: This feature is currently in alpha and available only to participants in the development program. + patch: + summary: Unlink connection + description: "\uFEFFThis allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data." + operationId: unlink-connection + x-speakeasy-name-override: unlink tags: - - Companies + - Connections + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' responses: - '204': + '200': description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Connection' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -642,72 +821,44 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/products/{productIdentifier}/refresh': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/productIdentifier' - post: - summary: Refresh product data - operationId: refresh-product-data - x-speakeasy-name-override: refresh-product-data - description: |- - Use the **Refresh product data** endpoint to manually refresh data for a custom product for a specific company. - - ### Tips and traps - - - This endpoint only supports refreshing data for **custom products** and can't be used for Codat's standard solutions. Refer to [individual solutions' documentation](https://docs.codat.io/) instead. - - If a data sync is already in progress for a custom product, the refresh request will return a `Bad request (400)` response. - - If a company has multiple custom products enabled, you can refresh data for each product individually. - - Optionally include a request body with `dataTypes` to refresh only selected data types for the specified product. If omitted, the product's scheduled refresh is triggered as usual. - - When specifying `dataTypes`, each value must be a valid data type supported by the product. Invalid values will result in a `Bad request (400)` response listing valid options. - tags: - - Companies requestBody: - required: false - description: 'Optionally specify one or more data types to refresh for the given custom product. If omitted, the product''s scheduled refresh is triggered as usual. When provided, each data type must be valid for the specified product.' content: application/json: schema: + title: Update connection + x-internal: true type: object properties: - dataTypes: - type: array - description: One or more data types to refresh for the product. - items: - type: string + status: + $ref: '#/components/schemas/Connection/definitions/dataConnectionStatus' + description: The current authorization status of the data connection. + nullable: true additionalProperties: false examples: - Filter specific data types: + Example: value: - dataTypes: - - invoices - - payments + status: Unlinked + description: '' + '/companies/{companyId}/sync/expenses/connections/partnerExpense': + post: + tags: + - Connections + description: Creates a partner expense data connection + summary: Create partner expense connection + operationId: create-partner-expense-connection + x-speakeasy-name-override: create-partner-expense-connection + parameters: + - $ref: '#/components/parameters/companyId' responses: - '202': - description: OK - '400': - description: Bad Request + '200': + description: Success content: application/json: schema: - $ref: '#/components/schemas/ErrorMessage' - examples: - Standard product not supported: - value: - statusCode: 400 - service: PublicApi - error: 'Bank Feeds doesn''t support data refreshing. For more information, refer to your solution’s documentation [here](https://docs.codat.io).' - correlationId: bc997528a9d7abb9161ef45f05d38599 - canBeRetried: Unknown - detailedErrorCode: 0 - Read in progress: - value: - statusCode: 400 - service: PublicApi - error: Data cannot be refreshed while a read operation is in progress. Allow the read to complete before attempting to refresh. - correlationId: bc997528a9d7abb9161ef45f05d38599 - canBeRetried: Unknown - detailedErrorCode: 0 + $ref: '#/components/schemas/Connection' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -722,54 +873,60 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections': + '/companies/{companyId}/data/info': get: - summary: List connections - description: "\uFEFFList the connections for a company." - operationId: list-connections tags: - - Connections + - Company info + summary: Get company info + description: Gets the latest basic info for a company. + operationId: get-company-info parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/query' - - $ref: '#/components/parameters/orderBy' responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/Connections' + $ref: '#/components/schemas/CompanyInformation' examples: - Connections: + Example 1: value: - results: - - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Linked - lastSync: '2022-10-27T10:22:43.6464237Z' - created: '2022-10-27T09:53:29Z' - sourceType: Banking - pageNumber: 0 - pageSize: 0 - totalResults: 0 - _links: - self: - href: string - current: - href: string - next: - href: string - previous: - href: string - '400': - $ref: '#/components/responses/Malformed-Query' + companyName: Codat + accountingPlatformRef: 1700060034_ETD + companyLegalName: Codat Ltd + addresses: + - type: Billing + line1: 301 Ink Rooms + line2: 28 Easton Street + city: London + region: England + country: United Kingdom + postalCode: WC1X 0BE + - type: Delivery + line1: 28 Easton Street + city: London + country: UK + postalCode: WC1X 0BE + phoneNumbers: + - number: 02012 345678 + type: Landline + - number: 07123 456789 + type: Mobile + - number: 02012 345678 + type: Fax + webLinks: + - type: Website + url: 'https://www.codat.io/' + - type: Social + url: 'https://www.linkedin.com/company/codat-limited/' + registrationNumber: '5590111724' + taxNumber: '74111622555799035846' + financialYearStartDate: '2023-04-01T00:00:00' + baseCurrency: GBP + sourceUrls: + Api: 'https://api.codat.io' + createdDate: '2020-03-09T15:19:26' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -778,48 +935,28 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/Not-Found' + '409': + $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - post: - summary: Create connection - description: "\uFEFFCreates a connection for the company by providing a valid `platformKey`. \n\nUse the [List Integrations](https://docs.codat.io/platform-api#/operations/list-integrations) endpoint to access valid platform keys. " + '/companies/{companyId}/sync/expenses/config': + get: + tags: + - Configuration parameters: - $ref: '#/components/parameters/companyId' - tags: - - Connections - operationId: create-connection - requestBody: - content: - application/json: - schema: - type: object - properties: - platformKey: - $ref: '#/components/parameters/platformKey/schema' responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/Connection' - examples: - Connection: - value: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Linked - lastSync: '2022-10-27T10:22:43.6464237Z' - created: '2022-10-27T09:53:29Z' - sourceType: Banking + $ref: '#/components/schemas/CompanyConfiguration' + examples: {} '401': $ref: '#/components/responses/Unauthorized' '402': @@ -834,36 +971,29 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}': - get: - summary: Get connection - operationId: get-connection - description: "\uFEFFReturns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned." + summary: Get company configuration + description: Gets a company's expense sync configuration + operationId: get-company-configuration + post: tags: - - Connections + - Configuration parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyConfiguration' + examples: {} responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/Connection' - examples: - Connection: - value: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Linked - lastSync: '2022-10-27T10:22:43.6464237Z' - created: '2022-10-27T09:53:29Z' - sourceType: Banking + $ref: '#/components/schemas/CompanyConfiguration' + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -878,18 +1008,26 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - delete: - summary: Delete connection - operationId: delete-connection - description: "\uFEFFRevoke and remove a connection from a company.\nThis operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company." + summary: Set company configuration + description: Sets a company's expense sync configuration + operationId: set-company-configuration + x-speakeasy-name-override: set + parameters: + - $ref: '#/components/parameters/companyId' + '/companies/{companyId}/sync/expenses/mappingOptions': + get: + tags: + - Mapping options parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - tags: - - Connections responses: '200': - description: OK + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/MappingOptions' + examples: {} '401': $ref: '#/components/responses/Unauthorized' '402': @@ -904,23 +1042,26 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - patch: - summary: Unlink connection - description: "\uFEFFThis allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data." - operationId: unlink-connection - x-speakeasy-name-override: unlink + description: 'Gets the mapping options (accounts, trackingCategories and taxRates) for a company''s accounting software' + summary: Mapping options + operationId: get-mapping-options + x-speakeasy-name-override: get-mapping-options + parameters: + - $ref: '#/components/parameters/companyId' + '/companies/{companyId}/sync/expenses/syncs/lastSuccessful/status': + get: tags: - - Connections + - Sync parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/Connection' + $ref: '#/components/schemas/CompanySyncStatus' + examples: {} '401': $ref: '#/components/responses/Unauthorized' '402': @@ -935,34 +1076,26 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateConnectionStatus' - examples: - Example: - value: - status: Unlinked - description: '' - '/companies/{companyId}/connections/{connectionId}/authorization': + description: Gets the status of the last successful sync + summary: Last successful sync + operationId: get-last-successful-sync + x-speakeasy-name-override: get-last-successful-sync parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - put: - summary: Update authorization - operationId: update-connection-authorization - x-speakeasy-name-override: update-authorization - description: Update data connection's authorization. + '/companies/{companyId}/sync/expenses/syncs/latest/status': + get: tags: - - Connections + - Sync + parameters: + - $ref: '#/components/parameters/companyId' responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/Connection' + $ref: '#/components/schemas/CompanySyncStatus' + examples: {} '401': $ref: '#/components/responses/Unauthorized' '402': @@ -977,40 +1110,28 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - requestBody: - content: - application/json: - schema: - type: object - additionalProperties: - type: string - description: '' - '/companies/{companyId}/accessToken': + description: Gets the latest sync status + summary: Latest sync status + operationId: get-latest-sync + x-speakeasy-name-override: get-latest-sync + parameters: + - $ref: '#/components/parameters/companyId' + '/companies/{companyId}/sync/expenses/syncs/list/status': + parameters: + - $ref: '#/components/parameters/companyId' get: - summary: Get company access token - operationId: get-company-access-token - x-speakeasy-name-override: get-access-token - description: |- - Use the _Get company access token_ endpoint to return an access token for the specified company ID. The token is valid for one day. - - The token is required by Codat's embeddable UIs (such as [Connections SDK](https://docs.codat.io/auth-flow/optimize/connection-management) and [Link SDK](https://docs.codat.io/auth-flow/authorize-embedded-link)) to verify the identity of the user and improve the reliability of data provided by them. - parameters: - - $ref: '#/components/parameters/companyId' tags: - - Companies + - Sync responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/CompanyAccessToken' - examples: - Simple company: - value: - expiresIn: 86400 - accessToken: string - tokenType: Bearer + type: array + items: + $ref: '#/components/schemas/CompanySyncStatus' + examples: {} '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1025,37 +1146,24 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/syncSettings': - parameters: - - $ref: '#/components/parameters/companyId' + summary: List sync statuses + description: Gets a list of sync statuses + operationId: list-syncs + '/companies/{companyId}/sync/expenses/syncs/{syncId}/status': get: - summary: Get company sync settings tags: - - Companies - operationId: get-company-syncSettings - x-speakeasy-name-override: get-company-sync-settings - description: 'Retrieve the [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings) for a specific company. This includes how often data types should be queued to be updated, and how much history should be fetched.' + - Sync + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/CompanySyncSettings' - examples: - Example: - value: - companyId: 8a210b68-6988-11ed-a1eb-0242ac120002 - settings: - - dataType: invoices - fetchOnFirstLink: true - syncSchedule: 24 - syncOrder: 0 - syncFromUtc: '2020-01-01T12:00:00.000Z' - syncFromWindow: 24 - monthsToSync: 24 - isLocked: true - overridesDefaults: true + $ref: '#/components/schemas/CompanySyncStatus' + examples: {} '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1070,18 +1178,29 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - post: - summary: Set company sync settings - description: Set the sync settings for a specific company. - tags: - - Companies - operationId: set-company-syncSettings - x-speakeasy-name-override: set-company-sync-settings - responses: - '204': - description: No Content - '400': - $ref: '#/components/responses/Bad-Request' + summary: Get sync status + description: Get the sync status for a specified sync + operationId: get-sync-by-id + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + '/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions': + get: + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Transactions' + examples: {} + '400': + $ref: '#/components/responses/Malformed-Query' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1096,59 +1215,28 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - requestBody: - content: - application/json: - schema: - allOf: - - properties: - companyId: - type: string - format: uuid - example: 8a210b68-6988-11ed-a1eb-0242ac120002 - description: Unique identifier for your SMB in Codat. - settings: - type: array - items: - $ref: '#/components/schemas/SyncSetting' - overridesDefaults: - type: boolean - default: true - description: 'Set to `True` if you want to override default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings).' - required: - - companyId - - settings - - overridesDefaults - type: object - description: |- - Include a `syncSetting` object for each data type. - `syncFromWindow`, `syncFromUTC` & `monthsToSync` only need to be included if you wish to set a value for them. - '/companies/{companyId}/connectionManagement/accessToken': + tags: + - Transaction status + summary: List sync transactions + description: Gets the transactions and status for a sync + operationId: list-sync-transactions parameters: - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + '/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions/{transactionId}': get: - summary: Get access token (old) - operationId: get-connection-management-access-token - deprecated: true - x-speakeasy-deprecation-message: | - The endpoint for generating company-specific connection management access tokens has been deprecated. - Codat now supports a global company access token, providing seamless access across multiple products. - Update your integration to use the global token for improved efficiency and consistency. - x-speakeasy-deprecation-replacement: get-company-access-token - tags: - - Connection management - description: "\uFEFFThe new [Get company access token](https://docs.codat.io/platform-api#/operations/get-company-access-token) endpoint replaces this endpoint and includes additional functionality." + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + - $ref: '#/components/parameters/transactionId' responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/ConnectionManagementAccessToken' - examples: - Access token: - value: - accessToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + $ref: '#/components/schemas/TransactionResponse' + examples: {} '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1163,22 +1251,54 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - /connectionManagement/corsSettings: - get: - summary: Get CORS settings (old) - operationId: get-connection-management-cors-settings - x-speakeasy-group: cors - deprecated: true - x-speakeasy-deprecation-message: | - The new [Get CORS settings](https://docs.codat.io/platform-api#/operations/get-cors-settings) endpoint replaces this endpoint and includes additional functionality. - Update your integrations to use the new path `/corsSettings` as the existing route will be removed in a future release. - x-speakeasy-deprecation-replacement: get-cors-settings tags: - - Settings - description: "\uFEFFThe *Get CORS settings* endpoint returns the allowed origins (i.e. your domains) you want to allow cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)) with Codat. \n\nEnabling CORS with Codat is required by our embeddable UIs (such as [Connections SDK](https://docs.codat.io/auth-flow/optimize/connection-management) and [Link SDK](https://docs.codat.io/auth-flow/authorize-embedded-link)) to access Codat's API endpoints." + - Transaction status + summary: Get sync transaction + description: Gets the status of a transaction for a sync + operationId: get-sync-transaction + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + - $ref: '#/components/parameters/transactionId' + '/companies/{companyId}/sync/expenses/expense-transactions': + parameters: + - $ref: '#/components/parameters/companyId' + post: + summary: Create expense transaction + operationId: create-expense-transaction + description: | + The *Create expense* endpoint creates an [expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) in the accounting software for a given company's connection. + + [Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) represent transactions made with a company debit or credit card. + + ### Supported Integrations + + | Integration | Supported | + |-------------------------------|-----------| + | Dynamics 365 Business Central | Yes | + | FreeAgent | Yes | + | QuickBooks Desktop | Yes | + | QuickBooks Online | Yes | + | Oracle NetSuite | Yes | + | Sage Intacct | Yes | + | Xero | Yes | + | Zoho Books | Yes | + tags: + - Expenses responses: '200': - $ref: '#/components/responses/ConnectionManagementAllowedOrigins' + description: OK + content: + application/json: + x-speakeasy-usage-example: true + schema: + $ref: '#/components/schemas/CreateExpenseResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1193,30 +1313,173 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - post: - summary: Set CORS settings (old) - operationId: set-connection-management-cors-settings - x-speakeasy-name-override: set - x-speakeasy-group: cors - deprecated: true - x-speakeasy-deprecation-message: | - The new [Set CORS settings](https://docs.codat.io/platform-api#/operations/set-cors-settings) endpoint replaces this endpoint and includes additional functionality. - Update your integrations to use the new path `/corsSettings` as the existing route will be removed in a future release. - x-speakeasy-deprecation-replacement: set-cors-settings + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateExpenseRequest' + examples: + Payment: + value: + - id: 4d7c6929-7770-412b-91bb-44d3bc71d111 + type: Payment + issueDate: '2024-05-21T00:00:00+00:00' + currency: GBP + currencyRate: 1 + contactRef: + id: '430' + type: Supplier + bankAccountRef: + id: '97' + merchantName: Amazon UK + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_5 + dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + Refund: + value: + - id: 7008d3f2-aeb4-11ed-afa1-0242ac120002 + type: Refund + issueDate: '2024-02-17T00:00:00+00:00' + currency: GBP + contactRef: + id: '430' + type: Supplier + bankAccountRef: + id: '97' + merchantName: Amazon UK + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '42' + trackingRefs: + - id: DEPARTMENT_6 + '/companies/{companyId}/sync/expenses/expense-transactions/{transactionId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/transactionId' + put: + summary: Update expense transactions tags: - - Settings - description: "\uFEFFThe *Set CORS settings* endpoint allows you to register allowed origins (i.e. your domains) for use in cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)).\n \nEnabling CORS with Codat is required by our embeddable UIs (such as [Connections SDK](https://docs.codat.io/auth-flow/optimize/connection-management) and [Link SDK](https://docs.codat.io/auth-flow/authorize-embedded-link)) to access Codat's API endpoints. " + - Expenses + responses: + '202': + description: Accepted + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateExpenseResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '422': + $ref: '#/components/responses/Unprocessable-Content' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + operationId: update-expense-transaction + description: |- + The *Update expense* endpoint updates an existing [expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/UpdateExpenseRequest) in the accounting software for a given company's connection. + + [Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/UpdateExpenseRequest) represent transactions made with a company debit or credit card. + + ### Supported integrations + The following integrations are supported for the [Payment](https://docs.codat.io/expenses/sync-process/expense-transactions#transaction-types) transaction `type` only: + | Integration | Supported | + |-----------------------|-----------| + | FreeAgent | Yes | + | QuickBooks Desktop | Yes | + | QuickBooks Online | Yes | + | Oracle NetSuite | Yes | + | Sage Intacct | Yes | + | Xero | Yes | + | Zoho Books | Yes | + + #### Integration-specific behavior + + | Integration | Specifics | + |-----------------------|-----------| + | Sage Intacct | To sync **debit card expenses**, map the debit card to a Credit Card with the account type set to `Debit`.| requestBody: content: application/json: schema: - $ref: '#/components/schemas/ConnectionManagementAllowedOrigins' + $ref: '#/components/schemas/UpdateExpenseRequest' examples: - Allowed origins: - $ref: '#/components/examples/connectionManagementAllowedOriginsResponse' + Payment: + value: + type: Payment + issueDate: '2024-05-21T00:00:00+00:00' + currency: GBP + currencyRate: 1 + contactRef: + id: '430' + type: Supplier + bankAccountRef: + id: '97' + merchantName: Amazon UK + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_5 + dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + '/companies/{companyId}/sync/expenses/transfer-transactions/{transactionId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/transactionId' + put: + summary: Create transfer transaction + operationId: create-transfer-transaction + description: "Use the *Create transfer* endpoint to create or update a [transfer transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/TransferTransactionRequest) in the accounting software for a given company's connection. \r\n\r\nTransfers record the movement of money between two bank accounts, or between a bank account and a nominal account. Use them to represent actions such as topping up a debit card account or a balance transfer to another credit card.\r\n\r\nThe `from.amount` and `to.amount` fields are in the native currency of the account.\r\n\r\n### Supported Integrations\r\n| Integration | Create transfer | Update transfer |\r\n|-----------------------|------------------|------------------|\r\n| Dynamics\t\t\t\t| No\t\t\t | No\t\t\t\t |\r\n| FreeAgent | Yes | Yes |\r\n| NetSuite | No | No |\r\n| QuickBooks Desktop | Yes | No |\r\n| QuickBooks Online | Yes | Yes |\r\n| Sage Intacct | No | No |\r\n| Xero | Yes | No |\r\n| Zoho Books | No | No |" + tags: + - Transfers responses: '200': - $ref: '#/components/responses/ConnectionManagementAllowedOrigins' + description: OK + content: + application/json: + x-speakeasy-usage-example: true + schema: + $ref: '#/components/schemas/TransferTransactionResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1231,16 +1494,56 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - /corsSettings: - get: - summary: Get CORS settings - operationId: get-cors-settings + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferTransactionRequest' + examples: + Create transfer: + value: + description: Sample transfer description + date: '2021-05-21T00:00:00+00:00' + from: + accountRef: + id: 787dfb37-5707-4dc0-8a86-8d74e4cc78ea + amount: 100 + to: + accountRef: + id: 777dfb37-5506-3dc0-6g86-8d34z4cc78ea + amount: 100 + '/companies/{companyId}/sync/expenses/adjustment-transactions': + parameters: + - $ref: '#/components/parameters/companyId' + post: + summary: Create adjustment transaction + operationId: create-adjustment-transaction + description: |- + Use the *Create adjustment expense* endpoint to create an [adjustment](https://docs.codat.io/sync-for-expenses-api#/schemas/AdjustmentTransactionRequest) in the accounting software for a given company's connection. + + Adjustments represent write-offs and transaction alterations, such as foreign exchange adjustments, in the form of a journal entry. + + ### Supported Integrations + + | Integration | Supported | + |-----------------------|-----------| + | QuickBooks Desktop | Yes | tags: - - Settings - description: "\uFEFFThe *Get CORS settings* endpoint returns the allowed origins (i.e. your domains) you want to allow cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)) with Codat. \n\nEnabling CORS with Codat is required by our embeddable UIs (such as [Connections SDK](https://docs.codat.io/auth-flow/optimize/connection-management) and [Link SDK](https://docs.codat.io/auth-flow/authorize-embedded-link)) to access Codat's API endpoints." + - Adjustments responses: '200': - $ref: '#/components/responses/ConnectionManagementAllowedOrigins' + description: OK + content: + application/json: + x-speakeasy-usage-example: true + schema: + $ref: '#/components/schemas/AdjustmentTransactionResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1255,24 +1558,128 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAdjustmentRequest' + examples: + Create adjustment: + value: + - id: 3357b3df-5f2e-465d-b9ba-226519dbb8f1 + date: '2024-05-21T00:00:00+00:00' + currency: USD + currencyRate: 1 + reference: test reference + lines: + - amount: 50 + accountRef: + id: 80000018-1671793811 + description: debit line + trackingRefs: + - id: 80000003-1674553958 + dataType: trackingCategories + invoiceTo: + id: 80000002-1674552702 + type: customer + - amount: -50 + accountRef: + id: 80000028-1671794219 + description: credit line + trackingRefs: + - id: 80000003-1674553958 + dataType: trackingCategories + '/companies/{companyId}/sync/expenses/reimbursable-expense-transactions': + parameters: + - $ref: '#/components/parameters/companyId' post: - summary: Set CORS settings - operationId: set-cors-settings - x-speakeasy-name-override: set + summary: Create reimbursable expense transaction + operationId: create-reimbursable-expense-transaction + description: "Use the *Create reimbursable expense* endpoint to submit an employee expense claim in the accounting platform for a given company's connection.\r\n\r\n[Reimbursable expense requests](https://docs.codat.io/sync-for-expenses-api#/schemas/ReimbursableExpenseTransactionRequest) are reflected in the accounting software in the form of **Bills** against an employee (who exists as a supplier in the accounting platform).\r\n\r\n### Supported Integrations\r\n| Integration | Supported |\r\n|-----------------------|-----------|\r\n| FreeAgent | Yes |\r\n| QuickBooks Desktop | Yes |\r\n| QuickBooks Online | Yes |\r\n| Oracle NetSuite | Yes |\r\n| Zoho Books | Yes |\r\n| Sage Intacct | Yes |" tags: - - Settings - description: "\uFEFFThe *Set CORS settings* endpoint allows you to register allowed origins (i.e. your domains) for use in cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)).\n \nEnabling CORS with Codat is required by our embeddable UIs (such as [Connections SDK](https://docs.codat.io/auth-flow/optimize/connection-management) and [Link SDK](https://docs.codat.io/auth-flow/authorize-embedded-link)) to access Codat's API endpoints." + - Reimbursements + responses: + '200': + description: OK + content: + application/json: + x-speakeasy-usage-example: true + schema: + $ref: '#/components/schemas/CreateReimbursableExpenseResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' requestBody: content: application/json: schema: - $ref: '#/components/schemas/ConnectionManagementAllowedOrigins' + $ref: '#/components/schemas/ReimbursableExpenseTransactionRequest' examples: - Allowed origins: - $ref: '#/components/examples/connectionManagementAllowedOriginsResponse' + Create reimbursable expense: + value: + - id: 4d7c6929-7770-412b-91bb-44d3bc71d111 + reference: expenses w/c 01/07 + contactRef: + id: '752' + issueDate: '2024-05-21' + dueDate: '2024-05-21' + currency: GBP + currencyRate: 1 + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - description: Hotel + netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_5 + dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + '/companies/{companyId}/sync/expenses/reimbursable-expense-transactions/{transactionId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/transactionId' + put: + summary: Update reimbursable expense transaction + operationId: update-reimbursable-expense-transaction + description: "The *Update reimbursable expense* endpoint updates an existing employee expense claim in the accounting platform for a given company's connection. \r\n\r\nUpdating an existing [reimbursable expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/UpdateReimbursableExpenseTransactionRequest) will update the existing **bill** against an employee (who exists as a supplier in the accounting software).\r\n\r\n### Supported Integrations\r\n| Integration | Supported |\r\n|-----------------------|-----------|\r\n| FreeAgent | Yes |\r\n| QuickBooks Online | Yes |\r\n| Oracle NetSuite | Yes |\r\n| Sage Intacct | Yes |\r\n| Zoho Books | Yes |" + tags: + - Reimbursements responses: '200': - $ref: '#/components/responses/ConnectionManagementAllowedOrigins' + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CreateReimbursableExpenseResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1287,18 +1694,55 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/data/all': + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateReimbursableExpenseTransactionRequest' + examples: + Update reimbursable expense: + value: + reference: expenses w/c 01/07 + contactRef: + id: '752' + issueDate: '2024-05-21' + dueDate: '2024-05-21' + currency: GBP + currencyRate: 1 + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - description: Hotel + netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_5 + dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + '/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions/{transactionId}/attachments': parameters: - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + - $ref: '#/components/parameters/transactionId' post: - summary: Refresh all data - operationId: refresh-company-data - x-speakeasy-name-override: all + summary: Upload attachment + operationId: upload-expense-attachment + x-speakeasy-name-override: upload responses: - '204': - description: No Content + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Attachment' + examples: {} '400': - $ref: '#/components/responses/Malformed-Query' + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1313,42 +1757,40 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/AttachmentUpload' + tags: + - Attachments description: |- - Refreshes all data types with `fetch on first link` set to `true` for a given company. + The *Upload attachment* endpoint uploads an attachment in the accounting software against the given transactionId. - This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. + [Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) represent transactions made with a company debit or credit card. Attachments for `Adjustment` and `Transfer` transaction types are not supported for any integrations. - [Read more](https://docs.codat.io/core-concepts/data-type-settings) about data type settings and `fetch on first link`. - tags: - - Refresh data - '/companies/{companyId}/data/queue/{dataType}': + **Integration-specific behavior** + + Each accounting software supports different file formats and sizes. + + | Integration | File size | File extension | Supported transactions | + |-----------------------------------|-----------|-------------------------------------------------------|------------------------| + | **Xero** | 3 MB | 7Z, BMP, CSV, DOC, DOCX, EML, GIF, JPEG, JPG, KEYNOTE, MSG, NUMBERS, ODF, ODS, ODT, PAGES, PDF, PNG, PPT, PPTX, RAR, RTF, TIF, TIFF, TXT, XLS, XLSX, ZIP | All supported types | + | **QuickBooks Online** | 100 MB | AI, CSV, DOC, DOCX, EPS, GIF, JPEG, JPG, ODS, PAGES, PDF, PNG, RTF, TIF, TXT, XLS, XLSX, XML | `expense-transactions.Payment`, `expense-transactions.Refund`, `reimbursable-expense-transactions` | + | **NetSuite** | 100 MB | BMP, CSV, XLS, XLSX, JSON, PDF, PJPG, PJPEG, PNG, TXT, SVG, TIF, TIFF, DOC, DOCX, ZIP |`expense-transactions.Payment`, `expense-transactions.Refund` | + | **Dynamics 365 Business Central** | 350 MB | [No explicit requirements outlined](https://learn.microsoft.com/en-gb/dynamics365/business-central/ui-how-add-link-to-record#to-attach-a-file-to-a-purchase-invoice) for text, image, and video files. | All supported types + | **QuickBooks Desktop** | NA | Does not support attachment upload | N/A | + | **FreeAgent** | 5MB | PNG, X-PNG, JPEG, PJG, GIF, X-PDF | `expense-transactions.Payment`, `reimbursable-expense-transactions` + | **Zoho Books** | 5MB | GIF, PNG, JPEG, JPG, BMP, PDF | `expense-transactions.Payment`, `reimbursable-expense-transactions` | + '/companies/{companyId}/data/all': parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/dataType' post: - summary: Refresh data type - operationId: refresh-data-type - x-speakeasy-name-override: by-data-type - description: |- - Refreshes a given data type for a given company. - - This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. - tags: - - Refresh data - parameters: - - schema: - type: string - format: uuid - in: query - name: connectionId - description: 'Optionally, provide a data connection id to only queue pull operations on that connection.' + summary: Refresh all data + operationId: refresh-all-data-types responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/PullOperation' + '204': + description: No Content '400': $ref: '#/components/responses/Malformed-Query' '401': @@ -1365,51 +1807,191 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' + description: |- + Refreshes all data types with `fetch on first link` set to `true` for a given company. + + This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. + + [Read more](https://docs.codat.io/core-concepts/data-type-settings) about data type settings and `fetch on first link`. + tags: + - Manage data '/companies/{companyId}/dataStatus': parameters: - $ref: '#/components/parameters/companyId' get: summary: Get data status - operationId: get-company-data-status + operationId: get-data-status description: Get the state of each data type for a company tags: - - Refresh data + - Manage data responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/DataStatuses' - examples: - Example: - value: - accountTransactions: - dataType: accountTransactions - lastSuccessfulSync: '2022-01-01T00:00:00.000Z' - currentStatus: Complete - latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 - latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f - balanceSheet: - dataType: balanceSheet - lastSuccessfulSync: '2022-01-01T00:00:00.000Z' - currentStatus: Complete - latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 - latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f - bankAccounts: - dataType: bankAccounts - lastSuccessfulSync: '2022-01-01T00:00:00.000Z' - currentStatus: Complete - latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 - latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f - bankTransactions: - dataType: bankTransactions - lastSuccessfulSync: '2022-01-01T00:00:00.000Z' - currentStatus: Complete - latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 - latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f - billCreditNotes: - dataType: billCreditNotes + title: Data statuses + x-internal: true + type: object + properties: + accountTransactions: + $ref: '#/components/schemas/DataStatus' + nullable: true + balanceSheet: + $ref: '#/components/schemas/DataStatus' + nullable: true + bankAccounts: + $ref: '#/components/schemas/DataStatus' + nullable: true + bankTransactions: + $ref: '#/components/schemas/DataStatus' + nullable: true + billCreditNotes: + $ref: '#/components/schemas/DataStatus' + nullable: true + billPayments: + $ref: '#/components/schemas/DataStatus' + nullable: true + bills: + $ref: '#/components/schemas/DataStatus' + nullable: true + cashFlowStatement: + $ref: '#/components/schemas/DataStatus' + nullable: true + chartOfAccounts: + $ref: '#/components/schemas/DataStatus' + nullable: true + company: + $ref: '#/components/schemas/DataStatus' + nullable: true + creditNotes: + $ref: '#/components/schemas/DataStatus' + nullable: true + customers: + $ref: '#/components/schemas/DataStatus' + nullable: true + directCosts: + $ref: '#/components/schemas/DataStatus' + nullable: true + directIncomes: + $ref: '#/components/schemas/DataStatus' + nullable: true + invoices: + $ref: '#/components/schemas/DataStatus' + nullable: true + itemReceipts: + $ref: '#/components/schemas/DataStatus' + nullable: true + items: + $ref: '#/components/schemas/DataStatus' + nullable: true + journalEntries: + $ref: '#/components/schemas/DataStatus' + nullable: true + journals: + $ref: '#/components/schemas/DataStatus' + nullable: true + paymentMethods: + $ref: '#/components/schemas/DataStatus' + nullable: true + payments: + $ref: '#/components/schemas/DataStatus' + nullable: true + profitAndLoss: + $ref: '#/components/schemas/DataStatus' + nullable: true + purchaseOrders: + $ref: '#/components/schemas/DataStatus' + nullable: true + salesOrders: + $ref: '#/components/schemas/DataStatus' + nullable: true + suppliers: + $ref: '#/components/schemas/DataStatus' + nullable: true + taxRates: + $ref: '#/components/schemas/DataStatus' + nullable: true + trackingCategories: + $ref: '#/components/schemas/DataStatus' + nullable: true + transfers: + $ref: '#/components/schemas/DataStatus' + nullable: true + banking-accountBalances: + $ref: '#/components/schemas/DataStatus' + nullable: true + banking-accounts: + $ref: '#/components/schemas/DataStatus' + nullable: true + banking-transactionCategories: + $ref: '#/components/schemas/DataStatus' + nullable: true + banking-transactions: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-companyInfo: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-customers: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-disputes: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-locations: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-orders: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-paymentMethods: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-payments: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-productCategories: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-products: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-taxComponents: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-transactions: + $ref: '#/components/schemas/DataStatus' + nullable: true + examples: + Example: + value: + accountTransactions: + dataType: accountTransactions + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + balanceSheet: + dataType: balanceSheet + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + bankAccounts: + dataType: bankAccounts + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + bankTransactions: + dataType: bankTransactions + lastSuccessfulSync: '2022-01-01T00:00:00.000Z' + currentStatus: Complete + latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 + latestSuccessfulSyncId: 6883bba8-514d-423f-ba7f-c38285a80b7f + billCreditNotes: + dataType: billCreditNotes lastSuccessfulSync: '2022-01-01T00:00:00.000Z' currentStatus: Complete latestSyncId: d03b6979-eb3b-447a-a27a-13cf457a9f48 @@ -1656,13 +2238,56 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' + '/companies/{companyId}/data/queue/{dataType}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/dataType' + post: + summary: Refresh data type + operationId: refresh-data-type + description: |- + Refreshes a given data type for a given company. + + This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. + tags: + - Manage data + parameters: + - schema: + type: string + format: uuid + in: query + name: connectionId + description: 'Optionally, provide a data connection id to only queue pull operations on that connection.' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PullOperation' + '400': + $ref: '#/components/responses/Malformed-Query' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' '/companies/{companyId}/data/history': parameters: - $ref: '#/components/parameters/companyId' get: summary: List pull operations tags: - - Refresh data + - Manage data operationId: list-pull-operations x-speakeasy-name-override: list-pull-operations responses: @@ -1720,13 +2345,20 @@ paths: '/companies/{companyId}/data/history/{datasetId}': parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/datasetId' + - name: datasetId + in: path + required: true + schema: + type: string + format: uuid + description: Unique identifier for the dataset that completed its sync. + description: Unique identifier for the dataset that completed its sync. get: summary: Get pull operation operationId: get-pull-operation x-speakeasy-name-override: get-pull-operation tags: - - Refresh data + - Manage data responses: '200': description: OK @@ -1750,124 +2382,108 @@ paths: '503': $ref: '#/components/responses/Service-Unavailable' description: Retrieve information about a single dataset or pull operation. - /webhooks: + '/companies/{companyId}/push': + parameters: + - $ref: '#/components/parameters/companyId' get: - summary: List webhook consumers - operationId: list-webhook-consumers - x-speakeasy-name-override: list-consumers - description: "\uFEFFUse the *List webhook consumers* endpoint to return a list of all webhook consumers that currently exist for your client.\n\n[Webhook consumer](https://docs.codat.io/platform-api#/schemas/WebhookConsumer) is an HTTP endpoint that you configure to subscribe to specific events. See our documentation for more details on [Codat's webhook service](https://docs.codat.io/using-the-api/webhooks/overview)." + parameters: + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/query' + - $ref: '#/components/parameters/orderBy' + summary: List push operations tags: - - Webhooks + - Push operations + operationId: list-push-operations + description: List push operation records. responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/WebhookConsumer/definitions/webhookConsumers' - examples: - Webhook consumers: - value: - results: - - id: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 - url: 'https://example.com/webhoook-consumers/sync-complete' - eventTypes: - - DataSyncCompleted - disabled: false - - id: ca3cac86-7925-4759-abc2-96405780fdfa - url: 'https://example.com/webhoook-consumers/dataset-changed' - eventTypes: - - DatasetDataChanged - disabled: true + $ref: '#/components/schemas/PushOperations' + examples: {} '400': - $ref: '#/components/responses/Bad-Request' + $ref: '#/components/responses/Malformed-Query' '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - post: - summary: Create webhook consumer - operationId: create-webhook-consumer - x-speakeasy-name-override: create-consumer - description: "\uFEFFUse the *Create webhook consumer* endpoint to create a new webhook consumer that will listen to messages we send you.\n\n[Webhook consumer](https://docs.codat.io/platform-api#/schemas/WebhookConsumer) is an HTTP endpoint that you configure to subscribe to specific events. See our documentation for more details on [Codat's webhook service](https://docs.codat.io/using-the-api/webhooks/overview).\n\n### Tips and traps\n- The number of webhook consumers you can create is limited to 50. If you have reached the maximum number of consumers, use the [*Delete webhook consumer*](https://docs.codat.io/platform-api#/operations/delete-webhook-consumer) endpoint to delete an unused consumer first." + '/companies/{companyId}/push/{pushOperationKey}': + parameters: + - $ref: '#/components/parameters/companyId' + - schema: + type: string + format: uuid + name: pushOperationKey + in: path + required: true + description: Push operation key. + get: + summary: Get push operation tags: - - Webhooks - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookConsumer/definitions/webhookConsumerPrototype' - examples: - Subscribe consumer to one or more event types: - value: - url: 'https://example.com/webhoook-consumer' - eventTypes: - - DataSyncCompleted - - Dataset data changed - Subscribe consumer with disabled endpoint: - value: - url: 'https://example.com/webhoook-consumer' - eventTypes: - - DataSyncCompleted - disabled: true + - Push operations + operationId: get-push-operation + description: Retrieve push operation. responses: - '201': + '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/WebhookConsumer' - examples: - Subscribe consumer to one or more event types: - value: - id: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 - url: 'https://example.com/webhoook-consumer' - eventTypes: - - DataSyncCompleted - - DatasetDataChanged - disabled: false - Subscribe consumer with disabled endpoint: - value: - id: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 - url: 'https://example.com/webhoook-consumer' - eventTypes: - - DataSyncCompleted - disabled: true - '400': - $ref: '#/components/responses/Bad-Request' + $ref: '#/components/schemas/PushOperation' + examples: {} '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/webhooks/{webhookId}': + '/companies/{companyId}/connections/{connectionId}/push/accounts': parameters: - - $ref: '#/components/parameters/webhookId' - delete: - summary: Delete webhook consumer - operationId: delete-webhook-consumer - x-speakeasy-name-override: delete-consumer - description: "\uFEFFUse the *Delete webhook consumer* endpoint to delete an existing webhoook consumer, providing its valid `id` as a parameter.\n\n[Webhook consumer](https://docs.codat.io/platform-api#/schemas/WebhookConsumer) is an HTTP endpoint that you configure to subscribe to specific events. See our documentation for more details on [Codat's webhook service](https://docs.codat.io/using-the-api/webhooks/overview)." + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + post: tags: - - Webhooks + - Accounts + summary: Create account + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Account/definitions/accountPrototype' responses: - '204': - description: No content + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAccountResponse' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1882,86 +2498,4273 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - /webhooks/integrationKeys/zapier: - post: - summary: Rotate Zapier key - operationId: rotate-zapier-key - x-speakeasy-ignore: true - description: "\uFEFFThe *Rotate Zapier key* endpoint returns the Zapier integration key needed to configure Zaps triggered by Codat's webhooks. \n\nIf a key has already been created, calling this will revoke that existing key.\n\nThe key changes each time this endpoint is called. If you are already using our Zapier integration and called this endpoint again, you need to reauthenticate using the latest integration key returned in the response.\n\nOur Zapier integration makes it simple for you to set up and receive user notifications in your preferred ways, such as via email or Slack. See our [Zapier documentation](https://docs.codat.io/using-the-api/webhooks/zapier-integration) for detailed instructions on setting up this integration.\n\n" + description: |- + The *Create account* endpoint creates a new [account](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) for a given company's connection. + + [Accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) are the categories a business uses to record accounting transactions. + + **Integration-specific behavior** + + Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-chartOfAccounts-model). + operationId: create-account + '/companies/{companyId}/connections/{connectionId}/options/chartOfAccounts': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + get: + summary: Get create account model tags: - - Webhooks + - Accounts responses: - '201': + '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/WebhookZapierKey' + $ref: '#/components/schemas/PushOption' examples: - Integration key: + Exact (Netherlands): + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: [] + information: + - field: NominalCode + details: Must be provided. + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: [] + information: + - field: Name + details: Must be provided. + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Assets.Cash + type: String + displayName: Asset.Assets.Cash + required: false + - value: Asset.Assets.Bank + type: String + displayName: Asset.Assets.Bank + required: false + - value: Asset.Assets.PaymentServices + type: String + displayName: Asset.Assets.PaymentServices + required: false + - value: Asset.Assets.AccountsReceivable + type: String + displayName: Asset.Assets.AccountsReceivable + required: false + - value: Liability.EquityAndLiabilities.AccountsPayable + type: String + displayName: Liability.EquityAndLiabilities.AccountsPayable + required: false + - value: Asset.Assets.VAT + type: String + displayName: Asset.Assets.VAT + required: false + - value: Liability.EquityAndLiabilities.EmployeesPayable + type: String + displayName: Liability.EquityAndLiabilities.EmployeesPayable + required: false + - value: Asset.Assets.PrepaidExpenses + type: String + displayName: Asset.Assets.PrepaidExpenses + required: false + - value: Liability.EquityAndLiabilities.AccruedExpenses + type: String + displayName: Liability.EquityAndLiabilities.AccruedExpenses + required: false + - value: Liability.EquityAndLiabilities.IncomeTaxesPayable + type: String + displayName: Liability.EquityAndLiabilities.IncomeTaxesPayable + required: false + - value: Asset.Assets.FixedAssets + type: String + displayName: Asset.Assets.FixedAssets + required: false + - value: Asset.Assets.OtherAssets + type: String + displayName: Asset.Assets.OtherAssets + required: false + - value: Asset.Assets.AccumulatedDeprecation + type: String + displayName: Asset.Assets.AccumulatedDeprecation + required: false + - value: Asset.Assets.Inventory + type: String + displayName: Asset.Assets.Inventory + required: false + - value: Equity.EquityAndLiabilities.CapitalStock + type: String + displayName: Equity.EquityAndLiabilities.CapitalStock + required: false + - value: Equity.EquityAndLiabilities.RetainedEarnings + type: String + displayName: Equity.EquityAndLiabilities.RetainedEarnings + required: false + - value: Liability.EquityAndLiabilities.LongTermDebt + type: String + displayName: Liability.EquityAndLiabilities.LongTermDebt + required: false + - value: Liability.EquityAndLiabilities.CurrentPortionOfDebt + type: String + displayName: Liability.EquityAndLiabilities.CurrentPortionOfDebt + required: false + - value: Unknown.EquityAndLiabilities.Intercompany + type: String + displayName: Unknown.EquityAndLiabilities.Intercompany + required: false + - value: Unknown.General.General + type: String + displayName: Unknown.General.General + required: false + - value: Income.NetIncome.Revenue + type: String + displayName: Income.NetIncome.Revenue + required: false + - value: Expense.NetIncome.CostOfGoods + type: String + displayName: Expense.NetIncome.CostOfGoods + required: false + - value: Expense.NetIncome.OtherCosts + type: String + displayName: Expense.NetIncome.OtherCosts + required: false + - value: Expense.NetIncome.SalesGeneralAdministrativeExpenses + type: String + displayName: Expense.NetIncome.SalesGeneralAdministrativeExpenses + required: false + - value: Expense.NetIncome.DeprecationCosts + type: String + displayName: Expense.NetIncome.DeprecationCosts + required: false + - value: Expense.NetIncome.ResearchAndDevelopment + type: String + displayName: Expense.NetIncome.ResearchAndDevelopment + required: false + - value: Expense.NetIncome.EmployeeCosts + type: String + displayName: Expense.NetIncome.EmployeeCosts + required: false + - value: Expense.NetIncome.EmploymentCosts + type: String + displayName: Expense.NetIncome.EmploymentCosts + required: false + - value: Expense.ExceptionalIncome.ExceptionalCosts + type: String + displayName: Expense.ExceptionalIncome.ExceptionalCosts + required: false + - value: Income.ExceptionalIncome.ExceptionalIncome + type: String + displayName: Income.ExceptionalIncome.ExceptionalIncome + required: false + - value: Expense.ExceptionalIncome.IncomeTaxes + type: String + displayName: Expense.ExceptionalIncome.IncomeTaxes + required: false + - value: Income.ExceptionalIncome.InterestIncome + type: String + displayName: Income.ExceptionalIncome.InterestIncome + required: false + required: true + validation: + warnings: [] + information: + - field: FullyQualifiedCategory + details: Must be provided. + status: + type: String + displayName: Account Status + description: The status of the account + options: + - value: Active + type: String + displayName: Active + required: false + - value: Pending + type: String + displayName: Pending + required: false + - value: Unknown + type: String + displayName: Unknown + required: false + required: true + validation: + warnings: [] + information: + - field: Status + details: Must be provided. + required: true + Exact (UK): + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: [] + information: + - field: NominalCode + details: Must be provided. + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: [] + information: + - field: Name + details: Must be provided. + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Assets.Cash + type: String + displayName: Asset.Assets.Cash + required: false + - value: Asset.Assets.Bank + type: String + displayName: Asset.Assets.Bank + required: false + - value: Asset.Assets.PaymentServices + type: String + displayName: Asset.Assets.PaymentServices + required: false + - value: Asset.Assets.AccountsReceivable + type: String + displayName: Asset.Assets.AccountsReceivable + required: false + - value: Liability.EquityAndLiabilities.AccountsPayable + type: String + displayName: Liability.EquityAndLiabilities.AccountsPayable + required: false + - value: Asset.Assets.VAT + type: String + displayName: Asset.Assets.VAT + required: false + - value: Liability.EquityAndLiabilities.EmployeesPayable + type: String + displayName: Liability.EquityAndLiabilities.EmployeesPayable + required: false + - value: Asset.Assets.PrepaidExpenses + type: String + displayName: Asset.Assets.PrepaidExpenses + required: false + - value: Liability.EquityAndLiabilities.AccruedExpenses + type: String + displayName: Liability.EquityAndLiabilities.AccruedExpenses + required: false + - value: Liability.EquityAndLiabilities.IncomeTaxesPayable + type: String + displayName: Liability.EquityAndLiabilities.IncomeTaxesPayable + required: false + - value: Asset.Assets.FixedAssets + type: String + displayName: Asset.Assets.FixedAssets + required: false + - value: Asset.Assets.OtherAssets + type: String + displayName: Asset.Assets.OtherAssets + required: false + - value: Asset.Assets.AccumulatedDeprecation + type: String + displayName: Asset.Assets.AccumulatedDeprecation + required: false + - value: Asset.Assets.Inventory + type: String + displayName: Asset.Assets.Inventory + required: false + - value: Equity.EquityAndLiabilities.CapitalStock + type: String + displayName: Equity.EquityAndLiabilities.CapitalStock + required: false + - value: Equity.EquityAndLiabilities.RetainedEarnings + type: String + displayName: Equity.EquityAndLiabilities.RetainedEarnings + required: false + - value: Liability.EquityAndLiabilities.LongTermDebt + type: String + displayName: Liability.EquityAndLiabilities.LongTermDebt + required: false + - value: Liability.EquityAndLiabilities.CurrentPortionOfDebt + type: String + displayName: Liability.EquityAndLiabilities.CurrentPortionOfDebt + required: false + - value: Unknown.EquityAndLiabilities.Intercompany + type: String + displayName: Unknown.EquityAndLiabilities.Intercompany + required: false + - value: Unknown.General.General + type: String + displayName: Unknown.General.General + required: false + - value: Income.NetIncome.Revenue + type: String + displayName: Income.NetIncome.Revenue + required: false + - value: Expense.NetIncome.CostOfGoods + type: String + displayName: Expense.NetIncome.CostOfGoods + required: false + - value: Expense.NetIncome.OtherCosts + type: String + displayName: Expense.NetIncome.OtherCosts + required: false + - value: Expense.NetIncome.SalesGeneralAdministrativeExpenses + type: String + displayName: Expense.NetIncome.SalesGeneralAdministrativeExpenses + required: false + - value: Expense.NetIncome.DeprecationCosts + type: String + displayName: Expense.NetIncome.DeprecationCosts + required: false + - value: Expense.NetIncome.ResearchAndDevelopment + type: String + displayName: Expense.NetIncome.ResearchAndDevelopment + required: false + - value: Expense.NetIncome.EmployeeCosts + type: String + displayName: Expense.NetIncome.EmployeeCosts + required: false + - value: Expense.NetIncome.EmploymentCosts + type: String + displayName: Expense.NetIncome.EmploymentCosts + required: false + - value: Expense.ExceptionalIncome.ExceptionalCosts + type: String + displayName: Expense.ExceptionalIncome.ExceptionalCosts + required: false + - value: Income.ExceptionalIncome.ExceptionalIncome + type: String + displayName: Income.ExceptionalIncome.ExceptionalIncome + required: false + - value: Expense.ExceptionalIncome.IncomeTaxes + type: String + displayName: Expense.ExceptionalIncome.IncomeTaxes + required: false + - value: Income.ExceptionalIncome.InterestIncome + type: String + displayName: Income.ExceptionalIncome.InterestIncome + required: false + required: true + validation: + warnings: [] + information: + - field: FullyQualifiedCategory + details: Must be provided. + status: + type: String + displayName: Account Status + description: The status of the account + options: + - value: Active + type: String + displayName: Active + required: false + - value: Pending + type: String + displayName: Pending + required: false + - value: Unknown + type: String + displayName: Unknown + required: false + required: true + validation: + warnings: [] + information: + - field: Status + details: Must be provided. + required: true + MYOB AccountRight and Essentials: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: + - field: NominalCode + details: 'If alphanumeric is supported, must be between 1 and 10 characters. Otherwise format is x-xxxx' + information: [] + name: + type: String + displayName: Name + description: Name of the account + required: false + validation: + warnings: + - field: Name + details: Must have a length between 1 and 60 characters + information: [] + description: + type: String + displayName: Description + description: Description of the account + required: false + validation: + warnings: + - field: Description + details: Must have a length between 1 and 255 characters + information: [] + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Bank + type: String + displayName: Bank + required: false + - value: Asset.AccountReceivable + type: String + displayName: Accounts Receivable + required: false + - value: Asset.OtherCurrentAsset + type: String + displayName: Other Current Asset + required: false + - value: Asset.FixedAsset + type: String + displayName: Fixed Asset + required: false + - value: Asset.OtherAsset + type: String + displayName: Other Asset + required: false + - value: Asset.CashAndBank + type: String + displayName: Cash + required: false + - value: Asset.Property Plant and Equipment + type: String + displayName: Equipment Machinery + required: false + - value: Liability.CreditCard + type: String + displayName: Credit Card + required: false + - value: Liability.AccountsPayable + type: String + displayName: Accounts Payable + required: false + - value: Liability.OtherCurrentLiability + type: String + displayName: Other Current Liability + required: false + - value: Liability.LongTermLiability + type: String + displayName: Long Term Liability + required: false + - value: Liability.OtherLiability + type: String + displayName: Other Liability + required: false + - value: Equity + type: String + displayName: Equity + required: false + - value: Equity.Equity + type: String + displayName: Retained Earnings + required: false + - value: Equity.Equity.RetainedEarnings + type: String + displayName: Retained Earnings + required: false + - value: Equity.Owner's Equity + type: String + displayName: Retained Earnings + required: false + - value: Income + type: String + displayName: Income + required: false + - value: OtherIncome + type: String + displayName: Other Income + required: false + - value: Expense + type: String + displayName: Expense + required: false + - value: Expense.Expense + type: String + displayName: Sales Marketing + required: false + - value: Expense.Expense.Insurance + type: String + displayName: General Administrative + required: false + - value: Expense.Overhead + type: String + displayName: General Administrative + required: false + - value: Expense.Expense.RepairMaintenance + type: String + displayName: Repairs Maintenance + required: false + - value: OtherExpense + type: String + displayName: Other Expense + required: false + - value: CostOfSales + type: String + displayName: Cost of Sales + required: false + - value: Cost Of Goods Sold.Cost of Sales + type: String + displayName: Other + required: false + required: true + status: + type: String + displayName: Account Status + description: The status of the account + options: + - value: Active + type: String + displayName: Active + required: false + - value: Archived + type: String + displayName: Archived + required: false + required: true + required: true + QuickBooks Desktop: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: + - field: NominalCode + details: Max length of 7 characters. + information: [] + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: + - field: Name + details: Max length of 31 characters. + information: [] + description: + type: String + displayName: Description + description: Description of the account + required: false + validation: + warnings: + - field: Description + details: Max length of 200 characters. + information: [] + currency: + type: String + displayName: Currency + description: The currency of the account + required: false + validation: + warnings: + - field: Currency + details: 'The currency must match the base currency of the QuickBooks Desktop company unless the FullyQualifiedCategory is ''Asset.AccountsReceivable'',''Liability.AccountsPayable'' or ''Liability.CreditCard''' + - field: Currency + details: Must be a three letter ISO code that matches an existing active currency in the QuickBooks Desktop company + - field: Currency + details: Can only be set if the QuickBooks Desktop company has Multicurrency enabled. + information: + - field: Currency + details: 'If not set, will default to the base currency of the QuickBooks Desktop company' + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.AccountsReceivable + type: String + displayName: Account Receivable + required: false + - value: Asset.FixedAsset + type: String + displayName: Fixed Asset + required: false + - value: Asset.OtherCurrentAsset + type: String + displayName: Other Current Asset + required: false + - value: Asset.OtherAsset + type: String + displayName: Other Asset + required: false + - value: Income.Income + type: String + displayName: Income + required: false + - value: Income.OtherIncome + type: String + displayName: Other Income + required: false + - value: Liability.AccountsPayable + type: String + displayName: Accounts Payable + required: false + - value: Liability.CreditCard + type: String + displayName: Credit Card + required: false + - value: Liability.LongTermLiability + type: String + displayName: Long Term Liability + required: false + - value: Liability.OtherCurrentLiability + type: String + displayName: Other Current Liability + required: false + - value: Liability.CostOfGoodsSold + type: String + displayName: Cost Of Goods Sold + required: false + - value: Equity.Equity + type: String + displayName: Equity + required: false + - value: Expense.Expense + type: String + displayName: Expense + required: false + - value: Expense.OtherExpense + type: String + displayName: Other Expense + required: false + required: true + currentBalance: + type: Number + displayName: Current Balance + description: The current balance in the account + required: false + required: true + QuickBooks Online Sandbox: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + validation: + warnings: [] + information: + - field: NominalCode + details: If included must have a length between 1 and 7 characters + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: + - field: Name + details: Must have a length between 1 and 100 characters + information: [] + currency: + type: String + displayName: Currency + description: The currency of the account + required: false + validation: + warnings: [] + information: + - field: Currency + details: When not specified company base currency will be used + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Bank.CashOnHand + type: String + displayName: Cash On Hand + required: false + - value: Asset.Bank.Checking + type: String + displayName: Checking + required: false + - value: Asset.Bank.MoneyMarket + type: String + displayName: Money Market + required: false + - value: Asset.Bank.RentsHeldInTrust + type: String + displayName: Rents Held In Trust + required: false + - value: Asset.Bank.Savings + type: String + displayName: Savings + required: false + - value: Asset.Bank.TrustAccounts + type: String + displayName: Trust Accounts + required: false + - value: Asset.Bank.CashAndCashEquivalents + type: String + displayName: Cash And Cash Equivalents + required: false + - value: Asset.Bank.OtherEarmarkedBankAccounts + type: String + displayName: Other Earmarked Bank Accounts + required: false + - value: Asset.Other Current Asset.AllowanceForBadDebts + type: String + displayName: Allowance For Bad Debts + required: false + - value: Asset.Other Current Asset.DevelopmentCosts + type: String + displayName: Development Costs + required: false + - value: Asset.Other Current Asset.EmployeeCashAdvances + type: String + displayName: Employee Cash Advances + required: false + - value: Asset.Other Current Asset.OtherCurrentAssets + type: String + displayName: Other Current Assets + required: false + - value: Asset.Other Current Asset.Inventory + type: String + displayName: Inventory + required: false + - value: Asset.Other Current Asset.Investment_MortgageRealEstateLoans + type: String + displayName: Investment Mortgage Real Estate Loans + required: false + - value: Asset.Other Current Asset.Investment_Other + type: String + displayName: Investment Other + required: false + - value: Asset.Other Current Asset.Investment_TaxExemptSecurities + type: String + displayName: Investment Tax Exempt Securities + required: false + - value: Asset.Other Current Asset.Investment_USGovernmentObligations + type: String + displayName: Investment US Government Obligations + required: false + - value: Asset.Other Current Asset.LoansToOfficers + type: String + displayName: Loans To Officers + required: false + - value: Asset.Other Current Asset.LoansToOthers + type: String + displayName: Loans To Others + required: false + - value: Asset.Other Current Asset.LoansToStockholders + type: String + displayName: Loans To Stockholders + required: false + - value: Asset.Other Current Asset.PrepaidExpenses + type: String + displayName: Prepaid Expenses + required: false + - value: Asset.Other Current Asset.Retainage + type: String + displayName: Retainage + required: false + - value: Asset.Other Current Asset.UndepositedFunds + type: String + displayName: Undeposited Funds + required: false + - value: Asset.Other Current Asset.AssetsAvailableForSale + type: String + displayName: Assets Available For Sale + required: false + - value: Asset.Other Current Asset.BalWithGovtAuthorities + type: String + displayName: Balance With Govt Authorities + required: false + - value: Asset.Other Current Asset.CalledUpShareCapitalNotPaid + type: String + displayName: Called Up Share Capital Not Paid + required: false + - value: Asset.Other Current Asset.ExpenditureAuthorisationsAndLettersOfCredit + type: String + displayName: Expenditure Authorisations And Letters Of Credit + required: false + - value: Asset.Other Current Asset.GlobalTaxDeferred + type: String + displayName: Global Tax Deferred + required: false + - value: Asset.Other Current Asset.GlobalTaxRefund + type: String + displayName: Global Tax Refund + required: false + - value: Asset.Other Current Asset.InternalTransfers + type: String + displayName: Internal Transfers + required: false + - value: Asset.Other Current Asset.OtherConsumables + type: String + displayName: Other Consumables + required: false + - value: Asset.Other Current Asset.ProvisionsCurrentAssets + type: String + displayName: Provisions Current Assets + required: false + - value: Asset.Other Current Asset.ShortTermInvestmentsInRelatedParties + type: String + displayName: Short Term Investments In Related Parties + required: false + - value: Asset.Other Current Asset.ShortTermLoansAndAdvancesToRelatedParties + type: String + displayName: Short Term Loans And Advances To Related Parties + required: false + - value: Asset.Other Current Asset.TradeAndOtherReceivables + type: String + displayName: Trade And Other Receivables + required: false + - value: Asset.Fixed Asset.AccumulatedDepletion + type: String + displayName: Accumulated Depletion + required: false + - value: Asset.Fixed Asset.AccumulatedDepreciation + type: String + displayName: Accumulated Depreciation + required: false + - value: Asset.Fixed Asset.DepletableAssets + type: String + displayName: Depletable Assets + required: false + - value: Asset.Fixed Asset.FixedAssetComputers + type: String + displayName: Fixed Asset Computers + required: false + - value: Asset.Fixed Asset.FixedAssetCopiers + type: String + displayName: Fixed Asset Copiers + required: false + - value: Asset.Fixed Asset.FixedAssetFurniture + type: String + displayName: Fixed Asset Furniture + required: false + - value: Asset.Fixed Asset.FixedAssetPhone + type: String + displayName: Fixed Asset Phone + required: false + - value: Asset.Fixed Asset.FixedAssetPhotoVideo + type: String + displayName: Fixed Asset Photo Video + required: false + - value: Asset.Fixed Asset.FixedAssetSoftware + type: String + displayName: Fixed Asset Software + required: false + - value: Asset.Fixed Asset.FixedAssetOtherToolsEquipment + type: String + displayName: Fixed Asset Other Tools Equipment + required: false + - value: Asset.Fixed Asset.FurnitureAndFixtures + type: String + displayName: Furniture And Fixtures + required: false + - value: Asset.Fixed Asset.Land + type: String + displayName: Land + required: false + - value: Asset.Fixed Asset.LeaseholdImprovements + type: String + displayName: Leasehold Improvements + required: false + - value: Asset.Fixed Asset.OtherFixedAssets + type: String + displayName: Other Fixed Assets + required: false + - value: Asset.Fixed Asset.AccumulatedAmortization + type: String + displayName: Accumulated Amortization + required: false + - value: Asset.Fixed Asset.Buildings + type: String + displayName: Buildings + required: false + - value: Asset.Fixed Asset.IntangibleAssets + type: String + displayName: Intangible Assets + required: false + - value: Asset.Fixed Asset.MachineryAndEquipment + type: String + displayName: Machinery And Equipment + required: false + - value: Asset.Fixed Asset.Vehicles + type: String + displayName: Vehicles + required: false + - value: Asset.Fixed Asset.AssetsInCourseOfConstruction + type: String + displayName: Assets In Course Of Construction + required: false + - value: Asset.Fixed Asset.CapitalWip + type: String + displayName: Capital Wip + required: false + - value: Asset.Fixed Asset.CumulativeDepreciationOnIntangibleAssets + type: String + displayName: Cumulative Depreciation On Intangible Assets + required: false + - value: Asset.Fixed Asset.IntangibleAssetsUnderDevelopment + type: String + displayName: Intangible Assets Under Development + required: false + - value: Asset.Fixed Asset.LandAsset + type: String + displayName: Land Asset + required: false + - value: Asset.Fixed Asset.NonCurrentAssets + type: String + displayName: Non Current Assets + required: false + - value: Asset.Fixed Asset.ParticipatingInterests + type: String + displayName: Participating Interests + required: false + - value: Asset.Fixed Asset.ProvisionsFixedAssets + type: String + displayName: Provisions Fixed Assets + required: false + - value: Asset.Other Asset.LeaseBuyout + type: String + displayName: Lease Buyout + required: false + - value: Asset.Other Asset.OtherLongTermAssets + type: String + displayName: Other Long Term Assets + required: false + - value: Asset.Other Asset.SecurityDeposits + type: String + displayName: Security Deposits + required: false + - value: Asset.Other Asset.AccumulatedAmortizationOfOtherAssets + type: String + displayName: Accumulated Amortization Of Other Assets + required: false + - value: Asset.Other Asset.Goodwill + type: String + displayName: Goodwill + required: false + - value: Asset.Other Asset.Licenses + type: String + displayName: Licenses + required: false + - value: Asset.Other Asset.OrganizationalCosts + type: String + displayName: Organizational Costs + required: false + - value: Asset.Other Asset.AssetsHeldForSale + type: String + displayName: Assets Held For Sale + required: false + - value: Asset.Other Asset.AvailableForSaleFinancialAssets + type: String + displayName: Available For Sale Financial Assets + required: false + - value: Asset.Other Asset.DeferredTax + type: String + displayName: Deferred Tax + required: false + - value: Asset.Other Asset.Investments + type: String + displayName: Investments + required: false + - value: Asset.Other Asset.LongTermInvestments + type: String + displayName: Long Term Investments + required: false + - value: Asset.Other Asset.LongTermLoansAndAdvancesToRelatedParties + type: String + displayName: Long Term Loans And Advances To Related Parties + required: false + - value: Asset.Other Asset.OtherIntangibleAssets + type: String + displayName: Other Intangible Assets + required: false + - value: Asset.Other Asset.OtherLongTermInvestments + type: String + displayName: Other Long Term Investments + required: false + - value: Asset.Other Asset.OtherLongTermLoansAndAdvances + type: String + displayName: Other Long Term Loans And Advances + required: false + - value: Asset.Other Asset.PrepaymentsAndAccruedIncome + type: String + displayName: Prepayments And Accrued Income + required: false + - value: Asset.Other Asset.ProvisionsNonCurrentAssets + type: String + displayName: Provisions Non-Current Assets + required: false + - value: Asset.Accounts Receivable.AccountsReceivable + type: String + displayName: Accounts Receivable + required: false + - value: Expense.Expense.AdvertisingPromotional + type: String + displayName: Advertising/Promotional + required: false + - value: Expense.Expense.BadDebts + type: String + displayName: Bad Debts + required: false + - value: Expense.Expense.BankCharges + type: String + displayName: Bank Charges + required: false + - value: Expense.Expense.CharitableContributions + type: String + displayName: Charitable Contributions + required: false + - value: Expense.Expense.CommissionsAndFees + type: String + displayName: Commissions And Fees + required: false + - value: Expense.Expense.Entertainment + type: String + displayName: Entertainment + required: false + - value: Expense.Expense.EntertainmentMeals + type: String + displayName: Entertainment Meals + required: false + - value: Expense.Expense.EquipmentRental + type: String + displayName: Equipment Rental + required: false + - value: Expense.Expense.FinanceCosts + type: String + displayName: Finance Costs + required: false + - value: Expense.Expense.GlobalTaxExpense + type: String + displayName: Global Tax Expense + required: false + - value: Expense.Expense.Insurance + type: String + displayName: Insurance + required: false + - value: Expense.Expense.InterestPaid + type: String + displayName: Interest Paid + required: false + - value: Expense.Expense.LegalProfessionalFees + type: String + displayName: Legal And Professional Fees + required: false + - value: Expense.Expense.OfficeExpenses + type: String + displayName: Office Expenses + required: false + - value: Expense.Expense.OfficeGeneralAdministrativeExpenses + type: String + displayName: Office/General Administrative Expenses + required: false + - value: Expense.Expense.OtherBusinessExpenses + type: String + displayName: Other Business Expenses + required: false + - value: Expense.Expense.OtherMiscellaneousServiceCost + type: String + displayName: Other Miscellaneous Service Cost + required: false + - value: Expense.Expense.PromotionalMeals + type: String + displayName: Promotional Meals + required: false + - value: Expense.Expense.RentOrLeaseOfBuildings + type: String + displayName: Rent Or Lease Of Buildings + required: false + - value: Expense.Expense.RepairMaintenance + type: String + displayName: Repair And Maintenance + required: false + - value: Expense.Expense.ShippingFreightDelivery + type: String + displayName: 'Shipping, Freight And Delivery' + required: false + - value: Expense.Expense.SuppliesMaterials + type: String + displayName: Supplies And Materials + required: false + - value: Expense.Expense.Travel + type: String + displayName: Travel + required: false + - value: Expense.Expense.TravelMeals + type: String + displayName: Travel Meals + required: false + - value: Expense.Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Expense.Auto + type: String + displayName: Auto + required: false + - value: Expense.Expense.CostOfLabor + type: String + displayName: Cost Of Labor + required: false + - value: Expense.Expense.DuesSubscriptions + type: String + displayName: Dues And Subscriptions + required: false + - value: Expense.Expense.PayrollExpenses + type: String + displayName: Payroll Expenses + required: false + - value: Expense.Expense.TaxesPaid + type: String + displayName: Taxes Paid + required: false + - value: Expense.Expense.UnappliedCashBillPaymentExpense + type: String + displayName: Unapplied Cash Bill Payment Expense + required: false + - value: Expense.Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Expense.AmortizationExpense + type: String + displayName: Amortization Expense + required: false + - value: Expense.Expense.AppropriationsToDepreciation + type: String + displayName: Appropriations To Depreciation + required: false + - value: Expense.Expense.BorrowingCost + type: String + displayName: Borrowing Cost + required: false + - value: Expense.Expense.CommissionsAndFees + type: String + displayName: Commissions And Fees + required: false + - value: Expense.Expense.DistributionCosts + type: String + displayName: Distribution Costs + required: false + - value: Expense.Expense.ExternalServices + type: String + displayName: External Services + required: false + - value: Expense.Expense.ExtraordinaryCharges + type: String + displayName: Extraordinary Charges + required: false + - value: Expense.Expense.IncomeTaxExpense + type: String + displayName: Income Tax Expense + required: false + - value: Expense.Expense.LossOnDiscontinuedOperationsNetOfTax + type: String + displayName: Loss On Discontinued Operations Net Of Tax + required: false + - value: Expense.Expense.ManagementCompensation + type: String + displayName: Management Compensation + required: false + - value: Expense.Expense.OtherCurrentOperatingCharges + type: String + displayName: Other Current Operating Charges + required: false + - value: Expense.Expense.OtherExternalServices + type: String + displayName: Other External Services + required: false + - value: Expense.Expense.OtherRentalCosts + type: String + displayName: Other Rental Costs + required: false + - value: Expense.Expense.OtherSellingExpenses + type: String + displayName: Other Selling Expenses + required: false + - value: Expense.Expense.ProjectStudiesSurveysAssessments + type: String + displayName: Project Studies Surveys Assessments + required: false + - value: Expense.Expense.PurchasesRebates + type: String + displayName: Purchases Rebates + required: false + - value: Expense.Expense.ShippingAndDeliveryExpense + type: String + displayName: Shipping And Delivery Expense + required: false + - value: Expense.Expense.StaffCosts + type: String + displayName: Staff Costs + required: false + - value: Expense.Expense.Sundry + type: String + displayName: Sundry + required: false + - value: Expense.Expense.TravelExpensesGeneralAndAdminExpenses + type: String + displayName: Travel Expenses General And Admin Expenses + required: false + - value: Expense.Expense.TravelExpensesSellingExpense + type: String + displayName: Travel Expenses Selling Expense + required: false + - value: Expense.Other Expense.Depreciation + type: String + displayName: Depreciation + required: false + - value: Expense.Other Expense.ExchangeGainOrLoss + type: String + displayName: Exchange Gain Or Loss + required: false + - value: Expense.Other Expense.OtherMiscellaneousExpense + type: String + displayName: Other Miscellaneous Expense + required: false + - value: Expense.Other Expense.PenaltiesSettlements + type: String + displayName: Penalties And Settlements + required: false + - value: Expense.Other Expense.Amortization + type: String + displayName: Amortization + required: false + - value: Expense.Other Expense.GasAndFuel + type: String + displayName: Gas And Fuel + required: false + - value: Expense.Other Expense.HomeOffice + type: String + displayName: Home Office + required: false + - value: Expense.Other Expense.HomeOwnerRentalInsurance + type: String + displayName: Home Owner Rental Insurance + required: false + - value: Expense.Other Expense.OtherHomeOfficeExpenses + type: String + displayName: Other Home Office Expenses + required: false + - value: Expense.Other Expense.MortgageInterest + type: String + displayName: Mortgage Interest + required: false + - value: Expense.Other Expense.RentAndLease + type: String + displayName: Rent And Lease + required: false + - value: Expense.Other Expense.RepairsAndMaintenance + type: String + displayName: Repairs And Maintenance + required: false + - value: Expense.Other Expense.ParkingAndTolls + type: String + displayName: Parking And Tolls + required: false + - value: Expense.Other Expense.Vehicle + type: String + displayName: Vehicle + required: false + - value: Expense.Other Expense.VehicleInsurance + type: String + displayName: Vehicle Insurance + required: false + - value: Expense.Other Expense.VehicleLease + type: String + displayName: Vehicle Lease + required: false + - value: Expense.Other Expense.VehicleLoanInterest + type: String + displayName: Vehicle Loan Interest + required: false + - value: Expense.Other Expense.VehicleLoan + type: String + displayName: Vehicle Loan + required: false + - value: Expense.Other Expense.VehicleRegistration + type: String + displayName: Vehicle Registration + required: false + - value: Expense.Other Expense.VehicleRepairs + type: String + displayName: Vehicle Repairs + required: false + - value: Expense.Other Expense.OtherVehicleExpenses + type: String + displayName: Other Vehicle Expenses + required: false + - value: Expense.Other Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Other Expense.WashAndRoadServices + type: String + displayName: Wash And Road Services + required: false + - value: Expense.Other Expense.DeferredTaxExpense + type: String + displayName: Deferred Tax Expense + required: false + - value: Expense.Other Expense.Depletion + type: String + displayName: Depletion + required: false + - value: Expense.Other Expense.ExceptionalItems + type: String + displayName: Exceptional Items + required: false + - value: Expense.Other Expense.ExtraordinaryItems + type: String + displayName: Extraordinary Items + required: false + - value: Expense.Other Expense.IncomeTaxOtherExpense + type: String + displayName: Income Tax Other Expense + required: false + - value: Expense.Other Expense.MatCredit + type: String + displayName: Mat Credit + required: false + - value: Expense.Other Expense.PriorPeriodItems + type: String + displayName: Prior Period Items + required: false + - value: Expense.Other Expense.TaxRoundoffGainOrLoss + type: String + displayName: Tax Roundoff Gain Or Loss + required: false + - value: Expense.Cost of Goods Sold.EquipmentRentalCos + type: String + displayName: Equipment Rental - COS + required: false + - value: Expense.Cost of Goods Sold.OtherCostsOfServiceCos + type: String + displayName: Other Costs Of Sales - COS + required: false + - value: Expense.Cost of Goods Sold.ShippingFreightDeliveryCos + type: String + displayName: 'Shipping, Freight And Delivery - COS' + required: false + - value: Expense.Cost of Goods Sold.SuppliesMaterialsCogs + type: String + displayName: Supplies And Materials - COS + required: false + - value: Expense.Cost of Goods Sold.CostOfLaborCos + type: String + displayName: Cost Of Labor - COS + required: false + - value: Expense.Cost of Goods Sold.CostOfSales + type: String + displayName: Cost Of Sales + required: false + - value: Expense.Cost of Goods Sold.FreightAndDeliveryCost + type: String + displayName: Freight And Delivery Cost + required: false + - value: Income.Income.NonProfitIncome + type: String + displayName: Non Profit Income + required: false + - value: Income.Income.OtherPrimaryIncome + type: String + displayName: Other Primary Income + required: false + - value: Income.Income.SalesOfProductIncome + type: String + displayName: Sales Of ProductIncome + required: false + - value: Income.Income.ServiceFeeIncome + type: String + displayName: Service Fee Income + required: false + - value: Income.Income.DiscountsRefundsGiven + type: String + displayName: Discounts Refunds Given + required: false + - value: Income.Income.UnappliedCashPaymentIncome + type: String + displayName: Unapplied Cash Payment Income + required: false + - value: Income.Income.CashReceiptIncome + type: String + displayName: Cash Receipt Income + required: false + - value: Income.Income.OperatingGrants + type: String + displayName: Operating Grants + required: false + - value: Income.Income.OtherCurrentOperatingIncome + type: String + displayName: Other Current Operating Income + required: false + - value: Income.Income.OwnWorkCapitalized + type: String + displayName: Own Work Capitalized + required: false + - value: Income.Income.RevenueGeneral + type: String + displayName: Revenue General + required: false + - value: Income.Income.SalesRetail + type: String + displayName: Sales Retail + required: false + - value: Income.Income.SalesWholesale + type: String + displayName: Sales Wholesale + required: false + - value: Income.Income.SavingsByTaxScheme + type: String + displayName: Savings By Tax Scheme + required: false + - value: Income.Other Income.DividendIncome + type: String + displayName: Dividend Income + required: false + - value: Income.Other Income.InterestEarned + type: String + displayName: Interest Earned + required: false + - value: Income.Other Income.OtherInvestmentIncome + type: String + displayName: Other Investment Income + required: false + - value: Income.Other Income.OtherMiscellaneousIncome + type: String + displayName: Other Miscellaneous Income + required: false + - value: Income.Other Income.TaxExemptInterest + type: String + displayName: Tax Exempt Interest + required: false + - value: Income.Other Income.GainLossOnSaleOfFixedAssets + type: String + displayName: Gain Loss On Sale Of Fixed Assets + required: false + - value: Income.Other Income.GainLossOnSaleOfInvestments + type: String + displayName: Gain Loss On Sale Of Investments + required: false + - value: Income.Other Income.LossOnDisposalOfAssets + type: String + displayName: Loss On Disposal Of Assets + required: false + - value: Income.Other Income.OtherOperatingIncome + type: String + displayName: Other Operating Income + required: false + - value: Income.Other Income.UnrealisedLossOnSecuritiesNetOfTax + type: String + displayName: Unrealised Loss On Securities Net Of Tax + required: false + - value: Liability.Accounts Payable.AccountsPayable + type: String + displayName: Accounts Payable + required: false + - value: Liability.Accounts Payable.OutstandingDuesMicroSmallEnterprise + type: String + displayName: Outstanding Dues Micro Small Enterprise + required: false + - value: Liability.Accounts Payable.OutstandingDuesOtherThanMicroSmallEnterprise + type: String + displayName: Outstanding Dues Other Than Micro Small Enterprise + required: false + - value: Liability.Credit Card.CreditCard + type: String + displayName: Credit Card + required: false + - value: Liability.Long Term Liability.NotesPayable + type: String + displayName: Notes Payable + required: false + - value: Liability.Long Term Liability.OtherLongTermLiabilities + type: String + displayName: Other Long Term Liabilities + required: false + - value: Liability.Long Term Liability.ShareholderNotesPayable + type: String + displayName: Shareholder Notes Payable + required: false + - value: Liability.Long Term Liability.AccrualsAndDeferredIncome + type: String + displayName: Accruals And Deferred Income + required: false + - value: Liability.Long Term Liability.AccruedLongLermLiabilities + type: String + displayName: Accrued Long Lerm Liabilities + required: false + - value: Liability.Long Term Liability.AccruedVacationPayable + type: String + displayName: Accrued Vacation Payable + required: false + - value: Liability.Long Term Liability.BankLoans + type: String + displayName: Bank Loans + required: false + - value: Liability.Long Term Liability.DebtsRelatedToParticipatingInterests + type: String + displayName: Debts Related To Participating Interests + required: false + - value: Liability.Long Term Liability.DeferredTaxLiabilities + type: String + displayName: Deferred Tax Liabilities + required: false + - value: Liability.Long Term Liability.GovernmentAndOtherPublicAuthorities + type: String + displayName: Government And Other Public Authorities + required: false + - value: Liability.Long Term Liability.GroupAndAssociates + type: String + displayName: Group And Associates + required: false + - value: Liability.Long Term Liability.LiabilitiesRelatedToAssetsHeldForSale + type: String + displayName: Liabilities Related To Assets Held For Sale + required: false + - value: Liability.Long Term Liability.LongTermBorrowings + type: String + displayName: Long Term Borrowings + required: false + - value: Liability.Long Term Liability.LongTermDebit + type: String + displayName: Long Term Debit + required: false + - value: Liability.Long Term Liability.LongTermEmployeeBenefitObligations + type: String + displayName: Long Term Employee Benefit Obligations + required: false + - value: Liability.Long Term Liability.ObligationsUnderFinanceLeases + type: String + displayName: Obligations Under Finance Leases + required: false + - value: Liability.Long Term Liability.OtherLongTermProvisions + type: String + displayName: Other Long Term Provisions + required: false + - value: Liability.Long Term Liability.ProvisionForLiabilities + type: String + displayName: Provision For Liabilities + required: false + - value: Liability.Long Term Liability.ProvisionsNonCurrentLiabilities + type: String + displayName: Provisions Non Current Liabilities + required: false + - value: Liability.Long Term Liability.StaffAndRelatedLongTermLiabilityAccounts + type: String + displayName: Staff And Related Long Term Liability Accounts + required: false + - value: Liability.Other Current Liability.DirectDepositPayable + type: String + displayName: Direct Deposit Payable + required: false + - value: Liability.Other Current Liability.LineOfCredit + type: String + displayName: Line Of Credit + required: false + - value: Liability.Other Current Liability.LoanPayable + type: String + displayName: Loan Payable + required: false + - value: Liability.Other Current Liability.GlobalTaxPayable + type: String + displayName: Global Tax Payable + required: false + - value: Liability.Other Current Liability.GlobalTaxSuspense + type: String + displayName: Global Tax Suspense + required: false + - value: Liability.Other Current Liability.OtherCurrentLiabilities + type: String + displayName: Other Current Liabilities + required: false + - value: Liability.Other Current Liability.PayrollClearing + type: String + displayName: Payroll Clearing + required: false + - value: Liability.Other Current Liability.PayrollTaxPayable + type: String + displayName: Payroll Tax Payable + required: false + - value: Liability.Other Current Liability.PrepaidExpensesPayable + type: String + displayName: Prepaid Expenses Payable + required: false + - value: Liability.Other Current Liability.RentsInTrustLiability + type: String + displayName: Rents In Trust Liability + required: false + - value: Liability.Other Current Liability.TrustAccountsLiabilities + type: String + displayName: Trust Accounts Liabilities + required: false + - value: Liability.Other Current Liability.FederalIncomeTaxPayable + type: String + displayName: Federal Income Tax Payable + required: false + - value: Liability.Other Current Liability.InsurancePayable + type: String + displayName: Insurance Payable + required: false + - value: Liability.Other Current Liability.SalesTaxPayable + type: String + displayName: Sales Tax Payable + required: false + - value: Liability.Other Current Liability.StateLocalIncomeTaxPayable + type: String + displayName: State Local Income Tax Payable + required: false + - value: Liability.Other Current Liability.AccruedLiabilities + type: String + displayName: Accrued Liabilities + required: false + - value: Liability.Other Current Liability.CurrentLiabilities + type: String + displayName: Current Liabilities + required: false + - value: Liability.Other Current Liability.CurrentPortionEmployeeBenefitsObligations + type: String + displayName: Current Portion EmployeeBenefits Obligations + required: false + - value: Liability.Other Current Liability.CurrentPortionOfObligationsUnderFinanceLeases + type: String + displayName: Current Portion Of Obligations Under Finance Leases + required: false + - value: Liability.Other Current Liability.CurrentTaxLiability + type: String + displayName: Current Tax Liability + required: false + - value: Liability.Other Current Liability.DividendsPayable + type: String + displayName: Dividends Payable + required: false + - value: Liability.Other Current Liability.DutiesAndTaxes + type: String + displayName: Duties And Taxes + required: false + - value: Liability.Other Current Liability.InterestPayables + type: String + displayName: Interest Payables + required: false + - value: Liability.Other Current Liability.ProvisionForWarrantyObligations + type: String + displayName: Provision For Warranty Obligations + required: false + - value: Liability.Other Current Liability.ProvisionsCurrentLiabilities + type: String + displayName: Provisions Current Liabilities + required: false + - value: Liability.Other Current Liability.ShortTermBorrowings + type: String + displayName: Short Term Borrowings + required: false + - value: Liability.Other Current Liability.SocialSecurityAgencies + type: String + displayName: Social Security Agencies + required: false + - value: Liability.Other Current Liability.StaffAndRelatedLiabilityAccounts + type: String + displayName: Staff And Related Liability Accounts + required: false + - value: Liability.Other Current Liability.SundryDebtorsAndCreditors + type: String + displayName: Sundry Debtors And Creditors + required: false + - value: Liability.Other Current Liability.TradeAndOtherPayables + type: String + displayName: Trade And Other Payables + required: false + - value: Equity.Equity.OpeningBalanceEquity + type: String + displayName: Opening Balance Equity + required: false + - value: Equity.Equity.PartnersEquity + type: String + displayName: Partners Equity + required: false + - value: Equity.Equity.RetainedEarnings + type: String + displayName: Retained Earnings + required: false + - value: Equity.Equity.AccumulatedAdjustment + type: String + displayName: Accumulated Adjustment + required: false + - value: Equity.Equity.OwnersEquity + type: String + displayName: Owners Equity + required: false + - value: Equity.Equity.PaidInCapitalOrSurplus + type: String + displayName: Paid In Capital Or Surplus + required: false + - value: Equity.Equity.PartnerContributions + type: String + displayName: Partner Contributions + required: false + - value: Equity.Equity.PartnerDistributions + type: String + displayName: Partner Distributions + required: false + - value: Equity.Equity.PreferredStock + type: String + displayName: Preferred Stock + required: false + - value: Equity.Equity.CommonStock + type: String + displayName: Common Stock + required: false + - value: Equity.Equity.TreasuryStock + type: String + displayName: Treasury Stock + required: false + - value: Equity.Equity.EstimatedTaxes + type: String + displayName: Estimated Taxes + required: false + - value: Equity.Equity.Healthcare + type: String + displayName: Healthcare + required: false + - value: Equity.Equity.PersonalIncome + type: String + displayName: Personal Income + required: false + - value: Equity.Equity.PersonalExpense + type: String + displayName: Personal Expense + required: false + - value: Equity.Equity.AccumulatedOtherComprehensiveIncome + type: String + displayName: Accumulated Other Comprehensive Income + required: false + - value: Equity.Equity.CalledUpShareCapital + type: String + displayName: Called Up Share Capital + required: false + - value: Equity.Equity.CapitalReserves + type: String + displayName: Capital Reserves + required: false + - value: Equity.Equity.DividendDisbursed + type: String + displayName: Dividend Disbursed + required: false + - value: Equity.Equity.EquityInEarningsOfSubsiduaries + type: String + displayName: Equity In Earnings Of Subsiduaries + required: false + - value: Equity.Equity.InvestmentGrants + type: String + displayName: Investment Grants + required: false + - value: Equity.Equity.MoneyReceivedAgainstShareWarrants + type: String + displayName: Money Received Against Share Warrants + required: false + - value: Equity.Equity.OtherFreeReserves + type: String + displayName: Other Free Reserves + required: false + - value: Equity.Equity.ShareApplicationMoneyPendingAllotment + type: String + displayName: Share Application Money Pending Allotment + required: false + - value: Equity.Equity.ShareCapital + type: String + displayName: Share Capital + required: false + - value: Equity.Equity.Funds + type: String + displayName: Funds + required: false + required: true + required: true + QuickBooks Online: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + validation: + warnings: [] + information: + - field: NominalCode + details: If included must have a length between 1 and 7 characters + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: + - field: Name + details: Must have a length between 1 and 100 characters + information: [] + currency: + type: String + displayName: Currency + description: The currency of the account + required: false + validation: + warnings: [] + information: + - field: Currency + details: When not specified company base currency will be used + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Bank.CashOnHand + type: String + displayName: Cash On Hand + required: false + - value: Asset.Bank.Checking + type: String + displayName: Checking + required: false + - value: Asset.Bank.MoneyMarket + type: String + displayName: Money Market + required: false + - value: Asset.Bank.RentsHeldInTrust + type: String + displayName: Rents Held In Trust + required: false + - value: Asset.Bank.Savings + type: String + displayName: Savings + required: false + - value: Asset.Bank.TrustAccounts + type: String + displayName: Trust Accounts + required: false + - value: Asset.Bank.CashAndCashEquivalents + type: String + displayName: Cash And Cash Equivalents + required: false + - value: Asset.Bank.OtherEarmarkedBankAccounts + type: String + displayName: Other Earmarked Bank Accounts + required: false + - value: Asset.Other Current Asset.AllowanceForBadDebts + type: String + displayName: Allowance For Bad Debts + required: false + - value: Asset.Other Current Asset.DevelopmentCosts + type: String + displayName: Development Costs + required: false + - value: Asset.Other Current Asset.EmployeeCashAdvances + type: String + displayName: Employee Cash Advances + required: false + - value: Asset.Other Current Asset.OtherCurrentAssets + type: String + displayName: Other Current Assets + required: false + - value: Asset.Other Current Asset.Inventory + type: String + displayName: Inventory + required: false + - value: Asset.Other Current Asset.Investment_MortgageRealEstateLoans + type: String + displayName: Investment Mortgage Real Estate Loans + required: false + - value: Asset.Other Current Asset.Investment_Other + type: String + displayName: Investment Other + required: false + - value: Asset.Other Current Asset.Investment_TaxExemptSecurities + type: String + displayName: Investment Tax Exempt Securities + required: false + - value: Asset.Other Current Asset.Investment_USGovernmentObligations + type: String + displayName: Investment US Government Obligations + required: false + - value: Asset.Other Current Asset.LoansToOfficers + type: String + displayName: Loans To Officers + required: false + - value: Asset.Other Current Asset.LoansToOthers + type: String + displayName: Loans To Others + required: false + - value: Asset.Other Current Asset.LoansToStockholders + type: String + displayName: Loans To Stockholders + required: false + - value: Asset.Other Current Asset.PrepaidExpenses + type: String + displayName: Prepaid Expenses + required: false + - value: Asset.Other Current Asset.Retainage + type: String + displayName: Retainage + required: false + - value: Asset.Other Current Asset.UndepositedFunds + type: String + displayName: Undeposited Funds + required: false + - value: Asset.Other Current Asset.AssetsAvailableForSale + type: String + displayName: Assets Available For Sale + required: false + - value: Asset.Other Current Asset.BalWithGovtAuthorities + type: String + displayName: Balance With Govt Authorities + required: false + - value: Asset.Other Current Asset.CalledUpShareCapitalNotPaid + type: String + displayName: Called Up Share Capital Not Paid + required: false + - value: Asset.Other Current Asset.ExpenditureAuthorisationsAndLettersOfCredit + type: String + displayName: Expenditure Authorisations And Letters Of Credit + required: false + - value: Asset.Other Current Asset.GlobalTaxDeferred + type: String + displayName: Global Tax Deferred + required: false + - value: Asset.Other Current Asset.GlobalTaxRefund + type: String + displayName: Global Tax Refund + required: false + - value: Asset.Other Current Asset.InternalTransfers + type: String + displayName: Internal Transfers + required: false + - value: Asset.Other Current Asset.OtherConsumables + type: String + displayName: Other Consumables + required: false + - value: Asset.Other Current Asset.ProvisionsCurrentAssets + type: String + displayName: Provisions Current Assets + required: false + - value: Asset.Other Current Asset.ShortTermInvestmentsInRelatedParties + type: String + displayName: Short Term Investments In Related Parties + required: false + - value: Asset.Other Current Asset.ShortTermLoansAndAdvancesToRelatedParties + type: String + displayName: Short Term Loans And Advances To Related Parties + required: false + - value: Asset.Other Current Asset.TradeAndOtherReceivables + type: String + displayName: Trade And Other Receivables + required: false + - value: Asset.Fixed Asset.AccumulatedDepletion + type: String + displayName: Accumulated Depletion + required: false + - value: Asset.Fixed Asset.AccumulatedDepreciation + type: String + displayName: Accumulated Depreciation + required: false + - value: Asset.Fixed Asset.DepletableAssets + type: String + displayName: Depletable Assets + required: false + - value: Asset.Fixed Asset.FixedAssetComputers + type: String + displayName: Fixed Asset Computers + required: false + - value: Asset.Fixed Asset.FixedAssetCopiers + type: String + displayName: Fixed Asset Copiers + required: false + - value: Asset.Fixed Asset.FixedAssetFurniture + type: String + displayName: Fixed Asset Furniture + required: false + - value: Asset.Fixed Asset.FixedAssetPhone + type: String + displayName: Fixed Asset Phone + required: false + - value: Asset.Fixed Asset.FixedAssetPhotoVideo + type: String + displayName: Fixed Asset Photo Video + required: false + - value: Asset.Fixed Asset.FixedAssetSoftware + type: String + displayName: Fixed Asset Software + required: false + - value: Asset.Fixed Asset.FixedAssetOtherToolsEquipment + type: String + displayName: Fixed Asset Other Tools Equipment + required: false + - value: Asset.Fixed Asset.FurnitureAndFixtures + type: String + displayName: Furniture And Fixtures + required: false + - value: Asset.Fixed Asset.Land + type: String + displayName: Land + required: false + - value: Asset.Fixed Asset.LeaseholdImprovements + type: String + displayName: Leasehold Improvements + required: false + - value: Asset.Fixed Asset.OtherFixedAssets + type: String + displayName: Other Fixed Assets + required: false + - value: Asset.Fixed Asset.AccumulatedAmortization + type: String + displayName: Accumulated Amortization + required: false + - value: Asset.Fixed Asset.Buildings + type: String + displayName: Buildings + required: false + - value: Asset.Fixed Asset.IntangibleAssets + type: String + displayName: Intangible Assets + required: false + - value: Asset.Fixed Asset.MachineryAndEquipment + type: String + displayName: Machinery And Equipment + required: false + - value: Asset.Fixed Asset.Vehicles + type: String + displayName: Vehicles + required: false + - value: Asset.Fixed Asset.AssetsInCourseOfConstruction + type: String + displayName: Assets In Course Of Construction + required: false + - value: Asset.Fixed Asset.CapitalWip + type: String + displayName: Capital Wip + required: false + - value: Asset.Fixed Asset.CumulativeDepreciationOnIntangibleAssets + type: String + displayName: Cumulative Depreciation On Intangible Assets + required: false + - value: Asset.Fixed Asset.IntangibleAssetsUnderDevelopment + type: String + displayName: Intangible Assets Under Development + required: false + - value: Asset.Fixed Asset.LandAsset + type: String + displayName: Land Asset + required: false + - value: Asset.Fixed Asset.NonCurrentAssets + type: String + displayName: Non Current Assets + required: false + - value: Asset.Fixed Asset.ParticipatingInterests + type: String + displayName: Participating Interests + required: false + - value: Asset.Fixed Asset.ProvisionsFixedAssets + type: String + displayName: Provisions Fixed Assets + required: false + - value: Asset.Other Asset.LeaseBuyout + type: String + displayName: Lease Buyout + required: false + - value: Asset.Other Asset.OtherLongTermAssets + type: String + displayName: Other Long Term Assets + required: false + - value: Asset.Other Asset.SecurityDeposits + type: String + displayName: Security Deposits + required: false + - value: Asset.Other Asset.AccumulatedAmortizationOfOtherAssets + type: String + displayName: Accumulated Amortization Of Other Assets + required: false + - value: Asset.Other Asset.Goodwill + type: String + displayName: Goodwill + required: false + - value: Asset.Other Asset.Licenses + type: String + displayName: Licenses + required: false + - value: Asset.Other Asset.OrganizationalCosts + type: String + displayName: Organizational Costs + required: false + - value: Asset.Other Asset.AssetsHeldForSale + type: String + displayName: Assets Held For Sale + required: false + - value: Asset.Other Asset.AvailableForSaleFinancialAssets + type: String + displayName: Available For Sale Financial Assets + required: false + - value: Asset.Other Asset.DeferredTax + type: String + displayName: Deferred Tax + required: false + - value: Asset.Other Asset.Investments + type: String + displayName: Investments + required: false + - value: Asset.Other Asset.LongTermInvestments + type: String + displayName: Long Term Investments + required: false + - value: Asset.Other Asset.LongTermLoansAndAdvancesToRelatedParties + type: String + displayName: Long Term Loans And Advances To Related Parties + required: false + - value: Asset.Other Asset.OtherIntangibleAssets + type: String + displayName: Other Intangible Assets + required: false + - value: Asset.Other Asset.OtherLongTermInvestments + type: String + displayName: Other Long Term Investments + required: false + - value: Asset.Other Asset.OtherLongTermLoansAndAdvances + type: String + displayName: Other Long Term Loans And Advances + required: false + - value: Asset.Other Asset.PrepaymentsAndAccruedIncome + type: String + displayName: Prepayments And Accrued Income + required: false + - value: Asset.Other Asset.ProvisionsNonCurrentAssets + type: String + displayName: Provisions Non-Current Assets + required: false + - value: Asset.Accounts Receivable.AccountsReceivable + type: String + displayName: Accounts Receivable + required: false + - value: Expense.Expense.AdvertisingPromotional + type: String + displayName: Advertising/Promotional + required: false + - value: Expense.Expense.BadDebts + type: String + displayName: Bad Debts + required: false + - value: Expense.Expense.BankCharges + type: String + displayName: Bank Charges + required: false + - value: Expense.Expense.CharitableContributions + type: String + displayName: Charitable Contributions + required: false + - value: Expense.Expense.CommissionsAndFees + type: String + displayName: Commissions And Fees + required: false + - value: Expense.Expense.Entertainment + type: String + displayName: Entertainment + required: false + - value: Expense.Expense.EntertainmentMeals + type: String + displayName: Entertainment Meals + required: false + - value: Expense.Expense.EquipmentRental + type: String + displayName: Equipment Rental + required: false + - value: Expense.Expense.FinanceCosts + type: String + displayName: Finance Costs + required: false + - value: Expense.Expense.GlobalTaxExpense + type: String + displayName: Global Tax Expense + required: false + - value: Expense.Expense.Insurance + type: String + displayName: Insurance + required: false + - value: Expense.Expense.InterestPaid + type: String + displayName: Interest Paid + required: false + - value: Expense.Expense.LegalProfessionalFees + type: String + displayName: Legal And Professional Fees + required: false + - value: Expense.Expense.OfficeExpenses + type: String + displayName: Office Expenses + required: false + - value: Expense.Expense.OfficeGeneralAdministrativeExpenses + type: String + displayName: Office/General Administrative Expenses + required: false + - value: Expense.Expense.OtherBusinessExpenses + type: String + displayName: Other Business Expenses + required: false + - value: Expense.Expense.OtherMiscellaneousServiceCost + type: String + displayName: Other Miscellaneous Service Cost + required: false + - value: Expense.Expense.PromotionalMeals + type: String + displayName: Promotional Meals + required: false + - value: Expense.Expense.RentOrLeaseOfBuildings + type: String + displayName: Rent Or Lease Of Buildings + required: false + - value: Expense.Expense.RepairMaintenance + type: String + displayName: Repair And Maintenance + required: false + - value: Expense.Expense.ShippingFreightDelivery + type: String + displayName: 'Shipping, Freight And Delivery' + required: false + - value: Expense.Expense.SuppliesMaterials + type: String + displayName: Supplies And Materials + required: false + - value: Expense.Expense.Travel + type: String + displayName: Travel + required: false + - value: Expense.Expense.TravelMeals + type: String + displayName: Travel Meals + required: false + - value: Expense.Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Expense.Auto + type: String + displayName: Auto + required: false + - value: Expense.Expense.CostOfLabor + type: String + displayName: Cost Of Labor + required: false + - value: Expense.Expense.DuesSubscriptions + type: String + displayName: Dues And Subscriptions + required: false + - value: Expense.Expense.PayrollExpenses + type: String + displayName: Payroll Expenses + required: false + - value: Expense.Expense.TaxesPaid + type: String + displayName: Taxes Paid + required: false + - value: Expense.Expense.UnappliedCashBillPaymentExpense + type: String + displayName: Unapplied Cash Bill Payment Expense + required: false + - value: Expense.Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Expense.AmortizationExpense + type: String + displayName: Amortization Expense + required: false + - value: Expense.Expense.AppropriationsToDepreciation + type: String + displayName: Appropriations To Depreciation + required: false + - value: Expense.Expense.BorrowingCost + type: String + displayName: Borrowing Cost + required: false + - value: Expense.Expense.CommissionsAndFees + type: String + displayName: Commissions And Fees + required: false + - value: Expense.Expense.DistributionCosts + type: String + displayName: Distribution Costs + required: false + - value: Expense.Expense.ExternalServices + type: String + displayName: External Services + required: false + - value: Expense.Expense.ExtraordinaryCharges + type: String + displayName: Extraordinary Charges + required: false + - value: Expense.Expense.IncomeTaxExpense + type: String + displayName: Income Tax Expense + required: false + - value: Expense.Expense.LossOnDiscontinuedOperationsNetOfTax + type: String + displayName: Loss On Discontinued Operations Net Of Tax + required: false + - value: Expense.Expense.ManagementCompensation + type: String + displayName: Management Compensation + required: false + - value: Expense.Expense.OtherCurrentOperatingCharges + type: String + displayName: Other Current Operating Charges + required: false + - value: Expense.Expense.OtherExternalServices + type: String + displayName: Other External Services + required: false + - value: Expense.Expense.OtherRentalCosts + type: String + displayName: Other Rental Costs + required: false + - value: Expense.Expense.OtherSellingExpenses + type: String + displayName: Other Selling Expenses + required: false + - value: Expense.Expense.ProjectStudiesSurveysAssessments + type: String + displayName: Project Studies Surveys Assessments + required: false + - value: Expense.Expense.PurchasesRebates + type: String + displayName: Purchases Rebates + required: false + - value: Expense.Expense.ShippingAndDeliveryExpense + type: String + displayName: Shipping And Delivery Expense + required: false + - value: Expense.Expense.StaffCosts + type: String + displayName: Staff Costs + required: false + - value: Expense.Expense.Sundry + type: String + displayName: Sundry + required: false + - value: Expense.Expense.TravelExpensesGeneralAndAdminExpenses + type: String + displayName: Travel Expenses General And Admin Expenses + required: false + - value: Expense.Expense.TravelExpensesSellingExpense + type: String + displayName: Travel Expenses Selling Expense + required: false + - value: Expense.Other Expense.Depreciation + type: String + displayName: Depreciation + required: false + - value: Expense.Other Expense.ExchangeGainOrLoss + type: String + displayName: Exchange Gain Or Loss + required: false + - value: Expense.Other Expense.OtherMiscellaneousExpense + type: String + displayName: Other Miscellaneous Expense + required: false + - value: Expense.Other Expense.PenaltiesSettlements + type: String + displayName: Penalties And Settlements + required: false + - value: Expense.Other Expense.Amortization + type: String + displayName: Amortization + required: false + - value: Expense.Other Expense.GasAndFuel + type: String + displayName: Gas And Fuel + required: false + - value: Expense.Other Expense.HomeOffice + type: String + displayName: Home Office + required: false + - value: Expense.Other Expense.HomeOwnerRentalInsurance + type: String + displayName: Home Owner Rental Insurance + required: false + - value: Expense.Other Expense.OtherHomeOfficeExpenses + type: String + displayName: Other Home Office Expenses + required: false + - value: Expense.Other Expense.MortgageInterest + type: String + displayName: Mortgage Interest + required: false + - value: Expense.Other Expense.RentAndLease + type: String + displayName: Rent And Lease + required: false + - value: Expense.Other Expense.RepairsAndMaintenance + type: String + displayName: Repairs And Maintenance + required: false + - value: Expense.Other Expense.ParkingAndTolls + type: String + displayName: Parking And Tolls + required: false + - value: Expense.Other Expense.Vehicle + type: String + displayName: Vehicle + required: false + - value: Expense.Other Expense.VehicleInsurance + type: String + displayName: Vehicle Insurance + required: false + - value: Expense.Other Expense.VehicleLease + type: String + displayName: Vehicle Lease + required: false + - value: Expense.Other Expense.VehicleLoanInterest + type: String + displayName: Vehicle Loan Interest + required: false + - value: Expense.Other Expense.VehicleLoan + type: String + displayName: Vehicle Loan + required: false + - value: Expense.Other Expense.VehicleRegistration + type: String + displayName: Vehicle Registration + required: false + - value: Expense.Other Expense.VehicleRepairs + type: String + displayName: Vehicle Repairs + required: false + - value: Expense.Other Expense.OtherVehicleExpenses + type: String + displayName: Other Vehicle Expenses + required: false + - value: Expense.Other Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Other Expense.WashAndRoadServices + type: String + displayName: Wash And Road Services + required: false + - value: Expense.Other Expense.DeferredTaxExpense + type: String + displayName: Deferred Tax Expense + required: false + - value: Expense.Other Expense.Depletion + type: String + displayName: Depletion + required: false + - value: Expense.Other Expense.ExceptionalItems + type: String + displayName: Exceptional Items + required: false + - value: Expense.Other Expense.ExtraordinaryItems + type: String + displayName: Extraordinary Items + required: false + - value: Expense.Other Expense.IncomeTaxOtherExpense + type: String + displayName: Income Tax Other Expense + required: false + - value: Expense.Other Expense.MatCredit + type: String + displayName: Mat Credit + required: false + - value: Expense.Other Expense.PriorPeriodItems + type: String + displayName: Prior Period Items + required: false + - value: Expense.Other Expense.TaxRoundoffGainOrLoss + type: String + displayName: Tax Roundoff Gain Or Loss + required: false + - value: Expense.Cost of Goods Sold.EquipmentRentalCos + type: String + displayName: Equipment Rental - COS + required: false + - value: Expense.Cost of Goods Sold.OtherCostsOfServiceCos + type: String + displayName: Other Costs Of Sales - COS + required: false + - value: Expense.Cost of Goods Sold.ShippingFreightDeliveryCos + type: String + displayName: 'Shipping, Freight And Delivery - COS' + required: false + - value: Expense.Cost of Goods Sold.SuppliesMaterialsCogs + type: String + displayName: Supplies And Materials - COS + required: false + - value: Expense.Cost of Goods Sold.CostOfLaborCos + type: String + displayName: Cost Of Labor - COS + required: false + - value: Expense.Cost of Goods Sold.CostOfSales + type: String + displayName: Cost Of Sales + required: false + - value: Expense.Cost of Goods Sold.FreightAndDeliveryCost + type: String + displayName: Freight And Delivery Cost + required: false + - value: Income.Income.NonProfitIncome + type: String + displayName: Non Profit Income + required: false + - value: Income.Income.OtherPrimaryIncome + type: String + displayName: Other Primary Income + required: false + - value: Income.Income.SalesOfProductIncome + type: String + displayName: Sales Of ProductIncome + required: false + - value: Income.Income.ServiceFeeIncome + type: String + displayName: Service Fee Income + required: false + - value: Income.Income.DiscountsRefundsGiven + type: String + displayName: Discounts Refunds Given + required: false + - value: Income.Income.UnappliedCashPaymentIncome + type: String + displayName: Unapplied Cash Payment Income + required: false + - value: Income.Income.CashReceiptIncome + type: String + displayName: Cash Receipt Income + required: false + - value: Income.Income.OperatingGrants + type: String + displayName: Operating Grants + required: false + - value: Income.Income.OtherCurrentOperatingIncome + type: String + displayName: Other Current Operating Income + required: false + - value: Income.Income.OwnWorkCapitalized + type: String + displayName: Own Work Capitalized + required: false + - value: Income.Income.RevenueGeneral + type: String + displayName: Revenue General + required: false + - value: Income.Income.SalesRetail + type: String + displayName: Sales Retail + required: false + - value: Income.Income.SalesWholesale + type: String + displayName: Sales Wholesale + required: false + - value: Income.Income.SavingsByTaxScheme + type: String + displayName: Savings By Tax Scheme + required: false + - value: Income.Other Income.DividendIncome + type: String + displayName: Dividend Income + required: false + - value: Income.Other Income.InterestEarned + type: String + displayName: Interest Earned + required: false + - value: Income.Other Income.OtherInvestmentIncome + type: String + displayName: Other Investment Income + required: false + - value: Income.Other Income.OtherMiscellaneousIncome + type: String + displayName: Other Miscellaneous Income + required: false + - value: Income.Other Income.TaxExemptInterest + type: String + displayName: Tax Exempt Interest + required: false + - value: Income.Other Income.GainLossOnSaleOfFixedAssets + type: String + displayName: Gain Loss On Sale Of Fixed Assets + required: false + - value: Income.Other Income.GainLossOnSaleOfInvestments + type: String + displayName: Gain Loss On Sale Of Investments + required: false + - value: Income.Other Income.LossOnDisposalOfAssets + type: String + displayName: Loss On Disposal Of Assets + required: false + - value: Income.Other Income.OtherOperatingIncome + type: String + displayName: Other Operating Income + required: false + - value: Income.Other Income.UnrealisedLossOnSecuritiesNetOfTax + type: String + displayName: Unrealised Loss On Securities Net Of Tax + required: false + - value: Liability.Accounts Payable.AccountsPayable + type: String + displayName: Accounts Payable + required: false + - value: Liability.Accounts Payable.OutstandingDuesMicroSmallEnterprise + type: String + displayName: Outstanding Dues Micro Small Enterprise + required: false + - value: Liability.Accounts Payable.OutstandingDuesOtherThanMicroSmallEnterprise + type: String + displayName: Outstanding Dues Other Than Micro Small Enterprise + required: false + - value: Liability.Credit Card.CreditCard + type: String + displayName: Credit Card + required: false + - value: Liability.Long Term Liability.NotesPayable + type: String + displayName: Notes Payable + required: false + - value: Liability.Long Term Liability.OtherLongTermLiabilities + type: String + displayName: Other Long Term Liabilities + required: false + - value: Liability.Long Term Liability.ShareholderNotesPayable + type: String + displayName: Shareholder Notes Payable + required: false + - value: Liability.Long Term Liability.AccrualsAndDeferredIncome + type: String + displayName: Accruals And Deferred Income + required: false + - value: Liability.Long Term Liability.AccruedLongLermLiabilities + type: String + displayName: Accrued Long Lerm Liabilities + required: false + - value: Liability.Long Term Liability.AccruedVacationPayable + type: String + displayName: Accrued Vacation Payable + required: false + - value: Liability.Long Term Liability.BankLoans + type: String + displayName: Bank Loans + required: false + - value: Liability.Long Term Liability.DebtsRelatedToParticipatingInterests + type: String + displayName: Debts Related To Participating Interests + required: false + - value: Liability.Long Term Liability.DeferredTaxLiabilities + type: String + displayName: Deferred Tax Liabilities + required: false + - value: Liability.Long Term Liability.GovernmentAndOtherPublicAuthorities + type: String + displayName: Government And Other Public Authorities + required: false + - value: Liability.Long Term Liability.GroupAndAssociates + type: String + displayName: Group And Associates + required: false + - value: Liability.Long Term Liability.LiabilitiesRelatedToAssetsHeldForSale + type: String + displayName: Liabilities Related To Assets Held For Sale + required: false + - value: Liability.Long Term Liability.LongTermBorrowings + type: String + displayName: Long Term Borrowings + required: false + - value: Liability.Long Term Liability.LongTermDebit + type: String + displayName: Long Term Debit + required: false + - value: Liability.Long Term Liability.LongTermEmployeeBenefitObligations + type: String + displayName: Long Term Employee Benefit Obligations + required: false + - value: Liability.Long Term Liability.ObligationsUnderFinanceLeases + type: String + displayName: Obligations Under Finance Leases + required: false + - value: Liability.Long Term Liability.OtherLongTermProvisions + type: String + displayName: Other Long Term Provisions + required: false + - value: Liability.Long Term Liability.ProvisionForLiabilities + type: String + displayName: Provision For Liabilities + required: false + - value: Liability.Long Term Liability.ProvisionsNonCurrentLiabilities + type: String + displayName: Provisions Non Current Liabilities + required: false + - value: Liability.Long Term Liability.StaffAndRelatedLongTermLiabilityAccounts + type: String + displayName: Staff And Related Long Term Liability Accounts + required: false + - value: Liability.Other Current Liability.DirectDepositPayable + type: String + displayName: Direct Deposit Payable + required: false + - value: Liability.Other Current Liability.LineOfCredit + type: String + displayName: Line Of Credit + required: false + - value: Liability.Other Current Liability.LoanPayable + type: String + displayName: Loan Payable + required: false + - value: Liability.Other Current Liability.GlobalTaxPayable + type: String + displayName: Global Tax Payable + required: false + - value: Liability.Other Current Liability.GlobalTaxSuspense + type: String + displayName: Global Tax Suspense + required: false + - value: Liability.Other Current Liability.OtherCurrentLiabilities + type: String + displayName: Other Current Liabilities + required: false + - value: Liability.Other Current Liability.PayrollClearing + type: String + displayName: Payroll Clearing + required: false + - value: Liability.Other Current Liability.PayrollTaxPayable + type: String + displayName: Payroll Tax Payable + required: false + - value: Liability.Other Current Liability.PrepaidExpensesPayable + type: String + displayName: Prepaid Expenses Payable + required: false + - value: Liability.Other Current Liability.RentsInTrustLiability + type: String + displayName: Rents In Trust Liability + required: false + - value: Liability.Other Current Liability.TrustAccountsLiabilities + type: String + displayName: Trust Accounts Liabilities + required: false + - value: Liability.Other Current Liability.FederalIncomeTaxPayable + type: String + displayName: Federal Income Tax Payable + required: false + - value: Liability.Other Current Liability.InsurancePayable + type: String + displayName: Insurance Payable + required: false + - value: Liability.Other Current Liability.SalesTaxPayable + type: String + displayName: Sales Tax Payable + required: false + - value: Liability.Other Current Liability.StateLocalIncomeTaxPayable + type: String + displayName: State Local Income Tax Payable + required: false + - value: Liability.Other Current Liability.AccruedLiabilities + type: String + displayName: Accrued Liabilities + required: false + - value: Liability.Other Current Liability.CurrentLiabilities + type: String + displayName: Current Liabilities + required: false + - value: Liability.Other Current Liability.CurrentPortionEmployeeBenefitsObligations + type: String + displayName: Current Portion EmployeeBenefits Obligations + required: false + - value: Liability.Other Current Liability.CurrentPortionOfObligationsUnderFinanceLeases + type: String + displayName: Current Portion Of Obligations Under Finance Leases + required: false + - value: Liability.Other Current Liability.CurrentTaxLiability + type: String + displayName: Current Tax Liability + required: false + - value: Liability.Other Current Liability.DividendsPayable + type: String + displayName: Dividends Payable + required: false + - value: Liability.Other Current Liability.DutiesAndTaxes + type: String + displayName: Duties And Taxes + required: false + - value: Liability.Other Current Liability.InterestPayables + type: String + displayName: Interest Payables + required: false + - value: Liability.Other Current Liability.ProvisionForWarrantyObligations + type: String + displayName: Provision For Warranty Obligations + required: false + - value: Liability.Other Current Liability.ProvisionsCurrentLiabilities + type: String + displayName: Provisions Current Liabilities + required: false + - value: Liability.Other Current Liability.ShortTermBorrowings + type: String + displayName: Short Term Borrowings + required: false + - value: Liability.Other Current Liability.SocialSecurityAgencies + type: String + displayName: Social Security Agencies + required: false + - value: Liability.Other Current Liability.StaffAndRelatedLiabilityAccounts + type: String + displayName: Staff And Related Liability Accounts + required: false + - value: Liability.Other Current Liability.SundryDebtorsAndCreditors + type: String + displayName: Sundry Debtors And Creditors + required: false + - value: Liability.Other Current Liability.TradeAndOtherPayables + type: String + displayName: Trade And Other Payables + required: false + - value: Equity.Equity.OpeningBalanceEquity + type: String + displayName: Opening Balance Equity + required: false + - value: Equity.Equity.PartnersEquity + type: String + displayName: Partners Equity + required: false + - value: Equity.Equity.RetainedEarnings + type: String + displayName: Retained Earnings + required: false + - value: Equity.Equity.AccumulatedAdjustment + type: String + displayName: Accumulated Adjustment + required: false + - value: Equity.Equity.OwnersEquity + type: String + displayName: Owners Equity + required: false + - value: Equity.Equity.PaidInCapitalOrSurplus + type: String + displayName: Paid In Capital Or Surplus + required: false + - value: Equity.Equity.PartnerContributions + type: String + displayName: Partner Contributions + required: false + - value: Equity.Equity.PartnerDistributions + type: String + displayName: Partner Distributions + required: false + - value: Equity.Equity.PreferredStock + type: String + displayName: Preferred Stock + required: false + - value: Equity.Equity.CommonStock + type: String + displayName: Common Stock + required: false + - value: Equity.Equity.TreasuryStock + type: String + displayName: Treasury Stock + required: false + - value: Equity.Equity.EstimatedTaxes + type: String + displayName: Estimated Taxes + required: false + - value: Equity.Equity.Healthcare + type: String + displayName: Healthcare + required: false + - value: Equity.Equity.PersonalIncome + type: String + displayName: Personal Income + required: false + - value: Equity.Equity.PersonalExpense + type: String + displayName: Personal Expense + required: false + - value: Equity.Equity.AccumulatedOtherComprehensiveIncome + type: String + displayName: Accumulated Other Comprehensive Income + required: false + - value: Equity.Equity.CalledUpShareCapital + type: String + displayName: Called Up Share Capital + required: false + - value: Equity.Equity.CapitalReserves + type: String + displayName: Capital Reserves + required: false + - value: Equity.Equity.DividendDisbursed + type: String + displayName: Dividend Disbursed + required: false + - value: Equity.Equity.EquityInEarningsOfSubsiduaries + type: String + displayName: Equity In Earnings Of Subsiduaries + required: false + - value: Equity.Equity.InvestmentGrants + type: String + displayName: Investment Grants + required: false + - value: Equity.Equity.MoneyReceivedAgainstShareWarrants + type: String + displayName: Money Received Against Share Warrants + required: false + - value: Equity.Equity.OtherFreeReserves + type: String + displayName: Other Free Reserves + required: false + - value: Equity.Equity.ShareApplicationMoneyPendingAllotment + type: String + displayName: Share Application Money Pending Allotment + required: false + - value: Equity.Equity.ShareCapital + type: String + displayName: Share Capital + required: false + - value: Equity.Equity.Funds + type: String + displayName: Funds + required: false + required: true + required: true + Sage Business Cloud Accounting: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: [] + information: + - field: Name + details: Should not be longer than 200 characters. + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: [] + information: + - field: NominalCode + details: Should be a number between 1 and 99999999. + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: SALES + type: String + displayName: Sales + required: false + - value: OTHER_INCOME + type: String + displayName: Other Income + required: false + - value: DIRECT_EXPENSES + type: String + displayName: Direct Expenses + required: false + - value: OVERHEADS + type: String + displayName: Overheads + required: false + - value: DEPRECIATION + type: String + displayName: Depreciation + required: false + - value: CURRENT_ASSETS + type: String + displayName: Current Assets + required: false + - value: FIXED_ASSETS + type: String + displayName: Fixed Assets + required: false + - value: FUTURE_ASSETS + type: String + displayName: Future Assets + required: false + - value: BANK + type: String + displayName: Bank + required: false + - value: CURRENT_LIABILITY + type: String + displayName: Current Liability + required: false + - value: FUTURE_LIABILITY + type: String + displayName: Future Liability + required: false + - value: EQUITY + type: String + displayName: Equity + required: false + - value: LINE_OF_CREDIT + type: String + displayName: Credit Card / Loan + required: false + required: true + required: true + Sage Intacct: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: + - field: NominalCode + details: Must be unique within the entity. + - field: NominalCode + details: 'Must be at most 24 characters in length, although restrictions may vary between entities.' + information: [] + name: + type: String + displayName: Name + description: Name of the account + required: true + status: + type: String + displayName: Account Status + description: The status of the account + options: + - value: Active + type: String + displayName: Active + required: false + - value: Archived + type: String + displayName: Archived + required: false + required: true + type: + type: String + displayName: Account Type + description: 'The type, or base category, of the account' + options: + - value: Asset + type: String + displayName: Asset + required: false + - value: Equity + type: String + displayName: Equity + required: false + - value: Expense + type: String + displayName: Expense + required: false + - value: Income + type: String + displayName: Income + required: false + - value: Liability + type: String + displayName: Liability + required: false + required: true + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + required: true + validation: + warnings: [] + information: + - field: FullyQualifiedCategory + details: 'Any category that is part of the hierarchy of one of: ''Assets'', ''Equity'', ''Liabilities'', ''Total Expenses'' and ''Total Income'' is permitted.' + required: true + Sandbox: value: - key: sk_integ_WM4dfoK1nKZnDE_kceze6hWDjbRwOZwG.us + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + name: + type: String + displayName: Name + description: Name of the account + required: true + description: + type: String + displayName: Description + description: Description of the account + required: true + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + required: true + fullyQualifiedName: + type: String + displayName: Fully Qualified Name + description: The full name of the account e.g. Liability.Current.VAT or Income.Revenue.Sales + required: true + currency: + type: String + displayName: Currency + description: The currency of the account + required: true + currentBalance: + type: Number + displayName: Current Balance + description: The current balance in the account + required: true + type: + type: String + displayName: Account Type + description: 'The type, or base category, of the account' + required: true + status: + type: String + displayName: Account Status + description: The status of the account + required: true + isBankAccount: + type: Boolean + displayName: Is Bank Account? + description: Confirms whether the nominal account represents a bank account or not + required: true + validDatatypeLinks: + type: Array + displayName: Valid Datatype Links + description: Describes which fields on other data types are valid links to this account in the originating system + properties: + property: + type: String + displayName: Property + description: The field on the source data type that other data types can link to + required: true + links: + type: Array + displayName: Links + description: 'A collection of absolute names of fields from other data types, e.g. Invoice.LineItems.AccountRef.Id' + required: true + required: true + metadata: + type: Object + displayName: Metadata + description: Miscellaneous data about the item + properties: + isDeleted: + type: Boolean + displayName: IsDeleted + description: A boolean to indicate whether the object has been deleted + required: true + required: true + required: true + Xero: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: Identifier for the nominal account. + required: true + validation: + warnings: + - field: NominalCode + details: Max length of 10 characters. + information: [] + name: + type: String + displayName: Name + description: Name of account as it appears in the chart of accounts or general ledger. + required: true + validation: + warnings: [] + information: + - field: Name + details: Payments are enabled to this account if the name ends in .PaymentsEnabled. + description: + type: String + displayName: Description + description: Description for the nominal account. + required: false + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: Account type and category for nominal account. + options: + - value: Asset.Current + type: String + displayName: Current Asset + required: false + - value: Asset.Fixed + type: String + displayName: Fixed Asset + required: false + - value: Asset.Inventory + type: String + displayName: Inventory + required: false + - value: Asset.NonCurrent + type: String + displayName: Non-current Asset + required: false + - value: Asset.Prepayment + type: String + displayName: Prepayment + required: false + - value: Expense.DirectCosts + type: String + displayName: Direct Costs + required: false + - value: Expense.Expense + type: String + displayName: Expense + required: false + - value: Expense.Overhead + type: String + displayName: Overhead + required: false + - value: Expense.Superannuation + type: String + displayName: Superannuation + required: false + - value: Expense.Wages + type: String + displayName: Wages + required: false + - value: Income.Sales + type: String + displayName: Sales + required: false + - value: Income.Revenue + type: String + displayName: Revenue + required: false + - value: Income.Other + type: String + displayName: Other Income + required: false + - value: Liability.Current + type: String + displayName: Current Liability + required: false + - value: Liability.Depreciation + type: String + displayName: Depreciation + required: false + - value: Liability.Liability + type: String + displayName: Liability + required: false + - value: Liability.NonCurrent + type: String + displayName: Non Current Liability + required: false + - value: Liability.PayAsYouGo + type: String + displayName: Pay As You Go Liability + required: false + - value: Liability.Superannuation + type: String + displayName: Superannuation Liability + required: false + - value: Liability.WagesPayable + type: String + displayName: Wages Payable Liability + required: false + - value: Equity.Equity + type: String + displayName: Equity + required: false + required: true + required: true '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - /integrations: - get: - summary: List integrations - description: List your available integrations + operationId: get-create-chartOfAccounts-model + description: |- + The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) for a given company and integration. + + [Accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) are the categories a business uses to record accounting transactions. + + **Integration-specific behavior** + + See the *response examples* for integration-specific indicative models. + '/companies/{companyId}/connections/{connectionId}/push/bankAccounts': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + post: tags: - - Integrations - operationId: list-integrations + - Bank accounts + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BankAccount' + examples: + QuickBooks Online: + value: + accountName: GBP Bank Account + accountType: Debit + accountNumber: '12345678' + currency: GBP + status: Active + Xero: + value: + accountName: Xero GBP Bank Account + accountType: Debit + sortCode: '445566' + accountNumber: '12345678' + currency: GBP + status: Active responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/Integrations' + $ref: '#/components/schemas/CreateBankAccountResponse' + examples: {} '400': - $ref: '#/components/responses/Malformed-Query' + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - parameters: - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/query' - - $ref: '#/components/parameters/orderBy' - '/integrations/{platformKey}': + summary: Create bank account + description: "The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) for a given company's connection.\r\n\r\n[Bank accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.\r\n\r\n**Integration-specific behavior**\r\n\r\nRequired data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-bankAccounts-model)." + operationId: create-bank-account + '/companies/{companyId}/connections/{connectionId}/options/bankAccounts': parameters: - - $ref: '#/components/parameters/platformKey' + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' get: - summary: Get integration + summary: Get create bank account model tags: - - Integrations - operationId: get-integration - description: 'Get single integration, by platformKey' + - Bank accounts responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Integration' + $ref: '#/components/schemas/PushOption' + examples: + Dynamics 365 Business Central: + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + validation: + warnings: [] + information: + - field: AccountName + details: 'Needs to be of the format ''{No.}-{Name}''' + currency: + type: String + displayName: Currency + description: The currency of the bank account + required: true + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: false + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + validation: + warnings: [] + information: + - field: NominalCode + details: Bank Account Posting Group with Nominal Account must exist + sortCode: + type: String + displayName: Sort Code + description: The sort code for the bank account + required: false + validation: + warnings: [] + information: + - field: SortCode + details: Must have a length between 0 and 20 characters + iBan: + type: String + displayName: IBAN + description: The international bank account number of the account. Often used when making or receiving international payments + required: false + overdraftLimit: + type: Number + displayName: Overdraft Limit + description: The pre-arranged overdraft limit of the account + required: false + validation: + warnings: [] + information: + - field: OverdraftLimit + details: Default value is 0 + required: true + Exact (Netherlands): + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: true + validation: + warnings: + - field: AccountNumber + details: Should not exceed the maximum length of 14 characters if the specified currency is GBP. + information: [] + sortCode: + type: String + displayName: Sort Code + description: The sort code for the bank account + required: false + validation: + warnings: + - field: SortCode + details: Must be 6 characters long if the specified currency is GBP. + - field: SortCode + details: Must be provided if the specified currency is GBP. + information: [] + currency: + type: String + displayName: Currency + description: The currency of the bank account + required: false + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + required: true + Exact (UK): + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: true + validation: + warnings: + - field: AccountNumber + details: Should not exceed the maximum length of 14 characters if the specified currency is GBP. + information: [] + sortCode: + type: String + displayName: Sort Code + description: The sort code for the bank account + required: false + validation: + warnings: + - field: SortCode + details: Must be 6 characters long if the specified currency is GBP. + - field: SortCode + details: Must be provided if the specified currency is GBP. + information: [] + currency: + type: String + displayName: Currency + description: The currency of the bank account + required: false + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + required: true + FreeAgent: + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + sortCode: + type: String + displayName: Sort Code + description: The sort code for the bank account + required: false + validation: + warnings: + - field: SortCode + details: Must have a length between 0 and 8 characters + information: [] + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: false + iBan: + type: String + displayName: IBAN + description: The international bank account number of the account. Often used when making or receiving international payments + required: false + currency: + type: String + displayName: Currency + description: The currency of the bank account + options: + - value: AED + type: String + displayName: AED + required: false + - value: AMD + type: String + displayName: AMD + required: false + - value: AOA + type: String + displayName: AOA + required: false + - value: ARS + type: String + displayName: ARS + required: false + - value: AUD + type: String + displayName: AUD + required: false + - value: AWG + type: String + displayName: AWG + required: false + - value: AZN + type: String + displayName: AZN + required: false + - value: BBD + type: String + displayName: BBD + required: false + - value: BDT + type: String + displayName: BDT + required: false + - value: BGN + type: String + displayName: BGN + required: false + - value: BRL + type: String + displayName: BRL + required: false + - value: BWP + type: String + displayName: BWP + required: false + - value: CAD + type: String + displayName: CAD + required: false + - value: CHF + type: String + displayName: CHF + required: false + - value: CLP + type: String + displayName: CLP + required: false + - value: CNY + type: String + displayName: CNY + required: false + - value: COP + type: String + displayName: COP + required: false + - value: CRC + type: String + displayName: CRC + required: false + - value: CUC + type: String + displayName: CUC + required: false + - value: CUP + type: String + displayName: CUP + required: false + - value: CZK + type: String + displayName: CZK + required: false + - value: DKK + type: String + displayName: DKK + required: false + - value: DOP + type: String + displayName: DOP + required: false + - value: EGP + type: String + displayName: EGP + required: false + - value: EUR + type: String + displayName: EUR + required: false + - value: FJD + type: String + displayName: FJD + required: false + - value: GBP + type: String + displayName: GBP + required: false + - value: GEL + type: String + displayName: GEL + required: false + - value: GHS + type: String + displayName: GHS + required: false + - value: GTQ + type: String + displayName: GTQ + required: false + - value: GYD + type: String + displayName: GYD + required: false + - value: HKD + type: String + displayName: HKD + required: false + - value: HNL + type: String + displayName: HNL + required: false + - value: HRK + type: String + displayName: HRK + required: false + - value: HUF + type: String + displayName: HUF + required: false + - value: IDR + type: String + displayName: IDR + required: false + - value: ILS + type: String + displayName: ILS + required: false + - value: INR + type: String + displayName: INR + required: false + - value: ISK + type: String + displayName: ISK + required: false + - value: JMD + type: String + displayName: JMD + required: false + - value: JPY + type: String + displayName: JPY + required: false + - value: KES + type: String + displayName: KES + required: false + - value: KRW + type: String + displayName: KRW + required: false + - value: KWD + type: String + displayName: KWD + required: false + - value: KYD + type: String + displayName: KYD + required: false + - value: KZT + type: String + displayName: KZT + required: false + - value: LAK + type: String + displayName: LAK + required: false + - value: LBP + type: String + displayName: LBP + required: false + - value: LKR + type: String + displayName: LKR + required: false + - value: LTL + type: String + displayName: LTL + required: false + - value: LVL + type: String + displayName: LVL + required: false + - value: MAD + type: String + displayName: MAD + required: false + - value: MDL + type: String + displayName: MDL + required: false + - value: MGA + type: String + displayName: MGA + required: false + - value: MUR + type: String + displayName: MUR + required: false + - value: MVR + type: String + displayName: MVR + required: false + - value: MWK + type: String + displayName: MWK + required: false + - value: MXN + type: String + displayName: MXN + required: false + - value: MYR + type: String + displayName: MYR + required: false + - value: MZN + type: String + displayName: MZN + required: false + - value: NAD + type: String + displayName: NAD + required: false + - value: NGN + type: String + displayName: NGN + required: false + - value: NOK + type: String + displayName: NOK + required: false + - value: NPR + type: String + displayName: NPR + required: false + - value: NZD + type: String + displayName: NZD + required: false + - value: OMR + type: String + displayName: OMR + required: false + - value: PEN + type: String + displayName: PEN + required: false + - value: PHP + type: String + displayName: PHP + required: false + - value: PKR + type: String + displayName: PKR + required: false + - value: PLN + type: String + displayName: PLN + required: false + - value: QAR + type: String + displayName: QAR + required: false + - value: RON + type: String + displayName: RON + required: false + - value: RSD + type: String + displayName: RSD + required: false + - value: RUB + type: String + displayName: RUB + required: false + - value: RWF + type: String + displayName: RWF + required: false + - value: SAR + type: String + displayName: SAR + required: false + - value: SCR + type: String + displayName: SCR + required: false + - value: SEK + type: String + displayName: SEK + required: false + - value: SGD + type: String + displayName: SGD + required: false + - value: THB + type: String + displayName: THB + required: false + - value: TND + type: String + displayName: TND + required: false + - value: TRY + type: String + displayName: TRY + required: false + - value: TTD + type: String + displayName: TTD + required: false + - value: TWD + type: String + displayName: TWD + required: false + - value: TZS + type: String + displayName: TZS + required: false + - value: UAH + type: String + displayName: UAH + required: false + - value: UGX + type: String + displayName: UGX + required: false + - value: USD + type: String + displayName: USD + required: false + - value: UYU + type: String + displayName: UYU + required: false + - value: VEF + type: String + displayName: VEF + required: false + - value: VND + type: String + displayName: VND + required: false + - value: VUV + type: String + displayName: VUV + required: false + - value: XAF + type: String + displayName: XAF + required: false + - value: XCD + type: String + displayName: XCD + required: false + - value: XOF + type: String + displayName: XOF + required: false + - value: ZAR + type: String + displayName: ZAR + required: false + - value: ZMK + type: String + displayName: ZMK + required: false + required: true + balance: + type: Number + displayName: Balance + description: The balance of the bank account + required: false + validation: + warnings: [] + information: + - field: Balance + details: 'The opening balance, in the account currency' + institution: + type: String + displayName: Institution + description: The institution of the bank account + required: false + required: true + KashFlow: + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Account Name + description: Name of the bank account as it appears in Kashflow. + required: true + balance: + type: Number + displayName: Balance + description: 'The opening balance, in the account currency.' + required: false + currency: + type: String + displayName: Currency + description: The currency of the bank account. + required: true + required: true + QuickBooks Desktop: + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: + - field: NominalCode + details: Max length of 7 characters. + information: [] + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + validation: + warnings: + - field: AccountName + details: Max length of 31 characters. + information: [] + currency: + type: String + displayName: Currency + description: The currency of the bank account + required: false + validation: + warnings: + - field: Currency + details: 'The currency must match the base currency of the QuickBooks Desktop company unless the FullyQualifiedCategory is ''Asset.AccountsReceivable'',''Liability.AccountsPayable'' or ''Liability.CreditCard''' + - field: Currency + details: Must be a three letter ISO code that matches an existing active currency in the QuickBooks Desktop company + - field: Currency + details: Can only be set if the QuickBooks Desktop company has Multicurrency enabled. + information: + - field: Currency + details: 'If not set, will default to the base currency of the QuickBooks Desktop company' + balance: + type: Number + displayName: Balance + description: The balance of the bank account + required: false + required: true + QuickBooks Online Sandbox: + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Account Name + description: Name of account as it appears in the chart of accounts or general ledger. + required: true + accountNumber: + type: String + displayName: Account Number + description: User-defined account number to help the user in identifying the account within the chart-of-accounts and in deciding what should be posted to the account. + required: true + currency: + type: String + displayName: Currency + description: Currency of the bank account. + required: true + required: true + Sage Business Cloud Accounting: + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + validation: + warnings: [] + information: + - field: AccountName + details: Must be provided. + - field: AccountName + details: Should not be longer than 50 characters. + currency: + type: String + displayName: Currency + description: The currency of the bank account + required: true + validation: + warnings: [] + information: + - field: Currency + details: Must be provided. + - field: Currency + details: Must match the company's base currency. + sortCode: + type: String + displayName: Sort Code + description: The sort code for the bank account + required: false + validation: + warnings: [] + information: + - field: SortCode + details: Should be a 6 digit number. + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: false + validation: + warnings: [] + information: + - field: AccountNumber + details: Should not be longer than 25 characters. + iBan: + type: String + displayName: IBAN + description: The international bank account number of the account. Often used when making or receiving international payments + required: false + validation: + warnings: [] + information: + - field: IBan + details: Should be in the international bank account number format. + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + validation: + warnings: [] + information: + - field: NominalCode + details: Should be a number between 1 and 99999999. + required: true + Sandbox: + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + accountType: + type: String + displayName: Account Type + description: The type of account + required: true + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + sortCode: + type: String + displayName: Sort Code + description: The sort code for the bank account + required: true + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: true + iBan: + type: String + displayName: IBAN + description: The international bank account number of the account. Often used when making or receiving international payments + required: true + currency: + type: String + displayName: Currency + description: The currency of the bank account + required: true + balance: + type: Number + displayName: Balance + description: The balance of the bank account + required: true + availableBalance: + type: Number + displayName: Available Balance + description: The available balance of the bank account + required: true + overdraftLimit: + type: Number + displayName: Overdraft Limit + description: The pre-arranged overdraft limit of the account + required: true + institution: + type: String + displayName: Institution + description: The institution of the bank account + required: true + metadata: + type: Object + displayName: Metadata + description: Miscellaneous data about the item + properties: + isDeleted: + type: Boolean + displayName: IsDeleted + description: A boolean to indicate whether the object has been deleted + required: true + required: true + required: true '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1976,23 +6779,1251 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/integrations/{platformKey}/branding': + operationId: get-create-bankAccounts-model + description: "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/sync-for-expenses-api#/schemas/BankAccount) for a given company and integration.\r\n\r\n[Bank accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.\r\n\r\n**Integration-specific behavior**\r\n\r\nSee the *response examples* for integration-specific indicative models.\r\n" + '/companies/{companyId}/data/customers': parameters: - - $ref: '#/components/parameters/platformKey' + - $ref: '#/components/parameters/companyId' get: - summary: Get branding tags: - - Integrations - operationId: get-integrations-branding - x-speakeasy-name-override: get-branding - description: Get branding for platform. + - Customers + summary: List customers + parameters: + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/query' + - $ref: '#/components/parameters/orderBy' responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/Branding' + $ref: '#/components/schemas/Customers' + examples: + Clear Books: + value: + results: + - id: c8180244-74ac-40cf-a5df-6d83661c44d7 + customerName: Arjun Kuvalis + contactName: Werner Langworth + emailAddress: Arjun34@hotmail.com + defaultCurrency: GBP + phone: 014605 64820 + addresses: + - type: Delivery + line1: Suite 214 + line2: 8439 Lueilwitz Passage + city: Fernandohaven + region: Northern Ireland + country: United Kingdom + postalCode: JG04 7PV + - type: Delivery + line1: Suite 096 + line2: 864 Halie Course + city: Juliochester + region: England + country: United Kingdom + postalCode: DZ8 4BF + - type: Delivery + line1: Suite 001 + line2: 416 Stokes Fords + city: Naderborough + region: Wales + country: United Kingdom + postalCode: XG25 0XX + contacts: + - name: Werner Langworth + email: Werner_Langworth@hotmail.com + phone: [] + address: + type: Delivery + line1: Apt. 145 + line2: 317 Williamson Freeway + city: Hortenseville + region: Scotland + country: United Kingdom + postalCode: CV4 2HR + status: Active + - name: Belle Glover + email: Belle51@yahoo.com + phone: [] + address: + type: Delivery + line1: Suite 075 + line2: 9921 Dickens Walk + city: South Ali + region: Scotland + country: United Kingdom + postalCode: TI04 4OO + status: Active + registrationNumber: NI7JEJVM + taxNumber: '7505220209.583549' + status: Active + modifiedDate: '2023-04-26T12:38:16Z' + sourceModifiedDate: '2022-07-03T01:27:00' + metadata: + isDeleted: false + - id: 6d162ee4-47b4-46c6-a2e6-aa9edd0fe6b0 + customerName: 'Breitenberg, Emard and Schiller' + contactName: Miguel Hahn + emailAddress: contact@BreitenbergEmardandSchiller.biz + defaultCurrency: GBP + phone: 0800 445 6957 + addresses: + - type: Billing + line1: Apt. 184 + line2: 60578 Louie Springs + city: East Khalid + region: Wales + country: United Kingdom + postalCode: XW89 7NT + contacts: + - name: Miguel Hahn + email: Miguel.Hahn@gmail.com + phone: + - number: 018555 09614 + type: Landline + address: + type: Delivery + line1: Suite 400 + line2: 21930 Milan Lane + city: Reingerton + region: Wales + country: United Kingdom + postalCode: QG10 2DL + status: Active + registrationNumber: KME0AMIL + taxNumber: '8560920952.553111' + status: Archived + modifiedDate: '2023-04-26T12:38:16Z' + sourceModifiedDate: '2022-12-03T11:05:01' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 20 + _links: + current: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/customers?page=1&pageSize=2 + self: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/customers + next: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/customers?page=2&pageSize=2 + Dynamics 365 Business Central: + value: + results: + - id: 0e2f7751-7696-ed11-bff5-6045bd0d2ad6 + customerName: '' + contactName: '' + emailAddress: '' + defaultCurrency: GBP + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: '' + postalCode: '' + contacts: + - name: '' + email: '' + phone: [] + address: + type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: '' + postalCode: '' + status: Active + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:25Z' + sourceModifiedDate: '2023-01-17T14:50:54Z' + metadata: + isDeleted: false + - id: 0ef95175-48c4-eb11-9f0a-0022481b4343 + customerName: '' + contactName: '' + emailAddress: '' + defaultCurrency: GBP + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + contacts: + - name: '' + email: '' + phone: [] + address: + type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + status: Active + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:25Z' + sourceModifiedDate: '2021-06-03T08:48:36Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 42 + _links: + current: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/customers?page=1&pageSize=2 + self: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/customers + next: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/customers?page=2&pageSize=2 + Exact (Netherlands): + value: + results: + - id: 555f8251-c65a-433a-a813-5dbe04321d1e + customerName: Ab Netherlands + defaultCurrency: EUR + addresses: + - type: Billing + country: NL + contacts: [] + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2021-06-14T15:26:37Z' + - id: 9fd1f78e-67aa-4af7-8a10-df1fc5fb5841 + customerName: anna test 2 + defaultCurrency: EUR + addresses: + - type: Billing + country: NL + contacts: [] + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2022-05-24T11:53:21Z' + pageNumber: 1 + pageSize: 2 + totalResults: 71 + _links: + current: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/customers?page=1&pageSize=2 + self: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/customers + next: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/customers?page=2&pageSize=2 + Exact (UK): + value: + results: + - id: 5f20075a-a28e-434d-81a6-2db0dc170e87 + customerName: Abdi 99 + emailAddress: email@codat.io + defaultCurrency: GBP + addresses: + - type: Billing + line1: Ink Rooms + city: London + country: GB + postalCode: WC1X 0BE + contacts: [] + registrationNumber: '123456789' + taxNumber: GB339 0727 47 + status: Active + modifiedDate: '2022-10-26T13:33:08Z' + sourceModifiedDate: '2020-02-26T11:23:50Z' + - id: 1d9dc1a7-92d6-441b-93fd-42c9fb321b1c + customerName: Abdulbasit Al-haj + contactName: abeee + emailAddress: a.alhaj@codat.io + defaultCurrency: GBP + addresses: + - type: Billing + country: GB + contacts: + - name: abeee + phone: [] + address: + type: Unknown + line1: '' + country: 'GB ' + status: Active + modifiedDate: '2020-02-24T12:00:51.027Z' + status: Active + modifiedDate: '2022-10-26T13:33:08Z' + sourceModifiedDate: '2020-02-24T12:00:50Z' + pageNumber: 1 + pageSize: 2 + totalResults: 53 + _links: + current: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/customers?page=1&pageSize=2 + self: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/customers + next: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/customers?page=2&pageSize=2 + FreeAgent: + value: + results: + - id: '11526230' + customerName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + contacts: + - name: Test 1 + phone: [] + address: + type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Unknown + status: Active + modifiedDate: '2023-04-25T14:19:12Z' + sourceModifiedDate: '2023-04-17T06:02:46Z' + metadata: + isDeleted: false + - id: '9677150' + customerName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + contacts: + - name: Test 1 + phone: [] + address: + type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Unknown + status: Active + modifiedDate: '2023-04-25T14:19:12Z' + sourceModifiedDate: '2023-04-24T06:19:23Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 159 + _links: + current: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/customers?page=1&pageSize=2 + self: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/customers + next: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/customers?page=2&pageSize=2 + FreshBooks: + value: + results: + - id: '634509' + customerName: A test customer 14 (updated) + contactName: test person name + emailAddress: test14@example.com + defaultCurrency: GBP + phone: 01876 541245 + addresses: + - type: Billing + line1: Line 1 + line2: Line 2 + city: Some city + region: A region + country: Country 1 + postalCode: SW1 2JQ + contacts: + - name: test person1 + email: test14A@example.com + phone: + - number: '24681012' + type: Primary + - number: '121086420' + type: Unknown + status: Active + - name: test person2 + email: test14B@example.com + phone: + - number: 1234 56789 + type: Primary + - number: 9876 54321 + type: Unknown + status: Active + - name: test person name + email: test14@example.com + phone: + - number: 01876 541245 + type: Unknown + status: Active + status: Active + modifiedDate: '2023-03-24T16:07:23Z' + sourceModifiedDate: '2022-05-18T09:23:56' + metadata: + isDeleted: false + - id: '634486' + customerName: A test customer name 2 + contactName: test person name + emailAddress: test8@example.com + defaultCurrency: GBP + phone: 01876 541245 + addresses: + - type: Billing + line1: Line 1 + line2: Line 2 + city: Some city + region: A region + country: Country 1 + postalCode: SW1 2JQ + contacts: + - name: test person1 + email: test9@example.com + phone: + - number: '24681012' + type: Primary + - number: '121086420' + type: Unknown + status: Active + - name: test person2 + email: test10@example.com + phone: + - number: '123456789' + type: Primary + - number: '987654321' + type: Unknown + status: Active + - name: test person name + email: test8@example.com + phone: + - number: 01876 541245 + type: Unknown + status: Active + status: Active + modifiedDate: '2023-03-24T16:07:23Z' + sourceModifiedDate: '2022-05-11T11:39:58' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 39 + _links: + current: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/customers?page=1&pageSize=2 + self: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/customers + next: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/customers?page=2&pageSize=2 + KashFlow: + value: + results: + - id: '92227673' + customerName: Chekko Customer Test 01 + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + contacts: + - name: '' + email: '' + phone: [] + status: Active + taxNumber: '' + status: Active + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '0001-01-01T00:00:00' + - id: '88459410' + customerName: Diogo Sousa + contactName: Mr Diogo Sousa + emailAddress: diogomail@mail.com + phone: '123123123' + addresses: + - type: Billing + line1: Billing Address + line2: Billing line 2 Billing line 3 + city: Billing line 4 + country: United Kingdom + postalCode: '123321' + - type: Delivery + line1: Delivery Address + line2: Delivery line2 Delivery line3 + city: Delivery line4 + country: United Kingdom + postalCode: '123321' + contacts: + - name: Mr Diogo Sousa + email: diogomail@mail.com + phone: + - number: '123123123' + type: Landline + - number: '321321321' + type: Mobile + address: + type: Billing + line1: Billing Address + line2: Billing line 2 Billing line 3 + city: Billing line 4 + country: United Kingdom + postalCode: '123321' + status: Active + - name: Mr Diogo Sousa + phone: [] + address: + type: Delivery + line1: Delivery Address + line2: Delivery line2 Delivery line3 + city: Delivery line4 + country: United Kingdom + postalCode: '123321' + status: Active + taxNumber: '' + status: Active + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '2021-05-04T13:22:19' + pageNumber: 1 + pageSize: 2 + totalResults: 10 + _links: + current: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/customers?page=1&pageSize=2 + self: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/customers + next: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/customers?page=2&pageSize=2 + Oracle NetSuite: + value: + results: + - id: '773' + customerName: 119 Test Customer + contactName: Mr Test Customer + defaultCurrency: GBP + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-01-30T14:48:02Z' + sourceModifiedDate: '2022-01-11T12:28:49' + - id: '172722' + customerName: 1248 European Company + contactName: European Company + defaultCurrency: GBP + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-01-30T14:48:02Z' + sourceModifiedDate: '2022-07-27T14:29:16' + pageNumber: 1 + pageSize: 2 + totalResults: 4 + _links: + current: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/customers?page=1&pageSize=2 + self: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/customers + next: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/customers?page=2&pageSize=2 + QuickBooks Desktop: + value: + results: + - id: 150000-933272658 + customerName: 'Abercrombie, Kristy' + contactName: Kristy Abercrombie + emailAddress: kristy@samplename.com + defaultCurrency: GBP + phone: 415-555-6579 + addresses: + - type: Delivery + line1: Kristy Abercrombie + line2: 5647 Cypress Hill Rd + city: Bayshore + region: CA + postalCode: '94326' + - type: Billing + line1: Kristy Abercrombie + line2: 5647 Cypress Hill Rd + city: Bayshore + region: CA + postalCode: '94326' + contacts: + - name: 'Abercrombie, Kristy' + email: kristy@samplename.com + phone: + - number: 415-555-6579 + type: Primary + status: Active + - name: Kristy Abercrombie + phone: [] + status: Active + - name: Steve Darcangelo + phone: [] + status: Active + status: Active + modifiedDate: '2023-04-26T09:07:55Z' + sourceModifiedDate: '2023-12-16T05:06:42' + metadata: + isDeleted: false + - id: 800000D0-1182061376 + customerName: 'Allard, Robert' + contactName: Amanda Roberts + emailAddress: rallard@myemail.com + defaultCurrency: GBP + phone: 650-555-3422 + addresses: + - type: Delivery + line1: Robert Allard + line2: 92834 Chandler St. + city: Millbrae + region: CA + postalCode: '94030' + - type: Billing + line1: Robert Allard + line2: 92834 Chandler St. + city: Millbrae + region: CA + postalCode: '94030' + contacts: + - name: 'Allard, Robert' + email: rallard@myemail.com + phone: + - number: 650-555-3422 + type: Primary + - number: 650-555-9804 + type: Fax + - number: 650-555-8349 + type: Unknown + status: Active + - name: Robert Allard + phone: [] + status: Active + - name: Rachel Fisher + phone: [] + status: Active + status: Active + modifiedDate: '2023-04-26T09:07:55Z' + sourceModifiedDate: '2023-12-16T05:06:42' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 64 + _links: + current: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/customers?page=1&pageSize=2 + self: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/customers + next: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/customers?page=2&pageSize=2 + QuickBooks Online: + value: + results: + - id: '9' + customerName: Abe + contactName: Abraham's Company + emailAddress: ab@email.com + defaultCurrency: GBP + addresses: [] + contacts: + - name: Abe + email: ab@email.com + phone: + - number: '01111111111' + type: Mobile + status: Active + registrationNumber: XXXX9900001 + taxNumber: XXXX9900001 + status: Active + modifiedDate: '2023-01-18T11:02:35Z' + sourceModifiedDate: '2022-12-08T15:42:59Z' + - id: '49' + customerName: adeel qbo child test + contactName: Adeel test + emailAddress: adeel@adeel.com + defaultCurrency: GBP + phone: '123456789' + addresses: + - type: Billing + line1: 4 Privet Drive + city: London + country: United Kingdom + postalCode: WD25 7LR + - type: Delivery + line1: 4 Privet Drive + city: London + country: United Kingdom + postalCode: WD25 7LR + contacts: + - name: Adeel test + email: adeel@adeel.com + phone: + - number: '123456789' + type: Primary + - number: '07546543216' + type: Mobile + address: + type: Billing + line1: 4 Privet Drive + city: London + country: United Kingdom + postalCode: WD25 7LR + status: Active + status: Active + modifiedDate: '2023-01-18T11:02:35Z' + sourceModifiedDate: '2022-08-22T09:21:09Z' + pageNumber: 1 + pageSize: 2 + totalResults: 40 + _links: + current: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/customers?page=1&pageSize=2 + self: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/customers + next: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/customers?page=2&pageSize=2 + QuickBooks Online Sandbox: + value: + results: + - id: '66' + customerName: Abercrombie International Group + contactName: Kristy Abercrombie + defaultCurrency: GBP + addresses: + - type: Billing + line1: 123 Main St + city: 'New York, NY' + contacts: + - name: Abercrombie International Group (deleted) + phone: [] + address: + type: Billing + line1: 123 Main St + city: 'New York, NY' + status: Archived + status: Archived + modifiedDate: '2023-04-26T09:35:56Z' + sourceModifiedDate: '2016-09-12T18:53:19Z' + metadata: + isDeleted: false + - id: '67' + customerName: Abercrombie International Group + contactName: Natalie Watts + emailAddress: n.watts@google.com + defaultCurrency: USD + addresses: + - type: Billing + - type: Delivery + contacts: + - name: Abercrombie International Group + email: n.watts@google.com + phone: [] + address: + type: Billing + status: Active + registrationNumber: XXXXVat123456 + taxNumber: XXXXVat123456 + status: Active + modifiedDate: '2023-04-26T09:35:56Z' + sourceModifiedDate: '2023-03-29T01:12:55Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 243 + _links: + current: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/customers?page=1&pageSize=2 + self: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/customers + next: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/customers?page=2&pageSize=2 + Sage 200cloud: + value: + results: + - id: A1D001 + customerName: A1 Design Services + contactName: Lee Dalkin + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Delivery + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: '' + postalCode: BP12 7HT + - type: Delivery + line1: 23a Union Street + line2: '' + city: Manchester + region: '' + country: '' + postalCode: M2 6JK + - type: Billing + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: Great Britain + postalCode: BP12 7HT + contacts: + - name: Lee Dalkin + email: newbusinessadvice@sage.com + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Landline + - number: 01742 876 236 + type: Fax + status: Active + - name: Malcolm Leverret + email: '' + phone: [] + status: Active + - name: Jim Thomas + email: Jim@a1designservices.co.uk + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Fax + status: Active + - name: Jullian Plawsworth + email: Jullian@a1designservices.co.uk + phone: + - number: 0151 349 3939 + type: Landline + - number: 0151 349 3940 + type: Fax + status: Active + registrationNumber: '' + taxNumber: GB238 3839 38 + status: Active + modifiedDate: '2022-10-14T09:35:53Z' + sourceModifiedDate: '2022-04-27T15:17:36Z' + - id: A1D002 + customerName: A2 Design Services + contactName: Lee Dalkin + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Billing + line1: 77a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: Great Britain + postalCode: BP12 7HT + contacts: + - name: Lee Dalkin + email: newbusinessadvice@sage.com + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Landline + - number: 01742 876 236 + type: Fax + status: Active + - name: Malcolm Leverret + email: '' + phone: [] + status: Active + - name: Jim Thomas + email: Jim@a1designservices.co.uk + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Fax + status: Active + - name: Jullian Plawsworth + email: Jullian@a1designservices.co.uk + phone: + - number: 0151 349 3939 + type: Landline + - number: 0151 349 3940 + type: Fax + status: Active + registrationNumber: '' + taxNumber: GB238 3839 40 + status: Active + modifiedDate: '2022-10-14T09:35:53Z' + sourceModifiedDate: '2020-09-23T10:28:58Z' + pageNumber: 1 + pageSize: 2 + totalResults: 43 + _links: + current: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/customers?page=1&pageSize=2 + self: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/customers + next: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/customers?page=2&pageSize=2 + Sage 50 (UK): + value: + results: + - id: A1D001 + customerName: A1 Design Services + contactName: Ian Cairns + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Delivery + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: GB + postalCode: BP12 7HT + - type: Delivery + line1: 23a Union Street + line2: '' + city: Manchester + region: '' + country: GB + postalCode: M2 6JK + - type: Unknown + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: GB + postalCode: BP12 7HT + contacts: [] + taxNumber: GB238 3839 38 + status: Active + modifiedDate: '2023-03-30T14:42:41Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + metadata: + isDeleted: false + - id: ABS001 + customerName: ABS Garages Ltd + contactName: Mike Hall + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 0191 254 5909 + addresses: + - type: Delivery + line1: Swanson Industries + line2: Dukes Industrial Estate + city: Whitley Bay + region: North Tyneside + country: GB + postalCode: NE56 4ER + - type: Delivery + line1: Unit 34 + line2: Holystone Ind Estate + city: Hebburn + region: Tyne & Wear + country: GB + postalCode: NE31 1VB + - type: Unknown + line1: Unit 34 + line2: Holystone Ind Estate + city: Hebburn + region: Tyne & Wear + country: GB + postalCode: NE31 1VB + contacts: [] + taxNumber: GB745 4584 68 + status: Active + modifiedDate: '2023-03-30T14:42:41Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 30 + _links: + current: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/customers?page=1&pageSize=2 + self: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/customers + next: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/customers?page=2&pageSize=2 + Sage Business Cloud Accounting: + value: + results: + - id: 260f6a3f94a243738f2d5e08496a41a8 + customerName: 100 test name + contactName: Main Contact + emailAddress: email@codat.io + defaultCurrency: GBP + phone: contact phone number + addresses: + - type: Billing + line1: Aruba Address line 1 + line2: Aruba Address line 2 + city: Aruba City + region: Aruba Province + country: Aruba (AW) + postalCode: Aruba Post + contacts: + - phone: + - number: contact mobile number + type: Mobile + - number: contact fax number + type: Fax + status: Unknown + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2021-05-10T16:31:51Z' + - id: 44a5d9461d9e4f6d90a5ace251c5cf35 + customerName: 100 test name DS + contactName: Main Contact + emailAddress: DCemail@codat.io + defaultCurrency: GBP + phone: contact phone number + addresses: + - type: Billing + line1: POST - Aruba Address line 1 + line2: POST - Aruba Address line 2 + city: POST - Aruba City + region: Aruba Province + country: Aruba (AW) + postalCode: Aruba Post + contacts: [] + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2021-06-10T14:22:46Z' + pageNumber: 1 + pageSize: 2 + totalResults: 168 + _links: + current: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/customers?page=1&pageSize=2 + self: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/customers + next: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/customers?page=2&pageSize=2 + Sage Intacct: + value: + results: + - id: '188' + customerName: 33Across + contactName: Yuna Conn + defaultCurrency: USD + phone: 520-393-4468 + addresses: + - type: Unknown + line1: 155 Westend Point + line2: '' + city: Albuquerque + region: NM + country: United States + postalCode: '87140' + contacts: + - name: 'Conn, Yuna' + phone: + - number: 520-393-4468 + type: Primary + address: + type: Unknown + line1: 155 Westend Point + line2: '' + city: Albuquerque + region: NM + country: United States + postalCode: '87140' + status: Unknown + taxNumber: '' + status: Active + modifiedDate: '2023-04-04T16:32:21Z' + sourceModifiedDate: '2022-09-06T12:58:27' + metadata: + isDeleted: false + - id: '324' + customerName: 3Way International Logistics + contactName: Lauri O'Heagertie + defaultCurrency: CAD + phone: 410-309-3976 + addresses: + - type: Unknown + line1: 7 Lerdahl Junction + line2: '' + city: Sparwood + region: British Columbia + country: Canada + postalCode: L4R + contacts: + - name: 'O''Heagertie, Lauri' + phone: + - number: 410-309-3976 + type: Primary + address: + type: Unknown + line1: 7 Lerdahl Junction + line2: '' + city: Sparwood + region: British Columbia + country: Canada + postalCode: L4R + status: Unknown + taxNumber: '' + status: Active + modifiedDate: '2023-04-04T16:32:21Z' + sourceModifiedDate: '2020-10-20T05:01:49' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 530 + _links: + current: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/customers?page=1&pageSize=2 + self: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/customers + next: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/customers?page=2&pageSize=2 + Wave: + value: + results: + - id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjMyMzkzNTA4 + customerName: ABC Textiles + contactName: '' + emailAddress: c.taylor@codat.io + defaultCurrency: USD + addresses: [] + contacts: [] + status: Active + modifiedDate: '2022-11-16T18:15:30Z' + sourceModifiedDate: '2019-10-17T07:59:04Z' + - id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjM3MTUzNDI2 + customerName: Coffee Cart + contactName: Coffee Carl + emailAddress: coffee.cart@example.com + defaultCurrency: GBP + phone: '0201111' + addresses: + - type: Billing + line1: 11 Coffee Lane + line2: Coffee Town + city: Coffee City + region: Hampshire + country: United Kingdom + postalCode: CC1 1CC + contacts: + - name: Coffee Carl + phone: + - number: '07733' + type: Mobile + status: Active + status: Active + modifiedDate: '2022-11-16T18:15:30Z' + sourceModifiedDate: '2020-03-17T19:12:39Z' + pageNumber: 1 + pageSize: 2 + totalResults: 10 + _links: + current: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/customers?page=1&pageSize=2 + self: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/customers + next: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/customers?page=2&pageSize=2 + Xero: + value: + results: + - id: e4c9d0e2-c285-4e85-b579-6d28b180c730 + customerName: 24 Locks + emailAddress: '' + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-03-15T20:35:10Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + - id: bab779bc-c5fb-42cb-a888-953e8309711c + customerName: 7-Eleven + emailAddress: '' + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-03-15T20:35:10Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 48 + _links: + current: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/customers?page=1&pageSize=2 + self: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/customers + next: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/customers?page=2&pageSize=2 + Zoho Books: + value: + results: + - id: '104957000000032105' + customerName: A B + contactName: Contact (First Name) Contact (Last Name) + emailAddress: contactperson@whateveryouwantidontcare12345.com + defaultCurrency: GBP + phone: Work Phone + addresses: [] + contacts: + - name: Contact (First Name) Contact (Last Name) + email: contactperson@whateveryouwantidontcare12345.com + phone: + - number: Work Phone + type: Landline + - number: Mobile + type: Mobile + status: Active + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-06-09T14:36:47' + - id: '104957000000054050' + customerName: 'Doe, John' + contactName: John Doe + emailAddress: '' + defaultCurrency: GBP + addresses: [] + contacts: + - name: John Doe + email: '' + phone: [] + status: Active + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-09-28T15:09:22' + pageNumber: 1 + pageSize: 2 + totalResults: 14 + _links: + current: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/customers?page=1&pageSize=2 + self: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/customers + next: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/customers?page=2&pageSize=2 + '400': + $ref: '#/components/responses/Malformed-Query' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2001,373 +8032,1812 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/Not-Found' + '409': + $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - /profile: + description: |- + The *List customers* endpoint returns a list of [customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) for a given company's connection. + + [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). + + operationId: list-customers + '/companies/{companyId}/data/customers/{customerId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/customerId' get: - summary: Get profile tags: - - Settings + - Customers + summary: Get customer responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/Profile' - examples: {} + $ref: '#/components/schemas/Customer' + examples: + Clear Books: + value: + id: c8180244-74ac-40cf-a5df-6d83661c44d7 + customerName: Arjun Kuvalis + contactName: Werner Langworth + emailAddress: Arjun34@hotmail.com + defaultCurrency: GBP + phone: 014605 64820 + addresses: + - type: Delivery + line1: Suite 214 + line2: 8439 Lueilwitz Passage + city: Fernandohaven + region: Northern Ireland + country: United Kingdom + postalCode: JG04 7PV + - type: Delivery + line1: Suite 096 + line2: 864 Halie Course + city: Juliochester + region: England + country: United Kingdom + postalCode: DZ8 4BF + - type: Delivery + line1: Suite 001 + line2: 416 Stokes Fords + city: Naderborough + region: Wales + country: United Kingdom + postalCode: XG25 0XX + contacts: + - name: Werner Langworth + email: Werner_Langworth@hotmail.com + phone: [] + address: + type: Delivery + line1: Apt. 145 + line2: 317 Williamson Freeway + city: Hortenseville + region: Scotland + country: United Kingdom + postalCode: CV4 2HR + status: Active + - name: Belle Glover + email: Belle51@yahoo.com + phone: [] + address: + type: Delivery + line1: Suite 075 + line2: 9921 Dickens Walk + city: South Ali + region: Scotland + country: United Kingdom + postalCode: TI04 4OO + status: Active + registrationNumber: NI7JEJVM + taxNumber: '7505220209.583549' + status: Active + modifiedDate: '2023-04-26T12:38:16Z' + sourceModifiedDate: '2022-07-03T01:27:00' + metadata: + isDeleted: false + Dynamics 365 Business Central: + value: + id: 0e2f7751-7696-ed11-bff5-6045bd0d2ad6 + customerName: '' + contactName: '' + emailAddress: '' + defaultCurrency: GBP + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: '' + postalCode: '' + contacts: + - name: '' + email: '' + phone: [] + address: + type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: '' + postalCode: '' + status: Active + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:25Z' + sourceModifiedDate: '2023-01-17T14:50:54Z' + metadata: + isDeleted: false + Exact (Netherlands): + value: + id: 555f8251-c65a-433a-a813-5dbe04321d1e + customerName: Ab Netherlands + defaultCurrency: EUR + addresses: + - type: Billing + country: NL + contacts: [] + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2021-06-14T15:26:37Z' + Exact (UK): + value: + id: 5f20075a-a28e-434d-81a6-2db0dc170e87 + customerName: Abdi 99 + emailAddress: email@codat.io + defaultCurrency: GBP + addresses: + - type: Billing + line1: Ink Rooms + city: London + country: GB + postalCode: WC1X 0BE + contacts: [] + registrationNumber: '123456789' + taxNumber: GB339 0727 47 + status: Active + modifiedDate: '2022-10-26T13:33:08Z' + sourceModifiedDate: '2020-02-26T11:23:50Z' + FreeAgent: + value: + id: '11526230' + customerName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + contacts: + - name: Test 1 + phone: [] + address: + type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Unknown + status: Active + modifiedDate: '2023-04-25T14:19:12Z' + sourceModifiedDate: '2023-04-17T06:02:46Z' + metadata: + isDeleted: false + FreshBooks: + value: + id: '634509' + customerName: A test customer 14 (updated) + contactName: test person name + emailAddress: test14@example.com + defaultCurrency: GBP + phone: 01876 541245 + addresses: + - type: Billing + line1: Line 1 + line2: Line 2 + city: Some city + region: A region + country: Country 1 + postalCode: SW1 2JQ + contacts: + - name: test person1 + email: test14A@example.com + phone: + - number: '24681012' + type: Primary + - number: '121086420' + type: Unknown + status: Active + - name: test person2 + email: test14B@example.com + phone: + - number: '123456789' + type: Primary + - number: '987654321' + type: Unknown + status: Active + - name: test person name + email: test14@example.com + phone: + - number: 01876 541245 + type: Unknown + status: Active + status: Active + modifiedDate: '2023-03-24T16:07:23Z' + sourceModifiedDate: '2022-05-18T09:23:56' + metadata: + isDeleted: false + KashFlow: + value: + id: '92227673' + customerName: Chekko Customer Test 01 + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + contacts: + - name: '' + email: '' + phone: [] + status: Active + taxNumber: '' + status: Active + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '0001-01-01T00:00:00' + Oracle NetSuite: + value: + id: '773' + customerName: 119 Test Customer + contactName: Mr Test Customer + defaultCurrency: GBP + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-01-30T14:48:02Z' + sourceModifiedDate: '2022-01-11T12:28:49' + QuickBooks Desktop: + value: + id: 150000-933272658 + customerName: 'Abercrombie, Kristy' + contactName: Kristy Abercrombie + emailAddress: kristy@samplename.com + defaultCurrency: GBP + phone: 415-555-6579 + addresses: + - type: Delivery + line1: Kristy Abercrombie + line2: 5647 Cypress Hill Rd + city: Bayshore + region: CA + postalCode: '94326' + - type: Billing + line1: Kristy Abercrombie + line2: 5647 Cypress Hill Rd + city: Bayshore + region: CA + postalCode: '94326' + contacts: + - name: 'Abercrombie, Kristy' + email: kristy@samplename.com + phone: + - number: 415-555-6579 + type: Primary + status: Active + - name: Kristy Abercrombie + phone: [] + status: Active + - name: Steve Darcangelo + phone: [] + status: Active + status: Active + modifiedDate: '2023-04-26T09:07:55Z' + sourceModifiedDate: '2023-12-16T05:06:42' + metadata: + isDeleted: false + QuickBooks Online: + value: + id: '9' + customerName: Abe + contactName: Abraham's Company + emailAddress: ab@email.com + defaultCurrency: GBP + addresses: [] + contacts: + - name: Abe + email: ab@email.com + phone: + - number: '01111111111' + type: Mobile + status: Active + registrationNumber: XXXX9900001 + taxNumber: XXXX9900001 + status: Active + modifiedDate: '2023-01-18T11:02:35Z' + sourceModifiedDate: '2022-12-08T15:42:59Z' + QuickBooks Online Sandbox: + value: + id: '66' + customerName: Abercrombie International Group + contactName: Kristy Abercrombie + defaultCurrency: GBP + addresses: + - type: Billing + line1: 123 Main St + city: 'New York, NY' + contacts: + - name: Abercrombie International Group (deleted) + phone: [] + address: + type: Billing + line1: 123 Main St + city: 'New York, NY' + status: Archived + status: Archived + modifiedDate: '2023-04-26T09:35:56Z' + sourceModifiedDate: '2016-09-12T18:53:19Z' + metadata: + isDeleted: false + Sage 200cloud: + value: + id: A1D001 + customerName: A1 Design Services + contactName: Lee Dalkin + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Delivery + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: '' + postalCode: BP12 7HT + - type: Delivery + line1: 23a Union Street + line2: '' + city: Manchester + region: '' + country: '' + postalCode: M2 6JK + - type: Billing + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: Great Britain + postalCode: BP12 7HT + contacts: + - name: Lee Dalkin + email: newbusinessadvice@sage.com + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Landline + - number: 01742 876 236 + type: Fax + status: Active + - name: Malcolm Leverret + email: '' + phone: [] + status: Active + - name: Jim Thomas + email: Jim@a1designservices.co.uk + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Fax + status: Active + - name: Jullian Plawsworth + email: Jullian@a1designservices.co.uk + phone: + - number: 0151 349 3939 + type: Landline + - number: 0151 349 3940 + type: Fax + status: Active + registrationNumber: '' + taxNumber: GB238 3839 38 + status: Active + modifiedDate: '2022-10-14T09:35:53Z' + sourceModifiedDate: '2022-04-27T15:17:36Z' + Sage 50 (UK): + value: + id: A1D001 + customerName: A1 Design Services + contactName: Ian Cairns + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Delivery + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: GB + postalCode: BP12 7HT + - type: Delivery + line1: 23a Union Street + line2: '' + city: Manchester + region: '' + country: GB + postalCode: M2 6JK + - type: Unknown + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: GB + postalCode: BP12 7HT + contacts: [] + taxNumber: GB238 3839 38 + status: Active + modifiedDate: '2023-03-30T14:42:41Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + metadata: + isDeleted: false + Sage Business Cloud Accounting: + value: + id: 260f6a3f94a243738f2d5e08496a41a8 + customerName: 100 test name + contactName: Main Contact + emailAddress: email@codat.io + defaultCurrency: GBP + phone: contact phone number + addresses: + - type: Billing + line1: Aruba Address line 1 + line2: Aruba Address line 2 + city: Aruba City + region: Aruba Province + country: Aruba (AW) + postalCode: Aruba Post + contacts: + - phone: + - number: contact mobile number + type: Mobile + - number: contact fax number + type: Fax + status: Unknown + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2021-05-10T16:31:51Z' + Sage Intacct: + value: + id: '188' + customerName: 33Across + contactName: Yuna Conn + defaultCurrency: USD + phone: 520-393-4468 + addresses: + - type: Unknown + line1: 155 Westend Point + line2: '' + city: Albuquerque + region: NM + country: United States + postalCode: '87140' + contacts: + - name: 'Conn, Yuna' + phone: + - number: 520-393-4468 + type: Primary + address: + type: Unknown + line1: 155 Westend Point + line2: '' + city: Albuquerque + region: NM + country: United States + postalCode: '87140' + status: Unknown + taxNumber: '' + status: Active + modifiedDate: '2023-04-04T16:32:21Z' + sourceModifiedDate: '2022-09-06T12:58:27' + metadata: + isDeleted: false + Wave: + value: + id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjMyMzkzNTA4 + customerName: ABC Textiles + contactName: '' + emailAddress: c.taylor@codat.io + defaultCurrency: USD + addresses: [] + contacts: [] + status: Active + modifiedDate: '2022-11-16T18:15:30Z' + sourceModifiedDate: '2019-10-17T07:59:04Z' + Xero: + value: + id: e4c9d0e2-c285-4e85-b579-6d28b180c730 + customerName: 24 Locks + emailAddress: '' + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-03-15T20:35:10Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + Zoho Books: + value: + id: '104957000000032105' + customerName: A B + contactName: Contact (First Name) Contact (Last Name) + emailAddress: contactperson@whateveryouwantidontcare12345.com + defaultCurrency: GBP + phone: Work Phone + addresses: [] + contacts: + - name: Contact (First Name) Contact (Last Name) + email: contactperson@whateveryouwantidontcare12345.com + phone: + - number: Work Phone + type: Landline + - number: Mobile + type: Mobile + status: Active + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-06-09T14:36:47' '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '409': + $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - operationId: get-profile - x-speakeasy-name-override: get-profile - description: Fetch your Codat profile. - put: - summary: Update profile - operationId: update-profile - x-speakeasy-name-override: update-profile + description: | + The *Get customer* endpoint returns a single customer for a given customerId. + + [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). + operationId: get-customer + '/companies/{companyId}/connections/{connectionId}/push/customers': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + post: + tags: + - Customers + summary: Create customer + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Customer' responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/Profile' + $ref: '#/components/schemas/CreateCustomerResponse' examples: {} + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' + operationId: create-customer + description: |- + The *Create customer* endpoint creates a new [customer](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) for a given company's connection. + + [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + + **Integration-specific behavior** + + Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-customers-model). + '/companies/{companyId}/connections/{connectionId}/push/customers/{customerId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + - $ref: '#/components/parameters/customerId' + put: tags: - - Settings - description: Update your Codat profile + - Customers + summary: Update customer + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + - $ref: '#/components/parameters/forceUpdate' requestBody: content: application/json: schema: - $ref: '#/components/schemas/Profile' - examples: {} - description: All fields should be included when updating your profile. - /profile/syncSettings: - get: - summary: Get sync settings - tags: - - Settings - operationId: get-profile-syncSettings - x-speakeasy-name-override: get-sync-settings - description: 'Retrieve the [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings) for your client. This includes how often data types should be queued to be updated, and how much history should be fetched.' + $ref: '#/components/schemas/Customer' responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/SyncSettings' - examples: - Example: - value: - clientId: 367f7975-267b-439b-90c6-a6040ee680f3 - settings: - - dataType: invoices - fetchOnFirstLink: true - syncSchedule: 24 - syncOrder: 0 - syncFromUtc: '2020-01-01T12:00:00.000Z' - syncFromWindow: 24 - monthsToSync: 24 - isLocked: true - overridesDefaults: true - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - post: - summary: Update all sync settings - description: Update sync settings for all data types. - tags: - - Settings - operationId: update-profile-syncSettings - x-speakeasy-name-override: update-sync-settings - responses: - '204': - description: No Content + $ref: '#/components/schemas/UpdateCustomerResponse' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - requestBody: - content: - application/json: - schema: - allOf: - - properties: - clientId: - $ref: '#/components/schemas/ClientId' - settings: - type: array - items: - $ref: '#/components/schemas/SyncSetting' - overridesDefaults: - type: boolean - default: true - description: 'Set to `True` if you want to override default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings).' - required: - - clientId - - settings - - overridesDefaults - type: object - description: |- - Include a `syncSetting` object for each data type. - `syncFromWindow`, `syncFromUTC` & `monthsToSync` only need to be included if you wish to set a value for them. - /apiKeys: - get: - summary: List API keys description: |- - Use the *List API keys* endpoint to return a list of all API keys that currently exist for your client. This includes keys created via the Portal UI or the *Create API keys* endpoint. + The *Update customer* endpoint updates an existing [customer](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) for a given company's connection. + + [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - [API keys](https://docs.codat.io/platform-api#/schemas/apiKeys) are tokens used to control access to the API. Include this token in the `Authorization` header parameter when making API calls, following the word "Basic" and a space with your API key. + **Integration-specific behavior** - You can [read more](https://docs.codat.io/using-the-api/authentication) about authentication at Codat and managing API keys via the Portal UI or API. - operationId: list-api-keys - x-speakeasy-name-override: list-api-keys + Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-customers-model). + operationId: update-customer + '/companies/{companyId}/data/suppliers': + parameters: + - $ref: '#/components/parameters/companyId' + get: tags: - - Settings + - Suppliers + summary: List suppliers + parameters: + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/query' + - $ref: '#/components/parameters/orderBy' responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/ApiKeys' + $ref: '#/components/schemas/Suppliers' examples: - Example: + Clear Books: value: results: - - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd - createdDate: '2022-04-11T13:49:37Z' - - id: c438836a-61fe-443f-8a19-24cc18be21e4 - name: azure-invoice-finance-processor - apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd - createdDate: '2022-04-23T09:43:48Z' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - post: - summary: Create API key - operationId: create-api-key - x-speakeasy-name-override: create-api-key - description: |- - Use the *Create API keys* endpoint to generate a new API key for your client. - - [API keys](https://docs.codat.io/platform-api#/schemas/apiKeys) are tokens used to control access to the API. Include this token in the `Authorization` header parameter when making API calls, following the word "Basic" and a space with your API key. - - You can [read more](https://docs.codat.io/using-the-api/authentication) about authentication at Codat and managing API keys via the Portal UI or API. - - ### Tips and pitfalls - - * Your first API key is created for you. Access this key via [Codat's Portal](https://app.codat.io/developers/api-keys). - * If you require multiple API keys, perform multiple calls to the *Create API keys* endpoint. - * The number of API keys is limited to 10. If you have reached the maximum amount of keys, use the *Delete API key* endpoint to delete an unused key first. - tags: - - Settings - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateApiKey' - examples: - Create API key with name: - value: - name: azure-invoice-finance-processor - responses: - '201': - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/ApiKeyDetails' - examples: - API key details: + - id: owQ2Gqgj9f + supplierName: Abshire - Kshlerin + contactName: Faye Hansen + emailAddress: hello@Abshire-Kshlerin.info + phone: 01338 858162 + addresses: + - type: Delivery + line1: Suite 431 + line2: 289 Giles Lake + city: Cesarmouth + region: Northern Ireland + country: United Kingdom + postalCode: BG40 9GP + registrationNumber: VYL1XZXR + taxNumber: '1396267523.0914588' + status: Active + modifiedDate: '2023-04-26T12:38:17Z' + sourceModifiedDate: '1660-11-28T23:18:00' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: FyUkHbZxhn + supplierName: Arjun Kuvalis + contactName: Werner Langworth + emailAddress: Arjun34@hotmail.com + phone: 0116 796 3163 + addresses: + - type: Delivery + line1: Suite 214 + line2: 8439 Lueilwitz Passage + city: Fernandohaven + region: Northern Ireland + country: United Kingdom + postalCode: JG04 7PV + - type: Delivery + line1: Suite 096 + line2: 864 Halie Course + city: Juliochester + region: England + country: United Kingdom + postalCode: DZ8 4BF + - type: Delivery + line1: Suite 001 + line2: 416 Stokes Fords + city: Naderborough + region: Wales + country: United Kingdom + postalCode: XG25 0XX + registrationNumber: NI7JEJVM + taxNumber: '7505220209.583549' + status: Active + modifiedDate: '2023-04-26T12:38:17Z' + sourceModifiedDate: '0177-04-27T11:56:00' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 100 + _links: + current: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers?page=1&pageSize=2 + self: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers + next: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers?page=2&pageSize=2 + Dynamics 365 Business Central: + value: + results: + - id: 78623f13-931e-eb11-bbf8-0022481b3585 + supplierName: '' + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:12Z' + sourceModifiedDate: '2020-11-04T11:44:22Z' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: be49ec62-6754-ed11-946f-0022481b67d1 + supplierName: '' + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:12Z' + sourceModifiedDate: '2022-10-25T13:17:36Z' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 31 + _links: + current: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers?page=1&pageSize=2 + self: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers + next: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers?page=2&pageSize=2 + Exact (Netherlands): value: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd - createdDate: '2022-04-11T13:49:37Z' - API key details with name: + results: + - id: 3150917c-1d92-4d77-9018-31b5c4758ca9 + supplierName: Abe + contactName: Kelly's Contact Name + emailAddress: sales@kellysupplies.com + phone: 07999 999999 + addresses: + - type: Billing + line1: Unit 51 + city: Bakersfield + region: California + country: US + postalCode: '933081' + registrationNumber: '8409314368' + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2022-07-15T12:01:15Z' + defaultCurrency: EUR + - id: 00014c12-2616-481a-a2e8-31bdf2497775 + supplierName: Ann's test supplier 2 + contactName: Ann's contact name + emailAddress: anna@anna888888.com + phone: '55555555' + addresses: + - type: Billing + line1: line1 + line2: line2 + city: city + region: region + country: RU + postalCode: postal + registrationNumber: '55566677788899944455' + taxNumber: RU4444444 + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2021-06-09T12:04:08Z' + defaultCurrency: USD + pageNumber: 1 + pageSize: 2 + totalResults: 73 + _links: + current: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers?page=1&pageSize=2 + self: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers + next: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers?page=2&pageSize=2 + Exact (UK): value: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: azure-invoice-finance-processor - apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd - createdDate: '2022-04-11T13:49:37Z' - '400': - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorMessage' - examples: - Max length for name reached: + results: + - id: 0185fea2-0298-445b-909a-0db685118a9e + supplierName: a + addresses: + - type: Billing + country: GB + status: Active + modifiedDate: '2022-10-26T13:33:13Z' + sourceModifiedDate: '2017-08-02T10:58:54Z' + defaultCurrency: GBP + - id: 64ae712f-4155-48bb-9fce-98232c51d979 + supplierName: aa + addresses: + - type: Billing + country: GB + status: Active + modifiedDate: '2022-10-26T13:33:13Z' + sourceModifiedDate: '2020-05-01T14:05:46Z' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 118 + _links: + current: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers?page=1&pageSize=2 + self: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers + next: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers?page=2&pageSize=2 + FreeAgent: + value: + results: + - id: '11526230' + supplierName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Active + modifiedDate: '2023-04-25T14:19:08Z' + sourceModifiedDate: '2023-04-17T06:02:46' + metadata: + isDeleted: false + - id: '9677150' + supplierName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Active + modifiedDate: '2023-04-25T14:19:08Z' + sourceModifiedDate: '2023-04-24T06:19:23' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 159 + _links: + current: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers?page=1&pageSize=2 + self: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers + next: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers?page=2&pageSize=2 + FreshBooks: + value: + results: + - id: api vendor + supplierName: api vendor + addresses: [] + status: Active + modifiedDate: '2023-03-24T16:07:25Z' + metadata: + isDeleted: false + - id: DUndsRykrmy8kFsc+FvYk29YkJze4zSjGecoF4YcUEhVU7auJ5JkQA0VjXptZ7XQ+D4n6WoxFIkaGY2V/t4flA== + supplierName: 'Chekko Test merchant 100 - Test Very long name: ORIG CO NAME:AMERICAN EXPRESS ORIG ID:9493560001 DESC DATE:220307 CO ENTRY DESCR:ACH PMT SEC:CCD TRACE#:021000023255482 EED:220307 IND ID:A4670 IND NAME:Rick Sanchez' + addresses: [] + status: Active + modifiedDate: '2023-03-24T16:07:25Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 7 + _links: + current: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers?page=1&pageSize=2 + self: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers + next: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers?page=2&pageSize=2 + KashFlow: + value: + results: + - id: '6202387' + supplierName: Dell + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + taxNumber: '' + status: Unknown + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '2017-05-09T00:00:00' + - id: '9338173' + supplierName: Home + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + taxNumber: '' + status: Unknown + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '1990-01-01T00:00:00' + pageNumber: 1 + pageSize: 2 + totalResults: 7 + _links: + current: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers?page=1&pageSize=2 + self: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers + next: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers?page=2&pageSize=2 + Oracle NetSuite: + value: + results: + - id: '779' + supplierName: Test Vendor + contactName: Test Vendor + emailAddress: '' + phone: '' + addresses: [] + status: Active + modifiedDate: '2023-01-30T14:47:02Z' + sourceModifiedDate: '2022-02-04T14:24:43' + defaultCurrency: GBP + - id: '726' + supplierName: Vendor -.A + contactName: Vendor -.A + emailAddress: '' + phone: '' + addresses: [] + status: Active + modifiedDate: '2023-01-30T14:47:02Z' + sourceModifiedDate: '2021-03-26T09:53:15' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 6 + _links: + current: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers?page=1&pageSize=2 + self: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers + next: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers?page=2&pageSize=2 + QuickBooks Desktop: + value: + results: + - id: A60000-1197760912 + supplierName: A Cheung Limited + contactName: Angela Cheung + emailAddress: AC@CheungLimited.com + phone: 510 555 5723 + addresses: + - type: Billing + line1: 'A Cheung Limited, Angela Cheung' + line2: 3818 Bear Rd. West + city: Berkeley + region: CA + postalCode: '94688' + status: Active + modifiedDate: '2023-04-26T09:09:03Z' + sourceModifiedDate: '2023-12-16T05:06:44' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: A40000-1197774038 + supplierName: Bank of Anycity + contactName: Lisa D. Holzhauser + emailAddress: lisah@samplename.com + phone: 415-555-9135 + addresses: + - type: Billing + line1: 'Bank of Anycity, Lisa Holzhauser' + line2: 1935 Main Street + city: Middlefield + region: CA + postalCode: '94482' + status: Active + modifiedDate: '2023-04-26T09:09:03Z' + sourceModifiedDate: '2023-12-16T05:06:44' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 54 + _links: + current: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers?page=1&pageSize=2 + self: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers + next: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers?page=2&pageSize=2 + QuickBooks Online: + value: + results: + - id: '41' + supplierName: AI Support + contactName: AI Support + addresses: + - type: Billing + line1: test + region: string + country: Djibouti + status: Active + modifiedDate: '2023-01-18T11:02:36Z' + sourceModifiedDate: '2022-12-07T10:48:18Z' + defaultCurrency: GBP + - id: '42' + supplierName: AI Support 2 + contactName: AI Support 2 + addresses: + - type: Billing + line1: test + region: string + country: DJ + status: Active + modifiedDate: '2023-01-18T11:02:36Z' + sourceModifiedDate: '2021-08-31T08:45:02Z' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 23 + _links: + current: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers?page=1&pageSize=2 + self: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers + next: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers?page=2&pageSize=2 + QuickBooks Online Sandbox: + value: + results: + - id: '129' + supplierName: Ally Johnson + contactName: Miss Smith + phone: 0728 38474 + addresses: + - type: Billing + line1: 100 London Road + line2: Angel + city: London + region: Greater London + country: England + postalCode: EC1M + status: Active + modifiedDate: '2023-04-26T09:35:55Z' + sourceModifiedDate: '2023-04-13T01:51:08Z' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: '88' + supplierName: Andrew Haberbosch + addresses: [] + status: Active + modifiedDate: '2023-04-26T09:35:55Z' + sourceModifiedDate: '2022-07-06T15:55:28Z' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 64 + _links: + current: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers?page=1&pageSize=2 + self: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers + next: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers?page=2&pageSize=2 + Sage 200cloud: + value: + results: + - id: '776' + supplierName: Aaren + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Unknown + line1: '' + line2: '' + city: '' + region: '' + country: Great Britain + postalCode: '' + taxNumber: '' + status: Archived + modifiedDate: '2022-10-14T09:35:58Z' + defaultCurrency: GBP + metadata: + isDeleted: true + - id: '914' + supplierName: Aaren + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Unknown + line1: '' + line2: '' + city: '' + region: '' + country: Great Britain + postalCode: '' + taxNumber: '' + status: Archived + modifiedDate: '2022-10-14T09:35:58Z' + defaultCurrency: GBP + metadata: + isDeleted: true + pageNumber: 1 + pageSize: 2 + totalResults: 943 + _links: + current: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers?page=1&pageSize=2 + self: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers + next: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers?page=2&pageSize=2 + Sage 50 (UK): + value: + results: + - id: CON001 + supplierName: Concept Stationery Supplies + contactName: Mark Ramsay + emailAddress: newbusinessadvice@sage.com + phone: 0191 643 4343 + addresses: + - type: Delivery + line1: 66 New Street + line2: Ridgeway + city: Newcastle Upon Tyne + region: '' + country: GB + postalCode: NE1 4GF + - type: Unknown + line1: 66 New Street + line2: Ridgeway + city: Newcastle upon Tyne + region: '' + country: GB + postalCode: NE1 4GF + taxNumber: GB988 3453 23 + status: Active + modifiedDate: '2023-03-30T14:42:38Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: MCN001 + supplierName: McNally Computer Supplies + contactName: Stuart Lynn + emailAddress: newbusinessadvice@sage.com + phone: 0191 415 3434 + addresses: + - type: Delivery + line1: Station Lane Ind Est + line2: Birtley + city: Chester le Street + region: County Durham + country: GB + postalCode: DH1 3RG + - type: Unknown + line1: Station Lane Ind Est + line2: Birtley + city: Chester le Street + region: County Durham + country: GB + postalCode: DH1 3RG + taxNumber: GB455 2385 34 + status: Active + modifiedDate: '2023-03-30T14:42:38Z' + sourceModifiedDate: '2022-12-05T13:37:26Z' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 15 + _links: + current: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers?page=1&pageSize=2 + self: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers + next: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers?page=2&pageSize=2 + Sage Business Cloud Accounting: + value: + results: + - id: 65179671e9ef424caff8b9006cd111c8 + supplierName: 5555 Abdul's Test Name + contactName: Main Contact + addresses: + - type: Billing + country: United Kingdom (GB) + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2020-02-25T17:23:33Z' + defaultCurrency: GBP + - id: cf7f44d693904944a6a7cf3de0887964 + supplierName: Abdi Supplier + contactName: Abdi + emailAddress: abdisupplier@company.com + addresses: + - type: Billing + line1: 1 Place House + city: London + country: United Kingdom (GB) + postalCode: WC1X 1AH + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2020-02-13T10:38:19Z' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 64 + _links: + current: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers?page=1&pageSize=2 + self: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers + next: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers?page=2&pageSize=2 + Sage Intacct: + value: + results: + - id: '3' + supplierName: ADP + contactName: 'Jones, William' + phone: 214-760-9491 + addresses: + - type: Unknown + line1: 208 S Akard St + line2: '' + city: Dallas + region: TX + country: United States + postalCode: '75265' + registrationNumber: '' + taxNumber: 85-3678274 + status: Active + modifiedDate: '2023-04-04T16:32:20Z' + sourceModifiedDate: '2023-02-16T09:48:27' + defaultCurrency: USD + metadata: + isDeleted: false + - id: '29' + supplierName: Advisor Printing + contactName: 'Roach, Nathan' + phone: 130-202-4796 + addresses: + - type: Unknown + line1: 5 Carey Hill + line2: '' + city: Drayton Valley + region: Alberta + country: Canada + postalCode: G8V + registrationNumber: '' + taxNumber: '' + status: Active + modifiedDate: '2023-04-04T16:32:20Z' + sourceModifiedDate: '2022-06-15T11:38:29' + defaultCurrency: CAD + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 77 + _links: + current: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers?page=1&pageSize=2 + self: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers + next: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers?page=2&pageSize=2 + Wave: + value: + results: + - id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0Nzk0 + supplierName: Computer Shop + contactName: '' + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-11-16T18:15:24Z' + sourceModifiedDate: '2020-04-07T13:28:02Z' + defaultCurrency: GBP + - id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0NzQx + supplierName: Flour Mill + contactName: '' + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-11-16T18:15:24Z' + sourceModifiedDate: '2020-04-07T13:12:40Z' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 9 + _links: + current: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers?page=1&pageSize=2 + self: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers + next: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers?page=2&pageSize=2 + Xero: + value: + results: + - id: e4c9d0e2-c285-4e85-b579-6d28b180c730 + supplierName: 24 Locks + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2023-03-15T20:36:09Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + - id: bab779bc-c5fb-42cb-a888-953e8309711c + supplierName: 7-Eleven + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2023-03-15T20:36:09Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 48 + _links: + current: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers?page=1&pageSize=2 + self: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers + next: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers?page=2&pageSize=2 + Zoho Books: value: - statusCode: 400 - service: PublicApi - error: Max string length (50) for `name` reached. - correlationId: bc997528a9d7abb9161ef45f05d38599 - canBeRetried: Unknown - detailedErrorCode: 0 + results: + - id: '104957000001494001' + supplierName: Acme Corporation + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-09-16T13:09:56' + defaultCurrency: GBP + - id: '104957000000648001' + supplierName: Cool company + contactName: Dre + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-06-10T09:07:16' + defaultCurrency: CAD + pageNumber: 1 + pageSize: 2 + totalResults: 6 + _links: + current: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers?page=1&pageSize=2 + self: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers + next: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers?page=2&pageSize=2 + '400': + $ref: '#/components/responses/Malformed-Query' '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' '409': - description: Conflict - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorMessage' - examples: - Max length for name reached: - value: - statusCode: 400 - service: PublicApi - error: 'Maximum number of API keys reached. To create a new API key, delete an unused key and try again.' - correlationId: bc997528a9d7abb9161ef45f05d38599 - canBeRetried: Unknown - detailedErrorCode: 0 + $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/apiKeys/{apiKeyId}': - delete: - summary: Delete API key - operationId: delete-api-key - x-speakeasy-name-override: delete-api-key - parameters: - - name: apiKeyId - in: path - required: true - schema: - type: string - example: 8a210b68-6988-11ed-a1eb-0242ac120002 - description: Unique identifier for api key. - description: |- - Use the *Delete API keys* endpoint to delete an existing API key, providing its valid `id` as a parameter. Note that this operation is not reversible. + description: | + The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection. - [API keys](https://docs.codat.io/platform-api#/schemas/apiKeys) are tokens used to control access to the API. Include this token in the `Authorization` header parameter when making API calls, following the word "Basic" and a space with your API key. + [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - You can [read more](https://docs.codat.io/using-the-api/authentication) about authentication at Codat and managing API keys via the Portal UI or API. + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-all-data-types). - ### Tips and pitfalls + ### Supported Integrations - * It is possible to delete the last remaining API key. If this happens, a new key can be created via the [API key management page](https://app.codat.io/developers/api-keys) of the Portal. - * It is possible to delete the API key used to authenticate the *Delete API key* request. - tags: - - Settings - responses: - '204': - description: No Content - $ref: '#/components/responses/Too-Many-Requests' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/sync/{datasetId}/validation': + | Integration | Supported | + |-------------------------------|-----------| + | Dynamics 365 Business Central | Yes | + | FreeAgent | Yes | + | Oracle NetSuite | Yes | + | QuickBooks Desktop | Yes | + | QuickBooks Online | Yes | + | Sage Intacct | Yes | + | Xero | Yes | + | Zoho Books | Yes | + operationId: list-suppliers + '/companies/{companyId}/data/suppliers/{supplierId}': parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/datasetId' + - $ref: '#/components/parameters/supplierId' get: - summary: Get validation results tags: - - Read data - operationId: get-read-validation-results - x-speakeasy-name-override: get-validation-results - description: |- - Use the **Get validation results** endpoint to review warnings and errors encountered during the data type validation phase. - - The validation result [schema](https://docs.codat.io/platform-api#/schemas/ValidationResult) contains two message arrays: - - - **`warnings`** array lists potential issues with the data type that may require attention but don't block usage. - - **`errors`** array contains critical issues that must be resolved before the data type can be used. + - Suppliers + summary: Get supplier responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/ValidationResult' + $ref: '#/components/schemas/Supplier' examples: - Validation result: + Clear Books: + value: + id: owQ2Gqgj9f + supplierName: Abshire - Kshlerin + contactName: Faye Hansen + emailAddress: hello@Abshire-Kshlerin.info + phone: 01338 858162 + addresses: + - type: Delivery + line1: Suite 431 + line2: 289 Giles Lake + city: Cesarmouth + region: Northern Ireland + country: United Kingdom + postalCode: BG40 9GP + registrationNumber: VYL1XZXR + taxNumber: '1396267523.0914588' + status: Active + modifiedDate: '2023-04-26T12:38:17Z' + sourceModifiedDate: '1660-11-28T23:18:00' + defaultCurrency: GBP + metadata: + isDeleted: false + Dynamics 365 Business Central: value: - errors: - - ruleId: accounting-bill-030 - itemId: fc2f2d1a-ff4d-40c6-a7fb-4bd7d04f4008 - message: A bill's lines summed (69.99) should be the same as TotalAmount (70.00). - validatorName: BillValidator - warnings: - - ruleId: accounting-bill-032 - itemId: 1d3979e5-7c28-432e-b562-04e9013c1ea0 - message: A bill's lines sub total amount summed (3201.20) should be the same as SubTotal (3201.25) - validatorName: BillValidator + id: 78623f13-931e-eb11-bbf8-0022481b3585 + supplierName: '' + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:12Z' + sourceModifiedDate: '2020-11-04T11:44:22Z' + defaultCurrency: GBP + metadata: + isDeleted: false + Exact (Netherlands): + value: + id: 3150917c-1d92-4d77-9018-31b5c4758ca9 + supplierName: Abe + contactName: Kelly's Contact Name + emailAddress: sales@kellysupplies.com + phone: 07999 999999 + addresses: + - type: Billing + line1: Unit 51 + city: Bakersfield + region: California + country: US + postalCode: '933081' + registrationNumber: '8409314368' + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2022-07-15T12:01:15Z' + defaultCurrency: EUR + Exact (UK): + value: + id: 0185fea2-0298-445b-909a-0db685118a9e + supplierName: a + addresses: + - type: Billing + country: GB + status: Active + modifiedDate: '2022-10-26T13:33:13Z' + sourceModifiedDate: '2017-08-02T10:58:54Z' + defaultCurrency: GBP + FreeAgent: + value: + id: '11526230' + supplierName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Active + modifiedDate: '2023-04-25T14:19:08Z' + sourceModifiedDate: '2023-04-17T06:02:46' + metadata: + isDeleted: false + FreshBooks: + value: + id: api vendor + supplierName: api vendor + addresses: [] + status: Active + modifiedDate: '2023-03-24T16:07:25Z' + metadata: + isDeleted: false + KashFlow: + value: + id: '6202387' + supplierName: Dell + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + taxNumber: '' + status: Unknown + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '2017-05-09T00:00:00' + Oracle NetSuite: + value: + id: '779' + supplierName: Test Vendor + contactName: Test Vendor + emailAddress: '' + phone: '' + addresses: [] + status: Active + modifiedDate: '2023-01-30T14:47:02Z' + sourceModifiedDate: '2022-02-04T14:24:43' + defaultCurrency: GBP + QuickBooks Desktop: + value: + id: A60000-1197760912 + supplierName: A Cheung Limited + contactName: Angela Cheung + emailAddress: AC@CheungLimited.com + phone: 510 555 5723 + addresses: + - type: Billing + line1: 'A Cheung Limited, Angela Cheung' + line2: 3818 Bear Rd. West + city: Berkeley + region: CA + postalCode: '94688' + status: Active + modifiedDate: '2023-04-26T09:09:03Z' + sourceModifiedDate: '2023-12-16T05:06:44' + defaultCurrency: GBP + metadata: + isDeleted: false + QuickBooks Online: + value: + id: '41' + supplierName: AI Support + contactName: AI Support + addresses: + - type: Billing + line1: test + region: string + country: Djibouti + status: Active + modifiedDate: '2023-01-18T11:02:36Z' + sourceModifiedDate: '2022-12-07T10:48:18Z' + defaultCurrency: GBP + QuickBooks Online Sandbox: + value: + id: '129' + supplierName: Ally Johnson + contactName: Miss Smith + phone: 0728 38474 + addresses: + - type: Billing + line1: 100 London Road + line2: Angel + city: London + region: Greater London + country: England + postalCode: EC1M + status: Active + modifiedDate: '2023-04-26T09:35:55Z' + sourceModifiedDate: '2023-04-13T01:51:08Z' + defaultCurrency: GBP + metadata: + isDeleted: false + Sage 200cloud: + value: + id: '776' + supplierName: Aaren + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Unknown + line1: '' + line2: '' + city: '' + region: '' + country: Great Britain + postalCode: '' + taxNumber: '' + status: Archived + modifiedDate: '2022-10-14T09:35:58Z' + defaultCurrency: GBP + metadata: + isDeleted: true + Sage 50 (UK): + value: + id: CON001 + supplierName: Concept Stationery Supplies + contactName: Mark Ramsay + emailAddress: newbusinessadvice@sage.com + phone: 0191 643 4343 + addresses: + - type: Delivery + line1: 66 New Street + line2: Ridgeway + city: Newcastle Upon Tyne + region: '' + country: GB + postalCode: NE1 4GF + - type: Unknown + line1: 66 New Street + line2: Ridgeway + city: Newcastle upon Tyne + region: '' + country: GB + postalCode: NE1 4GF + taxNumber: GB988 3453 23 + status: Active + modifiedDate: '2023-03-30T14:42:38Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + defaultCurrency: GBP + metadata: + isDeleted: false + Sage Business Cloud Accounting: + value: + id: 65179671e9ef424caff8b9006cd111c8 + supplierName: 5555 Abdul's Test Name + contactName: Main Contact + addresses: + - type: Billing + country: United Kingdom (GB) + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2020-02-25T17:23:33Z' + defaultCurrency: GBP + Sage Intacct: + value: + id: '3' + supplierName: ADP + contactName: 'Jones, William' + phone: 214-760-9491 + addresses: + - type: Unknown + line1: 208 S Akard St + line2: '' + city: Dallas + region: TX + country: United States + postalCode: '75265' + registrationNumber: '' + taxNumber: 85-3678274 + status: Active + modifiedDate: '2023-04-04T16:32:20Z' + sourceModifiedDate: '2023-02-16T09:48:27' + defaultCurrency: USD + metadata: + isDeleted: false + Wave: + value: + id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0Nzk0 + supplierName: Computer Shop + contactName: '' + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-11-16T18:15:24Z' + sourceModifiedDate: '2020-04-07T13:28:02Z' + defaultCurrency: GBP + Xero: + value: + id: e4c9d0e2-c285-4e85-b579-6d28b180c730 + supplierName: 24 Locks + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2023-03-15T20:36:09Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + Zoho Books: + value: + id: '104957000001494001' + supplierName: Acme Corporation + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-09-16T13:09:56' + defaultCurrency: GBP '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2376,31 +9846,66 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/Not-Found' + '409': + $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/options/{dataType}': + description: | + The *Get supplier* endpoint returns a single supplier for a given supplierId. + + [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-all-data-types). + + ### Supported Integrations + + | Integration | Supported | + |-------------------------------|-----------| + | Dynamics 365 Business Central | Yes | + | FreeAgent | Yes | + | Oracle NetSuite | Yes | + | QuickBooks Desktop | Yes | + | QuickBooks Online | Yes | + | Sage Intacct | Yes | + | Xero | Yes | + | Zoho Books | Yes | + operationId: get-supplier + '/companies/{companyId}/connections/{connectionId}/push/suppliers': parameters: - $ref: '#/components/parameters/companyId' - $ref: '#/components/parameters/connectionId' - - $ref: '#/components/parameters/dataType' - get: - summary: Get push options + post: tags: - - Push data - operationId: get-create-update-model-options-by-data-type - x-speakeasy-name-override: get-model-options + - Suppliers + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Supplier' + examples: + Sage Intacct: + value: + id: '73593' + supplierName: test 20230420 1004 + contactName: Joe Bloggs + status: Active responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/PushOption' + $ref: '#/components/schemas/CreateSupplierResponse' examples: {} + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2415,40 +9920,56 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - description: |- - This is the generic documentation for creation and updating of data. See the equivalent endpoint for a given data type for more specific information. + summary: Create supplier + description: | + The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection. - Before pushing data into accounting software, it is often necessary to collect some details from the user as to how they would like the data to be inserted. This includes names and amounts on transactional entities, but also factors such as categorisation of entities, which is often handled differently between different accounting software. A good example of this is specifying where on the balance sheet/profit and loss reports the user would like a newly-created nominal account to appear. + [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - Codat tries not to limit users to pushing to a very limited number of standard categories, so we have implemented "options" endpoints, which allow us to expose to our clients the fields which are required to be pushed for a specific linked company, and the options which may be selected for each field. - '/companies/{companyId}/push': + **Integration-specific behavior** + + Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-suppliers-model). + + ### Supported Integrations + + | Integration | Supported | + |-------------------------------|-----------| + | Dynamics 365 Business Central | Yes | + | FreeAgent | Yes | + | Oracle NetSuite | Yes | + | QuickBooks Desktop | Yes | + | QuickBooks Online | Yes | + | Sage Intacct | Yes | + | Xero | Yes | + | Zoho Books | Yes | + operationId: create-supplier + '/companies/{companyId}/connections/{connectionId}/push/suppliers/{supplierId}': parameters: - $ref: '#/components/parameters/companyId' - get: - parameters: - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/query' - - $ref: '#/components/parameters/orderBy' - summary: List push operations + - $ref: '#/components/parameters/connectionId' + - $ref: '#/components/parameters/supplierId' + put: tags: - - Push data - operationId: get-company-push-history - x-speakeasy-name-override: list-operations - description: |- - The **List push operations** endpoint returns a list of [push operations](/using-the-api/push) performed on the company. - - Write operations are actions that send requests to Codat, enabling the creation, updating, deletion of records, or uploading attachments in the connected accounting software. + - Suppliers + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + - $ref: '#/components/parameters/forceUpdate' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Supplier' responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/PushOperations' + $ref: '#/components/schemas/UpdateSupplierResponse' examples: {} '400': - $ref: '#/components/responses/Malformed-Query' + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2463,1052 +9984,85 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/push/{pushOperationKey}': - parameters: - - $ref: '#/components/parameters/companyId' - - schema: - type: string - format: uuid - name: pushOperationKey - in: path - required: true - description: Push operation key. - get: - summary: Get push operation - tags: - - Push data - operationId: get-push-operation - x-speakeasy-name-override: get-operation - description: |- - The **Get push operation** endpoint returns a specific [push operation](/using-the-api/push) identified by the `pushOperationKey` that was performed on the company. - - Write operations are actions that send requests to Codat, enabling the creation, updating, deletion of records, or uploading attachments in the connected accounting software. - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/PushOperation' - examples: {} - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/integrations/{platformKey}/dataTypes/{dataType}/supplementalDataConfig': - parameters: - - $ref: '#/components/parameters/platformKey' - - name: dataType - in: path - required: true - description: Supported supplemental data data type. - schema: - x-internal: true - type: string - description: Data types that support supplemental data - enum: - - chartOfAccounts - - bills - - company - - creditNotes - - customers - - invoices - - items - - journalEntries - - suppliers - - taxRates - - commerce-companyInfo - - commerce-customers - - commerce-disputes - - commerce-locations - - commerce-orders - - commerce-payments - - commerce-paymentMethods - - commerce-products - - commerce-productCategories - - commerce-taxComponents - - commerce-transactions - example: invoices - put: - summary: Configure - description: |- - The *Configure* endpoint allows you to maintain or change configuration required to return supplemental data for each integration and data type combination. + summary: Update supplier + description: | + The *Update supplier* endpoint updates an existing [supplier](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection. - [Supplemental data](https://docs.codat.io/using-the-api/supplemental-data/overview) is additional data you can include in Codat's standard data types. + [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. **Integration-specific behavior** - See the *examples* for integration-specific frequently requested properties. - operationId: configure-supplemental-data - x-speakeasy-name-override: configure - tags: - - Supplemental data - responses: - '200': - description: OK - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SupplementalDataConfiguration' - examples: - Xero - Accounts: - value: - yourKeyNameForAccounts: - dataSource: /Accounts - pullData: - yourNameForTaxType: TaxType - yourNameForSystemAccount: SystemAccount - Xero - Invoices: - value: - yourKeyNameForInvoices: - dataSource: /Invoices - pullData: - yourNameForExpectedPaymentDate: ExpectedPaymentDate - yourNameForHasAttachments: HasAttachments - Xero - Items: - value: - yourKeyNameForItems: - dataSource: /Items - pullData: - yourNameForQuantityOnHand: QuantityOnHand - yourNameForTotalCostPool: TotalCostPool - Xero - Contacts: - value: - yourKeyNameForContacts: - dataSource: /Contacts - pullData: - yourNameForBankAccounts: BankAccountDetails - Xero - Tax rates: - value: - yourKeyNameForTaxRates: - dataSource: /TaxRates - pullData: - yourNameForCanApplyToLiabilities: CanApplyToLiabilities - yourNameForCanApplyToAssets: CanApplyToAssets - yourNameForCanApplyToEquity: CanApplyToEquity - yourNameForCanApplyToExpenses: CanApplyToExpenses - yourNameForCanApplyToRevenue: CanApplyToRevenue - QBO - Customers: - value: - yourKeyNameForCustomers: - dataSource: /Customer - pullData: - yourNameForSalesTermRef: SalesTermRef.value - yourNameForParentRef: ParentRef.value - QBO - Invoices: - value: - yourKeyNameForInvoices: - dataSource: /Invoice - pullData: - yourNameForSalesTermRef: SalesTermRef.value - description: The configuration for the specified platform and data type. - get: - summary: Get configuration - description: |- - The *Get configuration* endpoint returns supplemental data configuration previously created for each integration and data type combination. - - [Supplemental data](https://docs.codat.io/using-the-api/supplemental-data/overview) is additional data you can include in Codat's standard data types. - operationId: get-supplemental-data-configuration - x-speakeasy-name-override: get-configuration - tags: - - Supplemental data - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/SupplementalDataConfiguration' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/integrations/{platformKey}/dataTypes/custom/{customDataIdentifier}': - parameters: - - $ref: '#/components/parameters/platformKey' - - $ref: '#/components/parameters/customDataIdentifier' - put: - summary: Configure custom data type - description: |- - The *Configure custom data type* endpoint allows you to maintain or change the configuration required to return a custom data type for a specific integration. - - A [custom data type](https://docs.codat.io/using-the-api/custom-data) is an additional data type you can create that is not included in Codat's standardized data model. - ### Tips and traps + Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-suppliers-model). - - You can only configure a single custom data type for a single platform at a time. Use the endpoint multiple times if you need to configure it for multiple platforms. + ### Supported Integrations - - You can only indicate a single data source for each customer data type. - - - Make your custom configuration as similar as possible to our standard data types so you can interact with them in exactly the same way. - operationId: configure-custom-data-type - x-speakeasy-name-override: configure - tags: - - Custom data type - requestBody: - description: Custom data type configuration for the specified platform. - content: - application/json: - schema: - $ref: '#/components/schemas/CustomDataTypeConfiguration' - examples: - Dynamics 365 Business Central: - value: - dataSource: api/purchaseOrders - requiredData: - currency: '$[*].currencyCode' - number: '$[*].number' - date: '$[*].orderDate' - totalexvat: '$[*].totalAmountExcludingTax' - totaltax: '$[*].totalTaxAmount' - vendor: '$[*].number' - keyBy: - - '$[*].id' - sourceModifiedDate: - - '$[*].lastModifiedDateTime' - Xero Simple Record: - value: - dataSource: /api.xro/2.0/Accounts - requiredData: - code: $.Code - accountId: $.AccountID - type: $.Type - SysAcc: $.SystemAccount - keyBy: - - $.AccountID - Xero Mapping Arrays: - value: - dataSource: /api.xro/2.0/Invoices - requiredData: - invNumber: $.InvoiceNumber - type: $.Type - InvoiceID: $.InvoiceID - lines: '$.LineItems[*]' - keyBy: - - $.InvoiceID - sourceModifiedDate: - - $.UpdatedDateUTC - QuickBooks Online: - value: - dataSource: /query?query=select * from Account - requiredData: - id: $.Id - Currentbal: $.CurrentBalance - SubAcc: $.SubAccount - keyBy: - - $.Id - sourceModifiedDate: - - $.time - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CustomDataTypeConfiguration' - examples: - Dynamics 365 Business Central: - value: - dataSource: api/purchaseOrders - requiredData: - currency: '$[*].currencyCode' - number: '$[*].number' - date: '$[*].orderDate' - totalexvat: '$[*].totalAmountExcludingTax' - totaltax: '$[*].totalTaxAmount' - vendor: '$[*].number' - keyBy: - - '$[*].id' - sourceModifiedDate: - - '$[*].lastModifiedDateTime' - Xero Simple Record: - value: - dataSource: /api.xro/2.0/Accounts - requiredData: - code: $.Code - accountId: $.AccountID - type: $.Type - SysAcc: $.SystemAccount - keyBy: - - $.AccountID - Xero Mapping Arrays: - value: - dataSource: /api.xro/2.0/Invoices - requiredData: - invNumber: $.InvoiceNumber - type: $.Type - InvoiceID: $.InvoiceID - lines: '$.LineItems[*]' - keyBy: - - $.InvoiceID - sourceModifiedDate: - - $.UpdatedDateUTC - QuickBooks Online: - value: - dataSource: /query?query=select * from Account - requiredData: - id: $.Id - Currentbal: $.CurrentBalance - SubAcc: $.SubAccount - keyBy: - - $.Id - sourceModifiedDate: - - $.time - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - get: - summary: Get custom data configuration - description: |- - The *Get custom data configuration* endpoint returns existing configuration details for the specified custom data type and integration pair you previously configured. - - A [custom data type](https://docs.codat.io/using-the-api/custom-data) is an additional data type you can create that is not included in Codat's standardized data model. - operationId: get-custom-data-type-configuration - x-speakeasy-name-override: get-configuration - tags: - - Custom data type - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CustomDataTypeRecords' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/data/queue/custom/{customDataIdentifier}': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - - $ref: '#/components/parameters/customDataIdentifier' - post: - summary: Refresh custom data type - description: The *Refresh custom data type* endpoint refreshes the specified custom data type for a given company. This is an asynchronous operation that will sync updated data from the linked integration into Codat for you to view. - operationId: refresh-custom-data-type - x-speakeasy-name-override: refresh - tags: - - Custom data type - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/PullOperation' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '451': - $ref: '#/components/responses/Legal-Reasons' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/data/custom/{customDataIdentifier}': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - - $ref: '#/components/parameters/customDataIdentifier' - get: - summary: List custom data type records - description: |- - The *List custom data type records* endpoint returns a paginated list of records pulled for the specified custom data type you previously configured. - - A [custom data type](https://docs.codat.io/using-the-api/custom-data) is an additional data type you can create that is not included in Codat's standardized data model.s endpoint returns a paginated list of records whose schema is defined [Configure custom data type](https://docs.codat.io/platform-api#/operations/configure-custom-data-type) - operationId: list-custom-data-type-records - parameters: - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - tags: - - Custom data type - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CustomDataTypeRecords' - '400': - $ref: '#/components/responses/Bad-Request' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '451': - $ref: '#/components/responses/Legal-Reasons' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' + | Integration | Supported | + |-------------------|-----------| + | FreeAgent | Yes | + | QuickBooks Online | Yes | + | Xero | Yes | + operationId: update-supplier webhooks: - company.created: + expenses.sync.successful: post: - description: Called when a company is created in Codat. + description: Called when an expense sync successfully completes without any errors or warnings. requestBody: content: application/json: schema: - $ref: '#/components/schemas/CompanyWebhook' + $ref: '#/components/schemas/ExpensesSyncWebhook' examples: - Company created: + Successful: value: id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: company.created - generatedDate: '2024-08-08T17:10:34.015Z' + eventType: expenses.sync.successful + generatedDate: '2024-09-01T00:00:00Z' payload: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: Requested a loan for refurb. - redirect: 'https://link.codat.io/company/0498e921-9b53-4396-a412-4f2f5983b0a2' - lastSync: '2022-01-01T12:00:00.000Z' - created: '2022-01-01T12:00:00.000Z' - tags: - customerRegion: us - uid: 335a086e-8563-4b03-94e3-39544225ecb6 + referenceCompany: + id: 0498e921-9b53-4396-a412-4f2f5983b0a2 + name: Toft stores + description: Syncing expenses + syncId: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd + transactions: + - id: f47ac10b-58cc-4372-a567-0e02b2c3d479 + status: Completed + errorMessage: null + - id: e7f8a3d5-0c3c-4c9b-b5d3-56b4a43b62e4 + status: Completed + errorMessage: null responses: '200': description: Return a 200 status to indicate that the webhook was received successfully. - company.deleted: + expenses.sync.unsuccessful: post: - description: Called when a company is deleted in Codat. + description: 'Called when an expense sync fails to complete successfully, resulting in at least one error or warning.' requestBody: content: application/json: schema: - $ref: '#/components/schemas/CompanyWebhook' + $ref: '#/components/schemas/ExpensesSyncWebhook' examples: - Company deleted: + Unsuccessful: value: id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: company.deleted - generatedDate: '2024-08-08T17:10:34.015Z' - payload: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: Requested a loan for refurb. - redirect: 'https://link.codat.io/company/0498e921-9b53-4396-a412-4f2f5983b0a2' - lastSync: '2022-01-01T12:00:00.000Z' - created: '2022-01-01T12:00:00.000Z' - tags: - customerRegion: uk - uid: f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c - responses: - '200': - description: Return a 200 status to indicate that the webhook was received successfully. - connection.created: - post: - description: Called when a connection is created by the SMB. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectionWebhook' - examples: - Connection created: - value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: connection.created - generatedDate: '2024-08-08T17:10:34.015Z' - payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: internal_id_mxO7rLfo - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - tags: - customerRegion: us - uid: 335a086e-8563-4b03-94e3-39544225ecb6 - connection: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: PendingAuth - lastSync: '2022-10-27T10:22:43.6464237Z' - created: '2022-10-27T09:53:29Z' - sourceType: Banking - responses: - '200': - description: Return a 200 status to indicate that the webhook was received successfully. - connection.connected: - post: - description: Called when a connection is successfully linked by the SMB. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectionWebhook' - examples: - Connection connected: - value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: connection.connected - generatedDate: '2024-08-08T17:10:34.015Z' - payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: internal_id_mxO7rLfo - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - tags: - customerRegion: us - uid: 335a086e-8563-4b03-94e3-39544225ecb6 - connection: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Linked - lastSync: '2022-10-27T10:22:43.6464237Z' - created: '2022-10-27T09:53:29Z' - sourceType: Banking - responses: - '200': - description: Return a 200 status to indicate that the webhook was received successfully. - connection.failed: - post: - description: Called when a connection failed linking to the SMB. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectionWebhook' - examples: - Connection failed: - value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: connection.failed - generatedDate: '2024-08-08T17:10:34.015Z' - payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: internal_id_mxO7rLfo - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - tags: - customerRegion: us - uid: 335a086e-8563-4b03-94e3-39544225ecb6 - connection: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: PendingAuth - created: '2022-10-27T09:53:29Z' - sourceType: Banking - dataConnectionErrors: - - statusCode: '403' - statusText: User cancelled linking - errorMessage: User cancelled - erroredOnUtc: '2022-10-27T09:53:29Z' - status: Active - responses: - '200': - description: Return a 200 status to indicate that the webhook was received successfully. - connection.disconnected: - post: - description: Called when a connection is disconnected either due to being unlinked or de-authorized by the SMB or integration. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectionWebhook' - examples: - Unlinked: - value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: connection.disconnected - generatedDate: '2024-08-08T17:10:34.015Z' - payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: internal_id_mxO7rLfo - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - tags: - customerRegion: us - uid: 335a086e-8563-4b03-94e3-39544225ecb6 - connection: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Unlinked - lastSync: '2022-10-27T10:22:43.6464237Z' - created: '2022-10-27T09:53:29Z' - sourceType: Banking - De-authorized: - value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: connection.disconnected - generatedDate: '2024-08-08T17:10:34.015Z' - payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: internal_id_mxO7rLfo - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - tags: - customerRegion: us - uid: 335a086e-8563-4b03-94e3-39544225ecb6 - connection: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Deauthorized - lastSync: '2022-10-27T10:22:43.6464237Z' - created: '2022-10-27T09:53:29Z' - sourceType: Banking - dataConnectionErrors: - - statusCode: '401' - statusText: The integration de-authorized access to the connection. - errorMessage: The integration de-authorized access to the connection. - erroredOnUtc: '2022-12-27T09:53:29Z' - status: Active - responses: - '200': - description: Return a 200 status to indicate that the webhook was received successfully. - connection.reconnected: - post: - description: Called when a connection is reconnected after becoming disconnected. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectionWebhook' - examples: - Reconnected: - value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: connection.reconnected - generatedDate: '2024-08-08T17:10:34.015Z' - payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: internal_id_mxO7rLfo - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - tags: - customerRegion: us - uid: 335a086e-8563-4b03-94e3-39544225ecb6 - connection: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Linked - lastSync: '2022-10-27T10:22:43.6464237Z' - created: '2022-10-27T09:53:29Z' - sourceType: Banking - responses: - '200': - description: Return a 200 status to indicate that the webhook was received successfully. - connection.deleted: - post: - description: Called when a connection is deleted. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectionWebhook' - examples: - Deleted: - value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: connection.deleted - generatedDate: '2024-08-08T17:10:34.015Z' - payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: internal_id_mxO7rLfo - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - tags: - customerRegion: us - uid: 335a086e-8563-4b03-94e3-39544225ecb6 - connection: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Linked - lastSync: '2022-10-27T10:22:43.6464237Z' - created: '2022-10-27T09:53:29Z' - sourceType: Banking - responses: - '200': - description: Return a 200 status to indicate that the webhook was received successfully. - read.completed: - post: - description: Called when the fetch of data types for a product has completed. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ReadCompletedWebhook' - examples: - Read completed with validation warnings: - value: - id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - eventType: read.completed - generatedDate: '2022-10-23T00:00:00.000Z' - payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Toft stores - description: Requested early access to the new financing scheme. - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - modifiedFromDate: '2022-10-23T00:00:00.000Z' - dataTypes: - - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 - dataType: invoices - recordsModified: false - status: Complete - issues: - - type: warning.validation - message: Something doesn't look right about these invoices. You can see more information in the logs. - links: - logs: 'https://api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/sync/743ec94a-8aa4-44bb-8bd4-e1855ee0e74b/validation' - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/pull-history' - readMore: 'https://docs.codat.io/using-the-api/get-data-troubleshooting#warning.validation' - Read completed without issues: - value: - id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - eventType: read.completed - generatedDate: '2022-10-23T00:00:00.000Z' - payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Toft stores - description: Requested early access to the new financing scheme. - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - modifiedFromDate: '2022-10-23T00:00:00.000Z' - dataTypes: - - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 - dataType: invoices - recordsModified: false - status: Complete - issues: [] - responses: - '200': - description: Return a 200 status to indicate that the webhook was received successfully. - read.completed.initial: - post: - description: Called when the initial fetch of data types for a product has been completed. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ReadCompletedWebhook' - examples: - Initial with validation warnings: - value: - id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - eventType: read.completed.initial - generatedDate: '2022-10-23T00:00:00.000Z' - payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Toft stores - description: Requested early access to the new financing scheme. - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - modifiedFromDate: '2022-10-23T00:00:00.000Z' - dataTypes: - - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 - dataType: invoices - recordsModified: false - status: Complete - issues: - - type: warning.validation - message: Something doesn't look right about these invoices. You can see more information in the logs. - links: - logs: 'https://api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/sync/743ec94a-8aa4-44bb-8bd4-e1855ee0e74b/validation' - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/pull-history' - readMore: 'https://docs.codat.io/using-the-api/get-data-troubleshooting#warning.validation' - Initial without issues: - value: - id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - eventType: read.completed.initial - generatedDate: '2022-10-23T00:00:00.000Z' + eventType: expenses.sync.unsuccessful + generatedDate: '2024-09-01T00:00:00Z' payload: referenceCompany: id: 0498e921-9b53-4396-a412-4f2f5983b0a2 name: Toft stores - description: Requested early access to the new financing scheme. - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - modifiedFromDate: '2022-10-23T00:00:00.000Z' - dataTypes: - - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 - dataType: invoices - recordsModified: false - status: Complete - issues: [] + description: Syncing expenses + syncId: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd + transactions: + - id: f47ac10b-58cc-4372-a567-0e02b2c3d479 + status: Completed + errorMessage: null + - id: e7f8a3d5-0c3c-4c9b-b5d3-56b4a43b62e4 + status: Failed + errorMessage: Insufficient funds responses: '200': description: Return a 200 status to indicate that the webhook was received successfully. - '{dataType}.write.successful': - post: - description: | - Indicates that a `dataType` has been successfully created, updated, deleted, or had an attachment uploaded in the accounting software. - - Codat now refers to push operations as write requests. - - For example, to subscribe to events where a bill is written into the accounting software, use the `bills.write.successful` webhook. - - ### Supported data types and write types - - | `dataType` | Create | Update | Delete | UploadAttachment | - |------------------|---------|---------|---------|------------------| - | bankAccounts | ✅ | ✅ | - | - | - | bankTransactions | ✅ | - | - | - | - | billCreditNotes | ✅ | ✅ | - | ✅ | - | billPayments | ✅ | - | ✅ | - | - | bills | ✅ | ✅ | ✅ | ✅ | - | chartOfAccounts | ✅ | - | - | - | - | creditNotes | ✅ | ✅ | - | - | - | customers | ✅ | ✅ | - | - | - | directCosts | ✅ | - | ✅ | ✅ | - | directIncomes | ✅ | - | - | ✅ | - | invoices | ✅ | ✅ | ✅ | ✅ | - | items | ✅ | - | - | - | - | journalEntries | ✅ | - | ✅ | - | - | journals | ✅ | - | - | - | - | payments | ✅ | - | - | - | - | purchaseOrders | ✅ | ✅ | - | - | - | suppliers | ✅ | ✅ | - | - | - | transfers | ✅ | - | - | ✅ | - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DataTypeWriteWebhook' - examples: - Record: - value: - id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 - eventType: '{dataType}.write.successful' - generatedDate: '2023-05-03T10:00:23Z' - payload: - id: a9367074-b5c3-42c4-9be4-be129f43577e - type: Create - referenceCompany: - id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac - name: Toft stores - description: cust_1MtJUT2eZvKYlo2CNaw2HvEv - connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 - requestedOnDate: '2023-05-03T10:00:00Z' - completedOnDate: '2023-05-03T10:00:23Z' - status: Success - record: - id: bil_1Nispe2eZvKYlo2Cd31jOCgZ - Attachment: - value: - id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 - eventType: '{dataType}.write.successful' - generatedDate: '2023-05-03T10:00:23Z' - payload: - id: a9367074-b5c3-42c4-9be4-be129f43577e - type: UploadAttachment - referenceCompany: - id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac - name: Toft stores - description: cust_1MtJUT2eZvKYlo2CNaw2HvEv - connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 - requestedOnDate: '2023-05-03T10:00:00Z' - completedOnDate: '2023-05-03T10:00:23Z' - status: Success - record: - id: bil_1Nispe2eZvKYlo2Cd31jOCgZ - attachmentId: att_1AZtxr2eZvKYlo2CJDX8whov - responses: - '200': - description: Return a 200 status to indicate that the webhook was received. - '{dataType}.write.unsuccessful': - post: - description: | - Indicates that a `dataType` has not been successfully created, updated, deleted, or had an attachment uploaded in the accounting software. - - Codat now refers to push operations as write requests. - - For example, to subscribe to events where a bill is written into the accounting software, use the `bills.write.unsuccessful` webhook. - - ### Supported data types and write types - - | `dataType` | Create | Update | Delete | UploadAttachment | - |------------------|---------|---------|---------|------------------| - | bankAccounts | ✅ | ✅ | - | - | - | bankTransactions | ✅ | - | - | - | - | billCreditNotes | ✅ | ✅ | - | ✅ | - | billPayments | ✅ | - | ✅ | - | - | bills | ✅ | ✅ | ✅ | ✅ | - | chartOfAccounts | ✅ | - | - | - | - | creditNotes | ✅ | ✅ | - | - | - | customers | ✅ | ✅ | - | - | - | directCosts | ✅ | - | ✅ | ✅ | - | directIncomes | ✅ | - | - | ✅ | - | invoices | ✅ | ✅ | ✅ | ✅ | - | items | ✅ | - | - | - | - | journalEntries | ✅ | - | ✅ | - | - | journals | ✅ | - | - | - | - | payments | ✅ | - | - | - | - | purchaseOrders | ✅ | ✅ | - | - | - | suppliers | ✅ | ✅ | - | - | - | transfers | ✅ | - | - | ✅ | - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/DataTypeWriteWebhook' - examples: - Record: - value: - id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 - eventType: '{dataType}.write.unsuccessful' - generatedDate: '2023-05-03T10:00:23Z' - payload: - id: a9367074-b5c3-42c4-9be4-be129f43577e - type: Update - referenceCompany: - id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac - name: Toft stores - description: cust_1MtJUT2eZvKYlo2CNaw2HvEv - connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 - requestedOnDate: '2023-05-03T10:00:00Z' - completedOnDate: '2023-05-03T10:00:23Z' - status: Failed - Record timed out: - value: - id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 - eventType: '{dataType}.write.unsuccessful' - generatedDate: '2023-05-03T10:00:23Z' - payload: - id: a9367074-b5c3-42c4-9be4-be129f43577e - type: Delete - referenceCompany: - id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac - name: Toft stores - description: cust_1MtJUT2eZvKYlo2CNaw2HvEv - connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 - requestedOnDate: '2023-05-03T10:00:00Z' - completedOnDate: '2023-05-03T10:00:23Z' - status: TimedOut - Attachment: - value: - id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 - eventType: '{dataType}.write.unsuccessful' - generatedDate: '2023-05-03T10:00:23Z' - payload: - id: a9367074-b5c3-42c4-9be4-be129f43577e - type: UploadAttachment - referenceCompany: - id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac - name: Toft stores - description: cust_1MtJUT2eZvKYlo2CNaw2HvEv - connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 - requestedOnDate: '2023-05-03T10:00:00Z' - completedOnDate: '2023-05-03T10:00:23Z' - status: TimedOut - record: - id: bil_1Nispe2eZvKYlo2Cd31jOCgZ - responses: - '200': - description: Return a 200 status to indicate that the webhook was received. client.rateLimit.reached: post: description: Called when your client’s request count to Codat's API surpasses the allocated quota. @@ -3553,135 +10107,565 @@ webhooks: description: Return a 200 status to indicate that the webhook was received successfully. components: schemas: - ApiKeyDetails: - title: API key details - description: Details of the API key. - type: object + Account: + title: 'Accounting: Account' + description: "\uFEFF> **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**.\n\n## Overview\n\nAccounts are the categories a business uses to record accounting transactions. From the Accounts endpoints, you can retrieve a list of all accounts for a specified company.\n\nThe categories for an account include:\n* Asset\n* Expense\n* Income\n* Liability\n* Equity.\n\nThe same account may have a different category based on the integration it is used in. For example, a current account (known as checking in the US) should be categorized as `Asset.Current` for Xero, and `Asset.Bank.Checking` for QuickBooks Online.\n\nAt the same time, each integration may have its own requirements to the categories. For example, a Paypal account in Xero is of the `Asset.Bank` category and therefore requires additional properties to be provided.\n\nTo determine the list of allowed categories for a specific integration, you can:\n- Follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide and use the [Get create account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-chartOfAccounts-model).\n- Refer to the integration's own documentation.\n\n> **Accounts with no category**\n>\n> If an account is pulled from the chart of accounts and its nominal code does not lie within the category layout for the company's accounts, then the **type** is `Unknown`. The **fullyQualifiedCategory** and **fullyQualifiedName** fields return `null`.\n>\n> This approach gives a true representation of the company's accounts whilst preventing distorting financials such as a company's profit and loss and balance sheet reports." allOf: - properties: id: type: string - description: Unique identifier for the API key. - example: e288a972-b402-4b21-93f9-b5335ae5679c - name: - type: string - maxLength: 50 - nullable: true - description: A meaningful name assigned to the API key. - example: azure-invoice-finance-processor - apiKey: - type: string - description: The API key value used to make authenticated http requests. - example: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd - - nullable: true - description: Datetime in UTC the API key was created. The created date will be null if the API key created before YYYY-MM-DD. - title: Created date - type: object + description: 'Identifier for the account, unique for the company.' + example: 1b6266d1-1e44-46c5-8eb5-a8f98e03124e + - $ref: '#/components/schemas/Account/definitions/accountPrototype' + - properties: + metadata: + title: Metadata + type: object + x-internal: true + properties: + isDeleted: + type: boolean + description: Indicates whether the record has been deleted in the third-party system this record originated from. + nullable: true + - title: Modified dates x-internal: true - properties: - createdDate: - $ref: '#/components/schemas/DateTime' - description: The date the entity was created. - ApiKeys: - title: API keys - x-internal: true - type: object - properties: - results: - type: array - items: - $ref: '#/components/schemas/ApiKeyDetails' - Branding: - title: Branding - type: object - properties: - logo: - $ref: '#/components/schemas/Branding/definitions/brandingLogo' - button: - $ref: '#/components/schemas/Branding/definitions/brandingButton' - sourceId: - type: string - format: uuid - example: 35b92968-9851-4095-ad60-395c95cbcba4 - description: 'A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`.' + allOf: + - title: ModifiedDate + x-internal: true + type: object + properties: + modifiedDate: + allOf: + - $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + - description: |- + The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. + + Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + + This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + + In Codat's data model, dates and times are represented using the ISO 8601 standard. + - title: Source Modified Date + x-internal: true + type: object + nullable: true + properties: + sourceModifiedDate: + allOf: + - $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + - description: |- + The date when a record was last modified in the accounting software, usually by the business or a business process. For example, when payments are made against an invoice. + + It is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when: + - Pulling attachments + - The accounting software does not provide modification dates for a data type + - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred + - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records + + In Codat's data model, dates and times are represented using the ISO 8601 standard. definitions: - brandingLogo: - description: Logo branding references. - type: object - properties: - full: - $ref: '#/components/schemas/Branding/definitions/brandingImage' - square: - $ref: '#/components/schemas/Branding/definitions/brandingImage' - brandingButton: - type: object - description: Button branding references. - properties: - default: - $ref: '#/components/schemas/Branding/definitions/brandingImage' - hover: - $ref: '#/components/schemas/Branding/definitions/brandingImage' - brandingImage: - title: Branding Image - type: object - properties: - image: - $ref: '#/components/schemas/Branding/definitions/imageReference' - examples: [] - imageReference: + accountPrototype: + title: Account prototype type: object - title: Image Reference - description: Image reference. properties: - src: + nominalCode: type: string - format: uri - description: Source URL for image. - alt: + nullable: true + description: Reference given to each nominal account for a business. It ensures money is allocated to the correct account. This code isn't a unique identifier in the Codat system. + example: '610' + name: type: string - description: Alternative text when image is not available. - examples: - - logo: - full: - image: - src: 'https://static.codat.io/public/officialLogos/Full/8A156A5A-39CB-4F9D-856E-76EF9B9A9607.png' - alt: xero full icon - square: - image: - src: 'https://static.codat.io/public/officialLogos/Square/8A156A5A-39CB-4F9D-856E-76EF9B2W3607.png' - alt: xero square icon - button: - default: - image: - src: 'https://static.codat.io/public/officialButtons/Full/8A156A5A-39CB-4F9D-856E-76EF9Q7A9607.png' - alt: xero default button icon - hover: - image: - src: 'https://static.codat.io/public/officialLogos/Full/8A156A5A-39CB-4F9D-856E-76EF9B9A9607.png' - alt: xero hover button icon - sourceId: 35b92968-9851-4095-ad60-395c95cbcba4 - ClientId: - title: Client ID - type: string - format: uuid - description: Unique identifier for your client in Codat. - ClientRateLimitWebhook: - title: Client rate limit webhook - type: object - properties: - id: - type: string - format: uuid - example: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - description: Unique identifier of the event. - eventType: + nullable: true + description: Name of the account. + example: Accounts Receivable + description: + type: string + nullable: true + description: Description for the account. + example: Invoices the business has issued but has not yet collected payment on. + fullyQualifiedCategory: + type: string + nullable: true + description: "Full category of the account. \r\n\r\nFor example, `Liability.Current` or `Income.Revenue`. To determine a list of possible categories for each integration, see our examples, follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide, or refer to the integration's own documentation." + example: Asset.Current + fullyQualifiedName: + type: string + nullable: true + description: |- + Full name of the account, for example: + - `Cash On Hand` + - `Rents Held In Trust` + - `Fixed Asset` + examples: + - Cash On Hand + - Fixed Asset + currency: + title: Currency + x-internal: true + type: string + description: |- + The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + + ## Unknown currencies + + In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction. + + There are only a very small number of edge cases where this currency code is returned by the Codat system. + format: ISO4217 + examples: + - GBP + - USD + - EUR + currentBalance: + type: number + format: decimal + nullable: true + description: Current balance in the account. + example: 0 + type: + $ref: '#/components/schemas/Account/definitions/accountType' + status: + $ref: '#/components/schemas/Account/definitions/accountStatus' + isBankAccount: + type: boolean + description: Confirms whether the account is a bank account or not. + validDatatypeLinks: + type: array + nullable: true + description: 'The validDatatypeLinks can be used to determine whether an account can be correctly mapped to another object; for example, accounts with a `type` of `income` might only support being used on an Invoice and Direct Income. For more information, see [Valid Data Type Links](/sync-for-expenses-api#/schemas/ValidDataTypeLinks).' + items: + title: Valid data type links + description: |- + When querying Codat's data model, some data types return `validDatatypeLinks` metadata in the JSON response. This indicates where that object can be used as a reference—a _valid link_—when creating or updating other data. + + For example, `validDatatypeLinks` might indicate the following references: + + - Which tax rates are valid to use on the line item of a bill. + - Which items can be used when creating an invoice. + + You can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example. + + ## `validDatatypeLinks` example + + The following example uses the `Accounting.Accounts` data type. It shows that, on the linked integration, this account is valid as the account on a payment or bill payment; and as the account referenced on the line item of a direct income or direct cost. Because there is no valid link to Invoices or Bills, using this account on those data types will result in an error. + + ```json validDatatypeLinks for an account + { + "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", + "nominalCode": "090", + "name": "Business Bank Account", + #... + "validDatatypeLinks": [ + { + "property": "Id", + "links": [ + "Payment.AccountRef.Id", + "BillPayment.AccountRef.Id", + "DirectIncome.LineItems.AccountRef.Id", + "DirectCost.LineItems.AccountRef.Id" + ] + } + ] + } + ``` + + + + ## Support for `validDatatypeLinks` + + Codat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations. + + If you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap. + type: object + properties: + property: + type: string + nullable: true + description: The property from the account that can be linked. + links: + type: array + nullable: true + description: Supported `dataTypes` that the record can be linked to. + items: + type: string + supplementalData: + $ref: '#/components/schemas/SupplementalData' + accountRef: + title: Account reference + type: object + description: 'Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.' + properties: + id: + type: string + description: '''id'' from the Accounts data type.' + name: + type: string + description: '''name'' from the Accounts data type.' + accountType: + title: Account type + enum: + - Unknown + - Asset + - Expense + - Income + - Liability + - Equity + type: string + description: Type of account + example: Asset + accountStatus: + title: Account status + enum: + - Unknown + - Active + - Archived + - Pending + type: string + description: Status of the account + example: Active + type: object + AccountMappingInfo: + title: Account mapping info + x-internal: true + type: object + additionalProperties: false + x-examples: + Example AccountInfo: + id: 313a4dbe-b3a4-42f0-a5f5-43e382e62db9 + nominalCode: '720' + name: Travel + currency: GBP + accountType: Expense + fullyQualifiedCategory: Expense.Overhead + isBankAccount: false + validTransactionTypes: + - Payment + - Refund + validFor: + - expense-transactions.Payment + - expense-transactions.Refund + - reimbursable-expense-transactions + properties: + id: + type: string + description: Unique identifier of account. + example: 127f3b99-8dc2-4b7e-854c-91ef9bd2757b + nullable: false + nominalCode: + type: string + description: Code used to identify each nominal account in the accounting software. + example: '300' + nullable: true + name: + type: string + description: Name of the account as it appears in the company's accounting software. + example: Purchases + nullable: false + currency: + type: string + description: Currency of the account. + example: GBP + nullable: false + accountType: + type: string + description: Type of the account. + example: Expense + enum: + - Asset + - Liability + - Income + - Expense + - Equity + nullable: false + fullyQualifiedCategory: + type: string + description: Full account type and category of the account + example: Expense.DirectCosts + nullable: false + isBankAccount: + type: boolean + description: Confirms whether the account is a bank account or not. + validTransactionTypes: + $ref: '#/components/schemas/validTransactionTypes' + description: Supported transaction types for the account. + validFor: + $ref: '#/components/schemas/validFor' + description: Supported endpoints for the account. + AdjustmentTransactionLine: + x-internal: true + title: Adjustment transaction line + type: object + properties: + amount: + type: number + format: decimal + example: 50 + description: Amount of the line. A positive line represents a debit; a negative line represents a credit. + accountRef: + $ref: '#/components/schemas/RecordRef' + description: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + trackingRefs: + type: array + minItems: 1 + maxItems: 10 + nullable: true + items: + $ref: '#/components/schemas/TrackingRefAdjustmentTransaction' + invoiceTo: + $ref: '#/components/schemas/InvoiceTo' + required: + - amount + - accountRef + AdjustmentTransactionRequest: + title: Adjustment transaction + type: object + properties: + id: + type: string + format: uuid + description: Your unique identifier for the transaction. + date: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date of the transaction. + currency: + type: string + description: Currency the transaction was recorded in. + currencyRate: + $ref: '#/components/schemas/ExpenseTransaction/properties/currencyRate' + reference: + type: string + nullable: true + description: User-friendly reference for the adjustment transaction. + lines: + type: array + description: Array of transaction lines. + minItems: 1 + maxItems: 100 + items: + $ref: '#/components/schemas/AdjustmentTransactionLine' + required: + - id + - date + - currency + - lines + AdjustmentTransactionResponse: + title: Adjustment response + x-internal: true + type: object + properties: + syncId: + type: string + example: cd937d46-8e41-43a9-9477-a79158ffd98a + format: uuid + description: Unique id of sync created + apAccountRef: + x-internal: true + type: object + title: Accounts Payable account reference + nullable: true + properties: + id: + type: string + example: 8000004C-1724173136 + description: Unique identifier for the Accounts Payable account associated with the transaction. The `apAccountRef` object is currently supported only for QuickBooks Desktop. + Attachment: + title: Attachment + type: object + x-examples: + Attachment Example: + companyId: bf1e0242-5b7a-418b-a307-9e09dbf9f39a + id: '1400000000122699154' + transactionId: f8f00edd-ddb0-4ca5-b36b-8f932e6b5160 + properties: + companyId: + type: string + format: uuid + description: Unique ID of company in Codat + id: + type: string + description: Unique identifier of attachment + transactionId: + type: string + description: Unique identifier of transaction + AttachmentUpload: + title: Attachment upload + type: object + x-internal: true + required: + - file + properties: + file: + $ref: '#/components/schemas/AttachmentUpload/definitions/codatFile' + definitions: + codatFile: + type: string + description: The file to be uploaded as an attachment. + format: binary + BankAccount: + title: 'Accounting: Bank account' + description: |- + > **Accessing Bank Accounts through Banking API** + > + > This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators. + > + > To view bank account data through the Banking API, please refer to the new [Banking: Account](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) data type. + + ## Overview + + A list of bank accounts associated with a company and a specific data connection. + + Bank accounts data includes: + * The name and ID of the account in the accounting software. + * The currency and balance of the account. + * The sort code and account number. + type: object + allOf: + - properties: + id: + type: string + description: 'Identifier for the account, unique for the company in the accounting software.' + - $ref: '#/components/schemas/BankAccount/definitions/bankAccountPrototype' + - properties: + metadata: + $ref: '#/components/schemas/Account/allOf/2/properties/metadata' + supplementalData: + $ref: '#/components/schemas/SupplementalData' + - $ref: '#/components/schemas/Account/allOf/3' + definitions: + bankAccountPrototype: + title: Bank account prototype + type: object + properties: + accountName: + type: string + nullable: true + description: Name of the bank account in the accounting software. + accountType: + title: Bank Account Type + x-internal: true + enum: + - Unknown + - Credit + - Debit + type: string + description: |- + The type of transactions and balances on the account. + For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. + For Debit accounts, positive balances are assets, and positive transactions **increase** assets. + nominalCode: + type: string + nullable: true + description: Code used to identify each nominal account for a business. + sortCode: + type: string + nullable: true + description: |- + Sort code for the bank account. + + Xero integrations + The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated. + accountNumber: + type: string + nullable: true + description: |- + Account number for the bank account. + + Xero integrations + 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. + + FreeAgent integrations + For Credit accounts, only the last four digits are required. For other types, the field is optional. + iBan: + type: string + nullable: true + description: International bank account number of the account. Often used when making or receiving international payments. + currency: + $ref: '#/components/schemas/Account/definitions/accountPrototype/properties/currency' + description: Base currency of the bank account. + balance: + type: number + format: decimal + nullable: true + description: Balance of the bank account. + institution: + type: string + nullable: true + description: The institution of the bank account. + availableBalance: + type: number + format: decimal + nullable: true + description: 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. + overdraftLimit: + type: number + format: decimal + nullable: true + description: |- + Pre-arranged overdraft limit of the account. + + The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. + status: + $ref: '#/components/schemas/BankAccount/definitions/bankAccountStatus' + bankAccountCreateResponse: + title: Create bank account response + allOf: + - properties: + data: + allOf: + - $ref: '#/components/schemas/BankAccount' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + bankAccountRef: + title: Bank account reference + type: object + properties: + id: + type: string + description: Bank account 'id' for the account transaction. + name: + type: string + description: bank account 'name' for the account transaction. + description: Links to the Account transactions data type. + bankAccounts: + title: 'Accounting: Bank accounts' + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/BankAccount' + - $ref: '#/components/schemas/PagingInfo' + bankAccountStatus: + title: Account status + enum: + - Unknown + - Active + - Archived + - Pending + type: string + description: Status of the bank account. + example: Active + ClientRateLimitWebhook: + title: Client rate limit webhook + type: object + properties: + id: + type: string + format: uuid + example: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b + description: Unique identifier of the event. + eventType: type: string description: The type of event. examples: - client.rateLimit.reset - client.rateLimit.reached generatedDate: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' description: The date time in UTC the event was generated in Codat. payload: $ref: '#/components/schemas/ClientRateLimitWebhook/definitions/clientRateLimitWebhookPayload' @@ -3697,7 +10681,7 @@ components: type: integer description: Total number of requests remaining for your client. expiryDate: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' description: The date time in UTC when your daily quota is reset. Companies: title: Companies @@ -3712,7 +10696,7 @@ components: - $ref: '#/components/schemas/PagingInfo' Company: title: Company - description: "\uFEFFIn Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/platform-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data.\n\nTypically each company is one of your customers.\n\nWhen you create a company, you can specify a `name` and we will automatically generate a unique `id` for the company. You can also add a `description` to store any additional information about the company." + description: "\uFEFFIn Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data.\n\nTypically each company is one of your customers.\n\nWhen you create a company, you can specify a `name` and we will automatically generate a unique `id` for the company. You can also add a `description` to store any additional information about the company." type: object allOf: - $ref: '#/components/schemas/Company/definitions/companyDetails' @@ -3728,7 +10712,7 @@ components: type: object properties: id: - $ref: '#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId' + $ref: '#/components/parameters/companyId/schema' name: type: string description: The name of the company @@ -3742,10 +10726,10 @@ components: description: 'The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company.' example: 'https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739' lastSync: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' nullable: true created: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' createdByUserName: type: string description: Name of user that created the company in Codat. @@ -3785,7 +10769,7 @@ components: type: object properties: id: - $ref: '#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId' + $ref: '#/components/parameters/companyId/schema' name: $ref: '#/components/schemas/Company/definitions/companyDetails/properties/name' description: @@ -3824,36 +10808,234 @@ components: products: - spend-insights - lending - CompanyAccessToken: - title: Company access token - description: Details of the access token provisioned for a company. + CompanyConfiguration: + required: + - bankAccount + - supplier + - customer + title: Company configuration type: object - allOf: - - $ref: '#/components/schemas/CompanyAccessToken/definitions/accessToken' + x-examples: + Config Example: + bankAccount: + id: '89' + supplier: + id: '124' + customer: + id: '140' + properties: + bankAccount: + $ref: '#/components/schemas/CompanyConfiguration/definitions/BankAccountDetails' + supplier: + $ref: '#/components/schemas/CompanyConfiguration/definitions/SupplierDetails' + customer: + $ref: '#/components/schemas/CompanyConfiguration/definitions/CustomerDetails' definitions: - accessToken: - title: Access token + BankAccountDetails: + title: Bank account details type: object properties: - expiresIn: - type: integer - description: The number of seconds until the access token expires. - example: 86400 - accessToken: - type: string - description: The access token for the company. - tokenType: + id: type: string - description: The type of token. - example: Bearer - required: - - expiresIn - - accessToken - - tokenType + description: The id of the account from which purchases are made + example: '32' + SupplierDetails: + title: Supplier details + type: object + properties: + id: + $ref: '#/components/schemas/Supplier/allOf/0/properties/id' + CustomerDetails: + title: Customer details + type: object + properties: + id: + $ref: '#/components/schemas/Customer/allOf/0/properties/id' + CompanyInformation: + title: 'Accounting: Company information' + description: |- + Company info provides standard details about a linked company such as their address, phone number, and company registration. + + > **Company information or companies?** + > + > Company information is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources. + type: object + properties: + companyName: + type: string + nullable: true + description: Name of the linked company. + accountingPlatformRef: + type: string + nullable: true + description: Identifier or reference for the company in the accounting software. + companyLegalName: + type: string + nullable: true + description: Registered legal name of the linked company. + addresses: + type: array + nullable: true + description: An array of Addresses. + items: + title: 'Accounting: Address' + x-internal: true + type: object + properties: + type: + $ref: '#/components/schemas/CompanyInformation/properties/addresses/items/definitions/accountingAddressType' + line1: + type: string + nullable: true + description: Line 1 of the customer address. + line2: + type: string + nullable: true + description: Line 2 of the customer address. + city: + type: string + nullable: true + description: City of the customer address. + region: + type: string + nullable: true + description: Region of the customer address. + country: + type: string + nullable: true + description: Country of the customer address. + postalCode: + type: string + nullable: true + description: Postal code or zip code. + required: + - type + definitions: + accountingAddressType: + description: The type of the address + type: string + enum: + - Unknown + - Billing + - Delivery + phoneNumbers: + type: array + nullable: true + description: An array of phone numbers. + items: + title: Phone + type: object + x-internal: true + properties: + number: + type: string + nullable: true + examples: + - +44 25691 154789 + - (877) 492-8687 + - 01224 658 999 + description: A phone number. + type: + description: The type of phone number + type: string + enum: + - Primary + - Landline + - Mobile + - Fax + - Unknown + required: + - type + webLinks: + type: array + nullable: true + description: An array of weblinks. + items: + title: Weblink + description: Weblink associated with the company. + type: object + properties: + type: + description: The type of the weblink. + type: string + enum: + - Website + - Social + - Unknown + url: + description: The full URL for the weblink. + type: string + format: url + example: + type: Website + url: 'https://codat.io' + ledgerLockDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: 'If set in the accounting software, the date (in the ISO 8601 date/time format) after which accounting transactions cannot be edited. Commonly used when books are closed at year-end.' + registrationNumber: + type: string + nullable: true + description: Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. + taxNumber: + type: string + nullable: true + description: Company tax number. + financialYearStartDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Start date of the financial year for the company. + baseCurrency: + type: string + nullable: true + description: Currency set in the accounting software of the linked company. Used by the currency rate. + sourceUrls: + type: object + additionalProperties: + type: string + nullable: true + nullable: true + description: |- + URL addresses for the accounting source. + + For example, for Xero integrations two URLs are returned. These have many potential use cases, such as [deep linking](https://developer.xero.com/documentation/api-guides/deep-link-xero). + createdDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date the linked company was created in the accounting software. + supplementalData: + $ref: '#/components/schemas/SupplementalData' examples: - - expiresIn: 86400 - accessToken: string - tokenType: Bearer + - companyName: ACME Corporation + accountingPlatformRef: 4444e827-401b-4925-92cb-d79086bf3b6b + companyLegalName: ACME Corporation Ltd. + addresses: + - type: Billing + line1: Warner House + line2: 98 Theobald's Road + city: London + region: '' + country: United Kingdom + postalcode: WC1X 8WB + - type: Unknown + line1: 123 Sierra Way + line2: '' + city: San Pablo + region: CA + country: '' + postalCode: '87999' + phoneNumbers: + - number: 010 1234 5678 + type: Landline + webLinks: + - type: Website + url: 'https://www.wbsl.com/' + ledgerLockDate: '2019-03-04T12:08:01.881Z' + registrationNumber: '1234567890' + taxNumber: GB 123456789 + financialYearStartDate: '2019-04-01T00:00:00Z' + baseCurrency: USD + sourceUrls: + url1: 'https://go.xero.com/organisationlogin/default.aspx?shortcode=!rxs0Q' + url2: 'https://reporting.xero.com/!rxs0Q' + createdDate: '2020-02-03T16:42:02Z' CompanyRequestBody: title: Create company request x-internal: true @@ -3873,14 +11055,78 @@ components: $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' required: - name - CompanyUpdateRequest: - title: Update company request - x-internal: true + CompanySyncStatus: + title: Company sync status type: object + additionalProperties: false + x-examples: + Success Data Pushed: + companyId: 20803807-4e9a-4cb7-b67b-9f889a3916e1 + syncId: aa4c9dfd-e945-4424-9628-9e724f14c267 + syncStatusCode: 2000 + syncStatus: Complete + errorMessage: '' + syncExceptionMessage: '' + syncUtc: '2023-01-24T14:15:22Z' + dataPushed: true + Success No Data Pushed: + companyId: 20803807-4e9a-4cb7-b67b-9f889a3916e1 + syncId: aa4c9dfd-e945-4424-9628-9e724f14c267 + syncStatusCode: 2040 + syncStatus: Complete + errorMessage: '' + syncExceptionMessage: '' + syncUtc: '2023-01-24T14:15:22Z' + dataPushed: false properties: - name: + companyId: type: string - description: Name of company being connected. + description: Unique identifier for your SMB in Codat. + example: d4d73051-ed31-42b6-99f6-d288cd940992 + nullable: true + syncId: + type: string + description: Unique identifier of the sync. + example: a6a22aff-a43a-411d-a910-2dae73217cce + nullable: true + syncStatusCode: + type: integer + format: int32 + description: Status code of the sync. + example: 2000 + syncStatus: + type: string + description: Text status of the sync. + examples: + - Complete + - PushError + - Started + - NotStarted + - Pushing + nullable: true + errorMessage: + type: string + description: Error message of the sync. + nullable: true + syncExceptionMessage: + type: string + description: Exception message of the sync. + nullable: true + syncUtc: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Datetime of the sync. + nullable: true + dataPushed: + type: boolean + description: Boolean of whether the sync resulted in data being pushed. + CompanyUpdateRequest: + title: Update company request + x-internal: true + type: object + properties: + name: + type: string + description: Name of company being connected. pattern: '^[A-Za-z0-9\s\-'',&@.,?!\s]+$' minLength: 1 example: Bank of Dave @@ -3888,42 +11134,9 @@ components: $ref: '#/components/schemas/CompanyRequestBody/properties/description' tags: $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' - CompanySyncSettings: - title: Company sync settings - type: object - properties: - companyId: - $ref: '#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId' - settings: - type: array - items: - $ref: '#/components/schemas/SyncSetting' - overridesDefaults: - type: boolean - description: 'Set to `True` if you want to override the default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings).' - CompanyWebhook: - title: Company webhook - type: object - properties: - id: - type: string - format: uuid - example: ba29118f-5406-4e59-b05c-ba307ca38d01 - description: Unique identifier of the event - eventType: - type: string - description: The type of event. - examples: - - company.created - - company.deleted - generatedDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC the event was generated in Codat. - payload: - $ref: '#/components/schemas/Company/definitions/companyDetails' Connection: title: Connection - description: "\uFEFFA connection represents a [company's](https://docs.codat.io/platform-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source.\n\nA company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to:\n\n- [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection.\n- [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections.\n- [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections.\nAny combination of accounting, banking, and commerce data connections is allowed.\n\nBefore you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview)." + description: "\uFEFFA connection represents a [company's](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source.\n\nA company can have multiple data connections depending on the type of data source it is connecting to. For example, a single company can link to:\n\n- [Accounting data](https://docs.codat.io/accounting-api/overview) - 1 active connection.\n- [Banking data](https://docs.codat.io/banking-api/overview) - Multiple active connections.\n- [Commerce data](https://docs.codat.io/commerce-api/overview) - Multiple active connections.\nAny combination of accounting, banking, and commerce data connections is allowed.\n\nBefore you can use a data connection to pull or push data, the company must grant you access to their business data by [linking the connection](https://docs.codat.io/auth-flow/overview)." type: object properties: id: @@ -3937,9 +11150,23 @@ components: type: string description: A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. sourceId: - $ref: '#/components/schemas/Branding/properties/sourceId' + type: string + format: uuid + example: 35b92968-9851-4095-ad60-395c95cbcba4 + description: 'A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`.' sourceType: - $ref: '#/components/schemas/Integration/definitions/sourceType' + title: Source Type + description: The type of platform of the connection. + type: string + enum: + - Accounting + - Banking + - BankFeed + - Commerce + - Expense + - Other + - Unknown + example: Accounting platformName: type: string description: Name of integration connected to company. @@ -3951,10 +11178,10 @@ components: status: $ref: '#/components/schemas/Connection/definitions/dataConnectionStatus' lastSync: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' nullable: true created: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' dataConnectionErrors: type: array nullable: true @@ -3999,7 +11226,7 @@ components: type: string description: A message about a error returned by Codat. erroredOnUtc: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' status: title: Error status description: The current status of a transient error. Null statuses indicate that the error is not transient. @@ -4011,7 +11238,7 @@ components: resolvedOnUtc: description: The datetime in Utc that the error was resolved. nullable: true - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' dataConnectionSourceType: title: Source Type description: The type of platform of the connection. @@ -4036,29 +11263,6 @@ components: lastSync: '2022-10-27T10:22:43.6464237Z' created: '2022-10-27T09:53:29Z' sourceType: Banking - ConnectionManagementAccessToken: - title: Access token - type: object - properties: - accessToken: - type: string - nullable: false - description: Access token that allows SMBs to manage connections that have access to their data. - example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c - ConnectionManagementAllowedOrigins: - title: Allowed origins - type: object - properties: - allowedOrigins: - type: array - description: 'An array of allowed origins (i.e. your domains) to permit cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)).n resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)).' - items: - type: string - format: uri - description: A domain you want to allow CORS with Codat. - example: - allowedOrigins: - - 'https://www.bank-of-dave.com' Connections: title: Connections x-internal: true @@ -4070,446 +11274,295 @@ components: items: $ref: '#/components/schemas/Connection' - $ref: '#/components/schemas/PagingInfo' - ConnectionWebhook: - title: Connection webhook + CreateAccountResponse: + title: Create account response + x-internal: true + allOf: + - type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/Account' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + CreateAdjustmentRequest: + title: Create adjustment request + x-internal: true + type: array + minItems: 1 + maxItems: 50 + items: + $ref: '#/components/schemas/AdjustmentTransactionRequest' + CreateBankAccountResponse: + title: Create bank account response + x-internal: true + allOf: + - type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/BankAccount' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + CreateCustomerResponse: + title: Create customer response + x-internal: true + allOf: + - type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/Customer' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + CreateExpenseRequest: + title: Create expense request + x-internal: true + type: array + minItems: 1 + maxItems: 50 + items: + $ref: '#/components/schemas/ExpenseTransaction' + CreateExpenseResponse: + title: Create expense response + x-internal: true type: object properties: - id: + syncId: type: string + example: cd937d46-8e41-43a9-9477-a79158ffd98a format: uuid - example: ba29118f-5406-4e59-b05c-ba307ca38d01 - description: Unique identifier of the event. - eventType: - type: string - description: The type of event. - examples: - - connection.created - - connection.connected - - connection.disconnected - - connection.reconnected - - connection.deleted - - connection.failed - generatedDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC the event was generated in Codat. - payload: - $ref: '#/components/schemas/ConnectionWebhook/definitions/connectionWebhookPayload' - definitions: - connectionWebhookPayload: - title: Connection webhook payload - type: object - properties: - referenceCompany: - $ref: '#/components/schemas/Company/definitions/companyReference' - connection: - $ref: '#/components/schemas/Connection' - CreateApiKey: - title: Create API key - description: Details about the newly created API key. + description: Unique id of sync created + CreateReimbursableExpenseResponse: + title: Create reimbursable expense response x-internal: true type: object properties: - name: - $ref: '#/components/schemas/ApiKeyDetails/allOf/0/properties/name' - CustomDataTypeConfiguration: - title: Custom data type configuration - type: object - description: Client's configuration details for a specific custom data type and platform pair. - properties: - dataSource: + syncId: type: string - description: Underlying endpoint of the source platform that will serve as a data source for the custom data type. This value is not validated by Codat. - requiredData: - type: object - description: Properties required to be fetched from the underlying platform for the custom data type that is being configured. This value is not validated by Codat. - additionalProperties: - type: string - description: The client's defined name for the property with the value being the source system's property name which the mapping is targeting. - keyBy: - type: array - description: An array of properties from the source system that can be used to uniquely identify the records returned for the custom data type. This value is not validated by Codat. - items: - type: string - minLength: 1 - sourceModifiedDate: - type: array - nullable: true - items: - type: string - description: Property in the source platform nominated by the client that defines the date when a record was last modified there. This value is not validated by Codat. - examples: - - dataSource: api/purchaseOrders?$filter=currencyCode eq 'NOK' - requiredData: - currencyCode: '$[*].currencyCode' - id: '$[*].id' - number: '$[*].number' - orderDate: '$[*].orderDate' - totalAmountExcludingTax: '$[*].totalAmountExcludingTax' - totalTaxAmount: '$[*].totalTaxAmount' - vendorName: '$[*].number' - keyBy: - - '$[*].id' - sourceModifiedDate: - - '$[*].lastModifiedDateTime' - CustomDataTypeRecords: - title: Custom data type records - type: object - description: Resulting records pulled from the source platform for a specific custom data type. - properties: - results: - type: array - items: - $ref: '#/components/schemas/CustomDataTypeRecords/definitions/customDataTypeRecord' - pageNumber: - $ref: '#/components/schemas/PagingInfo/properties/pageNumber' - pageSize: - $ref: '#/components/schemas/PagingInfo/properties/pageSize' - totalResults: - $ref: '#/components/schemas/PagingInfo/properties/totalResults' - definitions: - customDataTypeRecord: - title: Custom data type record - type: object + example: cd937d46-8e41-43a9-9477-a79158ffd98a + format: uuid + description: Unique id of sync created + CreateSupplierResponse: + title: Create supplier response + x-internal: true + allOf: + - type: object properties: - id: - type: string - nullable: false - description: Unique identifier of the record. - content: - type: object - description: Values from the source system for the properties defined in the custom data type configuration. - additionalProperties: - type: object - modifiedDate: - title: ModifiedDate - x-internal: true - type: object - properties: - modifiedDate: - allOf: - - $ref: '#/components/schemas/DateTime' - - description: |- - The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. - - Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. + data: + allOf: + - $ref: '#/components/schemas/Supplier' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + Customer: + title: 'Accounting: Customer' + description: | + ## Overview - This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). + A customer is a person or organisation that buys goods or services. From the Customers endpoints, you can retrieve a [list of all the customers of a company](https://api.codat.io/swagger/index.html#/Customers/get_companies__companyId__data_customers). - In Codat's data model, dates and times are represented using the ISO 8601 standard. - DataStatus: - title: Data status - description: Describes the state of data in the Codat cache for a company and data type + Customers' data links to accounts receivable [invoices](https://docs.codat.io/sync-for-expenses-api#/schemas/Invoice). type: object + allOf: + - type: object + properties: + id: + type: string + description: 'Identifier for the customer, unique to the company in the accounting software.' + customerName: + type: string + nullable: true + description: 'Name of the customer as recorded in the accounting system, typically the company name.' + contactName: + type: string + nullable: true + description: Name of the main contact for the identified customer. + emailAddress: + type: string + nullable: true + description: Email address the customer can be contacted by. + defaultCurrency: + $ref: '#/components/schemas/Account/definitions/accountPrototype/properties/currency' + description: Default currency the transactional data of the customer is recorded in. + phone: + type: string + nullable: true + description: Phone number the customer can be contacted by. + addresses: + type: array + nullable: true + description: An array of Addresses. + items: + $ref: '#/components/schemas/CompanyInformation/properties/addresses/items' + contacts: + type: array + nullable: true + description: An array of Contacts. + items: + $ref: '#/components/schemas/Customer/definitions/contact' + registrationNumber: + type: string + nullable: true + description: 'Company number. In the UK, this is typically the Companies House company registration number.' + taxNumber: + type: string + nullable: true + description: Company tax number. + status: + $ref: '#/components/schemas/Customer/definitions/customerStatus' + description: Current state of the customer. + metadata: + $ref: '#/components/schemas/Account/allOf/2/properties/metadata' + supplementalData: + $ref: '#/components/schemas/SupplementalData' + - $ref: '#/components/schemas/Account/allOf/3' required: - - dataType - - currentStatus - properties: - dataType: - title: Data types - x-internal: true - type: string - description: Available data types - enum: - - accountTransactions - - balanceSheet - - bankAccounts - - bankTransactions - - billCreditNotes - - billPayments - - bills - - cashFlowStatement - - chartOfAccounts - - company - - creditNotes - - customers - - directCosts - - directIncomes - - invoices - - itemReceipts - - items - - journalEntries - - journals - - paymentMethods - - payments - - profitAndLoss - - purchaseOrders - - salesOrders - - suppliers - - taxRates - - trackingCategories - - transfers - - banking-accountBalances - - banking-accounts - - banking-transactionCategories - - banking-transactions - - commerce-companyInfo - - commerce-customers - - commerce-disputes - - commerce-locations - - commerce-orders - - commerce-paymentMethods - - commerce-payments - - commerce-productCategories - - commerce-products - - commerce-taxComponents - - commerce-transactions - example: invoices - lastSuccessfulSync: - $ref: '#/components/schemas/DateTime' - currentStatus: - $ref: '#/components/schemas/PullOperation/properties/status' - latestSyncId: - type: string - description: Unique identifier for most recent sync of data type. - format: uuid - example: ad474a37-2003-478e-baee-9af9f1ec2fe3 - latestSuccessfulSyncId: - type: string - description: Unique identifier for the most recent successful sync of data type. - format: uuid - example: 8220fc90-55b6-47bc-9417-48ac6ea93101 - examples: - - dataType: string - lastSuccessfulSync: '2022-01-01T13:00:00.000Z' - currentStatus: string - latestSyncId: ad474a37-2003-478e-baee-9af9f1ec2fe3 - latestSuccessfulSyncId: 8220fc90-55b6-47bc-9417-48ac6ea93101 - DataStatuses: - title: Data statuses - x-internal: true - type: object - properties: - accountTransactions: - $ref: '#/components/schemas/DataStatus' - nullable: true - balanceSheet: - $ref: '#/components/schemas/DataStatus' - nullable: true - bankAccounts: - $ref: '#/components/schemas/DataStatus' - nullable: true - bankTransactions: - $ref: '#/components/schemas/DataStatus' - nullable: true - billCreditNotes: - $ref: '#/components/schemas/DataStatus' - nullable: true - billPayments: - $ref: '#/components/schemas/DataStatus' - nullable: true - bills: - $ref: '#/components/schemas/DataStatus' - nullable: true - cashFlowStatement: - $ref: '#/components/schemas/DataStatus' - nullable: true - chartOfAccounts: - $ref: '#/components/schemas/DataStatus' - nullable: true - company: - $ref: '#/components/schemas/DataStatus' - nullable: true - creditNotes: - $ref: '#/components/schemas/DataStatus' - nullable: true - customers: - $ref: '#/components/schemas/DataStatus' - nullable: true - directCosts: - $ref: '#/components/schemas/DataStatus' - nullable: true - directIncomes: - $ref: '#/components/schemas/DataStatus' - nullable: true - invoices: - $ref: '#/components/schemas/DataStatus' - nullable: true - itemReceipts: - $ref: '#/components/schemas/DataStatus' - nullable: true - items: - $ref: '#/components/schemas/DataStatus' - nullable: true - journalEntries: - $ref: '#/components/schemas/DataStatus' - nullable: true - journals: - $ref: '#/components/schemas/DataStatus' - nullable: true - paymentMethods: - $ref: '#/components/schemas/DataStatus' - nullable: true - payments: - $ref: '#/components/schemas/DataStatus' - nullable: true - profitAndLoss: - $ref: '#/components/schemas/DataStatus' - nullable: true - purchaseOrders: - $ref: '#/components/schemas/DataStatus' - nullable: true - salesOrders: - $ref: '#/components/schemas/DataStatus' - nullable: true - suppliers: - $ref: '#/components/schemas/DataStatus' - nullable: true - taxRates: - $ref: '#/components/schemas/DataStatus' - nullable: true - trackingCategories: - $ref: '#/components/schemas/DataStatus' - nullable: true - transfers: - $ref: '#/components/schemas/DataStatus' - nullable: true - banking-accountBalances: - $ref: '#/components/schemas/DataStatus' - nullable: true - banking-accounts: - $ref: '#/components/schemas/DataStatus' - nullable: true - banking-transactionCategories: - $ref: '#/components/schemas/DataStatus' - nullable: true - banking-transactions: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-companyInfo: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-customers: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-disputes: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-locations: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-orders: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-paymentMethods: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-payments: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-productCategories: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-products: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-taxComponents: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-transactions: - $ref: '#/components/schemas/DataStatus' - nullable: true - DataType: - x-internal: true - $ref: '#/components/schemas/DataStatus/properties/dataType' - DataTypeWriteWebhook: - title: Write data type webhook - type: object - properties: - id: - type: string - format: uuid - example: ba29118f-5406-4e59-b05c-ba307ca38d01 - description: Unique identifier of the event. - eventType: - type: string - description: The type of event. - examples: - - bills.write.successful - - bills.write.unsuccessful - generatedDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC the event was generated in Codat. - payload: - $ref: '#/components/schemas/DataTypeWriteWebhook/definitions/dataTypeWriteWebhookPayload' + - status definitions: - dataTypeWriteWebhookPayload: - title: Payload + accountingCustomerRef: type: object properties: id: + minLength: 1 type: string - description: Unique identifier of the write request. This is also known as the push operation ID. - type: - $ref: '#/components/schemas/DataTypeWriteWebhook/definitions/writeType' - referenceCompany: - $ref: '#/components/schemas/Company/definitions/companyReference' - connectionId: - $ref: '#/components/parameters/connectionId/schema' - requestedOnDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC the write request was submitted. - completedOnDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC the write request completed. - status: - $ref: '#/components/schemas/DataTypeWriteWebhook/definitions/writeStatus' - record: - $ref: '#/components/schemas/DataTypeWriteWebhook/definitions/dataTypeWriteWebhookRecord' - nullable: true - attachmentId: + description: '`id` from the Customers data type' + companyName: type: string nullable: true - description: 'Unique identifier for the uploaded attachment, null if no attachment uploaded.' - dataTypeWriteWebhookRecord: + description: '`customerName` from the Customer data type' + required: + - id + customerStatus: + description: Status of customer. + type: string + enum: + - Unknown + - Active + - Archived + contact: type: object properties: - id: + name: + type: string + nullable: true + description: Name of a contact for a customer. + email: type: string - description: 'The unique identifier of the data type created, updated, deleted, or had an attachment uploaded in the accounting platform.' - writeType: - title: Write type - description: Type of write request. + nullable: true + description: Email of a contact for a customer. + phone: + type: array + nullable: true + description: An array of Phone numbers. + items: + $ref: '#/components/schemas/CompanyInformation/properties/phoneNumbers/items' + address: + $ref: '#/components/schemas/CompanyInformation/properties/addresses/items' + description: An object of Address information. + status: + $ref: '#/components/schemas/Customer/definitions/customerStatus' + modifiedDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + required: + - status + Customers: + title: Customers + x-internal: true + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/Customer' + - $ref: '#/components/schemas/PagingInfo' + DataStatus: + title: Data status + description: Describes the state of data in the Codat cache for a company and data type + type: object + required: + - dataType + - currentStatus + properties: + dataType: + title: Data types + x-internal: true type: string + description: Available data types enum: - - Create - - Update - - Delete - - UploadAttachment - writeStatus: - title: Write request status + - accountTransactions + - balanceSheet + - bankAccounts + - bankTransactions + - billCreditNotes + - billPayments + - bills + - cashFlowStatement + - chartOfAccounts + - company + - creditNotes + - customers + - directCosts + - directIncomes + - invoices + - itemReceipts + - items + - journalEntries + - journals + - paymentMethods + - payments + - profitAndLoss + - purchaseOrders + - salesOrders + - suppliers + - taxRates + - trackingCategories + - transfers + - banking-accountBalances + - banking-accounts + - banking-transactionCategories + - banking-transactions + - commerce-companyInfo + - commerce-customers + - commerce-disputes + - commerce-locations + - commerce-orders + - commerce-paymentMethods + - commerce-payments + - commerce-productCategories + - commerce-products + - commerce-taxComponents + - commerce-transactions + example: invoices + lastSuccessfulSync: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + currentStatus: + $ref: '#/components/schemas/PullOperation/properties/status' + latestSyncId: type: string - enum: - - Pending - - Failed - - Success - - TimedOut - description: 'The current status of the write request, which is the same as the push operation status.' - DateTime: - title: Date time - type: string + description: Unique identifier for most recent sync of data type. + format: uuid + example: ad474a37-2003-478e-baee-9af9f1ec2fe3 + latestSuccessfulSyncId: + type: string + description: Unique identifier for the most recent successful sync of data type. + format: uuid + example: 8220fc90-55b6-47bc-9417-48ac6ea93101 examples: - - '2022-10-23T00:00:00Z' - - '2022-10-23' - description: |- - In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - - ``` - 2020-10-08T22:40:50Z - 2021-01-01T00:00:00 - ``` - - - - When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - - - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - - Unqualified local time: `2021-11-15T01:00:00` - - UTC time offsets: `2021-11-15T01:00:00-05:00` - - > Time zones - > - > Not all dates from Codat will contain information about time zones. - > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. + - dataType: string + lastSuccessfulSync: '2022-01-01T13:00:00.000Z' + currentStatus: string + latestSyncId: ad474a37-2003-478e-baee-9af9f1ec2fe3 + latestSuccessfulSyncId: 8220fc90-55b6-47bc-9417-48ac6ea93101 + DataStatusResponse: + x-internal: true + title: Data status response + type: object + additionalProperties: + $ref: '#/components/schemas/DataStatus' + DataType: + x-internal: true + $ref: '#/components/schemas/DataStatus/properties/dataType' ErrorMessage: title: Error message type: object @@ -4568,147 +11621,319 @@ components: type: string nullable: true description: Name of validator. - Integration: - title: Integration - description: An integration that Codat supports - examples: - - key: gbol - logoUrl: 'http://example.com' - name: Xero - enabled: true - sourceId: accounting - sourceType: 8193a927-ab7a-45a3-9dc2-d357a4932dfe - integrationId: 497a18ca-284e-40c0-985d-f72be35d468e - isOfflineConnector: true - isBeta: true - dataProvidedBy: string - datatypeFeatures: - - datatype: invoices - supportedFeatures: - - featureType: get - featureState: release + ExpenseContactRef: type: object + title: Supplier/customer reference + x-internal: true properties: - key: - $ref: '#/components/parameters/platformKey/schema' - logoUrl: - type: string - format: uri - description: Static url for integration's logo. - name: + id: type: string - example: Xero - description: Name of integration. - enabled: - type: boolean - description: Whether this integration is enabled for your customers to use. - sourceId: - $ref: '#/components/schemas/Branding/properties/sourceId' - sourceType: - $ref: '#/components/schemas/Integration/definitions/sourceType' - integrationId: - $ref: '#/components/schemas/Connection/properties/integrationId' - isOfflineConnector: - type: boolean - description: '`True` if the integration is to an application installed and run locally on an SMBs computer.' - isBeta: - type: boolean - description: '`True` if the integration is currently in beta release.' - dataProvidedBy: + example: 40e3e57c-2322-4898-966c-ca41adfd23fd + description: Identifier of supplier or customer. + type: type: string - description: The name of the data provider. - datatypeFeatures: - type: array - items: - $ref: '#/components/schemas/Integration/definitions/dataTypeFeature' + description: The type of contact. + example: Supplier + default: Supplier + enum: + - Supplier required: - - key - - logoUrl - - name - - enabled - definitions: - sourceType: - title: Source Type - description: The type of platform of the connection. + - id + ExpensesSyncWebhook: + title: Expenses sync webhook + type: object + properties: + id: type: string - enum: - - Accounting - - Banking - - BankFeed - - Commerce - - Expense - - Other - - Unknown - example: Accounting - dataTypeFeature: - title: Data type feature - description: Describes support for a given datatype and associated operations + format: uuid + example: ba29118f-5406-4e59-b05c-ba307ca38d01 + description: Unique identifier of the event. + eventType: + type: string + description: The type of event. + examples: + - expenses.sync.successful + - expenses.sync.unsuccessful + generatedDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: The date time in UTC the event was generated in Codat. + payload: + $ref: '#/components/schemas/ExpensesSyncWebhook/definitions/expensesSyncWebhookPayload' + definitions: + transaction: + title: Transaction type: object properties: - dataType: - $ref: '#/components/schemas/DataStatus/properties/dataType' - supportedFeatures: + id: + type: string + description: Unique identifier of the transaction. + status: + type: string + enum: + - Unknown + - PushError + - Completed + - Failed + - Pending + description: Status of transaction. + errorMessage: + type: string + nullable: true + description: Error message for failed transaction. + expensesSyncWebhookPayload: + title: Expenses sync webhook payload + type: object + properties: + referenceCompany: + $ref: '#/components/schemas/Company/definitions/companyReference' + syncId: + type: string + description: Unique identifier of the sync. + transactions: type: array items: - $ref: '#/components/schemas/Integration/definitions/supportedFeature' - required: - - datatype - - supportedFeatures - examples: - - datatype: invoices - supportedFeatures: - - featureType: Get - featureState: Release - supportedFeature: + $ref: '#/components/schemas/ExpensesSyncWebhook/definitions/transaction' + ExpenseTransaction: + title: Expense transaction + type: object + properties: + id: + type: string + example: 4d7c6929-7770-412b-91bb-44d3bc71d111 + format: uuid + description: Your unique identifier for the transaction. + type: + type: string + example: Payment + description: The type of transaction. + enum: + - Payment + - Refund + - Reward + - Chargeback + issueDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date of the transaction was recorded. + currency: + type: string + example: GBP + description: Currency the transaction was recorded in. + currencyRate: + title: Currency rate + type: number + format: decimal + nullable: true + description: |- + Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. + + Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. + + It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR. + + Where the currency rate is provided by the underlying accounting software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). + + For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. + + ## Examples with base currency of GBP + + | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | + | :--------------- | :------------- | :------------ | :------------------------- | + | **USD** | $20 | 0.781 | £15.62 | + | **EUR** | €20 | 0.885 | £17.70 | + | **RUB** | ₽20 | 0.011 | £0.22 | + + ## Examples with base currency of USD + + | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | + | :--------------- | :------------- | :------------ | :------------------------- | + | **GBP** | £20 | 1.277 | $25.54 | + | **EUR** | €20 | 1.134 | $22.68 | + | **RUB** | ₽20 | 0.015 | $0.30 | + + + ### Integration-specific details + + | Integration | Scenario | System behavior | + |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| + | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. | + contactRef: + description: Supplier or customer for the purchase to be associated to. + $ref: '#/components/schemas/ExpenseContactRef' + bankAccountRef: type: object - x-internal: true + title: Bank account reference properties: - featureType: - $ref: '#/components/schemas/Integration/definitions/featureType' - featureState: - $ref: '#/components/schemas/Integration/definitions/featureState' - required: - - featureType - - featureState - featureState: - title: Feature state + id: + type: string + example: 787dfb37-5707-4dc0-8a86-8d74e4cc78ea + description: Identifier of the bank account. + reference: type: string - example: Release - description: The current release state of the feature. - enum: - - Release - - Alpha - - Beta - - Deprecated - - NotSupported - - NotImplemented - featureType: + nullable: true + description: User-friendly reference for the expense transaction. + merchantName: type: string - x-internal: true - description: The type of feature. + example: Amazon UK + description: Name of the merchant where the purchase took place + lines: + type: array + description: Array of transaction lines. + minItems: 1 + maxItems: 100 + items: + $ref: '#/components/schemas/ExpenseTransactionLine' + notes: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + postAsDraft: + type: boolean + nullable: true + description: 'This optional property, when set to true, posts the transaction to a drafted state. Note that postAsDraft is only supported in Microsoft Dynamics 365 Business Central.' + required: + - id + - type + - issueDate + - currency + examples: + - id: a44135b0-6882-489a-83fe-a0c57a4afb19 + type: Payment + issueDate: '2024-05-21T00:00:00+00:00' + currency: GBP + currencyRate: 1 + contactRef: + id: '430' + type: Supplier + bankAccountRef: + id: '97' + merchantName: Amazon UK + notes: amazon purchase + lines: + - netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_3 + - dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + ExpenseTransactionLine: + x-internal: true + title: Expense transaction line + type: object + x-examples: + ExpenseTransactionLine: + netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 08d37c46-8d5d-441b-8bad-76286c43047e + accountRef: + id: 16989b16-96d4-401a-9054-f5c620c655a6 + trackingRefs: + - id: e9a1b63d-9ff0-40e7-8038-016354b987e6 + invoiceTo: + id: 80000002-1674552702 + type: customer + properties: + netAmount: + type: number + format: decimal + example: 100 + description: 'Amount of the line, exclusive of tax.' + taxAmount: + type: number + format: decimal + example: 20 + description: Amount of tax for the line. + taxRateRef: + $ref: '#/components/schemas/RecordRef' + accountRef: + description: The `accountRef` contains the `id` of the account the transaction is against. The `accountRef` object is required for all integrations except QBD which currently supports either itemRef or accountRef. + $ref: '#/components/schemas/RecordRef' + itemRef: + $ref: '#/components/schemas/ItemRef' + trackingRefs: + type: array + minItems: 1 + maxItems: 10 + nullable: true + items: + $ref: '#/components/schemas/TrackingRef' + invoiceTo: + $ref: '#/components/schemas/InvoiceTo' + required: + - netAmount + IntegrationType: + title: Integration type + x-internal: true + type: string + description: Type of transaction that has been processed e.g. Expense or Bank Feed. + enum: + - expenses + - bankfeeds + default: expenses + example: expenses + nullable: true + InvoiceTo: + title: Billable customer reference + x-internal: true + type: object + nullable: true + description: Unique identifier for the customer billed for the transaction. The `invoiceTo` object is currently supported only for QuickBooks Online and QuickBooks Desktop. + properties: + id: + type: string + example: 80000002-1674552702 + description: identifier of customer. + type: + type: string + example: customer + description: The type of contact. enum: - - Get - - Post - - Categorization - - Delete - - Put - - GetAsPdf - - DownloadAttachment - - GetAttachment - - GetAttachments - - UploadAttachment - example: Get - Integrations: - title: Integrations + - customer + ItemRef: x-internal: true - allOf: - - type: object - properties: - results: - type: array - items: - $ref: '#/components/schemas/Integration' - - $ref: '#/components/schemas/PagingInfo' + type: object + title: Item reference + nullable: true + properties: + id: + type: string + example: 80000002-1675158984 + description: 'Unique identifier for the item associated with the transaction. The `itemRef` object is currently supported only for QuickBooks Desktop. You can specify either `itemRef` or `accountRef`, but not both.' + MappingOptions: + title: Mapping options + type: object + additionalProperties: false + x-examples: {} + properties: + expenseProvider: + type: string + description: Name of the expense integration. + example: Partner Expense + nullable: true + accounts: + type: array + description: Array of available accounts for mapping. + nullable: true + items: + $ref: '#/components/schemas/AccountMappingInfo' + trackingCategories: + type: array + description: Array of available tracking categories for mapping. + nullable: true + items: + $ref: '#/components/schemas/TrackingCategoryMappingInfo' + taxRates: + type: array + description: Array of available tax rates for mapping. + nullable: true + items: + $ref: '#/components/schemas/TaxRateMappingInfo' PagingInfo: type: object title: Pagination information @@ -4760,67 +11985,15 @@ components: - pageSize - totalResults - _links - examples: - - pageNumber: 1 - pageSize: 10 - totalResults: 1 - _links: - self: - href: '/companies/{id}/data/{dataType}' - current: - href: '/companies/{id}/data/{dataType}?page=1&pageSize=10' - Profile: - title: Profile - description: Describes your Codat client instance - examples: - - name: Bob's Burgers - logoUrl: 'https://client-images.codat.io/logo/042399f5-d104-4f38-9ce8-cac3524f4e88_5806cb1f-7342-4c0e-a0a8-99bfbc47b0ff.png' - iconUrl: 'https://client-images.codat.io/icon/042399f5-d104-4f38-9ce8-cac3524f4e88_3f5623af-d992-4c22-bc08-e58c520a8526.ico' - redirectUrl: 'https://bobs-burgers.{countrySuffix}/{companyId}' - whiteListUrls: - - 'https://bobs-burgers.com' - - 'https://bobs-burgers.co.uk' - confirmCompanyName: true - type: object - properties: - name: - type: string - example: Bob's Burgers - description: The name given to the instance. - logoUrl: - type: string - description: Static url to your organization's logo. - example: 'https://client-images.codat.io/logo/042399f5-d104-4f38-9ce8-cac3524f4e88_5806cb1f-7342-4c0e-a0a8-99bfbc47b0ff.png' - iconUrl: - type: string - description: Static url to your organization's icon. - example: 'https://client-images.codat.io/icon/042399f5-d104-4f38-9ce8-cac3524f4e88_3f5623af-d992-4c22-bc08-e58c520a8526.ico' - redirectUrl: - type: string - example: 'https://bobs-burgers.{countrySuffix}/{companyId}' - description: 'The redirect URL pasted on to the SMB once Codat''s [Hosted Link](https://docs.codat.io/auth-flow/authorize-hosted-link) has been completed by the SMB.' - whiteListUrls: - type: array - description: A list of urls that are allowed to communicate with Codat. If empty any url is allowed to communicate with Codat. - items: - type: string - format: uri - example: 'https://bobs-burgers.com' - description: A url that is allowed to communicate with Codat. - apiKey: - type: string - deprecated: true - example: sartANTjHAkLdbyDfaynoTQb7pkmj6hXHmnQKMrB - description: The API key for this Codat instance. - confirmCompanyName: - type: boolean - deprecated: true - description: '`True` if the company name has been confirmed.' - required: - - name - - redirectUrl - x-stoplight: - id: b1fyq05edangf + examples: + - pageNumber: 1 + pageSize: 10 + totalResults: 1 + _links: + self: + href: '/companies/{id}/data/{dataType}' + current: + href: '/companies/{id}/data/{dataType}?page=1&pageSize=10' PullOperation: title: Pull operation description: |- @@ -4884,9 +12057,9 @@ components: nullable: true description: A message about a transient or persistent error returned by Codat or the source platform. requested: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' completed: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' progress: type: integer description: An integer signifying the progress of the pull operation. @@ -4943,7 +12116,7 @@ components: $ref: '#/components/schemas/DataStatus/properties/dataType' description: 'The type of data being pushed, eg invoices, customers.' companyId: - $ref: '#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId' + $ref: '#/components/parameters/companyId/schema' pushOperationKey: type: string format: uuid @@ -4951,10 +12124,10 @@ components: dataConnectionKey: $ref: '#/components/parameters/connectionId/schema' requestedOnUtc: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' description: The datetime when the push was requested. completedOnUtc: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' description: 'The datetime when the push was completed, null if Pending.' timeoutInMinutes: type: integer @@ -5198,327 +12371,932 @@ components: $ref: '#/components/schemas/PushOption/definitions/pushOptionProperty/properties/description' required: $ref: '#/components/schemas/PushOption/definitions/pushOptionProperty/properties/required' - ReadCompletedWebhook: - title: Read completed webhook + RecordRef: + x-internal: true type: object + title: Record reference properties: id: type: string - format: uuid - example: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - description: Unique identifier of the event. - eventType: + example: 40e3e57c-2322-4898-966c-ca41adfd23fd + description: Identifier of linked reference from mapping options. + ReimbursableExpenseTransactionLine: + x-internal: true + title: Reimbursable expense transaction line + type: object + properties: + description: type: string - description: The type of event. - generatedDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC the event was generated in Codat. - payload: - $ref: '#/components/schemas/ReadCompletedWebhook/definitions/readCompletedWebhookPayload' + example: 2-night hotel stay + description: line description + netAmount: + type: number + format: decimal + example: 100 + description: 'Amount of the line, exclusive of tax.' + taxAmount: + type: number + format: decimal + example: 20 + description: Amount of tax for the line. + taxRateRef: + $ref: '#/components/schemas/RecordRef' + accountRef: + description: The `accountRef` contains the `id` of the account the transaction is against. The `accountRef` object is required for all integrations except QBD which currently supports either itemRef or accountRef. + $ref: '#/components/schemas/RecordRef' + itemRef: + $ref: '#/components/schemas/ItemRef' + trackingRefs: + type: array + minItems: 1 + maxItems: 10 + nullable: true + items: + $ref: '#/components/schemas/TrackingRef' + invoiceTo: + $ref: '#/components/schemas/InvoiceTo' + required: + - netAmount + ReimbursableExpenseTransactionRequest: + title: Reimbursable expense transaction request + type: array + minItems: 1 + maxItems: 50 + items: + $ref: '#/components/schemas/ReimbursableExpenseTransactionRequest/definitions/reimbursableExpenseTransaction' definitions: - readCompletedWebhookPayload: - title: Read result webhook payload + reimbursableExpenseTransaction: + title: Reimbursable expense transaction type: object properties: - referenceCompany: - $ref: '#/components/schemas/Company/definitions/companyReference' - modifiedFromDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC when the data types were last fetched and input into Codat's cache. + id: + type: string + example: 4d7c6929-7770-412b-91bb-44d3bc71d111 + format: uuid + description: Your unique identifier for the transaction. + reference: + type: string nullable: true - dataTypes: + description: User-friendly reference for the reimbursable expense. + contactRef: + $ref: '#/components/schemas/ReimbursementContactRef' + apAccountRef: + $ref: '#/components/schemas/apAccountRef' + issueDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date of the transaction was recorded. + dueDate: + description: Date the supplier is due to be paid. + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + currency: + type: string + example: GBP + description: Currency the transaction was recorded in. + currencyRate: + $ref: '#/components/schemas/ExpenseTransaction/properties/currencyRate' + notes: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: type: array + description: Array of transaction lines. + minItems: 1 + maxItems: 100 items: - $ref: '#/components/schemas/ReadCompletedWebhook/definitions/dataTypeReadSummary' - dataTypeReadSummary: - title: Summary of data type reads + $ref: '#/components/schemas/ReimbursableExpenseTransactionLine' + required: + - id + - contactRef + - issueDate + - dueDate + - currency + ReimbursementContactRef: + type: object + title: Contact reference + x-internal: true + properties: + id: + type: string + example: 40e3e57c-2322-4898-966c-ca41adfd23fd + description: Identifier of contact. + required: + - id + SupplementalData: + title: Supplemental data + type: object + x-internal: true + description: |- + Supplemental data is additional data you can include in our standard data types. + + It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. + properties: + content: type: object + additionalProperties: + type: object + additionalProperties: true + nullable: true + Supplier: + title: 'Accounting: Supplier' + description: |- + ## Overview + + From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/sync-for-expenses-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/sync-for-expenses-api#/schemas/Bill). + type: object + allOf: + - type: object properties: - connectionId: - $ref: '#/components/parameters/connectionId/schema' - dataType: - $ref: '#/components/schemas/DataStatus/properties/dataType' - recordsModified: - type: boolean - example: false - description: '`True` if records have been created, updated or deleted in Codat''s cache.' - status: - $ref: '#/components/schemas/PullOperation/properties/status' - issues: + id: + type: string + description: 'Identifier for the supplier, unique to the company in the accounting software.' + supplierName: + type: string + nullable: true + description: 'Name of the supplier as recorded in the accounting system, typically the company name.' + contactName: + type: string + nullable: true + description: Name of the main contact for the supplier. + emailAddress: + type: string + nullable: true + description: Email address that the supplier may be contacted on. + phone: + type: string + nullable: true + description: Phone number that the supplier may be contacted on. + examples: + - +44 25691 154789 + - (877) 492-8687 + - 01224 658 999 + addresses: type: array nullable: true - description: A array of issues encountered during a data read. + description: An array of Addresses. items: - $ref: '#/components/schemas/ReadCompletedWebhook/definitions/issue' - customProductReadCompleteWebhook: - title: Read completed webhook + $ref: '#/components/schemas/CompanyInformation/properties/addresses/items' + registrationNumber: + type: string + nullable: true + description: 'Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House.' + taxNumber: + type: string + nullable: true + description: Supplier's company tax number. + status: + $ref: '#/components/schemas/Supplier/definitions/supplierStatus' + defaultCurrency: + type: string + nullable: true + description: Default currency the supplier's transactional data is recorded in. + metadata: + $ref: '#/components/schemas/Account/allOf/2/properties/metadata' + supplementalData: + $ref: '#/components/schemas/SupplementalData' + - $ref: '#/components/schemas/Account/allOf/3' + required: + - status + definitions: + supplierRef: + title: Supplier reference + description: Reference to the supplier the record relates to. type: object properties: id: - $ref: '#/components/schemas/ReadCompletedWebhook/properties/id' - eventType: - $ref: '#/components/schemas/ReadCompletedWebhook/properties/eventType' - generatedDate: - $ref: '#/components/schemas/ReadCompletedWebhook/properties/generatedDate' - payload: - $ref: '#/components/schemas/ReadCompletedWebhook/definitions/customProductReadCompleteWebhookPayload' - customProductReadCompleteWebhookPayload: - title: Read result webhook payload - type: object + minLength: 1 + type: string + description: The supplier's unique ID + supplierName: + type: string + nullable: true + description: The supplier's name + required: + - id + supplierStatus: + description: Status of the supplier. + type: string + enum: + - Unknown + - Active + - Archived + examples: + - id: C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F + supplierName: Kelly's Industrial Supplies + contactName: Kelly's Industrial Supplies + emailAddress: sales@kellysupplies.com + phone: 07999 999999 + addresses: + - type: Billing + line1: Unit 51 + line2: Bakersfield Industrial Estate + city: Bakersfield + region: California + country: USA + postalcode: '93308' + registrationNumber: string + taxNumber: string + status: Unknown + defaultCurrency: string + metadata: + isDeleted: true + supplementalData: + content: + property1: + property1: null + property2: null + property2: + property1: null + property2: null + modifiedDate: '2022-10-23T00:00:00Z' + sourceModifiedDate: '2022-10-23T00:00:00Z' + Suppliers: + title: Suppliers + x-internal: true + allOf: + - type: object properties: - referenceCompany: - $ref: '#/components/schemas/Company/definitions/companyReference' - modifiedFromDate: - $ref: '#/components/schemas/ReadCompletedWebhook/definitions/readCompletedWebhookPayload/properties/modifiedFromDate' - dataTypes: + results: type: array - description: Contains all data types configured for the product or a subset of data types defined in the manual refresh call. items: - type: object - title: Summary of data type reads - properties: - connectionId: - $ref: '#/components/parameters/connectionId/schema' - dataType: - $ref: '#/components/schemas/DataStatus/properties/dataType' - recordsModified: - $ref: '#/components/schemas/ReadCompletedWebhook/definitions/dataTypeReadSummary/properties/recordsModified' - status: - $ref: '#/components/schemas/PullOperation/properties/status' - issues: - type: array - nullable: true - description: A array of issues encountered during a data read. - items: - $ref: '#/components/schemas/ReadCompletedWebhook/definitions/issue' - issue: - title: Issue + $ref: '#/components/schemas/Supplier' + - $ref: '#/components/schemas/PagingInfo' + SyncCompleteWebhook: + title: Sync complete webhook + x-internal: true + description: Webhook request body used to notify that a sync has completed. + type: object + properties: + ClientId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/ClientId' + ClientName: + $ref: '#/components/schemas/SyncFailedWebhook/properties/ClientName' + CompanyId: + $ref: '#/components/parameters/companyId/schema' + RuleId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/RuleId' + RuleType: + $ref: '#/components/schemas/SyncFailedWebhook/properties/RuleType' + AlertId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/AlertId' + Message: + $ref: '#/components/schemas/SyncFailedWebhook/properties/Message' + Data: + $ref: '#/components/schemas/SyncCompleteWebhook/definitions/SyncCompleteWebhookData' + definitions: + SyncCompleteWebhookData: type: object - description: Details of a problem encountered during a data read. + title: Sync complete webhook data properties: - type: - type: string - description: The type of issue. - example: warning.validation - message: - type: string - description: A message describing the issue. - example: Something doesn't look right about these accounts from Xero. You can see more information in the logs. - links: - title: Links - type: object - properties: - logs: - type: string - description: 'A link to the validation logs, providing details on any errors or warnings encountered.' - example: 'https://api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/sync/{datasetId}/validation' - portal: - type: string - description: A link to the company's past data read history in the Codat portal. - example: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/pull-history' - readMore: - type: string - description: A link to Codat's documentation with additional information on how to troubleshoot this issue. - example: 'https://docs.codat.io/using-the-api/get-data-troubleshooting#warning.validation' - SupplementalDataConfiguration: - description: '' - title: Supplemental data configuration + syncId: + $ref: '#/components/schemas/SyncFailedWebhook/definitions/SyncFailedWebhookData/properties/syncId' + syncType: + $ref: '#/components/schemas/SyncFailedWebhook/definitions/SyncFailedWebhookData/properties/syncType' + examples: + - ClientId: 30e0f9d2-52c0-4c9f-a806-bcd98a3bcd7e + ClientName: Expense Sync + CompanyId: 1f9559e7-8368-48c9-bdf4-f158e16b8b85 + AlertId: 33a4f8e9-09ae-4334-9b00-7bbe83024672 + RuleId: 5c27631d-3b63-4b50-8228-ee502fd113eb + RuleType: Sync Completed + Message: Sync 321363b4-efa9-4fbc-b71c-0b58d62f3248 for company 1f9559e7-8368-48c9-bdf4-f158e16b8b85 of type Expense completed successfully. + Data: + syncId: 321363b4-efa9-4fbc-b71c-0b58d62f3248 + syncType: Expense + SyncFailedWebhook: + title: Sync failed webhook + x-internal: true + description: Webhook request body used to notify that a sync has failed. type: object properties: - supplementalDataConfig: + ClientId: + title: Client ID + type: string + format: uuid + description: Unique identifier for your client in Codat. + ClientName: + type: string + description: Name of your client in Codat. + CompanyId: + $ref: '#/components/parameters/companyId/schema' + RuleId: + type: string + format: uuid + description: Unique identifier for the rule. + deprecated: true + RuleType: + type: string + x-stoplight: + id: 34d52a089f08a + description: The type of rule. + AlertId: + type: string + format: uuid + description: Unique identifier of the webhook event. + Message: + type: string + description: A human-readable message about the webhook. + Data: + $ref: '#/components/schemas/SyncFailedWebhook/definitions/SyncFailedWebhookData' + definitions: + SyncFailedWebhookData: type: object - additionalProperties: - type: object - title: Supplemental data source configuration - description: The client's defined name for the object. - properties: - dataSource: - type: string - description: 'The underlying endpoint of the source system which the configuration is targeting. ' - pullData: - type: object - description: The additional properties that are required when pulling records. - additionalProperties: - type: string - description: The client's defined name for the property with the value being the source system's property name which the mapping is targeting. - pushData: - type: object - description: The additional properties that are required to create and/or update records. - additionalProperties: - type: string - description: The client's defined name for the property with the value being the source system's property name which the mapping is targeting. - examples: - - supplementalDataConfig: - orders-supplemental-data: - dataSource: /orders - pullData: - orderNumber: order_num - pushData: - orderNumber: order_num - SyncSetting: - title: SyncSetting - description: 'Describes how often, and how much history, should be fetched for the given data type when a pull operation is queued.' + title: Sync failed webhook data + properties: + syncId: + type: string + format: uuid + example: a9367074-b5c3-42c4-9be4-be129f43577e + description: Unique identifier for the failed sync. + syncType: + type: string + description: The type of sync being performed. + FailureStage: + type: string + description: The stage of the job the sync failed. examples: - - dataType: invoices - fetchOnFirstLink: true - syncSchedule: 24 - syncOrder: 0 - syncFromUtc: '2020-01-01T12:00:00.000Z' - syncFromWindow: 24 - monthsToSync: 24 - isLocked: true + - ClientId: 30e0f9d2-52c0-4c9f-a806-bcd98a3bcd7e + ClientName: Expense Sync + CompanyId: 1f9559e7-8368-48c9-bdf4-f158e16b8b85 + RuleId: 289c80dc-2aee-4b71-afff-9acd8d051080 + RuleType: Sync Failed + AlertId: 72c1103b-7f17-4a3a-8db5-67c2d360a516 + Message: Sync 3bead2a1-1b3d-4d90-8077-cddc5ca68b01 for company 1f9559e7-8368-48c9-bdf4-f158e16b8b85 of type Expense has failed at step Pushing. + Data: + syncId: 3bead2a1-1b3d-4d90-8077-cddc5ca68b01 + syncType: Expense + FailureStage: Pushing + SyncInitiated: + title: Sync initiated type: object properties: - dataType: - $ref: '#/components/schemas/DataStatus/properties/dataType' - fetchOnFirstLink: - type: boolean - description: Whether this data type should be queued after a company has authorized a connection. - syncSchedule: - type: integer - example: 24 - description: Number of hours after which this data type should be refreshed. - syncOrder: - type: integer - description: The sync in which data types are queued for a sync. - syncFromUtc: - $ref: '#/components/schemas/DateTime' - description: Date from which data should be fetched. Set this *or* `syncFromWindow`. - syncFromWindow: - type: integer - example: 24 - description: Number of months of data to be fetched. Set this *or* `syncFromUTC`. - monthsToSync: - type: integer - example: 24 - description: 'Months of data to fetch, for report data types (`balanceSheet` & `profitAndLoss`) only.' - isLocked: - type: boolean - description: '`True` if the [sync setting](https://docs.codat.io/knowledge-base/advanced-sync-settings) is locked.' - required: - - dataType - - fetchOnFirstLink - - syncSchedule - - syncOrder - SyncSettings: - title: Sync settings + syncId: + type: string + format: uuid + description: Unique identifier for the sync initiated. + additionalProperties: false + TaxRateMappingInfo: + title: Tax rate mapping info x-internal: true type: object + additionalProperties: false + x-examples: + UK Tax Rate: + id: 23_Bills + name: 20% Bill tax Bills + code: 20% Bill tax + effectiveTaxRate: 20 + totalTaxRate: 20 + validTransactionTypes: + - Payment + - Reward properties: - clientId: - $ref: '#/components/schemas/ClientId' - settings: - type: array - items: - $ref: '#/components/schemas/SyncSetting' - overridesDefaults: + id: + type: string + description: Unique identifier of tax rate. + example: 23_Bills + nullable: false + name: + type: string + description: Name of the tax rate in the accounting software. + example: 20% Bill tax Bills + nullable: false + code: + type: string + description: Code for the tax rate from the accounting software. + example: 20% Bill tax + nullable: true + effectiveTaxRate: + type: number + format: decimal + description: Effective tax rate. + example: 20 + totalTaxRate: + type: number + format: decimal + description: Total (not compounded) sum of the components of a tax rate. + example: 20 + validTransactionTypes: + $ref: '#/components/schemas/validTransactionTypes' + description: Supported transaction types for the tax rate. + TrackingCategoryMappingInfo: + title: Tracking category mapping info + x-internal: true + type: object + additionalProperties: false + x-examples: + Tracking Category with parentId: + id: DEPARTMENT_1 + name: TestLocation + hasChildren: false + parentId: DEPARTMENTS + Parent Tracking Category: + id: DEPARTMENTS + name: Departments + hasChildren: true + properties: + id: + type: string + description: Unique identifier of the tracking category. + example: DEPARTMENT_2 + nullable: false + name: + type: string + description: Name of the tracking category as it appears in the accounting software. + example: New York + nullable: false + hasChildren: type: boolean - description: 'Set to `True` if you want to override the default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings).' - UpdateConnectionStatus: - title: Update connection + description: Boolean of whether the tracking category has child categories. + parentId: + type: string + description: ID of the parent tracking category + example: DEPARTMENTS + nullable: true + TrackingRef: + type: object + title: Tracking reference + x-internal: true + properties: + id: + type: string + example: e9a1b63d-9ff0-40e7-8038-016354b987e6 + description: Unique identifier of the linked reference from mapping options or the unique identifier of the linked customer. + dataType: + type: string + example: trackingCategories + default: trackingCategories + description: The type of the linked reference + enum: + - trackingCategories + - customers + TrackingRefAdjustmentTransaction: + type: object + title: Tracking reference x-internal: true + properties: + id: + type: string + example: e9a1b63d-9ff0-40e7-8038-016354b987e6 + description: Unique identifier of the linked reference from mapping options or the unique identifier of the linked customer or supplier. + dataType: + type: string + example: trackingCategories + default: trackingCategories + description: The type of the linked reference + enum: + - trackingCategories + - customers + - suppliers + Transaction: + title: Transaction type: object + additionalProperties: false properties: + transactionId: + type: string + description: Your unique idenfier of the transaction. + example: aa02271d-ed5f-47f5-be76-778d5905225a + nullable: true status: - $ref: '#/components/schemas/Connection/definitions/dataConnectionStatus' - description: The current authorization status of the data connection. + $ref: '#/components/schemas/TransactionStatus' + message: + type: string + description: Metadata such as validation errors or the resulting record created in the accounting software. nullable: true + integrationType: + $ref: '#/components/schemas/IntegrationType' + x-examples: + Successful Transaction: + transactionId: 8fdba4ed-e327-4925-be1a-b7a2b04627f7 + status: Completed + integrationType: expense + Unsuccessful Transaction: + transactionId: 3d694cd1-4cd9-4136-91db-32408195c6fc + status: ValidationError + message: The line item total -208.10((-195.01 + -1.09) + (-10.01 + -1.99)) must equal the transaction total -1.1 + integrationType: string + TransactionResponse: + title: Transaction response + x-internal: true + type: array + items: + $ref: '#/components/schemas/Transaction' + Transactions: + title: Transactions + x-internal: true additionalProperties: false - ValidationResult: - title: Validation result + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/Transaction' + - $ref: '#/components/schemas/PagingInfo' + x-examples: + Example 1: + results: + - transactionId: aa02271d-ed5f-47f5-be76-778d5905225a + status: Completed + integrationType: expenses + - transactionId: 730177a2-8505-410a-9ebc-c2dd52e4bea9 + status: Completed + integrationType: expenses + pageNumber: 1 + pageSize: 100 + totalResults: 2 + links: + self: + href: string + current: + href: string + TransactionStatus: + title: Transaction status + x-internal: true + type: string + description: Status of the transaction. + enum: + - Unknown + - Pending + - ValidationError + - Completed + - PushError + example: Completed + nullable: true + TransferTransactionRequest: + title: Transfer + type: object + properties: + description: + type: string + description: 'Any private, company notes about the transaction.' + example: Transfer from bank account Y to bank account Z + date: + allOf: + - description: Date of the transfer transaction as recorded in the accounting software. + - title: Date time + type: string + examples: + - '2022-10-23T00:00:00Z' + - '2022-10-23' + description: |- + In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: + + ``` + 2020-10-08T22:40:50Z + 2021-01-01T00:00:00 + ``` + + + + When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: + + - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` + - Unqualified local time: `2021-11-15T01:00:00` + - UTC time offsets: `2021-11-15T01:00:00-05:00` + + > Time zones + > + > Not all dates from Codat will contain information about time zones. + > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. + from: + type: object + properties: + accountRef: + type: object + title: Account reference + description: Reference of the account you are transferring money from. + properties: + id: + type: string + description: '''id'' from the Accounts data type.' + required: + - id + amount: + type: number + format: decimal + description: Amount that has been transferred from the account in the native currency of the account. + required: + - accountRef + - amount + to: + type: object + properties: + accountRef: + type: object + title: Account reference + description: Reference of the account you are transferring money to. + properties: + id: + type: string + description: '''id'' from the Accounts data type.' + required: + - id + amount: + type: number + format: decimal + description: Amount that has been transferred to the account in the native currency of the account. + required: + - accountRef + - amount + required: + - date + - from + - to + TransferTransactionResponse: + title: Create transfer response + x-internal: true + type: object + properties: + syncId: + type: string + example: cd937d46-8e41-43a9-9477-a79158ffd98a + format: uuid + description: Unique id of sync created + UpdateCustomerResponse: + title: Update customer response + x-internal: true + allOf: + - type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/Customer' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + UpdateExpenseRequest: + title: Updating expense transaction request type: object properties: - errors: - type: array - items: - $ref: '#/components/schemas/ValidationResult/definitions/validationItem' - warnings: - type: array - items: - $ref: '#/components/schemas/ValidationResult/definitions/validationItem' - definitions: - validationItem: - title: Validation item + type: + type: string + example: Payment + description: The type of transaction. + enum: + - Payment + - Refund + - Reward + - Chargeback + issueDate: + type: string + description: Date the transaction was recorded. + example: '2022-06-28T00:00:00.000Z' + currency: + type: string + example: GBP + description: Currency the transaction was recorded in. + currencyRate: + $ref: '#/components/schemas/ExpenseTransaction/properties/currencyRate' + contactRef: + description: Supplier or Customer for the purchase to be associated to. + $ref: '#/components/schemas/ExpenseContactRef' + bankAccountRef: type: object + title: Bank account reference properties: - ruleId: - type: string - description: The unique identifier of the rule that wasn't met. - itemId: - type: string - description: The unique identifier of the item that was validated. - message: - type: string - description: The message that describes the validation warning or error. - validatorName: + id: type: string - description: The name of the validator that was used to validate the item. - WebhookConsumer: - title: Webhook consumer + example: 787dfb37-5707-4dc0-8a86-8d74e4cc78ea + description: Identifier of the bank account. + merchantName: + type: string + description: Name of the merchant where the purchase took place + example: Amazon UK + lines: + type: array + description: Array of transaction lines. + items: + $ref: '#/components/schemas/ExpenseTransactionLine' + notes: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + required: + - type + - issueDate + - currency + UpdateExpenseResponse: + title: Update expense response + x-internal: true type: object - description: "\uFEFFA webhook consumer is an HTTP endpoint that developers can configure to subscribe to Codat's supported event types.\n\nSee our documentation for more details on [Codat's webhook service](https://docs.codat.io/using-the-api/webhooks/overview).\n" properties: - id: + syncId: type: string - format: uuid - example: 8a210b68-6988-11ed-a1eb-0242ac120002 - description: Unique identifier for the webhook consumer. - url: + description: Unique identifier for the update expense sync. + example: 1ad0695c-4566-4715-918c-adbb03eac81e + UpdateReimbursableExpenseTransactionRequest: + title: Updating reimbursable expense transaction request + type: object + properties: + reference: type: string - format: uri - description: The URL that will consume webhook events dispatched by Codat. - disabled: - type: boolean - description: Flag that enables or disables the endpoint from receiving events. Disabled when set to `true`. nullable: true - default: false - eventTypes: - type: array - description: An array of event types the webhook consumer subscribes to. - items: - type: string - companyTags: + description: User-friendly reference for the reimbursable expense. + contactRef: + $ref: '#/components/schemas/ReimbursementContactRef' + apAccountRef: + $ref: '#/components/schemas/apAccountRef' + issueDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date of the transaction was recorded. + dueDate: + description: Date the supplier is due to be paid. + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + currency: + type: string + example: GBP + description: Currency the transaction was recorded in. + currencyRate: + $ref: '#/components/schemas/ExpenseTransaction/properties/currencyRate' + notes: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: type: array - nullable: true - description: 'Company tags provide an additional way to filter messages, independent of event types. Company tags are case-sensitive, and only messages from companies with matching tags will be sent to this endpoint. Use the format `tagKey:tagValue`.' + description: Array of transaction lines. + minItems: 1 + maxItems: 100 items: - type: string - maxLength: 128 - maxItems: 10 - definitions: - webhookConsumerPrototype: - title: Create webhook consumer - type: object - properties: - url: - $ref: '#/components/schemas/WebhookConsumer/properties/url' - disabled: - $ref: '#/components/schemas/WebhookConsumer/properties/disabled' - eventTypes: - $ref: '#/components/schemas/WebhookConsumer/properties/eventTypes' - companyTags: - $ref: '#/components/schemas/WebhookConsumer/properties/companyTags' - webhookConsumers: - title: Webhook consumers - type: object + $ref: '#/components/schemas/ReimbursableExpenseTransactionLine' + required: + - contactRef + - issueDate + - dueDate + - currency + UpdateSupplierResponse: + title: Update supplier response + x-internal: true + allOf: + - type: object properties: - results: - type: array - maxItems: 50 - items: - $ref: '#/components/schemas/WebhookConsumer' - WebhookZapierKey: - title: Zapier integration key - type: object - properties: - key: - type: string - description: Integration key used to authorize Zapier's HTTP requests with Codat. - example: sk_integ_WM4dfoK1nKZnDE_kceze6hWDjbRwOZwG.us - examples: - - key: sk_integ_WM4dfoK1nKZnDE_kceze6hWDjbRwOZwG.us + data: + allOf: + - $ref: '#/components/schemas/Supplier' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + validFor: + title: Valid endpoints + x-internal: true + type: array + description: Supported endpoints for the account. + nullable: false + items: + type: string + enum: + - expense-transactions.Payment + - expense-transactions.Refund + - expense-transactions.Reward + - expense-transactions.Chargeback + - reimbursable-expense-transactions + - transfer-transactions + - adjustment-transactions + example: expense-transactions.Payment + validTransactionTypes: + title: Valid transaction types + x-internal: true + type: array + description: Supported transaction types for the account. + nullable: false + items: + type: string + enum: + - Payment + - Refund + - Reward + - Chargeback + example: Payment + parameters: + syncId: + name: syncId + in: path + required: true + schema: + type: string + format: uuid + example: 6fb40d5e-b13e-11ed-afa1-0242ac120002 + description: Unique identifier for a sync. + transactionId: + name: transactionId + in: path + required: true + schema: + type: string + format: uuid + example: 336694d8-2dca-4cb5-a28d-3ccb83e55eee + description: The unique identifier for your SMB's transaction. + page: + name: page + in: query + schema: + type: integer + format: int32 + minimum: 1 + example: 1 + default: 1 + description: 'Page number. [Read more](https://docs.codat.io/using-the-api/paging).' + pageSize: + name: pageSize + in: query + schema: + type: integer + format: int32 + default: 100 + example: 100 + minimum: 1 + maximum: 5000 + description: 'Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).' + query: + name: query + in: query + required: false + schema: + type: string + example: id=e3334455-1aed-4e71-ab43-6bccf12092ee + description: 'Codat query string. [Read more](https://docs.codat.io/using-the-api/querying).' + orderBy: + name: orderBy + in: query + required: false + schema: + type: string + example: '-modifiedDate' + description: 'Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).' + companyId: + name: companyId + in: path + required: true + schema: + type: string + format: uuid + example: 8a210b68-6988-11ed-a1eb-0242ac120002 + description: Unique identifier for your SMB in Codat. + description: Unique identifier for a company. + connectionId: + name: connectionId + in: path + required: true + schema: + type: string + format: uuid + example: 2e9d2c44-f675-40ba-8049-353bfcb5e171 + description: Unique identifier for a company's data connection. + description: Unique identifier for a connection. + dataType: + name: dataType + description: The key of a Codat data type + in: path + required: true + schema: + $ref: '#/components/schemas/DataType' + supplierId: + name: supplierId + in: path + required: true + schema: + type: string + examples: + - 13d946f0-c5d5-42bc-b092-97ece17923ab + - 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2 + - 7110701885 + - EILBDVJVNUAGVKRQ + description: Unique identifier for a supplier. + customerId: + name: customerId + in: path + required: true + schema: + type: string + examples: + - 13d946f0-c5d5-42bc-b092-97ece17923ab + - 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2 + - 7110701885 + - EILBDVJVNUAGVKRQ + description: Unique identifier for a customer. + timeoutInMinutes: + name: timeoutInMinutes + in: query + schema: + type: integer + format: int32 + description: Time limit for the push operation to complete before it is timed out. + allowSyncOnPushComplete: + name: allowSyncOnPushComplete + in: query + schema: + type: boolean + default: true + description: Allow a sync upon push completion. + forceUpdate: + name: forceUpdate + in: query + schema: + type: boolean + default: false + description: 'When updating data in the destination platform Codat checks the `sourceModifiedDate` against the `lastupdated` date from the accounting software, 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.' responses: - Bad-Request: + BadRequest: description: The request made is not valid. content: application/json: @@ -5533,15 +13311,6 @@ components: correlationId: bc997528a9d7abb9161ef45f05d38599 canBeRetried: Unknown detailedErrorCode: 0 - ConnectionManagementAllowedOrigins: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectionManagementAllowedOrigins' - examples: - Allowed origins: - $ref: '#/components/examples/connectionManagementAllowedOriginsResponse' Malformed-Query: description: Your `query` parameter was not correctly formed content: @@ -5648,8 +13417,8 @@ components: correlationId: 0a40c2f31fc8f992fb88b0853e4166f3 canBeRetried: Unknown detailedErrorCode: 0 - Too-Many-Requests: - description: Too many requests were made in a given amount of time. Wait a short period and then try again. + Conflict: + description: The data type's dataset has not been requested or is still syncing. content: application/json: schema: @@ -5657,14 +13426,29 @@ components: examples: Conflict: value: - statusCode: 429 + statusCode: 409 service: PublicApi - error: You have made too many requests in a given amount of time; please retry later. + error: The data set has not been requested. correlationId: bc997528a9d7abb9161ef45f05d38599 canBeRetried: Unknown detailedErrorCode: 0 - Legal-Reasons: - description: Not currently available due to compliance limitations. Reach out to your Codat contact for further assistance. + Unprocessable-Content: + description: The requests made can't be processed. This may be due to differences in platform support. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + examples: + Conflict: + value: + statusCode: 422 + service: ExpenseSyncApi + error: Expense transaction updates are not supported for platforms other than Xero. + correlationId: 7c8e23841d211c87f49f30b248f70c93 + canBeRetried: Unknown + detailedErrorCode: 0 + Too-Many-Requests: + description: Too many requests were made in a given amount of time. Wait a short period and then try again. content: application/json: schema: @@ -5672,10 +13456,10 @@ components: examples: Conflict: value: - statusCode: 451 - service: StdznCustomData - error: Platform 'qudb' is not currently available for compliance purposes. - correlationId: f63017dabb9b87865573bea95a51e55d + statusCode: 429 + service: PublicApi + error: You have made too many requests in a given amount of time; please retry later. + correlationId: bc997528a9d7abb9161ef45f05d38599 canBeRetried: Unknown detailedErrorCode: 0 Internal-Server-Error: @@ -5708,121 +13492,6 @@ components: correlationId: bc997528a9d7abb9161ef45f05d38599 canBeRetried: Unknown detailedErrorCode: 0 - parameters: - companyId: - name: companyId - in: path - required: true - schema: - $ref: '#/paths/~1companies~1%7BcompanyId%7D~1syncSettings/post/requestBody/content/application~1json/schema/allOf/0/properties/companyId' - description: Unique identifier for a company. - connectionId: - name: connectionId - in: path - required: true - schema: - type: string - format: uuid - example: 2e9d2c44-f675-40ba-8049-353bfcb5e171 - description: Unique identifier for a company's data connection. - description: Unique identifier for a connection. - customDataIdentifier: - name: customDataIdentifier - in: path - required: true - schema: - type: string - example: DynamicsPurchaseOrders - description: Unique identifier for a custom data type. - page: - name: page - in: query - schema: - type: integer - format: int32 - minimum: 1 - example: 1 - default: 1 - description: 'Page number. [Read more](https://docs.codat.io/using-the-api/paging).' - pageSize: - name: pageSize - in: query - schema: - type: integer - format: int32 - default: 100 - example: 100 - minimum: 1 - maximum: 5000 - description: 'Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).' - productIdentifier: - name: productIdentifier - in: path - required: true - schema: - type: string - examples: - - bank-feeds - - lending - - payables - - expenses - description: Human-readable product identifier for a product. - query: - name: query - in: query - required: false - schema: - type: string - example: id=e3334455-1aed-4e71-ab43-6bccf12092ee - description: 'Codat query string. [Read more](https://docs.codat.io/using-the-api/querying).' - orderBy: - name: orderBy - in: query - required: false - schema: - type: string - example: '-modifiedDate' - description: 'Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).' - dataType: - name: dataType - description: The key of a Codat data type. - in: path - required: true - schema: - $ref: '#/components/schemas/DataType' - datasetId: - name: datasetId - in: path - required: true - schema: - type: string - format: uuid - description: Unique identifier for the dataset that completed its sync. - description: Unique identifier for the dataset that completed its sync. - platformKey: - name: platformKey - in: path - required: true - schema: - type: string - minLength: 4 - maxLength: 4 - pattern: '[a-z]{4}' - example: gbol - description: 'A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys.' - description: A unique 4-letter key to represent a platform in each integration. - webhookId: - name: webhookId - in: path - required: true - schema: - $ref: '#/components/schemas/WebhookConsumer/properties/id' - description: Unique identifier for the webhook consumer. - examples: - connectionManagementAllowedOriginsResponse: - value: - allowedOrigins: - - 'https://www.bank-of-dave.com' securitySchemes: auth_header: name: Authorization diff --git a/.speakeasy/logs/changes/old.openapi.yaml b/.speakeasy/logs/changes/old.openapi.yaml index 245c2d018..7a8bc7ccf 100644 --- a/.speakeasy/logs/changes/old.openapi.yaml +++ b/.speakeasy/logs/changes/old.openapi.yaml @@ -1,17 +1,43 @@ openapi: 3.1.0 -x-stoplight: - id: 466k6ayziv9at -servers: - - description: Production - url: 'https://api.codat.io' info: - title: Platform API - version: 3.0.0 - summary: Platform API - description: "An API for the common components of all of Codat's products.\n\nThese end points cover creating and managing your companies, data connections, and integrations.\n\n[Read about the building blocks of Codat...](https://docs.codat.io/core-concepts/companies) | [See our OpenAPI spec](https://github.com/codatio/oas) \n\n---\n\n## Endpoints\n\n| Endpoints | Description |\n| :- |:- |\n| Companies | Create and manage your SMB users' companies. |\n| Connections | Create new and manage existing data connections for a company. |\n| Connection management | Configure connection management UI and retrieve access tokens for authentication. |\n| Webhooks | Create and manage webhooks that listen to Codat's events. |\n| Integrations | Get a list of integrations supported by Codat and their logos. |\n| Refresh data | Initiate data refreshes, view pull status and history. |\n| Settings | Manage company profile configuration, sync settings, and API keys. |\n| Push data | Initiate and monitor Create, Update, and Delete operations. |\n| Supplemental data | Configure and pull additional data you can include in Codat's standard data types. |\n| Custom data type | Configure and pull additional data types that are not included in Codat's standardized data model. |\n" + title: Sync for Expenses + version: prealpha contact: name: Codat - email: support@codat.io + url: 'https://www.codat.io/' + email: expenses@codat.io + description: |- + The API for Sync for Expenses. + + Sync for Expenses is an API and a set of supporting tools. It has been built to + enable corporate card and expense management platforms to provide high-quality + integrations with multiple accounting software through a standardized API. + + [Explore product](https://docs.codat.io/sync-for-expenses/overview) | [See our OpenAPI spec](https://github.com/codatio/oas) + + Not seeing the endpoints you're expecting? We've [reorganized our products](https://docs.codat.io/updates/230901-new-products), and you may be using a [different version of Sync for Expenses](https://docs.codat.io/sync-for-expenses-v1-api#/). + + --- + + ## Endpoints + + | Endpoints | Description | + | :- |:- | + | Companies | Create and manage your SMB users' companies. | + | Connections | Create new and manage existing data connections for a company. | + | Configuration | View and manage mapping configuration and defaults for expense transactions. | + | Sync | Monitor the status of data syncs. | + | Expenses | Create and update transactions that represent your customers' spend. | + | Transfers | Create and update transactions that represent the movement of your customers' money. | + | Reimbursements | Create and update transactions that represent your customers' repayable spend. | + | Attachments | Attach receipts to a transaction for a complete audit trail. | + | Transaction status | Monitor the status of individual transactions in data syncs. | + | Manage data | Control and monitor the retrieval of data from an integration. | + | Push operations | View historic push operations. | + | Accounts | Create accounts and view account schemas. | + | Customers | Get, create, and update customers. | + | Suppliers | Get, create, and update suppliers. | + termsOfService: 'https://www.codat.io/legals/' security: - auth_header: [] @@ -52,7 +78,7 @@ x-speakeasy-name-override: methodNameOverride: download-attachment - operationId: ^upload-.*?-attachment methodNameOverride: upload-attachment -x-codat-docs-path: platform-api +x-codat-docs-path: sync-for-expenses-api x-codat-keep-docs-paths-local: true x-codat-speakeasy-pagination: type: offsetLimit @@ -65,26 +91,42 @@ x-codat-speakeasy-pagination: tags: - name: Companies description: Create and manage your SMB users' companies. - - name: Connection management - description: Configure UI and retrieve access tokens for authentication used by **Connections SDK**. - name: Connections description: Create new and manage existing data connections for a company. - - name: Webhooks - description: Create and manage webhooks that listen to Codat's events. - - name: Integrations - description: Get a list of integrations supported by Codat and their logos. - - name: Refresh data - description: 'Initiate data refreshes, view pull status and history.' - - name: Settings - description: 'Manage company profile configuration, sync settings, and API keys.' - - name: Push data - description: 'Initiate and monitor Create, Update, and Delete operations.' - - name: Read data - description: View validation outcomes for completed read data operations. - - name: Supplemental data - description: Configure and pull additional data you can include in Codat's standard data types. - - name: Custom data type - description: Configure and pull additional data types that are not included in Codat's standardized data model. + - name: Company info + description: View the company information of your customers' linked accounting software. + - name: Manage data + description: Control and monitor the retrieval of data from an integration. + - name: Mapping options + description: 'Get accounts, trackingCategories and taxRates that can be used in your create and update requests.' + - name: Accounts + description: Create accounts and view create account options. + - name: Bank accounts + description: Create bank accounts and view create bank account options. + - name: Customers + description: 'Get, create, and update customers.' + - name: Suppliers + description: 'Get, create, and update suppliers.' + - name: Push operations + description: View historic push operations. + - name: Configuration + description: View and manage mapping configuration and defaults for expense transactions. + - name: Expenses + description: Create and update transactions that represent your customers' spend. + - name: Reimbursements + description: Create and update transactions that represent your customers' repayable spend. + - name: Transfers + description: Create and update transactions that represent the movement of your customers' money. + - name: Adjustments + description: Create transactions that represent your adjustments to your customers' spend. + - name: Attachments + description: Attach receipts to a transaction for a complete audit trail. + - name: Sync + description: Monitor the status of data syncs. + - name: Transaction status + description: Monitor the status of individual transactions in data syncs. +servers: + - url: 'https://api.codat.io' paths: /companies: get: @@ -121,11 +163,6 @@ paths: sourceType: Accounting created: '2022-01-01T11:30:00Z' createdByUserName: Mike Smith - products: - - spend-insights - - lending - - expenses-v1 - - commerce referenceSubsidiaryCompanies: [] pageNumber: 1 pageSize: 100 @@ -157,10 +194,6 @@ paths: sourceType: Accounting created: '2022-01-01T11:30:00Z' createdByUserName: Joe Bloggs - products: - - spend-insights - - lending - - payables-v2 referenceSubsidiaryCompanies: [] - id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 name: Toft stores @@ -168,8 +201,6 @@ paths: dataConnections: [] created: '2022-11-10T10:45:18Z' createdByUserName: Dan Tzabar - products: - - spend-insights referenceSubsidiaryCompanies: - id: c8d3af58-7011-47ce-b3f2-89faf300ef6d name: Toft stores UK @@ -195,10 +226,6 @@ paths: sourceType: Accounting created: '2022-11-10T10:45:18Z' createdByUserName: Dan Tzabar - products: - - lending - - spend-insights - - payables referenceParentCompany: id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 name: Toft stores @@ -221,8 +248,6 @@ paths: sourceType: Accounting created: '2022-11-10T10:45:18Z' createdByUserName: Dan Tzabar - products: - - spend-insights referenceParentCompany: id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 name: Toft stores @@ -254,18 +279,12 @@ paths: '503': $ref: '#/components/responses/Service-Unavailable' operationId: list-companies - description: "\uFEFF\x54\x68\x65\x20\x2A\x4C\x69\x73\x74\x20\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x61\x20\x6C\x69\x73\x74\x20\x6F\x66\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x74\x6F\x20\x79\x6F\x75\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65\x73\x2E\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n\n\x23\x23\x20\x46\x69\x6C\x74\x65\x72\x20\x62\x79\x20\x74\x61\x67\x73\n\n\x54\x68\x65\x20\x2A\x4C\x69\x73\x74\x20\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x73\x75\x70\x70\x6F\x72\x74\x73\x20\x74\x68\x65\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x6F\x66\x20\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x20\x75\x73\x69\x6E\x67\x20\x5B\x74\x61\x67\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x75\x73\x69\x6E\x67\x2D\x74\x68\x65\x2D\x61\x70\x69\x2F\x6D\x61\x6E\x61\x67\x69\x6E\x67\x2D\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x23\x61\x64\x64\x2D\x6D\x65\x74\x61\x64\x61\x74\x61\x2D\x74\x6F\x2D\x61\x2D\x63\x6F\x6D\x70\x61\x6E\x79\x29\x2E\x20\x49\x74\x20\x73\x75\x70\x70\x6F\x72\x74\x73\x20\x74\x68\x65\x20\x66\x6F\x6C\x6C\x6F\x77\x69\x6E\x67\x20\x6F\x70\x65\x72\x61\x74\x6F\x72\x73\x20\x77\x69\x74\x68\x20\x5B\x43\x6F\x64\x61\x74\u2019\x73\x20\x71\x75\x65\x72\x79\x20\x6C\x61\x6E\x67\x75\x61\x67\x65\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x75\x73\x69\x6E\x67\x2D\x74\x68\x65\x2D\x61\x70\x69\x2F\x71\x75\x65\x72\x79\x69\x6E\x67\x29\x3A\n\n\x2D\x20\x65\x71\x75\x61\x6C\x73\x20\x28\x60\x3D\x60\x29\n\x2D\x20\x6E\x6F\x74\x20\x65\x71\x75\x61\x6C\x73\x20\x28\x60\x21\x3D\x60\x29\n\x2D\x20\x63\x6F\x6E\x74\x61\x69\x6E\x73\x20\x28\x60\x7E\x60\x29\n\n\x46\x6F\x72\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x75\x73\x65\x20\x74\x68\x65\x20\x71\x75\x65\x72\x79\x69\x6E\x67\x20\x74\x6F\x20\x66\x69\x6C\x74\x65\x72\x20\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x20\x74\x61\x67\x67\x65\x64\x20\x77\x69\x74\x68\x20\x61\x20\x73\x70\x65\x63\x69\x66\x69\x63\x20\x66\x6F\x72\x65\x69\x67\x6E\x20\x6B\x65\x79\x2C\x20\x72\x65\x67\x69\x6F\x6E\x2C\x20\x6F\x72\x20\x6F\x77\x6E\x69\x6E\x67\x20\x74\x65\x61\x6D\x3A\x20\n\x2D\x20\x46\x6F\x72\x65\x69\x67\x6E\x20\x6B\x65\x79\x3A\x20\x60\x75\x69\x64\x20\x3D\x20\x7B\x79\x6F\x75\x72\x43\x75\x73\x74\x6F\x6D\x65\x72\x49\x64\x7D\x60\n\x2D\x20\x52\x65\x67\x69\x6F\x6E\x3A\x20\x60\x72\x65\x67\x69\x6F\x6E\x20\x21\x3D\x20\x75\x6B\x60\n\x2D\x20\x4F\x77\x6E\x69\x6E\x67\x20\x74\x65\x61\x6D\x20\x61\x6E\x64\x20\x72\x65\x67\x69\x6F\x6E\x3A\x20\x60\x72\x65\x67\x69\x6F\x6E\x20\x3D\x20\x75\x6B\x20\x26\x26\x20\x6F\x77\x6E\x69\x6E\x67\x54\x65\x61\x6D\x20\x3D\x20\x69\x6E\x76\x6F\x69\x63\x65\x2D\x66\x69\x6E\x61\x6E\x63\x65\x60" + description: "\uFEFF\x54\x68\x65\x20\x2A\x4C\x69\x73\x74\x20\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x61\x20\x6C\x69\x73\x74\x20\x6F\x66\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x74\x6F\x20\x79\x6F\x75\x72\x20\x69\x6E\x73\x74\x61\x6E\x63\x65\x73\x2E\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E" parameters: - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/query' - $ref: '#/components/parameters/orderBy' - - name: tags - in: query - schema: - type: string - example: region=uk && team=invoice-finance - description: 'Filter companies by tags using the "equals" (=), "not equals" (!=), and "contains" (~) operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying).' post: summary: Create company tags: @@ -290,8 +309,6 @@ paths: dataConnections: [] created: '2022-11-10T10:45:18.1950523Z' createdByUserName: Dan Tzabar - products: - - spend-insights referenceSubsidiaryCompanies: [] With a description: value: @@ -303,8 +320,6 @@ paths: dataConnections: [] created: '2022-11-10T10:45:18.1950523Z' createdByUserName: Dan Tzabar - products: - - spend-insights referenceSubsidiaryCompanies: [] With a tag: value: @@ -316,13 +331,11 @@ paths: dataConnections: [] created: '2022-11-10T10:45:18.1950523Z' createdByUserName: Dan Tzabar - products: - - spend-insights tags: region: us referenceSubsidiaryCompanies: [] '400': - $ref: '#/components/responses/Bad-Request' + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -335,7 +348,7 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - description: "\uFEFF\x55\x73\x65\x20\x74\x68\x65\x20\x2A\x43\x72\x65\x61\x74\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x74\x68\x61\x74\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x79\x6F\x75\x72\x20\x63\x75\x73\x74\x6F\x6D\x65\x72\x20\x69\x6E\x20\x43\x6F\x64\x61\x74\x2E\x20\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n\n\x49\x66\x20\x66\x6F\x72\x62\x69\x64\x64\x65\x6E\x20\x63\x68\x61\x72\x61\x63\x74\x65\x72\x73\x20\x28\x73\x65\x65\x20\x60\x6E\x61\x6D\x65\x60\x20\x70\x61\x74\x74\x65\x72\x6E\x29\x20\x61\x72\x65\x20\x70\x72\x65\x73\x65\x6E\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x72\x65\x71\x75\x65\x73\x74\x2C\x20\x61\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x77\x69\x6C\x6C\x20\x62\x65\x20\x63\x72\x65\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x74\x68\x65\x20\x66\x6F\x72\x62\x69\x64\x64\x65\x6E\x20\x63\x68\x61\x72\x61\x63\x74\x65\x72\x73\x20\x72\x65\x6D\x6F\x76\x65\x64\x2E\x20\x46\x6F\x72\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20\x60\x43\x6F\x6D\x70\x61\x6E\x79\x20\x28\x43\x6F\x64\x61\x74\x5B\x31\x5D\x29\x60\x20\x77\x69\x74\x68\x20\x62\x65\x20\x63\x72\x65\x61\x74\x65\x64\x20\x61\x73\x20\x60\x43\x6F\x6D\x70\x61\x6E\x79\x20\x43\x6F\x64\x61\x74\x31\x60\x2E" + description: "\uFEFF\x55\x73\x65\x20\x74\x68\x65\x20\x2A\x43\x72\x65\x61\x74\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x74\x68\x61\x74\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x79\x6F\x75\x72\x20\x63\x75\x73\x74\x6F\x6D\x65\x72\x20\x69\x6E\x20\x43\x6F\x64\x61\x74\x2E\x20\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n\n\x49\x66\x20\x66\x6F\x72\x62\x69\x64\x64\x65\x6E\x20\x63\x68\x61\x72\x61\x63\x74\x65\x72\x73\x20\x28\x73\x65\x65\x20\x60\x6E\x61\x6D\x65\x60\x20\x70\x61\x74\x74\x65\x72\x6E\x29\x20\x61\x72\x65\x20\x70\x72\x65\x73\x65\x6E\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x72\x65\x71\x75\x65\x73\x74\x2C\x20\x61\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x77\x69\x6C\x6C\x20\x62\x65\x20\x63\x72\x65\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x74\x68\x65\x20\x66\x6F\x72\x62\x69\x64\x64\x65\x6E\x20\x63\x68\x61\x72\x61\x63\x74\x65\x72\x73\x20\x72\x65\x6D\x6F\x76\x65\x64\x2E\x20\x46\x6F\x72\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20\x60\x43\x6F\x6D\x70\x61\x6E\x79\x20\x28\x43\x6F\x64\x61\x74\x5B\x31\x5D\x29\x60\x20\x77\x69\x74\x68\x20\x62\x65\x20\x63\x72\x65\x61\x74\x65\x64\x20\x61\x73\x20\x60\x43\x6F\x6D\x70\x61\x6E\x79\x20\x43\x6F\x64\x61\x74\x31\x60\x2E" requestBody: content: application/json: @@ -350,10 +363,77 @@ paths: name: Technicalium description: 'Technology services, including web and app design and development' '/companies/{companyId}': + put: + summary: Update company + description: "\uFEFF\x55\x73\x65\x20\x74\x68\x65\x20\x2A\x55\x70\x64\x61\x74\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x75\x70\x64\x61\x74\x65\x20\x62\x6F\x74\x68\x20\x74\x68\x65\x20\x6E\x61\x6D\x65\x20\x61\x6E\x64\x20\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x20\x6F\x66\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x20\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E" + operationId: update-company + parameters: + - $ref: '#/components/parameters/companyId' + tags: + - Companies + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Company' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyRequestBody' + examples: + Update name: + value: + name: New Name + Update description: + value: + name: Same name + description: Additional documents required + delete: + summary: Delete a company + operationId: delete-company + parameters: + - $ref: '#/components/parameters/companyId' + description: "\uFEFF\x54\x68\x65\x20\x2A\x44\x65\x6C\x65\x74\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x70\x65\x72\x6D\x61\x6E\x65\x6E\x74\x6C\x79\x20\x64\x65\x6C\x65\x74\x65\x73\x20\x61\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x2C\x20\x69\x74\x73\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x61\x6E\x64\x20\x61\x6E\x79\x20\x63\x61\x63\x68\x65\x64\x20\x64\x61\x74\x61\x2E\x20\x54\x68\x69\x73\x20\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x20\x69\x73\x20\x69\x72\x72\x65\x76\x65\x72\x73\x69\x62\x6C\x65\x2E\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n" + tags: + - Companies + responses: + '204': + description: No Content + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' get: summary: Get company operationId: get-company - description: "\uFEFF\x54\x68\x65\x20\x2A\x47\x65\x74\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x66\x6F\x72\x20\x61\x20\x67\x69\x76\x65\x6E\x20\x60\x63\x6F\x6D\x70\x61\x6E\x79\x49\x64\x60\x2E\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n" + description: "\uFEFF\x54\x68\x65\x20\x2A\x47\x65\x74\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x66\x6F\x72\x20\x61\x20\x67\x69\x76\x65\x6E\x20\x60\x63\x6F\x6D\x70\x61\x6E\x79\x49\x64\x60\x2E\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n" parameters: - $ref: '#/components/parameters/companyId' tags: @@ -376,11 +456,6 @@ paths: dataConnections: [] created: '2022-11-10T10:45:18Z' createdByUserName: Dan Tzabar - products: - - spend-insights - - lending - - expenses-v1 - - commerce referenceSubsidiaryCompanies: [] Parent multi-entity company: value: @@ -392,11 +467,6 @@ paths: dataConnections: [] created: '2022-11-10T10:45:18Z' createdByUserName: Dan Tzabar - products: - - spend-insights - - lending - - expenses-v1 - - commerce referenceSubsidiaryCompanies: - id: c8d3af58-7011-47ce-b3f2-89faf300ef6d name: Toft stores UK @@ -426,11 +496,6 @@ paths: sourceType: Accounting created: '2022-11-10T10:45:18Z' createdByUserName: Dan Tzabar - products: - - spend-insights - - lending - - expenses-v1 - - commerce referenceParentCompany: id: ab12c58d-a678-4ebf-a159-ae99e1807bd0 name: Toft stores @@ -451,232 +516,6 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - delete: - summary: Delete a company - operationId: delete-company - parameters: - - $ref: '#/components/parameters/companyId' - description: "\uFEFF\x54\x68\x65\x20\x2A\x44\x65\x6C\x65\x74\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x70\x65\x72\x6D\x61\x6E\x65\x6E\x74\x6C\x79\x20\x64\x65\x6C\x65\x74\x65\x73\x20\x61\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x2C\x20\x69\x74\x73\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x61\x6E\x64\x20\x61\x6E\x79\x20\x63\x61\x63\x68\x65\x64\x20\x64\x61\x74\x61\x2E\x20\x54\x68\x69\x73\x20\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x20\x69\x73\x20\x69\x72\x72\x65\x76\x65\x72\x73\x69\x62\x6C\x65\x2E\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n" - tags: - - Companies - responses: - '204': - description: No Content - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - put: - summary: Replace company - description: "\uFEFF\x55\x73\x65\x20\x74\x68\x65\x20\x2A\x52\x65\x70\x6C\x61\x63\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x72\x65\x70\x6C\x61\x63\x65\x20\x74\x68\x65\x20\x65\x78\x69\x73\x74\x69\x6E\x67\x20\x6E\x61\x6D\x65\x2C\x20\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x2C\x20\x61\x6E\x64\x20\x74\x61\x67\x73\x20\x6F\x66\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x20\x43\x61\x6C\x6C\x69\x6E\x67\x20\x74\x68\x65\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x77\x69\x6C\x6C\x20\x72\x65\x70\x6C\x61\x63\x65\x20\x65\x78\x69\x73\x74\x69\x6E\x67\x20\x76\x61\x6C\x75\x65\x73\x20\x65\x76\x65\x6E\x20\x69\x66\x20\x6E\x65\x77\x20\x76\x61\x6C\x75\x65\x73\x20\x68\x61\x76\x65\x6E\x27\x74\x20\x62\x65\x65\x6E\x20\x64\x65\x66\x69\x6E\x65\x64\x20\x69\x6E\x20\x74\x68\x65\x20\x70\x61\x79\x6C\x6F\x61\x64\x2E\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\n\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x58\x65\x72\x6F\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x50\x6C\x61\x69\x64\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5A\x65\x74\x74\x6C\x65\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E" - operationId: replace-company - x-speakeasy-name-override: replace - parameters: - - $ref: '#/components/parameters/companyId' - tags: - - Companies - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Company' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CompanyRequestBody' - examples: - Update name: - value: - name: New Name - Update description: - value: - name: Same name - description: Additional documents required - patch: - summary: Update company - description: "\uFEFF\x55\x73\x65\x20\x74\x68\x65\x20\x2A\x55\x70\x64\x61\x74\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x75\x70\x64\x61\x74\x65\x20\x74\x68\x65\x20\x6E\x61\x6D\x65\x2C\x20\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x2C\x20\x6F\x72\x20\x74\x61\x67\x73\x20\x6F\x66\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E\n\n\x54\x68\x65\x20\x2A\x55\x70\x64\x61\x74\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x64\x6F\x65\x73\x6E\x27\x74\x20\x68\x61\x76\x65\x20\x61\x6E\x79\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x66\x69\x65\x6C\x64\x73\x2E\x20\x49\x66\x20\x61\x6E\x79\x20\x6F\x66\x20\x74\x68\x65\x20\x66\x69\x65\x6C\x64\x73\x20\x70\x72\x6F\x76\x69\x64\x65\x64\x20\x61\x72\x65\x20\x60\x6E\x75\x6C\x6C\x60\x20\x6F\x72\x20\x6E\x6F\x74\x20\x70\x72\x6F\x76\x69\x64\x65\x64\x2C\x20\x74\x68\x65\x79\x20\x77\x6F\x6E\x27\x74\x20\x62\x65\x20\x69\x6E\x63\x6C\x75\x64\x65\x64\x20\x69\x6E\x20\x74\x68\x65\x20\x75\x70\x64\x61\x74\x65\x2E\x20\x20\n\n\x41\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E" - operationId: update-company - parameters: - - $ref: '#/components/parameters/companyId' - tags: - - Companies - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Company' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CompanyUpdateRequest' - examples: - Update tags: - value: - tags: - refrence: new reference - Update name: - value: - name: New Name - '/companies/{companyId}/products/{productIdentifier}': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/productIdentifier' - put: - summary: Add product - operationId: add-product - x-speakeasy-name-override: add-product - description: |- - Use the *Add product* endpoint to enable a product for the company specified by `companyId`. - - > Note: This feature is currently in alpha and available only to participants in the development program. - tags: - - Companies - responses: - '204': - description: OK - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - delete: - summary: Remove product - operationId: remove-product - x-speakeasy-name-override: remove-product - description: |- - Use the *Remove product* endpoint to disable a product for the company specified by `companyId`. - - > Note: This feature is currently in alpha and available only to participants in the development program. - tags: - - Companies - responses: - '204': - description: OK - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/products/{productIdentifier}/refresh': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/productIdentifier' - post: - summary: Refresh product data - operationId: refresh-product-data - x-speakeasy-name-override: refresh-product-data - description: |- - Use the **Refresh product data** endpoint to manually refresh data for a custom product for a specific company. - - ### Tips and traps - - - This endpoint only supports refreshing data for **custom products** and can't be used for Codat's standard solutions. Refer to [individual solutions' documentation](https://docs.codat.io/) instead. - - If a data sync is already in progress for a custom product, the refresh request will return a `Bad request (400)` response. - - If a company has multiple custom products enabled, you can refresh data for each product individually. - tags: - - Companies - responses: - '202': - description: OK - '400': - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorMessage' - examples: - Standard product not supported: - value: - statusCode: 400 - service: PublicApi - error: 'Bank Feeds doesn''t support data refreshing. For more information, refer to your solution’s documentation [here](https://docs.codat.io).' - correlationId: bc997528a9d7abb9161ef45f05d38599 - canBeRetried: Unknown - detailedErrorCode: 0 - Read in progress: - value: - statusCode: 400 - service: PublicApi - error: Data cannot be refreshed while a read operation is in progress. Allow the read to complete before attempting to refresh. - correlationId: bc997528a9d7abb9161ef45f05d38599 - canBeRetried: Unknown - detailedErrorCode: 0 - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' '/companies/{companyId}/connections': get: summary: List connections @@ -754,7 +593,12 @@ paths: type: object properties: platformKey: - $ref: '#/components/parameters/platformKey/schema' + type: string + minLength: 4 + maxLength: 4 + pattern: '[a-z]{4}' + example: gbol + description: 'A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys.' responses: '200': description: OK @@ -894,30 +738,40 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/UpdateConnectionStatus' + title: Update connection + x-internal: true + type: object + properties: + status: + $ref: '#/components/schemas/Connection/definitions/dataConnectionStatus' + description: The current authorization status of the data connection. + nullable: true + additionalProperties: false examples: Example: value: status: Unlinked description: '' - '/companies/{companyId}/connections/{connectionId}/authorization': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - put: - summary: Update authorization - operationId: update-connection-authorization - x-speakeasy-name-override: update-authorization - description: Update data connection's authorization. + '/companies/{companyId}/sync/expenses/connections/partnerExpense': + post: tags: - Connections + description: Creates a partner expense data connection + summary: Create partner expense connection + operationId: create-partner-expense-connection + x-speakeasy-name-override: create-partner-expense-connection + parameters: + - $ref: '#/components/parameters/companyId' responses: '200': - description: OK + description: Success content: application/json: schema: $ref: '#/components/schemas/Connection' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -932,37 +786,127 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - requestBody: - content: - application/json: - schema: - type: object - additionalProperties: - type: string - description: '' - '/companies/{companyId}/accessToken': + '/companies/{companyId}/data/info': get: - summary: Get company access token - operationId: get-company-access-token - x-speakeasy-name-override: get-access-token - description: "Use the _Get company access token_ endpoint to return an access token for the specified company ID. The token is valid for one day. \n\nThe token is required by Codat's embeddable UIs (such as [Connections SDK](https://docs.codat.io/auth-flow/optimize/connection-management) and [Link SDK](https://docs.codat.io/auth-flow/authorize-embedded-link)) to verify the identity of the user and improve the reliability of data provided by them." + tags: + - Company info + summary: Get company info + description: Gets the latest basic info for a company. + operationId: get-company-info parameters: - $ref: '#/components/parameters/companyId' - tags: - - Companies responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/CompanyAccessToken' + $ref: '#/components/schemas/CompanyInformation' examples: - Simple company: + Example 1: value: - expiresIn: 86400 - accessToken: string - tokenType: Bearer + companyName: Codat + accountingPlatformRef: 1700060034_ETD + companyLegalName: Codat Ltd + addresses: + - type: Billing + line1: 301 Ink Rooms + line2: 28 Easton Street + city: London + region: England + country: United Kingdom + postalCode: WC1X 0BE + - type: Delivery + line1: 28 Easton Street + city: London + country: UK + postalCode: WC1X 0BE + phoneNumbers: + - number: 02012 345678 + type: Landline + - number: 07123 456789 + type: Mobile + - number: 02012 345678 + type: Fax + webLinks: + - type: Website + url: 'https://www.codat.io/' + - type: Social + url: 'https://www.linkedin.com/company/codat-limited/' + registrationNumber: '5590111724' + taxNumber: '74111622555799035846' + financialYearStartDate: '2023-04-01T00:00:00' + baseCurrency: GBP + sourceUrls: + Api: 'https://api.codat.io' + createdDate: '2020-03-09T15:19:26' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '409': + $ref: '#/components/responses/Conflict' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/companies/{companyId}/sync/expenses/config': + get: + tags: + - Configuration + parameters: + - $ref: '#/components/parameters/companyId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyConfiguration' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + summary: Get company configuration + description: Gets a company's expense sync configuration + operationId: get-company-configuration + post: + tags: + - Configuration + parameters: + - $ref: '#/components/parameters/companyId' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyConfiguration' + examples: {} + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CompanyConfiguration' + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -977,32 +921,26 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connectionManagement/accessToken': + summary: Set company configuration + description: Sets a company's expense sync configuration + operationId: set-company-configuration + x-speakeasy-name-override: set parameters: - $ref: '#/components/parameters/companyId' + '/companies/{companyId}/sync/expenses/mappingOptions': get: - summary: Get access token (old) - operationId: get-connection-management-access-token - deprecated: true - x-speakeasy-deprecation-message: | - The endpoint for generating company-specific connection management access tokens has been deprecated. - Codat now supports a global company access token, providing seamless access across multiple products. - Update your integration to use the global token for improved efficiency and consistency. - x-speakeasy-deprecation-replacement: get-company-access-token tags: - - Connection management - description: "\uFEFF\x54\x68\x65\x20\x6E\x65\x77\x20\x5B\x47\x65\x74\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x6B\x65\x6E\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x73\x2F\x67\x65\x74\x2D\x63\x6F\x6D\x70\x61\x6E\x79\x2D\x61\x63\x63\x65\x73\x73\x2D\x74\x6F\x6B\x65\x6E\x29\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x70\x6C\x61\x63\x65\x73\x20\x74\x68\x69\x73\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x61\x6E\x64\x20\x69\x6E\x63\x6C\x75\x64\x65\x73\x20\x61\x64\x64\x69\x74\x69\x6F\x6E\x61\x6C\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x61\x6C\x69\x74\x79\x2E" + - Mapping options + parameters: + - $ref: '#/components/parameters/companyId' responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/ConnectionManagementAccessToken' - examples: - Access token: - value: - accessToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + $ref: '#/components/schemas/MappingOptions' + examples: {} '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1017,22 +955,26 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - /connectionManagement/corsSettings: + description: 'Gets the mapping options (accounts, trackingCategories and taxRates) for a company''s accounting software' + summary: Mapping options + operationId: get-mapping-options + x-speakeasy-name-override: get-mapping-options + parameters: + - $ref: '#/components/parameters/companyId' + '/companies/{companyId}/sync/expenses/syncs/lastSuccessful/status': get: - summary: Get CORS settings (old) - operationId: get-connection-management-cors-settings - x-speakeasy-group: cors - deprecated: true - x-speakeasy-deprecation-message: | - The new [Get CORS settings](https://docs.codat.io/platform-api#/operations/get-cors-settings) endpoint replaces this endpoint and includes additional functionality. - Update your integrations to use the new path `/corsSettings` as the existing route will be removed in a future release. - x-speakeasy-deprecation-replacement: get-cors-settings tags: - - Settings - description: "\uFEFF\x54\x68\x65\x20\x2A\x47\x65\x74\x20\x43\x4F\x52\x53\x20\x73\x65\x74\x74\x69\x6E\x67\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x74\x68\x65\x20\x61\x6C\x6C\x6F\x77\x65\x64\x20\x6F\x72\x69\x67\x69\x6E\x73\x20\x28\x69\x2E\x65\x2E\x20\x79\x6F\x75\x72\x20\x64\x6F\x6D\x61\x69\x6E\x73\x29\x20\x79\x6F\x75\x20\x77\x61\x6E\x74\x20\x74\x6F\x20\x61\x6C\x6C\x6F\x77\x20\x63\x72\x6F\x73\x73\x2D\x6F\x72\x69\x67\x69\x6E\x20\x72\x65\x73\x6F\x75\x72\x63\x65\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x28\x5B\x43\x4F\x52\x53\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x65\x6E\x2E\x77\x69\x6B\x69\x70\x65\x64\x69\x61\x2E\x6F\x72\x67\x2F\x77\x69\x6B\x69\x2F\x43\x72\x6F\x73\x73\x2D\x6F\x72\x69\x67\x69\x6E\x5F\x72\x65\x73\x6F\x75\x72\x63\x65\x5F\x73\x68\x61\x72\x69\x6E\x67\x29\x29\x20\x77\x69\x74\x68\x20\x43\x6F\x64\x61\x74\x2E\x20\n\n\x45\x6E\x61\x62\x6C\x69\x6E\x67\x20\x43\x4F\x52\x53\x20\x77\x69\x74\x68\x20\x43\x6F\x64\x61\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x62\x79\x20\x6F\x75\x72\x20\x65\x6D\x62\x65\x64\x64\x61\x62\x6C\x65\x20\x55\x49\x73\x20\x28\x73\x75\x63\x68\x20\x61\x73\x20\x5B\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x53\x44\x4B\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x61\x75\x74\x68\x2D\x66\x6C\x6F\x77\x2F\x6F\x70\x74\x69\x6D\x69\x7A\x65\x2F\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2D\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x29\x20\x61\x6E\x64\x20\x5B\x4C\x69\x6E\x6B\x20\x53\x44\x4B\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x61\x75\x74\x68\x2D\x66\x6C\x6F\x77\x2F\x61\x75\x74\x68\x6F\x72\x69\x7A\x65\x2D\x65\x6D\x62\x65\x64\x64\x65\x64\x2D\x6C\x69\x6E\x6B\x29\x29\x20\x74\x6F\x20\x61\x63\x63\x65\x73\x73\x20\x43\x6F\x64\x61\x74\x27\x73\x20\x41\x50\x49\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x73\x2E" + - Sync + parameters: + - $ref: '#/components/parameters/companyId' responses: '200': - $ref: '#/components/responses/ConnectionManagementAllowedOrigins' + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CompanySyncStatus' + examples: {} '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1047,30 +989,26 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - post: - summary: Set CORS settings (old) - operationId: set-connection-management-cors-settings - x-speakeasy-name-override: set - x-speakeasy-group: cors - deprecated: true - x-speakeasy-deprecation-message: | - The new [Set CORS settings](https://docs.codat.io/platform-api#/operations/set-cors-settings) endpoint replaces this endpoint and includes additional functionality. - Update your integrations to use the new path `/corsSettings` as the existing route will be removed in a future release. - x-speakeasy-deprecation-replacement: set-cors-settings + description: Gets the status of the last successful sync + summary: Last successful sync + operationId: get-last-successful-sync + x-speakeasy-name-override: get-last-successful-sync + parameters: + - $ref: '#/components/parameters/companyId' + '/companies/{companyId}/sync/expenses/syncs/latest/status': + get: tags: - - Settings - description: "\uFEFF\x54\x68\x65\x20\x2A\x53\x65\x74\x20\x43\x4F\x52\x53\x20\x73\x65\x74\x74\x69\x6E\x67\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x61\x6C\x6C\x6F\x77\x73\x20\x79\x6F\x75\x20\x74\x6F\x20\x72\x65\x67\x69\x73\x74\x65\x72\x20\x61\x6C\x6C\x6F\x77\x65\x64\x20\x6F\x72\x69\x67\x69\x6E\x73\x20\x28\x69\x2E\x65\x2E\x20\x79\x6F\x75\x72\x20\x64\x6F\x6D\x61\x69\x6E\x73\x29\x20\x66\x6F\x72\x20\x75\x73\x65\x20\x69\x6E\x20\x63\x72\x6F\x73\x73\x2D\x6F\x72\x69\x67\x69\x6E\x20\x72\x65\x73\x6F\x75\x72\x63\x65\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x28\x5B\x43\x4F\x52\x53\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x65\x6E\x2E\x77\x69\x6B\x69\x70\x65\x64\x69\x61\x2E\x6F\x72\x67\x2F\x77\x69\x6B\x69\x2F\x43\x72\x6F\x73\x73\x2D\x6F\x72\x69\x67\x69\x6E\x5F\x72\x65\x73\x6F\x75\x72\x63\x65\x5F\x73\x68\x61\x72\x69\x6E\x67\x29\x29\x2E\n\x20\n\x45\x6E\x61\x62\x6C\x69\x6E\x67\x20\x43\x4F\x52\x53\x20\x77\x69\x74\x68\x20\x43\x6F\x64\x61\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x62\x79\x20\x6F\x75\x72\x20\x65\x6D\x62\x65\x64\x64\x61\x62\x6C\x65\x20\x55\x49\x73\x20\x28\x73\x75\x63\x68\x20\x61\x73\x20\x5B\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x53\x44\x4B\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x61\x75\x74\x68\x2D\x66\x6C\x6F\x77\x2F\x6F\x70\x74\x69\x6D\x69\x7A\x65\x2F\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2D\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x29\x20\x61\x6E\x64\x20\x5B\x4C\x69\x6E\x6B\x20\x53\x44\x4B\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x61\x75\x74\x68\x2D\x66\x6C\x6F\x77\x2F\x61\x75\x74\x68\x6F\x72\x69\x7A\x65\x2D\x65\x6D\x62\x65\x64\x64\x65\x64\x2D\x6C\x69\x6E\x6B\x29\x29\x20\x74\x6F\x20\x61\x63\x63\x65\x73\x73\x20\x43\x6F\x64\x61\x74\x27\x73\x20\x41\x50\x49\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x73\x2E\x20" - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectionManagementAllowedOrigins' - examples: - Allowed origins: - $ref: '#/components/examples/connectionManagementAllowedOriginsResponse' + - Sync + parameters: + - $ref: '#/components/parameters/companyId' responses: '200': - $ref: '#/components/responses/ConnectionManagementAllowedOrigins' + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CompanySyncStatus' + examples: {} '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1085,16 +1023,28 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - /corsSettings: + description: Gets the latest sync status + summary: Latest sync status + operationId: get-latest-sync + x-speakeasy-name-override: get-latest-sync + parameters: + - $ref: '#/components/parameters/companyId' + '/companies/{companyId}/sync/expenses/syncs/list/status': + parameters: + - $ref: '#/components/parameters/companyId' get: - summary: Get CORS settings - operationId: get-cors-settings tags: - - Settings - description: "\uFEFF\x54\x68\x65\x20\x2A\x47\x65\x74\x20\x43\x4F\x52\x53\x20\x73\x65\x74\x74\x69\x6E\x67\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x74\x68\x65\x20\x61\x6C\x6C\x6F\x77\x65\x64\x20\x6F\x72\x69\x67\x69\x6E\x73\x20\x28\x69\x2E\x65\x2E\x20\x79\x6F\x75\x72\x20\x64\x6F\x6D\x61\x69\x6E\x73\x29\x20\x79\x6F\x75\x20\x77\x61\x6E\x74\x20\x74\x6F\x20\x61\x6C\x6C\x6F\x77\x20\x63\x72\x6F\x73\x73\x2D\x6F\x72\x69\x67\x69\x6E\x20\x72\x65\x73\x6F\x75\x72\x63\x65\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x28\x5B\x43\x4F\x52\x53\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x65\x6E\x2E\x77\x69\x6B\x69\x70\x65\x64\x69\x61\x2E\x6F\x72\x67\x2F\x77\x69\x6B\x69\x2F\x43\x72\x6F\x73\x73\x2D\x6F\x72\x69\x67\x69\x6E\x5F\x72\x65\x73\x6F\x75\x72\x63\x65\x5F\x73\x68\x61\x72\x69\x6E\x67\x29\x29\x20\x77\x69\x74\x68\x20\x43\x6F\x64\x61\x74\x2E\x20\n\n\x45\x6E\x61\x62\x6C\x69\x6E\x67\x20\x43\x4F\x52\x53\x20\x77\x69\x74\x68\x20\x43\x6F\x64\x61\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x62\x79\x20\x6F\x75\x72\x20\x65\x6D\x62\x65\x64\x64\x61\x62\x6C\x65\x20\x55\x49\x73\x20\x28\x73\x75\x63\x68\x20\x61\x73\x20\x5B\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x53\x44\x4B\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x61\x75\x74\x68\x2D\x66\x6C\x6F\x77\x2F\x6F\x70\x74\x69\x6D\x69\x7A\x65\x2F\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2D\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x29\x20\x61\x6E\x64\x20\x5B\x4C\x69\x6E\x6B\x20\x53\x44\x4B\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x61\x75\x74\x68\x2D\x66\x6C\x6F\x77\x2F\x61\x75\x74\x68\x6F\x72\x69\x7A\x65\x2D\x65\x6D\x62\x65\x64\x64\x65\x64\x2D\x6C\x69\x6E\x6B\x29\x29\x20\x74\x6F\x20\x61\x63\x63\x65\x73\x73\x20\x43\x6F\x64\x61\x74\x27\x73\x20\x41\x50\x49\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x73\x2E" + - Sync responses: '200': - $ref: '#/components/responses/ConnectionManagementAllowedOrigins' + description: Success + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/CompanySyncStatus' + examples: {} '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1109,24 +1059,24 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - post: - summary: Set CORS settings - operationId: set-cors-settings - x-speakeasy-name-override: set + summary: List sync statuses + description: Gets a list of sync statuses + operationId: list-syncs + '/companies/{companyId}/sync/expenses/syncs/{syncId}/status': + get: tags: - - Settings - description: "\uFEFF\x54\x68\x65\x20\x2A\x53\x65\x74\x20\x43\x4F\x52\x53\x20\x73\x65\x74\x74\x69\x6E\x67\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x61\x6C\x6C\x6F\x77\x73\x20\x79\x6F\x75\x20\x74\x6F\x20\x72\x65\x67\x69\x73\x74\x65\x72\x20\x61\x6C\x6C\x6F\x77\x65\x64\x20\x6F\x72\x69\x67\x69\x6E\x73\x20\x28\x69\x2E\x65\x2E\x20\x79\x6F\x75\x72\x20\x64\x6F\x6D\x61\x69\x6E\x73\x29\x20\x66\x6F\x72\x20\x75\x73\x65\x20\x69\x6E\x20\x63\x72\x6F\x73\x73\x2D\x6F\x72\x69\x67\x69\x6E\x20\x72\x65\x73\x6F\x75\x72\x63\x65\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x28\x5B\x43\x4F\x52\x53\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x65\x6E\x2E\x77\x69\x6B\x69\x70\x65\x64\x69\x61\x2E\x6F\x72\x67\x2F\x77\x69\x6B\x69\x2F\x43\x72\x6F\x73\x73\x2D\x6F\x72\x69\x67\x69\x6E\x5F\x72\x65\x73\x6F\x75\x72\x63\x65\x5F\x73\x68\x61\x72\x69\x6E\x67\x29\x29\x2E\n\x20\n\x45\x6E\x61\x62\x6C\x69\x6E\x67\x20\x43\x4F\x52\x53\x20\x77\x69\x74\x68\x20\x43\x6F\x64\x61\x74\x20\x69\x73\x20\x72\x65\x71\x75\x69\x72\x65\x64\x20\x62\x79\x20\x6F\x75\x72\x20\x65\x6D\x62\x65\x64\x64\x61\x62\x6C\x65\x20\x55\x49\x73\x20\x28\x73\x75\x63\x68\x20\x61\x73\x20\x5B\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x53\x44\x4B\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x61\x75\x74\x68\x2D\x66\x6C\x6F\x77\x2F\x6F\x70\x74\x69\x6D\x69\x7A\x65\x2F\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2D\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x29\x20\x61\x6E\x64\x20\x5B\x4C\x69\x6E\x6B\x20\x53\x44\x4B\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x61\x75\x74\x68\x2D\x66\x6C\x6F\x77\x2F\x61\x75\x74\x68\x6F\x72\x69\x7A\x65\x2D\x65\x6D\x62\x65\x64\x64\x65\x64\x2D\x6C\x69\x6E\x6B\x29\x29\x20\x74\x6F\x20\x61\x63\x63\x65\x73\x73\x20\x43\x6F\x64\x61\x74\x27\x73\x20\x41\x50\x49\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x73\x2E" - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectionManagementAllowedOrigins' - examples: - Allowed origins: - $ref: '#/components/examples/connectionManagementAllowedOriginsResponse' + - Sync + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' responses: '200': - $ref: '#/components/responses/ConnectionManagementAllowedOrigins' + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/CompanySyncStatus' + examples: {} '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1141,16 +1091,27 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/data/all': + summary: Get sync status + description: Get the sync status for a specified sync + operationId: get-sync-by-id parameters: - $ref: '#/components/parameters/companyId' - post: - summary: Refresh all data - operationId: refresh-company-data - x-speakeasy-name-override: all + - $ref: '#/components/parameters/syncId' + '/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions': + get: + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' responses: - '204': - description: No Content + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/Transactions' + examples: {} '400': $ref: '#/components/responses/Malformed-Query' '401': @@ -1167,44 +1128,74 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - description: |- - Refreshes all data types with `fetch on first link` set to `true` for a given company. - - This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. - - [Read more](https://docs.codat.io/core-concepts/data-type-settings) about data type settings and `fetch on first link`. tags: - - Refresh data - '/companies/{companyId}/data/queue/{dataType}': + - Transaction status + summary: List sync transactions + description: Gets the transactions and status for a sync + operationId: list-sync-transactions + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + '/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions/{transactionId}': + get: + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + - $ref: '#/components/parameters/transactionId' + responses: + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/TransactionResponse' + examples: {} + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + tags: + - Transaction status + summary: Get sync transaction + description: Gets the status of a transaction for a sync + operationId: get-sync-transaction + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + - $ref: '#/components/parameters/transactionId' + '/companies/{companyId}/sync/expenses/expense-transactions': parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/dataType' post: - summary: Refresh data type - operationId: refresh-data-type - x-speakeasy-name-override: by-data-type - description: |- - Refreshes a given data type for a given company. - - This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. + summary: Create expense transaction + operationId: create-expense-transaction + description: "The *Create expense* endpoint creates an [expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) in the accounting software for a given company's connection. \n\n[Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) represent transactions made with a company debit or credit card. \n\n### Supported Integrations\n\n| Integration | Supported |\n|-------------------------------|-----------|\n| Dynamics 365 Business Central | Yes |\n| FreeAgent | Yes |\n| QuickBooks Desktop | Yes |\n| QuickBooks Online | Yes |\n| Oracle NetSuite | Yes |\n| Xero | Yes |" tags: - - Refresh data - parameters: - - schema: - type: string - format: uuid - in: query - name: connectionId - description: 'Optionally, provide a data connection id to only queue pull operations on that connection.' + - Expenses responses: '200': description: OK content: application/json: + x-speakeasy-usage-example: true schema: - $ref: '#/components/schemas/PullOperation' + $ref: '#/components/schemas/CreateExpenseResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a '400': - $ref: '#/components/responses/Malformed-Query' + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1219,26 +1210,611 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/dataStatus': + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateExpenseRequest' + examples: + Payment: + value: + - id: 4d7c6929-7770-412b-91bb-44d3bc71d111 + type: Payment + issueDate: '2024-05-21T00:00:00+00:00' + currency: GBP + currencyRate: 1 + contactRef: + id: '430' + type: Supplier + bankAccountRef: + id: '97' + merchantName: Amazon UK + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_5 + dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + Refund: + value: + - id: 7008d3f2-aeb4-11ed-afa1-0242ac120002 + type: Refund + issueDate: '2024-02-17T00:00:00+00:00' + currency: GBP + contactRef: + id: '430' + type: Supplier + bankAccountRef: + id: '97' + merchantName: Amazon UK + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '42' + trackingRefs: + - id: DEPARTMENT_6 + '/companies/{companyId}/sync/expenses/expense-transactions/{transactionId}': parameters: - $ref: '#/components/parameters/companyId' - get: - summary: Get data status - operationId: get-company-data-status - description: Get the state of each data type for a company + - $ref: '#/components/parameters/transactionId' + put: + summary: Update expense transactions + tags: + - Expenses + responses: + '202': + description: Accepted + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateExpenseResponse' + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '422': + $ref: '#/components/responses/Unprocessable-Content' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + operationId: update-expense-transaction + description: "The *Update expense* endpoint updates an existing [expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/UpdateExpenseRequest) in the accounting software for a given company's connection. \n\n[Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/UpdateExpenseRequest) represent transactions made with a company debit or credit card. \n\n### Supported Integrations\nThe following integrations are supported for the [Payment](https://docs.codat.io/expenses/sync-process/expense-transactions#transaction-types) transaction `type` only: \n| Integration | Supported |\n|-----------------------|-----------|\n| FreeAgent | Yes |\n| QuickBooks Online | Yes |\n| Oracle NetSuite | Yes |\n| Xero | Yes |" + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateExpenseRequest' + examples: + Payment: + value: + type: Payment + issueDate: '2024-05-21T00:00:00+00:00' + currency: GBP + currencyRate: 1 + contactRef: + id: '430' + type: Supplier + bankAccountRef: + id: '97' + merchantName: Amazon UK + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_5 + dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + '/companies/{companyId}/sync/expenses/transfer-transactions/{transactionId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/transactionId' + put: + summary: Create transfer transaction + operationId: create-transfer-transaction + description: "Use the *Create transfer* endpoint to create or update a [transfer transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/TransferTransactionRequest) in the accounting software for a given company's connection. \r\n\r\nTransfers record the movement of money between two bank accounts, or between a bank account and a nominal account. Use them to represent actions such as topping up a debit card account or a balance transfer to another credit card.\r\n\r\nThe `from.amount` and `to.amount` fields are in the native currency of the account.\r\n\r\n### Supported Integrations\r\n| Integration | Supported |\r\n|-----------------------|-----------|\r\n| FreeAgent | Yes |\r\n| QuickBooks Desktop | Yes |\r\n| QuickBooks Online | Yes |\r\n| Xero | Yes |" tags: - - Refresh data + - Transfers responses: '200': description: OK content: application/json: + x-speakeasy-usage-example: true schema: - $ref: '#/components/schemas/DataStatuses' + $ref: '#/components/schemas/TransferTransactionResponse' examples: - Example: + Example 1: value: - accountTransactions: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/TransferTransactionRequest' + examples: + Create transfer: + value: + description: Sample transfer description + date: '2021-05-21T00:00:00+00:00' + from: + accountRef: + id: 787dfb37-5707-4dc0-8a86-8d74e4cc78ea + amount: 100 + to: + accountRef: + id: 777dfb37-5506-3dc0-6g86-8d34z4cc78ea + amount: 100 + '/companies/{companyId}/sync/expenses/adjustment-transactions': + parameters: + - $ref: '#/components/parameters/companyId' + post: + summary: Create adjustment transaction + operationId: create-adjustment-transaction + description: "Use the *Create adjustment expense* endpoint to create an [adjustment](https://docs.codat.io/sync-for-expenses-api#/schemas/AdjustmentTransactionRequest) in the accounting software for a given company's connection. \n\nAdjustments represent write-offs and transaction alterations, such as foreign exchange adjustments, in the form of a journal entry. \n\n### Supported Integrations\n\n| Integration | Supported |\n|-----------------------|-----------|\n| QuickBooks Desktop | Yes |" + tags: + - Adjustments + responses: + '200': + description: OK + content: + application/json: + x-speakeasy-usage-example: true + schema: + $ref: '#/components/schemas/AdjustmentTransactionResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAdjustmentRequest' + examples: + Create adjustment: + value: + - id: 3357b3df-5f2e-465d-b9ba-226519dbb8f1 + date: '2024-05-21T00:00:00+00:00' + currency: USD + currencyRate: 1 + reference: test reference + lines: + - amount: 50 + accountRef: + id: 80000018-1671793811 + description: debit line + trackingRefs: + - id: 80000003-1674553958 + dataType: trackingCategories + invoiceTo: + id: 80000002-1674552702 + type: customer + - amount: -50 + accountRef: + id: 80000028-1671794219 + description: credit line + trackingRefs: + - id: 80000003-1674553958 + dataType: trackingCategories + '/companies/{companyId}/sync/expenses/reimbursable-expense-transactions': + parameters: + - $ref: '#/components/parameters/companyId' + post: + summary: Create reimbursable expense transaction + operationId: create-reimbursable-expense-transaction + description: "Use the *Create reimbursable expense* endpoint to submit an employee expense claim in the accounting platform for a given company's connection.\r\n\r\n[Reimbursable expense requests](https://docs.codat.io/sync-for-expenses-api#/schemas/ReimbursableExpenseTransactionRequest) are reflected in the accounting software in the form of **Bills** against an employee (who exists as a supplier in the accounting platform).\r\n\r\n### Supported Integrations\r\n| Integration | Supported |\r\n|-----------------------|-----------|\r\n| FreeAgent | Yes |\r\n| QuickBooks Desktop | Yes |\r\n| QuickBooks Online | Yes |\r\n| Oracle NetSuite | Yes |" + tags: + - Reimbursements + responses: + '200': + description: OK + content: + application/json: + x-speakeasy-usage-example: true + schema: + $ref: '#/components/schemas/CreateReimbursableExpenseResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ReimbursableExpenseTransactionRequest' + examples: + Create reimbursable expense: + value: + - id: 4d7c6929-7770-412b-91bb-44d3bc71d111 + reference: expenses w/c 01/07 + contactRef: + id: '752' + issueDate: '2024-05-21' + dueDate: '2024-05-21' + currency: GBP + currencyRate: 1 + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - description: Hotel + netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_5 + dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + '/companies/{companyId}/sync/expenses/reimbursable-expense-transactions/{transactionId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/transactionId' + put: + summary: Update reimbursable expense transaction + operationId: update-reimbursable-expense-transaction + description: "The *Update reimbursable expense* endpoint updates an existing employee expense claim in the accounting platform for a given company's connection. \r\n\r\nUpdating an existing [reimbursable expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/UpdateReimbursableExpenseTransactionRequest) will update the existing **bill** against an employee (who exists as a supplier in the accounting software).\r\n\r\n### Supported Integrations\r\n| Integration | Supported |\r\n|-----------------------|-----------|\r\n| FreeAgent | Yes |\r\n| QuickBooks Online | Yes |\r\n| Oracle NetSuite | Yes |" + tags: + - Reimbursements + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/CreateReimbursableExpenseResponse' + examples: + Example 1: + value: + syncId: cd937d46-8e41-43a9-9477-a79158ffd98a + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateReimbursableExpenseTransactionRequest' + examples: + Update reimbursable expense: + value: + reference: expenses w/c 01/07 + contactRef: + id: '752' + issueDate: '2024-05-21' + dueDate: '2024-05-21' + currency: GBP + currencyRate: 1 + notes: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + - description: Hotel + netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_5 + dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + '/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions/{transactionId}/attachments': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/syncId' + - $ref: '#/components/parameters/transactionId' + post: + summary: Upload attachment + operationId: upload-expense-attachment + x-speakeasy-name-override: upload + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/Attachment' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/AttachmentUpload' + tags: + - Attachments + description: "The *Upload attachment* endpoint uploads an attachment in the accounting software against the given transactionId. \n\n[Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) represent transactions made with a company debit or credit card. Attachments for `Adjustment` and `Transfer` transaction types are not supported for any integrations.\n\n**Integration-specific behaviour**\n\nEach accounting software supports different file formats and sizes.\n\n| Integration | File size | File extension |Supported transaction type\n|-------------------|-----------|------------------------------------------------------------------------------------------------------------------------------------------------|--------------|\n| **Xero** | 3 MB | 7Z, BMP, CSV, DOC, DOCX, EML, GIF, JPEG, JPG, KEYNOTE, MSG, NUMBERS, ODF, ODS, ODT, PAGES, PDF, PNG, PPT, PPTX, RAR, RTF, TIF, TIFF, TXT, XLS, XLSX, ZIP | All supported types |\n| **QuickBooks Online** | 100 MB | AI, CSV, DOC, DOCX, EPS, GIF, JPEG, JPG, ODS, PAGES, PDF, PNG, RTF, TIF, TXT, XLS, XLSX, XML | `ReimbursableExpenses`, `ExpensePayment`, `ExpenseRefund` |\n| **NetSuite** | 100 MB | BMP, CSV, XLS, XLSX, JSON, PDF, PJPG, PJPEG, PNG, TXT, SVG, TIF, TIFF, DOC, DOCX, ZIP |`ExpensePayment`, `ExpenseRefund` |\n| **Dynamics 365 Business Central** | 350 MB | [No explicit requirements outlined](https://learn.microsoft.com/en-gb/dynamics365/business-central/ui-how-add-link-to-record#to-attach-a-file-to-a-purchase-invoice) for text, image, and video files. | All supported types\n| **QuickBooks Desktop** | NA | Does not support attachment upload | N/A |\n| **FreeAgent** | 5MB | PNG, X-PNG, JPEG, PJG, GIF, X-PDF " + '/companies/{companyId}/data/all': + parameters: + - $ref: '#/components/parameters/companyId' + post: + summary: Refresh all data + operationId: refresh-all-data-types + responses: + '204': + description: No Content + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + description: |- + Refreshes all data types with `fetch on first link` set to `true` for a given company. + + This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. + + [Read more](https://docs.codat.io/core-concepts/data-type-settings) about data type settings and `fetch on first link`. + tags: + - Manage data + '/companies/{companyId}/dataStatus': + parameters: + - $ref: '#/components/parameters/companyId' + get: + summary: Get data status + operationId: get-data-status + description: Get the state of each data type for a company + tags: + - Manage data + responses: + '200': + description: OK + content: + application/json: + schema: + title: Data statuses + x-internal: true + type: object + properties: + accountTransactions: + $ref: '#/components/schemas/DataStatus' + nullable: true + balanceSheet: + $ref: '#/components/schemas/DataStatus' + nullable: true + bankAccounts: + $ref: '#/components/schemas/DataStatus' + nullable: true + bankTransactions: + $ref: '#/components/schemas/DataStatus' + nullable: true + billCreditNotes: + $ref: '#/components/schemas/DataStatus' + nullable: true + billPayments: + $ref: '#/components/schemas/DataStatus' + nullable: true + bills: + $ref: '#/components/schemas/DataStatus' + nullable: true + cashFlowStatement: + $ref: '#/components/schemas/DataStatus' + nullable: true + chartOfAccounts: + $ref: '#/components/schemas/DataStatus' + nullable: true + company: + $ref: '#/components/schemas/DataStatus' + nullable: true + creditNotes: + $ref: '#/components/schemas/DataStatus' + nullable: true + customers: + $ref: '#/components/schemas/DataStatus' + nullable: true + directCosts: + $ref: '#/components/schemas/DataStatus' + nullable: true + directIncomes: + $ref: '#/components/schemas/DataStatus' + nullable: true + invoices: + $ref: '#/components/schemas/DataStatus' + nullable: true + itemReceipts: + $ref: '#/components/schemas/DataStatus' + nullable: true + items: + $ref: '#/components/schemas/DataStatus' + nullable: true + journalEntries: + $ref: '#/components/schemas/DataStatus' + nullable: true + journals: + $ref: '#/components/schemas/DataStatus' + nullable: true + paymentMethods: + $ref: '#/components/schemas/DataStatus' + nullable: true + payments: + $ref: '#/components/schemas/DataStatus' + nullable: true + profitAndLoss: + $ref: '#/components/schemas/DataStatus' + nullable: true + purchaseOrders: + $ref: '#/components/schemas/DataStatus' + nullable: true + salesOrders: + $ref: '#/components/schemas/DataStatus' + nullable: true + suppliers: + $ref: '#/components/schemas/DataStatus' + nullable: true + taxRates: + $ref: '#/components/schemas/DataStatus' + nullable: true + trackingCategories: + $ref: '#/components/schemas/DataStatus' + nullable: true + transfers: + $ref: '#/components/schemas/DataStatus' + nullable: true + banking-accountBalances: + $ref: '#/components/schemas/DataStatus' + nullable: true + banking-accounts: + $ref: '#/components/schemas/DataStatus' + nullable: true + banking-transactionCategories: + $ref: '#/components/schemas/DataStatus' + nullable: true + banking-transactions: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-companyInfo: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-customers: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-disputes: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-locations: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-orders: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-paymentMethods: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-payments: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-productCategories: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-products: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-taxComponents: + $ref: '#/components/schemas/DataStatus' + nullable: true + commerce-transactions: + $ref: '#/components/schemas/DataStatus' + nullable: true + examples: + Example: + value: + accountTransactions: dataType: accountTransactions lastSuccessfulSync: '2022-01-01T00:00:00.000Z' currentStatus: Complete @@ -1510,15 +2086,56 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/data/history': + '/companies/{companyId}/data/queue/{dataType}': parameters: - $ref: '#/components/parameters/companyId' - get: - summary: List pull operations + - $ref: '#/components/parameters/dataType' + post: + summary: Refresh data type + operationId: refresh-data-type + description: |- + Refreshes a given data type for a given company. + + This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. tags: - - Refresh data - operationId: list-pull-operations - x-speakeasy-name-override: list-pull-operations + - Manage data + parameters: + - schema: + type: string + format: uuid + in: query + name: connectionId + description: 'Optionally, provide a data connection id to only queue pull operations on that connection.' + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/PullOperation' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + '/companies/{companyId}/data/history': + parameters: + - $ref: '#/components/parameters/companyId' + get: + summary: List pull operations + tags: + - Manage data + operationId: list-pull-operations + x-speakeasy-name-override: list-pull-operations responses: '200': description: OK @@ -1574,13 +2191,20 @@ paths: '/companies/{companyId}/data/history/{datasetId}': parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/datasetId' + - name: datasetId + in: path + required: true + schema: + type: string + format: uuid + description: Unique identifier for the dataset that completed its sync. + description: Unique identifier for the dataset that completed its sync. get: summary: Get pull operation operationId: get-pull-operation x-speakeasy-name-override: get-pull-operation tags: - - Refresh data + - Manage data responses: '200': description: OK @@ -1604,124 +2228,68 @@ paths: '503': $ref: '#/components/responses/Service-Unavailable' description: Retrieve information about a single dataset or pull operation. - /webhooks: + '/companies/{companyId}/push': + parameters: + - $ref: '#/components/parameters/companyId' get: - summary: List webhook consumers - operationId: list-webhook-consumers - x-speakeasy-name-override: list-consumers - description: "\uFEFF\x55\x73\x65\x20\x74\x68\x65\x20\x2A\x4C\x69\x73\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x73\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x72\x65\x74\x75\x72\x6E\x20\x61\x20\x6C\x69\x73\x74\x20\x6F\x66\x20\x61\x6C\x6C\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x73\x20\x74\x68\x61\x74\x20\x63\x75\x72\x72\x65\x6E\x74\x6C\x79\x20\x65\x78\x69\x73\x74\x20\x66\x6F\x72\x20\x79\x6F\x75\x72\x20\x63\x6C\x69\x65\x6E\x74\x2E\n\n\x5B\x57\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x57\x65\x62\x68\x6F\x6F\x6B\x43\x6F\x6E\x73\x75\x6D\x65\x72\x29\x20\x69\x73\x20\x61\x6E\x20\x48\x54\x54\x50\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x68\x61\x74\x20\x79\x6F\x75\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x20\x74\x6F\x20\x73\x75\x62\x73\x63\x72\x69\x62\x65\x20\x74\x6F\x20\x73\x70\x65\x63\x69\x66\x69\x63\x20\x65\x76\x65\x6E\x74\x73\x2E\x20\x53\x65\x65\x20\x6F\x75\x72\x20\x64\x6F\x63\x75\x6D\x65\x6E\x74\x61\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x6D\x6F\x72\x65\x20\x64\x65\x74\x61\x69\x6C\x73\x20\x6F\x6E\x20\x5B\x43\x6F\x64\x61\x74\x27\x73\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x73\x65\x72\x76\x69\x63\x65\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x75\x73\x69\x6E\x67\x2D\x74\x68\x65\x2D\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x2E" + parameters: + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/query' + - $ref: '#/components/parameters/orderBy' + summary: List push operations tags: - - Webhooks + - Push operations + operationId: list-push-operations + description: List push operation records. responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/WebhookConsumer/definitions/webhookConsumers' - examples: - Webhook consumers: - value: - results: - - id: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 - url: 'https://example.com/webhoook-consumers/sync-complete' - eventTypes: - - DataSyncCompleted - disabled: false - - id: ca3cac86-7925-4759-abc2-96405780fdfa - url: 'https://example.com/webhoook-consumers/dataset-changed' - eventTypes: - - DatasetDataChanged - disabled: true + $ref: '#/components/schemas/PushOperations' + examples: {} '400': - $ref: '#/components/responses/Bad-Request' + $ref: '#/components/responses/Malformed-Query' '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - post: - summary: Create webhook consumer - operationId: create-webhook-consumer - x-speakeasy-name-override: create-consumer - description: "\uFEFF\x55\x73\x65\x20\x74\x68\x65\x20\x2A\x43\x72\x65\x61\x74\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x20\x74\x68\x61\x74\x20\x77\x69\x6C\x6C\x20\x6C\x69\x73\x74\x65\x6E\x20\x74\x6F\x20\x6D\x65\x73\x73\x61\x67\x65\x73\x20\x77\x65\x20\x73\x65\x6E\x64\x20\x79\x6F\x75\x2E\n\n\x5B\x57\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x57\x65\x62\x68\x6F\x6F\x6B\x43\x6F\x6E\x73\x75\x6D\x65\x72\x29\x20\x69\x73\x20\x61\x6E\x20\x48\x54\x54\x50\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x68\x61\x74\x20\x79\x6F\x75\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x20\x74\x6F\x20\x73\x75\x62\x73\x63\x72\x69\x62\x65\x20\x74\x6F\x20\x73\x70\x65\x63\x69\x66\x69\x63\x20\x65\x76\x65\x6E\x74\x73\x2E\x20\x53\x65\x65\x20\x6F\x75\x72\x20\x64\x6F\x63\x75\x6D\x65\x6E\x74\x61\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x6D\x6F\x72\x65\x20\x64\x65\x74\x61\x69\x6C\x73\x20\x6F\x6E\x20\x5B\x43\x6F\x64\x61\x74\x27\x73\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x73\x65\x72\x76\x69\x63\x65\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x75\x73\x69\x6E\x67\x2D\x74\x68\x65\x2D\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x2E\n\n\x23\x23\x23\x20\x54\x69\x70\x73\x20\x61\x6E\x64\x20\x74\x72\x61\x70\x73\n\x2D\x20\x54\x68\x65\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x73\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x63\x72\x65\x61\x74\x65\x20\x69\x73\x20\x6C\x69\x6D\x69\x74\x65\x64\x20\x74\x6F\x20\x35\x30\x2E\x20\x49\x66\x20\x79\x6F\x75\x20\x68\x61\x76\x65\x20\x72\x65\x61\x63\x68\x65\x64\x20\x74\x68\x65\x20\x6D\x61\x78\x69\x6D\x75\x6D\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x73\x2C\x20\x75\x73\x65\x20\x74\x68\x65\x20\x5B\x2A\x44\x65\x6C\x65\x74\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x2A\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x73\x2F\x64\x65\x6C\x65\x74\x65\x2D\x77\x65\x62\x68\x6F\x6F\x6B\x2D\x63\x6F\x6E\x73\x75\x6D\x65\x72\x29\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x64\x65\x6C\x65\x74\x65\x20\x61\x6E\x20\x75\x6E\x75\x73\x65\x64\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x20\x66\x69\x72\x73\x74\x2E" + '/companies/{companyId}/push/{pushOperationKey}': + parameters: + - $ref: '#/components/parameters/companyId' + - schema: + type: string + format: uuid + name: pushOperationKey + in: path + required: true + description: Push operation key. + get: + summary: Get push operation tags: - - Webhooks - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookConsumer/definitions/webhookConsumerPrototype' - examples: - Subscribe consumer to one or more event types: - value: - url: 'https://example.com/webhoook-consumer' - eventTypes: - - DataSyncCompleted - - Dataset data changed - Subscribe consumer with disabled endpoint: - value: - url: 'https://example.com/webhoook-consumer' - eventTypes: - - DataSyncCompleted - disabled: true + - Push operations + operationId: get-push-operation + description: Retrieve push operation. responses: - '201': + '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/WebhookConsumer' - examples: - Subscribe consumer to one or more event types: - value: - id: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 - url: 'https://example.com/webhoook-consumer' - eventTypes: - - DataSyncCompleted - - DatasetDataChanged - disabled: false - Subscribe consumer with disabled endpoint: - value: - id: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 - url: 'https://example.com/webhoook-consumer' - eventTypes: - - DataSyncCompleted - disabled: true - '400': - $ref: '#/components/responses/Bad-Request' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/webhooks/{webhookId}': - parameters: - - $ref: '#/components/parameters/webhookId' - delete: - summary: Delete webhook consumer - operationId: delete-webhook-consumer - x-speakeasy-name-override: delete-consumer - description: "\uFEFF\x55\x73\x65\x20\x74\x68\x65\x20\x2A\x44\x65\x6C\x65\x74\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x6F\x20\x64\x65\x6C\x65\x74\x65\x20\x61\x6E\x20\x65\x78\x69\x73\x74\x69\x6E\x67\x20\x77\x65\x62\x68\x6F\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x2C\x20\x70\x72\x6F\x76\x69\x64\x69\x6E\x67\x20\x69\x74\x73\x20\x76\x61\x6C\x69\x64\x20\x60\x69\x64\x60\x20\x61\x73\x20\x61\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x2E\n\n\x5B\x57\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x57\x65\x62\x68\x6F\x6F\x6B\x43\x6F\x6E\x73\x75\x6D\x65\x72\x29\x20\x69\x73\x20\x61\x6E\x20\x48\x54\x54\x50\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x68\x61\x74\x20\x79\x6F\x75\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x20\x74\x6F\x20\x73\x75\x62\x73\x63\x72\x69\x62\x65\x20\x74\x6F\x20\x73\x70\x65\x63\x69\x66\x69\x63\x20\x65\x76\x65\x6E\x74\x73\x2E\x20\x53\x65\x65\x20\x6F\x75\x72\x20\x64\x6F\x63\x75\x6D\x65\x6E\x74\x61\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x6D\x6F\x72\x65\x20\x64\x65\x74\x61\x69\x6C\x73\x20\x6F\x6E\x20\x5B\x43\x6F\x64\x61\x74\x27\x73\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x73\x65\x72\x76\x69\x63\x65\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x75\x73\x69\x6E\x67\x2D\x74\x68\x65\x2D\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x2E" - tags: - - Webhooks - responses: - '204': - description: No content + $ref: '#/components/schemas/PushOperation' + examples: {} '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1736,86 +2304,3389 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - /webhooks/integrationKeys/zapier: + '/companies/{companyId}/connections/{connectionId}/push/accounts': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' post: - summary: Rotate Zapier key - operationId: rotate-zapier-key - x-speakeasy-ignore: true - description: "\uFEFF\x54\x68\x65\x20\x2A\x52\x6F\x74\x61\x74\x65\x20\x5A\x61\x70\x69\x65\x72\x20\x6B\x65\x79\x2A\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x72\x65\x74\x75\x72\x6E\x73\x20\x74\x68\x65\x20\x5A\x61\x70\x69\x65\x72\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x6B\x65\x79\x20\x6E\x65\x65\x64\x65\x64\x20\x74\x6F\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x20\x5A\x61\x70\x73\x20\x74\x72\x69\x67\x67\x65\x72\x65\x64\x20\x62\x79\x20\x43\x6F\x64\x61\x74\x27\x73\x20\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2E\x20\n\n\x49\x66\x20\x61\x20\x6B\x65\x79\x20\x68\x61\x73\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x62\x65\x65\x6E\x20\x63\x72\x65\x61\x74\x65\x64\x2C\x20\x63\x61\x6C\x6C\x69\x6E\x67\x20\x74\x68\x69\x73\x20\x77\x69\x6C\x6C\x20\x72\x65\x76\x6F\x6B\x65\x20\x74\x68\x61\x74\x20\x65\x78\x69\x73\x74\x69\x6E\x67\x20\x6B\x65\x79\x2E\n\n\x54\x68\x65\x20\x6B\x65\x79\x20\x63\x68\x61\x6E\x67\x65\x73\x20\x65\x61\x63\x68\x20\x74\x69\x6D\x65\x20\x74\x68\x69\x73\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x69\x73\x20\x63\x61\x6C\x6C\x65\x64\x2E\x20\x49\x66\x20\x79\x6F\x75\x20\x61\x72\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x75\x73\x69\x6E\x67\x20\x6F\x75\x72\x20\x5A\x61\x70\x69\x65\x72\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x61\x6E\x64\x20\x63\x61\x6C\x6C\x65\x64\x20\x74\x68\x69\x73\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x61\x67\x61\x69\x6E\x2C\x20\x79\x6F\x75\x20\x6E\x65\x65\x64\x20\x74\x6F\x20\x72\x65\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x20\x75\x73\x69\x6E\x67\x20\x74\x68\x65\x20\x6C\x61\x74\x65\x73\x74\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x6B\x65\x79\x20\x72\x65\x74\x75\x72\x6E\x65\x64\x20\x69\x6E\x20\x74\x68\x65\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x2E\n\n\x4F\x75\x72\x20\x5A\x61\x70\x69\x65\x72\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x6D\x61\x6B\x65\x73\x20\x69\x74\x20\x73\x69\x6D\x70\x6C\x65\x20\x66\x6F\x72\x20\x79\x6F\x75\x20\x74\x6F\x20\x73\x65\x74\x20\x75\x70\x20\x61\x6E\x64\x20\x72\x65\x63\x65\x69\x76\x65\x20\x75\x73\x65\x72\x20\x6E\x6F\x74\x69\x66\x69\x63\x61\x74\x69\x6F\x6E\x73\x20\x69\x6E\x20\x79\x6F\x75\x72\x20\x70\x72\x65\x66\x65\x72\x72\x65\x64\x20\x77\x61\x79\x73\x2C\x20\x73\x75\x63\x68\x20\x61\x73\x20\x76\x69\x61\x20\x65\x6D\x61\x69\x6C\x20\x6F\x72\x20\x53\x6C\x61\x63\x6B\x2E\x20\x53\x65\x65\x20\x6F\x75\x72\x20\x5B\x5A\x61\x70\x69\x65\x72\x20\x64\x6F\x63\x75\x6D\x65\x6E\x74\x61\x74\x69\x6F\x6E\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x75\x73\x69\x6E\x67\x2D\x74\x68\x65\x2D\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x7A\x61\x70\x69\x65\x72\x2D\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x29\x20\x66\x6F\x72\x20\x64\x65\x74\x61\x69\x6C\x65\x64\x20\x69\x6E\x73\x74\x72\x75\x63\x74\x69\x6F\x6E\x73\x20\x6F\x6E\x20\x73\x65\x74\x74\x69\x6E\x67\x20\x75\x70\x20\x74\x68\x69\x73\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\n\n" - tags: - - Webhooks - responses: - '201': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/WebhookZapierKey' - examples: - Integration key: - value: - key: sk_integ_WM4dfoK1nKZnDE_kceze6hWDjbRwOZwG.us - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - /integrations: - get: - summary: List integrations - description: List your available integrations tags: - - Integrations - operationId: list-integrations + - Accounts + summary: Create account + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Account/definitions/accountPrototype' responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/Integrations' + $ref: '#/components/schemas/CreateAccountResponse' + examples: {} '400': - $ref: '#/components/responses/Malformed-Query' + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - parameters: - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - - $ref: '#/components/parameters/query' - - $ref: '#/components/parameters/orderBy' - '/integrations/{platformKey}': + description: |- + The *Create account* endpoint creates a new [account](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) for a given company's connection. + + [Accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) are the categories a business uses to record accounting transactions. + + **Integration-specific behaviour** + + Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-chartOfAccounts-model). + operationId: create-account + '/companies/{companyId}/connections/{connectionId}/options/chartOfAccounts': parameters: - - $ref: '#/components/parameters/platformKey' + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' get: - summary: Get integration + summary: Get create account model tags: - - Integrations - operationId: get-integration - description: 'Get single integration, by platformKey' + - Accounts responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Integration' + $ref: '#/components/schemas/PushOption' + examples: + Exact (Netherlands): + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: [] + information: + - field: NominalCode + details: Must be provided. + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: [] + information: + - field: Name + details: Must be provided. + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Assets.Cash + type: String + displayName: Asset.Assets.Cash + required: false + - value: Asset.Assets.Bank + type: String + displayName: Asset.Assets.Bank + required: false + - value: Asset.Assets.PaymentServices + type: String + displayName: Asset.Assets.PaymentServices + required: false + - value: Asset.Assets.AccountsReceivable + type: String + displayName: Asset.Assets.AccountsReceivable + required: false + - value: Liability.EquityAndLiabilities.AccountsPayable + type: String + displayName: Liability.EquityAndLiabilities.AccountsPayable + required: false + - value: Asset.Assets.VAT + type: String + displayName: Asset.Assets.VAT + required: false + - value: Liability.EquityAndLiabilities.EmployeesPayable + type: String + displayName: Liability.EquityAndLiabilities.EmployeesPayable + required: false + - value: Asset.Assets.PrepaidExpenses + type: String + displayName: Asset.Assets.PrepaidExpenses + required: false + - value: Liability.EquityAndLiabilities.AccruedExpenses + type: String + displayName: Liability.EquityAndLiabilities.AccruedExpenses + required: false + - value: Liability.EquityAndLiabilities.IncomeTaxesPayable + type: String + displayName: Liability.EquityAndLiabilities.IncomeTaxesPayable + required: false + - value: Asset.Assets.FixedAssets + type: String + displayName: Asset.Assets.FixedAssets + required: false + - value: Asset.Assets.OtherAssets + type: String + displayName: Asset.Assets.OtherAssets + required: false + - value: Asset.Assets.AccumulatedDeprecation + type: String + displayName: Asset.Assets.AccumulatedDeprecation + required: false + - value: Asset.Assets.Inventory + type: String + displayName: Asset.Assets.Inventory + required: false + - value: Equity.EquityAndLiabilities.CapitalStock + type: String + displayName: Equity.EquityAndLiabilities.CapitalStock + required: false + - value: Equity.EquityAndLiabilities.RetainedEarnings + type: String + displayName: Equity.EquityAndLiabilities.RetainedEarnings + required: false + - value: Liability.EquityAndLiabilities.LongTermDebt + type: String + displayName: Liability.EquityAndLiabilities.LongTermDebt + required: false + - value: Liability.EquityAndLiabilities.CurrentPortionOfDebt + type: String + displayName: Liability.EquityAndLiabilities.CurrentPortionOfDebt + required: false + - value: Unknown.EquityAndLiabilities.Intercompany + type: String + displayName: Unknown.EquityAndLiabilities.Intercompany + required: false + - value: Unknown.General.General + type: String + displayName: Unknown.General.General + required: false + - value: Income.NetIncome.Revenue + type: String + displayName: Income.NetIncome.Revenue + required: false + - value: Expense.NetIncome.CostOfGoods + type: String + displayName: Expense.NetIncome.CostOfGoods + required: false + - value: Expense.NetIncome.OtherCosts + type: String + displayName: Expense.NetIncome.OtherCosts + required: false + - value: Expense.NetIncome.SalesGeneralAdministrativeExpenses + type: String + displayName: Expense.NetIncome.SalesGeneralAdministrativeExpenses + required: false + - value: Expense.NetIncome.DeprecationCosts + type: String + displayName: Expense.NetIncome.DeprecationCosts + required: false + - value: Expense.NetIncome.ResearchAndDevelopment + type: String + displayName: Expense.NetIncome.ResearchAndDevelopment + required: false + - value: Expense.NetIncome.EmployeeCosts + type: String + displayName: Expense.NetIncome.EmployeeCosts + required: false + - value: Expense.NetIncome.EmploymentCosts + type: String + displayName: Expense.NetIncome.EmploymentCosts + required: false + - value: Expense.ExceptionalIncome.ExceptionalCosts + type: String + displayName: Expense.ExceptionalIncome.ExceptionalCosts + required: false + - value: Income.ExceptionalIncome.ExceptionalIncome + type: String + displayName: Income.ExceptionalIncome.ExceptionalIncome + required: false + - value: Expense.ExceptionalIncome.IncomeTaxes + type: String + displayName: Expense.ExceptionalIncome.IncomeTaxes + required: false + - value: Income.ExceptionalIncome.InterestIncome + type: String + displayName: Income.ExceptionalIncome.InterestIncome + required: false + required: true + validation: + warnings: [] + information: + - field: FullyQualifiedCategory + details: Must be provided. + status: + type: String + displayName: Account Status + description: The status of the account + options: + - value: Active + type: String + displayName: Active + required: false + - value: Pending + type: String + displayName: Pending + required: false + - value: Unknown + type: String + displayName: Unknown + required: false + required: true + validation: + warnings: [] + information: + - field: Status + details: Must be provided. + required: true + Exact (UK): + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: [] + information: + - field: NominalCode + details: Must be provided. + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: [] + information: + - field: Name + details: Must be provided. + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Assets.Cash + type: String + displayName: Asset.Assets.Cash + required: false + - value: Asset.Assets.Bank + type: String + displayName: Asset.Assets.Bank + required: false + - value: Asset.Assets.PaymentServices + type: String + displayName: Asset.Assets.PaymentServices + required: false + - value: Asset.Assets.AccountsReceivable + type: String + displayName: Asset.Assets.AccountsReceivable + required: false + - value: Liability.EquityAndLiabilities.AccountsPayable + type: String + displayName: Liability.EquityAndLiabilities.AccountsPayable + required: false + - value: Asset.Assets.VAT + type: String + displayName: Asset.Assets.VAT + required: false + - value: Liability.EquityAndLiabilities.EmployeesPayable + type: String + displayName: Liability.EquityAndLiabilities.EmployeesPayable + required: false + - value: Asset.Assets.PrepaidExpenses + type: String + displayName: Asset.Assets.PrepaidExpenses + required: false + - value: Liability.EquityAndLiabilities.AccruedExpenses + type: String + displayName: Liability.EquityAndLiabilities.AccruedExpenses + required: false + - value: Liability.EquityAndLiabilities.IncomeTaxesPayable + type: String + displayName: Liability.EquityAndLiabilities.IncomeTaxesPayable + required: false + - value: Asset.Assets.FixedAssets + type: String + displayName: Asset.Assets.FixedAssets + required: false + - value: Asset.Assets.OtherAssets + type: String + displayName: Asset.Assets.OtherAssets + required: false + - value: Asset.Assets.AccumulatedDeprecation + type: String + displayName: Asset.Assets.AccumulatedDeprecation + required: false + - value: Asset.Assets.Inventory + type: String + displayName: Asset.Assets.Inventory + required: false + - value: Equity.EquityAndLiabilities.CapitalStock + type: String + displayName: Equity.EquityAndLiabilities.CapitalStock + required: false + - value: Equity.EquityAndLiabilities.RetainedEarnings + type: String + displayName: Equity.EquityAndLiabilities.RetainedEarnings + required: false + - value: Liability.EquityAndLiabilities.LongTermDebt + type: String + displayName: Liability.EquityAndLiabilities.LongTermDebt + required: false + - value: Liability.EquityAndLiabilities.CurrentPortionOfDebt + type: String + displayName: Liability.EquityAndLiabilities.CurrentPortionOfDebt + required: false + - value: Unknown.EquityAndLiabilities.Intercompany + type: String + displayName: Unknown.EquityAndLiabilities.Intercompany + required: false + - value: Unknown.General.General + type: String + displayName: Unknown.General.General + required: false + - value: Income.NetIncome.Revenue + type: String + displayName: Income.NetIncome.Revenue + required: false + - value: Expense.NetIncome.CostOfGoods + type: String + displayName: Expense.NetIncome.CostOfGoods + required: false + - value: Expense.NetIncome.OtherCosts + type: String + displayName: Expense.NetIncome.OtherCosts + required: false + - value: Expense.NetIncome.SalesGeneralAdministrativeExpenses + type: String + displayName: Expense.NetIncome.SalesGeneralAdministrativeExpenses + required: false + - value: Expense.NetIncome.DeprecationCosts + type: String + displayName: Expense.NetIncome.DeprecationCosts + required: false + - value: Expense.NetIncome.ResearchAndDevelopment + type: String + displayName: Expense.NetIncome.ResearchAndDevelopment + required: false + - value: Expense.NetIncome.EmployeeCosts + type: String + displayName: Expense.NetIncome.EmployeeCosts + required: false + - value: Expense.NetIncome.EmploymentCosts + type: String + displayName: Expense.NetIncome.EmploymentCosts + required: false + - value: Expense.ExceptionalIncome.ExceptionalCosts + type: String + displayName: Expense.ExceptionalIncome.ExceptionalCosts + required: false + - value: Income.ExceptionalIncome.ExceptionalIncome + type: String + displayName: Income.ExceptionalIncome.ExceptionalIncome + required: false + - value: Expense.ExceptionalIncome.IncomeTaxes + type: String + displayName: Expense.ExceptionalIncome.IncomeTaxes + required: false + - value: Income.ExceptionalIncome.InterestIncome + type: String + displayName: Income.ExceptionalIncome.InterestIncome + required: false + required: true + validation: + warnings: [] + information: + - field: FullyQualifiedCategory + details: Must be provided. + status: + type: String + displayName: Account Status + description: The status of the account + options: + - value: Active + type: String + displayName: Active + required: false + - value: Pending + type: String + displayName: Pending + required: false + - value: Unknown + type: String + displayName: Unknown + required: false + required: true + validation: + warnings: [] + information: + - field: Status + details: Must be provided. + required: true + MYOB AccountRight and Essentials: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: + - field: NominalCode + details: 'If alphanumeric is supported, must be between 1 and 10 characters. Otherwise format is x-xxxx' + information: [] + name: + type: String + displayName: Name + description: Name of the account + required: false + validation: + warnings: + - field: Name + details: Must have a length between 1 and 60 characters + information: [] + description: + type: String + displayName: Description + description: Description of the account + required: false + validation: + warnings: + - field: Description + details: Must have a length between 1 and 255 characters + information: [] + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Bank + type: String + displayName: Bank + required: false + - value: Asset.AccountReceivable + type: String + displayName: Accounts Receivable + required: false + - value: Asset.OtherCurrentAsset + type: String + displayName: Other Current Asset + required: false + - value: Asset.FixedAsset + type: String + displayName: Fixed Asset + required: false + - value: Asset.OtherAsset + type: String + displayName: Other Asset + required: false + - value: Asset.CashAndBank + type: String + displayName: Cash + required: false + - value: Asset.Property Plant and Equipment + type: String + displayName: Equipment Machinery + required: false + - value: Liability.CreditCard + type: String + displayName: Credit Card + required: false + - value: Liability.AccountsPayable + type: String + displayName: Accounts Payable + required: false + - value: Liability.OtherCurrentLiability + type: String + displayName: Other Current Liability + required: false + - value: Liability.LongTermLiability + type: String + displayName: Long Term Liability + required: false + - value: Liability.OtherLiability + type: String + displayName: Other Liability + required: false + - value: Equity + type: String + displayName: Equity + required: false + - value: Equity.Equity + type: String + displayName: Retained Earnings + required: false + - value: Equity.Equity.RetainedEarnings + type: String + displayName: Retained Earnings + required: false + - value: Equity.Owner's Equity + type: String + displayName: Retained Earnings + required: false + - value: Income + type: String + displayName: Income + required: false + - value: OtherIncome + type: String + displayName: Other Income + required: false + - value: Expense + type: String + displayName: Expense + required: false + - value: Expense.Expense + type: String + displayName: Sales Marketing + required: false + - value: Expense.Expense.Insurance + type: String + displayName: General Administrative + required: false + - value: Expense.Overhead + type: String + displayName: General Administrative + required: false + - value: Expense.Expense.RepairMaintenance + type: String + displayName: Repairs Maintenance + required: false + - value: OtherExpense + type: String + displayName: Other Expense + required: false + - value: CostOfSales + type: String + displayName: Cost of Sales + required: false + - value: Cost Of Goods Sold.Cost of Sales + type: String + displayName: Other + required: false + required: true + status: + type: String + displayName: Account Status + description: The status of the account + options: + - value: Active + type: String + displayName: Active + required: false + - value: Archived + type: String + displayName: Archived + required: false + required: true + required: true + QuickBooks Desktop: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: + - field: NominalCode + details: Max length of 7 characters. + information: [] + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: + - field: Name + details: Max length of 31 characters. + information: [] + description: + type: String + displayName: Description + description: Description of the account + required: false + validation: + warnings: + - field: Description + details: Max length of 200 characters. + information: [] + currency: + type: String + displayName: Currency + description: The currency of the account + required: false + validation: + warnings: + - field: Currency + details: 'The currency must match the base currency of the QuickBooks Desktop company unless the FullyQualifiedCategory is ''Asset.AccountsReceivable'',''Liability.AccountsPayable'' or ''Liability.CreditCard''' + - field: Currency + details: Must be a three letter ISO code that matches an existing active currency in the QuickBooks Desktop company + - field: Currency + details: Can only be set if the Quickbooks Desktop company has Multicurrency enabled. + information: + - field: Currency + details: 'If not set, will default to the base currency of the QuickBooks Desktop company' + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.AccountsReceivable + type: String + displayName: Account Receivable + required: false + - value: Asset.FixedAsset + type: String + displayName: Fixed Asset + required: false + - value: Asset.OtherCurrentAsset + type: String + displayName: Other Current Asset + required: false + - value: Asset.OtherAsset + type: String + displayName: Other Asset + required: false + - value: Income.Income + type: String + displayName: Income + required: false + - value: Income.OtherIncome + type: String + displayName: Other Income + required: false + - value: Liability.AccountsPayable + type: String + displayName: Accounts Payable + required: false + - value: Liability.CreditCard + type: String + displayName: Credit Card + required: false + - value: Liability.LongTermLiability + type: String + displayName: Long Term Liability + required: false + - value: Liability.OtherCurrentLiability + type: String + displayName: Other Current Liability + required: false + - value: Liability.CostOfGoodsSold + type: String + displayName: Cost Of Goods Sold + required: false + - value: Equity.Equity + type: String + displayName: Equity + required: false + - value: Expense.Expense + type: String + displayName: Expense + required: false + - value: Expense.OtherExpense + type: String + displayName: Other Expense + required: false + required: true + currentBalance: + type: Number + displayName: Current Balance + description: The current balance in the account + required: false + required: true + QuickBooks Online Sandbox: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + validation: + warnings: [] + information: + - field: NominalCode + details: If included must have a length between 1 and 7 characters + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: + - field: Name + details: Must have a length between 1 and 100 characters + information: [] + currency: + type: String + displayName: Currency + description: The currency of the account + required: false + validation: + warnings: [] + information: + - field: Currency + details: When not specified company base currency will be used + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Bank.CashOnHand + type: String + displayName: Cash On Hand + required: false + - value: Asset.Bank.Checking + type: String + displayName: Checking + required: false + - value: Asset.Bank.MoneyMarket + type: String + displayName: Money Market + required: false + - value: Asset.Bank.RentsHeldInTrust + type: String + displayName: Rents Held In Trust + required: false + - value: Asset.Bank.Savings + type: String + displayName: Savings + required: false + - value: Asset.Bank.TrustAccounts + type: String + displayName: Trust Accounts + required: false + - value: Asset.Bank.CashAndCashEquivalents + type: String + displayName: Cash And Cash Equivalents + required: false + - value: Asset.Bank.OtherEarmarkedBankAccounts + type: String + displayName: Other Earmarked Bank Accounts + required: false + - value: Asset.Other Current Asset.AllowanceForBadDebts + type: String + displayName: Allowance For Bad Debts + required: false + - value: Asset.Other Current Asset.DevelopmentCosts + type: String + displayName: Development Costs + required: false + - value: Asset.Other Current Asset.EmployeeCashAdvances + type: String + displayName: Employee Cash Advances + required: false + - value: Asset.Other Current Asset.OtherCurrentAssets + type: String + displayName: Other Current Assets + required: false + - value: Asset.Other Current Asset.Inventory + type: String + displayName: Inventory + required: false + - value: Asset.Other Current Asset.Investment_MortgageRealEstateLoans + type: String + displayName: Investment Mortgage Real Estate Loans + required: false + - value: Asset.Other Current Asset.Investment_Other + type: String + displayName: Investment Other + required: false + - value: Asset.Other Current Asset.Investment_TaxExemptSecurities + type: String + displayName: Investment Tax Exempt Securities + required: false + - value: Asset.Other Current Asset.Investment_USGovernmentObligations + type: String + displayName: Investment US Government Obligations + required: false + - value: Asset.Other Current Asset.LoansToOfficers + type: String + displayName: Loans To Officers + required: false + - value: Asset.Other Current Asset.LoansToOthers + type: String + displayName: Loans To Others + required: false + - value: Asset.Other Current Asset.LoansToStockholders + type: String + displayName: Loans To Stockholders + required: false + - value: Asset.Other Current Asset.PrepaidExpenses + type: String + displayName: Prepaid Expenses + required: false + - value: Asset.Other Current Asset.Retainage + type: String + displayName: Retainage + required: false + - value: Asset.Other Current Asset.UndepositedFunds + type: String + displayName: Undeposited Funds + required: false + - value: Asset.Other Current Asset.AssetsAvailableForSale + type: String + displayName: Assets Available For Sale + required: false + - value: Asset.Other Current Asset.BalWithGovtAuthorities + type: String + displayName: Balance With Govt Authorities + required: false + - value: Asset.Other Current Asset.CalledUpShareCapitalNotPaid + type: String + displayName: Called Up Share Capital Not Paid + required: false + - value: Asset.Other Current Asset.ExpenditureAuthorisationsAndLettersOfCredit + type: String + displayName: Expenditure Authorisations And Letters Of Credit + required: false + - value: Asset.Other Current Asset.GlobalTaxDeferred + type: String + displayName: Global Tax Deferred + required: false + - value: Asset.Other Current Asset.GlobalTaxRefund + type: String + displayName: Global Tax Refund + required: false + - value: Asset.Other Current Asset.InternalTransfers + type: String + displayName: Internal Transfers + required: false + - value: Asset.Other Current Asset.OtherConsumables + type: String + displayName: Other Consumables + required: false + - value: Asset.Other Current Asset.ProvisionsCurrentAssets + type: String + displayName: Provisions Current Assets + required: false + - value: Asset.Other Current Asset.ShortTermInvestmentsInRelatedParties + type: String + displayName: Short Term Investments In Related Parties + required: false + - value: Asset.Other Current Asset.ShortTermLoansAndAdvancesToRelatedParties + type: String + displayName: Short Term Loans And Advances To Related Parties + required: false + - value: Asset.Other Current Asset.TradeAndOtherReceivables + type: String + displayName: Trade And Other Receivables + required: false + - value: Asset.Fixed Asset.AccumulatedDepletion + type: String + displayName: Accumulated Depletion + required: false + - value: Asset.Fixed Asset.AccumulatedDepreciation + type: String + displayName: Accumulated Depreciation + required: false + - value: Asset.Fixed Asset.DepletableAssets + type: String + displayName: Depletable Assets + required: false + - value: Asset.Fixed Asset.FixedAssetComputers + type: String + displayName: Fixed Asset Computers + required: false + - value: Asset.Fixed Asset.FixedAssetCopiers + type: String + displayName: Fixed Asset Copiers + required: false + - value: Asset.Fixed Asset.FixedAssetFurniture + type: String + displayName: Fixed Asset Furniture + required: false + - value: Asset.Fixed Asset.FixedAssetPhone + type: String + displayName: Fixed Asset Phone + required: false + - value: Asset.Fixed Asset.FixedAssetPhotoVideo + type: String + displayName: Fixed Asset Photo Video + required: false + - value: Asset.Fixed Asset.FixedAssetSoftware + type: String + displayName: Fixed Asset Software + required: false + - value: Asset.Fixed Asset.FixedAssetOtherToolsEquipment + type: String + displayName: Fixed Asset Other Tools Equipment + required: false + - value: Asset.Fixed Asset.FurnitureAndFixtures + type: String + displayName: Furniture And Fixtures + required: false + - value: Asset.Fixed Asset.Land + type: String + displayName: Land + required: false + - value: Asset.Fixed Asset.LeaseholdImprovements + type: String + displayName: Leasehold Improvements + required: false + - value: Asset.Fixed Asset.OtherFixedAssets + type: String + displayName: Other Fixed Assets + required: false + - value: Asset.Fixed Asset.AccumulatedAmortization + type: String + displayName: Accumulated Amortization + required: false + - value: Asset.Fixed Asset.Buildings + type: String + displayName: Buildings + required: false + - value: Asset.Fixed Asset.IntangibleAssets + type: String + displayName: Intangible Assets + required: false + - value: Asset.Fixed Asset.MachineryAndEquipment + type: String + displayName: Machinery And Equipment + required: false + - value: Asset.Fixed Asset.Vehicles + type: String + displayName: Vehicles + required: false + - value: Asset.Fixed Asset.AssetsInCourseOfConstruction + type: String + displayName: Assets In Course Of Construction + required: false + - value: Asset.Fixed Asset.CapitalWip + type: String + displayName: Capital Wip + required: false + - value: Asset.Fixed Asset.CumulativeDepreciationOnIntangibleAssets + type: String + displayName: Cumulative Depreciation On Intangible Assets + required: false + - value: Asset.Fixed Asset.IntangibleAssetsUnderDevelopment + type: String + displayName: Intangible Assets Under Development + required: false + - value: Asset.Fixed Asset.LandAsset + type: String + displayName: Land Asset + required: false + - value: Asset.Fixed Asset.NonCurrentAssets + type: String + displayName: Non Current Assets + required: false + - value: Asset.Fixed Asset.ParticipatingInterests + type: String + displayName: Participating Interests + required: false + - value: Asset.Fixed Asset.ProvisionsFixedAssets + type: String + displayName: Provisions Fixed Assets + required: false + - value: Asset.Other Asset.LeaseBuyout + type: String + displayName: Lease Buyout + required: false + - value: Asset.Other Asset.OtherLongTermAssets + type: String + displayName: Other Long Term Assets + required: false + - value: Asset.Other Asset.SecurityDeposits + type: String + displayName: Security Deposits + required: false + - value: Asset.Other Asset.AccumulatedAmortizationOfOtherAssets + type: String + displayName: Accumulated Amortization Of Other Assets + required: false + - value: Asset.Other Asset.Goodwill + type: String + displayName: Goodwill + required: false + - value: Asset.Other Asset.Licenses + type: String + displayName: Licenses + required: false + - value: Asset.Other Asset.OrganizationalCosts + type: String + displayName: Organizational Costs + required: false + - value: Asset.Other Asset.AssetsHeldForSale + type: String + displayName: Assets Held For Sale + required: false + - value: Asset.Other Asset.AvailableForSaleFinancialAssets + type: String + displayName: Available For Sale Financial Assets + required: false + - value: Asset.Other Asset.DeferredTax + type: String + displayName: Deferred Tax + required: false + - value: Asset.Other Asset.Investments + type: String + displayName: Investments + required: false + - value: Asset.Other Asset.LongTermInvestments + type: String + displayName: Long Term Investments + required: false + - value: Asset.Other Asset.LongTermLoansAndAdvancesToRelatedParties + type: String + displayName: Long Term Loans And Advances To Related Parties + required: false + - value: Asset.Other Asset.OtherIntangibleAssets + type: String + displayName: Other Intangible Assets + required: false + - value: Asset.Other Asset.OtherLongTermInvestments + type: String + displayName: Other Long Term Investments + required: false + - value: Asset.Other Asset.OtherLongTermLoansAndAdvances + type: String + displayName: Other Long Term Loans And Advances + required: false + - value: Asset.Other Asset.PrepaymentsAndAccruedIncome + type: String + displayName: Prepayments And Accrued Income + required: false + - value: Asset.Other Asset.ProvisionsNonCurrentAssets + type: String + displayName: Provisions Non-Current Assets + required: false + - value: Asset.Accounts Receivable.AccountsReceivable + type: String + displayName: Accounts Receivable + required: false + - value: Expense.Expense.AdvertisingPromotional + type: String + displayName: Advertising/Promotional + required: false + - value: Expense.Expense.BadDebts + type: String + displayName: Bad Debts + required: false + - value: Expense.Expense.BankCharges + type: String + displayName: Bank Charges + required: false + - value: Expense.Expense.CharitableContributions + type: String + displayName: Charitable Contributions + required: false + - value: Expense.Expense.CommissionsAndFees + type: String + displayName: Commissions And Fees + required: false + - value: Expense.Expense.Entertainment + type: String + displayName: Entertainment + required: false + - value: Expense.Expense.EntertainmentMeals + type: String + displayName: Entertainment Meals + required: false + - value: Expense.Expense.EquipmentRental + type: String + displayName: Equipment Rental + required: false + - value: Expense.Expense.FinanceCosts + type: String + displayName: Finance Costs + required: false + - value: Expense.Expense.GlobalTaxExpense + type: String + displayName: Global Tax Expense + required: false + - value: Expense.Expense.Insurance + type: String + displayName: Insurance + required: false + - value: Expense.Expense.InterestPaid + type: String + displayName: Interest Paid + required: false + - value: Expense.Expense.LegalProfessionalFees + type: String + displayName: Legal And Professional Fees + required: false + - value: Expense.Expense.OfficeExpenses + type: String + displayName: Office Expenses + required: false + - value: Expense.Expense.OfficeGeneralAdministrativeExpenses + type: String + displayName: Office/General Administrative Expenses + required: false + - value: Expense.Expense.OtherBusinessExpenses + type: String + displayName: Other Business Expenses + required: false + - value: Expense.Expense.OtherMiscellaneousServiceCost + type: String + displayName: Other Miscellaneous Service Cost + required: false + - value: Expense.Expense.PromotionalMeals + type: String + displayName: Promotional Meals + required: false + - value: Expense.Expense.RentOrLeaseOfBuildings + type: String + displayName: Rent Or Lease Of Buildings + required: false + - value: Expense.Expense.RepairMaintenance + type: String + displayName: Repair And Maintenance + required: false + - value: Expense.Expense.ShippingFreightDelivery + type: String + displayName: 'Shipping, Freight And Delivery' + required: false + - value: Expense.Expense.SuppliesMaterials + type: String + displayName: Supplies And Materials + required: false + - value: Expense.Expense.Travel + type: String + displayName: Travel + required: false + - value: Expense.Expense.TravelMeals + type: String + displayName: Travel Meals + required: false + - value: Expense.Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Expense.Auto + type: String + displayName: Auto + required: false + - value: Expense.Expense.CostOfLabor + type: String + displayName: Cost Of Labor + required: false + - value: Expense.Expense.DuesSubscriptions + type: String + displayName: Dues And Subscriptions + required: false + - value: Expense.Expense.PayrollExpenses + type: String + displayName: Payroll Expenses + required: false + - value: Expense.Expense.TaxesPaid + type: String + displayName: Taxes Paid + required: false + - value: Expense.Expense.UnappliedCashBillPaymentExpense + type: String + displayName: Unapplied Cash Bill Payment Expense + required: false + - value: Expense.Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Expense.AmortizationExpense + type: String + displayName: Amortization Expense + required: false + - value: Expense.Expense.AppropriationsToDepreciation + type: String + displayName: Appropriations To Depreciation + required: false + - value: Expense.Expense.BorrowingCost + type: String + displayName: Borrowing Cost + required: false + - value: Expense.Expense.CommissionsAndFees + type: String + displayName: Commissions And Fees + required: false + - value: Expense.Expense.DistributionCosts + type: String + displayName: Distribution Costs + required: false + - value: Expense.Expense.ExternalServices + type: String + displayName: External Services + required: false + - value: Expense.Expense.ExtraordinaryCharges + type: String + displayName: Extraordinary Charges + required: false + - value: Expense.Expense.IncomeTaxExpense + type: String + displayName: Income Tax Expense + required: false + - value: Expense.Expense.LossOnDiscontinuedOperationsNetOfTax + type: String + displayName: Loss On Discontinued Operations Net Of Tax + required: false + - value: Expense.Expense.ManagementCompensation + type: String + displayName: Management Compensation + required: false + - value: Expense.Expense.OtherCurrentOperatingCharges + type: String + displayName: Other Current Operating Charges + required: false + - value: Expense.Expense.OtherExternalServices + type: String + displayName: Other External Services + required: false + - value: Expense.Expense.OtherRentalCosts + type: String + displayName: Other Rental Costs + required: false + - value: Expense.Expense.OtherSellingExpenses + type: String + displayName: Other Selling Expenses + required: false + - value: Expense.Expense.ProjectStudiesSurveysAssessments + type: String + displayName: Project Studies Surveys Assessments + required: false + - value: Expense.Expense.PurchasesRebates + type: String + displayName: Purchases Rebates + required: false + - value: Expense.Expense.ShippingAndDeliveryExpense + type: String + displayName: Shipping And Delivery Expense + required: false + - value: Expense.Expense.StaffCosts + type: String + displayName: Staff Costs + required: false + - value: Expense.Expense.Sundry + type: String + displayName: Sundry + required: false + - value: Expense.Expense.TravelExpensesGeneralAndAdminExpenses + type: String + displayName: Travel Expenses General And Admin Expenses + required: false + - value: Expense.Expense.TravelExpensesSellingExpense + type: String + displayName: Travel Expenses Selling Expense + required: false + - value: Expense.Other Expense.Depreciation + type: String + displayName: Depreciation + required: false + - value: Expense.Other Expense.ExchangeGainOrLoss + type: String + displayName: Exchange Gain Or Loss + required: false + - value: Expense.Other Expense.OtherMiscellaneousExpense + type: String + displayName: Other Miscellaneous Expense + required: false + - value: Expense.Other Expense.PenaltiesSettlements + type: String + displayName: Penalties And Settlements + required: false + - value: Expense.Other Expense.Amortization + type: String + displayName: Amortization + required: false + - value: Expense.Other Expense.GasAndFuel + type: String + displayName: Gas And Fuel + required: false + - value: Expense.Other Expense.HomeOffice + type: String + displayName: Home Office + required: false + - value: Expense.Other Expense.HomeOwnerRentalInsurance + type: String + displayName: Home Owner Rental Insurance + required: false + - value: Expense.Other Expense.OtherHomeOfficeExpenses + type: String + displayName: Other Home Office Expenses + required: false + - value: Expense.Other Expense.MortgageInterest + type: String + displayName: Mortgage Interest + required: false + - value: Expense.Other Expense.RentAndLease + type: String + displayName: Rent And Lease + required: false + - value: Expense.Other Expense.RepairsAndMaintenance + type: String + displayName: Repairs And Maintenance + required: false + - value: Expense.Other Expense.ParkingAndTolls + type: String + displayName: Parking And Tolls + required: false + - value: Expense.Other Expense.Vehicle + type: String + displayName: Vehicle + required: false + - value: Expense.Other Expense.VehicleInsurance + type: String + displayName: Vehicle Insurance + required: false + - value: Expense.Other Expense.VehicleLease + type: String + displayName: Vehicle Lease + required: false + - value: Expense.Other Expense.VehicleLoanInterest + type: String + displayName: Vehicle Loan Interest + required: false + - value: Expense.Other Expense.VehicleLoan + type: String + displayName: Vehicle Loan + required: false + - value: Expense.Other Expense.VehicleRegistration + type: String + displayName: Vehicle Registration + required: false + - value: Expense.Other Expense.VehicleRepairs + type: String + displayName: Vehicle Repairs + required: false + - value: Expense.Other Expense.OtherVehicleExpenses + type: String + displayName: Other Vehicle Expenses + required: false + - value: Expense.Other Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Other Expense.WashAndRoadServices + type: String + displayName: Wash And Road Services + required: false + - value: Expense.Other Expense.DeferredTaxExpense + type: String + displayName: Deferred Tax Expense + required: false + - value: Expense.Other Expense.Depletion + type: String + displayName: Depletion + required: false + - value: Expense.Other Expense.ExceptionalItems + type: String + displayName: Exceptional Items + required: false + - value: Expense.Other Expense.ExtraordinaryItems + type: String + displayName: Extraordinary Items + required: false + - value: Expense.Other Expense.IncomeTaxOtherExpense + type: String + displayName: Income Tax Other Expense + required: false + - value: Expense.Other Expense.MatCredit + type: String + displayName: Mat Credit + required: false + - value: Expense.Other Expense.PriorPeriodItems + type: String + displayName: Prior Period Items + required: false + - value: Expense.Other Expense.TaxRoundoffGainOrLoss + type: String + displayName: Tax Roundoff Gain Or Loss + required: false + - value: Expense.Cost of Goods Sold.EquipmentRentalCos + type: String + displayName: Equipment Rental - COS + required: false + - value: Expense.Cost of Goods Sold.OtherCostsOfServiceCos + type: String + displayName: Other Costs Of Sales - COS + required: false + - value: Expense.Cost of Goods Sold.ShippingFreightDeliveryCos + type: String + displayName: 'Shipping, Freight And Delivery - COS' + required: false + - value: Expense.Cost of Goods Sold.SuppliesMaterialsCogs + type: String + displayName: Supplies And Materials - COS + required: false + - value: Expense.Cost of Goods Sold.CostOfLaborCos + type: String + displayName: Cost Of Labor - COS + required: false + - value: Expense.Cost of Goods Sold.CostOfSales + type: String + displayName: Cost Of Sales + required: false + - value: Expense.Cost of Goods Sold.FreightAndDeliveryCost + type: String + displayName: Freight And Delivery Cost + required: false + - value: Income.Income.NonProfitIncome + type: String + displayName: Non Profit Income + required: false + - value: Income.Income.OtherPrimaryIncome + type: String + displayName: Other Primary Income + required: false + - value: Income.Income.SalesOfProductIncome + type: String + displayName: Sales Of ProductIncome + required: false + - value: Income.Income.ServiceFeeIncome + type: String + displayName: Service Fee Income + required: false + - value: Income.Income.DiscountsRefundsGiven + type: String + displayName: Discounts Refunds Given + required: false + - value: Income.Income.UnappliedCashPaymentIncome + type: String + displayName: Unapplied Cash Payment Income + required: false + - value: Income.Income.CashReceiptIncome + type: String + displayName: Cash Receipt Income + required: false + - value: Income.Income.OperatingGrants + type: String + displayName: Operating Grants + required: false + - value: Income.Income.OtherCurrentOperatingIncome + type: String + displayName: Other Current Operating Income + required: false + - value: Income.Income.OwnWorkCapitalized + type: String + displayName: Own Work Capitalized + required: false + - value: Income.Income.RevenueGeneral + type: String + displayName: Revenue General + required: false + - value: Income.Income.SalesRetail + type: String + displayName: Sales Retail + required: false + - value: Income.Income.SalesWholesale + type: String + displayName: Sales Wholesale + required: false + - value: Income.Income.SavingsByTaxScheme + type: String + displayName: Savings By Tax Scheme + required: false + - value: Income.Other Income.DividendIncome + type: String + displayName: Dividend Income + required: false + - value: Income.Other Income.InterestEarned + type: String + displayName: Interest Earned + required: false + - value: Income.Other Income.OtherInvestmentIncome + type: String + displayName: Other Investment Income + required: false + - value: Income.Other Income.OtherMiscellaneousIncome + type: String + displayName: Other Miscellaneous Income + required: false + - value: Income.Other Income.TaxExemptInterest + type: String + displayName: Tax Exempt Interest + required: false + - value: Income.Other Income.GainLossOnSaleOfFixedAssets + type: String + displayName: Gain Loss On Sale Of Fixed Assets + required: false + - value: Income.Other Income.GainLossOnSaleOfInvestments + type: String + displayName: Gain Loss On Sale Of Investments + required: false + - value: Income.Other Income.LossOnDisposalOfAssets + type: String + displayName: Loss On Disposal Of Assets + required: false + - value: Income.Other Income.OtherOperatingIncome + type: String + displayName: Other Operating Income + required: false + - value: Income.Other Income.UnrealisedLossOnSecuritiesNetOfTax + type: String + displayName: Unrealised Loss On Securities Net Of Tax + required: false + - value: Liability.Accounts Payable.AccountsPayable + type: String + displayName: Accounts Payable + required: false + - value: Liability.Accounts Payable.OutstandingDuesMicroSmallEnterprise + type: String + displayName: Outstanding Dues Micro Small Enterprise + required: false + - value: Liability.Accounts Payable.OutstandingDuesOtherThanMicroSmallEnterprise + type: String + displayName: Outstanding Dues Other Than Micro Small Enterprise + required: false + - value: Liability.Credit Card.CreditCard + type: String + displayName: Credit Card + required: false + - value: Liability.Long Term Liability.NotesPayable + type: String + displayName: Notes Payable + required: false + - value: Liability.Long Term Liability.OtherLongTermLiabilities + type: String + displayName: Other Long Term Liabilities + required: false + - value: Liability.Long Term Liability.ShareholderNotesPayable + type: String + displayName: Shareholder Notes Payable + required: false + - value: Liability.Long Term Liability.AccrualsAndDeferredIncome + type: String + displayName: Accruals And Deferred Income + required: false + - value: Liability.Long Term Liability.AccruedLongLermLiabilities + type: String + displayName: Accrued Long Lerm Liabilities + required: false + - value: Liability.Long Term Liability.AccruedVacationPayable + type: String + displayName: Accrued Vacation Payable + required: false + - value: Liability.Long Term Liability.BankLoans + type: String + displayName: Bank Loans + required: false + - value: Liability.Long Term Liability.DebtsRelatedToParticipatingInterests + type: String + displayName: Debts Related To Participating Interests + required: false + - value: Liability.Long Term Liability.DeferredTaxLiabilities + type: String + displayName: Deferred Tax Liabilities + required: false + - value: Liability.Long Term Liability.GovernmentAndOtherPublicAuthorities + type: String + displayName: Government And Other Public Authorities + required: false + - value: Liability.Long Term Liability.GroupAndAssociates + type: String + displayName: Group And Associates + required: false + - value: Liability.Long Term Liability.LiabilitiesRelatedToAssetsHeldForSale + type: String + displayName: Liabilities Related To Assets Held For Sale + required: false + - value: Liability.Long Term Liability.LongTermBorrowings + type: String + displayName: Long Term Borrowings + required: false + - value: Liability.Long Term Liability.LongTermDebit + type: String + displayName: Long Term Debit + required: false + - value: Liability.Long Term Liability.LongTermEmployeeBenefitObligations + type: String + displayName: Long Term Employee Benefit Obligations + required: false + - value: Liability.Long Term Liability.ObligationsUnderFinanceLeases + type: String + displayName: Obligations Under Finance Leases + required: false + - value: Liability.Long Term Liability.OtherLongTermProvisions + type: String + displayName: Other Long Term Provisions + required: false + - value: Liability.Long Term Liability.ProvisionForLiabilities + type: String + displayName: Provision For Liabilities + required: false + - value: Liability.Long Term Liability.ProvisionsNonCurrentLiabilities + type: String + displayName: Provisions Non Current Liabilities + required: false + - value: Liability.Long Term Liability.StaffAndRelatedLongTermLiabilityAccounts + type: String + displayName: Staff And Related Long Term Liability Accounts + required: false + - value: Liability.Other Current Liability.DirectDepositPayable + type: String + displayName: Direct Deposit Payable + required: false + - value: Liability.Other Current Liability.LineOfCredit + type: String + displayName: Line Of Credit + required: false + - value: Liability.Other Current Liability.LoanPayable + type: String + displayName: Loan Payable + required: false + - value: Liability.Other Current Liability.GlobalTaxPayable + type: String + displayName: Global Tax Payable + required: false + - value: Liability.Other Current Liability.GlobalTaxSuspense + type: String + displayName: Global Tax Suspense + required: false + - value: Liability.Other Current Liability.OtherCurrentLiabilities + type: String + displayName: Other Current Liabilities + required: false + - value: Liability.Other Current Liability.PayrollClearing + type: String + displayName: Payroll Clearing + required: false + - value: Liability.Other Current Liability.PayrollTaxPayable + type: String + displayName: Payroll Tax Payable + required: false + - value: Liability.Other Current Liability.PrepaidExpensesPayable + type: String + displayName: Prepaid Expenses Payable + required: false + - value: Liability.Other Current Liability.RentsInTrustLiability + type: String + displayName: Rents In Trust Liability + required: false + - value: Liability.Other Current Liability.TrustAccountsLiabilities + type: String + displayName: Trust Accounts Liabilities + required: false + - value: Liability.Other Current Liability.FederalIncomeTaxPayable + type: String + displayName: Federal Income Tax Payable + required: false + - value: Liability.Other Current Liability.InsurancePayable + type: String + displayName: Insurance Payable + required: false + - value: Liability.Other Current Liability.SalesTaxPayable + type: String + displayName: Sales Tax Payable + required: false + - value: Liability.Other Current Liability.StateLocalIncomeTaxPayable + type: String + displayName: State Local Income Tax Payable + required: false + - value: Liability.Other Current Liability.AccruedLiabilities + type: String + displayName: Accrued Liabilities + required: false + - value: Liability.Other Current Liability.CurrentLiabilities + type: String + displayName: Current Liabilities + required: false + - value: Liability.Other Current Liability.CurrentPortionEmployeeBenefitsObligations + type: String + displayName: Current Portion EmployeeBenefits Obligations + required: false + - value: Liability.Other Current Liability.CurrentPortionOfObligationsUnderFinanceLeases + type: String + displayName: Current Portion Of Obligations Under Finance Leases + required: false + - value: Liability.Other Current Liability.CurrentTaxLiability + type: String + displayName: Current Tax Liability + required: false + - value: Liability.Other Current Liability.DividendsPayable + type: String + displayName: Dividends Payable + required: false + - value: Liability.Other Current Liability.DutiesAndTaxes + type: String + displayName: Duties And Taxes + required: false + - value: Liability.Other Current Liability.InterestPayables + type: String + displayName: Interest Payables + required: false + - value: Liability.Other Current Liability.ProvisionForWarrantyObligations + type: String + displayName: Provision For Warranty Obligations + required: false + - value: Liability.Other Current Liability.ProvisionsCurrentLiabilities + type: String + displayName: Provisions Current Liabilities + required: false + - value: Liability.Other Current Liability.ShortTermBorrowings + type: String + displayName: Short Term Borrowings + required: false + - value: Liability.Other Current Liability.SocialSecurityAgencies + type: String + displayName: Social Security Agencies + required: false + - value: Liability.Other Current Liability.StaffAndRelatedLiabilityAccounts + type: String + displayName: Staff And Related Liability Accounts + required: false + - value: Liability.Other Current Liability.SundryDebtorsAndCreditors + type: String + displayName: Sundry Debtors And Creditors + required: false + - value: Liability.Other Current Liability.TradeAndOtherPayables + type: String + displayName: Trade And Other Payables + required: false + - value: Equity.Equity.OpeningBalanceEquity + type: String + displayName: Opening Balance Equity + required: false + - value: Equity.Equity.PartnersEquity + type: String + displayName: Partners Equity + required: false + - value: Equity.Equity.RetainedEarnings + type: String + displayName: Retained Earnings + required: false + - value: Equity.Equity.AccumulatedAdjustment + type: String + displayName: Accumulated Adjustment + required: false + - value: Equity.Equity.OwnersEquity + type: String + displayName: Owners Equity + required: false + - value: Equity.Equity.PaidInCapitalOrSurplus + type: String + displayName: Paid In Capital Or Surplus + required: false + - value: Equity.Equity.PartnerContributions + type: String + displayName: Partner Contributions + required: false + - value: Equity.Equity.PartnerDistributions + type: String + displayName: Partner Distributions + required: false + - value: Equity.Equity.PreferredStock + type: String + displayName: Preferred Stock + required: false + - value: Equity.Equity.CommonStock + type: String + displayName: Common Stock + required: false + - value: Equity.Equity.TreasuryStock + type: String + displayName: Treasury Stock + required: false + - value: Equity.Equity.EstimatedTaxes + type: String + displayName: Estimated Taxes + required: false + - value: Equity.Equity.Healthcare + type: String + displayName: Healthcare + required: false + - value: Equity.Equity.PersonalIncome + type: String + displayName: Personal Income + required: false + - value: Equity.Equity.PersonalExpense + type: String + displayName: Personal Expense + required: false + - value: Equity.Equity.AccumulatedOtherComprehensiveIncome + type: String + displayName: Accumulated Other Comprehensive Income + required: false + - value: Equity.Equity.CalledUpShareCapital + type: String + displayName: Called Up Share Capital + required: false + - value: Equity.Equity.CapitalReserves + type: String + displayName: Capital Reserves + required: false + - value: Equity.Equity.DividendDisbursed + type: String + displayName: Dividend Disbursed + required: false + - value: Equity.Equity.EquityInEarningsOfSubsiduaries + type: String + displayName: Equity In Earnings Of Subsiduaries + required: false + - value: Equity.Equity.InvestmentGrants + type: String + displayName: Investment Grants + required: false + - value: Equity.Equity.MoneyReceivedAgainstShareWarrants + type: String + displayName: Money Received Against Share Warrants + required: false + - value: Equity.Equity.OtherFreeReserves + type: String + displayName: Other Free Reserves + required: false + - value: Equity.Equity.ShareApplicationMoneyPendingAllotment + type: String + displayName: Share Application Money Pending Allotment + required: false + - value: Equity.Equity.ShareCapital + type: String + displayName: Share Capital + required: false + - value: Equity.Equity.Funds + type: String + displayName: Funds + required: false + required: true + required: true + QuickBooks Online: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + validation: + warnings: [] + information: + - field: NominalCode + details: If included must have a length between 1 and 7 characters + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: + - field: Name + details: Must have a length between 1 and 100 characters + information: [] + currency: + type: String + displayName: Currency + description: The currency of the account + required: false + validation: + warnings: [] + information: + - field: Currency + details: When not specified company base currency will be used + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: Asset.Bank.CashOnHand + type: String + displayName: Cash On Hand + required: false + - value: Asset.Bank.Checking + type: String + displayName: Checking + required: false + - value: Asset.Bank.MoneyMarket + type: String + displayName: Money Market + required: false + - value: Asset.Bank.RentsHeldInTrust + type: String + displayName: Rents Held In Trust + required: false + - value: Asset.Bank.Savings + type: String + displayName: Savings + required: false + - value: Asset.Bank.TrustAccounts + type: String + displayName: Trust Accounts + required: false + - value: Asset.Bank.CashAndCashEquivalents + type: String + displayName: Cash And Cash Equivalents + required: false + - value: Asset.Bank.OtherEarmarkedBankAccounts + type: String + displayName: Other Earmarked Bank Accounts + required: false + - value: Asset.Other Current Asset.AllowanceForBadDebts + type: String + displayName: Allowance For Bad Debts + required: false + - value: Asset.Other Current Asset.DevelopmentCosts + type: String + displayName: Development Costs + required: false + - value: Asset.Other Current Asset.EmployeeCashAdvances + type: String + displayName: Employee Cash Advances + required: false + - value: Asset.Other Current Asset.OtherCurrentAssets + type: String + displayName: Other Current Assets + required: false + - value: Asset.Other Current Asset.Inventory + type: String + displayName: Inventory + required: false + - value: Asset.Other Current Asset.Investment_MortgageRealEstateLoans + type: String + displayName: Investment Mortgage Real Estate Loans + required: false + - value: Asset.Other Current Asset.Investment_Other + type: String + displayName: Investment Other + required: false + - value: Asset.Other Current Asset.Investment_TaxExemptSecurities + type: String + displayName: Investment Tax Exempt Securities + required: false + - value: Asset.Other Current Asset.Investment_USGovernmentObligations + type: String + displayName: Investment US Government Obligations + required: false + - value: Asset.Other Current Asset.LoansToOfficers + type: String + displayName: Loans To Officers + required: false + - value: Asset.Other Current Asset.LoansToOthers + type: String + displayName: Loans To Others + required: false + - value: Asset.Other Current Asset.LoansToStockholders + type: String + displayName: Loans To Stockholders + required: false + - value: Asset.Other Current Asset.PrepaidExpenses + type: String + displayName: Prepaid Expenses + required: false + - value: Asset.Other Current Asset.Retainage + type: String + displayName: Retainage + required: false + - value: Asset.Other Current Asset.UndepositedFunds + type: String + displayName: Undeposited Funds + required: false + - value: Asset.Other Current Asset.AssetsAvailableForSale + type: String + displayName: Assets Available For Sale + required: false + - value: Asset.Other Current Asset.BalWithGovtAuthorities + type: String + displayName: Balance With Govt Authorities + required: false + - value: Asset.Other Current Asset.CalledUpShareCapitalNotPaid + type: String + displayName: Called Up Share Capital Not Paid + required: false + - value: Asset.Other Current Asset.ExpenditureAuthorisationsAndLettersOfCredit + type: String + displayName: Expenditure Authorisations And Letters Of Credit + required: false + - value: Asset.Other Current Asset.GlobalTaxDeferred + type: String + displayName: Global Tax Deferred + required: false + - value: Asset.Other Current Asset.GlobalTaxRefund + type: String + displayName: Global Tax Refund + required: false + - value: Asset.Other Current Asset.InternalTransfers + type: String + displayName: Internal Transfers + required: false + - value: Asset.Other Current Asset.OtherConsumables + type: String + displayName: Other Consumables + required: false + - value: Asset.Other Current Asset.ProvisionsCurrentAssets + type: String + displayName: Provisions Current Assets + required: false + - value: Asset.Other Current Asset.ShortTermInvestmentsInRelatedParties + type: String + displayName: Short Term Investments In Related Parties + required: false + - value: Asset.Other Current Asset.ShortTermLoansAndAdvancesToRelatedParties + type: String + displayName: Short Term Loans And Advances To Related Parties + required: false + - value: Asset.Other Current Asset.TradeAndOtherReceivables + type: String + displayName: Trade And Other Receivables + required: false + - value: Asset.Fixed Asset.AccumulatedDepletion + type: String + displayName: Accumulated Depletion + required: false + - value: Asset.Fixed Asset.AccumulatedDepreciation + type: String + displayName: Accumulated Depreciation + required: false + - value: Asset.Fixed Asset.DepletableAssets + type: String + displayName: Depletable Assets + required: false + - value: Asset.Fixed Asset.FixedAssetComputers + type: String + displayName: Fixed Asset Computers + required: false + - value: Asset.Fixed Asset.FixedAssetCopiers + type: String + displayName: Fixed Asset Copiers + required: false + - value: Asset.Fixed Asset.FixedAssetFurniture + type: String + displayName: Fixed Asset Furniture + required: false + - value: Asset.Fixed Asset.FixedAssetPhone + type: String + displayName: Fixed Asset Phone + required: false + - value: Asset.Fixed Asset.FixedAssetPhotoVideo + type: String + displayName: Fixed Asset Photo Video + required: false + - value: Asset.Fixed Asset.FixedAssetSoftware + type: String + displayName: Fixed Asset Software + required: false + - value: Asset.Fixed Asset.FixedAssetOtherToolsEquipment + type: String + displayName: Fixed Asset Other Tools Equipment + required: false + - value: Asset.Fixed Asset.FurnitureAndFixtures + type: String + displayName: Furniture And Fixtures + required: false + - value: Asset.Fixed Asset.Land + type: String + displayName: Land + required: false + - value: Asset.Fixed Asset.LeaseholdImprovements + type: String + displayName: Leasehold Improvements + required: false + - value: Asset.Fixed Asset.OtherFixedAssets + type: String + displayName: Other Fixed Assets + required: false + - value: Asset.Fixed Asset.AccumulatedAmortization + type: String + displayName: Accumulated Amortization + required: false + - value: Asset.Fixed Asset.Buildings + type: String + displayName: Buildings + required: false + - value: Asset.Fixed Asset.IntangibleAssets + type: String + displayName: Intangible Assets + required: false + - value: Asset.Fixed Asset.MachineryAndEquipment + type: String + displayName: Machinery And Equipment + required: false + - value: Asset.Fixed Asset.Vehicles + type: String + displayName: Vehicles + required: false + - value: Asset.Fixed Asset.AssetsInCourseOfConstruction + type: String + displayName: Assets In Course Of Construction + required: false + - value: Asset.Fixed Asset.CapitalWip + type: String + displayName: Capital Wip + required: false + - value: Asset.Fixed Asset.CumulativeDepreciationOnIntangibleAssets + type: String + displayName: Cumulative Depreciation On Intangible Assets + required: false + - value: Asset.Fixed Asset.IntangibleAssetsUnderDevelopment + type: String + displayName: Intangible Assets Under Development + required: false + - value: Asset.Fixed Asset.LandAsset + type: String + displayName: Land Asset + required: false + - value: Asset.Fixed Asset.NonCurrentAssets + type: String + displayName: Non Current Assets + required: false + - value: Asset.Fixed Asset.ParticipatingInterests + type: String + displayName: Participating Interests + required: false + - value: Asset.Fixed Asset.ProvisionsFixedAssets + type: String + displayName: Provisions Fixed Assets + required: false + - value: Asset.Other Asset.LeaseBuyout + type: String + displayName: Lease Buyout + required: false + - value: Asset.Other Asset.OtherLongTermAssets + type: String + displayName: Other Long Term Assets + required: false + - value: Asset.Other Asset.SecurityDeposits + type: String + displayName: Security Deposits + required: false + - value: Asset.Other Asset.AccumulatedAmortizationOfOtherAssets + type: String + displayName: Accumulated Amortization Of Other Assets + required: false + - value: Asset.Other Asset.Goodwill + type: String + displayName: Goodwill + required: false + - value: Asset.Other Asset.Licenses + type: String + displayName: Licenses + required: false + - value: Asset.Other Asset.OrganizationalCosts + type: String + displayName: Organizational Costs + required: false + - value: Asset.Other Asset.AssetsHeldForSale + type: String + displayName: Assets Held For Sale + required: false + - value: Asset.Other Asset.AvailableForSaleFinancialAssets + type: String + displayName: Available For Sale Financial Assets + required: false + - value: Asset.Other Asset.DeferredTax + type: String + displayName: Deferred Tax + required: false + - value: Asset.Other Asset.Investments + type: String + displayName: Investments + required: false + - value: Asset.Other Asset.LongTermInvestments + type: String + displayName: Long Term Investments + required: false + - value: Asset.Other Asset.LongTermLoansAndAdvancesToRelatedParties + type: String + displayName: Long Term Loans And Advances To Related Parties + required: false + - value: Asset.Other Asset.OtherIntangibleAssets + type: String + displayName: Other Intangible Assets + required: false + - value: Asset.Other Asset.OtherLongTermInvestments + type: String + displayName: Other Long Term Investments + required: false + - value: Asset.Other Asset.OtherLongTermLoansAndAdvances + type: String + displayName: Other Long Term Loans And Advances + required: false + - value: Asset.Other Asset.PrepaymentsAndAccruedIncome + type: String + displayName: Prepayments And Accrued Income + required: false + - value: Asset.Other Asset.ProvisionsNonCurrentAssets + type: String + displayName: Provisions Non-Current Assets + required: false + - value: Asset.Accounts Receivable.AccountsReceivable + type: String + displayName: Accounts Receivable + required: false + - value: Expense.Expense.AdvertisingPromotional + type: String + displayName: Advertising/Promotional + required: false + - value: Expense.Expense.BadDebts + type: String + displayName: Bad Debts + required: false + - value: Expense.Expense.BankCharges + type: String + displayName: Bank Charges + required: false + - value: Expense.Expense.CharitableContributions + type: String + displayName: Charitable Contributions + required: false + - value: Expense.Expense.CommissionsAndFees + type: String + displayName: Commissions And Fees + required: false + - value: Expense.Expense.Entertainment + type: String + displayName: Entertainment + required: false + - value: Expense.Expense.EntertainmentMeals + type: String + displayName: Entertainment Meals + required: false + - value: Expense.Expense.EquipmentRental + type: String + displayName: Equipment Rental + required: false + - value: Expense.Expense.FinanceCosts + type: String + displayName: Finance Costs + required: false + - value: Expense.Expense.GlobalTaxExpense + type: String + displayName: Global Tax Expense + required: false + - value: Expense.Expense.Insurance + type: String + displayName: Insurance + required: false + - value: Expense.Expense.InterestPaid + type: String + displayName: Interest Paid + required: false + - value: Expense.Expense.LegalProfessionalFees + type: String + displayName: Legal And Professional Fees + required: false + - value: Expense.Expense.OfficeExpenses + type: String + displayName: Office Expenses + required: false + - value: Expense.Expense.OfficeGeneralAdministrativeExpenses + type: String + displayName: Office/General Administrative Expenses + required: false + - value: Expense.Expense.OtherBusinessExpenses + type: String + displayName: Other Business Expenses + required: false + - value: Expense.Expense.OtherMiscellaneousServiceCost + type: String + displayName: Other Miscellaneous Service Cost + required: false + - value: Expense.Expense.PromotionalMeals + type: String + displayName: Promotional Meals + required: false + - value: Expense.Expense.RentOrLeaseOfBuildings + type: String + displayName: Rent Or Lease Of Buildings + required: false + - value: Expense.Expense.RepairMaintenance + type: String + displayName: Repair And Maintenance + required: false + - value: Expense.Expense.ShippingFreightDelivery + type: String + displayName: 'Shipping, Freight And Delivery' + required: false + - value: Expense.Expense.SuppliesMaterials + type: String + displayName: Supplies And Materials + required: false + - value: Expense.Expense.Travel + type: String + displayName: Travel + required: false + - value: Expense.Expense.TravelMeals + type: String + displayName: Travel Meals + required: false + - value: Expense.Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Expense.Auto + type: String + displayName: Auto + required: false + - value: Expense.Expense.CostOfLabor + type: String + displayName: Cost Of Labor + required: false + - value: Expense.Expense.DuesSubscriptions + type: String + displayName: Dues And Subscriptions + required: false + - value: Expense.Expense.PayrollExpenses + type: String + displayName: Payroll Expenses + required: false + - value: Expense.Expense.TaxesPaid + type: String + displayName: Taxes Paid + required: false + - value: Expense.Expense.UnappliedCashBillPaymentExpense + type: String + displayName: Unapplied Cash Bill Payment Expense + required: false + - value: Expense.Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Expense.AmortizationExpense + type: String + displayName: Amortization Expense + required: false + - value: Expense.Expense.AppropriationsToDepreciation + type: String + displayName: Appropriations To Depreciation + required: false + - value: Expense.Expense.BorrowingCost + type: String + displayName: Borrowing Cost + required: false + - value: Expense.Expense.CommissionsAndFees + type: String + displayName: Commissions And Fees + required: false + - value: Expense.Expense.DistributionCosts + type: String + displayName: Distribution Costs + required: false + - value: Expense.Expense.ExternalServices + type: String + displayName: External Services + required: false + - value: Expense.Expense.ExtraordinaryCharges + type: String + displayName: Extraordinary Charges + required: false + - value: Expense.Expense.IncomeTaxExpense + type: String + displayName: Income Tax Expense + required: false + - value: Expense.Expense.LossOnDiscontinuedOperationsNetOfTax + type: String + displayName: Loss On Discontinued Operations Net Of Tax + required: false + - value: Expense.Expense.ManagementCompensation + type: String + displayName: Management Compensation + required: false + - value: Expense.Expense.OtherCurrentOperatingCharges + type: String + displayName: Other Current Operating Charges + required: false + - value: Expense.Expense.OtherExternalServices + type: String + displayName: Other External Services + required: false + - value: Expense.Expense.OtherRentalCosts + type: String + displayName: Other Rental Costs + required: false + - value: Expense.Expense.OtherSellingExpenses + type: String + displayName: Other Selling Expenses + required: false + - value: Expense.Expense.ProjectStudiesSurveysAssessments + type: String + displayName: Project Studies Surveys Assessments + required: false + - value: Expense.Expense.PurchasesRebates + type: String + displayName: Purchases Rebates + required: false + - value: Expense.Expense.ShippingAndDeliveryExpense + type: String + displayName: Shipping And Delivery Expense + required: false + - value: Expense.Expense.StaffCosts + type: String + displayName: Staff Costs + required: false + - value: Expense.Expense.Sundry + type: String + displayName: Sundry + required: false + - value: Expense.Expense.TravelExpensesGeneralAndAdminExpenses + type: String + displayName: Travel Expenses General And Admin Expenses + required: false + - value: Expense.Expense.TravelExpensesSellingExpense + type: String + displayName: Travel Expenses Selling Expense + required: false + - value: Expense.Other Expense.Depreciation + type: String + displayName: Depreciation + required: false + - value: Expense.Other Expense.ExchangeGainOrLoss + type: String + displayName: Exchange Gain Or Loss + required: false + - value: Expense.Other Expense.OtherMiscellaneousExpense + type: String + displayName: Other Miscellaneous Expense + required: false + - value: Expense.Other Expense.PenaltiesSettlements + type: String + displayName: Penalties And Settlements + required: false + - value: Expense.Other Expense.Amortization + type: String + displayName: Amortization + required: false + - value: Expense.Other Expense.GasAndFuel + type: String + displayName: Gas And Fuel + required: false + - value: Expense.Other Expense.HomeOffice + type: String + displayName: Home Office + required: false + - value: Expense.Other Expense.HomeOwnerRentalInsurance + type: String + displayName: Home Owner Rental Insurance + required: false + - value: Expense.Other Expense.OtherHomeOfficeExpenses + type: String + displayName: Other Home Office Expenses + required: false + - value: Expense.Other Expense.MortgageInterest + type: String + displayName: Mortgage Interest + required: false + - value: Expense.Other Expense.RentAndLease + type: String + displayName: Rent And Lease + required: false + - value: Expense.Other Expense.RepairsAndMaintenance + type: String + displayName: Repairs And Maintenance + required: false + - value: Expense.Other Expense.ParkingAndTolls + type: String + displayName: Parking And Tolls + required: false + - value: Expense.Other Expense.Vehicle + type: String + displayName: Vehicle + required: false + - value: Expense.Other Expense.VehicleInsurance + type: String + displayName: Vehicle Insurance + required: false + - value: Expense.Other Expense.VehicleLease + type: String + displayName: Vehicle Lease + required: false + - value: Expense.Other Expense.VehicleLoanInterest + type: String + displayName: Vehicle Loan Interest + required: false + - value: Expense.Other Expense.VehicleLoan + type: String + displayName: Vehicle Loan + required: false + - value: Expense.Other Expense.VehicleRegistration + type: String + displayName: Vehicle Registration + required: false + - value: Expense.Other Expense.VehicleRepairs + type: String + displayName: Vehicle Repairs + required: false + - value: Expense.Other Expense.OtherVehicleExpenses + type: String + displayName: Other Vehicle Expenses + required: false + - value: Expense.Other Expense.Utilities + type: String + displayName: Utilities + required: false + - value: Expense.Other Expense.WashAndRoadServices + type: String + displayName: Wash And Road Services + required: false + - value: Expense.Other Expense.DeferredTaxExpense + type: String + displayName: Deferred Tax Expense + required: false + - value: Expense.Other Expense.Depletion + type: String + displayName: Depletion + required: false + - value: Expense.Other Expense.ExceptionalItems + type: String + displayName: Exceptional Items + required: false + - value: Expense.Other Expense.ExtraordinaryItems + type: String + displayName: Extraordinary Items + required: false + - value: Expense.Other Expense.IncomeTaxOtherExpense + type: String + displayName: Income Tax Other Expense + required: false + - value: Expense.Other Expense.MatCredit + type: String + displayName: Mat Credit + required: false + - value: Expense.Other Expense.PriorPeriodItems + type: String + displayName: Prior Period Items + required: false + - value: Expense.Other Expense.TaxRoundoffGainOrLoss + type: String + displayName: Tax Roundoff Gain Or Loss + required: false + - value: Expense.Cost of Goods Sold.EquipmentRentalCos + type: String + displayName: Equipment Rental - COS + required: false + - value: Expense.Cost of Goods Sold.OtherCostsOfServiceCos + type: String + displayName: Other Costs Of Sales - COS + required: false + - value: Expense.Cost of Goods Sold.ShippingFreightDeliveryCos + type: String + displayName: 'Shipping, Freight And Delivery - COS' + required: false + - value: Expense.Cost of Goods Sold.SuppliesMaterialsCogs + type: String + displayName: Supplies And Materials - COS + required: false + - value: Expense.Cost of Goods Sold.CostOfLaborCos + type: String + displayName: Cost Of Labor - COS + required: false + - value: Expense.Cost of Goods Sold.CostOfSales + type: String + displayName: Cost Of Sales + required: false + - value: Expense.Cost of Goods Sold.FreightAndDeliveryCost + type: String + displayName: Freight And Delivery Cost + required: false + - value: Income.Income.NonProfitIncome + type: String + displayName: Non Profit Income + required: false + - value: Income.Income.OtherPrimaryIncome + type: String + displayName: Other Primary Income + required: false + - value: Income.Income.SalesOfProductIncome + type: String + displayName: Sales Of ProductIncome + required: false + - value: Income.Income.ServiceFeeIncome + type: String + displayName: Service Fee Income + required: false + - value: Income.Income.DiscountsRefundsGiven + type: String + displayName: Discounts Refunds Given + required: false + - value: Income.Income.UnappliedCashPaymentIncome + type: String + displayName: Unapplied Cash Payment Income + required: false + - value: Income.Income.CashReceiptIncome + type: String + displayName: Cash Receipt Income + required: false + - value: Income.Income.OperatingGrants + type: String + displayName: Operating Grants + required: false + - value: Income.Income.OtherCurrentOperatingIncome + type: String + displayName: Other Current Operating Income + required: false + - value: Income.Income.OwnWorkCapitalized + type: String + displayName: Own Work Capitalized + required: false + - value: Income.Income.RevenueGeneral + type: String + displayName: Revenue General + required: false + - value: Income.Income.SalesRetail + type: String + displayName: Sales Retail + required: false + - value: Income.Income.SalesWholesale + type: String + displayName: Sales Wholesale + required: false + - value: Income.Income.SavingsByTaxScheme + type: String + displayName: Savings By Tax Scheme + required: false + - value: Income.Other Income.DividendIncome + type: String + displayName: Dividend Income + required: false + - value: Income.Other Income.InterestEarned + type: String + displayName: Interest Earned + required: false + - value: Income.Other Income.OtherInvestmentIncome + type: String + displayName: Other Investment Income + required: false + - value: Income.Other Income.OtherMiscellaneousIncome + type: String + displayName: Other Miscellaneous Income + required: false + - value: Income.Other Income.TaxExemptInterest + type: String + displayName: Tax Exempt Interest + required: false + - value: Income.Other Income.GainLossOnSaleOfFixedAssets + type: String + displayName: Gain Loss On Sale Of Fixed Assets + required: false + - value: Income.Other Income.GainLossOnSaleOfInvestments + type: String + displayName: Gain Loss On Sale Of Investments + required: false + - value: Income.Other Income.LossOnDisposalOfAssets + type: String + displayName: Loss On Disposal Of Assets + required: false + - value: Income.Other Income.OtherOperatingIncome + type: String + displayName: Other Operating Income + required: false + - value: Income.Other Income.UnrealisedLossOnSecuritiesNetOfTax + type: String + displayName: Unrealised Loss On Securities Net Of Tax + required: false + - value: Liability.Accounts Payable.AccountsPayable + type: String + displayName: Accounts Payable + required: false + - value: Liability.Accounts Payable.OutstandingDuesMicroSmallEnterprise + type: String + displayName: Outstanding Dues Micro Small Enterprise + required: false + - value: Liability.Accounts Payable.OutstandingDuesOtherThanMicroSmallEnterprise + type: String + displayName: Outstanding Dues Other Than Micro Small Enterprise + required: false + - value: Liability.Credit Card.CreditCard + type: String + displayName: Credit Card + required: false + - value: Liability.Long Term Liability.NotesPayable + type: String + displayName: Notes Payable + required: false + - value: Liability.Long Term Liability.OtherLongTermLiabilities + type: String + displayName: Other Long Term Liabilities + required: false + - value: Liability.Long Term Liability.ShareholderNotesPayable + type: String + displayName: Shareholder Notes Payable + required: false + - value: Liability.Long Term Liability.AccrualsAndDeferredIncome + type: String + displayName: Accruals And Deferred Income + required: false + - value: Liability.Long Term Liability.AccruedLongLermLiabilities + type: String + displayName: Accrued Long Lerm Liabilities + required: false + - value: Liability.Long Term Liability.AccruedVacationPayable + type: String + displayName: Accrued Vacation Payable + required: false + - value: Liability.Long Term Liability.BankLoans + type: String + displayName: Bank Loans + required: false + - value: Liability.Long Term Liability.DebtsRelatedToParticipatingInterests + type: String + displayName: Debts Related To Participating Interests + required: false + - value: Liability.Long Term Liability.DeferredTaxLiabilities + type: String + displayName: Deferred Tax Liabilities + required: false + - value: Liability.Long Term Liability.GovernmentAndOtherPublicAuthorities + type: String + displayName: Government And Other Public Authorities + required: false + - value: Liability.Long Term Liability.GroupAndAssociates + type: String + displayName: Group And Associates + required: false + - value: Liability.Long Term Liability.LiabilitiesRelatedToAssetsHeldForSale + type: String + displayName: Liabilities Related To Assets Held For Sale + required: false + - value: Liability.Long Term Liability.LongTermBorrowings + type: String + displayName: Long Term Borrowings + required: false + - value: Liability.Long Term Liability.LongTermDebit + type: String + displayName: Long Term Debit + required: false + - value: Liability.Long Term Liability.LongTermEmployeeBenefitObligations + type: String + displayName: Long Term Employee Benefit Obligations + required: false + - value: Liability.Long Term Liability.ObligationsUnderFinanceLeases + type: String + displayName: Obligations Under Finance Leases + required: false + - value: Liability.Long Term Liability.OtherLongTermProvisions + type: String + displayName: Other Long Term Provisions + required: false + - value: Liability.Long Term Liability.ProvisionForLiabilities + type: String + displayName: Provision For Liabilities + required: false + - value: Liability.Long Term Liability.ProvisionsNonCurrentLiabilities + type: String + displayName: Provisions Non Current Liabilities + required: false + - value: Liability.Long Term Liability.StaffAndRelatedLongTermLiabilityAccounts + type: String + displayName: Staff And Related Long Term Liability Accounts + required: false + - value: Liability.Other Current Liability.DirectDepositPayable + type: String + displayName: Direct Deposit Payable + required: false + - value: Liability.Other Current Liability.LineOfCredit + type: String + displayName: Line Of Credit + required: false + - value: Liability.Other Current Liability.LoanPayable + type: String + displayName: Loan Payable + required: false + - value: Liability.Other Current Liability.GlobalTaxPayable + type: String + displayName: Global Tax Payable + required: false + - value: Liability.Other Current Liability.GlobalTaxSuspense + type: String + displayName: Global Tax Suspense + required: false + - value: Liability.Other Current Liability.OtherCurrentLiabilities + type: String + displayName: Other Current Liabilities + required: false + - value: Liability.Other Current Liability.PayrollClearing + type: String + displayName: Payroll Clearing + required: false + - value: Liability.Other Current Liability.PayrollTaxPayable + type: String + displayName: Payroll Tax Payable + required: false + - value: Liability.Other Current Liability.PrepaidExpensesPayable + type: String + displayName: Prepaid Expenses Payable + required: false + - value: Liability.Other Current Liability.RentsInTrustLiability + type: String + displayName: Rents In Trust Liability + required: false + - value: Liability.Other Current Liability.TrustAccountsLiabilities + type: String + displayName: Trust Accounts Liabilities + required: false + - value: Liability.Other Current Liability.FederalIncomeTaxPayable + type: String + displayName: Federal Income Tax Payable + required: false + - value: Liability.Other Current Liability.InsurancePayable + type: String + displayName: Insurance Payable + required: false + - value: Liability.Other Current Liability.SalesTaxPayable + type: String + displayName: Sales Tax Payable + required: false + - value: Liability.Other Current Liability.StateLocalIncomeTaxPayable + type: String + displayName: State Local Income Tax Payable + required: false + - value: Liability.Other Current Liability.AccruedLiabilities + type: String + displayName: Accrued Liabilities + required: false + - value: Liability.Other Current Liability.CurrentLiabilities + type: String + displayName: Current Liabilities + required: false + - value: Liability.Other Current Liability.CurrentPortionEmployeeBenefitsObligations + type: String + displayName: Current Portion EmployeeBenefits Obligations + required: false + - value: Liability.Other Current Liability.CurrentPortionOfObligationsUnderFinanceLeases + type: String + displayName: Current Portion Of Obligations Under Finance Leases + required: false + - value: Liability.Other Current Liability.CurrentTaxLiability + type: String + displayName: Current Tax Liability + required: false + - value: Liability.Other Current Liability.DividendsPayable + type: String + displayName: Dividends Payable + required: false + - value: Liability.Other Current Liability.DutiesAndTaxes + type: String + displayName: Duties And Taxes + required: false + - value: Liability.Other Current Liability.InterestPayables + type: String + displayName: Interest Payables + required: false + - value: Liability.Other Current Liability.ProvisionForWarrantyObligations + type: String + displayName: Provision For Warranty Obligations + required: false + - value: Liability.Other Current Liability.ProvisionsCurrentLiabilities + type: String + displayName: Provisions Current Liabilities + required: false + - value: Liability.Other Current Liability.ShortTermBorrowings + type: String + displayName: Short Term Borrowings + required: false + - value: Liability.Other Current Liability.SocialSecurityAgencies + type: String + displayName: Social Security Agencies + required: false + - value: Liability.Other Current Liability.StaffAndRelatedLiabilityAccounts + type: String + displayName: Staff And Related Liability Accounts + required: false + - value: Liability.Other Current Liability.SundryDebtorsAndCreditors + type: String + displayName: Sundry Debtors And Creditors + required: false + - value: Liability.Other Current Liability.TradeAndOtherPayables + type: String + displayName: Trade And Other Payables + required: false + - value: Equity.Equity.OpeningBalanceEquity + type: String + displayName: Opening Balance Equity + required: false + - value: Equity.Equity.PartnersEquity + type: String + displayName: Partners Equity + required: false + - value: Equity.Equity.RetainedEarnings + type: String + displayName: Retained Earnings + required: false + - value: Equity.Equity.AccumulatedAdjustment + type: String + displayName: Accumulated Adjustment + required: false + - value: Equity.Equity.OwnersEquity + type: String + displayName: Owners Equity + required: false + - value: Equity.Equity.PaidInCapitalOrSurplus + type: String + displayName: Paid In Capital Or Surplus + required: false + - value: Equity.Equity.PartnerContributions + type: String + displayName: Partner Contributions + required: false + - value: Equity.Equity.PartnerDistributions + type: String + displayName: Partner Distributions + required: false + - value: Equity.Equity.PreferredStock + type: String + displayName: Preferred Stock + required: false + - value: Equity.Equity.CommonStock + type: String + displayName: Common Stock + required: false + - value: Equity.Equity.TreasuryStock + type: String + displayName: Treasury Stock + required: false + - value: Equity.Equity.EstimatedTaxes + type: String + displayName: Estimated Taxes + required: false + - value: Equity.Equity.Healthcare + type: String + displayName: Healthcare + required: false + - value: Equity.Equity.PersonalIncome + type: String + displayName: Personal Income + required: false + - value: Equity.Equity.PersonalExpense + type: String + displayName: Personal Expense + required: false + - value: Equity.Equity.AccumulatedOtherComprehensiveIncome + type: String + displayName: Accumulated Other Comprehensive Income + required: false + - value: Equity.Equity.CalledUpShareCapital + type: String + displayName: Called Up Share Capital + required: false + - value: Equity.Equity.CapitalReserves + type: String + displayName: Capital Reserves + required: false + - value: Equity.Equity.DividendDisbursed + type: String + displayName: Dividend Disbursed + required: false + - value: Equity.Equity.EquityInEarningsOfSubsiduaries + type: String + displayName: Equity In Earnings Of Subsiduaries + required: false + - value: Equity.Equity.InvestmentGrants + type: String + displayName: Investment Grants + required: false + - value: Equity.Equity.MoneyReceivedAgainstShareWarrants + type: String + displayName: Money Received Against Share Warrants + required: false + - value: Equity.Equity.OtherFreeReserves + type: String + displayName: Other Free Reserves + required: false + - value: Equity.Equity.ShareApplicationMoneyPendingAllotment + type: String + displayName: Share Application Money Pending Allotment + required: false + - value: Equity.Equity.ShareCapital + type: String + displayName: Share Capital + required: false + - value: Equity.Equity.Funds + type: String + displayName: Funds + required: false + required: true + required: true + Sage Business Cloud Accounting: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + name: + type: String + displayName: Name + description: Name of the account + required: true + validation: + warnings: [] + information: + - field: Name + details: Should not be longer than 200 characters. + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: [] + information: + - field: NominalCode + details: Should be a number between 1 and 99999999. + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + options: + - value: SALES + type: String + displayName: Sales + required: false + - value: OTHER_INCOME + type: String + displayName: Other Income + required: false + - value: DIRECT_EXPENSES + type: String + displayName: Direct Expenses + required: false + - value: OVERHEADS + type: String + displayName: Overheads + required: false + - value: DEPRECIATION + type: String + displayName: Depreciation + required: false + - value: CURRENT_ASSETS + type: String + displayName: Current Assets + required: false + - value: FIXED_ASSETS + type: String + displayName: Fixed Assets + required: false + - value: FUTURE_ASSETS + type: String + displayName: Future Assets + required: false + - value: BANK + type: String + displayName: Bank + required: false + - value: CURRENT_LIABILITY + type: String + displayName: Current Liability + required: false + - value: FUTURE_LIABILITY + type: String + displayName: Future Liability + required: false + - value: EQUITY + type: String + displayName: Equity + required: false + - value: LINE_OF_CREDIT + type: String + displayName: Credit Card / Loan + required: false + required: true + required: true + Sage Intacct: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: + - field: NominalCode + details: Must be unique within the entity. + - field: NominalCode + details: 'Must be at most 24 characters in length, although restrictions may vary between entities.' + information: [] + name: + type: String + displayName: Name + description: Name of the account + required: true + status: + type: String + displayName: Account Status + description: The status of the account + options: + - value: Active + type: String + displayName: Active + required: false + - value: Archived + type: String + displayName: Archived + required: false + required: true + type: + type: String + displayName: Account Type + description: 'The type, or base category, of the account' + options: + - value: Asset + type: String + displayName: Asset + required: false + - value: Equity + type: String + displayName: Equity + required: false + - value: Expense + type: String + displayName: Expense + required: false + - value: Income + type: String + displayName: Income + required: false + - value: Liability + type: String + displayName: Liability + required: false + required: true + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + required: true + validation: + warnings: [] + information: + - field: FullyQualifiedCategory + details: 'Any category that is part of the hierarchy of one of: ''Assets'', ''Equity'', ''Liabilities'', ''Total Expenses'' and ''Total Income'' is permitted.' + required: true + Sandbox: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + name: + type: String + displayName: Name + description: Name of the account + required: true + description: + type: String + displayName: Description + description: Description of the account + required: true + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: The full category of the account e.g. Liability.Current or Income.Revenue + required: true + fullyQualifiedName: + type: String + displayName: Fully Qualified Name + description: The full name of the account e.g. Liability.Current.VAT or Income.Revenue.Sales + required: true + currency: + type: String + displayName: Currency + description: The currency of the account + required: true + currentBalance: + type: Number + displayName: Current Balance + description: The current balance in the account + required: true + type: + type: String + displayName: Account Type + description: 'The type, or base category, of the account' + required: true + status: + type: String + displayName: Account Status + description: The status of the account + required: true + isBankAccount: + type: Boolean + displayName: Is Bank Account? + description: Confirms whether the nominal account represents a bank account or not + required: true + validDatatypeLinks: + type: Array + displayName: Valid Datatype Links + description: Describes which fields on other data types are valid links to this account in the originating system + properties: + property: + type: String + displayName: Property + description: The field on the source data type that other data types can link to + required: true + links: + type: Array + displayName: Links + description: 'A collection of absolute names of fields from other data types, e.g. Invoice.LineItems.AccountRef.Id' + required: true + required: true + metadata: + type: Object + displayName: Metadata + description: Miscellaneous data about the item + properties: + isDeleted: + type: Boolean + displayName: IsDeleted + description: A boolean to indicate whether the object has been deleted + required: true + required: true + required: true + Xero: + value: + type: Object + displayName: Nominal Account + description: Nominal Accounts are the categories a business uses to record transactions + properties: + nominalCode: + type: String + displayName: Nominal Code + description: Identifier for the nominal account. + required: true + validation: + warnings: + - field: NominalCode + details: Max length of 10 characters. + information: [] + name: + type: String + displayName: Name + description: Name of account as it appears in the chart of accounts or general ledger. + required: true + validation: + warnings: [] + information: + - field: Name + details: Payments are enabled to this account if the name ends in .PaymentsEnabled. + description: + type: String + displayName: Description + description: Description for the nominal account. + required: false + fullyQualifiedCategory: + type: String + displayName: Fully Qualified Category + description: Account type and category for nominal account. + options: + - value: Asset.Current + type: String + displayName: Current Asset + required: false + - value: Asset.Fixed + type: String + displayName: Fixed Asset + required: false + - value: Asset.Inventory + type: String + displayName: Inventory + required: false + - value: Asset.NonCurrent + type: String + displayName: Non-current Asset + required: false + - value: Asset.Prepayment + type: String + displayName: Prepayment + required: false + - value: Expense.DirectCosts + type: String + displayName: Direct Costs + required: false + - value: Expense.Expense + type: String + displayName: Expense + required: false + - value: Expense.Overhead + type: String + displayName: Overhead + required: false + - value: Expense.Superannuation + type: String + displayName: Superannuation + required: false + - value: Expense.Wages + type: String + displayName: Wages + required: false + - value: Income.Sales + type: String + displayName: Sales + required: false + - value: Income.Revenue + type: String + displayName: Revenue + required: false + - value: Income.Other + type: String + displayName: Other Income + required: false + - value: Liability.Current + type: String + displayName: Current Liability + required: false + - value: Liability.Depreciation + type: String + displayName: Depreciation + required: false + - value: Liability.Liability + type: String + displayName: Liability + required: false + - value: Liability.NonCurrent + type: String + displayName: Non Current Liability + required: false + - value: Liability.PayAsYouGo + type: String + displayName: Pay As You Go Liability + required: false + - value: Liability.Superannuation + type: String + displayName: Superannuation Liability + required: false + - value: Liability.WagesPayable + type: String + displayName: Wages Payable Liability + required: false + - value: Equity.Equity + type: String + displayName: Equity + required: false + required: true + required: true '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1830,23 +5701,56 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/integrations/{platformKey}/branding': + operationId: get-create-chartOfAccounts-model + description: |- + The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) for a given company and integration. + + [Accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) are the categories a business uses to record accounting transactions. + + **Integration-specific behaviour** + + See the *response examples* for integration-specific indicative models. + '/companies/{companyId}/connections/{connectionId}/push/bankAccounts': parameters: - - $ref: '#/components/parameters/platformKey' - get: - summary: Get branding + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + post: tags: - - Integrations - operationId: get-integrations-branding - x-speakeasy-name-override: get-branding - description: Get branding for platform. + - Bank accounts + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/BankAccount' + examples: + QuickBooks Online: + value: + accountName: GBP Bank Account + accountType: Debit + accountNumber: '12345678' + currency: GBP + status: Active + Xero: + value: + accountName: Xero GBP Bank Account + accountType: Debit + sortCode: '445566' + accountNumber: '12345678' + currency: GBP + status: Active responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/Branding' + $ref: '#/components/schemas/CreateBankAccountResponse' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -1861,305 +5765,2763 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - /profile: + summary: Create bank account + description: "The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) for a given company's connection.\r\n\r\n[Bank accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.\r\n\r\n**Integration-specific behaviour**\r\n\r\nRequired data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-bankAccounts-model)." + operationId: create-bank-account + '/companies/{companyId}/connections/{connectionId}/options/bankAccounts': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' get: - summary: Get profile + summary: Get create bank account model tags: - - Settings - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/Profile' - examples: {} - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - operationId: get-profile - x-speakeasy-name-override: get-profile - description: Fetch your Codat profile. - put: - summary: Update profile - operationId: update-profile - x-speakeasy-name-override: update-profile + - Bank accounts responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Profile' - examples: {} + $ref: '#/components/schemas/PushOption' + examples: + Dynamics 365 Business Central: + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + validation: + warnings: [] + information: + - field: AccountName + details: 'Needs to be of the format ''{No.}-{Name}''' + currency: + type: String + displayName: Currency + description: The currency of the bank account + required: true + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: false + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + validation: + warnings: [] + information: + - field: NominalCode + details: Bank Account Posting Group with Nominal Account must exist + sortCode: + type: String + displayName: Sort Code + description: The sort code for the bank account + required: false + validation: + warnings: [] + information: + - field: SortCode + details: Must have a length between 0 and 20 characters + iBan: + type: String + displayName: IBAN + description: The international bank account number of the account. Often used when making or receiving international payments + required: false + overdraftLimit: + type: Number + displayName: Overdraft Limit + description: The pre-arranged overdraft limit of the account + required: false + validation: + warnings: [] + information: + - field: OverdraftLimit + details: Default value is 0 + required: true + Exact (Netherlands): + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: true + validation: + warnings: + - field: AccountNumber + details: Should not exceed the maximum length of 14 characters if the specified currency is GBP. + information: [] + sortCode: + type: String + displayName: Sort Code + description: The sort code for the bank account + required: false + validation: + warnings: + - field: SortCode + details: Must be 6 characters long if the specified currency is GBP. + - field: SortCode + details: Must be provided if the specified currency is GBP. + information: [] + currency: + type: String + displayName: Currency + description: The currency of the bank account + required: false + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + required: true + Exact (UK): + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: true + validation: + warnings: + - field: AccountNumber + details: Should not exceed the maximum length of 14 characters if the specified currency is GBP. + information: [] + sortCode: + type: String + displayName: Sort Code + description: The sort code for the bank account + required: false + validation: + warnings: + - field: SortCode + details: Must be 6 characters long if the specified currency is GBP. + - field: SortCode + details: Must be provided if the specified currency is GBP. + information: [] + currency: + type: String + displayName: Currency + description: The currency of the bank account + required: false + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + required: true + FreeAgent: + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + sortCode: + type: String + displayName: Sort Code + description: The sort code for the bank account + required: false + validation: + warnings: + - field: SortCode + details: Must have a length between 0 and 8 characters + information: [] + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: false + iBan: + type: String + displayName: IBAN + description: The international bank account number of the account. Often used when making or receiving international payments + required: false + currency: + type: String + displayName: Currency + description: The currency of the bank account + options: + - value: AED + type: String + displayName: AED + required: false + - value: AMD + type: String + displayName: AMD + required: false + - value: AOA + type: String + displayName: AOA + required: false + - value: ARS + type: String + displayName: ARS + required: false + - value: AUD + type: String + displayName: AUD + required: false + - value: AWG + type: String + displayName: AWG + required: false + - value: AZN + type: String + displayName: AZN + required: false + - value: BBD + type: String + displayName: BBD + required: false + - value: BDT + type: String + displayName: BDT + required: false + - value: BGN + type: String + displayName: BGN + required: false + - value: BRL + type: String + displayName: BRL + required: false + - value: BWP + type: String + displayName: BWP + required: false + - value: CAD + type: String + displayName: CAD + required: false + - value: CHF + type: String + displayName: CHF + required: false + - value: CLP + type: String + displayName: CLP + required: false + - value: CNY + type: String + displayName: CNY + required: false + - value: COP + type: String + displayName: COP + required: false + - value: CRC + type: String + displayName: CRC + required: false + - value: CUC + type: String + displayName: CUC + required: false + - value: CUP + type: String + displayName: CUP + required: false + - value: CZK + type: String + displayName: CZK + required: false + - value: DKK + type: String + displayName: DKK + required: false + - value: DOP + type: String + displayName: DOP + required: false + - value: EGP + type: String + displayName: EGP + required: false + - value: EUR + type: String + displayName: EUR + required: false + - value: FJD + type: String + displayName: FJD + required: false + - value: GBP + type: String + displayName: GBP + required: false + - value: GEL + type: String + displayName: GEL + required: false + - value: GHS + type: String + displayName: GHS + required: false + - value: GTQ + type: String + displayName: GTQ + required: false + - value: GYD + type: String + displayName: GYD + required: false + - value: HKD + type: String + displayName: HKD + required: false + - value: HNL + type: String + displayName: HNL + required: false + - value: HRK + type: String + displayName: HRK + required: false + - value: HUF + type: String + displayName: HUF + required: false + - value: IDR + type: String + displayName: IDR + required: false + - value: ILS + type: String + displayName: ILS + required: false + - value: INR + type: String + displayName: INR + required: false + - value: ISK + type: String + displayName: ISK + required: false + - value: JMD + type: String + displayName: JMD + required: false + - value: JPY + type: String + displayName: JPY + required: false + - value: KES + type: String + displayName: KES + required: false + - value: KRW + type: String + displayName: KRW + required: false + - value: KWD + type: String + displayName: KWD + required: false + - value: KYD + type: String + displayName: KYD + required: false + - value: KZT + type: String + displayName: KZT + required: false + - value: LAK + type: String + displayName: LAK + required: false + - value: LBP + type: String + displayName: LBP + required: false + - value: LKR + type: String + displayName: LKR + required: false + - value: LTL + type: String + displayName: LTL + required: false + - value: LVL + type: String + displayName: LVL + required: false + - value: MAD + type: String + displayName: MAD + required: false + - value: MDL + type: String + displayName: MDL + required: false + - value: MGA + type: String + displayName: MGA + required: false + - value: MUR + type: String + displayName: MUR + required: false + - value: MVR + type: String + displayName: MVR + required: false + - value: MWK + type: String + displayName: MWK + required: false + - value: MXN + type: String + displayName: MXN + required: false + - value: MYR + type: String + displayName: MYR + required: false + - value: MZN + type: String + displayName: MZN + required: false + - value: NAD + type: String + displayName: NAD + required: false + - value: NGN + type: String + displayName: NGN + required: false + - value: NOK + type: String + displayName: NOK + required: false + - value: NPR + type: String + displayName: NPR + required: false + - value: NZD + type: String + displayName: NZD + required: false + - value: OMR + type: String + displayName: OMR + required: false + - value: PEN + type: String + displayName: PEN + required: false + - value: PHP + type: String + displayName: PHP + required: false + - value: PKR + type: String + displayName: PKR + required: false + - value: PLN + type: String + displayName: PLN + required: false + - value: QAR + type: String + displayName: QAR + required: false + - value: RON + type: String + displayName: RON + required: false + - value: RSD + type: String + displayName: RSD + required: false + - value: RUB + type: String + displayName: RUB + required: false + - value: RWF + type: String + displayName: RWF + required: false + - value: SAR + type: String + displayName: SAR + required: false + - value: SCR + type: String + displayName: SCR + required: false + - value: SEK + type: String + displayName: SEK + required: false + - value: SGD + type: String + displayName: SGD + required: false + - value: THB + type: String + displayName: THB + required: false + - value: TND + type: String + displayName: TND + required: false + - value: TRY + type: String + displayName: TRY + required: false + - value: TTD + type: String + displayName: TTD + required: false + - value: TWD + type: String + displayName: TWD + required: false + - value: TZS + type: String + displayName: TZS + required: false + - value: UAH + type: String + displayName: UAH + required: false + - value: UGX + type: String + displayName: UGX + required: false + - value: USD + type: String + displayName: USD + required: false + - value: UYU + type: String + displayName: UYU + required: false + - value: VEF + type: String + displayName: VEF + required: false + - value: VND + type: String + displayName: VND + required: false + - value: VUV + type: String + displayName: VUV + required: false + - value: XAF + type: String + displayName: XAF + required: false + - value: XCD + type: String + displayName: XCD + required: false + - value: XOF + type: String + displayName: XOF + required: false + - value: ZAR + type: String + displayName: ZAR + required: false + - value: ZMK + type: String + displayName: ZMK + required: false + required: true + balance: + type: Number + displayName: Balance + description: The balance of the bank account + required: false + validation: + warnings: [] + information: + - field: Balance + details: 'The opening balance, in the account currency' + institution: + type: String + displayName: Institution + description: The institution of the bank account + required: false + required: true + KashFlow: + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Account Name + description: Name of the bank account as it appears in Kashflow. + required: true + balance: + type: Number + displayName: Balance + description: 'The opening balance, in the account currency.' + required: false + currency: + type: String + displayName: Currency + description: The currency of the bank account. + required: true + required: true + QuickBooks Desktop: + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + validation: + warnings: + - field: NominalCode + details: Max length of 7 characters. + information: [] + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + validation: + warnings: + - field: AccountName + details: Max length of 31 characters. + information: [] + currency: + type: String + displayName: Currency + description: The currency of the bank account + required: false + validation: + warnings: + - field: Currency + details: 'The currency must match the base currency of the QuickBooks Desktop company unless the FullyQualifiedCategory is ''Asset.AccountsReceivable'',''Liability.AccountsPayable'' or ''Liability.CreditCard''' + - field: Currency + details: Must be a three letter ISO code that matches an existing active currency in the QuickBooks Desktop company + - field: Currency + details: Can only be set if the Quickbooks Desktop company has Multicurrency enabled. + information: + - field: Currency + details: 'If not set, will default to the base currency of the QuickBooks Desktop company' + balance: + type: Number + displayName: Balance + description: The balance of the bank account + required: false + required: true + QuickBooks Online Sandbox: + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Account Name + description: Name of account as it appears in the chart of accounts or general ledger. + required: true + accountNumber: + type: String + displayName: Account Number + description: User-defined account number to help the user in identifying the account within the chart-of-accounts and in deciding what should be posted to the account. + required: true + currency: + type: String + displayName: Currency + description: Currency of the bank account. + required: true + required: true + Sage Business Cloud Accounting: + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + validation: + warnings: [] + information: + - field: AccountName + details: Must be provided. + - field: AccountName + details: Should not be longer than 50 characters. + currency: + type: String + displayName: Currency + description: The currency of the bank account + required: true + validation: + warnings: [] + information: + - field: Currency + details: Must be provided. + - field: Currency + details: Must match the company's base currency. + sortCode: + type: String + displayName: Sort Code + description: The sort code for the bank account + required: false + validation: + warnings: [] + information: + - field: SortCode + details: Should be a 6 digit number. + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: false + validation: + warnings: [] + information: + - field: AccountNumber + details: Should not be longer than 25 characters. + iBan: + type: String + displayName: IBAN + description: The international bank account number of the account. Often used when making or receiving international payments + required: false + validation: + warnings: [] + information: + - field: IBan + details: Should be in the international bank account number format. + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: false + validation: + warnings: [] + information: + - field: NominalCode + details: Should be a number between 1 and 99999999. + required: true + Sandbox: + value: + type: Object + displayName: Bank Account + description: An account that bank transactions may be recorded against + properties: + accountName: + type: String + displayName: Name + description: The name of the bank account in the originating system + required: true + accountType: + type: String + displayName: Account Type + description: The type of account + required: true + nominalCode: + type: String + displayName: Nominal Code + description: The external reference given to each nominal account for a business + required: true + sortCode: + type: String + displayName: Sort Code + description: The sort code for the bank account + required: true + accountNumber: + type: String + displayName: Account Number + description: The account number for the bank account + required: true + iBan: + type: String + displayName: IBAN + description: The international bank account number of the account. Often used when making or receiving international payments + required: true + currency: + type: String + displayName: Currency + description: The currency of the bank account + required: true + balance: + type: Number + displayName: Balance + description: The balance of the bank account + required: true + availableBalance: + type: Number + displayName: Available Balance + description: The available balance of the bank account + required: true + overdraftLimit: + type: Number + displayName: Overdraft Limit + description: The pre-arranged overdraft limit of the account + required: true + institution: + type: String + displayName: Institution + description: The institution of the bank account + required: true + metadata: + type: Object + displayName: Metadata + description: Miscellaneous data about the item + properties: + isDeleted: + type: Boolean + displayName: IsDeleted + description: A boolean to indicate whether the object has been deleted + required: true + required: true + required: true '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - tags: - - Settings - description: Update your Codat profile - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Profile' - examples: {} - description: All fields should be included when updating your profile. - /profile/syncSettings: + operationId: get-create-bankAccounts-model + description: "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/sync-for-expenses-api#/schemas/BankAccount) for a given company and integration.\r\n\r\n[Bank accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution.\r\n\r\n**Integration-specific behaviour**\r\n\r\nSee the *response examples* for integration-specific indicative models.\r\n" + '/companies/{companyId}/data/customers': + parameters: + - $ref: '#/components/parameters/companyId' get: - summary: Get sync settings tags: - - Settings - operationId: get-profile-syncSettings - x-speakeasy-name-override: get-sync-settings - description: 'Retrieve the [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings) for your client. This includes how often data types should be queued to be updated, and how much history should be fetched.' + - Customers + summary: List customers + parameters: + - $ref: '#/components/parameters/page' + - $ref: '#/components/parameters/pageSize' + - $ref: '#/components/parameters/query' + - $ref: '#/components/parameters/orderBy' responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/SyncSettings' + $ref: '#/components/schemas/Customers' examples: - Example: + Clear Books: value: - clientId: 367f7975-267b-439b-90c6-a6040ee680f3 - settings: - - dataType: invoices - fetchOnFirstLink: true - syncSchedule: 24 - syncOrder: 0 - syncFromUtc: '2020-01-01T12:00:00.000Z' - syncFromWindow: 24 - monthsToSync: 24 - isLocked: true - overridesDefaults: true - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - post: - summary: Update all sync settings - description: Update sync settings for all data types. - tags: - - Settings - operationId: update-profile-syncSettings - x-speakeasy-name-override: update-sync-settings - responses: - '204': - description: No Content + results: + - id: c8180244-74ac-40cf-a5df-6d83661c44d7 + customerName: Arjun Kuvalis + contactName: Werner Langworth + emailAddress: Arjun34@hotmail.com + defaultCurrency: GBP + phone: 014605 64820 + addresses: + - type: Delivery + line1: Suite 214 + line2: 8439 Lueilwitz Passage + city: Fernandohaven + region: Northern Ireland + country: United Kingdom + postalCode: JG04 7PV + - type: Delivery + line1: Suite 096 + line2: 864 Halie Course + city: Juliochester + region: England + country: United Kingdom + postalCode: DZ8 4BF + - type: Delivery + line1: Suite 001 + line2: 416 Stokes Fords + city: Naderborough + region: Wales + country: United Kingdom + postalCode: XG25 0XX + contacts: + - name: Werner Langworth + email: Werner_Langworth@hotmail.com + phone: [] + address: + type: Delivery + line1: Apt. 145 + line2: 317 Williamson Freeway + city: Hortenseville + region: Scotland + country: United Kingdom + postalCode: CV4 2HR + status: Active + - name: Belle Glover + email: Belle51@yahoo.com + phone: [] + address: + type: Delivery + line1: Suite 075 + line2: 9921 Dickens Walk + city: South Ali + region: Scotland + country: United Kingdom + postalCode: TI04 4OO + status: Active + registrationNumber: NI7JEJVM + taxNumber: '7505220209.583549' + status: Active + modifiedDate: '2023-04-26T12:38:16Z' + sourceModifiedDate: '2022-07-03T01:27:00' + metadata: + isDeleted: false + - id: 6d162ee4-47b4-46c6-a2e6-aa9edd0fe6b0 + customerName: 'Breitenberg, Emard and Schiller' + contactName: Miguel Hahn + emailAddress: contact@BreitenbergEmardandSchiller.biz + defaultCurrency: GBP + phone: 0800 445 6957 + addresses: + - type: Billing + line1: Apt. 184 + line2: 60578 Louie Springs + city: East Khalid + region: Wales + country: United Kingdom + postalCode: XW89 7NT + contacts: + - name: Miguel Hahn + email: Miguel.Hahn@gmail.com + phone: + - number: 018555 09614 + type: Landline + address: + type: Delivery + line1: Suite 400 + line2: 21930 Milan Lane + city: Reingerton + region: Wales + country: United Kingdom + postalCode: QG10 2DL + status: Active + registrationNumber: KME0AMIL + taxNumber: '8560920952.553111' + status: Archived + modifiedDate: '2023-04-26T12:38:16Z' + sourceModifiedDate: '2022-12-03T11:05:01' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 20 + _links: + current: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/customers?page=1&pageSize=2 + self: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/customers + next: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/customers?page=2&pageSize=2 + Dynamics 365 Business Central: + value: + results: + - id: 0e2f7751-7696-ed11-bff5-6045bd0d2ad6 + customerName: '' + contactName: '' + emailAddress: '' + defaultCurrency: GBP + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: '' + postalCode: '' + contacts: + - name: '' + email: '' + phone: [] + address: + type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: '' + postalCode: '' + status: Active + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:25Z' + sourceModifiedDate: '2023-01-17T14:50:54Z' + metadata: + isDeleted: false + - id: 0ef95175-48c4-eb11-9f0a-0022481b4343 + customerName: '' + contactName: '' + emailAddress: '' + defaultCurrency: GBP + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + contacts: + - name: '' + email: '' + phone: [] + address: + type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + status: Active + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:25Z' + sourceModifiedDate: '2021-06-03T08:48:36Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 42 + _links: + current: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/customers?page=1&pageSize=2 + self: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/customers + next: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/customers?page=2&pageSize=2 + Exact (Netherlands): + value: + results: + - id: 555f8251-c65a-433a-a813-5dbe04321d1e + customerName: Ab Netherlands + defaultCurrency: EUR + addresses: + - type: Billing + country: NL + contacts: [] + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2021-06-14T15:26:37Z' + - id: 9fd1f78e-67aa-4af7-8a10-df1fc5fb5841 + customerName: anna test 2 + defaultCurrency: EUR + addresses: + - type: Billing + country: NL + contacts: [] + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2022-05-24T11:53:21Z' + pageNumber: 1 + pageSize: 2 + totalResults: 71 + _links: + current: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/customers?page=1&pageSize=2 + self: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/customers + next: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/customers?page=2&pageSize=2 + Exact (UK): + value: + results: + - id: 5f20075a-a28e-434d-81a6-2db0dc170e87 + customerName: Abdi 99 + emailAddress: email@codat.io + defaultCurrency: GBP + addresses: + - type: Billing + line1: Ink Rooms + city: London + country: GB + postalCode: WC1X 0BE + contacts: [] + registrationNumber: '123456789' + taxNumber: GB339 0727 47 + status: Active + modifiedDate: '2022-10-26T13:33:08Z' + sourceModifiedDate: '2020-02-26T11:23:50Z' + - id: 1d9dc1a7-92d6-441b-93fd-42c9fb321b1c + customerName: Abdulbasit Al-haj + contactName: abeee + emailAddress: a.alhaj@codat.io + defaultCurrency: GBP + addresses: + - type: Billing + country: GB + contacts: + - name: abeee + phone: [] + address: + type: Unknown + line1: '' + country: 'GB ' + status: Active + modifiedDate: '2020-02-24T12:00:51.027Z' + status: Active + modifiedDate: '2022-10-26T13:33:08Z' + sourceModifiedDate: '2020-02-24T12:00:50Z' + pageNumber: 1 + pageSize: 2 + totalResults: 53 + _links: + current: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/customers?page=1&pageSize=2 + self: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/customers + next: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/customers?page=2&pageSize=2 + FreeAgent: + value: + results: + - id: '11526230' + customerName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + contacts: + - name: Test 1 + phone: [] + address: + type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Unknown + status: Active + modifiedDate: '2023-04-25T14:19:12Z' + sourceModifiedDate: '2023-04-17T06:02:46Z' + metadata: + isDeleted: false + - id: '9677150' + customerName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + contacts: + - name: Test 1 + phone: [] + address: + type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Unknown + status: Active + modifiedDate: '2023-04-25T14:19:12Z' + sourceModifiedDate: '2023-04-24T06:19:23Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 159 + _links: + current: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/customers?page=1&pageSize=2 + self: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/customers + next: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/customers?page=2&pageSize=2 + FreshBooks: + value: + results: + - id: '634509' + customerName: A test customer 14 (updated) + contactName: test person name + emailAddress: test14@example.com + defaultCurrency: GBP + phone: 01876 541245 + addresses: + - type: Billing + line1: Line 1 + line2: Line 2 + city: Some city + region: A region + country: Country 1 + postalCode: SW1 2JQ + contacts: + - name: test person1 + email: test14A@example.com + phone: + - number: '24681012' + type: Primary + - number: '121086420' + type: Unknown + status: Active + - name: test person2 + email: test14B@example.com + phone: + - number: 1234 56789 + type: Primary + - number: 9876 54321 + type: Unknown + status: Active + - name: test person name + email: test14@example.com + phone: + - number: 01876 541245 + type: Unknown + status: Active + status: Active + modifiedDate: '2023-03-24T16:07:23Z' + sourceModifiedDate: '2022-05-18T09:23:56' + metadata: + isDeleted: false + - id: '634486' + customerName: A test customer name 2 + contactName: test person name + emailAddress: test8@example.com + defaultCurrency: GBP + phone: 01876 541245 + addresses: + - type: Billing + line1: Line 1 + line2: Line 2 + city: Some city + region: A region + country: Country 1 + postalCode: SW1 2JQ + contacts: + - name: test person1 + email: test9@example.com + phone: + - number: '24681012' + type: Primary + - number: '121086420' + type: Unknown + status: Active + - name: test person2 + email: test10@example.com + phone: + - number: '123456789' + type: Primary + - number: '987654321' + type: Unknown + status: Active + - name: test person name + email: test8@example.com + phone: + - number: 01876 541245 + type: Unknown + status: Active + status: Active + modifiedDate: '2023-03-24T16:07:23Z' + sourceModifiedDate: '2022-05-11T11:39:58' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 39 + _links: + current: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/customers?page=1&pageSize=2 + self: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/customers + next: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/customers?page=2&pageSize=2 + KashFlow: + value: + results: + - id: '92227673' + customerName: Chekko Customer Test 01 + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + contacts: + - name: '' + email: '' + phone: [] + status: Active + taxNumber: '' + status: Active + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '0001-01-01T00:00:00' + - id: '88459410' + customerName: Diogo Sousa + contactName: Mr Diogo Sousa + emailAddress: diogomail@mail.com + phone: '123123123' + addresses: + - type: Billing + line1: Billing Address + line2: Billing line 2 Billing line 3 + city: Billing line 4 + country: United Kingdom + postalCode: '123321' + - type: Delivery + line1: Delivery Address + line2: Delivery line2 Delivery line3 + city: Delivery line4 + country: United Kingdom + postalCode: '123321' + contacts: + - name: Mr Diogo Sousa + email: diogomail@mail.com + phone: + - number: '123123123' + type: Landline + - number: '321321321' + type: Mobile + address: + type: Billing + line1: Billing Address + line2: Billing line 2 Billing line 3 + city: Billing line 4 + country: United Kingdom + postalCode: '123321' + status: Active + - name: Mr Diogo Sousa + phone: [] + address: + type: Delivery + line1: Delivery Address + line2: Delivery line2 Delivery line3 + city: Delivery line4 + country: United Kingdom + postalCode: '123321' + status: Active + taxNumber: '' + status: Active + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '2021-05-04T13:22:19' + pageNumber: 1 + pageSize: 2 + totalResults: 10 + _links: + current: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/customers?page=1&pageSize=2 + self: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/customers + next: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/customers?page=2&pageSize=2 + Oracle NetSuite: + value: + results: + - id: '773' + customerName: 119 Test Customer + contactName: Mr Test Customer + defaultCurrency: GBP + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-01-30T14:48:02Z' + sourceModifiedDate: '2022-01-11T12:28:49' + - id: '172722' + customerName: 1248 European Company + contactName: European Company + defaultCurrency: GBP + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-01-30T14:48:02Z' + sourceModifiedDate: '2022-07-27T14:29:16' + pageNumber: 1 + pageSize: 2 + totalResults: 4 + _links: + current: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/customers?page=1&pageSize=2 + self: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/customers + next: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/customers?page=2&pageSize=2 + QuickBooks Desktop: + value: + results: + - id: 150000-933272658 + customerName: 'Abercrombie, Kristy' + contactName: Kristy Abercrombie + emailAddress: kristy@samplename.com + defaultCurrency: GBP + phone: 415-555-6579 + addresses: + - type: Delivery + line1: Kristy Abercrombie + line2: 5647 Cypress Hill Rd + city: Bayshore + region: CA + postalCode: '94326' + - type: Billing + line1: Kristy Abercrombie + line2: 5647 Cypress Hill Rd + city: Bayshore + region: CA + postalCode: '94326' + contacts: + - name: 'Abercrombie, Kristy' + email: kristy@samplename.com + phone: + - number: 415-555-6579 + type: Primary + status: Active + - name: Kristy Abercrombie + phone: [] + status: Active + - name: Steve Darcangelo + phone: [] + status: Active + status: Active + modifiedDate: '2023-04-26T09:07:55Z' + sourceModifiedDate: '2023-12-16T05:06:42' + metadata: + isDeleted: false + - id: 800000D0-1182061376 + customerName: 'Allard, Robert' + contactName: Amanda Roberts + emailAddress: rallard@myemail.com + defaultCurrency: GBP + phone: 650-555-3422 + addresses: + - type: Delivery + line1: Robert Allard + line2: 92834 Chandler St. + city: Millbrae + region: CA + postalCode: '94030' + - type: Billing + line1: Robert Allard + line2: 92834 Chandler St. + city: Millbrae + region: CA + postalCode: '94030' + contacts: + - name: 'Allard, Robert' + email: rallard@myemail.com + phone: + - number: 650-555-3422 + type: Primary + - number: 650-555-9804 + type: Fax + - number: 650-555-8349 + type: Unknown + status: Active + - name: Robert Allard + phone: [] + status: Active + - name: Rachel Fisher + phone: [] + status: Active + status: Active + modifiedDate: '2023-04-26T09:07:55Z' + sourceModifiedDate: '2023-12-16T05:06:42' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 64 + _links: + current: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/customers?page=1&pageSize=2 + self: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/customers + next: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/customers?page=2&pageSize=2 + QuickBooks Online: + value: + results: + - id: '9' + customerName: Abe + contactName: Abraham's Company + emailAddress: ab@email.com + defaultCurrency: GBP + addresses: [] + contacts: + - name: Abe + email: ab@email.com + phone: + - number: '01111111111' + type: Mobile + status: Active + registrationNumber: XXXX9900001 + taxNumber: XXXX9900001 + status: Active + modifiedDate: '2023-01-18T11:02:35Z' + sourceModifiedDate: '2022-12-08T15:42:59Z' + - id: '49' + customerName: adeel qbo child test + contactName: Adeel test + emailAddress: adeel@adeel.com + defaultCurrency: GBP + phone: '123456789' + addresses: + - type: Billing + line1: 4 Privet Drive + city: London + country: United Kingdom + postalCode: WD25 7LR + - type: Delivery + line1: 4 Privet Drive + city: London + country: United Kingdom + postalCode: WD25 7LR + contacts: + - name: Adeel test + email: adeel@adeel.com + phone: + - number: '123456789' + type: Primary + - number: '07546543216' + type: Mobile + address: + type: Billing + line1: 4 Privet Drive + city: London + country: United Kingdom + postalCode: WD25 7LR + status: Active + status: Active + modifiedDate: '2023-01-18T11:02:35Z' + sourceModifiedDate: '2022-08-22T09:21:09Z' + pageNumber: 1 + pageSize: 2 + totalResults: 40 + _links: + current: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/customers?page=1&pageSize=2 + self: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/customers + next: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/customers?page=2&pageSize=2 + QuickBooks Online Sandbox: + value: + results: + - id: '66' + customerName: Abercrombie International Group + contactName: Kristy Abercrombie + defaultCurrency: GBP + addresses: + - type: Billing + line1: 123 Main St + city: 'New York, NY' + contacts: + - name: Abercrombie International Group (deleted) + phone: [] + address: + type: Billing + line1: 123 Main St + city: 'New York, NY' + status: Archived + status: Archived + modifiedDate: '2023-04-26T09:35:56Z' + sourceModifiedDate: '2016-09-12T18:53:19Z' + metadata: + isDeleted: false + - id: '67' + customerName: Abercrombie International Group + contactName: Natalie Watts + emailAddress: n.watts@google.com + defaultCurrency: USD + addresses: + - type: Billing + - type: Delivery + contacts: + - name: Abercrombie International Group + email: n.watts@google.com + phone: [] + address: + type: Billing + status: Active + registrationNumber: XXXXVat123456 + taxNumber: XXXXVat123456 + status: Active + modifiedDate: '2023-04-26T09:35:56Z' + sourceModifiedDate: '2023-03-29T01:12:55Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 243 + _links: + current: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/customers?page=1&pageSize=2 + self: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/customers + next: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/customers?page=2&pageSize=2 + Sage 200cloud: + value: + results: + - id: A1D001 + customerName: A1 Design Services + contactName: Lee Dalkin + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Delivery + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: '' + postalCode: BP12 7HT + - type: Delivery + line1: 23a Union Street + line2: '' + city: Manchester + region: '' + country: '' + postalCode: M2 6JK + - type: Billing + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: Great Britain + postalCode: BP12 7HT + contacts: + - name: Lee Dalkin + email: newbusinessadvice@sage.com + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Landline + - number: 01742 876 236 + type: Fax + status: Active + - name: Malcolm Leverret + email: '' + phone: [] + status: Active + - name: Jim Thomas + email: Jim@a1designservices.co.uk + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Fax + status: Active + - name: Jullian Plawsworth + email: Jullian@a1designservices.co.uk + phone: + - number: 0151 349 3939 + type: Landline + - number: 0151 349 3940 + type: Fax + status: Active + registrationNumber: '' + taxNumber: GB238 3839 38 + status: Active + modifiedDate: '2022-10-14T09:35:53Z' + sourceModifiedDate: '2022-04-27T15:17:36Z' + - id: A1D002 + customerName: A2 Design Services + contactName: Lee Dalkin + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Billing + line1: 77a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: Great Britain + postalCode: BP12 7HT + contacts: + - name: Lee Dalkin + email: newbusinessadvice@sage.com + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Landline + - number: 01742 876 236 + type: Fax + status: Active + - name: Malcolm Leverret + email: '' + phone: [] + status: Active + - name: Jim Thomas + email: Jim@a1designservices.co.uk + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Fax + status: Active + - name: Jullian Plawsworth + email: Jullian@a1designservices.co.uk + phone: + - number: 0151 349 3939 + type: Landline + - number: 0151 349 3940 + type: Fax + status: Active + registrationNumber: '' + taxNumber: GB238 3839 40 + status: Active + modifiedDate: '2022-10-14T09:35:53Z' + sourceModifiedDate: '2020-09-23T10:28:58Z' + pageNumber: 1 + pageSize: 2 + totalResults: 43 + _links: + current: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/customers?page=1&pageSize=2 + self: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/customers + next: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/customers?page=2&pageSize=2 + Sage 50 (UK): + value: + results: + - id: A1D001 + customerName: A1 Design Services + contactName: Ian Cairns + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Delivery + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: GB + postalCode: BP12 7HT + - type: Delivery + line1: 23a Union Street + line2: '' + city: Manchester + region: '' + country: GB + postalCode: M2 6JK + - type: Unknown + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: GB + postalCode: BP12 7HT + contacts: [] + taxNumber: GB238 3839 38 + status: Active + modifiedDate: '2023-03-30T14:42:41Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + metadata: + isDeleted: false + - id: ABS001 + customerName: ABS Garages Ltd + contactName: Mike Hall + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 0191 254 5909 + addresses: + - type: Delivery + line1: Swanson Industries + line2: Dukes Industrial Estate + city: Whitley Bay + region: North Tyneside + country: GB + postalCode: NE56 4ER + - type: Delivery + line1: Unit 34 + line2: Holystone Ind Estate + city: Hebburn + region: Tyne & Wear + country: GB + postalCode: NE31 1VB + - type: Unknown + line1: Unit 34 + line2: Holystone Ind Estate + city: Hebburn + region: Tyne & Wear + country: GB + postalCode: NE31 1VB + contacts: [] + taxNumber: GB745 4584 68 + status: Active + modifiedDate: '2023-03-30T14:42:41Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 30 + _links: + current: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/customers?page=1&pageSize=2 + self: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/customers + next: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/customers?page=2&pageSize=2 + Sage Business Cloud Accounting: + value: + results: + - id: 260f6a3f94a243738f2d5e08496a41a8 + customerName: 100 test name + contactName: Main Contact + emailAddress: email@codat.io + defaultCurrency: GBP + phone: contact phone number + addresses: + - type: Billing + line1: Aruba Address line 1 + line2: Aruba Address line 2 + city: Aruba City + region: Aruba Province + country: Aruba (AW) + postalCode: Aruba Post + contacts: + - phone: + - number: contact mobile number + type: Mobile + - number: contact fax number + type: Fax + status: Unknown + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2021-05-10T16:31:51Z' + - id: 44a5d9461d9e4f6d90a5ace251c5cf35 + customerName: 100 test name DS + contactName: Main Contact + emailAddress: DCemail@codat.io + defaultCurrency: GBP + phone: contact phone number + addresses: + - type: Billing + line1: POST - Aruba Address line 1 + line2: POST - Aruba Address line 2 + city: POST - Aruba City + region: Aruba Province + country: Aruba (AW) + postalCode: Aruba Post + contacts: [] + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2021-06-10T14:22:46Z' + pageNumber: 1 + pageSize: 2 + totalResults: 168 + _links: + current: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/customers?page=1&pageSize=2 + self: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/customers + next: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/customers?page=2&pageSize=2 + Sage Intacct: + value: + results: + - id: '188' + customerName: 33Across + contactName: Yuna Conn + defaultCurrency: USD + phone: 520-393-4468 + addresses: + - type: Unknown + line1: 155 Westend Point + line2: '' + city: Albuquerque + region: NM + country: United States + postalCode: '87140' + contacts: + - name: 'Conn, Yuna' + phone: + - number: 520-393-4468 + type: Primary + address: + type: Unknown + line1: 155 Westend Point + line2: '' + city: Albuquerque + region: NM + country: United States + postalCode: '87140' + status: Unknown + taxNumber: '' + status: Active + modifiedDate: '2023-04-04T16:32:21Z' + sourceModifiedDate: '2022-09-06T12:58:27' + metadata: + isDeleted: false + - id: '324' + customerName: 3Way International Logistics + contactName: Lauri O'Heagertie + defaultCurrency: CAD + phone: 410-309-3976 + addresses: + - type: Unknown + line1: 7 Lerdahl Junction + line2: '' + city: Sparwood + region: British Columbia + country: Canada + postalCode: L4R + contacts: + - name: 'O''Heagertie, Lauri' + phone: + - number: 410-309-3976 + type: Primary + address: + type: Unknown + line1: 7 Lerdahl Junction + line2: '' + city: Sparwood + region: British Columbia + country: Canada + postalCode: L4R + status: Unknown + taxNumber: '' + status: Active + modifiedDate: '2023-04-04T16:32:21Z' + sourceModifiedDate: '2020-10-20T05:01:49' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 530 + _links: + current: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/customers?page=1&pageSize=2 + self: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/customers + next: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/customers?page=2&pageSize=2 + Wave: + value: + results: + - id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjMyMzkzNTA4 + customerName: ABC Textiles + contactName: '' + emailAddress: c.taylor@codat.io + defaultCurrency: USD + addresses: [] + contacts: [] + status: Active + modifiedDate: '2022-11-16T18:15:30Z' + sourceModifiedDate: '2019-10-17T07:59:04Z' + - id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjM3MTUzNDI2 + customerName: Coffee Cart + contactName: Coffee Carl + emailAddress: coffee.cart@example.com + defaultCurrency: GBP + phone: '0201111' + addresses: + - type: Billing + line1: 11 Coffee Lane + line2: Coffee Town + city: Coffee City + region: Hampshire + country: United Kingdom + postalCode: CC1 1CC + contacts: + - name: Coffee Carl + phone: + - number: '07733' + type: Mobile + status: Active + status: Active + modifiedDate: '2022-11-16T18:15:30Z' + sourceModifiedDate: '2020-03-17T19:12:39Z' + pageNumber: 1 + pageSize: 2 + totalResults: 10 + _links: + current: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/customers?page=1&pageSize=2 + self: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/customers + next: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/customers?page=2&pageSize=2 + Xero: + value: + results: + - id: e4c9d0e2-c285-4e85-b579-6d28b180c730 + customerName: 24 Locks + emailAddress: '' + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-03-15T20:35:10Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + - id: bab779bc-c5fb-42cb-a888-953e8309711c + customerName: 7-Eleven + emailAddress: '' + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-03-15T20:35:10Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 48 + _links: + current: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/customers?page=1&pageSize=2 + self: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/customers + next: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/customers?page=2&pageSize=2 + Zoho Books: + value: + results: + - id: '104957000000032105' + customerName: A B + contactName: Contact (First Name) Contact (Last Name) + emailAddress: contactperson@whateveryouwantidontcare12345.com + defaultCurrency: GBP + phone: Work Phone + addresses: [] + contacts: + - name: Contact (First Name) Contact (Last Name) + email: contactperson@whateveryouwantidontcare12345.com + phone: + - number: Work Phone + type: Landline + - number: Mobile + type: Mobile + status: Active + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-06-09T14:36:47' + - id: '104957000000054050' + customerName: 'Doe, John' + contactName: John Doe + emailAddress: '' + defaultCurrency: GBP + addresses: [] + contacts: + - name: John Doe + email: '' + phone: [] + status: Active + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-09-28T15:09:22' + pageNumber: 1 + pageSize: 2 + totalResults: 14 + _links: + current: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/customers?page=1&pageSize=2 + self: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/customers + next: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/customers?page=2&pageSize=2 + '400': + $ref: '#/components/responses/Malformed-Query' '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '409': + $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - requestBody: - content: - application/json: - schema: - allOf: - - properties: - clientId: - $ref: '#/components/schemas/ClientId' - settings: - type: array - items: - $ref: '#/components/schemas/SyncSetting' - overridesDefaults: - type: boolean - default: true - description: 'Set to `True` if you want to override default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings).' - required: - - clientId - - settings - - overridesDefaults - type: object - description: |- - Include a `syncSetting` object for each data type. - `syncFromWindow`, `syncFromUTC` & `monthsToSync` only need to be included if you wish to set a value for them. - /apiKeys: + description: "The *List customers* endpoint returns a list of [customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) for a given company's connection.\n\n[Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB.\n\nBefore using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data).\n " + operationId: list-customers + '/companies/{companyId}/data/customers/{customerId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/customerId' get: - summary: List API keys - description: |- - Use the *List API keys* endpoint to return a list of all API keys that currently exist for your client. This includes keys created via the Portal UI or the *Create API keys* endpoint. - - [API keys](https://docs.codat.io/platform-api#/schemas/apiKeys) are tokens used to control access to the API. Include this token in the `Authorization` header parameter when making API calls, following the word "Basic" and a space with your API key. - - You can [read more](https://docs.codat.io/using-the-api/authentication) about authentication at Codat and managing API keys via the Portal UI or API. - operationId: list-api-keys - x-speakeasy-name-override: list-api-keys tags: - - Settings + - Customers + summary: Get customer responses: '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/ApiKeys' + $ref: '#/components/schemas/Customer' examples: - Example: + Clear Books: value: - results: - - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd - createdDate: '2022-04-11T13:49:37Z' - - id: c438836a-61fe-443f-8a19-24cc18be21e4 - name: azure-invoice-finance-processor - apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd - createdDate: '2022-04-23T09:43:48Z' + id: c8180244-74ac-40cf-a5df-6d83661c44d7 + customerName: Arjun Kuvalis + contactName: Werner Langworth + emailAddress: Arjun34@hotmail.com + defaultCurrency: GBP + phone: 014605 64820 + addresses: + - type: Delivery + line1: Suite 214 + line2: 8439 Lueilwitz Passage + city: Fernandohaven + region: Northern Ireland + country: United Kingdom + postalCode: JG04 7PV + - type: Delivery + line1: Suite 096 + line2: 864 Halie Course + city: Juliochester + region: England + country: United Kingdom + postalCode: DZ8 4BF + - type: Delivery + line1: Suite 001 + line2: 416 Stokes Fords + city: Naderborough + region: Wales + country: United Kingdom + postalCode: XG25 0XX + contacts: + - name: Werner Langworth + email: Werner_Langworth@hotmail.com + phone: [] + address: + type: Delivery + line1: Apt. 145 + line2: 317 Williamson Freeway + city: Hortenseville + region: Scotland + country: United Kingdom + postalCode: CV4 2HR + status: Active + - name: Belle Glover + email: Belle51@yahoo.com + phone: [] + address: + type: Delivery + line1: Suite 075 + line2: 9921 Dickens Walk + city: South Ali + region: Scotland + country: United Kingdom + postalCode: TI04 4OO + status: Active + registrationNumber: NI7JEJVM + taxNumber: '7505220209.583549' + status: Active + modifiedDate: '2023-04-26T12:38:16Z' + sourceModifiedDate: '2022-07-03T01:27:00' + metadata: + isDeleted: false + Dynamics 365 Business Central: + value: + id: 0e2f7751-7696-ed11-bff5-6045bd0d2ad6 + customerName: '' + contactName: '' + emailAddress: '' + defaultCurrency: GBP + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: '' + postalCode: '' + contacts: + - name: '' + email: '' + phone: [] + address: + type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: '' + postalCode: '' + status: Active + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:25Z' + sourceModifiedDate: '2023-01-17T14:50:54Z' + metadata: + isDeleted: false + Exact (Netherlands): + value: + id: 555f8251-c65a-433a-a813-5dbe04321d1e + customerName: Ab Netherlands + defaultCurrency: EUR + addresses: + - type: Billing + country: NL + contacts: [] + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2021-06-14T15:26:37Z' + Exact (UK): + value: + id: 5f20075a-a28e-434d-81a6-2db0dc170e87 + customerName: Abdi 99 + emailAddress: email@codat.io + defaultCurrency: GBP + addresses: + - type: Billing + line1: Ink Rooms + city: London + country: GB + postalCode: WC1X 0BE + contacts: [] + registrationNumber: '123456789' + taxNumber: GB339 0727 47 + status: Active + modifiedDate: '2022-10-26T13:33:08Z' + sourceModifiedDate: '2020-02-26T11:23:50Z' + FreeAgent: + value: + id: '11526230' + customerName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + contacts: + - name: Test 1 + phone: [] + address: + type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Unknown + status: Active + modifiedDate: '2023-04-25T14:19:12Z' + sourceModifiedDate: '2023-04-17T06:02:46Z' + metadata: + isDeleted: false + FreshBooks: + value: + id: '634509' + customerName: A test customer 14 (updated) + contactName: test person name + emailAddress: test14@example.com + defaultCurrency: GBP + phone: 01876 541245 + addresses: + - type: Billing + line1: Line 1 + line2: Line 2 + city: Some city + region: A region + country: Country 1 + postalCode: SW1 2JQ + contacts: + - name: test person1 + email: test14A@example.com + phone: + - number: '24681012' + type: Primary + - number: '121086420' + type: Unknown + status: Active + - name: test person2 + email: test14B@example.com + phone: + - number: '123456789' + type: Primary + - number: '987654321' + type: Unknown + status: Active + - name: test person name + email: test14@example.com + phone: + - number: 01876 541245 + type: Unknown + status: Active + status: Active + modifiedDate: '2023-03-24T16:07:23Z' + sourceModifiedDate: '2022-05-18T09:23:56' + metadata: + isDeleted: false + KashFlow: + value: + id: '92227673' + customerName: Chekko Customer Test 01 + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + contacts: + - name: '' + email: '' + phone: [] + status: Active + taxNumber: '' + status: Active + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '0001-01-01T00:00:00' + Oracle NetSuite: + value: + id: '773' + customerName: 119 Test Customer + contactName: Mr Test Customer + defaultCurrency: GBP + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-01-30T14:48:02Z' + sourceModifiedDate: '2022-01-11T12:28:49' + QuickBooks Desktop: + value: + id: 150000-933272658 + customerName: 'Abercrombie, Kristy' + contactName: Kristy Abercrombie + emailAddress: kristy@samplename.com + defaultCurrency: GBP + phone: 415-555-6579 + addresses: + - type: Delivery + line1: Kristy Abercrombie + line2: 5647 Cypress Hill Rd + city: Bayshore + region: CA + postalCode: '94326' + - type: Billing + line1: Kristy Abercrombie + line2: 5647 Cypress Hill Rd + city: Bayshore + region: CA + postalCode: '94326' + contacts: + - name: 'Abercrombie, Kristy' + email: kristy@samplename.com + phone: + - number: 415-555-6579 + type: Primary + status: Active + - name: Kristy Abercrombie + phone: [] + status: Active + - name: Steve Darcangelo + phone: [] + status: Active + status: Active + modifiedDate: '2023-04-26T09:07:55Z' + sourceModifiedDate: '2023-12-16T05:06:42' + metadata: + isDeleted: false + QuickBooks Online: + value: + id: '9' + customerName: Abe + contactName: Abraham's Company + emailAddress: ab@email.com + defaultCurrency: GBP + addresses: [] + contacts: + - name: Abe + email: ab@email.com + phone: + - number: '01111111111' + type: Mobile + status: Active + registrationNumber: XXXX9900001 + taxNumber: XXXX9900001 + status: Active + modifiedDate: '2023-01-18T11:02:35Z' + sourceModifiedDate: '2022-12-08T15:42:59Z' + QuickBooks Online Sandbox: + value: + id: '66' + customerName: Abercrombie International Group + contactName: Kristy Abercrombie + defaultCurrency: GBP + addresses: + - type: Billing + line1: 123 Main St + city: 'New York, NY' + contacts: + - name: Abercrombie International Group (deleted) + phone: [] + address: + type: Billing + line1: 123 Main St + city: 'New York, NY' + status: Archived + status: Archived + modifiedDate: '2023-04-26T09:35:56Z' + sourceModifiedDate: '2016-09-12T18:53:19Z' + metadata: + isDeleted: false + Sage 200cloud: + value: + id: A1D001 + customerName: A1 Design Services + contactName: Lee Dalkin + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Delivery + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: '' + postalCode: BP12 7HT + - type: Delivery + line1: 23a Union Street + line2: '' + city: Manchester + region: '' + country: '' + postalCode: M2 6JK + - type: Billing + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: Great Britain + postalCode: BP12 7HT + contacts: + - name: Lee Dalkin + email: newbusinessadvice@sage.com + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Landline + - number: 01742 876 236 + type: Fax + status: Active + - name: Malcolm Leverret + email: '' + phone: [] + status: Active + - name: Jim Thomas + email: Jim@a1designservices.co.uk + phone: + - number: 01742 876 234 + type: Landline + - number: 01742 876 235 + type: Fax + status: Active + - name: Jullian Plawsworth + email: Jullian@a1designservices.co.uk + phone: + - number: 0151 349 3939 + type: Landline + - number: 0151 349 3940 + type: Fax + status: Active + registrationNumber: '' + taxNumber: GB238 3839 38 + status: Active + modifiedDate: '2022-10-14T09:35:53Z' + sourceModifiedDate: '2022-04-27T15:17:36Z' + Sage 50 (UK): + value: + id: A1D001 + customerName: A1 Design Services + contactName: Ian Cairns + emailAddress: newbusinessadvice@sage.com + defaultCurrency: GBP + phone: 01742 876 234 + addresses: + - type: Delivery + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: GB + postalCode: BP12 7HT + - type: Delivery + line1: 23a Union Street + line2: '' + city: Manchester + region: '' + country: GB + postalCode: M2 6JK + - type: Unknown + line1: 67a Station Road + line2: '' + city: Blackpool + region: Lancashire + country: GB + postalCode: BP12 7HT + contacts: [] + taxNumber: GB238 3839 38 + status: Active + modifiedDate: '2023-03-30T14:42:41Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + metadata: + isDeleted: false + Sage Business Cloud Accounting: + value: + id: 260f6a3f94a243738f2d5e08496a41a8 + customerName: 100 test name + contactName: Main Contact + emailAddress: email@codat.io + defaultCurrency: GBP + phone: contact phone number + addresses: + - type: Billing + line1: Aruba Address line 1 + line2: Aruba Address line 2 + city: Aruba City + region: Aruba Province + country: Aruba (AW) + postalCode: Aruba Post + contacts: + - phone: + - number: contact mobile number + type: Mobile + - number: contact fax number + type: Fax + status: Unknown + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2021-05-10T16:31:51Z' + Sage Intacct: + value: + id: '188' + customerName: 33Across + contactName: Yuna Conn + defaultCurrency: USD + phone: 520-393-4468 + addresses: + - type: Unknown + line1: 155 Westend Point + line2: '' + city: Albuquerque + region: NM + country: United States + postalCode: '87140' + contacts: + - name: 'Conn, Yuna' + phone: + - number: 520-393-4468 + type: Primary + address: + type: Unknown + line1: 155 Westend Point + line2: '' + city: Albuquerque + region: NM + country: United States + postalCode: '87140' + status: Unknown + taxNumber: '' + status: Active + modifiedDate: '2023-04-04T16:32:21Z' + sourceModifiedDate: '2022-09-06T12:58:27' + metadata: + isDeleted: false + Wave: + value: + id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O0N1c3RvbWVyOjMyMzkzNTA4 + customerName: ABC Textiles + contactName: '' + emailAddress: c.taylor@codat.io + defaultCurrency: USD + addresses: [] + contacts: [] + status: Active + modifiedDate: '2022-11-16T18:15:30Z' + sourceModifiedDate: '2019-10-17T07:59:04Z' + Xero: + value: + id: e4c9d0e2-c285-4e85-b579-6d28b180c730 + customerName: 24 Locks + emailAddress: '' + addresses: [] + contacts: [] + status: Active + modifiedDate: '2023-03-15T20:35:10Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + Zoho Books: + value: + id: '104957000000032105' + customerName: A B + contactName: Contact (First Name) Contact (Last Name) + emailAddress: contactperson@whateveryouwantidontcare12345.com + defaultCurrency: GBP + phone: Work Phone + addresses: [] + contacts: + - name: Contact (First Name) Contact (Last Name) + email: contactperson@whateveryouwantidontcare12345.com + phone: + - number: Work Phone + type: Landline + - number: Mobile + type: Mobile + status: Active + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-06-09T14:36:47' '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '409': + $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' + description: | + The *Get customer* endpoint returns a single customer for a given customerId. + + [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). + operationId: get-customer + '/companies/{companyId}/connections/{connectionId}/push/customers': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' post: - summary: Create API key - operationId: create-api-key - x-speakeasy-name-override: create-api-key - description: "Use the *Create API keys* endpoint to generate a new API key for your client.\n\n[API keys](https://docs.codat.io/platform-api#/schemas/apiKeys) are tokens used to control access to the API. Include this token in the `Authorization` header parameter when making API calls, following the word \"Basic\" and a space with your API key.\n\nYou can [read more](https://docs.codat.io/using-the-api/authentication) about authentication at Codat and managing API keys via the Portal UI or API.\n\n### Tips and pitfalls\n\n* Your first API key is created for you. Access this key via [Codat's Portal](https://app.codat.io/developers/api-keys).\n* If you require multiple API keys, perform multiple calls to the *Create API keys* endpoint. \n* The number of API keys is limited to 10. If you have reached the maximum amount of keys, use the *Delete API key* endpoint to delete an unused key first." tags: - - Settings + - Customers + summary: Create customer + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' requestBody: content: application/json: schema: - $ref: '#/components/schemas/CreateApiKey' - examples: - Create API key with name: - value: - name: azure-invoice-finance-processor + $ref: '#/components/schemas/Customer' responses: - '201': + '200': description: Success content: application/json: schema: - $ref: '#/components/schemas/ApiKeyDetails' - examples: - API key details: - value: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd - createdDate: '2022-04-11T13:49:37Z' - API key details with name: - value: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: azure-invoice-finance-processor - apiKey: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd - createdDate: '2022-04-11T13:49:37Z' + $ref: '#/components/schemas/CreateCustomerResponse' + examples: {} '400': - description: Bad Request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorMessage' - examples: - Max length for name reached: - value: - statusCode: 400 - service: PublicApi - error: Max string length (50) for `name` reached. - correlationId: bc997528a9d7abb9161ef45f05d38599 - canBeRetried: Unknown - detailedErrorCode: 0 + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': $ref: '#/components/responses/Payment-Required' '403': $ref: '#/components/responses/Forbidden' - '409': - description: Conflict - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorMessage' - examples: - Max length for name reached: - value: - statusCode: 400 - service: PublicApi - error: 'Maximum number of API keys reached. To create a new API key, delete an unused key and try again.' - correlationId: bc997528a9d7abb9161ef45f05d38599 - canBeRetried: Unknown - detailedErrorCode: 0 + '404': + $ref: '#/components/responses/Not-Found' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/apiKeys/{apiKeyId}': - delete: - summary: Delete API key - operationId: delete-api-key - x-speakeasy-name-override: delete-api-key - parameters: - - name: apiKeyId - in: path - required: true - schema: - type: string - example: 8a210b68-6988-11ed-a1eb-0242ac120002 - description: Unique identifier for api key. + operationId: create-customer description: |- - Use the *Delete API keys* endpoint to delete an existing API key, providing its valid `id` as a parameter. Note that this operation is not reversible. - - [API keys](https://docs.codat.io/platform-api#/schemas/apiKeys) are tokens used to control access to the API. Include this token in the `Authorization` header parameter when making API calls, following the word "Basic" and a space with your API key. + The *Create customer* endpoint creates a new [customer](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) for a given company's connection. - You can [read more](https://docs.codat.io/using-the-api/authentication) about authentication at Codat and managing API keys via the Portal UI or API. + [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - ### Tips and pitfalls + **Integration-specific behaviour** - * It is possible to delete the last remaining API key. If this happens, a new key can be created via the [API key management page](https://app.codat.io/developers/api-keys) of the Portal. - * It is possible to delete the API key used to authenticate the *Delete API key* request. + Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-customers-model). + '/companies/{companyId}/connections/{connectionId}/push/customers/{customerId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + - $ref: '#/components/parameters/customerId' + put: tags: - - Settings + - Customers + summary: Update customer + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + - $ref: '#/components/parameters/forceUpdate' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Customer' responses: - '204': - description: No Content - $ref: '#/components/responses/Too-Many-Requests' + '200': + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateCustomerResponse' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2174,117 +8536,799 @@ paths: $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/sync/{datasetId}/validation': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/datasetId' - get: - summary: Get validation results - tags: - - Read data - operationId: get-read-validation-results - x-speakeasy-name-override: get-validation-results description: |- - Use the **Get validation results** endpoint to review warnings and errors encountered during the data type validation phase. + The *Update customer* endpoint updates an existing [customer](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) for a given company's connection. - The validation result [schema](https://docs.codat.io/platform-api#/schemas/ValidationResult) contains two message arrays: + [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. - - **`warnings`** array lists potential issues with the data type that may require attention but don't block usage. - - **`errors`** array contains critical issues that must be resolved before the data type can be used. - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/ValidationResult' - examples: - Validation result: - value: - errors: - - ruleId: accounting-bill-030 - itemId: fc2f2d1a-ff4d-40c6-a7fb-4bd7d04f4008 - message: A bill's lines summed (69.99) should be the same as TotalAmount (70.00). - validatorName: BillValidator - warnings: - - ruleId: accounting-bill-032 - itemId: 1d3979e5-7c28-432e-b562-04e9013c1ea0 - message: A bill's lines sub total amount summed (3201.20) should be the same as SubTotal (3201.25) - validatorName: BillValidator - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/options/{dataType}': + **Integration-specific behaviour** + + Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-customers-model). + operationId: update-customer + '/companies/{companyId}/data/suppliers': parameters: - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - - $ref: '#/components/parameters/dataType' get: - summary: Get push options tags: - - Push data - operationId: get-create-update-model-options-by-data-type - x-speakeasy-name-override: get-model-options - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/PushOption' - examples: {} - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - description: "This is the generic documentation for creation and updating of data. See the equivalent endpoint for a given data type for more specific information. \n\nBefore pushing data into accounting software, it is often necessary to collect some details from the user as to how they would like the data to be inserted. This includes names and amounts on transactional entities, but also factors such as categorisation of entities, which is often handled differently between different accounting software. A good example of this is specifying where on the balance sheet/profit and loss reports the user would like a newly-created nominal account to appear.\n\nCodat tries not to limit users to pushing to a very limited number of standard categories, so we have implemented \"options\" endpoints, which allow us to expose to our clients the fields which are required to be pushed for a specific linked company, and the options which may be selected for each field." - '/companies/{companyId}/push': - parameters: - - $ref: '#/components/parameters/companyId' - get: + - Suppliers + summary: List suppliers parameters: - $ref: '#/components/parameters/page' - $ref: '#/components/parameters/pageSize' - $ref: '#/components/parameters/query' - $ref: '#/components/parameters/orderBy' - summary: List push operations - tags: - - Push data - operationId: get-company-push-history - x-speakeasy-name-override: list-operations - description: |- - The **List push operations** endpoint returns a list of [push operations](/using-the-api/push) performed on the company. - - Write operations are actions that send requests to Codat, enabling the creation, updating, deletion of records, or uploading attachments in the connected accounting software. responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/PushOperations' - examples: {} + $ref: '#/components/schemas/Suppliers' + examples: + Clear Books: + value: + results: + - id: owQ2Gqgj9f + supplierName: Abshire - Kshlerin + contactName: Faye Hansen + emailAddress: hello@Abshire-Kshlerin.info + phone: 01338 858162 + addresses: + - type: Delivery + line1: Suite 431 + line2: 289 Giles Lake + city: Cesarmouth + region: Northern Ireland + country: United Kingdom + postalCode: BG40 9GP + registrationNumber: VYL1XZXR + taxNumber: '1396267523.0914588' + status: Active + modifiedDate: '2023-04-26T12:38:17Z' + sourceModifiedDate: '1660-11-28T23:18:00' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: FyUkHbZxhn + supplierName: Arjun Kuvalis + contactName: Werner Langworth + emailAddress: Arjun34@hotmail.com + phone: 0116 796 3163 + addresses: + - type: Delivery + line1: Suite 214 + line2: 8439 Lueilwitz Passage + city: Fernandohaven + region: Northern Ireland + country: United Kingdom + postalCode: JG04 7PV + - type: Delivery + line1: Suite 096 + line2: 864 Halie Course + city: Juliochester + region: England + country: United Kingdom + postalCode: DZ8 4BF + - type: Delivery + line1: Suite 001 + line2: 416 Stokes Fords + city: Naderborough + region: Wales + country: United Kingdom + postalCode: XG25 0XX + registrationNumber: NI7JEJVM + taxNumber: '7505220209.583549' + status: Active + modifiedDate: '2023-04-26T12:38:17Z' + sourceModifiedDate: '0177-04-27T11:56:00' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 100 + _links: + current: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers?page=1&pageSize=2 + self: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers + next: + href: /companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers?page=2&pageSize=2 + Dynamics 365 Business Central: + value: + results: + - id: 78623f13-931e-eb11-bbf8-0022481b3585 + supplierName: '' + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:12Z' + sourceModifiedDate: '2020-11-04T11:44:22Z' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: be49ec62-6754-ed11-946f-0022481b67d1 + supplierName: '' + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:12Z' + sourceModifiedDate: '2022-10-25T13:17:36Z' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 31 + _links: + current: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers?page=1&pageSize=2 + self: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers + next: + href: /companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers?page=2&pageSize=2 + Exact (Netherlands): + value: + results: + - id: 3150917c-1d92-4d77-9018-31b5c4758ca9 + supplierName: Abe + contactName: Kelly's Contact Name + emailAddress: sales@kellysupplies.com + phone: 07999 999999 + addresses: + - type: Billing + line1: Unit 51 + city: Bakersfield + region: California + country: US + postalCode: '933081' + registrationNumber: '8409314368' + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2022-07-15T12:01:15Z' + defaultCurrency: EUR + - id: 00014c12-2616-481a-a2e8-31bdf2497775 + supplierName: Ann's test supplier 2 + contactName: Ann's contact name + emailAddress: anna@anna888888.com + phone: '55555555' + addresses: + - type: Billing + line1: line1 + line2: line2 + city: city + region: region + country: RU + postalCode: postal + registrationNumber: '55566677788899944455' + taxNumber: RU4444444 + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2021-06-09T12:04:08Z' + defaultCurrency: USD + pageNumber: 1 + pageSize: 2 + totalResults: 73 + _links: + current: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers?page=1&pageSize=2 + self: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers + next: + href: /companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers?page=2&pageSize=2 + Exact (UK): + value: + results: + - id: 0185fea2-0298-445b-909a-0db685118a9e + supplierName: a + addresses: + - type: Billing + country: GB + status: Active + modifiedDate: '2022-10-26T13:33:13Z' + sourceModifiedDate: '2017-08-02T10:58:54Z' + defaultCurrency: GBP + - id: 64ae712f-4155-48bb-9fce-98232c51d979 + supplierName: aa + addresses: + - type: Billing + country: GB + status: Active + modifiedDate: '2022-10-26T13:33:13Z' + sourceModifiedDate: '2020-05-01T14:05:46Z' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 118 + _links: + current: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers?page=1&pageSize=2 + self: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers + next: + href: /companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers?page=2&pageSize=2 + FreeAgent: + value: + results: + - id: '11526230' + supplierName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Active + modifiedDate: '2023-04-25T14:19:08Z' + sourceModifiedDate: '2023-04-17T06:02:46' + metadata: + isDeleted: false + - id: '9677150' + supplierName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Active + modifiedDate: '2023-04-25T14:19:08Z' + sourceModifiedDate: '2023-04-24T06:19:23' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 159 + _links: + current: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers?page=1&pageSize=2 + self: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers + next: + href: /companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers?page=2&pageSize=2 + FreshBooks: + value: + results: + - id: api vendor + supplierName: api vendor + addresses: [] + status: Active + modifiedDate: '2023-03-24T16:07:25Z' + metadata: + isDeleted: false + - id: DUndsRykrmy8kFsc+FvYk29YkJze4zSjGecoF4YcUEhVU7auJ5JkQA0VjXptZ7XQ+D4n6WoxFIkaGY2V/t4flA== + supplierName: 'Chekko Test merchant 100 - Test Very long name: ORIG CO NAME:AMERICAN EXPRESS ORIG ID:9493560001 DESC DATE:220307 CO ENTRY DESCR:ACH PMT SEC:CCD TRACE#:021000023255482 EED:220307 IND ID:A4670 IND NAME:Rick Sanchez' + addresses: [] + status: Active + modifiedDate: '2023-03-24T16:07:25Z' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 7 + _links: + current: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers?page=1&pageSize=2 + self: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers + next: + href: /companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers?page=2&pageSize=2 + KashFlow: + value: + results: + - id: '6202387' + supplierName: Dell + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + taxNumber: '' + status: Unknown + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '2017-05-09T00:00:00' + - id: '9338173' + supplierName: Home + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + taxNumber: '' + status: Unknown + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '1990-01-01T00:00:00' + pageNumber: 1 + pageSize: 2 + totalResults: 7 + _links: + current: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers?page=1&pageSize=2 + self: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers + next: + href: /companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers?page=2&pageSize=2 + Oracle NetSuite: + value: + results: + - id: '779' + supplierName: Test Vendor + contactName: Test Vendor + emailAddress: '' + phone: '' + addresses: [] + status: Active + modifiedDate: '2023-01-30T14:47:02Z' + sourceModifiedDate: '2022-02-04T14:24:43' + defaultCurrency: GBP + - id: '726' + supplierName: Vendor -.A + contactName: Vendor -.A + emailAddress: '' + phone: '' + addresses: [] + status: Active + modifiedDate: '2023-01-30T14:47:02Z' + sourceModifiedDate: '2021-03-26T09:53:15' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 6 + _links: + current: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers?page=1&pageSize=2 + self: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers + next: + href: /companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers?page=2&pageSize=2 + QuickBooks Desktop: + value: + results: + - id: A60000-1197760912 + supplierName: A Cheung Limited + contactName: Angela Cheung + emailAddress: AC@CheungLimited.com + phone: 510 555 5723 + addresses: + - type: Billing + line1: 'A Cheung Limited, Angela Cheung' + line2: 3818 Bear Rd. West + city: Berkeley + region: CA + postalCode: '94688' + status: Active + modifiedDate: '2023-04-26T09:09:03Z' + sourceModifiedDate: '2023-12-16T05:06:44' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: A40000-1197774038 + supplierName: Bank of Anycity + contactName: Lisa D. Holzhauser + emailAddress: lisah@samplename.com + phone: 415-555-9135 + addresses: + - type: Billing + line1: 'Bank of Anycity, Lisa Holzhauser' + line2: 1935 Main Street + city: Middlefield + region: CA + postalCode: '94482' + status: Active + modifiedDate: '2023-04-26T09:09:03Z' + sourceModifiedDate: '2023-12-16T05:06:44' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 54 + _links: + current: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers?page=1&pageSize=2 + self: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers + next: + href: /companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers?page=2&pageSize=2 + QuickBooks Online: + value: + results: + - id: '41' + supplierName: AI Support + contactName: AI Support + addresses: + - type: Billing + line1: test + region: string + country: Djibouti + status: Active + modifiedDate: '2023-01-18T11:02:36Z' + sourceModifiedDate: '2022-12-07T10:48:18Z' + defaultCurrency: GBP + - id: '42' + supplierName: AI Support 2 + contactName: AI Support 2 + addresses: + - type: Billing + line1: test + region: string + country: DJ + status: Active + modifiedDate: '2023-01-18T11:02:36Z' + sourceModifiedDate: '2021-08-31T08:45:02Z' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 23 + _links: + current: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers?page=1&pageSize=2 + self: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers + next: + href: /companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers?page=2&pageSize=2 + QuickBooks Online Sandbox: + value: + results: + - id: '129' + supplierName: Ally Johnson + contactName: Miss Smith + phone: 0728 38474 + addresses: + - type: Billing + line1: 100 London Road + line2: Angel + city: London + region: Greater London + country: England + postalCode: EC1M + status: Active + modifiedDate: '2023-04-26T09:35:55Z' + sourceModifiedDate: '2023-04-13T01:51:08Z' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: '88' + supplierName: Andrew Haberbosch + addresses: [] + status: Active + modifiedDate: '2023-04-26T09:35:55Z' + sourceModifiedDate: '2022-07-06T15:55:28Z' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 64 + _links: + current: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers?page=1&pageSize=2 + self: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers + next: + href: /companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers?page=2&pageSize=2 + Sage 200cloud: + value: + results: + - id: '776' + supplierName: Aaren + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Unknown + line1: '' + line2: '' + city: '' + region: '' + country: Great Britain + postalCode: '' + taxNumber: '' + status: Archived + modifiedDate: '2022-10-14T09:35:58Z' + defaultCurrency: GBP + metadata: + isDeleted: true + - id: '914' + supplierName: Aaren + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Unknown + line1: '' + line2: '' + city: '' + region: '' + country: Great Britain + postalCode: '' + taxNumber: '' + status: Archived + modifiedDate: '2022-10-14T09:35:58Z' + defaultCurrency: GBP + metadata: + isDeleted: true + pageNumber: 1 + pageSize: 2 + totalResults: 943 + _links: + current: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers?page=1&pageSize=2 + self: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers + next: + href: /companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers?page=2&pageSize=2 + Sage 50 (UK): + value: + results: + - id: CON001 + supplierName: Concept Stationery Supplies + contactName: Mark Ramsay + emailAddress: newbusinessadvice@sage.com + phone: 0191 643 4343 + addresses: + - type: Delivery + line1: 66 New Street + line2: Ridgeway + city: Newcastle Upon Tyne + region: '' + country: GB + postalCode: NE1 4GF + - type: Unknown + line1: 66 New Street + line2: Ridgeway + city: Newcastle upon Tyne + region: '' + country: GB + postalCode: NE1 4GF + taxNumber: GB988 3453 23 + status: Active + modifiedDate: '2023-03-30T14:42:38Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + defaultCurrency: GBP + metadata: + isDeleted: false + - id: MCN001 + supplierName: McNally Computer Supplies + contactName: Stuart Lynn + emailAddress: newbusinessadvice@sage.com + phone: 0191 415 3434 + addresses: + - type: Delivery + line1: Station Lane Ind Est + line2: Birtley + city: Chester le Street + region: County Durham + country: GB + postalCode: DH1 3RG + - type: Unknown + line1: Station Lane Ind Est + line2: Birtley + city: Chester le Street + region: County Durham + country: GB + postalCode: DH1 3RG + taxNumber: GB455 2385 34 + status: Active + modifiedDate: '2023-03-30T14:42:38Z' + sourceModifiedDate: '2022-12-05T13:37:26Z' + defaultCurrency: GBP + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 15 + _links: + current: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers?page=1&pageSize=2 + self: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers + next: + href: /companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers?page=2&pageSize=2 + Sage Business Cloud Accounting: + value: + results: + - id: 65179671e9ef424caff8b9006cd111c8 + supplierName: 5555 Abdul's Test Name + contactName: Main Contact + addresses: + - type: Billing + country: United Kingdom (GB) + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2020-02-25T17:23:33Z' + defaultCurrency: GBP + - id: cf7f44d693904944a6a7cf3de0887964 + supplierName: Abdi Supplier + contactName: Abdi + emailAddress: abdisupplier@company.com + addresses: + - type: Billing + line1: 1 Place House + city: London + country: United Kingdom (GB) + postalCode: WC1X 1AH + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2020-02-13T10:38:19Z' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 64 + _links: + current: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers?page=1&pageSize=2 + self: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers + next: + href: /companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers?page=2&pageSize=2 + Sage Intacct: + value: + results: + - id: '3' + supplierName: ADP + contactName: 'Jones, William' + phone: 214-760-9491 + addresses: + - type: Unknown + line1: 208 S Akard St + line2: '' + city: Dallas + region: TX + country: United States + postalCode: '75265' + registrationNumber: '' + taxNumber: 85-3678274 + status: Active + modifiedDate: '2023-04-04T16:32:20Z' + sourceModifiedDate: '2023-02-16T09:48:27' + defaultCurrency: USD + metadata: + isDeleted: false + - id: '29' + supplierName: Advisor Printing + contactName: 'Roach, Nathan' + phone: 130-202-4796 + addresses: + - type: Unknown + line1: 5 Carey Hill + line2: '' + city: Drayton Valley + region: Alberta + country: Canada + postalCode: G8V + registrationNumber: '' + taxNumber: '' + status: Active + modifiedDate: '2023-04-04T16:32:20Z' + sourceModifiedDate: '2022-06-15T11:38:29' + defaultCurrency: CAD + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 77 + _links: + current: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers?page=1&pageSize=2 + self: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers + next: + href: /companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers?page=2&pageSize=2 + Wave: + value: + results: + - id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0Nzk0 + supplierName: Computer Shop + contactName: '' + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-11-16T18:15:24Z' + sourceModifiedDate: '2020-04-07T13:28:02Z' + defaultCurrency: GBP + - id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0NzQx + supplierName: Flour Mill + contactName: '' + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-11-16T18:15:24Z' + sourceModifiedDate: '2020-04-07T13:12:40Z' + defaultCurrency: GBP + pageNumber: 1 + pageSize: 2 + totalResults: 9 + _links: + current: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers?page=1&pageSize=2 + self: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers + next: + href: /companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers?page=2&pageSize=2 + Xero: + value: + results: + - id: e4c9d0e2-c285-4e85-b579-6d28b180c730 + supplierName: 24 Locks + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2023-03-15T20:36:09Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + - id: bab779bc-c5fb-42cb-a888-953e8309711c + supplierName: 7-Eleven + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2023-03-15T20:36:09Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + pageNumber: 1 + pageSize: 2 + totalResults: 48 + _links: + current: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers?page=1&pageSize=2 + self: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers + next: + href: /companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers?page=2&pageSize=2 + Zoho Books: + value: + results: + - id: '104957000001494001' + supplierName: Acme Corporation + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-09-16T13:09:56' + defaultCurrency: GBP + - id: '104957000000648001' + supplierName: Cool company + contactName: Dre + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-06-10T09:07:16' + defaultCurrency: CAD + pageNumber: 1 + pageSize: 2 + totalResults: 6 + _links: + current: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers?page=1&pageSize=2 + self: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers + next: + href: /companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers?page=2&pageSize=2 '400': $ref: '#/components/responses/Malformed-Query' '401': @@ -2295,326 +9339,327 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/Not-Found' + '409': + $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/push/{pushOperationKey}': + description: "The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection.\n\n[Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.\n\nBefore using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data).\n " + operationId: list-suppliers + '/companies/{companyId}/data/suppliers/{supplierId}': parameters: - $ref: '#/components/parameters/companyId' - - schema: - type: string - format: uuid - name: pushOperationKey - in: path - required: true - description: Push operation key. - get: - summary: Get push operation - tags: - - Push data - operationId: get-push-operation - x-speakeasy-name-override: get-operation - description: |- - The **Get push operation** endpoint returns a specific [push operation](/using-the-api/push) identified by the `pushOperationKey` that was performed on the company. - - Write operations are actions that send requests to Codat, enabling the creation, updating, deletion of records, or uploading attachments in the connected accounting software. - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/PushOperation' - examples: {} - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/integrations/{platformKey}/dataTypes/{dataType}/supplementalDataConfig': - parameters: - - $ref: '#/components/parameters/platformKey' - - name: dataType - in: path - required: true - description: Supported supplemental data data type. - schema: - x-internal: true - type: string - description: Data types that support supplemental data - enum: - - chartOfAccounts - - bills - - company - - creditNotes - - customers - - invoices - - items - - journalEntries - - suppliers - - taxRates - - commerce-companyInfo - - commerce-customers - - commerce-disputes - - commerce-locations - - commerce-orders - - commerce-payments - - commerce-paymentMethods - - commerce-products - - commerce-productCategories - - commerce-taxComponents - - commerce-transactions - example: invoices - put: - summary: Configure - description: |- - The *Configure* endpoint allows you to maintain or change configuration required to return supplemental data for each integration and data type combination. - - [Supplemental data](https://docs.codat.io/using-the-api/supplemental-data/overview) is additional data you can include in Codat's standard data types. - - **Integration-specific behaviour** - See the *examples* for integration-specific frequently requested properties. - operationId: configure-supplemental-data - x-speakeasy-name-override: configure - tags: - - Supplemental data - responses: - '200': - description: OK - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/SupplementalDataConfiguration' - examples: - Xero - Accounts: - value: - yourKeyNameForAccounts: - dataSource: /Accounts - pullData: - yourNameForTaxType: TaxType - yourNameForSystemAccount: SystemAccount - Xero - Invoices: - value: - yourKeyNameForInvoices: - dataSource: /Invoices - pullData: - yourNameForExpectedPaymentDate: ExpectedPaymentDate - yourNameForHasAttachments: HasAttachments - Xero - Items: - value: - yourKeyNameForItems: - dataSource: /Items - pullData: - yourNameForQuantityOnHand: QuantityOnHand - yourNameForTotalCostPool: TotalCostPool - Xero - Contacts: - value: - yourKeyNameForContacts: - dataSource: /Contacts - pullData: - yourNameForBankAccounts: BankAccountDetails - Xero - Tax rates: - value: - yourKeyNameForTaxRates: - dataSource: /TaxRates - pullData: - yourNameForCanApplyToLiabilities: CanApplyToLiabilities - yourNameForCanApplyToAssets: CanApplyToAssets - yourNameForCanApplyToEquity: CanApplyToEquity - yourNameForCanApplyToExpenses: CanApplyToExpenses - yourNameForCanApplyToRevenue: CanApplyToRevenue - QBO - Customers: - value: - yourKeyNameForCustomers: - dataSource: /Customer - pullData: - yourNameForSalesTermRef: SalesTermRef.value - yourNameForParentRef: ParentRef.value - QBO - Invoices: - value: - yourKeyNameForInvoices: - dataSource: /Invoice - pullData: - yourNameForSalesTermRef: SalesTermRef.value - description: The configuration for the specified platform and data type. + - $ref: '#/components/parameters/supplierId' get: - summary: Get configuration - description: |- - The *Get configuration* endpoint returns supplemental data configuration previously created for each integration and data type combination. - - [Supplemental data](https://docs.codat.io/using-the-api/supplemental-data/overview) is additional data you can include in Codat's standard data types. - operationId: get-supplemental-data-configuration - x-speakeasy-name-override: get-configuration tags: - - Supplemental data + - Suppliers + summary: Get supplier responses: '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/SupplementalDataConfiguration' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/integrations/{platformKey}/dataTypes/custom/{customDataIdentifier}': - parameters: - - $ref: '#/components/parameters/platformKey' - - $ref: '#/components/parameters/customDataIdentifier' - put: - summary: Configure custom data type - description: "The *Configure custom data type* endpoint allows you to maintain or change the configuration required to return a custom data type for a specific integration. \n\nA [custom data type](https://docs.codat.io/using-the-api/custom-data) is an additional data type you can create that is not included in Codat's standardized data model.\n\n### Tips and traps\n\n- You can only configure a single custom data type for a single platform at a time. Use the endpoint multiple times if you need to configure it for multiple platforms. \n\n- You can only indicate a single data source for each customer data type. \n\n- Make your custom configuration as similar as possible to our standard data types so you can interact with them in exactly the same way." - operationId: configure-custom-data-type - x-speakeasy-name-override: configure - tags: - - Custom data type - requestBody: - description: Custom data type configuration for the specified platform. - content: - application/json: - schema: - $ref: '#/components/schemas/CustomDataTypeConfiguration' - examples: - Dynamics 365 Business Central: - value: - dataSource: api/purchaseOrders - requiredData: - currency: '$[*].currencyCode' - number: '$[*].number' - date: '$[*].orderDate' - totalexvat: '$[*].totalAmountExcludingTax' - totaltax: '$[*].totalTaxAmount' - vendor: '$[*].number' - keyBy: - - '$[*].id' - sourceModifiedDate: - - '$[*].lastModifiedDateTime' - Xero Simple Record: - value: - dataSource: /api.xro/2.0/Accounts - requiredData: - code: $.Code - accountId: $.AccountID - type: $.Type - SysAcc: $.SystemAccount - keyBy: - - $.AccountID - Xero Mapping Arrays: - value: - dataSource: /api.xro/2.0/Invoices - requiredData: - invNumber: $.InvoiceNumber - type: $.Type - InvoiceID: $.InvoiceID - lines: '$.LineItems[*]' - keyBy: - - $.InvoiceID - sourceModifiedDate: - - $.UpdatedDateUTC - QuickBooks Online: - value: - dataSource: /query?query=select * from Account - requiredData: - id: $.Id - Currentbal: $.CurrentBalance - SubAcc: $.SubAccount - keyBy: - - $.Id - sourceModifiedDate: - - $.time - responses: - '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/CustomDataTypeConfiguration' + $ref: '#/components/schemas/Supplier' examples: + Clear Books: + value: + id: owQ2Gqgj9f + supplierName: Abshire - Kshlerin + contactName: Faye Hansen + emailAddress: hello@Abshire-Kshlerin.info + phone: 01338 858162 + addresses: + - type: Delivery + line1: Suite 431 + line2: 289 Giles Lake + city: Cesarmouth + region: Northern Ireland + country: United Kingdom + postalCode: BG40 9GP + registrationNumber: VYL1XZXR + taxNumber: '1396267523.0914588' + status: Active + modifiedDate: '2023-04-26T12:38:17Z' + sourceModifiedDate: '1660-11-28T23:18:00' + defaultCurrency: GBP + metadata: + isDeleted: false Dynamics 365 Business Central: value: - dataSource: api/purchaseOrders - requiredData: - currency: '$[*].currencyCode' - number: '$[*].number' - date: '$[*].orderDate' - totalexvat: '$[*].totalAmountExcludingTax' - totaltax: '$[*].totalTaxAmount' - vendor: '$[*].number' - keyBy: - - '$[*].id' - sourceModifiedDate: - - '$[*].lastModifiedDateTime' - Xero Simple Record: + id: 78623f13-931e-eb11-bbf8-0022481b3585 + supplierName: '' + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Billing + line1: '' + line2: '' + city: '' + region: '' + country: GB + postalCode: '' + taxNumber: '' + status: Active + modifiedDate: '2023-03-27T14:21:12Z' + sourceModifiedDate: '2020-11-04T11:44:22Z' + defaultCurrency: GBP + metadata: + isDeleted: false + Exact (Netherlands): + value: + id: 3150917c-1d92-4d77-9018-31b5c4758ca9 + supplierName: Abe + contactName: Kelly's Contact Name + emailAddress: sales@kellysupplies.com + phone: 07999 999999 + addresses: + - type: Billing + line1: Unit 51 + city: Bakersfield + region: California + country: US + postalCode: '933081' + registrationNumber: '8409314368' + status: Active + modifiedDate: '2022-10-26T13:32:05Z' + sourceModifiedDate: '2022-07-15T12:01:15Z' + defaultCurrency: EUR + Exact (UK): + value: + id: 0185fea2-0298-445b-909a-0db685118a9e + supplierName: a + addresses: + - type: Billing + country: GB + status: Active + modifiedDate: '2022-10-26T13:33:13Z' + sourceModifiedDate: '2017-08-02T10:58:54Z' + defaultCurrency: GBP + FreeAgent: + value: + id: '11526230' + supplierName: '-' + contactName: Test 1 + addresses: + - type: Billing + line1: 1 Place House + line2: '' + city: London + country: United Kingdom + postalCode: WC1X 1AH + status: Active + modifiedDate: '2023-04-25T14:19:08Z' + sourceModifiedDate: '2023-04-17T06:02:46' + metadata: + isDeleted: false + FreshBooks: + value: + id: api vendor + supplierName: api vendor + addresses: [] + status: Active + modifiedDate: '2023-03-24T16:07:25Z' + metadata: + isDeleted: false + KashFlow: value: - dataSource: /api.xro/2.0/Accounts - requiredData: - code: $.Code - accountId: $.AccountID - type: $.Type - SysAcc: $.SystemAccount - keyBy: - - $.AccountID - Xero Mapping Arrays: + id: '6202387' + supplierName: Dell + contactName: '' + emailAddress: '' + phone: '' + addresses: [] + taxNumber: '' + status: Unknown + modifiedDate: '2022-09-30T10:29:15Z' + sourceModifiedDate: '2017-05-09T00:00:00' + Oracle NetSuite: value: - dataSource: /api.xro/2.0/Invoices - requiredData: - invNumber: $.InvoiceNumber - type: $.Type - InvoiceID: $.InvoiceID - lines: '$.LineItems[*]' - keyBy: - - $.InvoiceID - sourceModifiedDate: - - $.UpdatedDateUTC + id: '779' + supplierName: Test Vendor + contactName: Test Vendor + emailAddress: '' + phone: '' + addresses: [] + status: Active + modifiedDate: '2023-01-30T14:47:02Z' + sourceModifiedDate: '2022-02-04T14:24:43' + defaultCurrency: GBP + QuickBooks Desktop: + value: + id: A60000-1197760912 + supplierName: A Cheung Limited + contactName: Angela Cheung + emailAddress: AC@CheungLimited.com + phone: 510 555 5723 + addresses: + - type: Billing + line1: 'A Cheung Limited, Angela Cheung' + line2: 3818 Bear Rd. West + city: Berkeley + region: CA + postalCode: '94688' + status: Active + modifiedDate: '2023-04-26T09:09:03Z' + sourceModifiedDate: '2023-12-16T05:06:44' + defaultCurrency: GBP + metadata: + isDeleted: false QuickBooks Online: value: - dataSource: /query?query=select * from Account - requiredData: - id: $.Id - Currentbal: $.CurrentBalance - SubAcc: $.SubAccount - keyBy: - - $.Id - sourceModifiedDate: - - $.time + id: '41' + supplierName: AI Support + contactName: AI Support + addresses: + - type: Billing + line1: test + region: string + country: Djibouti + status: Active + modifiedDate: '2023-01-18T11:02:36Z' + sourceModifiedDate: '2022-12-07T10:48:18Z' + defaultCurrency: GBP + QuickBooks Online Sandbox: + value: + id: '129' + supplierName: Ally Johnson + contactName: Miss Smith + phone: 0728 38474 + addresses: + - type: Billing + line1: 100 London Road + line2: Angel + city: London + region: Greater London + country: England + postalCode: EC1M + status: Active + modifiedDate: '2023-04-26T09:35:55Z' + sourceModifiedDate: '2023-04-13T01:51:08Z' + defaultCurrency: GBP + metadata: + isDeleted: false + Sage 200cloud: + value: + id: '776' + supplierName: Aaren + contactName: '' + emailAddress: '' + phone: '' + addresses: + - type: Unknown + line1: '' + line2: '' + city: '' + region: '' + country: Great Britain + postalCode: '' + taxNumber: '' + status: Archived + modifiedDate: '2022-10-14T09:35:58Z' + defaultCurrency: GBP + metadata: + isDeleted: true + Sage 50 (UK): + value: + id: CON001 + supplierName: Concept Stationery Supplies + contactName: Mark Ramsay + emailAddress: newbusinessadvice@sage.com + phone: 0191 643 4343 + addresses: + - type: Delivery + line1: 66 New Street + line2: Ridgeway + city: Newcastle Upon Tyne + region: '' + country: GB + postalCode: NE1 4GF + - type: Unknown + line1: 66 New Street + line2: Ridgeway + city: Newcastle upon Tyne + region: '' + country: GB + postalCode: NE1 4GF + taxNumber: GB988 3453 23 + status: Active + modifiedDate: '2023-03-30T14:42:38Z' + sourceModifiedDate: '2022-11-25T09:43:54Z' + defaultCurrency: GBP + metadata: + isDeleted: false + Sage Business Cloud Accounting: + value: + id: 65179671e9ef424caff8b9006cd111c8 + supplierName: 5555 Abdul's Test Name + contactName: Main Contact + addresses: + - type: Billing + country: United Kingdom (GB) + status: Active + modifiedDate: '2022-10-24T14:52:54Z' + sourceModifiedDate: '2020-02-25T17:23:33Z' + defaultCurrency: GBP + Sage Intacct: + value: + id: '3' + supplierName: ADP + contactName: 'Jones, William' + phone: 214-760-9491 + addresses: + - type: Unknown + line1: 208 S Akard St + line2: '' + city: Dallas + region: TX + country: United States + postalCode: '75265' + registrationNumber: '' + taxNumber: 85-3678274 + status: Active + modifiedDate: '2023-04-04T16:32:20Z' + sourceModifiedDate: '2023-02-16T09:48:27' + defaultCurrency: USD + metadata: + isDeleted: false + Wave: + value: + id: QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0Nzk0 + supplierName: Computer Shop + contactName: '' + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-11-16T18:15:24Z' + sourceModifiedDate: '2020-04-07T13:28:02Z' + defaultCurrency: GBP + Xero: + value: + id: e4c9d0e2-c285-4e85-b579-6d28b180c730 + supplierName: 24 Locks + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2023-03-15T20:36:09Z' + sourceModifiedDate: '2023-02-17T18:03:42' + metadata: + isDeleted: false + Zoho Books: + value: + id: '104957000001494001' + supplierName: Acme Corporation + emailAddress: '' + addresses: [] + status: Active + modifiedDate: '2022-10-03T08:40:37Z' + sourceModifiedDate: '2022-09-16T13:09:56' + defaultCurrency: GBP '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2623,104 +9668,53 @@ paths: $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/Not-Found' + '409': + $ref: '#/components/responses/Conflict' '429': $ref: '#/components/responses/Too-Many-Requests' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' - get: - summary: Get custom data configuration - description: |- - The *Get custom data configuration* endpoint returns existing configuration details for the specified custom data type and integration pair you previously configured. + description: | + The *Get supplier* endpoint returns a single supplier for a given supplierId. - A [custom data type](https://docs.codat.io/using-the-api/custom-data) is an additional data type you can create that is not included in Codat's standardized data model. - operationId: get-custom-data-type-configuration - x-speakeasy-name-override: get-configuration - tags: - - Custom data type - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/CustomDataTypeRecords' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/data/queue/custom/{customDataIdentifier}': + [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + + Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). + operationId: get-supplier + '/companies/{companyId}/connections/{connectionId}/push/suppliers': parameters: - $ref: '#/components/parameters/companyId' - $ref: '#/components/parameters/connectionId' - - $ref: '#/components/parameters/customDataIdentifier' post: - summary: Refresh custom data type - description: The *Refresh custom data type* endpoint refreshes the specified custom data type for a given company. This is an asynchronous operation that will sync updated data from the linked integration into Codat for you to view. - operationId: refresh-custom-data-type - x-speakeasy-name-override: refresh tags: - - Custom data type - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/PullOperation' - '401': - $ref: '#/components/responses/Unauthorized' - '402': - $ref: '#/components/responses/Payment-Required' - '403': - $ref: '#/components/responses/Forbidden' - '404': - $ref: '#/components/responses/Not-Found' - '429': - $ref: '#/components/responses/Too-Many-Requests' - '451': - $ref: '#/components/responses/Legal-Reasons' - '500': - $ref: '#/components/responses/Internal-Server-Error' - '503': - $ref: '#/components/responses/Service-Unavailable' - '/companies/{companyId}/connections/{connectionId}/data/custom/{customDataIdentifier}': - parameters: - - $ref: '#/components/parameters/companyId' - - $ref: '#/components/parameters/connectionId' - - $ref: '#/components/parameters/customDataIdentifier' - get: - summary: List custom data type records - description: |- - The *List custom data type records* endpoint returns a paginated list of records pulled for the specified custom data type you previously configured. - - A [custom data type](https://docs.codat.io/using-the-api/custom-data) is an additional data type you can create that is not included in Codat's standardized data model.s endpoint returns a paginated list of records whose schema is defined [Configure custom data type](https://docs.codat.io/platform-api#/operations/configure-custom-data-type) - operationId: list-custom-data-type-records + - Suppliers parameters: - - $ref: '#/components/parameters/page' - - $ref: '#/components/parameters/pageSize' - tags: - - Custom data type + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Supplier' + examples: + Sage Intacct: + value: + id: '73593' + supplierName: test 20230420 1004 + contactName: Joe Bloggs + status: Active responses: '200': - description: OK + description: Success content: application/json: schema: - $ref: '#/components/schemas/CustomDataTypeRecords' + $ref: '#/components/schemas/CreateSupplierResponse' + examples: {} '400': - $ref: '#/components/responses/Bad-Request' + $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '402': @@ -2731,503 +9725,148 @@ paths: $ref: '#/components/responses/Not-Found' '429': $ref: '#/components/responses/Too-Many-Requests' - '451': - $ref: '#/components/responses/Legal-Reasons' '500': $ref: '#/components/responses/Internal-Server-Error' '503': $ref: '#/components/responses/Service-Unavailable' -webhooks: - company.created: - post: - description: Called when a company is created in Codat. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CompanyWebhook' - examples: - Company created: - value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: company.created - generatedDate: '2024-08-08T17:10:34.015Z' - payload: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: Requested a loan for refurb. - redirect: 'https://link.codat.io/company/0498e921-9b53-4396-a412-4f2f5983b0a2' - lastSync: '2022-01-01T12:00:00.000Z' - created: '2022-01-01T12:00:00.000Z' - tags: - customerRegion: us - uid: 335a086e-8563-4b03-94e3-39544225ecb6 - responses: - '200': - description: Return a 200 status to indicate that the webhook was received successfully. - company.deleted: - post: - description: Called when a company is deleted in Codat. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CompanyWebhook' - examples: - Company deleted: - value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: company.deleted - generatedDate: '2024-08-08T17:10:34.015Z' - payload: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: Requested a loan for refurb. - redirect: 'https://link.codat.io/company/0498e921-9b53-4396-a412-4f2f5983b0a2' - lastSync: '2022-01-01T12:00:00.000Z' - created: '2022-01-01T12:00:00.000Z' - tags: - customerRegion: uk - uid: f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c - responses: - '200': - description: Return a 200 status to indicate that the webhook was received successfully. - connection.created: - post: - description: Called when a connection is created by the SMB. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectionWebhook' - examples: - Connection created: - value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: connection.created - generatedDate: '2024-08-08T17:10:34.015Z' - payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: internal_id_mxO7rLfo - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - tags: - customerRegion: us - uid: 335a086e-8563-4b03-94e3-39544225ecb6 - connection: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: PendingAuth - lastSync: 2022-10-27T10:22:43.646Z - created: 2022-10-27T09:53:29.000Z - sourceType: Banking - responses: - '200': - description: Return a 200 status to indicate that the webhook was received successfully. - connection.connected: - post: - description: Called when a connection is successfully linked by the SMB. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectionWebhook' - examples: - Connection connected: - value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: connection.connected - generatedDate: '2024-08-08T17:10:34.015Z' - payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: internal_id_mxO7rLfo - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - tags: - customerRegion: us - uid: 335a086e-8563-4b03-94e3-39544225ecb6 - connection: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Linked - lastSync: 2022-10-27T10:22:43.646Z - created: 2022-10-27T09:53:29.000Z - sourceType: Banking - responses: - '200': - description: Return a 200 status to indicate that the webhook was received successfully. - connection.failed: - post: - description: Called when a connection failed linking to the SMB. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectionWebhook' - examples: - Connection failed: - value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: connection.failed - generatedDate: '2024-08-08T17:10:34.015Z' - payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: internal_id_mxO7rLfo - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - tags: - customerRegion: us - uid: 335a086e-8563-4b03-94e3-39544225ecb6 - connection: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: PendingAuth - created: 2022-10-27T09:53:29.000Z - sourceType: Banking - dataConnectionErrors: - - statusCode: '403' - statusText: User cancelled linking - errorMessage: User cancelled - erroredOnUtc: 2022-10-27T09:53:29.000Z - status: Active - responses: - '200': - description: Return a 200 status to indicate that the webhook was received successfully. - connection.disconnected: - post: - description: Called when a connection is disconnected either due to being unlinked or de-authorized by the SMB or integration. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectionWebhook' - examples: - Unlinked: - value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: connection.disconnected - generatedDate: '2024-08-08T17:10:34.015Z' - payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: internal_id_mxO7rLfo - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - tags: - customerRegion: us - uid: 335a086e-8563-4b03-94e3-39544225ecb6 - connection: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Unlinked - lastSync: 2022-10-27T10:22:43.646Z - created: 2022-10-27T09:53:29.000Z - sourceType: Banking - De-authorized: - value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: connection.disconnected - generatedDate: '2024-08-08T17:10:34.015Z' - payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: internal_id_mxO7rLfo - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - tags: - customerRegion: us - uid: 335a086e-8563-4b03-94e3-39544225ecb6 - connection: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Deauthorized - lastSync: 2022-10-27T10:22:43.646Z - created: 2022-10-27T09:53:29.000Z - sourceType: Banking - dataConnectionErrors: - - statusCode: '401' - statusText: The integration de-authorized access to the connection. - errorMessage: The integration de-authorized access to the connection. - erroredOnUtc: 2022-12-27T09:53:29.000Z - status: Active - responses: - '200': - description: Return a 200 status to indicate that the webhook was received successfully. - connection.reconnected: - post: - description: Called when a connection is reconnected after becoming disconnected. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectionWebhook' - examples: - Reconnected: - value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: connection.reconnected - generatedDate: '2024-08-08T17:10:34.015Z' - payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: internal_id_mxO7rLfo - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - tags: - customerRegion: us - uid: 335a086e-8563-4b03-94e3-39544225ecb6 - connection: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Linked - lastSync: 2022-10-27T10:22:43.646Z - created: 2022-10-27T09:53:29.000Z - sourceType: Banking - responses: - '200': - description: Return a 200 status to indicate that the webhook was received successfully. - connection.deleted: - post: - description: Called when a connection is deleted. + summary: Create supplier + description: "The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection.\r\n\r\n[Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.\r\n\r\n**Integration-specific behaviour**\r\n\r\nRequired data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-suppliers-model).\r\n" + operationId: create-supplier + '/companies/{companyId}/connections/{connectionId}/push/suppliers/{supplierId}': + parameters: + - $ref: '#/components/parameters/companyId' + - $ref: '#/components/parameters/connectionId' + - $ref: '#/components/parameters/supplierId' + put: + tags: + - Suppliers + parameters: + - $ref: '#/components/parameters/timeoutInMinutes' + - $ref: '#/components/parameters/allowSyncOnPushComplete' + - $ref: '#/components/parameters/forceUpdate' requestBody: content: application/json: schema: - $ref: '#/components/schemas/ConnectionWebhook' - examples: - Deleted: - value: - id: ba29118f-5406-4e59-b05c-ba307ca38d01 - eventType: connection.deleted - generatedDate: '2024-08-08T17:10:34.015Z' - payload: - referenceCompany: - id: 0498e921-9b53-4396-a412-4f2f5983b0a2 - name: Bank of Dave - description: internal_id_mxO7rLfo - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - tags: - customerRegion: us - uid: 335a086e-8563-4b03-94e3-39544225ecb6 - connection: - id: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd - integrationId: bf083d72-62c7-493e-aec9-81b4dbba7e2c - integrationKey: dfxm - sourceId: bdd831ce-eebd-4896-89a7-20e5ee8989ee - platformName: Basiq - linkUrl: 'https://link-api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start' - status: Linked - lastSync: 2022-10-27T10:22:43.646Z - created: 2022-10-27T09:53:29.000Z - sourceType: Banking + $ref: '#/components/schemas/Supplier' responses: '200': - description: Return a 200 status to indicate that the webhook was received successfully. - read.completed: + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateSupplierResponse' + examples: {} + '400': + $ref: '#/components/responses/BadRequest' + '401': + $ref: '#/components/responses/Unauthorized' + '402': + $ref: '#/components/responses/Payment-Required' + '403': + $ref: '#/components/responses/Forbidden' + '404': + $ref: '#/components/responses/Not-Found' + '429': + $ref: '#/components/responses/Too-Many-Requests' + '500': + $ref: '#/components/responses/Internal-Server-Error' + '503': + $ref: '#/components/responses/Service-Unavailable' + summary: Update supplier + description: "The *Update supplier* endpoint updates an existing [supplier](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection.\r\n\r\n[Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service.\r\n\r\n**Integration-specific behaviour**\r\n\r\nRequired data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-suppliers-model)." + operationId: update-supplier +webhooks: + expenses.sync.successful: post: - description: Called when the fetch of data types for a product has completed. + description: Called when an expense sync successfully completes without any errors or warnings. requestBody: content: application/json: schema: - $ref: '#/components/schemas/ReadCompletedWebhook' + $ref: '#/components/schemas/ExpensesSyncWebhook' examples: - Read completed: + Successful: value: - id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - eventType: read.completed - generatedDate: 2022-10-23T00:00:00.000Z + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: expenses.sync.successful + generatedDate: '2024-09-01T00:00:00Z' payload: referenceCompany: id: 0498e921-9b53-4396-a412-4f2f5983b0a2 name: Toft stores - description: Requested early access to the new financing scheme. - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - modifiedFromDate: 2022-10-23T00:00:00.000Z - dataTypes: - - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 - dataType: invoices - recordsModified: false - status: Complete + description: Syncing expenses + syncId: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd + transactions: + - id: f47ac10b-58cc-4372-a567-0e02b2c3d479 + status: Completed + errorMessage: null + - id: e7f8a3d5-0c3c-4c9b-b5d3-56b4a43b62e4 + status: Completed + errorMessage: null responses: '200': description: Return a 200 status to indicate that the webhook was received successfully. - read.completed.initial: + expenses.sync.unsuccessful: post: - description: Called when the initial fetch of data types for a product has been completed. + description: 'Called when an expense sync fails to complete successfully, resulting in at least one error or warning.' requestBody: content: application/json: schema: - $ref: '#/components/schemas/ReadCompletedWebhook' + $ref: '#/components/schemas/ExpensesSyncWebhook' examples: - Initial: + Unsuccessful: value: - id: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - eventType: read.completed.initial - generatedDate: 2022-10-23T00:00:00.000Z + id: ba29118f-5406-4e59-b05c-ba307ca38d01 + eventType: expenses.sync.unsuccessful + generatedDate: '2024-09-01T00:00:00Z' payload: referenceCompany: id: 0498e921-9b53-4396-a412-4f2f5983b0a2 name: Toft stores - description: Requested early access to the new financing scheme. - links: - portal: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/summary' - modifiedFromDate: 2022-10-23T00:00:00.000Z - dataTypes: - - connectionId: 2e9d2c44-f675-40ba-8049-353bfcb5e171 - dataType: invoices - recordsModified: false - status: Complete + description: Syncing expenses + syncId: ee2eb431-c0fa-4dc9-93fa-d29781c12bcd + transactions: + - id: f47ac10b-58cc-4372-a567-0e02b2c3d479 + status: Completed + errorMessage: null + - id: e7f8a3d5-0c3c-4c9b-b5d3-56b4a43b62e4 + status: Failed + errorMessage: Insufficient funds responses: '200': description: Return a 200 status to indicate that the webhook was received successfully. - '{dataType}.write.successful': + SyncCompleted: post: - description: "Indicates that a `dataType` has been successfully created, updated, deleted, or had an attachment uploaded in the accounting software.\n\nCodat now refers to push operations as write requests.\n\nFor example, to subscribe to events where a bill is written into the accounting software, use the `bills.write.successful` webhook.\n\n### Supported data types and write types\n\n| `dataType` | Create | Update | Delete | UploadAttachment |\n|------------------|---------|---------|---------|------------------|\n| bankAccounts | ✅ | ✅ | - | - | \n| bankTransactions | ✅ | - | - | - |\n| billCreditNotes | ✅ | ✅ | - | ✅ | \n| billPayments | ✅ | - | ✅ | - | \n| bills | ✅ | ✅ | ✅ | ✅ | \n| chartOfAccounts | ✅ | - | - | - | \n| creditNotes | ✅ | ✅ | - | - | \n| customers | ✅ | ✅ | - | - | \n| directCosts | ✅ | - | ✅ | ✅ | \n| directIncomes | ✅ | - | - | ✅ | \n| invoices | ✅ | ✅ | ✅ | ✅ | \n| items | ✅ | - | - | - | \n| journalEntries | ✅ | - | ✅ | - | \n| journals | ✅ | - | - | - | \n| payments | ✅ | - | - | - | \n| purchaseOrders | ✅ | ✅ | - | - | \n| suppliers | ✅ | ✅ | - | - | \n| transfers | ✅ | - | - | ✅ | \n" + deprecated: true + description: |- + Triggered anytime an expense sync completes. Used for Sync for Expenses only. + + > This event type is deprecated. Use the `expenses.sync.successful` to get notified when an expense sync completes successfully. requestBody: content: application/json: schema: - $ref: '#/components/schemas/DataTypeWriteWebhook' - examples: - Record: - value: - id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 - eventType: '{dataType}.write.successful' - generatedDate: 2023-05-03T10:00:23.000Z - payload: - id: a9367074-b5c3-42c4-9be4-be129f43577e - type: Create - referenceCompany: - id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac - name: Toft stores - description: cust_1MtJUT2eZvKYlo2CNaw2HvEv - connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 - requestedOnDate: 2023-05-03T10:00:00.000Z - completedOnDate: 2023-05-03T10:00:23.000Z - status: Success - record: - id: bil_1Nispe2eZvKYlo2Cd31jOCgZ - Attachment: - value: - id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 - eventType: '{dataType}.write.successful' - generatedDate: 2023-05-03T10:00:23.000Z - payload: - id: a9367074-b5c3-42c4-9be4-be129f43577e - type: UploadAttachment - referenceCompany: - id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac - name: Toft stores - description: cust_1MtJUT2eZvKYlo2CNaw2HvEv - connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 - requestedOnDate: 2023-05-03T10:00:00.000Z - completedOnDate: 2023-05-03T10:00:23.000Z - status: Success - record: - id: bil_1Nispe2eZvKYlo2Cd31jOCgZ - attachmentId: att_1AZtxr2eZvKYlo2CJDX8whov + $ref: '#/components/schemas/SyncCompleteWebhook' responses: '200': - description: Return a 200 status to indicate that the webhook was received. - '{dataType}.write.unsuccessful': + description: Return a 200 status to indicate that the webhook was received successfully. + SyncFailed: post: - description: "Indicates that a `dataType` has not been successfully created, updated, deleted, or had an attachment uploaded in the accounting software.\n\nCodat now refers to push operations as write requests.\n\nFor example, to subscribe to events where a bill is written into the accounting software, use the `bills.write.unsuccessful` webhook.\n\n### Supported data types and write types\n\n| `dataType` | Create | Update | Delete | UploadAttachment |\n|------------------|---------|---------|---------|------------------|\n| bankAccounts | ✅ | ✅ | - | - | \n| bankTransactions | ✅ | - | - | - |\n| billCreditNotes | ✅ | ✅ | - | ✅ | \n| billPayments | ✅ | - | ✅ | - | \n| bills | ✅ | ✅ | ✅ | ✅ | \n| chartOfAccounts | ✅ | - | - | - | \n| creditNotes | ✅ | ✅ | - | - | \n| customers | ✅ | ✅ | - | - | \n| directCosts | ✅ | - | ✅ | ✅ | \n| directIncomes | ✅ | - | - | ✅ | \n| invoices | ✅ | ✅ | ✅ | ✅ | \n| items | ✅ | - | - | - | \n| journalEntries | ✅ | - | ✅ | - | \n| journals | ✅ | - | - | - | \n| payments | ✅ | - | - | - | \n| purchaseOrders | ✅ | ✅ | - | - | \n| suppliers | ✅ | ✅ | - | - | \n| transfers | ✅ | - | - | ✅ | \n" + deprecated: true + description: |- + Indicates a failure occurred during an expense sync. Used for Sync for Expenses only. + + > This event type is deprecated. Use the `expenses.sync.unsuccessful` to get notified when an expense sync completes unsuccessfully. requestBody: content: application/json: schema: - $ref: '#/components/schemas/DataTypeWriteWebhook' - examples: - Record: - value: - id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 - eventType: '{dataType}.write.unsuccessful' - generatedDate: 2023-05-03T10:00:23.000Z - payload: - id: a9367074-b5c3-42c4-9be4-be129f43577e - type: Update - referenceCompany: - id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac - name: Toft stores - description: cust_1MtJUT2eZvKYlo2CNaw2HvEv - connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 - requestedOnDate: 2023-05-03T10:00:00.000Z - completedOnDate: 2023-05-03T10:00:23.000Z - status: Failed - Record timed out: - value: - id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 - eventType: '{dataType}.write.unsuccessful' - generatedDate: 2023-05-03T10:00:23.000Z - payload: - id: a9367074-b5c3-42c4-9be4-be129f43577e - type: Delete - referenceCompany: - id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac - name: Toft stores - description: cust_1MtJUT2eZvKYlo2CNaw2HvEv - connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 - requestedOnDate: 2023-05-03T10:00:00.000Z - completedOnDate: 2023-05-03T10:00:23.000Z - status: TimedOut - Attachment: - value: - id: bae71d36-ff47-420a-b4a6-f8c9ddf41140 - eventType: '{dataType}.write.unsuccessful' - generatedDate: 2023-05-03T10:00:23.000Z - payload: - id: a9367074-b5c3-42c4-9be4-be129f43577e - type: UploadAttachment - referenceCompany: - id: 70af3071-65d9-4ec3-b3cb-5283e8d55dac - name: Toft stores - description: cust_1MtJUT2eZvKYlo2CNaw2HvEv - connectionId: 12571faf-0898-47e7-afdd-0fe9eb0a9bf5 - requestedOnDate: 2023-05-03T10:00:00.000Z - completedOnDate: 2023-05-03T10:00:23.000Z - status: TimedOut - record: - id: bil_1Nispe2eZvKYlo2Cd31jOCgZ + $ref: '#/components/schemas/SyncFailedWebhook' responses: '200': - description: Return a 200 status to indicate that the webhook was received. + description: Return a 200 status to indicate that the webhook was received successfully. client.rateLimit.reached: post: description: Called when your client’s request count to Codat's API surpasses the allocated quota. @@ -3270,120 +9909,588 @@ webhooks: responses: '200': description: Return a 200 status to indicate that the webhook was received successfully. + Client rate limit reached: + post: + deprecated: true + description: "Called when your client’s requests to Codat's API exceed the allocated quota. \n\n**Note: This event type is deprecated. Developers should now use the `client.rateLimit.reached` event for handling rate limit notifications.**" + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ClientRateLimitReachedWebhook' + responses: + '200': + description: Return a 200 status to indicate that the webhook was received successfully. + Client rate limit reset: + post: + deprecated: true + description: |- + Called when the rate limit quota has reset for the client, and more requests to Codat's API are available. + + Note: This event type is deprecated. Developers should now use the `client.rateLimit.reset` event for handling rate limit notifications. + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ClientRateLimitResetWebhook' + responses: + '200': + description: Return a 200 status to indicate that the webhook was received successfully. components: schemas: - ApiKeyDetails: - title: API key details - description: Details of the API key. - type: object + Account: + title: 'Accounting: Account' + description: "\uFEFF\x3E\x20\x2A\x2A\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x74\x69\x70\x3A\x2A\x2A\x20\x41\x63\x63\x6F\x75\x6E\x74\x73\x20\x61\x72\x65\x20\x61\x6C\x73\x6F\x20\x72\x65\x66\x65\x72\x72\x65\x64\x20\x74\x6F\x20\x61\x73\x20\x2A\x2A\x63\x68\x61\x72\x74\x20\x6F\x66\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2A\x2A\x2C\x20\x2A\x2A\x6E\x6F\x6D\x69\x6E\x61\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2A\x2A\x2C\x20\x61\x6E\x64\x20\x2A\x2A\x67\x65\x6E\x65\x72\x61\x6C\x20\x6C\x65\x64\x67\x65\x72\x2A\x2A\x2E\n\n\x23\x23\x20\x4F\x76\x65\x72\x76\x69\x65\x77\n\n\x41\x63\x63\x6F\x75\x6E\x74\x73\x20\x61\x72\x65\x20\x74\x68\x65\x20\x63\x61\x74\x65\x67\x6F\x72\x69\x65\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x75\x73\x65\x73\x20\x74\x6F\x20\x72\x65\x63\x6F\x72\x64\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E\x73\x2E\x20\x46\x72\x6F\x6D\x20\x74\x68\x65\x20\x41\x63\x63\x6F\x75\x6E\x74\x73\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x73\x2C\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x72\x65\x74\x72\x69\x65\x76\x65\x20\x61\x20\x6C\x69\x73\x74\x20\x6F\x66\x20\x61\x6C\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x20\x66\x6F\x72\x20\x61\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E\n\n\x54\x68\x65\x20\x63\x61\x74\x65\x67\x6F\x72\x69\x65\x73\x20\x66\x6F\x72\x20\x61\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x69\x6E\x63\x6C\x75\x64\x65\x3A\n\x2A\x20\x41\x73\x73\x65\x74\n\x2A\x20\x45\x78\x70\x65\x6E\x73\x65\n\x2A\x20\x49\x6E\x63\x6F\x6D\x65\n\x2A\x20\x4C\x69\x61\x62\x69\x6C\x69\x74\x79\n\x2A\x20\x45\x71\x75\x69\x74\x79\x2E\n\n\x54\x68\x65\x20\x73\x61\x6D\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x6D\x61\x79\x20\x68\x61\x76\x65\x20\x61\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x63\x61\x74\x65\x67\x6F\x72\x79\x20\x62\x61\x73\x65\x64\x20\x6F\x6E\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x69\x74\x20\x69\x73\x20\x75\x73\x65\x64\x20\x69\x6E\x2E\x20\x46\x6F\x72\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20\x61\x20\x63\x75\x72\x72\x65\x6E\x74\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x28\x6B\x6E\x6F\x77\x6E\x20\x61\x73\x20\x63\x68\x65\x63\x6B\x69\x6E\x67\x20\x69\x6E\x20\x74\x68\x65\x20\x55\x53\x29\x20\x73\x68\x6F\x75\x6C\x64\x20\x62\x65\x20\x63\x61\x74\x65\x67\x6F\x72\x69\x7A\x65\x64\x20\x61\x73\x20\x60\x41\x73\x73\x65\x74\x2E\x43\x75\x72\x72\x65\x6E\x74\x60\x20\x66\x6F\x72\x20\x58\x65\x72\x6F\x2C\x20\x61\x6E\x64\x20\x60\x41\x73\x73\x65\x74\x2E\x42\x61\x6E\x6B\x2E\x43\x68\x65\x63\x6B\x69\x6E\x67\x60\x20\x66\x6F\x72\x20\x51\x75\x69\x63\x6B\x42\x6F\x6F\x6B\x73\x20\x4F\x6E\x6C\x69\x6E\x65\x2E\n\n\x41\x74\x20\x74\x68\x65\x20\x73\x61\x6D\x65\x20\x74\x69\x6D\x65\x2C\x20\x65\x61\x63\x68\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x6D\x61\x79\x20\x68\x61\x76\x65\x20\x69\x74\x73\x20\x6F\x77\x6E\x20\x72\x65\x71\x75\x69\x72\x65\x6D\x65\x6E\x74\x73\x20\x74\x6F\x20\x74\x68\x65\x20\x63\x61\x74\x65\x67\x6F\x72\x69\x65\x73\x2E\x20\x46\x6F\x72\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20\x61\x20\x50\x61\x79\x70\x61\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x69\x6E\x20\x58\x65\x72\x6F\x20\x69\x73\x20\x6F\x66\x20\x74\x68\x65\x20\x60\x41\x73\x73\x65\x74\x2E\x42\x61\x6E\x6B\x60\x20\x63\x61\x74\x65\x67\x6F\x72\x79\x20\x61\x6E\x64\x20\x74\x68\x65\x72\x65\x66\x6F\x72\x65\x20\x72\x65\x71\x75\x69\x72\x65\x73\x20\x61\x64\x64\x69\x74\x69\x6F\x6E\x61\x6C\x20\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x20\x74\x6F\x20\x62\x65\x20\x70\x72\x6F\x76\x69\x64\x65\x64\x2E\n\n\x54\x6F\x20\x64\x65\x74\x65\x72\x6D\x69\x6E\x65\x20\x74\x68\x65\x20\x6C\x69\x73\x74\x20\x6F\x66\x20\x61\x6C\x6C\x6F\x77\x65\x64\x20\x63\x61\x74\x65\x67\x6F\x72\x69\x65\x73\x20\x66\x6F\x72\x20\x61\x20\x73\x70\x65\x63\x69\x66\x69\x63\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2C\x20\x79\x6F\x75\x20\x63\x61\x6E\x3A\n\x2D\x20\x46\x6F\x6C\x6C\x6F\x77\x20\x6F\x75\x72\x20\x5B\x43\x72\x65\x61\x74\x65\x2C\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x64\x65\x6C\x65\x74\x65\x20\x64\x61\x74\x61\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x75\x73\x69\x6E\x67\x2D\x74\x68\x65\x2D\x61\x70\x69\x2F\x70\x75\x73\x68\x29\x20\x67\x75\x69\x64\x65\x20\x61\x6E\x64\x20\x75\x73\x65\x20\x74\x68\x65\x20\x5B\x47\x65\x74\x20\x63\x72\x65\x61\x74\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x6D\x6F\x64\x65\x6C\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x73\x2F\x67\x65\x74\x2D\x63\x72\x65\x61\x74\x65\x2D\x63\x68\x61\x72\x74\x4F\x66\x41\x63\x63\x6F\x75\x6E\x74\x73\x2D\x6D\x6F\x64\x65\x6C\x29\x2E\n\x2D\x20\x52\x65\x66\x65\x72\x20\x74\x6F\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x27\x73\x20\x6F\x77\x6E\x20\x64\x6F\x63\x75\x6D\x65\x6E\x74\x61\x74\x69\x6F\x6E\x2E\n\n\x3E\x20\x2A\x2A\x41\x63\x63\x6F\x75\x6E\x74\x73\x20\x77\x69\x74\x68\x20\x6E\x6F\x20\x63\x61\x74\x65\x67\x6F\x72\x79\x2A\x2A\n\x3E\n\x3E\x20\x49\x66\x20\x61\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x69\x73\x20\x70\x75\x6C\x6C\x65\x64\x20\x66\x72\x6F\x6D\x20\x74\x68\x65\x20\x63\x68\x61\x72\x74\x20\x6F\x66\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x20\x61\x6E\x64\x20\x69\x74\x73\x20\x6E\x6F\x6D\x69\x6E\x61\x6C\x20\x63\x6F\x64\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x6C\x69\x65\x20\x77\x69\x74\x68\x69\x6E\x20\x74\x68\x65\x20\x63\x61\x74\x65\x67\x6F\x72\x79\x20\x6C\x61\x79\x6F\x75\x74\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x27\x73\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x2C\x20\x74\x68\x65\x6E\x20\x74\x68\x65\x20\x2A\x2A\x74\x79\x70\x65\x2A\x2A\x20\x69\x73\x20\x60\x55\x6E\x6B\x6E\x6F\x77\x6E\x60\x2E\x20\x54\x68\x65\x20\x2A\x2A\x66\x75\x6C\x6C\x79\x51\x75\x61\x6C\x69\x66\x69\x65\x64\x43\x61\x74\x65\x67\x6F\x72\x79\x2A\x2A\x20\x61\x6E\x64\x20\x2A\x2A\x66\x75\x6C\x6C\x79\x51\x75\x61\x6C\x69\x66\x69\x65\x64\x4E\x61\x6D\x65\x2A\x2A\x20\x66\x69\x65\x6C\x64\x73\x20\x72\x65\x74\x75\x72\x6E\x20\x60\x6E\x75\x6C\x6C\x60\x2E\n\x3E\n\x3E\x20\x54\x68\x69\x73\x20\x61\x70\x70\x72\x6F\x61\x63\x68\x20\x67\x69\x76\x65\x73\x20\x61\x20\x74\x72\x75\x65\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x61\x74\x69\x6F\x6E\x20\x6F\x66\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x27\x73\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x20\x77\x68\x69\x6C\x73\x74\x20\x70\x72\x65\x76\x65\x6E\x74\x69\x6E\x67\x20\x64\x69\x73\x74\x6F\x72\x74\x69\x6E\x67\x20\x66\x69\x6E\x61\x6E\x63\x69\x61\x6C\x73\x20\x73\x75\x63\x68\x20\x61\x73\x20\x61\x20\x63\x6F\x6D\x70\x61\x6E\x79\x27\x73\x20\x70\x72\x6F\x66\x69\x74\x20\x61\x6E\x64\x20\x6C\x6F\x73\x73\x20\x61\x6E\x64\x20\x62\x61\x6C\x61\x6E\x63\x65\x20\x73\x68\x65\x65\x74\x20\x72\x65\x70\x6F\x72\x74\x73\x2E" allOf: - properties: id: type: string - description: Unique identifier for the API key. - example: e288a972-b402-4b21-93f9-b5335ae5679c - name: - type: string - maxLength: 50 - nullable: true - description: A meaningful name assigned to the API key. - example: azure-invoice-finance-processor - apiKey: - type: string - description: The API key value used to make authenticated http requests. - example: ztHQGvnC4XN2CgUhaDWEG4ySLUJqWjp7zkbZkGHd - - nullable: true - description: Datetime in UTC the API key was created. The created date will be null if the API key created before YYYY-MM-DD. - title: Created date - type: object + description: 'Identifier for the account, unique for the company.' + example: 1b6266d1-1e44-46c5-8eb5-a8f98e03124e + - $ref: '#/components/schemas/Account/definitions/accountPrototype' + - properties: + metadata: + title: Metadata + type: object + x-internal: true + properties: + isDeleted: + type: boolean + description: Indicates whether the record has been deleted in the third-party system this record originated from. + nullable: true + - title: Modified dates x-internal: true - properties: - createdDate: - $ref: '#/components/schemas/DateTime' - description: The date the entity was created. - ApiKeys: - title: API keys + allOf: + - title: ModifiedDate + x-internal: true + type: object + properties: + modifiedDate: + allOf: + - $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + - description: "The date when the record was last fetched from the data source and updated in Codat’s data cache. \n\nUse it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today.\n\nThis date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)).\n\nIn Codat's data model, dates and times are represented using the ISO 8601 standard." + - title: Source Modified Date + x-internal: true + type: object + nullable: true + properties: + sourceModifiedDate: + allOf: + - $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + - description: "The date when a record was last modified in the source platform, usually by the business or a business process. For example, when payments are made against an invoice. \n\nIt is not populated ([read more](https://docs.codat.io/using-the-api/modified-dates#source-modified-date)) when:\n - Pulling attachments\n - The integration platform does not provide modification dates for a data type\n - A record has been deleted from the source platform and Codat doesn't have a record of when the deletion occurred\n - A record has been voided. For certain platforms that soft delete records, `isDeleted` metadata is used to identify void records\n\nIn Codat's data model, dates and times are represented using the ISO 8601 standard." + definitions: + accountPrototype: + title: Account prototype + type: object + properties: + nominalCode: + type: string + nullable: true + description: Reference given to each nominal account for a business. It ensures money is allocated to the correct account. This code isn't a unique identifier in the Codat system. + example: '610' + name: + type: string + nullable: true + description: Name of the account. + example: Accounts Receivable + description: + type: string + nullable: true + description: Description for the account. + example: Invoices the business has issued but has not yet collected payment on. + fullyQualifiedCategory: + type: string + nullable: true + description: "Full category of the account. \r\n\r\nFor example, `Liability.Current` or `Income.Revenue`. To determine a list of possible categories for each integration, see our examples, follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide, or refer to the integration's own documentation." + example: Asset.Current + fullyQualifiedName: + type: string + nullable: true + description: |- + Full name of the account, for example: + - `Cash On Hand` + - `Rents Held In Trust` + - `Fixed Asset` + examples: + - Cash On Hand + - Fixed Asset + currency: + title: Currency + x-internal: true + type: string + description: "The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.\n\n## Unknown currencies\n\nIn line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction. \n\nThere are only a very small number of edge cases where this currency code is returned by the Codat system." + format: ISO4217 + examples: + - GBP + - USD + - EUR + currentBalance: + type: number + format: decimal + nullable: true + description: Current balance in the account. + example: 0 + type: + $ref: '#/components/schemas/Account/definitions/accountType' + status: + $ref: '#/components/schemas/Account/definitions/accountStatus' + isBankAccount: + type: boolean + description: Confirms whether the account is a bank account or not. + validDatatypeLinks: + type: array + nullable: true + description: 'The validDatatypeLinks can be used to determine whether an account can be correctly mapped to another object; for example, accounts with a `type` of `income` might only support being used on an Invoice and Direct Income. For more information, see [Valid Data Type Links](/sync-for-expenses-api#/schemas/ValidDataTypeLinks).' + items: + title: Valid data type links + description: "When querying Codat's data model, some data types return `validDatatypeLinks` metadata in the JSON response. This indicates where that object can be used as a reference—a _valid link_—when creating or updating other data.\n\nFor example, `validDatatypeLinks` might indicate the following references:\n\n- Which tax rates are valid to use on the line item of a bill.\n- Which items can be used when creating an invoice. \n\nYou can use `validDatatypeLinks` to present your SMB customers with only valid choices when selecting objects from a list, for example.\n\n## `validDatatypeLinks` example\n\nThe following example uses the `Accounting.Accounts` data type. It shows that, on the linked integration, this account is valid as the account on a payment or bill payment; and as the account referenced on the line item of a direct income or direct cost. Because there is no valid link to Invoices or Bills, using this account on those data types will result in an error.\n\n```json validDatatypeLinks for an account\n{\n \"id\": \"bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4\",\n \"nominalCode\": \"090\",\n \"name\": \"Business Bank Account\",\n #...\n \"validDatatypeLinks\": [\n {\n \"property\": \"Id\",\n \"links\": [\n \"Payment.AccountRef.Id\",\n \"BillPayment.AccountRef.Id\",\n \"DirectIncome.LineItems.AccountRef.Id\",\n \"DirectCost.LineItems.AccountRef.Id\"\n ]\n }\n ]\n }\n```\n\n\n\n## Support for `validDatatypeLinks`\n\nCodat currently supports `validDatatypeLinks` for some data types on our Xero, QuickBooks Online, QuickBooks Desktop, Exact (NL), and Sage Business Cloud integrations. \n\nIf you'd like us to extend support to more data types or integrations, suggest or vote for this on our Product Roadmap." + type: object + properties: + property: + type: string + nullable: true + description: The property from the account that can be linked. + links: + type: array + nullable: true + description: Supported `dataTypes` that the record can be linked to. + items: + type: string + supplementalData: + $ref: '#/components/schemas/SupplementalData' + accountRef: + title: Account reference + type: object + description: 'Data types that reference an account, for example bill and invoice line items, use an accountRef that includes the ID and name of the linked account.' + properties: + id: + type: string + description: '''id'' from the Accounts data type.' + name: + type: string + description: '''name'' from the Accounts data type.' + accountType: + title: Account type + enum: + - Unknown + - Asset + - Expense + - Income + - Liability + - Equity + type: string + description: Type of account + example: Asset + accountStatus: + title: Account status + enum: + - Unknown + - Active + - Archived + - Pending + type: string + description: Status of the account + example: Active + type: object + AccountMappingInfo: + title: Account mapping info + x-internal: true + type: object + additionalProperties: false + x-examples: + Example AccountInfo: + id: 313a4dbe-b3a4-42f0-a5f5-43e382e62db9 + nominalCode: '720' + name: Travel + currency: GBP + accountType: Expense + fullyQualifiedCategory: Expense.Overhead + isBankAccount: false + validTransactionTypes: + - Payment + - Refund + validFor: + - expense-transactions.Payment + - expense-transactions.Refund + - reimbursable-expense-transactions + properties: + id: + type: string + description: Unique identifier of account. + example: 127f3b99-8dc2-4b7e-854c-91ef9bd2757b + nullable: false + nominalCode: + type: string + description: Code used to identify each nominal account in the accounting software. + example: '300' + nullable: true + name: + type: string + description: Name of the account as it appears in the company's accounting software. + example: Purchases + nullable: false + currency: + type: string + description: Currency of the account. + example: GBP + nullable: false + accountType: + type: string + description: Type of the account. + example: Expense + enum: + - Asset + - Liability + - Income + - Expense + - Equity + nullable: false + fullyQualifiedCategory: + type: string + description: Full account type and category of the account + example: Expense.DirectCosts + nullable: false + isBankAccount: + type: boolean + description: Confirms whether the account is a bank account or not. + validTransactionTypes: + $ref: '#/components/schemas/validTransactionTypes' + description: Supported transaction types for the account. + validFor: + $ref: '#/components/schemas/validFor' + description: Supported endpoints for the account. + AdjustmentTransactionLine: x-internal: true + title: Adjustment transaction line type: object properties: - results: + amount: + type: number + format: decimal + example: 50 + description: Amount of the line. A positive line represents a debit; a negative line represents a credit. + accountRef: + $ref: '#/components/schemas/RecordRef' + description: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + trackingRefs: type: array + minItems: 1 + maxItems: 10 + nullable: true items: - $ref: '#/components/schemas/ApiKeyDetails' - Branding: - title: Branding + $ref: '#/components/schemas/TrackingRefAdjustmentTransaction' + invoiceTo: + $ref: '#/components/schemas/InvoiceTo' + required: + - amount + - accountRef + AdjustmentTransactionRequest: + title: Adjustment transaction type: object properties: - logo: - $ref: '#/components/schemas/Branding/definitions/brandingLogo' - button: - $ref: '#/components/schemas/Branding/definitions/brandingButton' - sourceId: + id: type: string format: uuid - example: 35b92968-9851-4095-ad60-395c95cbcba4 - description: 'A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`.' + description: Your unique identifier for the transaction. + date: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date of the transaction. + currency: + type: string + description: Currency the transaction was recorded in. + currencyRate: + $ref: '#/components/schemas/ExpenseTransaction/properties/currencyRate' + reference: + type: string + nullable: true + description: User-friendly reference for the adjustment transaction. + lines: + type: array + description: Array of transaction lines. + minItems: 1 + maxItems: 100 + items: + $ref: '#/components/schemas/AdjustmentTransactionLine' + required: + - id + - date + - currency + - lines + AdjustmentTransactionResponse: + title: Adjustment response + x-internal: true + type: object + properties: + syncId: + type: string + example: cd937d46-8e41-43a9-9477-a79158ffd98a + format: uuid + description: Unique id of sync created + apAccountRef: + x-internal: true + type: object + title: Accounts Payable account reference + nullable: true + properties: + id: + type: string + example: 8000004C-1724173136 + description: Unique identifier for the Accounts Payable account associated with the transaction. The `apAccountRef` object is currently supported only for QuickBooks Desktop. + Attachment: + title: Attachment + type: object + x-examples: + Attachment Example: + companyId: bf1e0242-5b7a-418b-a307-9e09dbf9f39a + id: '1400000000122699154' + transactionId: f8f00edd-ddb0-4ca5-b36b-8f932e6b5160 + properties: + companyId: + type: string + format: uuid + description: Unique ID of company in Codat + id: + type: string + description: Unique identifier of attachment + transactionId: + type: string + description: Unique identifier of transaction + AttachmentUpload: + title: Attachment upload + type: object + x-internal: true + required: + - file + properties: + file: + $ref: '#/components/schemas/AttachmentUpload/definitions/codatFile' + definitions: + codatFile: + type: string + description: The file to be uploaded as an attachment. + format: binary + BankAccount: + title: 'Accounting: Bank account' + description: "> **Accessing Bank Accounts through Banking API**\n> \n> This datatype was originally used for accessing bank account data both in accounting integrations and open banking aggregators. \n> \n> To view bank account data through the Banking API, please refer to the new [Banking: Account](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) data type.\n\n## Overview\n\nA list of bank accounts associated with a company and a specific data connection.\n\nBank accounts data includes:\n* The name and ID of the account in the accounting software.\n* The currency and balance of the account.\n* The sort code and account number." + type: object + allOf: + - properties: + id: + type: string + description: 'Identifier for the account, unique for the company in the accounting software.' + - $ref: '#/components/schemas/BankAccount/definitions/bankAccountPrototype' + - properties: + metadata: + $ref: '#/components/schemas/Account/allOf/2/properties/metadata' + supplementalData: + $ref: '#/components/schemas/SupplementalData' + - $ref: '#/components/schemas/Account/allOf/3' + definitions: + bankAccountPrototype: + title: Bank account prototype + type: object + properties: + accountName: + type: string + nullable: true + description: Name of the bank account in the accounting software. + accountType: + title: Bank Account Type + x-internal: true + enum: + - Unknown + - Credit + - Debit + type: string + description: "The type of transactions and balances on the account. \nFor Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. \nFor Debit accounts, positive balances are assets, and positive transactions **increase** assets." + nominalCode: + type: string + nullable: true + description: Code used to identify each nominal account for a business. + sortCode: + type: string + nullable: true + description: |- + Sort code for the bank account. + + Xero integrations + The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated. + accountNumber: + type: string + nullable: true + description: |- + Account number for the bank account. + + Xero integrations + 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. + + FreeAgent integrations + For Credit accounts, only the last four digits are required. For other types, the field is optional. + iBan: + type: string + nullable: true + description: International bank account number of the account. Often used when making or receiving international payments. + currency: + $ref: '#/components/schemas/Account/definitions/accountPrototype/properties/currency' + description: Base currency of the bank account. + balance: + type: number + format: decimal + nullable: true + description: Balance of the bank account. + institution: + type: string + nullable: true + description: The institution of the bank account. + availableBalance: + type: number + format: decimal + nullable: true + description: 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. + overdraftLimit: + type: number + format: decimal + nullable: true + description: |- + Pre-arranged overdraft limit of the account. + + The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. + status: + $ref: '#/components/schemas/BankAccount/definitions/bankAccountStatus' + bankAccountCreateResponse: + title: Create bank account response + allOf: + - properties: + data: + allOf: + - $ref: '#/components/schemas/BankAccount' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + bankAccountRef: + title: Bank account reference + type: object + properties: + id: + type: string + description: Bank account 'id' for the account transaction. + name: + type: string + description: bank account 'name' for the account transaction. + description: Links to the Account transactions data type. + bankAccounts: + title: 'Accounting: Bank accounts' + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/BankAccount' + - $ref: '#/components/schemas/PagingInfo' + bankAccountStatus: + title: Account status + enum: + - Unknown + - Active + - Archived + - Pending + type: string + description: Status of the bank account. + example: Active + ClientRateLimitReachedWebhook: + title: Client rate limit reached webhook + x-internal: true + description: Webhook request body for a client that has reached their rate limit. + type: object + properties: + ClientId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/ClientId' + ClientName: + $ref: '#/components/schemas/SyncFailedWebhook/properties/ClientName' + RuleId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/RuleId' + RuleType: + $ref: '#/components/schemas/SyncFailedWebhook/properties/RuleType' + AlertId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/AlertId' + Message: + $ref: '#/components/schemas/SyncFailedWebhook/properties/Message' + Data: + $ref: '#/components/schemas/ClientRateLimitReachedWebhook/definitions/ClientRateLimitReachedWebhookData' definitions: - brandingLogo: - description: Logo branding references. - type: object - properties: - full: - $ref: '#/components/schemas/Branding/definitions/brandingImage' - square: - $ref: '#/components/schemas/Branding/definitions/brandingImage' - brandingButton: + ClientRateLimitReachedWebhookData: type: object - description: Button branding references. + title: Client rate limit reached webhook data properties: - default: - $ref: '#/components/schemas/Branding/definitions/brandingImage' - hover: - $ref: '#/components/schemas/Branding/definitions/brandingImage' - brandingImage: - title: Branding Image - type: object - properties: - image: - $ref: '#/components/schemas/Branding/definitions/imageReference' - examples: [] - imageReference: + DailyQuota: + type: integer + description: The number of available requests per day. + ExpiresUtc: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: The date time in UTC when your daily quota is reset. + examples: + - ClientId: bae71d36-ff47-420a-b4a6-f8c9ddf41140 + ClientName: Bank of Dave + RuleId: 70af3071-65d9-4ec3-b3cb-5283e8d55dac + RuleType: Rate Limit Reached + AlertId: a9367074-b5c3-42c4-9be4-be129f43577e + Message: The current daily rate limit quota of 1000 requests for bae71d36-ff47-420a-b4a6-f8c9ddf41140 has been reached. + Data: + DailyQuota: 1000 + ExpiresUtc: '2023-05-03T00:00:00Z' + ClientRateLimitResetWebhook: + title: Client rate limit reset webhook + x-internal: true + description: Webhook request body for a client that has had their rate limit reset. + type: object + properties: + ClientId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/ClientId' + ClientName: + $ref: '#/components/schemas/SyncFailedWebhook/properties/ClientName' + RuleId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/RuleId' + RuleType: + $ref: '#/components/schemas/SyncFailedWebhook/properties/RuleType' + AlertId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/AlertId' + Message: + $ref: '#/components/schemas/SyncFailedWebhook/properties/Message' + Data: + $ref: '#/components/schemas/ClientRateLimitResetWebhook/definitions/ClientRateLimitResetWebhookData' + definitions: + ClientRateLimitResetWebhookData: type: object - title: Image Reference - description: Image reference. + title: Client rate limit reset webhook data properties: - src: - type: string - format: uri - description: Source URL for image. - alt: + QuotaRemaining: + type: integer + description: Total number of requests remaining for your client. + nullable: true + ResetReason: type: string - description: Alternative text when image is not available. + description: The reason for your rate limit quota being reset. + DailyQuota: + $ref: '#/components/schemas/ClientRateLimitReachedWebhook/definitions/ClientRateLimitReachedWebhookData/properties/DailyQuota' + nullable: true + ExpiresUtc: + $ref: '#/components/schemas/ClientRateLimitReachedWebhook/definitions/ClientRateLimitReachedWebhookData/properties/ExpiresUtc' + nullable: true examples: - - logo: - full: - image: - src: 'https://static.codat.io/public/officialLogos/Full/8A156A5A-39CB-4F9D-856E-76EF9B9A9607.png' - alt: xero full icon - square: - image: - src: 'https://static.codat.io/public/officialLogos/Square/8A156A5A-39CB-4F9D-856E-76EF9B2W3607.png' - alt: xero square icon - button: - default: - image: - src: 'https://static.codat.io/public/officialButtons/Full/8A156A5A-39CB-4F9D-856E-76EF9Q7A9607.png' - alt: xero default button icon - hover: - image: - src: 'https://static.codat.io/public/officialLogos/Full/8A156A5A-39CB-4F9D-856E-76EF9B9A9607.png' - alt: xero hover button icon - sourceId: 35b92968-9851-4095-ad60-395c95cbcba4 - ClientId: - title: Client ID - type: string - format: uuid - description: Unique identifier for your client in Codat. + - ClientId: bae71d36-ff47-420a-b4a6-f8c9ddf41140 + ClientName: Bank of Dave + RuleId: 70af3071-65d9-4ec3-b3cb-5283e8d55dac + RuleType: Rate Limit Reset + AlertId: a9367074-b5c3-42c4-9be4-be129f43577e + Message: The current daily rate limit quota for client 30e0f9d2-52c0-4c9f-a806-bcd98a3bcd7e has been reset to 1000 requests. + Data: + QuotaRemaining: 1000 + ResetReason: The quota was reset because it is a new day. + DailyQuota: 1000 + ExpiresUtc: '2023-05-03T00:00:00Z' ClientRateLimitWebhook: title: Client rate limit webhook type: object @@ -3400,7 +10507,7 @@ components: - client.rateLimit.reset - client.rateLimit.reached generatedDate: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' description: The date time in UTC the event was generated in Codat. payload: $ref: '#/components/schemas/ClientRateLimitWebhook/definitions/clientRateLimitWebhookPayload' @@ -3416,7 +10523,7 @@ components: type: integer description: Total number of requests remaining for your client. expiryDate: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' description: The date time in UTC when your daily quota is reset. Companies: title: Companies @@ -3431,7 +10538,7 @@ components: - $ref: '#/components/schemas/PagingInfo' Company: title: Company - description: "\uFEFF\x49\x6E\x20\x43\x6F\x64\x61\x74\x2C\x20\x61\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\x20\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5B\x58\x65\x72\x6F\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x2F\x78\x65\x72\x6F\x2F\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x2D\x78\x65\x72\x6F\x29\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x5B\x50\x6C\x61\x69\x64\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x62\x61\x6E\x6B\x69\x6E\x67\x2F\x70\x6C\x61\x69\x64\x2F\x62\x61\x6E\x6B\x69\x6E\x67\x2D\x70\x6C\x61\x69\x64\x29\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5B\x5A\x65\x74\x74\x6C\x65\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6D\x6D\x65\x72\x63\x65\x2F\x7A\x65\x74\x74\x6C\x65\x2F\x63\x6F\x6D\x6D\x65\x72\x63\x65\x2D\x7A\x65\x74\x74\x6C\x65\x29\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n\n\x54\x79\x70\x69\x63\x61\x6C\x6C\x79\x20\x65\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x69\x73\x20\x6F\x6E\x65\x20\x6F\x66\x20\x79\x6F\x75\x72\x20\x63\x75\x73\x74\x6F\x6D\x65\x72\x73\x2E\n\n\x57\x68\x65\x6E\x20\x79\x6F\x75\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2C\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x73\x70\x65\x63\x69\x66\x79\x20\x61\x20\x60\x6E\x61\x6D\x65\x60\x20\x61\x6E\x64\x20\x77\x65\x20\x77\x69\x6C\x6C\x20\x61\x75\x74\x6F\x6D\x61\x74\x69\x63\x61\x6C\x6C\x79\x20\x67\x65\x6E\x65\x72\x61\x74\x65\x20\x61\x20\x75\x6E\x69\x71\x75\x65\x20\x60\x69\x64\x60\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x20\x59\x6F\x75\x20\x63\x61\x6E\x20\x61\x6C\x73\x6F\x20\x61\x64\x64\x20\x61\x20\x60\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x60\x20\x74\x6F\x20\x73\x74\x6F\x72\x65\x20\x61\x6E\x79\x20\x61\x64\x64\x69\x74\x69\x6F\x6E\x61\x6C\x20\x69\x6E\x66\x6F\x72\x6D\x61\x74\x69\x6F\x6E\x20\x61\x62\x6F\x75\x74\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E" + description: "\uFEFF\x49\x6E\x20\x43\x6F\x64\x61\x74\x2C\x20\x61\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x73\x68\x61\x72\x69\x6E\x67\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x64\x61\x74\x61\x2E\x20\x45\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x5B\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x29\x20\x74\x6F\x20\x64\x69\x66\x66\x65\x72\x65\x6E\x74\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x73\x20\x73\x75\x63\x68\x20\x61\x73\x20\x6F\x6E\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5B\x58\x65\x72\x6F\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x2F\x78\x65\x72\x6F\x2F\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x2D\x78\x65\x72\x6F\x29\x20\x66\x6F\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x2C\x20\x74\x77\x6F\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x74\x6F\x20\x5B\x50\x6C\x61\x69\x64\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x62\x61\x6E\x6B\x69\x6E\x67\x2F\x70\x6C\x61\x69\x64\x2F\x62\x61\x6E\x6B\x69\x6E\x67\x2D\x70\x6C\x61\x69\x64\x29\x20\x66\x6F\x72\x20\x74\x77\x6F\x20\x62\x61\x6E\x6B\x20\x61\x63\x63\x6F\x75\x6E\x74\x73\x20\x61\x6E\x64\x20\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x5B\x5A\x65\x74\x74\x6C\x65\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x63\x6F\x6D\x6D\x65\x72\x63\x65\x2F\x7A\x65\x74\x74\x6C\x65\x2F\x63\x6F\x6D\x6D\x65\x72\x63\x65\x2D\x7A\x65\x74\x74\x6C\x65\x29\x20\x66\x6F\x72\x20\x50\x4F\x53\x20\x64\x61\x74\x61\x2E\n\n\x54\x79\x70\x69\x63\x61\x6C\x6C\x79\x20\x65\x61\x63\x68\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x69\x73\x20\x6F\x6E\x65\x20\x6F\x66\x20\x79\x6F\x75\x72\x20\x63\x75\x73\x74\x6F\x6D\x65\x72\x73\x2E\n\n\x57\x68\x65\x6E\x20\x79\x6F\x75\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2C\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x73\x70\x65\x63\x69\x66\x79\x20\x61\x20\x60\x6E\x61\x6D\x65\x60\x20\x61\x6E\x64\x20\x77\x65\x20\x77\x69\x6C\x6C\x20\x61\x75\x74\x6F\x6D\x61\x74\x69\x63\x61\x6C\x6C\x79\x20\x67\x65\x6E\x65\x72\x61\x74\x65\x20\x61\x20\x75\x6E\x69\x71\x75\x65\x20\x60\x69\x64\x60\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x20\x59\x6F\x75\x20\x63\x61\x6E\x20\x61\x6C\x73\x6F\x20\x61\x64\x64\x20\x61\x20\x60\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x60\x20\x74\x6F\x20\x73\x74\x6F\x72\x65\x20\x61\x6E\x79\x20\x61\x64\x64\x69\x74\x69\x6F\x6E\x61\x6C\x20\x69\x6E\x66\x6F\x72\x6D\x61\x74\x69\x6F\x6E\x20\x61\x62\x6F\x75\x74\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x2E" type: object allOf: - $ref: '#/components/schemas/Company/definitions/companyDetails' @@ -3461,10 +10568,10 @@ components: description: 'The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company.' example: 'https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739' lastSync: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' nullable: true created: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' createdByUserName: type: string description: Name of user that created the company in Codat. @@ -3540,39 +10647,232 @@ components: lastSync: '2022-10-27T10:22:43.6464237Z' created: '2022-10-27T09:53:29Z' sourceType: Banking - products: - - spend-insights - - lending - CompanyAccessToken: - title: Company access token - description: Details of the access token provisioned for a company. + CompanyConfiguration: + required: + - bankAccount + - supplier + - customer + title: Company configuration type: object - allOf: - - $ref: '#/components/schemas/CompanyAccessToken/definitions/accessToken' + x-examples: + Config Example: + bankAccount: + id: '89' + supplier: + id: '124' + customer: + id: '140' + properties: + bankAccount: + $ref: '#/components/schemas/CompanyConfiguration/definitions/BankAccountDetails' + supplier: + $ref: '#/components/schemas/CompanyConfiguration/definitions/SupplierDetails' + customer: + $ref: '#/components/schemas/CompanyConfiguration/definitions/CustomerDetails' definitions: - accessToken: - title: Access token + BankAccountDetails: + title: Bank account details type: object properties: - expiresIn: - type: integer - description: The number of seconds until the access token expires. - example: 86400 - accessToken: - type: string - description: The access token for the company. - tokenType: + id: type: string - description: The type of token. - example: Bearer - required: - - expiresIn - - accessToken - - tokenType + description: The id of the account from which purchases are made + example: '32' + SupplierDetails: + title: Supplier details + type: object + properties: + id: + $ref: '#/components/schemas/Supplier/allOf/0/properties/id' + CustomerDetails: + title: Customer details + type: object + properties: + id: + $ref: '#/components/schemas/Customer/allOf/0/properties/id' + CompanyInformation: + title: 'Accounting: Company information' + description: "Company info provides standard details about a linked company such as their address, phone number, and company registration.\n\n> **Company information or companies?**\n> \n> Company information is standard information that is held in the accounting software about a company. `Companies` is an endpoint that lists businesses in the Codat system that have linked and shared their data sources." + type: object + properties: + companyName: + type: string + nullable: true + description: Name of the linked company. + accountingPlatformRef: + type: string + nullable: true + description: Identifier or reference for the company in the accounting software. + companyLegalName: + type: string + nullable: true + description: Registered legal name of the linked company. + addresses: + type: array + nullable: true + description: An array of Addresses. + items: + title: 'Accounting: Address' + x-internal: true + type: object + properties: + type: + $ref: '#/components/schemas/CompanyInformation/properties/addresses/items/definitions/accountingAddressType' + line1: + type: string + nullable: true + description: Line 1 of the customer address. + line2: + type: string + nullable: true + description: Line 2 of the customer address. + city: + type: string + nullable: true + description: City of the customer address. + region: + type: string + nullable: true + description: Region of the customer address. + country: + type: string + nullable: true + description: Country of the customer address. + postalCode: + type: string + nullable: true + description: Postal code or zip code. + required: + - type + definitions: + accountingAddressType: + description: The type of the address + type: string + enum: + - Unknown + - Billing + - Delivery + phoneNumbers: + type: array + nullable: true + description: An array of phone numbers. + items: + title: Phone + type: object + x-internal: true + properties: + number: + type: string + nullable: true + examples: + - +44 25691 154789 + - (877) 492-8687 + - 01224 658 999 + description: A phone number. + type: + $ref: '#/components/schemas/CompanyInformation/properties/phoneNumbers/items/definitions/phoneNumberType' + required: + - type + definitions: + phoneNumberType: + description: The type of phone number + type: string + enum: + - Primary + - Landline + - Mobile + - Fax + - Unknown + webLinks: + type: array + nullable: true + description: An array of weblinks. + items: + title: Weblink + description: Weblink associated with the company. + type: object + properties: + type: + description: The type of the weblink. + type: string + enum: + - Website + - Social + - Unknown + url: + description: The full URL for the weblink. + type: string + format: url + example: + type: Website + url: 'https://codat.io' + ledgerLockDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: 'If set in the accounting software, the date (in the ISO 8601 date/time format) after which accounting transactions cannot be edited. Commonly used when books are closed at year-end.' + registrationNumber: + type: string + nullable: true + description: Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. + taxNumber: + type: string + nullable: true + description: Company tax number. + financialYearStartDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Start date of the financial year for the company. + baseCurrency: + type: string + nullable: true + description: Currency set in the accounting software of the linked company. Used by the currency rate. + sourceUrls: + type: object + additionalProperties: + type: string + nullable: true + nullable: true + description: |- + URL addresses for the accounting source. + + For example, for Xero integrations two URLs are returned. These have many potential use cases, such as [deep linking](https://developer.xero.com/documentation/api-guides/deep-link-xero). + createdDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date the linked company was created in the accounting software. + supplementalData: + $ref: '#/components/schemas/SupplementalData' examples: - - expiresIn: 86400 - accessToken: string - tokenType: Bearer + - companyName: ACME Corporation + accountingPlatformRef: 4444e827-401b-4925-92cb-d79086bf3b6b + companyLegalName: ACME Corporation Ltd. + addresses: + - type: Billing + line1: Warner House + line2: 98 Theobald's Road + city: London + region: '' + country: United Kingdom + postalcode: WC1X 8WB + - type: Unknown + line1: 123 Sierra Way + line2: '' + city: San Pablo + region: CA + country: '' + postalCode: '87999' + phoneNumbers: + - number: 010 1234 5678 + type: Landline + webLinks: + - type: Website + url: 'https://www.wbsl.com/' + ledgerLockDate: '2019-03-04T12:08:01.881Z' + registrationNumber: '1234567890' + taxNumber: GB 123456789 + financialYearStartDate: '2019-04-01T00:00:00Z' + baseCurrency: USD + sourceUrls: + url1: 'https://go.xero.com/organisationlogin/default.aspx?shortcode=!rxs0Q' + url2: 'https://reporting.xero.com/!rxs0Q' + createdDate: '2020-02-03T16:42:02Z' CompanyRequestBody: title: Create company request x-internal: true @@ -3592,44 +10892,73 @@ components: $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' required: - name - CompanyUpdateRequest: - title: Update company request - x-internal: true + CompanySyncStatus: + title: Company sync status type: object + additionalProperties: false + x-examples: + Success Data Pushed: + companyId: 20803807-4e9a-4cb7-b67b-9f889a3916e1 + syncId: aa4c9dfd-e945-4424-9628-9e724f14c267 + syncStatusCode: 2000 + syncStatus: Complete + errorMessage: '' + syncExceptionMessage: '' + syncUtc: '2023-01-24T14:15:22Z' + dataPushed: true + Success No Data Pushed: + companyId: 20803807-4e9a-4cb7-b67b-9f889a3916e1 + syncId: aa4c9dfd-e945-4424-9628-9e724f14c267 + syncStatusCode: 2040 + syncStatus: Complete + errorMessage: '' + syncExceptionMessage: '' + syncUtc: '2023-01-24T14:15:22Z' + dataPushed: false properties: - name: + companyId: type: string - description: Name of company being connected. - pattern: '^[A-Za-z0-9\s\-'',&@.,?!\s]+$' - minLength: 1 - example: Bank of Dave - description: - $ref: '#/components/schemas/CompanyRequestBody/properties/description' - tags: - $ref: '#/components/schemas/Company/definitions/companyDetails/properties/tags' - CompanyWebhook: - title: Company webhook - type: object - properties: - id: + description: Unique identifier for your SMB in Codat. + example: d4d73051-ed31-42b6-99f6-d288cd940992 + nullable: true + syncId: type: string - format: uuid - example: ba29118f-5406-4e59-b05c-ba307ca38d01 - description: Unique identifier of the event - eventType: + description: Unique identifier of the sync. + example: a6a22aff-a43a-411d-a910-2dae73217cce + nullable: true + syncStatusCode: + type: integer + format: int32 + description: Status code of the sync. + example: 2000 + syncStatus: type: string - description: The type of event. + description: Text status of the sync. examples: - - company.created - - company.deleted - generatedDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC the event was generated in Codat. - payload: - $ref: '#/components/schemas/Company/definitions/companyDetails' + - Complete + - PushError + - Started + - NotStarted + - Pushing + nullable: true + errorMessage: + type: string + description: Error message of the sync. + nullable: true + syncExceptionMessage: + type: string + description: Exception message of the sync. + nullable: true + syncUtc: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Datetime of the sync. + nullable: true + dataPushed: + type: boolean + description: Boolean of whether the sync resulted in data being pushed. Connection: title: Connection - description: "\uFEFF\x41\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x27\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x70\x6C\x61\x74\x66\x6F\x72\x6D\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x61\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x20\x61\x6E\x64\x20\x61\x6C\x6C\x6F\x77\x73\x20\x79\x6F\x75\x20\x74\x6F\x20\x73\x79\x6E\x63\x68\x72\x6F\x6E\x69\x7A\x65\x20\x64\x61\x74\x61\x20\x28\x70\x75\x6C\x6C\x20\x61\x6E\x64\x2F\x6F\x72\x20\x70\x75\x73\x68\x29\x20\x77\x69\x74\x68\x20\x74\x68\x61\x74\x20\x73\x6F\x75\x72\x63\x65\x2E\n\n\x41\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x64\x61\x74\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x64\x65\x70\x65\x6E\x64\x69\x6E\x67\x20\x6F\x6E\x20\x74\x68\x65\x20\x74\x79\x70\x65\x20\x6F\x66\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x20\x69\x74\x20\x69\x73\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67\x20\x74\x6F\x2E\x20\x46\x6F\x72\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x6C\x69\x6E\x6B\x20\x74\x6F\x3A\n\n\x2D\x20\x5B\x41\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x2D\x61\x70\x69\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x20\x2D\x20\x31\x20\x61\x63\x74\x69\x76\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2E\n\x2D\x20\x5B\x42\x61\x6E\x6B\x69\x6E\x67\x20\x64\x61\x74\x61\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x69\x6E\x67\x2D\x61\x70\x69\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x20\x2D\x20\x4D\x75\x6C\x74\x69\x70\x6C\x65\x20\x61\x63\x74\x69\x76\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x2E\n\x2D\x20\x5B\x43\x6F\x6D\x6D\x65\x72\x63\x65\x20\x64\x61\x74\x61\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x63\x6F\x6D\x6D\x65\x72\x63\x65\x2D\x61\x70\x69\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x20\x2D\x20\x4D\x75\x6C\x74\x69\x70\x6C\x65\x20\x61\x63\x74\x69\x76\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x2E\n\x41\x6E\x79\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x6F\x66\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x2C\x20\x62\x61\x6E\x6B\x69\x6E\x67\x2C\x20\x61\x6E\x64\x20\x63\x6F\x6D\x6D\x65\x72\x63\x65\x20\x64\x61\x74\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x69\x73\x20\x61\x6C\x6C\x6F\x77\x65\x64\x2E\n\n\x42\x65\x66\x6F\x72\x65\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x75\x73\x65\x20\x61\x20\x64\x61\x74\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x70\x75\x6C\x6C\x20\x6F\x72\x20\x70\x75\x73\x68\x20\x64\x61\x74\x61\x2C\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x6D\x75\x73\x74\x20\x67\x72\x61\x6E\x74\x20\x79\x6F\x75\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x64\x61\x74\x61\x20\x62\x79\x20\x5B\x6C\x69\x6E\x6B\x69\x6E\x67\x20\x74\x68\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x61\x75\x74\x68\x2D\x66\x6C\x6F\x77\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x2E" + description: "\uFEFF\x41\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x72\x65\x70\x72\x65\x73\x65\x6E\x74\x73\x20\x61\x20\x5B\x63\x6F\x6D\x70\x61\x6E\x79\x27\x73\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x73\x79\x6E\x63\x2D\x66\x6F\x72\x2D\x65\x78\x70\x65\x6E\x73\x65\x73\x2D\x61\x70\x69\x23\x2F\x73\x63\x68\x65\x6D\x61\x73\x2F\x43\x6F\x6D\x70\x61\x6E\x79\x29\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x61\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x20\x61\x6E\x64\x20\x61\x6C\x6C\x6F\x77\x73\x20\x79\x6F\x75\x20\x74\x6F\x20\x73\x79\x6E\x63\x68\x72\x6F\x6E\x69\x7A\x65\x20\x64\x61\x74\x61\x20\x28\x70\x75\x6C\x6C\x20\x61\x6E\x64\x2F\x6F\x72\x20\x70\x75\x73\x68\x29\x20\x77\x69\x74\x68\x20\x74\x68\x61\x74\x20\x73\x6F\x75\x72\x63\x65\x2E\n\n\x41\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x68\x61\x76\x65\x20\x6D\x75\x6C\x74\x69\x70\x6C\x65\x20\x64\x61\x74\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x64\x65\x70\x65\x6E\x64\x69\x6E\x67\x20\x6F\x6E\x20\x74\x68\x65\x20\x74\x79\x70\x65\x20\x6F\x66\x20\x64\x61\x74\x61\x20\x73\x6F\x75\x72\x63\x65\x20\x69\x74\x20\x69\x73\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67\x20\x74\x6F\x2E\x20\x46\x6F\x72\x20\x65\x78\x61\x6D\x70\x6C\x65\x2C\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x63\x61\x6E\x20\x6C\x69\x6E\x6B\x20\x74\x6F\x3A\n\n\x2D\x20\x5B\x41\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x20\x64\x61\x74\x61\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x2D\x61\x70\x69\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x20\x2D\x20\x31\x20\x61\x63\x74\x69\x76\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2E\n\x2D\x20\x5B\x42\x61\x6E\x6B\x69\x6E\x67\x20\x64\x61\x74\x61\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x62\x61\x6E\x6B\x69\x6E\x67\x2D\x61\x70\x69\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x20\x2D\x20\x4D\x75\x6C\x74\x69\x70\x6C\x65\x20\x61\x63\x74\x69\x76\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x2E\n\x2D\x20\x5B\x43\x6F\x6D\x6D\x65\x72\x63\x65\x20\x64\x61\x74\x61\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x63\x6F\x6D\x6D\x65\x72\x63\x65\x2D\x61\x70\x69\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x20\x2D\x20\x4D\x75\x6C\x74\x69\x70\x6C\x65\x20\x61\x63\x74\x69\x76\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x2E\n\x41\x6E\x79\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x6F\x66\x20\x61\x63\x63\x6F\x75\x6E\x74\x69\x6E\x67\x2C\x20\x62\x61\x6E\x6B\x69\x6E\x67\x2C\x20\x61\x6E\x64\x20\x63\x6F\x6D\x6D\x65\x72\x63\x65\x20\x64\x61\x74\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73\x20\x69\x73\x20\x61\x6C\x6C\x6F\x77\x65\x64\x2E\n\n\x42\x65\x66\x6F\x72\x65\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x75\x73\x65\x20\x61\x20\x64\x61\x74\x61\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x70\x75\x6C\x6C\x20\x6F\x72\x20\x70\x75\x73\x68\x20\x64\x61\x74\x61\x2C\x20\x74\x68\x65\x20\x63\x6F\x6D\x70\x61\x6E\x79\x20\x6D\x75\x73\x74\x20\x67\x72\x61\x6E\x74\x20\x79\x6F\x75\x20\x61\x63\x63\x65\x73\x73\x20\x74\x6F\x20\x74\x68\x65\x69\x72\x20\x62\x75\x73\x69\x6E\x65\x73\x73\x20\x64\x61\x74\x61\x20\x62\x79\x20\x5B\x6C\x69\x6E\x6B\x69\x6E\x67\x20\x74\x68\x65\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x61\x75\x74\x68\x2D\x66\x6C\x6F\x77\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x2E" type: object properties: id: @@ -3643,9 +10972,23 @@ components: type: string description: A unique four-character ID that identifies the platform of the company's data connection. This ensures continuity if the platform changes its name in the future. sourceId: - $ref: '#/components/schemas/Branding/properties/sourceId' + type: string + format: uuid + example: 35b92968-9851-4095-ad60-395c95cbcba4 + description: 'A source-specific ID used to distinguish between different sources originating from the same data connection. In general, a data connection is a single data source. However, for TrueLayer, `sourceId` is associated with a specific bank and has a many-to-one relationship with the `integrationId`.' sourceType: - $ref: '#/components/schemas/Integration/definitions/sourceType' + title: Source Type + description: The type of platform of the connection. + type: string + enum: + - Accounting + - Banking + - BankFeed + - Commerce + - Expense + - Other + - Unknown + example: Accounting platformName: type: string description: Name of integration connected to company. @@ -3657,10 +11000,10 @@ components: status: $ref: '#/components/schemas/Connection/definitions/dataConnectionStatus' lastSync: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' nullable: true created: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' dataConnectionErrors: type: array nullable: true @@ -3669,7 +11012,8 @@ components: connectionInfo: type: object nullable: true - additionalProperties: true + additionalProperties: + type: string additionalProperties: false required: - id @@ -3705,7 +11049,7 @@ components: type: string description: A message about a error returned by Codat. erroredOnUtc: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' status: title: Error status description: The current status of a transient error. Null statuses indicate that the error is not transient. @@ -3717,7 +11061,7 @@ components: resolvedOnUtc: description: The datetime in Utc that the error was resolved. nullable: true - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' dataConnectionSourceType: title: Source Type description: The type of platform of the connection. @@ -3742,29 +11086,6 @@ components: lastSync: '2022-10-27T10:22:43.6464237Z' created: '2022-10-27T09:53:29Z' sourceType: Banking - ConnectionManagementAccessToken: - title: Access token - type: object - properties: - accessToken: - type: string - nullable: false - description: Access token that allows SMBs to manage connections that have access to their data. - example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c - ConnectionManagementAllowedOrigins: - title: Allowed origins - type: object - properties: - allowedOrigins: - type: array - description: 'An array of allowed origins (i.e. your domains) to permit cross-origin resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)).n resource sharing ([CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing)).' - items: - type: string - format: uri - description: A domain you want to allow CORS with Codat. - example: - allowedOrigins: - - 'https://www.bank-of-dave.com' Connections: title: Connections x-internal: true @@ -3776,138 +11097,215 @@ components: items: $ref: '#/components/schemas/Connection' - $ref: '#/components/schemas/PagingInfo' - ConnectionWebhook: - title: Connection webhook + CreateAccountResponse: + title: Create account response + x-internal: true + allOf: + - type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/Account' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + CreateAdjustmentRequest: + title: Create adjustment request + x-internal: true + type: array + minItems: 1 + maxItems: 50 + items: + $ref: '#/components/schemas/AdjustmentTransactionRequest' + CreateBankAccountResponse: + title: Create bank account response + x-internal: true + allOf: + - type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/BankAccount' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + CreateCustomerResponse: + title: Create customer response + x-internal: true + allOf: + - type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/Customer' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + CreateExpenseRequest: + title: Create expense request + x-internal: true + type: array + minItems: 1 + maxItems: 50 + items: + $ref: '#/components/schemas/ExpenseTransaction' + CreateExpenseResponse: + title: Create expense response + x-internal: true type: object properties: - id: + syncId: type: string + example: cd937d46-8e41-43a9-9477-a79158ffd98a format: uuid - example: ba29118f-5406-4e59-b05c-ba307ca38d01 - description: Unique identifier of the event. - eventType: - type: string - description: The type of event. - examples: - - connection.created - - connection.connected - - connection.disconnected - - connection.reconnected - - connection.deleted - - connection.failed - generatedDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC the event was generated in Codat. - payload: - $ref: '#/components/schemas/ConnectionWebhook/definitions/connectionWebhookPayload' - definitions: - connectionWebhookPayload: - title: Connection webhook payload - type: object - properties: - referenceCompany: - $ref: '#/components/schemas/Company/definitions/companyReference' - connection: - $ref: '#/components/schemas/Connection' - CreateApiKey: - title: Create API key - description: Details about the newly created API key. + description: Unique id of sync created + CreateReimbursableExpenseResponse: + title: Create reimbursable expense response x-internal: true type: object properties: - name: - $ref: '#/components/schemas/ApiKeyDetails/allOf/0/properties/name' - CustomDataTypeConfiguration: - title: Custom data type configuration - type: object - description: Client's configuration details for a specific custom data type and platform pair. - properties: - dataSource: + syncId: type: string - description: Underlying endpoint of the source platform that will serve as a data source for the custom data type. This value is not validated by Codat. - requiredData: - type: object - description: Properties required to be fetched from the underlying platform for the custom data type that is being configured. This value is not validated by Codat. - additionalProperties: + example: cd937d46-8e41-43a9-9477-a79158ffd98a + format: uuid + description: Unique id of sync created + CreateSupplierResponse: + title: Create supplier response + x-internal: true + allOf: + - type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/Supplier' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + Customer: + title: 'Accounting: Customer' + description: | + ## Overview + + A customer is a person or organisation that buys goods or services. From the Customers endpoints, you can retrieve a [list of all the customers of a company](https://api.codat.io/swagger/index.html#/Customers/get_companies__companyId__data_customers). + + Customers' data links to accounts receivable [invoices](https://docs.codat.io/sync-for-expenses-api#/schemas/Invoice). + type: object + allOf: + - type: object + properties: + id: type: string - description: The client's defined name for the property with the value being the source system's property name which the mapping is targeting. - keyBy: - type: array - description: An array of properties from the source system that can be used to uniquely identify the records returned for the custom data type. This value is not validated by Codat. - items: + description: 'Identifier for the customer, unique to the company in the accounting software.' + customerName: type: string - minLength: 1 - sourceModifiedDate: - type: array - nullable: true - items: + nullable: true + description: 'Name of the customer as recorded in the accounting system, typically the company name.' + contactName: type: string - description: Property in the source platform nominated by the client that defines the date when a record was last modified there. This value is not validated by Codat. - examples: - - dataSource: api/purchaseOrders?$filter=currencyCode eq 'NOK' - requiredData: - currencyCode: '$[*].currencyCode' - id: '$[*].id' - number: '$[*].number' - orderDate: '$[*].orderDate' - totalAmountExcludingTax: '$[*].totalAmountExcludingTax' - totalTaxAmount: '$[*].totalTaxAmount' - vendorName: '$[*].number' - keyBy: - - '$[*].id' - sourceModifiedDate: - - '$[*].lastModifiedDateTime' - CustomDataTypeRecords: - title: Custom data type records - type: object - description: Resulting records pulled from the source platform for a specific custom data type. - properties: - results: - type: array - items: - $ref: '#/components/schemas/CustomDataTypeRecords/definitions/customDataTypeRecord' - pageNumber: - $ref: '#/components/schemas/PagingInfo/properties/pageNumber' - pageSize: - $ref: '#/components/schemas/PagingInfo/properties/pageSize' - totalResults: - $ref: '#/components/schemas/PagingInfo/properties/totalResults' + nullable: true + description: Name of the main contact for the identified customer. + emailAddress: + type: string + nullable: true + description: Email address the customer can be contacted by. + defaultCurrency: + $ref: '#/components/schemas/Account/definitions/accountPrototype/properties/currency' + description: Default currency the transactional data of the customer is recorded in. + phone: + type: string + nullable: true + description: Phone number the customer can be contacted by. + addresses: + type: array + nullable: true + description: An array of Addresses. + items: + $ref: '#/components/schemas/CompanyInformation/properties/addresses/items' + contacts: + type: array + nullable: true + description: An array of Contacts. + items: + $ref: '#/components/schemas/Customer/definitions/contact' + registrationNumber: + type: string + nullable: true + description: 'Company number. In the UK, this is typically the Companies House company registration number.' + taxNumber: + type: string + nullable: true + description: Company tax number. + status: + $ref: '#/components/schemas/Customer/definitions/customerStatus' + description: Current state of the customer. + metadata: + $ref: '#/components/schemas/Account/allOf/2/properties/metadata' + supplementalData: + $ref: '#/components/schemas/SupplementalData' + - $ref: '#/components/schemas/Account/allOf/3' + required: + - status definitions: - customDataTypeRecord: - title: Custom data type record + accountingCustomerRef: type: object properties: id: + minLength: 1 type: string - nullable: false - description: Unique identifier of the record. - content: - type: object - description: Values from the source system for the properties defined in the custom data type configuration. - additionalProperties: - type: object - modifiedDate: - title: ModifiedDate - x-internal: true - type: object - properties: - modifiedDate: - allOf: - - $ref: '#/components/schemas/DateTime' - - description: |- - The date when the record was last fetched from the accounting software, commerce software, or open banking provider and updated in Codat’s data cache. - - Use it to identify and retrieve records that have changed since your last fetch. For example, filtering `modifiedDate` to today will provide new records updated in Codat today. - - This date is populated for all data types except for attachments, balance sheets, company information, and profit & loss reports ([read more](https://docs.codat.io/using-the-api/modified-dates#modified-date)). - - In Codat's data model, dates and times are represented using the ISO 8601 standard. + description: '`id` from the Customers data type' + companyName: + type: string + nullable: true + description: '`customerName` from the Customer data type' + required: + - id + customerStatus: + description: Status of customer. + type: string + enum: + - Unknown + - Active + - Archived + contact: + type: object + properties: + name: + type: string + nullable: true + description: Name of a contact for a customer. + email: + type: string + nullable: true + description: Email of a contact for a customer. + phone: + type: array + nullable: true + description: An array of Phone numbers. + items: + $ref: '#/components/schemas/CompanyInformation/properties/phoneNumbers/items' + address: + $ref: '#/components/schemas/CompanyInformation/properties/addresses/items' + description: An object of Address information. + status: + $ref: '#/components/schemas/Customer/definitions/customerStatus' + modifiedDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + required: + - status + Customers: + title: Customers + x-internal: true + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/Customer' + - $ref: '#/components/schemas/PagingInfo' DataStatus: title: Data status description: Describes the state of data in the Codat cache for a company and data type type: object required: - dataType + - lastSuccessfulSync - currentStatus properties: dataType: @@ -3961,7 +11359,7 @@ components: - commerce-transactions example: invoices lastSuccessfulSync: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' currentStatus: $ref: '#/components/schemas/PullOperation/properties/status' latestSyncId: @@ -3980,223 +11378,15 @@ components: currentStatus: string latestSyncId: ad474a37-2003-478e-baee-9af9f1ec2fe3 latestSuccessfulSyncId: 8220fc90-55b6-47bc-9417-48ac6ea93101 - DataStatuses: - title: Data statuses + DataStatusResponse: x-internal: true + title: Data status response type: object - properties: - accountTransactions: - $ref: '#/components/schemas/DataStatus' - nullable: true - balanceSheet: - $ref: '#/components/schemas/DataStatus' - nullable: true - bankAccounts: - $ref: '#/components/schemas/DataStatus' - nullable: true - bankTransactions: - $ref: '#/components/schemas/DataStatus' - nullable: true - billCreditNotes: - $ref: '#/components/schemas/DataStatus' - nullable: true - billPayments: - $ref: '#/components/schemas/DataStatus' - nullable: true - bills: - $ref: '#/components/schemas/DataStatus' - nullable: true - cashFlowStatement: - $ref: '#/components/schemas/DataStatus' - nullable: true - chartOfAccounts: - $ref: '#/components/schemas/DataStatus' - nullable: true - company: - $ref: '#/components/schemas/DataStatus' - nullable: true - creditNotes: - $ref: '#/components/schemas/DataStatus' - nullable: true - customers: - $ref: '#/components/schemas/DataStatus' - nullable: true - directCosts: - $ref: '#/components/schemas/DataStatus' - nullable: true - directIncomes: - $ref: '#/components/schemas/DataStatus' - nullable: true - invoices: - $ref: '#/components/schemas/DataStatus' - nullable: true - itemReceipts: - $ref: '#/components/schemas/DataStatus' - nullable: true - items: - $ref: '#/components/schemas/DataStatus' - nullable: true - journalEntries: - $ref: '#/components/schemas/DataStatus' - nullable: true - journals: - $ref: '#/components/schemas/DataStatus' - nullable: true - paymentMethods: - $ref: '#/components/schemas/DataStatus' - nullable: true - payments: - $ref: '#/components/schemas/DataStatus' - nullable: true - profitAndLoss: - $ref: '#/components/schemas/DataStatus' - nullable: true - purchaseOrders: - $ref: '#/components/schemas/DataStatus' - nullable: true - salesOrders: - $ref: '#/components/schemas/DataStatus' - nullable: true - suppliers: - $ref: '#/components/schemas/DataStatus' - nullable: true - taxRates: - $ref: '#/components/schemas/DataStatus' - nullable: true - trackingCategories: - $ref: '#/components/schemas/DataStatus' - nullable: true - transfers: - $ref: '#/components/schemas/DataStatus' - nullable: true - banking-accountBalances: - $ref: '#/components/schemas/DataStatus' - nullable: true - banking-accounts: - $ref: '#/components/schemas/DataStatus' - nullable: true - banking-transactionCategories: - $ref: '#/components/schemas/DataStatus' - nullable: true - banking-transactions: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-companyInfo: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-customers: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-disputes: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-locations: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-orders: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-paymentMethods: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-payments: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-productCategories: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-products: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-taxComponents: - $ref: '#/components/schemas/DataStatus' - nullable: true - commerce-transactions: - $ref: '#/components/schemas/DataStatus' - nullable: true + additionalProperties: + $ref: '#/components/schemas/DataStatus' DataType: x-internal: true $ref: '#/components/schemas/DataStatus/properties/dataType' - DataTypeWriteWebhook: - title: Write data type webhook - type: object - properties: - id: - type: string - format: uuid - example: ba29118f-5406-4e59-b05c-ba307ca38d01 - description: Unique identifier of the event. - eventType: - type: string - description: The type of event. - examples: - - bills.write.successful - - bills.write.unsuccessful - generatedDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC the event was generated in Codat. - payload: - $ref: '#/components/schemas/DataTypeWriteWebhook/definitions/dataTypeWriteWebhookPayload' - definitions: - dataTypeWriteWebhookPayload: - title: Payload - type: object - properties: - id: - type: string - description: Unique identifier of the write request. This is also known as the push operation ID. - type: - $ref: '#/components/schemas/DataTypeWriteWebhook/definitions/writeType' - referenceCompany: - $ref: '#/components/schemas/Company/definitions/companyReference' - connectionId: - $ref: '#/components/parameters/connectionId/schema' - requestedOnDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC the write request was submitted. - completedOnDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC the write request completed. - status: - $ref: '#/components/schemas/DataTypeWriteWebhook/definitions/writeStatus' - record: - $ref: '#/components/schemas/DataTypeWriteWebhook/definitions/dataTypeWriteWebhookRecord' - nullable: true - attachmentId: - type: string - nullable: true - description: 'Unique identifier for the uploaded attachment, null if no attachment uploaded.' - dataTypeWriteWebhookRecord: - type: object - properties: - id: - type: string - description: 'The unique identifier of the data type created, updated, deleted, or had an attachment uploaded in the accounting platform.' - writeType: - title: Write type - description: Type of write request. - type: string - enum: - - Create - - Update - - Delete - - UploadAttachment - writeStatus: - title: Write request status - type: string - enum: - - Pending - - Failed - - Success - - TimedOut - description: 'The current status of the write request, which is the same as the push operation status.' - DateTime: - title: Date time - type: string - examples: - - 2022-10-23T00:00:00.000Z - - 2022-10-23T00:00:00.000Z - description: "In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:\n\n```\n2020-10-08T22:40:50Z\n2021-01-01T00:00:00\n```\n\n\n\nWhen syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:\n\n- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`\n- Unqualified local time: `2021-11-15T01:00:00`\n- UTC time offsets: `2021-11-15T01:00:00-05:00`\n\n> Time zones\n> \n> Not all dates from Codat will contain information about time zones. \n> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced." ErrorMessage: title: Error message type: object @@ -4255,147 +11445,287 @@ components: type: string nullable: true description: Name of validator. - Integration: - title: Integration - description: An integration that Codat supports - examples: - - key: gbol - logoUrl: 'http://example.com' - name: Xero - enabled: true - sourceId: accounting - sourceType: 8193a927-ab7a-45a3-9dc2-d357a4932dfe - integrationId: 497a18ca-284e-40c0-985d-f72be35d468e - isOfflineConnector: true - isBeta: true - dataProvidedBy: string - datatypeFeatures: - - datatype: invoices - supportedFeatures: - - featureType: get - featureState: release + ExpenseContactRef: type: object + title: Supplier/customer reference + x-internal: true properties: - key: - $ref: '#/components/parameters/platformKey/schema' - logoUrl: - type: string - format: uri - description: Static url for integration's logo. - name: + id: type: string - example: Xero - description: Name of integration. - enabled: - type: boolean - description: Whether this integration is enabled for your customers to use. - sourceId: - $ref: '#/components/schemas/Branding/properties/sourceId' - sourceType: - $ref: '#/components/schemas/Integration/definitions/sourceType' - integrationId: - $ref: '#/components/schemas/Connection/properties/integrationId' - isOfflineConnector: - type: boolean - description: '`True` if the integration is to an application installed and run locally on an SMBs computer.' - isBeta: - type: boolean - description: '`True` if the integration is currently in beta release.' - dataProvidedBy: + example: 40e3e57c-2322-4898-966c-ca41adfd23fd + description: Identifier of supplier or customer. + type: type: string - description: The name of the data provider. - datatypeFeatures: - type: array - items: - $ref: '#/components/schemas/Integration/definitions/dataTypeFeature' + description: The type of contact. + example: Supplier + default: Supplier + enum: + - Supplier required: - - key - - logoUrl - - name - - enabled - definitions: - sourceType: - title: Source Type - description: The type of platform of the connection. + - id + ExpensesSyncWebhook: + title: Expenses sync webhook + type: object + properties: + id: type: string - enum: - - Accounting - - Banking - - BankFeed - - Commerce - - Expense - - Other - - Unknown - example: Accounting - dataTypeFeature: - title: Data type feature - description: Describes support for a given datatype and associated operations + format: uuid + example: ba29118f-5406-4e59-b05c-ba307ca38d01 + description: Unique identifier of the event. + eventType: + type: string + description: The type of event. + examples: + - expenses.sync.successful + - expenses.sync.unsuccessful + generatedDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: The date time in UTC the event was generated in Codat. + payload: + $ref: '#/components/schemas/ExpensesSyncWebhook/definitions/expensesSyncWebhookPayload' + definitions: + transaction: + title: Transaction type: object properties: - dataType: - $ref: '#/components/schemas/DataStatus/properties/dataType' - supportedFeatures: + id: + type: string + description: Unique identifier of the transaction. + status: + type: string + enum: + - Unknown + - PushError + - Completed + - Failed + - Pending + description: Status of transaction. + errorMessage: + type: string + nullable: true + description: Error message for failed transaction. + expensesSyncWebhookPayload: + title: Expenses sync webhook payload + type: object + properties: + referenceCompany: + $ref: '#/components/schemas/Company/definitions/companyReference' + syncId: + type: string + description: Unique identifier of the sync. + transactions: type: array items: - $ref: '#/components/schemas/Integration/definitions/supportedFeature' - required: - - datatype - - supportedFeatures - examples: - - datatype: invoices - supportedFeatures: - - featureType: Get - featureState: Release - supportedFeature: + $ref: '#/components/schemas/ExpensesSyncWebhook/definitions/transaction' + ExpenseTransaction: + title: Expense transaction + type: object + properties: + id: + type: string + example: 4d7c6929-7770-412b-91bb-44d3bc71d111 + format: uuid + description: Your unique identifier for the transaction. + type: + type: string + example: Payment + description: The type of transaction. + enum: + - Payment + - Refund + - Reward + - Chargeback + issueDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date of the transaction was recorded. + currency: + type: string + example: GBP + description: Currency the transaction was recorded in. + currencyRate: + title: Currency rate + type: number + format: decimal + nullable: true + description: "Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.\n\nCurrency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. \n\nIt is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.\n\nWhere the currency rate is provided by the underlying accounting software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). \n\nFor accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.\n\n## Examples with base currency of GBP\n\n| Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) |\n| :--------------- | :------------- | :------------ | :------------------------- |\n| **USD** | $20 | 0.781 | £15.62 |\n| **EUR** | €20 | 0.885 | £17.70 |\n| **RUB** | ₽20 | 0.011 | £0.22 |\n\n## Examples with base currency of USD\n\n| Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) |\n| :--------------- | :------------- | :------------ | :------------------------- |\n| **GBP** | £20 | 1.277 | $25.54 |\n| **EUR** | €20 | 1.134 | $22.68 |\n| **RUB** | ₽20 | 0.015 | $0.30 |\n\n\n### Integration-specific details\n\n| Integration | Scenario | System behavior |\n|-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. |" + contactRef: + description: Supplier or customer for the purchase to be associated to. + $ref: '#/components/schemas/ExpenseContactRef' + bankAccountRef: type: object - x-internal: true + title: Bank account reference properties: - featureType: - $ref: '#/components/schemas/Integration/definitions/featureType' - featureState: - $ref: '#/components/schemas/Integration/definitions/featureState' - required: - - featureType - - featureState - featureState: - title: Feature state + id: + type: string + example: 787dfb37-5707-4dc0-8a86-8d74e4cc78ea + description: Identifier of the bank account. + reference: type: string - example: Release - description: The current release state of the feature. - enum: - - Release - - Alpha - - Beta - - Deprecated - - NotSupported - - NotImplemented - featureType: + nullable: true + description: User-friendly reference for the expense transaction. + merchantName: type: string - x-internal: true - description: The type of feature. + example: Amazon UK + description: Name of the merchant where the purchase took place + lines: + type: array + description: Array of transaction lines. + minItems: 1 + maxItems: 100 + items: + $ref: '#/components/schemas/ExpenseTransactionLine' + notes: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + postAsDraft: + type: boolean + nullable: true + description: 'This optional property, when set to true, posts the transaction to a drafted state. Note that postAsDraft is only supported in Microsoft Dynamics 365 Business Central.' + required: + - id + - type + - issueDate + - currency + examples: + - id: a44135b0-6882-489a-83fe-a0c57a4afb19 + type: Payment + issueDate: '2024-05-21T00:00:00+00:00' + currency: GBP + currencyRate: 1 + contactRef: + id: '430' + type: Supplier + bankAccountRef: + id: '97' + merchantName: Amazon UK + notes: amazon purchase + lines: + - netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 23_Bills + accountRef: + id: '35' + trackingRefs: + - id: DEPARTMENT_3 + - dataType: trackingCategories + invoiceTo: + id: '504' + type: customer + ExpenseTransactionLine: + x-internal: true + title: Expense transaction line + type: object + x-examples: + ExpenseTransactionLine: + netAmount: 100 + taxAmount: 20 + taxRateRef: + id: 08d37c46-8d5d-441b-8bad-76286c43047e + accountRef: + id: 16989b16-96d4-401a-9054-f5c620c655a6 + trackingRefs: + - id: e9a1b63d-9ff0-40e7-8038-016354b987e6 + invoiceTo: + id: 80000002-1674552702 + type: customer + properties: + netAmount: + type: number + format: decimal + example: 100 + description: 'Amount of the line, exclusive of tax.' + taxAmount: + type: number + format: decimal + example: 20 + description: Amount of tax for the line. + taxRateRef: + $ref: '#/components/schemas/RecordRef' + accountRef: + description: The `accountRef` contains the `id` of the account the transaction is against. The `accountRef` object is required for all integrations except QBD which currently supports either itemRef or accountRef. + $ref: '#/components/schemas/RecordRef' + itemRef: + $ref: '#/components/schemas/ItemRef' + trackingRefs: + type: array + minItems: 1 + maxItems: 10 + nullable: true + items: + $ref: '#/components/schemas/TrackingRef' + invoiceTo: + $ref: '#/components/schemas/InvoiceTo' + required: + - netAmount + IntegrationType: + title: Integration type + x-internal: true + type: string + description: Type of transaction that has been processed e.g. Expense or Bank Feed. + enum: + - expenses + - bankfeeds + default: expenses + example: expenses + nullable: true + InvoiceTo: + title: Billable customer reference + x-internal: true + type: object + nullable: true + description: Unique identifier for the customer billed for the transaction. The `invoiceTo` object is currently supported only for QuickBooks Online and QuickBooks Desktop. + properties: + id: + type: string + example: 80000002-1674552702 + description: identifier of customer. + type: + type: string + example: customer + description: The type of contact. enum: - - Get - - Post - - Categorization - - Delete - - Put - - GetAsPdf - - DownloadAttachment - - GetAttachment - - GetAttachments - - UploadAttachment - example: Get - Integrations: - title: Integrations + - customer + ItemRef: x-internal: true - allOf: - - type: object - properties: - results: - type: array - items: - $ref: '#/components/schemas/Integration' - - $ref: '#/components/schemas/PagingInfo' + type: object + title: Item reference + nullable: true + properties: + id: + type: string + example: 80000002-1675158984 + description: 'Unique identifier for the item associated with the transaction. The `itemRef` object is currently supported only for QuickBooks Desktop. You can specify either `itemRef` or `accountRef`, but not both.' + MappingOptions: + title: Mapping options + type: object + additionalProperties: false + x-examples: {} + properties: + expenseProvider: + type: string + description: Name of the expense integration. + example: Partner Expense + nullable: true + accounts: + type: array + description: Array of available accounts for mapping. + nullable: true + items: + $ref: '#/components/schemas/AccountMappingInfo' + trackingCategories: + type: array + description: Array of available tracking categories for mapping. + nullable: true + items: + $ref: '#/components/schemas/TrackingCategoryMappingInfo' + taxRates: + type: array + description: Array of available tax rates for mapping. + nullable: true + items: + $ref: '#/components/schemas/TaxRateMappingInfo' PagingInfo: type: object title: Pagination information @@ -4448,66 +11778,14 @@ components: - totalResults - _links examples: - - pageNumber: 1 - pageSize: 10 - totalResults: 1 - _links: - self: - href: '/companies/{id}/data/{dataType}' - current: - href: '/companies/{id}/data/{dataType}?page=1&pageSize=10' - Profile: - title: Profile - description: Describes your Codat client instance - examples: - - name: Bob's Burgers - logoUrl: 'https://client-images.codat.io/logo/042399f5-d104-4f38-9ce8-cac3524f4e88_5806cb1f-7342-4c0e-a0a8-99bfbc47b0ff.png' - iconUrl: 'https://client-images.codat.io/icon/042399f5-d104-4f38-9ce8-cac3524f4e88_3f5623af-d992-4c22-bc08-e58c520a8526.ico' - redirectUrl: 'https://bobs-burgers.{countrySuffix}/{companyId}' - whiteListUrls: - - 'https://bobs-burgers.com' - - 'https://bobs-burgers.co.uk' - confirmCompanyName: true - type: object - properties: - name: - type: string - example: Bob's Burgers - description: The name given to the instance. - logoUrl: - type: string - description: Static url to your organization's logo. - example: 'https://client-images.codat.io/logo/042399f5-d104-4f38-9ce8-cac3524f4e88_5806cb1f-7342-4c0e-a0a8-99bfbc47b0ff.png' - iconUrl: - type: string - description: Static url to your organization's icon. - example: 'https://client-images.codat.io/icon/042399f5-d104-4f38-9ce8-cac3524f4e88_3f5623af-d992-4c22-bc08-e58c520a8526.ico' - redirectUrl: - type: string - example: 'https://bobs-burgers.{countrySuffix}/{companyId}' - description: 'The redirect URL pasted on to the SMB once Codat''s [Hosted Link](https://docs.codat.io/auth-flow/authorize-hosted-link) has been completed by the SMB.' - whiteListUrls: - type: array - description: A list of urls that are allowed to communicate with Codat. If empty any url is allowed to communicate with Codat. - items: - type: string - format: uri - example: 'https://bobs-burgers.com' - description: A url that is allowed to communicate with Codat. - apiKey: - type: string - deprecated: true - example: sartANTjHAkLdbyDfaynoTQb7pkmj6hXHmnQKMrB - description: The API key for this Codat instance. - confirmCompanyName: - type: boolean - deprecated: true - description: '`True` if the company name has been confirmed.' - required: - - name - - redirectUrl - x-stoplight: - id: b1fyq05edangf + - pageNumber: 1 + pageSize: 10 + totalResults: 1 + _links: + self: + href: '/companies/{id}/data/{dataType}' + current: + href: '/companies/{id}/data/{dataType}?page=1&pageSize=10' PullOperation: title: Pull operation description: |- @@ -4571,9 +11849,9 @@ components: nullable: true description: A message about a transient or persistent error returned by Codat or the source platform. requested: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' completed: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' progress: type: integer description: An integer signifying the progress of the pull operation. @@ -4638,10 +11916,10 @@ components: dataConnectionKey: $ref: '#/components/parameters/connectionId/schema' requestedOnUtc: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' description: The datetime when the push was requested. completedOnUtc: - $ref: '#/components/schemas/DateTime' + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' description: 'The datetime when the push was completed, null if Pending.' timeoutInMinutes: type: integer @@ -4885,320 +12163,912 @@ components: $ref: '#/components/schemas/PushOption/definitions/pushOptionProperty/properties/description' required: $ref: '#/components/schemas/PushOption/definitions/pushOptionProperty/properties/required' - ReadCompletedWebhook: - title: Read completed webhook + RecordRef: + x-internal: true type: object + title: Record reference properties: id: type: string - format: uuid - example: 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b - description: Unique identifier of the event. - eventType: + example: 40e3e57c-2322-4898-966c-ca41adfd23fd + description: Identifier of linked reference from mapping options. + ReimbursableExpenseTransactionLine: + x-internal: true + title: Reimbursable expense transaction line + type: object + properties: + description: type: string - description: The type of event. - generatedDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC the event was generated in Codat. - payload: - $ref: '#/components/schemas/ReadCompletedWebhook/definitions/readCompletedWebhookPayload' + example: 2-night hotel stay + description: line description + netAmount: + type: number + format: decimal + example: 100 + description: 'Amount of the line, exclusive of tax.' + taxAmount: + type: number + format: decimal + example: 20 + description: Amount of tax for the line. + taxRateRef: + $ref: '#/components/schemas/RecordRef' + accountRef: + description: The `accountRef` contains the `id` of the account the transaction is against. The `accountRef` object is required for all integrations except QBD which currently supports either itemRef or accountRef. + $ref: '#/components/schemas/RecordRef' + itemRef: + $ref: '#/components/schemas/ItemRef' + trackingRefs: + type: array + minItems: 1 + maxItems: 10 + nullable: true + items: + $ref: '#/components/schemas/TrackingRef' + invoiceTo: + $ref: '#/components/schemas/InvoiceTo' + required: + - netAmount + ReimbursableExpenseTransactionRequest: + title: Reimbursable expense transaction request + type: array + minItems: 1 + maxItems: 50 + items: + $ref: '#/components/schemas/ReimbursableExpenseTransactionRequest/definitions/reimbursableExpenseTransaction' definitions: - readCompletedWebhookPayload: - title: Read result webhook payload + reimbursableExpenseTransaction: + title: Reimbursable expense transaction type: object properties: - referenceCompany: - $ref: '#/components/schemas/Company/definitions/companyReference' - modifiedFromDate: - $ref: '#/components/schemas/DateTime' - description: The date time in UTC when the data types were last fetched and input into Codat's cache. + id: + type: string + example: 4d7c6929-7770-412b-91bb-44d3bc71d111 + format: uuid + description: Your unique identifier for the transaction. + reference: + type: string nullable: true - dataTypes: + description: User-friendly reference for the reimbursable expense. + contactRef: + $ref: '#/components/schemas/ReimbursementContactRef' + apAccountRef: + $ref: '#/components/schemas/apAccountRef' + issueDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date of the transaction was recorded. + dueDate: + description: Date the supplier is due to be paid. + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + currency: + type: string + example: GBP + description: Currency the transaction was recorded in. + currencyRate: + $ref: '#/components/schemas/ExpenseTransaction/properties/currencyRate' + notes: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: type: array + description: Array of transaction lines. + minItems: 1 + maxItems: 100 items: - $ref: '#/components/schemas/ReadCompletedWebhook/definitions/dataTypeReadSummary' - dataTypeReadSummary: - title: Summary of data type reads + $ref: '#/components/schemas/ReimbursableExpenseTransactionLine' + required: + - id + - contactRef + - issueDate + - dueDate + - currency + ReimbursementContactRef: + type: object + title: Contact reference + x-internal: true + properties: + id: + type: string + example: 40e3e57c-2322-4898-966c-ca41adfd23fd + description: Identifier of contact. + required: + - id + SupplementalData: + title: Supplemental data + type: object + x-internal: true + description: "Supplemental data is additional data you can include in our standard data types. \n\nIt is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data." + properties: + content: type: object - properties: - connectionId: - $ref: '#/components/parameters/connectionId/schema' - dataType: - $ref: '#/components/schemas/DataStatus/properties/dataType' - recordsModified: - type: boolean - example: false - description: '`True` if records have been created, updated or deleted in Codat''s cache.' - status: - $ref: '#/components/schemas/PullOperation/properties/status' - customProductReadCompleteWebhook: - title: Read completed webhook + additionalProperties: + type: object + additionalProperties: true + nullable: true + Supplier: + title: 'Accounting: Supplier' + description: |- + ## Overview + + From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/sync-for-expenses-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/sync-for-expenses-api#/schemas/Bill). + type: object + allOf: + - type: object + properties: + id: + type: string + description: 'Identifier for the supplier, unique to the company in the accounting software.' + supplierName: + type: string + nullable: true + description: 'Name of the supplier as recorded in the accounting system, typically the company name.' + contactName: + type: string + nullable: true + description: Name of the main contact for the supplier. + emailAddress: + type: string + nullable: true + description: Email address that the supplier may be contacted on. + phone: + type: string + nullable: true + description: Phone number that the supplier may be contacted on. + examples: + - +44 25691 154789 + - (877) 492-8687 + - 01224 658 999 + addresses: + type: array + nullable: true + description: An array of Addresses. + items: + $ref: '#/components/schemas/CompanyInformation/properties/addresses/items' + registrationNumber: + type: string + nullable: true + description: 'Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House.' + taxNumber: + type: string + nullable: true + description: Supplier's company tax number. + status: + $ref: '#/components/schemas/Supplier/definitions/supplierStatus' + defaultCurrency: + type: string + nullable: true + description: Default currency the supplier's transactional data is recorded in. + metadata: + $ref: '#/components/schemas/Account/allOf/2/properties/metadata' + supplementalData: + $ref: '#/components/schemas/SupplementalData' + - $ref: '#/components/schemas/Account/allOf/3' + required: + - status + definitions: + supplierRef: + title: Supplier reference + description: Reference to the supplier the record relates to. type: object properties: id: - $ref: '#/components/schemas/ReadCompletedWebhook/properties/id' - eventType: - $ref: '#/components/schemas/ReadCompletedWebhook/properties/eventType' - generatedDate: - $ref: '#/components/schemas/ReadCompletedWebhook/properties/generatedDate' - payload: - $ref: '#/components/schemas/ReadCompletedWebhook/definitions/customProductReadCompleteWebhookPayload' - customProductReadCompleteWebhookPayload: - title: Read result webhook payload + minLength: 1 + type: string + description: The supplier's unique ID + supplierName: + type: string + nullable: true + description: The supplier's name + required: + - id + supplierStatus: + description: Status of the supplier. + type: string + enum: + - Unknown + - Active + - Archived + examples: + - id: C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F + supplierName: Kelly's Industrial Supplies + contactName: Kelly's Industrial Supplies + emailAddress: sales@kellysupplies.com + phone: 07999 999999 + addresses: + - type: Billing + line1: Unit 51 + line2: Bakersfield Industrial Estate + city: Bakersfield + region: California + country: USA + postalcode: '93308' + registrationNumber: string + taxNumber: string + status: Unknown + defaultCurrency: string + metadata: + isDeleted: true + supplementalData: + content: + property1: + property1: null + property2: null + property2: + property1: null + property2: null + modifiedDate: '2022-10-23T00:00:00Z' + sourceModifiedDate: '2022-10-23T00:00:00Z' + Suppliers: + title: Suppliers + x-internal: true + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/Supplier' + - $ref: '#/components/schemas/PagingInfo' + SyncCompleteWebhook: + title: Sync complete webhook + x-internal: true + description: Webhook request body used to notify that a sync has completed. + type: object + properties: + ClientId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/ClientId' + ClientName: + $ref: '#/components/schemas/SyncFailedWebhook/properties/ClientName' + CompanyId: + $ref: '#/components/parameters/companyId/schema' + RuleId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/RuleId' + RuleType: + $ref: '#/components/schemas/SyncFailedWebhook/properties/RuleType' + AlertId: + $ref: '#/components/schemas/SyncFailedWebhook/properties/AlertId' + Message: + $ref: '#/components/schemas/SyncFailedWebhook/properties/Message' + Data: + $ref: '#/components/schemas/SyncCompleteWebhook/definitions/SyncCompleteWebhookData' + definitions: + SyncCompleteWebhookData: type: object + title: Sync complete webhook data properties: - referenceCompany: - $ref: '#/components/schemas/Company/definitions/companyReference' - modifiedFromDate: - $ref: '#/components/schemas/ReadCompletedWebhook/definitions/readCompletedWebhookPayload/properties/modifiedFromDate' - dataTypes: - type: array - items: - type: object - title: Summary of data type reads - properties: - connectionId: - $ref: '#/components/parameters/connectionId/schema' - dataType: - $ref: '#/components/schemas/DataStatus/properties/dataType' - recordsModified: - $ref: '#/components/schemas/ReadCompletedWebhook/definitions/dataTypeReadSummary/properties/recordsModified' - status: - $ref: '#/components/schemas/PullOperation/properties/status' - issues: - type: array - nullable: true - description: A array of issues encountered during a data read. - items: - $ref: '#/components/schemas/ReadCompletedWebhook/definitions/issue' - issue: - title: Issue + syncId: + $ref: '#/components/schemas/SyncFailedWebhook/definitions/SyncFailedWebhookData/properties/syncId' + syncType: + $ref: '#/components/schemas/SyncFailedWebhook/definitions/SyncFailedWebhookData/properties/syncType' + examples: + - ClientId: 30e0f9d2-52c0-4c9f-a806-bcd98a3bcd7e + ClientName: Expense Sync + CompanyId: 1f9559e7-8368-48c9-bdf4-f158e16b8b85 + AlertId: 33a4f8e9-09ae-4334-9b00-7bbe83024672 + RuleId: 5c27631d-3b63-4b50-8228-ee502fd113eb + RuleType: Sync Completed + Message: Sync 321363b4-efa9-4fbc-b71c-0b58d62f3248 for company 1f9559e7-8368-48c9-bdf4-f158e16b8b85 of type Expense completed successfully. + Data: + syncId: 321363b4-efa9-4fbc-b71c-0b58d62f3248 + syncType: Expense + SyncFailedWebhook: + title: Sync failed webhook + x-internal: true + description: Webhook request body used to notify that a sync has failed. + type: object + properties: + ClientId: + title: Client ID + type: string + format: uuid + description: Unique identifier for your client in Codat. + ClientName: + type: string + description: Name of your client in Codat. + CompanyId: + $ref: '#/components/parameters/companyId/schema' + RuleId: + type: string + format: uuid + description: Unique identifier for the rule. + deprecated: true + RuleType: + type: string + x-stoplight: + id: 34d52a089f08a + description: The type of rule. + AlertId: + type: string + format: uuid + description: Unique identifier of the webhook event. + Message: + type: string + description: A human-readable message about the webhook. + Data: + $ref: '#/components/schemas/SyncFailedWebhook/definitions/SyncFailedWebhookData' + definitions: + SyncFailedWebhookData: type: object - description: Details of a problem encountered during a data read. + title: Sync failed webhook data properties: - type: + syncId: type: string - description: The type of issue. - example: warning.validation - message: + format: uuid + example: a9367074-b5c3-42c4-9be4-be129f43577e + description: Unique identifier for the failed sync. + syncType: type: string - description: A message describing the issue. - example: Something doesn't look right about these accounts from Xero. You can see more information in the logs. - links: - title: Links - type: object - properties: - logs: - type: string - description: 'A link to the validation logs, providing details on any errors or warnings encountered.' - example: 'https://api.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/sync/{datasetId}/validation' - portal: - type: string - description: A link to the company's past data read history in the Codat portal. - example: 'https://app.codat.io/companies/0498e921-9b53-4396-a412-4f2f5983b0a2/pull-history' - readMore: - type: string - description: A link to Codat's documentation with additional information on how to troubleshoot this issue. - example: 'https://docs.codat.io/using-the-api/get-data-troubleshooting#warning.validation' - SupplementalDataConfiguration: - description: '' - title: Supplemental data configuration + description: The type of sync being performed. + FailureStage: + type: string + description: The stage of the job the sync failed. + examples: + - ClientId: 30e0f9d2-52c0-4c9f-a806-bcd98a3bcd7e + ClientName: Expense Sync + CompanyId: 1f9559e7-8368-48c9-bdf4-f158e16b8b85 + RuleId: 289c80dc-2aee-4b71-afff-9acd8d051080 + RuleType: Sync Failed + AlertId: 72c1103b-7f17-4a3a-8db5-67c2d360a516 + Message: Sync 3bead2a1-1b3d-4d90-8077-cddc5ca68b01 for company 1f9559e7-8368-48c9-bdf4-f158e16b8b85 of type Expense has failed at step Pushing. + Data: + syncId: 3bead2a1-1b3d-4d90-8077-cddc5ca68b01 + syncType: Expense + FailureStage: Pushing + SyncInitiated: + title: Sync initiated type: object properties: - supplementalDataConfig: - type: object - additionalProperties: - type: object - title: Supplemental data source configuration - description: The client's defined name for the object. - properties: - dataSource: - type: string - description: 'The underlying endpoint of the source system which the configuration is targeting. ' - pullData: - type: object - description: The additional properties that are required when pulling records. - additionalProperties: - type: string - description: The client's defined name for the property with the value being the source system's property name which the mapping is targeting. - pushData: - type: object - description: The additional properties that are required to create and/or update records. - additionalProperties: - type: string - description: The client's defined name for the property with the value being the source system's property name which the mapping is targeting. - examples: - - supplementalDataConfig: - orders-supplemental-data: - dataSource: /orders - pullData: - orderNumber: order_num - pushData: - orderNumber: order_num - SyncSetting: - title: SyncSetting - description: 'Describes how often, and how much history, should be fetched for the given data type when a pull operation is queued.' - examples: - - dataType: invoices - fetchOnFirstLink: true - syncSchedule: 24 - syncOrder: 0 - syncFromUtc: '2020-01-01T12:00:00.000Z' - syncFromWindow: 24 - monthsToSync: 24 - isLocked: true + syncId: + type: string + format: uuid + description: Unique identifier for the sync initiated. + additionalProperties: false + TaxRateMappingInfo: + title: Tax rate mapping info + x-internal: true type: object + additionalProperties: false + x-examples: + UK Tax Rate: + id: 23_Bills + name: 20% Bill tax Bills + code: 20% Bill tax + effectiveTaxRate: 20 + totalTaxRate: 20 + validTransactionTypes: + - Payment + - Reward properties: - dataType: - $ref: '#/components/schemas/DataStatus/properties/dataType' - fetchOnFirstLink: - type: boolean - description: Whether this data type should be queued after a company has authorized a connection. - syncSchedule: - type: integer - example: 24 - description: Number of hours after which this data type should be refreshed. - syncOrder: - type: integer - description: The sync in which data types are queued for a sync. - syncFromUtc: - $ref: '#/components/schemas/DateTime' - description: Date from which data should be fetched. Set this *or* `syncFromWindow`. - syncFromWindow: - type: integer - example: 24 - description: Number of months of data to be fetched. Set this *or* `syncFromUTC`. - monthsToSync: - type: integer - example: 24 - description: 'Months of data to fetch, for report data types (`balanceSheet` & `profitAndLoss`) only.' - isLocked: - type: boolean - description: '`True` if the [sync setting](https://docs.codat.io/knowledge-base/advanced-sync-settings) is locked.' - required: - - dataType - - fetchOnFirstLink - - syncSchedule - - syncOrder - SyncSettings: - title: Sync settings + id: + type: string + description: Unique identifier of tax rate. + example: 23_Bills + nullable: false + name: + type: string + description: Name of the tax rate in the accounting software. + example: 20% Bill tax Bills + nullable: false + code: + type: string + description: Code for the tax rate from the accounting software. + example: 20% Bill tax + nullable: true + effectiveTaxRate: + type: number + format: decimal + description: Effective tax rate. + example: 20 + totalTaxRate: + type: number + format: decimal + description: Total (not compounded) sum of the components of a tax rate. + example: 20 + validTransactionTypes: + $ref: '#/components/schemas/validTransactionTypes' + description: Supported transaction types for the tax rate. + TrackingCategoryMappingInfo: + title: Tracking category mapping info x-internal: true type: object + additionalProperties: false + x-examples: + Tracking Category with parentId: + id: DEPARTMENT_1 + name: TestLocation + hasChildren: false + parentId: DEPARTMENTS + Parent Tracking Category: + id: DEPARTMENTS + name: Departments + hasChildren: true properties: - clientId: - $ref: '#/components/schemas/ClientId' - settings: - type: array - items: - $ref: '#/components/schemas/SyncSetting' - overridesDefaults: + id: + type: string + description: Unique identifier of the tracking category. + example: DEPARTMENT_2 + nullable: false + name: + type: string + description: Name of the tracking category as it appears in the accounting software. + example: New York + nullable: false + hasChildren: type: boolean - description: 'Set to `True` if you want to override the default [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings).' - UpdateConnectionStatus: - title: Update connection + description: Boolean of whether the tracking category has child categories. + parentId: + type: string + description: ID of the parent tracking category + example: DEPARTMENTS + nullable: true + TrackingRef: + type: object + title: Tracking reference + x-internal: true + properties: + id: + type: string + example: e9a1b63d-9ff0-40e7-8038-016354b987e6 + description: Unique identifier of the linked reference from mapping options or the unique identifier of the linked customer. + dataType: + type: string + example: trackingCategories + default: trackingCategories + description: The type of the linked reference + enum: + - trackingCategories + - customers + TrackingRefAdjustmentTransaction: + type: object + title: Tracking reference x-internal: true + properties: + id: + type: string + example: e9a1b63d-9ff0-40e7-8038-016354b987e6 + description: Unique identifier of the linked reference from mapping options or the unique identifier of the linked customer or supplier. + dataType: + type: string + example: trackingCategories + default: trackingCategories + description: The type of the linked reference + enum: + - trackingCategories + - customers + - suppliers + Transaction: + title: Transaction type: object + additionalProperties: false properties: + transactionId: + type: string + description: Your unique idenfier of the transaction. + example: aa02271d-ed5f-47f5-be76-778d5905225a + nullable: true status: - $ref: '#/components/schemas/Connection/definitions/dataConnectionStatus' - description: The current authorization status of the data connection. + $ref: '#/components/schemas/TransactionStatus' + message: + type: string + description: Metadata such as validation errors or the resulting record created in the accounting software. nullable: true + integrationType: + $ref: '#/components/schemas/IntegrationType' + x-examples: + Successful Transaction: + transactionId: 8fdba4ed-e327-4925-be1a-b7a2b04627f7 + status: Completed + integrationType: expense + Unsuccessful Transaction: + transactionId: 3d694cd1-4cd9-4136-91db-32408195c6fc + status: ValidationError + message: The line item total -208.10((-195.01 + -1.09) + (-10.01 + -1.99)) must equal the transaction total -1.1 + integrationType: string + TransactionResponse: + title: Transaction response + x-internal: true + type: array + items: + $ref: '#/components/schemas/Transaction' + Transactions: + title: Transactions + x-internal: true additionalProperties: false - ValidationResult: - title: Validation result + allOf: + - type: object + properties: + results: + type: array + items: + $ref: '#/components/schemas/Transaction' + - $ref: '#/components/schemas/PagingInfo' + x-examples: + Example 1: + results: + - transactionId: aa02271d-ed5f-47f5-be76-778d5905225a + status: Completed + integrationType: expenses + - transactionId: 730177a2-8505-410a-9ebc-c2dd52e4bea9 + status: Completed + integrationType: expenses + pageNumber: 1 + pageSize: 100 + totalResults: 2 + links: + self: + href: string + current: + href: string + TransactionStatus: + title: Transaction status + x-internal: true + type: string + description: Status of the transaction. + enum: + - Unknown + - Pending + - ValidationError + - Completed + - PushError + example: Completed + nullable: true + TransferTransactionRequest: + title: Transfer type: object properties: - errors: - type: array - items: - $ref: '#/components/schemas/ValidationResult/definitions/validationItem' - warnings: - type: array - items: - $ref: '#/components/schemas/ValidationResult/definitions/validationItem' - definitions: - validationItem: - title: Validation item + description: + type: string + description: 'Any private, company notes about the transaction.' + example: Transfer from bank account Y to bank account Z + date: + allOf: + - description: Date of the transfer transaction as recorded in the accounting software. + - title: Date time + type: string + examples: + - 2022-10-23T00:00:00.000Z + - 2022-10-23T00:00:00.000Z + description: "In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:\n\n```\n2020-10-08T22:40:50Z\n2021-01-01T00:00:00\n```\n\n\n\nWhen syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:\n\n- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`\n- Unqualified local time: `2021-11-15T01:00:00`\n- UTC time offsets: `2021-11-15T01:00:00-05:00`\n\n> Time zones\n> \n> Not all dates from Codat will contain information about time zones. \n> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced." + from: type: object properties: - ruleId: - type: string - description: The unique identifier of the rule that wasn't met. - itemId: - type: string - description: The unique identifier of the item that was validated. - message: - type: string - description: The message that describes the validation warning or error. - validatorName: - type: string - description: The name of the validator that was used to validate the item. - WebhookConsumer: - title: Webhook consumer + accountRef: + type: object + title: Account reference + description: Reference of the account you are transferring money from. + properties: + id: + type: string + description: '''id'' from the Accounts data type.' + required: + - id + amount: + type: number + format: decimal + description: Amount that has been transferred from the account in the native currency of the account. + required: + - accountRef + - amount + to: + type: object + properties: + accountRef: + type: object + title: Account reference + description: Reference of the account you are transferring money to. + properties: + id: + type: string + description: '''id'' from the Accounts data type.' + required: + - id + amount: + type: number + format: decimal + description: Amount that has been transferred to the account in the native currency of the account. + required: + - accountRef + - amount + required: + - date + - from + - to + TransferTransactionResponse: + title: Create transfer response + x-internal: true type: object - description: "\uFEFF\x41\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x63\x6F\x6E\x73\x75\x6D\x65\x72\x20\x69\x73\x20\x61\x6E\x20\x48\x54\x54\x50\x20\x65\x6E\x64\x70\x6F\x69\x6E\x74\x20\x74\x68\x61\x74\x20\x64\x65\x76\x65\x6C\x6F\x70\x65\x72\x73\x20\x63\x61\x6E\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x20\x74\x6F\x20\x73\x75\x62\x73\x63\x72\x69\x62\x65\x20\x74\x6F\x20\x43\x6F\x64\x61\x74\x27\x73\x20\x73\x75\x70\x70\x6F\x72\x74\x65\x64\x20\x65\x76\x65\x6E\x74\x20\x74\x79\x70\x65\x73\x2E\n\n\x53\x65\x65\x20\x6F\x75\x72\x20\x64\x6F\x63\x75\x6D\x65\x6E\x74\x61\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x6D\x6F\x72\x65\x20\x64\x65\x74\x61\x69\x6C\x73\x20\x6F\x6E\x20\x5B\x43\x6F\x64\x61\x74\x27\x73\x20\x77\x65\x62\x68\x6F\x6F\x6B\x20\x73\x65\x72\x76\x69\x63\x65\x5D\x28\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x6F\x63\x73\x2E\x63\x6F\x64\x61\x74\x2E\x69\x6F\x2F\x75\x73\x69\x6E\x67\x2D\x74\x68\x65\x2D\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x6F\x76\x65\x72\x76\x69\x65\x77\x29\x2E\n" properties: - id: + syncId: type: string + example: cd937d46-8e41-43a9-9477-a79158ffd98a format: uuid - example: 8a210b68-6988-11ed-a1eb-0242ac120002 - description: Unique identifier for the webhook consumer. - url: + description: Unique id of sync created + UpdateCustomerResponse: + title: Update customer response + x-internal: true + allOf: + - type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/Customer' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + UpdateExpenseRequest: + title: Updating expense transaction request + type: object + properties: + type: type: string - format: uri - description: The URL that will consume webhook events dispatched by Codat. - disabled: - type: boolean - description: Flag that enables or disables the endpoint from receiving events. Disabled when set to `true`. - nullable: true - default: false - eventTypes: - type: array - description: An array of event types the webhook consumer subscribes to. - items: - type: string - companyTags: - type: array - nullable: true - description: 'Company tags provide an additional way to filter messages, independent of event types. Company tags are case-sensitive, and only messages from companies with matching tags will be sent to this endpoint. Use the format `tagKey:tagValue`.' - items: - type: string - maxLength: 128 - maxItems: 10 - definitions: - webhookConsumerPrototype: - title: Create webhook consumer - type: object - properties: - url: - $ref: '#/components/schemas/WebhookConsumer/properties/url' - disabled: - $ref: '#/components/schemas/WebhookConsumer/properties/disabled' - eventTypes: - $ref: '#/components/schemas/WebhookConsumer/properties/eventTypes' - companyTags: - $ref: '#/components/schemas/WebhookConsumer/properties/companyTags' - webhookConsumers: - title: Webhook consumers + example: Payment + description: The type of transaction. + enum: + - Payment + - Refund + - Reward + - Chargeback + issueDate: + type: string + description: Date the transaction was recorded. + example: '2022-06-28T00:00:00.000Z' + currency: + type: string + example: GBP + description: Currency the transaction was recorded in. + currencyRate: + $ref: '#/components/schemas/ExpenseTransaction/properties/currencyRate' + contactRef: + description: Supplier or Customer for the purchase to be associated to. + $ref: '#/components/schemas/ExpenseContactRef' + bankAccountRef: type: object + title: Bank account reference properties: - results: - type: array - maxItems: 50 - items: - $ref: '#/components/schemas/WebhookConsumer' - WebhookZapierKey: - title: Zapier integration key + id: + type: string + example: 787dfb37-5707-4dc0-8a86-8d74e4cc78ea + description: Identifier of the bank account. + merchantName: + type: string + description: Name of the merchant where the purchase took place + example: Amazon UK + lines: + type: array + description: Array of transaction lines. + items: + $ref: '#/components/schemas/ExpenseTransactionLine' + notes: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + required: + - type + - issueDate + - currency + UpdateExpenseResponse: + title: Update expense response + x-internal: true type: object properties: - key: + syncId: type: string - description: Integration key used to authorize Zapier's HTTP requests with Codat. - example: sk_integ_WM4dfoK1nKZnDE_kceze6hWDjbRwOZwG.us + description: Unique identifier for the update expense sync. examples: - - key: sk_integ_WM4dfoK1nKZnDE_kceze6hWDjbRwOZwG.us + Example 1: + syncId: 1ad0695c-4566-4715-918c-adbb03eac81e + UpdateReimbursableExpenseTransactionRequest: + title: Updating reimbursable expense transaction request + type: object + properties: + reference: + type: string + nullable: true + description: User-friendly reference for the reimbursable expense. + contactRef: + $ref: '#/components/schemas/ReimbursementContactRef' + apAccountRef: + $ref: '#/components/schemas/apAccountRef' + issueDate: + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + description: Date of the transaction was recorded. + dueDate: + description: Date the supplier is due to be paid. + $ref: '#/components/schemas/TransferTransactionRequest/properties/date/allOf/1' + currency: + type: string + example: GBP + description: Currency the transaction was recorded in. + currencyRate: + $ref: '#/components/schemas/ExpenseTransaction/properties/currencyRate' + notes: + type: string + description: 'Any private, company notes about the transaction.' + example: 'APPLE.COM/BILL - 09001077498 - Card Ending: 4590' + lines: + type: array + description: Array of transaction lines. + minItems: 1 + maxItems: 100 + items: + $ref: '#/components/schemas/ReimbursableExpenseTransactionLine' + required: + - contactRef + - issueDate + - dueDate + - currency + UpdateSupplierResponse: + title: Update supplier response + x-internal: true + allOf: + - type: object + properties: + data: + allOf: + - $ref: '#/components/schemas/Supplier' + - deprecated: true + - $ref: '#/components/schemas/PushOperation' + validFor: + title: Valid endpoints + x-internal: true + type: array + description: Supported endpoints for the account. + nullable: false + items: + type: string + enum: + - expense-transactions.Payment + - expense-transactions.Refund + - expense-transactions.Reward + - expense-transactions.Chargeback + - reimbursable-expense-transactions + - transfer-transactions + - adjustment-transactions + example: expense-transactions.Payment + validTransactionTypes: + title: Valid transaction types + x-internal: true + type: array + description: Supported transaction types for the account. + nullable: false + items: + type: string + enum: + - Payment + - Refund + - Reward + - Chargeback + example: Payment + parameters: + syncId: + name: syncId + in: path + required: true + schema: + type: string + format: uuid + example: 6fb40d5e-b13e-11ed-afa1-0242ac120002 + description: Unique identifier for a sync. + transactionId: + name: transactionId + in: path + required: true + schema: + type: string + format: uuid + example: 336694d8-2dca-4cb5-a28d-3ccb83e55eee + description: The unique identifier for your SMB's transaction. + page: + name: page + in: query + schema: + type: integer + format: int32 + minimum: 1 + example: 1 + default: 1 + description: 'Page number. [Read more](https://docs.codat.io/using-the-api/paging).' + pageSize: + name: pageSize + in: query + schema: + type: integer + format: int32 + default: 100 + example: 100 + minimum: 1 + maximum: 5000 + description: 'Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).' + query: + name: query + in: query + required: false + schema: + type: string + example: id=e3334455-1aed-4e71-ab43-6bccf12092ee + description: 'Codat query string. [Read more](https://docs.codat.io/using-the-api/querying).' + orderBy: + name: orderBy + in: query + required: false + schema: + type: string + example: '-modifiedDate' + description: 'Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).' + companyId: + name: companyId + in: path + required: true + schema: + type: string + format: uuid + example: 8a210b68-6988-11ed-a1eb-0242ac120002 + description: Unique identifier for your SMB in Codat. + description: Unique identifier for a company. + connectionId: + name: connectionId + in: path + required: true + schema: + type: string + format: uuid + example: 2e9d2c44-f675-40ba-8049-353bfcb5e171 + description: Unique identifier for a company's data connection. + description: Unique identifier for a connection. + dataType: + name: dataType + description: The key of a Codat data type + in: path + required: true + schema: + $ref: '#/components/schemas/DataType' + supplierId: + name: supplierId + in: path + required: true + schema: + type: string + examples: + - 13d946f0-c5d5-42bc-b092-97ece17923ab + - 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2 + - 7110701885 + - EILBDVJVNUAGVKRQ + description: Unique identifier for a supplier. + customerId: + name: customerId + in: path + required: true + schema: + type: string + examples: + - 13d946f0-c5d5-42bc-b092-97ece17923ab + - 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2 + - 7110701885 + - EILBDVJVNUAGVKRQ + description: Unique identifier for a customer. + timeoutInMinutes: + name: timeoutInMinutes + in: query + schema: + type: integer + format: int32 + description: Time limit for the push operation to complete before it is timed out. + allowSyncOnPushComplete: + name: allowSyncOnPushComplete + in: query + schema: + type: boolean + default: true + description: Allow a sync upon push completion. + forceUpdate: + name: forceUpdate + in: query + schema: + type: boolean + default: false + description: 'When updating data in the destination platform Codat checks the `sourceModifiedDate` against the `lastupdated` date from the accounting software, 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.' responses: - Bad-Request: + BadRequest: description: The request made is not valid. content: application/json: @@ -5213,15 +13083,6 @@ components: correlationId: bc997528a9d7abb9161ef45f05d38599 canBeRetried: Unknown detailedErrorCode: 0 - ConnectionManagementAllowedOrigins: - description: Success - content: - application/json: - schema: - $ref: '#/components/schemas/ConnectionManagementAllowedOrigins' - examples: - Allowed origins: - $ref: '#/components/examples/connectionManagementAllowedOriginsResponse' Malformed-Query: description: Your `query` parameter was not correctly formed content: @@ -5328,8 +13189,8 @@ components: correlationId: 0a40c2f31fc8f992fb88b0853e4166f3 canBeRetried: Unknown detailedErrorCode: 0 - Too-Many-Requests: - description: Too many requests were made in a given amount of time. Wait a short period and then try again. + Conflict: + description: The data type's dataset has not been requested or is still syncing. content: application/json: schema: @@ -5337,14 +13198,29 @@ components: examples: Conflict: value: - statusCode: 429 + statusCode: 409 service: PublicApi - error: You have made too many requests in a given amount of time; please retry later. + error: The data set has not been requested. correlationId: bc997528a9d7abb9161ef45f05d38599 canBeRetried: Unknown detailedErrorCode: 0 - Legal-Reasons: - description: Not currently available due to compliance limitations. Reach out to your Codat contact for further assistance. + Unprocessable-Content: + description: The requests made can't be processed. This may be due to differences in platform support. + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorMessage' + examples: + Conflict: + value: + statusCode: 422 + service: ExpenseSyncApi + error: Expense transaction updates are not supported for platforms other than Xero. + correlationId: 7c8e23841d211c87f49f30b248f70c93 + canBeRetried: Unknown + detailedErrorCode: 0 + Too-Many-Requests: + description: Too many requests were made in a given amount of time. Wait a short period and then try again. content: application/json: schema: @@ -5352,10 +13228,10 @@ components: examples: Conflict: value: - statusCode: 451 - service: StdznCustomData - error: Platform 'qudb' is not currently available for compliance purposes. - correlationId: f63017dabb9b87865573bea95a51e55d + statusCode: 429 + service: PublicApi + error: You have made too many requests in a given amount of time; please retry later. + correlationId: bc997528a9d7abb9161ef45f05d38599 canBeRetried: Unknown detailedErrorCode: 0 Internal-Server-Error: @@ -5388,124 +13264,6 @@ components: correlationId: bc997528a9d7abb9161ef45f05d38599 canBeRetried: Unknown detailedErrorCode: 0 - parameters: - companyId: - name: companyId - in: path - required: true - schema: - type: string - format: uuid - example: 8a210b68-6988-11ed-a1eb-0242ac120002 - description: Unique identifier for your SMB in Codat. - description: Unique identifier for a company. - connectionId: - name: connectionId - in: path - required: true - schema: - type: string - format: uuid - example: 2e9d2c44-f675-40ba-8049-353bfcb5e171 - description: Unique identifier for a company's data connection. - description: Unique identifier for a connection. - customDataIdentifier: - name: customDataIdentifier - in: path - required: true - schema: - type: string - example: DynamicsPurchaseOrders - description: Unique identifier for a custom data type. - page: - name: page - in: query - schema: - type: integer - format: int32 - minimum: 1 - example: 1 - default: 1 - description: 'Page number. [Read more](https://docs.codat.io/using-the-api/paging).' - pageSize: - name: pageSize - in: query - schema: - type: integer - format: int32 - default: 100 - example: 100 - minimum: 1 - maximum: 5000 - description: 'Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging).' - productIdentifier: - name: productIdentifier - in: path - required: true - schema: - type: string - examples: - - bank-feeds - - lending - - payables - - expenses - description: Human-readable product identifier for a product. - query: - name: query - in: query - required: false - schema: - type: string - example: id=e3334455-1aed-4e71-ab43-6bccf12092ee - description: 'Codat query string. [Read more](https://docs.codat.io/using-the-api/querying).' - orderBy: - name: orderBy - in: query - required: false - schema: - type: string - example: '-modifiedDate' - description: 'Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results).' - dataType: - name: dataType - description: The key of a Codat data type. - in: path - required: true - schema: - $ref: '#/components/schemas/DataType' - datasetId: - name: datasetId - in: path - required: true - schema: - type: string - format: uuid - description: Unique identifier for the dataset that completed its sync. - description: Unique identifier for the dataset that completed its sync. - platformKey: - name: platformKey - in: path - required: true - schema: - type: string - minLength: 4 - maxLength: 4 - pattern: '[a-z]{4}' - example: gbol - description: 'A unique 4-letter key to represent a platform in each integration. View [accounting](https://docs.codat.io/integrations/accounting/overview#platform-keys), [banking](https://docs.codat.io/integrations/banking/overview#platform-keys), and [commerce](https://docs.codat.io/integrations/commerce/overview#platform-keys) platform keys.' - description: A unique 4-letter key to represent a platform in each integration. - webhookId: - name: webhookId - in: path - required: true - schema: - $ref: '#/components/schemas/WebhookConsumer/properties/id' - description: Unique identifier for the webhook consumer. - examples: - connectionManagementAllowedOriginsResponse: - value: - allowedOrigins: - - 'https://www.bank-of-dave.com' securitySchemes: auth_header: name: Authorization diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 076cfc352..eebee3c68 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.715.0 +speakeasyVersion: 1.741.1 sources: bank-feeds-source: sourceNamespace: bank-feeds-source @@ -34,11 +34,10 @@ sources: - "1.1" sync-for-expenses-source: sourceNamespace: sync-for-expenses-source - sourceRevisionDigest: sha256:f8ef7ba352bd592880c7f83244de0c14b6474fddaeab684d77f596df550ce3ea - sourceBlobDigest: sha256:abe56a70fc7e5c5883c7e8a6bef59d69ceb2dc4eddbb3106ae06b6c5acb38408 + sourceRevisionDigest: sha256:62683d8745c6d1a5c87fcfcf9b37c8d8d6209fabf2dd7ea7082e8f21531d1ebc + sourceBlobDigest: sha256:aa297e6cc1e1af7d1b8f9832e8da914f7e3d365f13c80edf6ac5a0c5f8789aeb tags: - latest - - speakeasy-sdk-regen-1732638392 - prealpha sync-for-payables-source: sourceNamespace: sync-for-payables-source @@ -95,10 +94,10 @@ targets: sync-for-expenses-library: source: sync-for-expenses-source sourceNamespace: sync-for-expenses-source - sourceRevisionDigest: sha256:f8ef7ba352bd592880c7f83244de0c14b6474fddaeab684d77f596df550ce3ea - sourceBlobDigest: sha256:abe56a70fc7e5c5883c7e8a6bef59d69ceb2dc4eddbb3106ae06b6c5acb38408 - codeSamplesNamespace: sync-for-expenses-source-code-samples - codeSamplesRevisionDigest: sha256:822014a4673a26638b590d81a71d55691613d2d105856eb4bc2d670dd43960ae + sourceRevisionDigest: sha256:62683d8745c6d1a5c87fcfcf9b37c8d8d6209fabf2dd7ea7082e8f21531d1ebc + sourceBlobDigest: sha256:aa297e6cc1e1af7d1b8f9832e8da914f7e3d365f13c80edf6ac5a0c5f8789aeb + codeSamplesNamespace: sync-for-expenses-source-typescript-code-samples + codeSamplesRevisionDigest: sha256:bb05f8e2149ca791541f6ff5ed8005baa208f390fa6c37862ba77b9125ef4ed3 sync-for-payables-library: source: sync-for-payables-source sourceNamespace: sync-for-payables-source diff --git a/sync-for-expenses/.eslintrc.cjs b/sync-for-expenses/.eslintrc.cjs deleted file mode 100644 index 4d160bd21..000000000 --- a/sync-for-expenses/.eslintrc.cjs +++ /dev/null @@ -1,28 +0,0 @@ -/* eslint-env node */ -module.exports = { - root: true, - extends: [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "plugin:import/recommended", - "plugin:import/typescript", - ], - parser: "@typescript-eslint/parser", - plugins: ["@typescript-eslint"], - settings: { - "import/resolver": { - typescript: true, - node: true, - }, - }, - rules: { - // Handled by typescript compiler - "@typescript-eslint/no-unused-vars": "off", - "@typescript-eslint/ban-types": "off", - "@typescript-eslint/no-namespace": "off", - "@typescript-eslint/no-explicit-any": "off", - "import/no-named-as-default-member": "off", - - "import/no-default-export": "error", - }, -}; diff --git a/sync-for-expenses/.gitignore b/sync-for-expenses/.gitignore index eea1dcb2c..70c8e2302 100755 --- a/sync-for-expenses/.gitignore +++ b/sync-for-expenses/.gitignore @@ -1,3 +1,16 @@ +/examples/node_modules +/react-query +/mcp-server +/bin +/.eslintcache +.DS_Store +**/.speakeasy/temp/ +**/.speakeasy/logs/ +.DS_Store +/.speakeasy/reports +.env +.env.local +.env.*.local /funcs /core.* /__tests__ diff --git a/sync-for-expenses/.npmignore b/sync-for-expenses/.npmignore index 06cd8abf3..670ac0a62 100644 --- a/sync-for-expenses/.npmignore +++ b/sync-for-expenses/.npmignore @@ -1,9 +1,18 @@ **/* +!/FUNCTIONS.md +!/RUNTIMES.md +!/REACT_QUERY.md !/**/*.ts !/**/*.js +!/**/*.mjs +!/package.json +!/jsr.json +!/dist/**/*.json +!/esm/**/*.json !/**/*.map -/.eslintrc.js +/eslint.config.mjs +/.oxlintrc.json /cjs /.tshy /.tshy-* diff --git a/sync-for-expenses/.speakeasy/gen.lock b/sync-for-expenses/.speakeasy/gen.lock index 746e978f9..475b659bc 100755 --- a/sync-for-expenses/.speakeasy/gen.lock +++ b/sync-for-expenses/.speakeasy/gen.lock @@ -1,539 +1,1990 @@ lockVersion: 2.0.0 id: db99c2c9-4c7c-4123-9b4e-591ea4fb8649 management: - docChecksum: c99953b67f6a5e5522a0340e273decdb + docChecksum: 9d547e67e069f901700226b1e2d7ca24 docVersion: prealpha - speakeasyVersion: 1.447.0 - generationVersion: 2.463.0 - releaseVersion: 7.0.0 - configChecksum: 5330efec18d2691d6ddffedba51e587d + speakeasyVersion: 1.741.1 + generationVersion: 2.849.2 + releaseVersion: 7.1.0 + configChecksum: 6bb328d6ee01e287ff2b6dca9cab5b88 repoURL: https://github.com/codatio/client-sdk-typescript.git repoSubDirectory: sync-for-expenses - installationURL: https://gitpkg.now.sh/codatio/client-sdk-typescript/sync-for-expenses + installationURL: https://github.com/codatio/client-sdk-typescript published: true +persistentEdits: + generation_id: 4200fecd-27c3-4fae-888e-591a2c7c3f0c + pristine_commit_hash: 9fb47685ac9d6f523dac963c7c3adb9fb620b88e + pristine_tree_hash: ccbfd12fb728f326c0742db10f74dd8bdfed6cfa features: typescript: additionalDependencies: 0.1.0 - constsAndDefaults: 0.1.11 - core: 3.18.7 + constsAndDefaults: 0.1.14 + core: 3.26.40 decimal: 0.1.2 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 enumUnions: 0.1.0 envVarSecurityUsage: 0.1.2 - examples: 2.81.4 - globalSecurity: 2.82.11 + examples: 2.82.5 + globalSecurity: 2.82.15 globalSecurityCallbacks: 0.1.0 - globalSecurityFlattening: 0.1.0 - globalServerURLs: 2.82.4 + globalSecurityFlattening: 0.1.1 + globalServerURLs: 2.83.1 methodArguments: 0.1.2 - nameOverrides: 2.81.2 - nullables: 0.1.0 - responseFormat: 0.2.3 + nameOverrides: 2.81.4 + nullables: 0.1.1 + responseFormat: 0.3.0 retries: 2.83.0 - sdkHooks: 0.2.0 + sdkHooks: 0.4.0 serverEventsSentinels: 0.1.0 uploadStreams: 0.1.0 - webhooks: 1.0.0 -generatedFiles: - - .eslintrc.cjs - - .gitattributes - - .npmignore - - CONTRIBUTING.md - - FUNCTIONS.md - - RUNTIMES.md - - USAGE.md - - docs/lib/utils/retryconfig.md - - docs/sdk/models/errors/errormessage.md - - docs/sdk/models/operations/createaccountrequest.md - - docs/sdk/models/operations/createadjustmenttransactionrequest.md - - docs/sdk/models/operations/createbankaccountrequest.md - - docs/sdk/models/operations/createconnectionrequest.md - - docs/sdk/models/operations/createconnectionrequestbody.md - - docs/sdk/models/operations/createcustomerrequest.md - - docs/sdk/models/operations/createexpensetransactionrequest.md - - docs/sdk/models/operations/createpartnerexpenseconnectionrequest.md - - docs/sdk/models/operations/createreimbursableexpensetransactionrequest.md - - docs/sdk/models/operations/createsupplierrequest.md - - docs/sdk/models/operations/createtransfertransactionrequest.md - - docs/sdk/models/operations/deletecompanyrequest.md - - docs/sdk/models/operations/deleteconnectionrequest.md - - docs/sdk/models/operations/getcompanyconfigurationrequest.md - - docs/sdk/models/operations/getcompanyinforequest.md - - docs/sdk/models/operations/getcompanyrequest.md - - docs/sdk/models/operations/getconnectionrequest.md - - docs/sdk/models/operations/getcreatebankaccountsmodelrequest.md - - docs/sdk/models/operations/getcreatechartofaccountsmodelrequest.md - - docs/sdk/models/operations/getcustomerrequest.md - - docs/sdk/models/operations/getdatastatusdatastatuses.md - - docs/sdk/models/operations/getdatastatusrequest.md - - docs/sdk/models/operations/getlastsuccessfulsyncrequest.md - - docs/sdk/models/operations/getlatestsyncrequest.md - - docs/sdk/models/operations/getmappingoptionsrequest.md - - docs/sdk/models/operations/getpulloperationrequest.md - - docs/sdk/models/operations/getpushoperationrequest.md - - docs/sdk/models/operations/getsupplierrequest.md - - docs/sdk/models/operations/getsyncbyidrequest.md - - docs/sdk/models/operations/getsynctransactionrequest.md - - docs/sdk/models/operations/listcompaniesrequest.md - - docs/sdk/models/operations/listconnectionsrequest.md - - docs/sdk/models/operations/listcustomersrequest.md - - docs/sdk/models/operations/listpulloperationsrequest.md - - docs/sdk/models/operations/listpushoperationsrequest.md - - docs/sdk/models/operations/listsuppliersrequest.md - - docs/sdk/models/operations/listsyncsrequest.md - - docs/sdk/models/operations/listsynctransactionsrequest.md - - docs/sdk/models/operations/refreshalldatatypesrequest.md - - docs/sdk/models/operations/refreshdatatyperequest.md - - docs/sdk/models/operations/setcompanyconfigurationrequest.md - - docs/sdk/models/operations/unlinkconnectionrequest.md - - docs/sdk/models/operations/unlinkconnectionupdateconnection.md - - docs/sdk/models/operations/updatecompanyrequest.md - - docs/sdk/models/operations/updatecustomerrequest.md - - docs/sdk/models/operations/updateexpensetransactionrequest.md - - docs/sdk/models/operations/updatereimbursableexpensetransactionrequest.md - - docs/sdk/models/operations/updatesupplierrequest.md - - docs/sdk/models/operations/uploadexpenseattachmentrequest.md - - docs/sdk/models/shared/accountingaccount.md - - docs/sdk/models/shared/accountingaddress.md - - docs/sdk/models/shared/accountingaddresstype.md - - docs/sdk/models/shared/accountingbankaccount.md - - docs/sdk/models/shared/accountingcustomer.md - - docs/sdk/models/shared/accountingsupplier.md - - docs/sdk/models/shared/accountmappinginfo.md - - docs/sdk/models/shared/accountmappinginfoaccounttype.md - - docs/sdk/models/shared/accountprototype.md - - docs/sdk/models/shared/accountreference.md - - docs/sdk/models/shared/accountstatus.md - - docs/sdk/models/shared/accounttype.md - - docs/sdk/models/shared/adjustmenttransactionline.md - - docs/sdk/models/shared/adjustmenttransactionrequest.md - - docs/sdk/models/shared/adjustmenttransactionresponse.md - - docs/sdk/models/shared/apaccountref.md - - docs/sdk/models/shared/attachment.md - - docs/sdk/models/shared/attachmentupload.md - - docs/sdk/models/shared/bankaccount.md - - docs/sdk/models/shared/bankaccountdetails.md - - docs/sdk/models/shared/bankaccountreference.md - - docs/sdk/models/shared/bankaccountstatus.md - - docs/sdk/models/shared/bankaccounttype.md - - docs/sdk/models/shared/clientratelimitreachedwebhook.md - - docs/sdk/models/shared/clientratelimitreachedwebhookdata.md - - docs/sdk/models/shared/clientratelimitresetwebhook.md - - docs/sdk/models/shared/clientratelimitresetwebhookdata.md - - docs/sdk/models/shared/clientratelimitwebhook.md - - docs/sdk/models/shared/clientratelimitwebhookpayload.md - - docs/sdk/models/shared/codatfile.md - - docs/sdk/models/shared/companies.md - - docs/sdk/models/shared/company.md - - docs/sdk/models/shared/companyconfiguration.md - - docs/sdk/models/shared/companyinformation.md - - docs/sdk/models/shared/companyinformationtype.md - - docs/sdk/models/shared/companyreference.md - - docs/sdk/models/shared/companyreferencelinks.md - - docs/sdk/models/shared/companyrequestbody.md - - docs/sdk/models/shared/companysyncstatus.md - - docs/sdk/models/shared/connection.md - - docs/sdk/models/shared/connections.md - - docs/sdk/models/shared/contact.md - - docs/sdk/models/shared/createaccountresponse.md - - docs/sdk/models/shared/createaccountresponsemetadata.md - - docs/sdk/models/shared/createaccountresponsevaliddatatypelinks.md - - docs/sdk/models/shared/createbankaccountresponse.md - - docs/sdk/models/shared/createbankaccountresponsebankaccounttype.md - - docs/sdk/models/shared/createcustomerresponse.md - - docs/sdk/models/shared/createexpenseresponse.md - - docs/sdk/models/shared/createreimbursableexpenseresponse.md - - docs/sdk/models/shared/createsupplierresponse.md - - docs/sdk/models/shared/customer.md - - docs/sdk/models/shared/customerdetails.md - - docs/sdk/models/shared/customers.md - - docs/sdk/models/shared/customerstatus.md - - docs/sdk/models/shared/dataconnectionerror.md - - docs/sdk/models/shared/dataconnectionstatus.md - - docs/sdk/models/shared/datasetstatus.md - - docs/sdk/models/shared/datastatus.md - - docs/sdk/models/shared/datatype.md - - docs/sdk/models/shared/datatypes.md - - docs/sdk/models/shared/definitiontransaction.md - - docs/sdk/models/shared/errorstatus.md - - docs/sdk/models/shared/errorvalidation.md - - docs/sdk/models/shared/errorvalidationitem.md - - docs/sdk/models/shared/expensecontactref.md - - docs/sdk/models/shared/expensecontactreftype.md - - docs/sdk/models/shared/expensessyncwebhook.md - - docs/sdk/models/shared/expensessyncwebhookpayload.md - - docs/sdk/models/shared/expensetransaction.md - - docs/sdk/models/shared/expensetransactionline.md - - docs/sdk/models/shared/from.md - - docs/sdk/models/shared/halref.md - - docs/sdk/models/shared/integrationtype.md - - docs/sdk/models/shared/invoiceto.md - - docs/sdk/models/shared/invoicetotype.md - - docs/sdk/models/shared/itemref.md - - docs/sdk/models/shared/items.md - - docs/sdk/models/shared/links.md - - docs/sdk/models/shared/mappingoptions.md - - docs/sdk/models/shared/metadata.md - - docs/sdk/models/shared/phone.md - - docs/sdk/models/shared/phonenumberitems.md - - docs/sdk/models/shared/phonenumbertype.md - - docs/sdk/models/shared/propertiedatatype.md - - docs/sdk/models/shared/pulloperation.md - - docs/sdk/models/shared/pulloperations.md - - docs/sdk/models/shared/pushchangetype.md - - docs/sdk/models/shared/pushfieldvalidation.md - - docs/sdk/models/shared/pushoperation.md - - docs/sdk/models/shared/pushoperationchange.md - - docs/sdk/models/shared/pushoperationref.md - - docs/sdk/models/shared/pushoperations.md - - docs/sdk/models/shared/pushoperationstatus.md - - docs/sdk/models/shared/pushoption.md - - docs/sdk/models/shared/pushoptionchoice.md - - docs/sdk/models/shared/pushoptionproperty.md - - docs/sdk/models/shared/pushoptiontype.md - - docs/sdk/models/shared/pushvalidationinfo.md - - docs/sdk/models/shared/recordref.md - - docs/sdk/models/shared/reimbursableexpensetransaction.md - - docs/sdk/models/shared/reimbursableexpensetransactionline.md - - docs/sdk/models/shared/reimbursementcontactref.md - - docs/sdk/models/shared/security.md - - docs/sdk/models/shared/sourcetype.md - - docs/sdk/models/shared/status.md - - docs/sdk/models/shared/supplementaldata.md - - docs/sdk/models/shared/supplier.md - - docs/sdk/models/shared/supplierdetails.md - - docs/sdk/models/shared/suppliers.md - - docs/sdk/models/shared/supplierstatus.md - - docs/sdk/models/shared/synccompletewebhook.md - - docs/sdk/models/shared/synccompletewebhookdata.md - - docs/sdk/models/shared/syncfailedwebhook.md - - docs/sdk/models/shared/syncfailedwebhookdata.md - - docs/sdk/models/shared/taxratemappinginfo.md - - docs/sdk/models/shared/to.md - - docs/sdk/models/shared/trackingcategorymappinginfo.md - - docs/sdk/models/shared/trackingref.md - - docs/sdk/models/shared/trackingrefadjustmenttransaction.md - - docs/sdk/models/shared/trackingrefadjustmenttransactiondatatype.md - - docs/sdk/models/shared/trackingrefdatatype.md - - docs/sdk/models/shared/transaction.md - - docs/sdk/models/shared/transactions.md - - docs/sdk/models/shared/transactionstatus.md - - docs/sdk/models/shared/transactionstatus1.md - - docs/sdk/models/shared/transfertransactionrequest.md - - docs/sdk/models/shared/transfertransactionrequestaccountreference.md - - docs/sdk/models/shared/transfertransactionresponse.md - - docs/sdk/models/shared/type.md - - docs/sdk/models/shared/updatecustomerresponse.md - - docs/sdk/models/shared/updatecustomerresponseaccountingcustomer.md - - docs/sdk/models/shared/updateexpenserequest.md - - docs/sdk/models/shared/updateexpenserequestbankaccountreference.md - - docs/sdk/models/shared/updateexpenserequesttype.md - - docs/sdk/models/shared/updateexpenseresponse.md - - docs/sdk/models/shared/updatereimbursableexpensetransactionrequest.md - - docs/sdk/models/shared/updatesupplierresponse.md - - docs/sdk/models/shared/updatesupplierresponseaccountingsupplier.md - - docs/sdk/models/shared/validation.md - - docs/sdk/models/shared/validationitem.md - - docs/sdk/models/shared/validdatatypelinks.md - - docs/sdk/models/shared/validfor.md - - docs/sdk/models/shared/validtransactiontypes.md - - docs/sdk/models/shared/weblink.md - - docs/sdks/accounts/README.md - - docs/sdks/adjustments/README.md - - docs/sdks/attachments/README.md - - docs/sdks/bankaccounts/README.md - - docs/sdks/codatsyncexpenses/README.md - - docs/sdks/companies/README.md - - docs/sdks/companyinfo/README.md - - docs/sdks/configuration/README.md - - docs/sdks/connections/README.md - - docs/sdks/customers/README.md - - docs/sdks/expenses/README.md - - docs/sdks/managedata/README.md - - docs/sdks/mappingoptions/README.md - - docs/sdks/pushoperations/README.md - - docs/sdks/reimbursements/README.md - - docs/sdks/suppliers/README.md - - docs/sdks/sync/README.md - - docs/sdks/transactionstatus/README.md - - docs/sdks/transfers/README.md - - jsr.json - - package.json - - src/core.ts - - src/funcs/accountsCreate.ts - - src/funcs/accountsGetCreateModel.ts - - src/funcs/adjustmentsCreate.ts - - src/funcs/attachmentsUpload.ts - - src/funcs/bankAccountsCreate.ts - - src/funcs/bankAccountsGetCreateModel.ts - - src/funcs/companiesCreate.ts - - src/funcs/companiesDelete.ts - - src/funcs/companiesGet.ts - - src/funcs/companiesList.ts - - src/funcs/companiesUpdate.ts - - src/funcs/companyInfoGet.ts - - src/funcs/configurationGet.ts - - src/funcs/configurationSet.ts - - src/funcs/connectionsCreate.ts - - src/funcs/connectionsCreatePartnerExpenseConnection.ts - - src/funcs/connectionsDelete.ts - - src/funcs/connectionsGet.ts - - src/funcs/connectionsList.ts - - src/funcs/connectionsUnlink.ts - - src/funcs/customersCreate.ts - - src/funcs/customersGet.ts - - src/funcs/customersList.ts - - src/funcs/customersUpdate.ts - - src/funcs/expensesCreate.ts - - src/funcs/expensesUpdate.ts - - src/funcs/manageDataGet.ts - - src/funcs/manageDataGetPullOperation.ts - - src/funcs/manageDataListPullOperations.ts - - src/funcs/manageDataRefreshAllDataTypes.ts - - src/funcs/manageDataRefreshDataType.ts - - src/funcs/mappingOptionsGetMappingOptions.ts - - src/funcs/pushOperationsGet.ts - - src/funcs/pushOperationsList.ts - - src/funcs/reimbursementsCreate.ts - - src/funcs/reimbursementsUpdate.ts - - src/funcs/suppliersCreate.ts - - src/funcs/suppliersGet.ts - - src/funcs/suppliersList.ts - - src/funcs/suppliersUpdate.ts - - src/funcs/syncGet.ts - - src/funcs/syncGetLastSuccessfulSync.ts - - src/funcs/syncGetLatestSync.ts - - src/funcs/syncList.ts - - src/funcs/transactionStatusGet.ts - - src/funcs/transactionStatusList.ts - - src/funcs/transfersCreate.ts - - src/hooks/hooks.ts - - src/hooks/index.ts - - src/hooks/types.ts - - src/index.ts - - src/lib/base64.ts - - src/lib/config.ts - - src/lib/dlv.ts - - src/lib/encodings.ts - - src/lib/files.ts - - src/lib/http.ts - - src/lib/is-plain-object.ts - - src/lib/logger.ts - - src/lib/matchers.ts - - src/lib/primitives.ts - - src/lib/retries.ts - - src/lib/schemas.ts - - src/lib/sdks.ts - - src/lib/security.ts - - src/lib/url.ts - - src/sdk/accounts.ts - - src/sdk/adjustments.ts - - src/sdk/attachments.ts - - src/sdk/bankaccounts.ts - - src/sdk/companies.ts - - src/sdk/companyinfo.ts - - src/sdk/configuration.ts - - src/sdk/connections.ts - - src/sdk/customers.ts - - src/sdk/expenses.ts - - src/sdk/index.ts - - src/sdk/managedata.ts - - src/sdk/mappingoptions.ts - - src/sdk/models/errors/errormessage.ts - - src/sdk/models/errors/httpclienterrors.ts - - src/sdk/models/errors/index.ts - - src/sdk/models/errors/sdkerror.ts - - src/sdk/models/errors/sdkvalidationerror.ts - - src/sdk/models/operations/createaccount.ts - - src/sdk/models/operations/createadjustmenttransaction.ts - - src/sdk/models/operations/createbankaccount.ts - - src/sdk/models/operations/createconnection.ts - - src/sdk/models/operations/createcustomer.ts - - src/sdk/models/operations/createexpensetransaction.ts - - src/sdk/models/operations/createpartnerexpenseconnection.ts - - src/sdk/models/operations/createreimbursableexpensetransaction.ts - - src/sdk/models/operations/createsupplier.ts - - src/sdk/models/operations/createtransfertransaction.ts - - src/sdk/models/operations/deletecompany.ts - - src/sdk/models/operations/deleteconnection.ts - - src/sdk/models/operations/getcompany.ts - - src/sdk/models/operations/getcompanyconfiguration.ts - - src/sdk/models/operations/getcompanyinfo.ts - - src/sdk/models/operations/getconnection.ts - - src/sdk/models/operations/getcreatebankaccountsmodel.ts - - src/sdk/models/operations/getcreatechartofaccountsmodel.ts - - src/sdk/models/operations/getcustomer.ts - - src/sdk/models/operations/getdatastatus.ts - - src/sdk/models/operations/getlastsuccessfulsync.ts - - src/sdk/models/operations/getlatestsync.ts - - src/sdk/models/operations/getmappingoptions.ts - - src/sdk/models/operations/getpulloperation.ts - - src/sdk/models/operations/getpushoperation.ts - - src/sdk/models/operations/getsupplier.ts - - src/sdk/models/operations/getsyncbyid.ts - - src/sdk/models/operations/getsynctransaction.ts - - src/sdk/models/operations/index.ts - - src/sdk/models/operations/listcompanies.ts - - src/sdk/models/operations/listconnections.ts - - src/sdk/models/operations/listcustomers.ts - - src/sdk/models/operations/listpulloperations.ts - - src/sdk/models/operations/listpushoperations.ts - - src/sdk/models/operations/listsuppliers.ts - - src/sdk/models/operations/listsyncs.ts - - src/sdk/models/operations/listsynctransactions.ts - - src/sdk/models/operations/refreshalldatatypes.ts - - src/sdk/models/operations/refreshdatatype.ts - - src/sdk/models/operations/setcompanyconfiguration.ts - - src/sdk/models/operations/unlinkconnection.ts - - src/sdk/models/operations/updatecompany.ts - - src/sdk/models/operations/updatecustomer.ts - - src/sdk/models/operations/updateexpensetransaction.ts - - src/sdk/models/operations/updatereimbursableexpensetransaction.ts - - src/sdk/models/operations/updatesupplier.ts - - src/sdk/models/operations/uploadexpenseattachment.ts - - src/sdk/models/shared/accountingaddresstype.ts - - src/sdk/models/shared/accountmappinginfo.ts - - src/sdk/models/shared/accountprototype.ts - - src/sdk/models/shared/accountstatus.ts - - src/sdk/models/shared/accounttype.ts - - src/sdk/models/shared/adjustmenttransactionline.ts - - src/sdk/models/shared/adjustmenttransactionrequest.ts - - src/sdk/models/shared/adjustmenttransactionresponse.ts - - src/sdk/models/shared/apaccountref.ts - - src/sdk/models/shared/attachment.ts - - src/sdk/models/shared/attachmentupload.ts - - src/sdk/models/shared/bankaccount.ts - - src/sdk/models/shared/bankaccountdetails.ts - - src/sdk/models/shared/bankaccountstatus.ts - - src/sdk/models/shared/clientratelimitreachedwebhook.ts - - src/sdk/models/shared/clientratelimitreachedwebhookdata.ts - - src/sdk/models/shared/clientratelimitresetwebhook.ts - - src/sdk/models/shared/clientratelimitresetwebhookdata.ts - - src/sdk/models/shared/clientratelimitwebhook.ts - - src/sdk/models/shared/clientratelimitwebhookpayload.ts - - src/sdk/models/shared/codatfile.ts - - src/sdk/models/shared/companies.ts - - src/sdk/models/shared/company.ts - - src/sdk/models/shared/companyconfiguration.ts - - src/sdk/models/shared/companyinformation.ts - - src/sdk/models/shared/companyreference.ts - - src/sdk/models/shared/companyrequestbody.ts - - src/sdk/models/shared/companysyncstatus.ts - - src/sdk/models/shared/connection.ts - - src/sdk/models/shared/connections.ts - - src/sdk/models/shared/contact.ts - - src/sdk/models/shared/createaccountresponse.ts - - src/sdk/models/shared/createbankaccountresponse.ts - - src/sdk/models/shared/createcustomerresponse.ts - - src/sdk/models/shared/createexpenseresponse.ts - - src/sdk/models/shared/createreimbursableexpenseresponse.ts - - src/sdk/models/shared/createsupplierresponse.ts - - src/sdk/models/shared/customer.ts - - src/sdk/models/shared/customerdetails.ts - - src/sdk/models/shared/customers.ts - - src/sdk/models/shared/customerstatus.ts - - src/sdk/models/shared/dataconnectionerror.ts - - src/sdk/models/shared/dataconnectionstatus.ts - - src/sdk/models/shared/datastatus.ts - - src/sdk/models/shared/datatype.ts - - src/sdk/models/shared/definitiontransaction.ts - - src/sdk/models/shared/errorvalidation.ts - - src/sdk/models/shared/errorvalidationitem.ts - - src/sdk/models/shared/expensecontactref.ts - - src/sdk/models/shared/expensessyncwebhook.ts - - src/sdk/models/shared/expensessyncwebhookpayload.ts - - src/sdk/models/shared/expensetransaction.ts - - src/sdk/models/shared/expensetransactionline.ts - - src/sdk/models/shared/halref.ts - - src/sdk/models/shared/index.ts - - src/sdk/models/shared/integrationtype.ts - - src/sdk/models/shared/invoiceto.ts - - src/sdk/models/shared/itemref.ts - - src/sdk/models/shared/items.ts - - src/sdk/models/shared/links.ts - - src/sdk/models/shared/mappingoptions.ts - - src/sdk/models/shared/metadata.ts - - src/sdk/models/shared/phonenumberitems.ts - - src/sdk/models/shared/phonenumbertype.ts - - src/sdk/models/shared/propertiedatatype.ts - - src/sdk/models/shared/pulloperation.ts - - src/sdk/models/shared/pulloperations.ts - - src/sdk/models/shared/pushchangetype.ts - - src/sdk/models/shared/pushfieldvalidation.ts - - src/sdk/models/shared/pushoperation.ts - - src/sdk/models/shared/pushoperationchange.ts - - src/sdk/models/shared/pushoperationref.ts - - src/sdk/models/shared/pushoperations.ts - - src/sdk/models/shared/pushoperationstatus.ts - - src/sdk/models/shared/pushoption.ts - - src/sdk/models/shared/pushoptionchoice.ts - - src/sdk/models/shared/pushoptionproperty.ts - - src/sdk/models/shared/pushoptiontype.ts - - src/sdk/models/shared/pushvalidationinfo.ts - - src/sdk/models/shared/recordref.ts - - src/sdk/models/shared/reimbursableexpensetransaction.ts - - src/sdk/models/shared/reimbursableexpensetransactionline.ts - - src/sdk/models/shared/reimbursementcontactref.ts - - src/sdk/models/shared/security.ts - - src/sdk/models/shared/status.ts - - src/sdk/models/shared/supplementaldata.ts - - src/sdk/models/shared/supplier.ts - - src/sdk/models/shared/supplierdetails.ts - - src/sdk/models/shared/suppliers.ts - - src/sdk/models/shared/supplierstatus.ts - - src/sdk/models/shared/synccompletewebhook.ts - - src/sdk/models/shared/synccompletewebhookdata.ts - - src/sdk/models/shared/syncfailedwebhook.ts - - src/sdk/models/shared/syncfailedwebhookdata.ts - - src/sdk/models/shared/taxratemappinginfo.ts - - src/sdk/models/shared/trackingcategorymappinginfo.ts - - src/sdk/models/shared/trackingref.ts - - src/sdk/models/shared/trackingrefadjustmenttransaction.ts - - src/sdk/models/shared/transaction.ts - - src/sdk/models/shared/transactions.ts - - src/sdk/models/shared/transactionstatus.ts - - src/sdk/models/shared/transfertransactionrequest.ts - - src/sdk/models/shared/transfertransactionresponse.ts - - src/sdk/models/shared/updatecustomerresponse.ts - - src/sdk/models/shared/updateexpenserequest.ts - - src/sdk/models/shared/updateexpenseresponse.ts - - src/sdk/models/shared/updatereimbursableexpensetransactionrequest.ts - - src/sdk/models/shared/updatesupplierresponse.ts - - src/sdk/models/shared/validation.ts - - src/sdk/models/shared/validationitem.ts - - src/sdk/models/shared/validfor.ts - - src/sdk/models/shared/validtransactiontypes.ts - - src/sdk/pushoperations.ts - - src/sdk/reimbursements.ts - - src/sdk/sdk.ts - - src/sdk/suppliers.ts - - src/sdk/sync.ts - - src/sdk/transactionstatus.ts - - src/sdk/transfers.ts - - src/sdk/types/blobs.ts - - src/sdk/types/constdatetime.ts - - src/sdk/types/decimal.ts - - src/sdk/types/enums.ts - - src/sdk/types/fp.ts - - src/sdk/types/index.ts - - src/sdk/types/operations.ts - - src/sdk/types/rfcdate.ts - - src/sdk/types/streams.ts - - tsconfig.json + webhooks: 1.5.1 +trackedFiles: + .gitattributes: + id: 24139dae6567 + last_write_checksum: sha1:26d16d8297b104945139da8c25bd38feeaad3e25 + pristine_git_object: 113eead5093c17d43a46159132885318f281a68a + .npmignore: + id: aa70c1f807c3 + last_write_checksum: sha1:6572da81f2e7a978ec29c22c2210bf461c5897b2 + pristine_git_object: 670ac0a62d7e568c9d44a14f5deafb8442a255d8 + FUNCTIONS.md: + id: 21b9df02aaeb + last_write_checksum: sha1:2f8b25d26a01c0f4018a251664cdb1ac70768d20 + pristine_git_object: 5fe8f2c17fba803ff4cd7fdd4181b3ce44137884 + RUNTIMES.md: + id: 620c490847b6 + last_write_checksum: sha1:e45b854f02c357cbcfdb8c3663000e8339e16505 + pristine_git_object: 27731c3b5ace66bedc454ed5acbe15075aacd3dc + USAGE.md: + id: 3aed33ce6e6f + last_write_checksum: sha1:6e3f5fdc68e19c3f66ee787bf960d5bceaacc7f9 + pristine_git_object: f7d004f5791e9b942f9ffbf35bec838e972bc5e0 + docs/lib/utils/retryconfig.md: + id: 0ce9707cb848 + last_write_checksum: sha1:bc4454e196fcd219f5a78da690375a884f5ed07b + pristine_git_object: 08f95f4552349360b2c0b01802aa71ec3a55d2c2 + docs/sdk/models/errors/errormessage.md: + id: 9affd825e395 + last_write_checksum: sha1:8a78a55a9626c5ef2079259cd8971c4ef7544a3a + pristine_git_object: 3e89159c2619ac94bfa3d84a9f352922d4b916a0 + docs/sdk/models/operations/createaccountrequest.md: + id: db311ac2227e + last_write_checksum: sha1:83164a5aa752412a3d0178cd4a3b9cb169108028 + pristine_git_object: 27b0dab276b2378d76af94952445f515412ee59e + docs/sdk/models/operations/createadjustmenttransactionrequest.md: + id: c3a30a33547a + last_write_checksum: sha1:1015f12015db0500841696c5b870ee011c9a30f9 + pristine_git_object: 54b394d040980a2412b59e3e5b6e09626f739505 + docs/sdk/models/operations/createbankaccountrequest.md: + id: 37b65b9ee948 + last_write_checksum: sha1:5db97ffff65b591b746b9f5aa23acc17bb7256bc + pristine_git_object: e4a966d6762f6b1c3c0e9c8a6ab6157c4dc14d47 + docs/sdk/models/operations/createconnectionrequest.md: + id: 43b13768fa3c + last_write_checksum: sha1:7afa123cc313d80bc68294231e1e2695853e3479 + pristine_git_object: b4131fdf4f4b3d5e13faec6459f829cad67f9c53 + docs/sdk/models/operations/createconnectionrequestbody.md: + id: cd2a86f8a996 + last_write_checksum: sha1:db18e94fc09476688b410f26f2dffb97f4e5ad5c + pristine_git_object: 2905789d14539b4a0a9348630275d97985cb13a6 + docs/sdk/models/operations/createcustomerrequest.md: + id: a69e49094dee + last_write_checksum: sha1:cbfc7ec1ed3c567b3a49d437879c18e6382152cb + pristine_git_object: a128fffd99f905ea5736fcef4f4bd0b47a0b0b24 + docs/sdk/models/operations/createexpensetransactionrequest.md: + id: dd727553911f + last_write_checksum: sha1:93ed85145963e17271d98e4073824965bb5f881b + pristine_git_object: 8f18821dded805dd9af1bd09e002c1fbe221bcf3 + docs/sdk/models/operations/createpartnerexpenseconnectionrequest.md: + id: 42e50c2a4fe4 + last_write_checksum: sha1:39b8157d47f5339a755995737fbe97c23458c9b3 + pristine_git_object: b1c1be5bee1168a3b90c67c2aef3acb9441435a1 + docs/sdk/models/operations/createreimbursableexpensetransactionrequest.md: + id: cd5616f06263 + last_write_checksum: sha1:9bc02ea20043a90dfe5e5f41c04be11cec2c91aa + pristine_git_object: af3df215bddb413f0001d0bd33e459d0c44b79f2 + docs/sdk/models/operations/createsupplierrequest.md: + id: ae6f827978a1 + last_write_checksum: sha1:674d789d00022c28a8b6b5dc52bff1b73bed56bb + pristine_git_object: f6ca363080249a94f64baa00e2aeeabbc83e62d7 + docs/sdk/models/operations/createtransfertransactionrequest.md: + id: 217b753097ec + last_write_checksum: sha1:f208718fe2840cc2b3a03e4bd50196e09a1d6bd0 + pristine_git_object: c931c53321b0c9070f8b4dd6ce45368fa11808c2 + docs/sdk/models/operations/deletecompanyrequest.md: + id: 01348357e18f + last_write_checksum: sha1:27cfd7bc354091298276444b8c7bcd5cf4956af0 + pristine_git_object: a7c499d90f29a226314d2d522810d8670ffec084 + docs/sdk/models/operations/deleteconnectionrequest.md: + id: 70fe5fee5d10 + last_write_checksum: sha1:f0b888ca9bff2b5cf324dc7441110382c4a1bd96 + pristine_git_object: 3bdb93d2879d96acd67315a25003654b6bd52810 + docs/sdk/models/operations/getcompanyconfigurationrequest.md: + id: ced9b4ed0a7f + last_write_checksum: sha1:a3f40b9b68da262a1ba34186ddf1c35bc2bc0b0f + pristine_git_object: 1b6830504c7eeae0e31e9d831cfe7df18c023949 + docs/sdk/models/operations/getcompanyinforequest.md: + id: 5b3108df97d4 + last_write_checksum: sha1:f735c28cbbd3bcb24fdf6d765a1b82d5560654ff + pristine_git_object: 5dcdfd81f24b8097be378545bbadc1817ddeb27a + docs/sdk/models/operations/getcompanyrequest.md: + id: cb14d531f942 + last_write_checksum: sha1:8dfb6a8751e0fd595de115d757231ee367043f44 + pristine_git_object: dc098ef998b6f05e508eb8ba9f84e3b5c4fd7153 + docs/sdk/models/operations/getconnectionrequest.md: + id: 6545321b6497 + last_write_checksum: sha1:838bd028fae4be985b9bf4a810929a028f4be857 + pristine_git_object: 4479cf98b6cc8eb76121803c68745234f03bbfc0 + docs/sdk/models/operations/getcreatebankaccountsmodelrequest.md: + id: 0e4ec0ad05f3 + last_write_checksum: sha1:b1162342ac862f8b951d0a1233e2889ffa54fa43 + pristine_git_object: 2bb1328eb7711adcfce02f61d3640c7669c35e8a + docs/sdk/models/operations/getcreatechartofaccountsmodelrequest.md: + id: 66e8596350bf + last_write_checksum: sha1:2dbc8492e351577ea59533850198b16faa7b0266 + pristine_git_object: a65ef72787e4200be099a47cfa34d3d960590b41 + docs/sdk/models/operations/getcustomerrequest.md: + id: edafb6bf96c4 + last_write_checksum: sha1:bc47703114a5d2cbb3cd8d041dcabf62e3df8b49 + pristine_git_object: 87bae75373abc2f5027a4dc4203e38de13a9b2e5 + docs/sdk/models/operations/getdatastatusdatastatuses.md: + id: 4f0c9aaee44b + last_write_checksum: sha1:9ca526362a5a239ad1729e673afd1cb0f3f6021d + pristine_git_object: e12b6f6632c83e6025c52b8c2e14a4e3da890ad8 + docs/sdk/models/operations/getdatastatusrequest.md: + id: 5734357a58fc + last_write_checksum: sha1:9792e21a16e6bff7d3483963e80136c8b7d31a01 + pristine_git_object: f9a15f355a7c16e376477e78334235eae50de568 + docs/sdk/models/operations/getlastsuccessfulsyncrequest.md: + id: c1e78a2d5a75 + last_write_checksum: sha1:0d18f2bdd002b41c9e0e8e9653746a4ab2858b11 + pristine_git_object: d9a3a8b77b522a648e0625cee82cf0ea8a323726 + docs/sdk/models/operations/getlatestsyncrequest.md: + id: 5c189b027c58 + last_write_checksum: sha1:4993be496d209b0682888ed15da4efa47b570a36 + pristine_git_object: dd432ec9814af652882f829253939fb1917c0bba + docs/sdk/models/operations/getmappingoptionsrequest.md: + id: 7d26d2f1e731 + last_write_checksum: sha1:50f36d26143323deffc66b32fc429a43a6b2cfbd + pristine_git_object: 43ecd008593eda3727a554b05524883bcc8506ec + docs/sdk/models/operations/getpulloperationrequest.md: + id: 6d02e8f040db + last_write_checksum: sha1:0e9f6530b698531cc14b4d375bf5d08641bdd324 + pristine_git_object: e8be4affae6d280fde5fb69a40e040c9c41e0a90 + docs/sdk/models/operations/getpushoperationrequest.md: + id: a2a83a8acbf9 + last_write_checksum: sha1:27267b9ae93c864c920748edf3f9978199fead87 + pristine_git_object: 36492fcc30a19cfaa4e892dc6e8f42f417efea8d + docs/sdk/models/operations/getsupplierrequest.md: + id: 7bff526bb864 + last_write_checksum: sha1:03abc7188d0e03ff885fff58562441f98e7854ed + pristine_git_object: 0496c3d26f53be218ac251e0d0e3944a86943b57 + docs/sdk/models/operations/getsyncbyidrequest.md: + id: a2b85abdc53f + last_write_checksum: sha1:41998738ae3f1f01dbcc709b3d1331643e0f6640 + pristine_git_object: 2af028b0df46b15ca0d72937f8319783ec6a93a3 + docs/sdk/models/operations/getsynctransactionrequest.md: + id: 61f1f3dcd6de + last_write_checksum: sha1:3032063e7883c6a6dbedd899063c4b65c629761e + pristine_git_object: 8a9bea2af9b8b0223b3e905709d0b3f8fb96a406 + docs/sdk/models/operations/listcompaniesrequest.md: + id: 605dcf27a33d + last_write_checksum: sha1:26392767927a7c5bc257b7274e4e96d5e9771f8d + pristine_git_object: 75a1acdf86f3499603b51bf7ce0f87c1e404ea99 + docs/sdk/models/operations/listconnectionsrequest.md: + id: 6b2aa79356a9 + last_write_checksum: sha1:fc076d0c550a616df3c37712b93dda5e1ec87484 + pristine_git_object: 34da692d50c2e2e7094e216aecd66be40dc59445 + docs/sdk/models/operations/listcustomersrequest.md: + id: ca10f7a6aa5c + last_write_checksum: sha1:af9a925b6777eba8dada97a3ca53baeccae654ef + pristine_git_object: f803f4ef718a73bf5dd9b211be396dc590ce1c0c + docs/sdk/models/operations/listpulloperationsrequest.md: + id: d91fce013be3 + last_write_checksum: sha1:2650ec1347f347efb1b0b55b345e673a09765659 + pristine_git_object: b94d5fe2f31304ad742a8dffa953f290c34ebf94 + docs/sdk/models/operations/listpushoperationsrequest.md: + id: c2d50d99d272 + last_write_checksum: sha1:0ae03844f63445ea957acce740d1a54687ab06f4 + pristine_git_object: fc45f4aac3fc7207b16aab58fccf19921f6435d3 + docs/sdk/models/operations/listsuppliersrequest.md: + id: 32a966d4f6d7 + last_write_checksum: sha1:ffc0eccd0085ba30e93409f94a44d7d312d758c1 + pristine_git_object: 77f29b496aa80b016b9cb58055f8ea9549457e4b + docs/sdk/models/operations/listsyncsrequest.md: + id: 8cce29edcbeb + last_write_checksum: sha1:0da84eb37d38d72e643435f9b12af223e3073e36 + pristine_git_object: e7795c50abf653a9e7742b5a0527e11612241836 + docs/sdk/models/operations/listsynctransactionsrequest.md: + id: ff58dbaa4772 + last_write_checksum: sha1:3d2cb720a255817aaf58c04aaf49249cc0293286 + pristine_git_object: 68662c906a00470b9c4e09db2e38b9d6db6f35ea + docs/sdk/models/operations/refreshalldatatypesrequest.md: + id: c4d9aab31ee7 + last_write_checksum: sha1:3cc35cbedcdaee56a8b308ece2d8054c23a22597 + pristine_git_object: b89b2938cf7b4a59b5598c94bc4bd04544e6671b + docs/sdk/models/operations/refreshdatatyperequest.md: + id: e47fb457a374 + last_write_checksum: sha1:e344443a40b11f584e922b96e1908025175c7642 + pristine_git_object: 13c8bf6a4863e86446de3c4d35114a624e85da17 + docs/sdk/models/operations/replacecompanyrequest.md: + id: 2f79da54c18c + last_write_checksum: sha1:9e39848d3486075911dd7c453a56f50e4fd7e593 + pristine_git_object: 39a5f1615abbdb0abb6dfdad59a2e673e32a0ab1 + docs/sdk/models/operations/setcompanyconfigurationrequest.md: + id: e6a6ec124086 + last_write_checksum: sha1:63addaee259834fdf6818c63e43c5e32f8565ec7 + pristine_git_object: 08215ca9535af6e4989d0eb0e04abe105a161416 + docs/sdk/models/operations/unlinkconnectionrequest.md: + id: 9f3addbe3925 + last_write_checksum: sha1:d502454a001169442628a18036e3ad2974a9dc21 + pristine_git_object: 13e769eb4e4b8c6f52a0f95bbcb9ff0b79aa2aa9 + docs/sdk/models/operations/unlinkconnectionupdateconnection.md: + id: 454c96f5ba2d + last_write_checksum: sha1:027c8a21295614dec328672db78f127f1d0ee5c0 + pristine_git_object: 31e24da54b47b69689d6e170358cfe179da06c76 + docs/sdk/models/operations/updatecompanyrequest.md: + id: 6501e66b32d2 + last_write_checksum: sha1:3825dc8684bb12d1057d1af9eeab8543f5550847 + pristine_git_object: f7f4e0ce7a405b0e95edb05471775f2c0d4c2885 + docs/sdk/models/operations/updatecustomerrequest.md: + id: 12bf67fd6cac + last_write_checksum: sha1:2c3047aa8d2a1da1b210d55b862ed0e960c2d108 + pristine_git_object: 44258e0e3ed8183b946ebdd6bcef24130adfcec7 + docs/sdk/models/operations/updateexpensetransactionrequest.md: + id: b27b44512267 + last_write_checksum: sha1:5d5fc6c9a2bfd9437a08e1bf5a2c2e917a6023e0 + pristine_git_object: 1cd159b1793d776b1f1bb54d9f200536b9d5bf55 + docs/sdk/models/operations/updatereimbursableexpensetransactionrequest.md: + id: f4fdf80ad8a8 + last_write_checksum: sha1:a757b1ac18a1b4f58cb87a3c2249ca654f27c2cf + pristine_git_object: 46b059d4e472a4a46d1559b2149dfeca68b2331d + docs/sdk/models/operations/updatesupplierrequest.md: + id: 1f70a198fbdf + last_write_checksum: sha1:5ca5666180f1d78aa55fb90ee4c998838e7b4ca5 + pristine_git_object: e9f5b954809c594a74db87fbe77f71ed00e33b7a + docs/sdk/models/operations/uploadexpenseattachmentrequest.md: + id: 66dc665704d7 + last_write_checksum: sha1:d772e8e91772eb7d9e471d929643c4c9937a29df + pristine_git_object: e208b8b736c0489e101383e07ed0af29655e181d + docs/sdk/models/shared/accountingaccount.md: + id: bb60e4c3dd9d + last_write_checksum: sha1:5c1164eba52052c82e86a5ea7f5f8d6817f3e268 + pristine_git_object: 4e964b870d34f682f673e6c363f68766de2ce50f + docs/sdk/models/shared/accountingaddress.md: + id: 3964ba07ab0f + last_write_checksum: sha1:eb2eeb38bc9bfe3f78b88b2079f85f7384a8816f + pristine_git_object: dcd6f23b71decaff842ab24c9912128fbf52157e + docs/sdk/models/shared/accountingaddresstype.md: + id: 9a69f5fe6f07 + last_write_checksum: sha1:6d90da9f881d5a16ff6ba3574e8b9d1d59e0683a + pristine_git_object: 329f374d823ef9b12046a77807a6d5da5f67be7b + docs/sdk/models/shared/accountingbankaccount.md: + id: 35bbd90bb6b9 + last_write_checksum: sha1:77c6b9676d43d638e9b5b7dd7e6beed725fa3162 + pristine_git_object: 060a3e9cfd3c66fcad569059fc713d6b370fb49d + docs/sdk/models/shared/accountingcustomer.md: + id: cc9bd80c804b + last_write_checksum: sha1:88e687104f768ebb0668900c3f76975c9fe78548 + pristine_git_object: 65cf569e8f3fecbfebde506338d9ab4763907e93 + docs/sdk/models/shared/accountingsupplier.md: + id: 641d9aede215 + last_write_checksum: sha1:df8d99cfc9a5f3754d2c6fc598c129de4f58def5 + pristine_git_object: a4a8675ee2caff5cc93ef7325c7e9c38594059c7 + docs/sdk/models/shared/accountmappinginfo.md: + id: d9e3190979a2 + last_write_checksum: sha1:3d60823645c3904d6f740e473a7f84a1215ff15c + pristine_git_object: a3ba74ac76c9041592cd67b7b6d02c2dc5d78a9a + docs/sdk/models/shared/accountmappinginfoaccounttype.md: + id: b2ca2fce0414 + last_write_checksum: sha1:732f850570fea89a41c28c27364820fcb5a61305 + pristine_git_object: 3f6674836e7008180553ecc0c74b7fa4dd7a7536 + docs/sdk/models/shared/accountprototype.md: + id: 8552719629cb + last_write_checksum: sha1:b78714fb10ccbfa7ce0c875e7a392fc20c694f55 + pristine_git_object: 0e92b9eca9dcda92c3eb8d71337f1a78f6b660e6 + docs/sdk/models/shared/accountreference.md: + id: 58428b661587 + last_write_checksum: sha1:7079cf6e4596face312d240957ec0e571053171e + pristine_git_object: c23a324e21088d668739785a6140abc8426fb1b4 + docs/sdk/models/shared/accountstatus.md: + id: a8da19baff08 + last_write_checksum: sha1:74efa97740311033c4e66522e28f796ee6017498 + pristine_git_object: dcf16a7ae9774f8c80b8ae506b4072befd9f460e + docs/sdk/models/shared/accounttype.md: + id: 1c016d1deade + last_write_checksum: sha1:ab70310eca5b76ab9905d05c5eba606f79d81f1a + pristine_git_object: 7c160556e0a24e8371434aeccf692dc7cf1cb6ac + docs/sdk/models/shared/adjustmenttransactionline.md: + id: ddb509a1b7ac + last_write_checksum: sha1:f672733c658fd52d9e0a603950cb26d19672d978 + pristine_git_object: e7b048d634190c45cfb7d0b84e5f834ac0297f66 + docs/sdk/models/shared/adjustmenttransactionrequest.md: + id: 4eba922fb1dc + last_write_checksum: sha1:b5c632097e74525993002877668844c453f27c16 + pristine_git_object: 9a51d7d46d0e2331807f9820e98834a201aa37ec + docs/sdk/models/shared/adjustmenttransactionresponse.md: + id: dfac84202376 + last_write_checksum: sha1:609f49928ff37a85133cf033e6cd0414507bc917 + pristine_git_object: cbb13947e3af8cbf8b13c27f9dee0f869866d5a8 + docs/sdk/models/shared/apaccountref.md: + id: 8516b225919f + last_write_checksum: sha1:707ff795524f0d801295ecf35f27065eaf4286db + pristine_git_object: dc0b26bd178812912e88b21fa921da46c7ab2c72 + docs/sdk/models/shared/attachment.md: + id: 36725df2d249 + last_write_checksum: sha1:5d885c0da20bd5f2d15daf50aeb453ca26aef952 + pristine_git_object: b4a8ddd602739f4a27ede9f08e43fd29a014b8d1 + docs/sdk/models/shared/attachmentupload.md: + id: d5b29912ce98 + last_write_checksum: sha1:036adade458b937511e8dd1cad816c13c65531d9 + pristine_git_object: 83587492993db1e17150669307e2a579271e1bc7 + docs/sdk/models/shared/bankaccount.md: + id: a71ab3d0bf48 + last_write_checksum: sha1:727e5ab413d86808c8948d4bcfc10bfe8f2770b8 + pristine_git_object: 271d7b9f64c89bbad486520850187b924a9a3646 + docs/sdk/models/shared/bankaccountdetails.md: + id: 6c5e922b55b6 + last_write_checksum: sha1:2cd58aa895356c8802355245b1105eda7aff00e5 + pristine_git_object: ce07f9f39238cffd1c4f8d99f774e15da14fe1a0 + docs/sdk/models/shared/bankaccountreference.md: + id: 76d37dffe8f1 + last_write_checksum: sha1:af6dced8210746f40adf650dde8f1526a5bac36f + pristine_git_object: f816304a208f756b1235af4e43625e8fe7116b05 + docs/sdk/models/shared/bankaccountstatus.md: + id: bb5d0730c110 + last_write_checksum: sha1:79aaeea2dca8eb019e273a5eefbee8208bd2bb18 + pristine_git_object: b3f48e4196aaef304f92be93d55f1d1deb6f41c1 + docs/sdk/models/shared/bankaccounttype.md: + id: c1d73962c4ab + last_write_checksum: sha1:4e9749a9df89554e752d3bf6027547cf7600f784 + pristine_git_object: 06fd8ef7778271c33e931abac707583fb0b017b8 + docs/sdk/models/shared/clientratelimitwebhook.md: + id: 2ad187176bc8 + last_write_checksum: sha1:573f4cacdb8f5f798ab5cc6af27bf99f60c1407d + pristine_git_object: f7b31736e107948c1accbe5e66d85fdfadee1b72 + docs/sdk/models/shared/clientratelimitwebhookpayload.md: + id: 455bfe8fe625 + last_write_checksum: sha1:55f949ea0daf452a977f09af105e1edd66e17405 + pristine_git_object: b2e4e808d588fc5bd7f169e0032640c6e275821a + docs/sdk/models/shared/codatfile.md: + id: b32544e3a5a3 + last_write_checksum: sha1:dd726f3342d6a51b42287ccccd9b24862f1e5fdf + pristine_git_object: 992373efbf1acfb59845881463c16ab88bacd20f + docs/sdk/models/shared/companies.md: + id: d934c193ecb6 + last_write_checksum: sha1:d3f0ef331bdbbdb37d7cc6b6a9ef2c0b8ac2054a + pristine_git_object: 6c3aad5c00d9d3d8ddd978e99e285e0f10e6a190 + docs/sdk/models/shared/company.md: + id: fb5206b144df + last_write_checksum: sha1:13ef9972bebfae5d2d3d57ebfa7336facbcbbe31 + pristine_git_object: cd71b8f877a7cff3200eb2da7bde68024c5433d2 + docs/sdk/models/shared/companyconfiguration.md: + id: c4c1d029ff3d + last_write_checksum: sha1:edd49468ce3b38509f83c809c53948512c44113e + pristine_git_object: 0c3c170f72ee8ef7ec7fbcaeeaa304ba18b8a983 + docs/sdk/models/shared/companyinformation.md: + id: d78b0b4b325a + last_write_checksum: sha1:d87db98d8a478508e8eefc5b95d16920e18ed60b + pristine_git_object: ca591ec430574c3cb180999a97265c06f4c028c2 + docs/sdk/models/shared/companyinformationphonenumberstype.md: + id: 5f6b258b79a6 + last_write_checksum: sha1:df1b8fed79a874de04d60bd5b98cb4fdce8a8512 + pristine_git_object: d3d67cf979961e3e9ea4b64018da70f258c5de26 + docs/sdk/models/shared/companyinformationtype.md: + id: 963eace7a313 + last_write_checksum: sha1:d5111467a3c19932085078af5062c961138a0d06 + pristine_git_object: aff62fba01135c29ce5fbc72f850566c488c80c1 + docs/sdk/models/shared/companyreference.md: + id: eb83cae3df56 + last_write_checksum: sha1:a4e935ba8aa07fbf8a5c782add8083adb1065c55 + pristine_git_object: 75a856b2420bd1f1380ae47922742a4a1d86b59d + docs/sdk/models/shared/companyreferencelinks.md: + id: bdd0ee48a65d + last_write_checksum: sha1:538851bc2f7cc686ac53bd2c63cda7d44f1e3659 + pristine_git_object: 5d3c7889a3a3e8287a5690df8383a18915707003 + docs/sdk/models/shared/companyrequestbody.md: + id: 3f3dfd0aa865 + last_write_checksum: sha1:882d83423205127fa4b428883840cdfc2a415e9e + pristine_git_object: 1f7dc8ab105cb7f145df2c4f54f9ada43e855a4e + docs/sdk/models/shared/companysyncstatus.md: + id: ff34830a4405 + last_write_checksum: sha1:3468e400ab3e6f30398e6c4ea3b59c1757e94ee1 + pristine_git_object: babb4dbd831f76b849e4cad2a3042340d07a38cd + docs/sdk/models/shared/companyupdaterequest.md: + id: cef525a660f4 + last_write_checksum: sha1:8260c54339551aa570d7af7c408ee2f54d151dd8 + pristine_git_object: 53f4afb62fc92e3e5e8ece429318c5e509885275 + docs/sdk/models/shared/connection.md: + id: 1c171381dd82 + last_write_checksum: sha1:3e41a34647b5922e17cdfd0a30cde38bcf8da7b5 + pristine_git_object: 6000360b1c95d0050440a7ba2b94468dd0e846e1 + docs/sdk/models/shared/connections.md: + id: c39072f6f8dc + last_write_checksum: sha1:2237c241be5bd605d28691378482c6018ddd82e4 + pristine_git_object: 7660dd1cbc46fb0c01b855848b0fe3dbd26883de + docs/sdk/models/shared/contact.md: + id: e5934fdccf44 + last_write_checksum: sha1:6d6a14c74b687aa2e4e1f4e1481a33f868481b95 + pristine_git_object: f286d1cd0245bbfeb2237ccb23213b06b84164de + docs/sdk/models/shared/createaccountresponse.md: + id: 22d3c5961ed4 + last_write_checksum: sha1:7fe996f7c8bf3321c0032b2b2835682ab0927250 + pristine_git_object: b0420917dd36544e8be7d6ba9d5a145ffdfc38f2 + docs/sdk/models/shared/createaccountresponsemetadata.md: + id: d0d7ea926d42 + last_write_checksum: sha1:62a10c6208a14da74010ed6e4d653d2a315392ad + pristine_git_object: 09974cb785cc3ec684a8f2634882e5929ee1abe0 + docs/sdk/models/shared/createaccountresponsevaliddatatypelinks.md: + id: dfa2b04dcb36 + last_write_checksum: sha1:34b546425e43825c1e87d134f87974d2f7041567 + pristine_git_object: 00318b7e2f3c9b589dfcf74bd337e0cd3a94e34c + docs/sdk/models/shared/createbankaccountresponse.md: + id: 4683db5f43bc + last_write_checksum: sha1:7c206818ca47e75f64e39fae22559dea9631a71d + pristine_git_object: 7205d6bae9e55db7b51346073c2160f5525694b5 + docs/sdk/models/shared/createbankaccountresponsebankaccounttype.md: + id: e15c674001f0 + last_write_checksum: sha1:00e012aa0a77e3cf18fd99b0cb3e0ce3a63fe585 + pristine_git_object: 1b4c93f6180ba875bbc181eaaca63bb57594b1c6 + docs/sdk/models/shared/createcustomerresponse.md: + id: 1c74d5b7c8ba + last_write_checksum: sha1:e484709fd7c37eea7240d994c328e9aab74b2d84 + pristine_git_object: 9839b28b70347b863d424ff0e60b456f479a8b1b + docs/sdk/models/shared/createexpenseresponse.md: + id: 139e2fe718e5 + last_write_checksum: sha1:87d24a292b4aabdbbb550b10b5e98e74e315de64 + pristine_git_object: d6e45144f0fc864c06871386c762df0896d66cb1 + docs/sdk/models/shared/createreimbursableexpenseresponse.md: + id: 1688f14d5dd6 + last_write_checksum: sha1:c9bc98bb0f9c583b87066b244e505c9076c4ee1a + pristine_git_object: c6e99671e2c6c12f6c4802506d5d2626ffb4386d + docs/sdk/models/shared/createsupplierresponse.md: + id: 570bb3b8fced + last_write_checksum: sha1:ef749758bfd687ca49c74acc7e5b16c641d8cd3e + pristine_git_object: 463bbad393f0a4db2f848697b60cb61a257a629e + docs/sdk/models/shared/customer.md: + id: dcca51c7af48 + last_write_checksum: sha1:a8829552cb537926d17e16aeec28e21cf7010c1f + pristine_git_object: 18c747e2bb2bc198b51cb7589f7a539600dbb473 + docs/sdk/models/shared/customerdetails.md: + id: dbac8c3914b7 + last_write_checksum: sha1:bf18afff4283bf2ae5b338d3d2a1cf4eb0c20ddb + pristine_git_object: 3ad932471e27d749f56d1fc24c1a9b12f23e70ec + docs/sdk/models/shared/customers.md: + id: 9f3e26bb4101 + last_write_checksum: sha1:8bf223fec03d035c355690acaf4a6ee4543db8b5 + pristine_git_object: 1027cef144c4eb06acb91255952cd77cbd1459b4 + docs/sdk/models/shared/customerstatus.md: + id: cee6ce30ff25 + last_write_checksum: sha1:03a75d8623d5102ddc41121ba24fb36eae6ae9b4 + pristine_git_object: d58f3bb08d3a7b776f1cd9a49349c3198189b04a + docs/sdk/models/shared/dataconnectionerror.md: + id: 993cf6eb3364 + last_write_checksum: sha1:b3a75cf4c02efef713063a04fcf52d0a4956d8e0 + pristine_git_object: d61074d99d1fad75ec8bbc6630caf3b325dac646 + docs/sdk/models/shared/dataconnectionstatus.md: + id: fd14e3dc6ca5 + last_write_checksum: sha1:35c5cc26adb05b147de723522ed736691577f5c6 + pristine_git_object: cb907c67176f9a8e4e9494257e8cbc9ce9f69cf6 + docs/sdk/models/shared/datasetstatus.md: + id: 13ee7a38a328 + last_write_checksum: sha1:79d92a6b0352a57b16d40d3bbd4b6094df6a191d + pristine_git_object: 7969d33163c68cc8412ec8189d9816777de8a5c2 + docs/sdk/models/shared/datastatus.md: + id: cb4795d3f294 + last_write_checksum: sha1:9d079e81c22fce43e34e143722f527280dac4450 + pristine_git_object: 23cfe858a73bd0c77b20dd6e1a6742948935d422 + docs/sdk/models/shared/datatype.md: + id: 0338d85c906d + last_write_checksum: sha1:e8545e68e0db6f58d6d15d329591cb53ebc4694d + pristine_git_object: de4a6935d79f2c7c25f06f0ce20169b05a47d0ea + docs/sdk/models/shared/datatypes.md: + id: 673024637a09 + last_write_checksum: sha1:a7209db9947d51be6d91fefc46b3b5f3f0b8f795 + pristine_git_object: 551a8b937dc2860dd2d2b2d04a84104445060833 + docs/sdk/models/shared/definitiontransaction.md: + id: c10a91f68283 + last_write_checksum: sha1:77664cbbe85f52435e706ede36d77f3d0ffed23c + pristine_git_object: 906e07b824b06919aca6d544f92ac28094e19673 + docs/sdk/models/shared/errorstatus.md: + id: d836c01e48c6 + last_write_checksum: sha1:0225cc635c3a3759e3a3c4ae3bda2f6e915776c0 + pristine_git_object: 4fb4cb0ffb17acc2bf16f1375c7afd706b64b78c + docs/sdk/models/shared/errorvalidation.md: + id: a1197fba13d0 + last_write_checksum: sha1:f79cc696b29be728148c8d3b95528e776161752d + pristine_git_object: 23c0ea69b9a0ba38a3dbb717785c00f33a92cb60 + docs/sdk/models/shared/errorvalidationitem.md: + id: dbec2a990008 + last_write_checksum: sha1:ed75f4ef8207a821c60c21d9746863b07e8d22c4 + pristine_git_object: 2629f578afb95e2fce63bce51bc90df23579f380 + docs/sdk/models/shared/expensecontactref.md: + id: 3320633fecaf + last_write_checksum: sha1:45460f7bbc83021c8573c7bbd06a28c662c06c92 + pristine_git_object: 482ec9a63b273ce29f376d5ac3db13898b1a00d2 + docs/sdk/models/shared/expensecontactreftype.md: + id: f28a4d6675c9 + last_write_checksum: sha1:2fb4372734a921e9bef4230bce18053507c67298 + pristine_git_object: c86ea87a9ad3344b1e3b7f61a1264f16183ada39 + docs/sdk/models/shared/expensessyncwebhook.md: + id: 5e2fdf197bbe + last_write_checksum: sha1:2fd7d5382fc3656b2fd150f4e65d9a7a27bce142 + pristine_git_object: 6ad92027535605be0bce933e46db6cabab37718d + docs/sdk/models/shared/expensessyncwebhookpayload.md: + id: b94133310d4d + last_write_checksum: sha1:04886acfb55b6031fbcb6e72e34860257d0731c5 + pristine_git_object: f50b74cb2aea04a04a017308f0ee8eb539329cfd + docs/sdk/models/shared/expensetransaction.md: + id: 2166a2d62ad7 + last_write_checksum: sha1:9b53617cdd7ff5bfd086eef9c63ce00a5aac0035 + pristine_git_object: 3cc7436d3b5ff8239308e32be9ffd759d01af12e + docs/sdk/models/shared/expensetransactionline.md: + id: 545d7857fb2c + last_write_checksum: sha1:fb1af7c16378504687edb23215582b5fdd194cfc + pristine_git_object: 483a5a4fb5d51c3719df57e705ea0f356a37f7fb + docs/sdk/models/shared/from.md: + id: aa600a5b57fd + last_write_checksum: sha1:862f917b2a4ff4c38ffb604f91f6c0adbdf53a57 + pristine_git_object: 02c04adb22408af1f0bc1acef77132fdacd19b41 + docs/sdk/models/shared/halref.md: + id: 140248af964e + last_write_checksum: sha1:4652b095a55e64ea41b883548918001e85bbbaec + pristine_git_object: 776eeb4da11328631a6025e6b0ece78533415782 + docs/sdk/models/shared/integrationtype.md: + id: 16b92f851b4d + last_write_checksum: sha1:725124b8bd0063cdfc9843a145c565b73eeb926d + pristine_git_object: 10dbd0e521b6d115098491581f829bfb808dd610 + docs/sdk/models/shared/invoiceto.md: + id: 9efb0eaa1096 + last_write_checksum: sha1:d9707200971d9d5ce097531ac3744cf629caea37 + pristine_git_object: f9b695f1be04e2cfe2e577c23764142a1581d7e1 + docs/sdk/models/shared/invoicetotype.md: + id: 30753670f277 + last_write_checksum: sha1:e6280c8ca48bb8a7fd2cf61c669e47916dc0d031 + pristine_git_object: 208ce82722c28b52b8220b2fd7f291a02b878709 + docs/sdk/models/shared/itemref.md: + id: 23c7408988fc + last_write_checksum: sha1:f66b7e3d563661b4d3c8580452b32c9342ccfdc5 + pristine_git_object: 49ca6cd52f80a4688d2dcb59ba79b5e0dc81f85d + docs/sdk/models/shared/items.md: + id: d1b7d7f548ee + last_write_checksum: sha1:9f39c7122093f42ba6d24506f87b5a26f7536cd8 + pristine_git_object: 3fd970a9f3c970edf18225414a9a37a41ac28e5c + docs/sdk/models/shared/itemstype.md: + id: ad67b7f3c086 + last_write_checksum: sha1:d28873e930f8a9d5136ee9086ecf7d533ba093b5 + pristine_git_object: a29cdee3c7494eb821a7d9a3c7a051f93ea89ab5 + docs/sdk/models/shared/links.md: + id: fa66a5b5f260 + last_write_checksum: sha1:6ae24fe5a1123376ad9fc97b70590bdbddc005e3 + pristine_git_object: d6a06ed470ddd660c15ba0b59056d3b35dbcadd9 + docs/sdk/models/shared/mappingoptions.md: + id: f944dc83ca30 + last_write_checksum: sha1:556d20c3f716210ac1bc4570ef1697388208f88e + pristine_git_object: ac6605cbc9cefd353a13e4b2648ecb216674739b + docs/sdk/models/shared/metadata.md: + id: d5813bbccd6a + last_write_checksum: sha1:10eb996c13ef342f7e37b008241b88820b5dba05 + pristine_git_object: 3bef2fb297a991338124e3270c3093b7126f09ce + docs/sdk/models/shared/phone.md: + id: ae03d66b667c + last_write_checksum: sha1:057a92d58ca4bcadb2c442a9015267898b0aee94 + pristine_git_object: 0a84604d88b6a9d3d3dc5fdc4fc25bf3be66e1a6 + docs/sdk/models/shared/phonenumberitems.md: + id: 215cf130f394 + last_write_checksum: sha1:28afceb74de150761b19ee87c2a2b01d81ece365 + pristine_git_object: b1cb36981183d77b945ea677d3c16c0687c7d0f1 + docs/sdk/models/shared/propertiedatatype.md: + id: d607368df9f0 + last_write_checksum: sha1:fce1a3b3674e40e0ca68395e823b5f981f1d1d29 + pristine_git_object: ad3472a4f323109538cc7849405231baee8f1bfc + docs/sdk/models/shared/pulloperation.md: + id: dcbd4e59dc15 + last_write_checksum: sha1:bdc4c4a508fca846e99eccd1a3c3cc681080ab19 + pristine_git_object: e5e1041dfc15148c932d02f27cbda619456500ec + docs/sdk/models/shared/pulloperations.md: + id: d7ead2cdeffc + last_write_checksum: sha1:c8b59670c42d7dbcad6db4e7925052bb4c8271c9 + pristine_git_object: 86e3f36f181393a0d5a01de6d34ab3d37fa03aec + docs/sdk/models/shared/pushchangetype.md: + id: 53824528b4ac + last_write_checksum: sha1:48ddf036c3f8eba1a7c74639964389338b233714 + pristine_git_object: 8da3b17886ed5d6680bf0bd5fa1d413b02e21c1a + docs/sdk/models/shared/pushfieldvalidation.md: + id: be50fc267930 + last_write_checksum: sha1:5de9fd7b48f96220f204a2b5409e2321ce36e5be + pristine_git_object: 92276f33c926d8cfc813586cb02caa17d915a005 + docs/sdk/models/shared/pushoperation.md: + id: 862ef21ffa69 + last_write_checksum: sha1:155fba79b29b2731070f8e566f6fb8a48d401a07 + pristine_git_object: 6acec032a9083f224e9b31fb0d96f1e97c8aa538 + docs/sdk/models/shared/pushoperationchange.md: + id: be046171d3af + last_write_checksum: sha1:b6927c0a089961cf90cc30b9ce890f050b79b56b + pristine_git_object: 2e005605ab12dd3cf4179706ccde1de20c69e36e + docs/sdk/models/shared/pushoperationref.md: + id: 41359c8937dc + last_write_checksum: sha1:600520f10e3f69975b684d737fa8191f22555807 + pristine_git_object: fd9b5005f966cbd174b77dbf45ffa4ad65700b01 + docs/sdk/models/shared/pushoperations.md: + id: 7efd8c6374e2 + last_write_checksum: sha1:b161bfda5689a167b2d235c27555027699f784a1 + pristine_git_object: 46c771d73744748c75e3c3506be3d6202c225cde + docs/sdk/models/shared/pushoperationstatus.md: + id: c01cab5bc311 + last_write_checksum: sha1:16d0a9a459791f783f7b863dcd9fef0eb10ec3fb + pristine_git_object: 6ccddbb04f5f9b1f4a30ff38a1d0ec78fec7648c + docs/sdk/models/shared/pushoption.md: + id: 28a9b11a0d39 + last_write_checksum: sha1:351b4f130ae38cd4558820bbd2b851c48b3a9454 + pristine_git_object: a450a2463a14839061afd6d1245437ddffbf8a91 + docs/sdk/models/shared/pushoptionchoice.md: + id: 3dc25ab7bea6 + last_write_checksum: sha1:519638eaabe620bd70a21bfb51140077a63808fd + pristine_git_object: caa4e330c11cfd5a367dfe5528522c4e17d6845b + docs/sdk/models/shared/pushoptionproperty.md: + id: 06f73d448642 + last_write_checksum: sha1:6eb365bf03ed030cedb5fac0b31c14398af1f028 + pristine_git_object: 6595312ababa73de75f4953b9b0e4c8f7337993c + docs/sdk/models/shared/pushoptiontype.md: + id: cc1fc9e23267 + last_write_checksum: sha1:0d07c3f9fa1d7f45e0b1104569aaac10ab68a822 + pristine_git_object: 0d88fa194b793b65f95de0bdcb90ec541e9321c8 + docs/sdk/models/shared/pushvalidationinfo.md: + id: 10ddca1b4793 + last_write_checksum: sha1:b75196afc1cf13ef84b048253b306fea6aa1bf8b + pristine_git_object: 0f083ff27e660e1f28cdd44e03dff99acc399af8 + docs/sdk/models/shared/recordref.md: + id: abf3fb72c244 + last_write_checksum: sha1:83d84252f8a04a91a4966872bbf32fe0f482b913 + pristine_git_object: 5d8883827a84efdb9c1273045419ed5deed4eb6a + docs/sdk/models/shared/reimbursableexpensetransaction.md: + id: 6fa2fa691e14 + last_write_checksum: sha1:a5224693aabf3ac59f12a3133b4f9858bfb5d68a + pristine_git_object: ec64c9002a78608334f7ec7ef3bb6f320985e549 + docs/sdk/models/shared/reimbursableexpensetransactionline.md: + id: 5776c8b1c16a + last_write_checksum: sha1:bfb4d95821b66cce5059fa1bdab989f0c88935da + pristine_git_object: 19c0bf57f0935034e4e4607efb403451266f2044 + docs/sdk/models/shared/reimbursementcontactref.md: + id: a58a9405e6a8 + last_write_checksum: sha1:e8697e1b915c67ccbaf2f9904cbd8ecaec838fdf + pristine_git_object: 8b0335819d2bf321f95f44a1930f33b9b0c49b96 + docs/sdk/models/shared/security.md: + id: 972729c50a07 + last_write_checksum: sha1:7aee923b806144dc5167b4f1966a309bf86952cd + pristine_git_object: 6d43c572235c19b3ce87ffaba804528b9ae6ed77 + docs/sdk/models/shared/sourcetype.md: + id: 3ec91bdaf5e7 + last_write_checksum: sha1:4d6a76486a04ddf203b81aee5902325430fcbd41 + pristine_git_object: 2a5853885f409e4d3664790ad0ca25713464952d + docs/sdk/models/shared/status.md: + id: d40dc096aca1 + last_write_checksum: sha1:86278d19ea08deb754724007ac9071536489689f + pristine_git_object: 4fbf01b4347448a1178dc9e0afd405c59c00ff9f + docs/sdk/models/shared/supplementaldata.md: + id: 0cbf04657884 + last_write_checksum: sha1:fd1c50042ec0bba59d6d5588c4321cf681d3e1e2 + pristine_git_object: 7455ae71a7bdfe86c4a67445dfd220764ca58a4c + docs/sdk/models/shared/supplier.md: + id: 18b82dd2f554 + last_write_checksum: sha1:d52d58cf7611b5c257b75b4aafbbb81e085e4a63 + pristine_git_object: 31b15ef0cb8d2953065d66920e3125f20b8abc99 + docs/sdk/models/shared/supplierdetails.md: + id: 62d782037f74 + last_write_checksum: sha1:7847cebc4a30a0b888aa90f4f50af47952a13a2f + pristine_git_object: 796fce9ed35f18fcd81b389a8dd99166a4e5cd69 + docs/sdk/models/shared/suppliers.md: + id: 09016bddb305 + last_write_checksum: sha1:72fb3da7feb33d53ae2248e3307ace74e0778f5a + pristine_git_object: fc580274903634e5ffd5284a895af115241704dd + docs/sdk/models/shared/supplierstatus.md: + id: 51c838d3b574 + last_write_checksum: sha1:4151a4fcc4ecc789cdb3928305ef26f89f15c428 + pristine_git_object: bae8b941d3768a6911cd82339805bee7f748a12f + docs/sdk/models/shared/taxratemappinginfo.md: + id: a9eb5e4a6aea + last_write_checksum: sha1:bbd27b8b7e6662147e2d725a5803a9e5c7fec09d + pristine_git_object: 25cab7e7fb55efcb3c266b4d3a9c4adc122e75d7 + docs/sdk/models/shared/to.md: + id: b5bd1a94620b + last_write_checksum: sha1:c3864e9370f79e4c12af5aa3f4328fa8bb577117 + pristine_git_object: be0c84690b2debfe1a3d760482e6edb5c05f06c4 + docs/sdk/models/shared/trackingcategorymappinginfo.md: + id: 500096775c8a + last_write_checksum: sha1:4ec07312ddd91aff67fa0a1c820a6f1383761ed6 + pristine_git_object: 8cee33eb1f3123dea92c227574ba305949b7dfbc + docs/sdk/models/shared/trackingref.md: + id: 3fc50d3208ff + last_write_checksum: sha1:d481cb95249b25a1dc3d9096aacc5e0eb08a71ea + pristine_git_object: 0b7429518cf9df72ec48d9b1671690271fc85743 + docs/sdk/models/shared/trackingrefadjustmenttransaction.md: + id: abaf558902fc + last_write_checksum: sha1:0457533166c138233fc96bb4a487419f3d4703e4 + pristine_git_object: 085c0d045f3a71030b31c65968235e69fe0cbd2d + docs/sdk/models/shared/trackingrefadjustmenttransactiondatatype.md: + id: 711bcbacb20a + last_write_checksum: sha1:aebe539770511609daf50fdd4da8d12e61719192 + pristine_git_object: fe7e0c69b16363477e45baf1513fbb47c0094db9 + docs/sdk/models/shared/trackingrefdatatype.md: + id: 1da75ca66097 + last_write_checksum: sha1:139ba26026e5000061a91adaa80220afc3fc830b + pristine_git_object: 0b507a10af5903ca634ae9ba1eed2b3065bd698f + docs/sdk/models/shared/transaction.md: + id: b2dd70b588f2 + last_write_checksum: sha1:bcbe66d4132b549d0617dd21b107c55801b9c85b + pristine_git_object: eef052c21a6746bf2ea3f0f88307516cd7a09cba + docs/sdk/models/shared/transactions.md: + id: 79e7a423b83b + last_write_checksum: sha1:b2d52b1dcd3fea7c46e86f81f9878f18a08caa54 + pristine_git_object: 13da35818a91dfb7d9ff23c9ea26d38074e0c96b + docs/sdk/models/shared/transactionstatus.md: + id: 29aed495b050 + last_write_checksum: sha1:dbf9f2a7c6f3cd460feab9c8f3d99f70b4579b0d + pristine_git_object: ce14a19117dd749c1571cd999f907160b8843e57 + docs/sdk/models/shared/transactionstatus1.md: + id: ea66964d5e64 + last_write_checksum: sha1:4913808b6e697d8b6f43557ddf32f704f9b671d1 + pristine_git_object: b988f771fab536d1af9ba3b90ad1db47977ad12d + docs/sdk/models/shared/transfertransactionrequest.md: + id: 9c2758632d9a + last_write_checksum: sha1:d7d1457daff9e97df83a0521d9c13927110bcd5c + pristine_git_object: 2a745159e9fbb1937418418dfef2a3b7f1216f32 + docs/sdk/models/shared/transfertransactionrequestaccountreference.md: + id: ae7a0b08a360 + last_write_checksum: sha1:cf1ac5a04f27f416588e8874274a959e673661bb + pristine_git_object: d58253c959a41c4d52bb58f663f8180dc32f8f4b + docs/sdk/models/shared/transfertransactionresponse.md: + id: 4374c2969cb4 + last_write_checksum: sha1:97f8d2523cb02c4a8ef00a885d7876374eda5575 + pristine_git_object: 34706236c43ad939040146d2526130ee52eb995c + docs/sdk/models/shared/type.md: + id: 04645f7284d8 + last_write_checksum: sha1:befdff645d8bd9fc46524ea1d360759f4e3b9ee1 + pristine_git_object: b39ccc35697451db7d6455591315855d3c009ed4 + docs/sdk/models/shared/updatecustomerresponse.md: + id: 9b1001138366 + last_write_checksum: sha1:81e40f0abf13665e9deb2f812100e6c0bd6843dc + pristine_git_object: e4ed8307b97304ab13748c469eba8385d91bdcd5 + docs/sdk/models/shared/updatecustomerresponseaccountingcustomer.md: + id: 5a35493b3dd1 + last_write_checksum: sha1:309638d65b97357123c71302e2dcd7441cbfb938 + pristine_git_object: 72325ddee1381070a579375cd9549610db0d7760 + docs/sdk/models/shared/updateexpenserequest.md: + id: 387f866c8495 + last_write_checksum: sha1:ac3d5f2fe25cee8afc46b8c6027c55fbe3177fc0 + pristine_git_object: 5025fc726a6012e8b322be794610ed22ae8227f8 + docs/sdk/models/shared/updateexpenserequestbankaccountreference.md: + id: 8515ad6cb7b5 + last_write_checksum: sha1:6825b4e17749d3b83887b5192dbe66bdba4ae34e + pristine_git_object: 53dd6c2941064a7eeee3eeadf972983967d5c49c + docs/sdk/models/shared/updateexpenserequesttype.md: + id: b3b8f4ba77a0 + last_write_checksum: sha1:e288d4ea784c60c1dc18fe10775e93bb87d25f4b + pristine_git_object: e669a7456ec784707c5e6f6cab53d48a3247e3ad + docs/sdk/models/shared/updateexpenseresponse.md: + id: 6f416c172c62 + last_write_checksum: sha1:284a7efbb88550180db9868dfbc07be4fc8ed7a3 + pristine_git_object: 50f783cc34df1ce4a9e2ff92744d49f2a047b1e5 + docs/sdk/models/shared/updatereimbursableexpensetransactionrequest.md: + id: 80cfacfe3446 + last_write_checksum: sha1:7ab87ab0acc7ddbcac4bacc4317249b77e1f1277 + pristine_git_object: 322eb58b7e2ebdae40833db07d4b39166ba66e2f + docs/sdk/models/shared/updatesupplierresponse.md: + id: 0f65a9ccdc8c + last_write_checksum: sha1:629599ecd1dff35add4dad0be48ca64d850a1a34 + pristine_git_object: 2f9eab7adc61a810e93c8a714bc119d21196d70f + docs/sdk/models/shared/updatesupplierresponseaccountingsupplier.md: + id: 21c70f3038a8 + last_write_checksum: sha1:0ea7b62508ca1dfad7fa29bf1e5ec71a3998c3ce + pristine_git_object: 548a8113e51220c2232bbc2cf47ce5746a3be7a6 + docs/sdk/models/shared/validation.md: + id: b9ffd70ca98d + last_write_checksum: sha1:326acba6a6b8c8fec33963cb9c8f62c15a48b9b6 + pristine_git_object: 1c46277412f046f8ad342504f136f4b4ff537560 + docs/sdk/models/shared/validationitem.md: + id: 4e3848a26890 + last_write_checksum: sha1:75d9d18dfbc5911a8f94d0c2e6d342adaa719fa6 + pristine_git_object: 1f16ed7a88513e312409023c32ca95ce37c950ed + docs/sdk/models/shared/validdatatypelinks.md: + id: 914dfac5a982 + last_write_checksum: sha1:282e555b87b469baa990c95b7e43a4ec9c778a35 + pristine_git_object: 0649c091bf1329568692129dd938b34333c4809e + docs/sdk/models/shared/validfor.md: + id: 36daaba2034a + last_write_checksum: sha1:571d8b409d1bf805a39f01b5cb0fc19521ffa59b + pristine_git_object: e0a384b870930a4ee8fd41c01f7ad66598ce4a61 + docs/sdk/models/shared/validtransactiontypes.md: + id: b3cc1a375891 + last_write_checksum: sha1:271aae388300b7342242b97aaa6395589defa76a + pristine_git_object: fd9faf538585c032d43230a22bf68878a4468d50 + docs/sdk/models/shared/weblink.md: + id: f69de72356af + last_write_checksum: sha1:6fff8feaebb23237caf3be75250aa1a0714baa20 + pristine_git_object: 6ab614a2a9929234396007817215f98a2d88d5e2 + docs/sdks/accounts/README.md: + id: d6c754b1ca96 + last_write_checksum: sha1:6398a2a9b65747a28fd8089771a854ebc733d372 + pristine_git_object: 1efcbdfc8700af1ca68505f846168404d29f84ca + docs/sdks/adjustments/README.md: + id: e7bc3bb1d249 + last_write_checksum: sha1:ae719682ae4c8194bad8400bcdde5adabb3256ac + pristine_git_object: 4abaf777bf55264729eb37540eac06b1590af926 + docs/sdks/attachments/README.md: + id: b60e6ecf628b + last_write_checksum: sha1:0843938f8fbe4e39e68ff655255af5db91397e8c + pristine_git_object: 773d8870dd09e7a51c4008fa9c5b8ee803167d2b + docs/sdks/bankaccounts/README.md: + id: 510ffee224ea + last_write_checksum: sha1:cd816c66bf8e50ab349f024fcda36e73dbbe3a5a + pristine_git_object: fd3842220748e2165a2c6f2d4b5f8a2ecb62ffa0 + docs/sdks/companies/README.md: + id: 67e8a49afa67 + last_write_checksum: sha1:ae8862268a345c488ed057101d1b9ab0b69b792d + pristine_git_object: 45ba7d15f687351d98ab2b9440d74c672bb16654 + docs/sdks/companyinfo/README.md: + id: 198b84d5c0c5 + last_write_checksum: sha1:e3d36b67a562ba8c967f60db5efca8af3118090e + pristine_git_object: 6e17588f1862e5e34c3f1f3d4a642113d7c60ac4 + docs/sdks/configuration/README.md: + id: d3a07ea941dd + last_write_checksum: sha1:251bbf34e6725b862bda6d96a4d33f935a024b1b + pristine_git_object: 4cf27ac47f924c8c71c251f47cdc6df2aaebe288 + docs/sdks/connections/README.md: + id: 3ef8931411ea + last_write_checksum: sha1:202734a1bb1320ce4ae610566fbc5ed7cbaa3cc8 + pristine_git_object: 4fd88fa711dbce59ea53afec2e29b58d9cae07d8 + docs/sdks/customers/README.md: + id: 9332759cffc2 + last_write_checksum: sha1:b14aa8b1cb650e255fc352d1cc54aa769c3e3d7f + pristine_git_object: 08faa564522bfeafcc11cbe40db2869b10e0a605 + docs/sdks/expenses/README.md: + id: 5692d1aab79d + last_write_checksum: sha1:3c01bd7a18b5d41a7e72d7971e47416600fcda73 + pristine_git_object: 884bbe4f74fe5f0738e04bc69abe97263842dcbe + docs/sdks/managedata/README.md: + id: 5fccd800fae5 + last_write_checksum: sha1:09b04f184a4591236ae247fc6607a9f7146b5759 + pristine_git_object: 6d2c36771b8ac18c00c85911de661f71cb8a229b + docs/sdks/mappingoptions/README.md: + id: 05c1205f046b + last_write_checksum: sha1:c5b40a20b2fb90b180eb2249aa6ee95dd6541ffc + pristine_git_object: 6a5f6047e07dfabf5351951662cf8b23c4d2e33a + docs/sdks/pushoperations/README.md: + id: 5f0b3f80f615 + last_write_checksum: sha1:ee711962e0b2c21540e336bcac0e9442d1aca289 + pristine_git_object: d6ecb414cb3966fbdae332dedfd6174510316890 + docs/sdks/reimbursements/README.md: + id: a5d637dcab67 + last_write_checksum: sha1:ee0c9a488bbdf1523947d86bfa220744e8b99e6e + pristine_git_object: d11c97540cd3bf7d46c6d2624ce0678ad789f463 + docs/sdks/suppliers/README.md: + id: 85867190cd79 + last_write_checksum: sha1:aaf02bdaf7172464636fcdb90e5780e5184fd214 + pristine_git_object: 72498acb832ac71787b72e58065f6f2aed395a27 + docs/sdks/sync/README.md: + id: a2e09f86bd16 + last_write_checksum: sha1:e08cd80b4911eb590a74fa67c869db3a6afdbfd9 + pristine_git_object: 98c55ce0578d73c40d2483328d6f31e209503b60 + docs/sdks/transactionstatus/README.md: + id: c3d24e0bf8e7 + last_write_checksum: sha1:0dad0d914641c5109fcb553ce382e83bf2738388 + pristine_git_object: 05eb6e943b39d77ef35dafaaba0520e3b3c19950 + docs/sdks/transfers/README.md: + id: f56918861798 + last_write_checksum: sha1:cee206b96689a806542143cc5c09406346ae0491 + pristine_git_object: 40a9011b4f258e1b6b0239a35cc2c5273af13aa4 + eslint.config.mjs: + id: 461c8d07f6da + last_write_checksum: sha1:9398f326377fe47f67af2df6eb6370750c0790b4 + pristine_git_object: 67bccfec985be20a00970d90155752832dd47135 + examples/.env.template: + id: 52cbe5afed92 + last_write_checksum: sha1:6f3d4d30718c09ccb1552fc3a005b76d0d01ad91 + pristine_git_object: 23674a47192b472fd08ccc1f47b36f6830db0686 + examples/README.md: + id: 9d0f69d6e677 + last_write_checksum: sha1:8503fc8653a5aaf1b1943ef20da54473fbe13bcb + pristine_git_object: b6858cb2d6d5ec4a54434d1985e806b2a851f397 + examples/companiesList.example.ts: + id: 21346a1a073c + last_write_checksum: sha1:7d5c984d99945447c76cdac2791121c8084de115 + pristine_git_object: 43452f74c97c2e1ccefaa0afb4ec7ac692316bad + examples/package.json: + id: c1d7b0ec8e7e + last_write_checksum: sha1:46d1568a018959876f6c0e99457cab5eacf6b34a + pristine_git_object: 6d1eb071735b1dd0227de5582c873a663c561f8f + jsr.json: + id: 7f6ab7767282 + last_write_checksum: sha1:ec1129f437aa6e0c347cfbbbedc3176232296336 + pristine_git_object: ede210b76c9a41778fd963ab5056c5853003d05b + package.json: + id: 7030d0b2f71b + last_write_checksum: sha1:b59fea168ad6cfe861f0f9c26d20be7e926e3463 + pristine_git_object: ffb94e74a442f30f9304bfedb25547595e1fb9cc + src/core.ts: + id: f431fdbcd144 + last_write_checksum: sha1:4978134663ef926a733ddd85ae6b2216bed43bab + pristine_git_object: a84bafdec4daeec355016e668a7e2881c4719576 + src/funcs/accountsCreate.ts: + id: dcd4056ed25a + last_write_checksum: sha1:6e7364e0810abd4f3c185c583e8e60613f2be775 + pristine_git_object: 3fa75ec997d5cae7c526cdf6d9b920b669583ce4 + src/funcs/accountsGetCreateModel.ts: + id: 94be81ee2370 + last_write_checksum: sha1:4210bec31b08150f940ead903f96a71b97c8cf63 + pristine_git_object: 0abb213c95005b85528996cacfe1944e1312f1f2 + src/funcs/adjustmentsCreate.ts: + id: 49ac36d1629e + last_write_checksum: sha1:1be301e5f7bdd86ef60bd9df9c9a662fb21227d4 + pristine_git_object: d701ca0730bb4edbd919fdcc606897b55f0d5853 + src/funcs/attachmentsUpload.ts: + id: dbc8c173c187 + last_write_checksum: sha1:dba2c9eb8cefa1842eec39a5dd1216fb12578ed1 + pristine_git_object: 30a109d4bca17386b762cee4b2673a7cbdf4a3da + src/funcs/bankAccountsCreate.ts: + id: c61c77ddef33 + last_write_checksum: sha1:454507811000a771510c410ca03d159c687da388 + pristine_git_object: 6efc224e46b6edde4db60df71f628072c03a2797 + src/funcs/bankAccountsGetCreateModel.ts: + id: 2b1d95b79b3b + last_write_checksum: sha1:de986f3dd193b196ca1b61f38a88cbe245b58a2e + pristine_git_object: 3a9c2279f319b6dd9491d8df312efffe5d52f6e9 + src/funcs/companiesCreate.ts: + id: becfb79b6222 + last_write_checksum: sha1:80a9991774ae34ce15c02a0b801a4bfb97ae54fa + pristine_git_object: db65a6aa67ca8ba7451bf0aa22fedc1f3e2fd6eb + src/funcs/companiesDelete.ts: + id: d4b8d3c15935 + last_write_checksum: sha1:0c69b65a403daa45eef8c3181bfdf6493bc88659 + pristine_git_object: a8b2cd606b649232684a999d0a8c1a552903f032 + src/funcs/companiesGet.ts: + id: 497c5e9320c2 + last_write_checksum: sha1:c3c8f8bde4883ecee4f8c196382b940fdc2e5681 + pristine_git_object: d298ca27912f658ab616e6ba21379e20a371cd65 + src/funcs/companiesList.ts: + id: c57fb769a99c + last_write_checksum: sha1:5dfe43699c68eba1cd3634d7f4c1dbc1ff05ebf7 + pristine_git_object: 6c11b88fdeaadb13554bda71b7a72b1dfa720dc8 + src/funcs/companiesReplace.ts: + id: c141cb91cc73 + last_write_checksum: sha1:4c0ec35abf4451e66b8cfcce20fd6dd845bad61d + pristine_git_object: afa89e56940438478567a5a7e7c176de7dec0b89 + src/funcs/companiesUpdate.ts: + id: e3d7bd676c21 + last_write_checksum: sha1:cf5a5cc6bc245fa7b6b0403d099e3d98cdd47dd4 + pristine_git_object: 41ddd1a933eb457e7ae807c2c5d117a0de935866 + src/funcs/companyInfoGet.ts: + id: 4fa4126a1e45 + last_write_checksum: sha1:16a382beb49f4dc4d19b119335816ad563488304 + pristine_git_object: a3495ed39136dedec595eee2153f4063bc1a676c + src/funcs/configurationGet.ts: + id: 2a09a403f3a3 + last_write_checksum: sha1:bf68759c00ea2330304cadd3701a7b2f938ecae5 + pristine_git_object: 9c153dd31e0c8901c7fe5ca4ddbca386122d8c60 + src/funcs/configurationSet.ts: + id: c2c0a934542f + last_write_checksum: sha1:436c5469b391950eefdac1c55bd950d3ab398910 + pristine_git_object: 1e2a91a848d1c06556a66573cd1a7bf845376989 + src/funcs/connectionsCreate.ts: + id: 0423cc2d060b + last_write_checksum: sha1:7b19f06b1da3cca0ab27d533a8627dfeee35186e + pristine_git_object: 1117875f266cde202a06361129d8d3f0ac8a9129 + src/funcs/connectionsCreatePartnerExpenseConnection.ts: + id: 90ef51f407c9 + last_write_checksum: sha1:b8a4435c238e749b5dd36e99aa7d65ef3f21e25c + pristine_git_object: f4fb1fb9b90dff642cc1703f9472b7cba0fddb08 + src/funcs/connectionsDelete.ts: + id: f33b14b4a39d + last_write_checksum: sha1:363bc7e147afd450e85b30a76864ea314a2f62ed + pristine_git_object: 37bb9333159ecedde43c79d7af60b1952485c5e9 + src/funcs/connectionsGet.ts: + id: 6a1b6227b285 + last_write_checksum: sha1:a618642a85969578729b8bac45d77b83b7e6fb3a + pristine_git_object: ca1a71aa278d023519ff834b8966fb45f91589b3 + src/funcs/connectionsList.ts: + id: ca36cb8b50d3 + last_write_checksum: sha1:f3d842b3e5af96f86e18baec787d89b49bd3f52d + pristine_git_object: cfcd352607831197fa51d60e0314deb951586764 + src/funcs/connectionsUnlink.ts: + id: 0ff9d29a8016 + last_write_checksum: sha1:dd0053acc13ff630f9577ae155729e0a28889165 + pristine_git_object: 5b976008df73a608955a298d171c59a872045587 + src/funcs/customersCreate.ts: + id: c42b63f0745d + last_write_checksum: sha1:4899822f32b34c912875bae02839abbb33453998 + pristine_git_object: e5a5569a8867768a5673125474369b56c7f2d3f8 + src/funcs/customersGet.ts: + id: 02794d47465d + last_write_checksum: sha1:89e933b49440800969330d429b156e940c9ffb6e + pristine_git_object: ca75df952615a17324d5e94685e37354a9cafc75 + src/funcs/customersList.ts: + id: ec574597f882 + last_write_checksum: sha1:b304aa6e5cd8ac177f8af70df291fe98d4254edf + pristine_git_object: 29c9738d48c32bb6f9795203a218837312ec3333 + src/funcs/customersUpdate.ts: + id: ab88ef0f82f9 + last_write_checksum: sha1:93adf59a19fd68b8d9d80e85faf6d7f9e88fd086 + pristine_git_object: ddde6228a55b2734c070abd99585da3ecc3d04d4 + src/funcs/expensesCreate.ts: + id: df671604dee5 + last_write_checksum: sha1:39fb5a1cf0d268ddbf07ce2077a69ea49187391c + pristine_git_object: 617e05dbb7696e8900dd048b0da803c1ee30a9f9 + src/funcs/expensesUpdate.ts: + id: 953533f0053b + last_write_checksum: sha1:221c33539b09debc757b2a6fdef24e83464ac0b0 + pristine_git_object: 626dd3aefa7899ed977a2c3249e197ca63c687e0 + src/funcs/manageDataGet.ts: + id: dc3d4ca6df0b + last_write_checksum: sha1:7f7121a2698746732a0770d23b415b5c5403025c + pristine_git_object: d38e06dd7c4a603e820b6bcb03b13ef6cf449165 + src/funcs/manageDataGetPullOperation.ts: + id: b5801141559c + last_write_checksum: sha1:d8a00fd298d25e1ae1b41217266e4dbeea948c07 + pristine_git_object: 49d4a7aeb3c365689e611b291bec2e372f24d002 + src/funcs/manageDataListPullOperations.ts: + id: c91274006ba5 + last_write_checksum: sha1:e7033b78960b71cebe86e2126addc29515f38edb + pristine_git_object: b4d5539c487cd7daacf544e8932174d4c390496e + src/funcs/manageDataRefreshAllDataTypes.ts: + id: 401b7123b879 + last_write_checksum: sha1:c5322c081163aceeba2a4ce9fe157153fc576c3e + pristine_git_object: 13ce62816dfac7e7d90dbee1273a1d62917b8ea0 + src/funcs/manageDataRefreshDataType.ts: + id: cbeed115504a + last_write_checksum: sha1:54fb0002fc4c3669acaa9d5704a51c65469f3501 + pristine_git_object: 3829c01ee7c7b618aa0a0a3bf4824329d16f1f62 + src/funcs/mappingOptionsGetMappingOptions.ts: + id: b07779fe65c6 + last_write_checksum: sha1:d1557e6b95f0dae4fe489df7a7d80c1b33ecfee0 + pristine_git_object: f4c147aaf7bad198d0dc52f9acbdc7f4cc3a843f + src/funcs/pushOperationsGet.ts: + id: ef52f8c025f6 + last_write_checksum: sha1:e4b6e8dce8a35c09f35068cb51cf3d831062def0 + pristine_git_object: 7e3b12881504e4fa92e68c35657a6f07bae4cfe9 + src/funcs/pushOperationsList.ts: + id: f77d5c58419d + last_write_checksum: sha1:47762b16b42f93c2d82e15ed0898df341250bd76 + pristine_git_object: 3911997c497896404fd857f8a9a96a721bf010ce + src/funcs/reimbursementsCreate.ts: + id: df5476b3d4c4 + last_write_checksum: sha1:1f5b7b6ff2cb9e7b6e651596051c5083306504ec + pristine_git_object: 0972e1912e9ae4ec3610bacccb05c3024eef9a5d + src/funcs/reimbursementsUpdate.ts: + id: 312aa782f01f + last_write_checksum: sha1:b405a860b117c78628c3e9c39854dfaef17c782f + pristine_git_object: 32d3b6a90afc9ed6a223e7e9644c515d219b5457 + src/funcs/suppliersCreate.ts: + id: ff2ee5ff481f + last_write_checksum: sha1:91dc730094124370e22aa14fb1d5a2e9436cfc2e + pristine_git_object: 78afa7fd47dc216792efb8dd3c681d3be04f3367 + src/funcs/suppliersGet.ts: + id: 7beb3b2ddb9d + last_write_checksum: sha1:0b31413967cefdc5bc09935e897052f145cbe895 + pristine_git_object: ec56c806a1295b3037233220a1056970a027cef5 + src/funcs/suppliersList.ts: + id: ae0c2ccb6871 + last_write_checksum: sha1:2d0e051f7ac60632cf5fca2d8d92e17a07cd5d27 + pristine_git_object: c43c13a01f7b86c15c515020c68c20c3b6f72183 + src/funcs/suppliersUpdate.ts: + id: c36b960e49de + last_write_checksum: sha1:29c53778a971c0095856847ed33a8fc5fdf69f43 + pristine_git_object: 1f2630f79d8e9c9dbb5ee174e3cf8ba7acfc6599 + src/funcs/syncGet.ts: + id: 8c4d923b76d1 + last_write_checksum: sha1:0c1da520f0cf00bc80a1efc676d9f8527d49c576 + pristine_git_object: 8c815fd138102d56816c146072847d1f12627f95 + src/funcs/syncGetLastSuccessfulSync.ts: + id: ebf9b2719435 + last_write_checksum: sha1:0da72e8b48de39c66684d0912341f5d3e1f88643 + pristine_git_object: 3acdd15877763a46fcec6b109176061539d8141c + src/funcs/syncGetLatestSync.ts: + id: 079a1d16bff2 + last_write_checksum: sha1:d08c2e10da694918d667c013694c9934dca2cbdd + pristine_git_object: 215e402f96dacbf9f38e91ac5b03b8f6d06467cd + src/funcs/syncList.ts: + id: 0f32f1d735f3 + last_write_checksum: sha1:4b564332c81ff46e34ecf9b94eb40c5858f3f03c + pristine_git_object: 18f0cd5f10e6f335ecfd250d9fb829ba79d6a405 + src/funcs/transactionStatusGet.ts: + id: 95ca22d8b933 + last_write_checksum: sha1:59f466868b2577d551e02884f3a25bce66fdb66a + pristine_git_object: 543b7a00f392f7bd3658e3839766ec6159e5ab3a + src/funcs/transactionStatusList.ts: + id: 7ceab71677a1 + last_write_checksum: sha1:330e918266fab45048eb01f78e13e9f53a7ac6ba + pristine_git_object: 98393991fd8a6f0400b94b6dda168584cee841b6 + src/funcs/transfersCreate.ts: + id: 0bfa8fcb1442 + last_write_checksum: sha1:0948d0ac9b0f65b1115255806f49aaa5c063d4f3 + pristine_git_object: 4a047cfa0777484fdf3dc99fa83d50b453c32c4e + src/funcs/validateWebhook.ts: + id: f3ebc1bebb84 + last_write_checksum: sha1:bb6b28f5167243d73fe1518a8ecae70beadf5a3f + pristine_git_object: 77bac9aaf67bc3e3c2842f5e9652d306d9fa08ae + src/hooks/hooks.ts: + id: a2463fc6f69b + last_write_checksum: sha1:9a569ea8f3177ddcdfe6cd903feaf5c2d2c36a9a + pristine_git_object: d34c88497fb1cfb22a725e52b4c218f36d0b5c8e + src/hooks/index.ts: + id: 5f2dab62b520 + last_write_checksum: sha1:1a11c073a6cd792932218e1d4ed36b8567bad8ef + pristine_git_object: f60ec7acd76141a71d78008c5a362eb0236d8335 + src/hooks/types.ts: + id: 2a02d86ec24f + last_write_checksum: sha1:a2145ca7943102b61791b4b067fb593f221349b3 + pristine_git_object: 494395f66d0a6de6f6cd8b1dc918557843158c1d + src/index.ts: + id: c5fb850250c7 + last_write_checksum: sha1:35c9cde3ae14b18b3f893a1afe8b6c44f8760f24 + pristine_git_object: dbcba164a0082e3bb8c43cf21fa7f8ffb9d35dfc + src/lib/base64.ts: + id: "598522066688" + last_write_checksum: sha1:b0b12ddbd8625efb47c0e955a18641aeb10c6532 + pristine_git_object: 0aebd8b0a4867e35cb3348fc52921c3c0b4725b7 + src/lib/config.ts: + id: 320761608fb3 + last_write_checksum: sha1:1a9362aa5400f32469707d6c28f2b72fc1d8b68e + pristine_git_object: 7bb6d0de623c093310344cf6b70d3f8bae577100 + src/lib/dlv.ts: + id: b1988214835a + last_write_checksum: sha1:1dd3e3fbb4550c4bf31f5ef997faff355d6f3250 + pristine_git_object: e81091f5e536f82739f71379b1fddc2d147c49e2 + src/lib/encodings.ts: + id: 3bd8ead98afd + last_write_checksum: sha1:d20c131976ab8ac68b22bdde2b7ed84b5b873922 + pristine_git_object: 31cd3733907afbee3641b9ab680ed417247a7d33 + src/lib/files.ts: + id: e5efa54fcb95 + last_write_checksum: sha1:d0f325f445b8d22e7d73baf052c585ec2dd24841 + pristine_git_object: 0344cd046d033f9e8a55de02f7935c5cec5dc30b + src/lib/http.ts: + id: 63a80782d37e + last_write_checksum: sha1:797cbf16d3c7c4d62d3ba0eedb08617524938457 + pristine_git_object: 13cf1fd7894a89f727b8d2db2ad24313a94f68c7 + src/lib/is-plain-object.ts: + id: b9862591096a + last_write_checksum: sha1:df687f25a9590b6fd95d39df41a652ae3fd4e517 + pristine_git_object: 61070d3d7c7e5e95b1ed7e7ea21869eb0767db77 + src/lib/logger.ts: + id: 7ee7741a02bf + last_write_checksum: sha1:0ec9d3a2a34c362746b767e4f9a746c055d57a7b + pristine_git_object: d181f2937d4128afbe9b0327e0f81d1fa9c877b7 + src/lib/matchers.ts: + id: d54b2253b719 + last_write_checksum: sha1:4775ae173392e86f356bb1ffd0d16f3c2d7b0d54 + pristine_git_object: b096d6f201a8f1b24dea405dc0cb1c75efdf4c97 + src/lib/primitives.ts: + id: 74859f750b28 + last_write_checksum: sha1:987869fc54790b9c22e9182099103d6aa7c67016 + pristine_git_object: d21f1dc49affa4e6d324bdd60811b470fdfa7eb6 + src/lib/retries.ts: + id: b24a69d15639 + last_write_checksum: sha1:f3da74dffcbe2756c69393f8600205aa1dc06e68 + pristine_git_object: e3ce9aba72150fc3c18f3105d39b21aba809377b + src/lib/schemas.ts: + id: deb4b531fae1 + last_write_checksum: sha1:b8517a14d3043f488f44e3b10ddd6cabdd22242f + pristine_git_object: dc2510e330727b01894e4d3954ea92a62c962e5d + src/lib/sdks.ts: + id: 8a6d91f1218d + last_write_checksum: sha1:18da4753f916af929ae4a2445b13b09c23e1cc6f + pristine_git_object: 126029ae98e4c0ceb16ccfa40f8dd82890dd3193 + src/lib/security.ts: + id: 0502afa7922e + last_write_checksum: sha1:3d00348fcb3784d76766bd94dc1da51f67bdaaa4 + pristine_git_object: 5d93cd4a14174e63dea219d284ce12764a9c6c2b + src/lib/url.ts: + id: b0057e24ed76 + last_write_checksum: sha1:d124050c7e755c0cce233b9e029afb584ff65201 + pristine_git_object: f3a8de6c021de59c991707946cd294596cae954d + src/sdk/accounts.ts: + id: a4031260e046 + last_write_checksum: sha1:daa7340b7ebc32a4c81b3262d3bc13cf5b534ce3 + pristine_git_object: 32022dc48d8e8cc825680cc4c1eb3d56f3d3038d + src/sdk/adjustments.ts: + id: d2ac5244377e + last_write_checksum: sha1:b022a93c34a3c34fbba0e581ab1b5c4bef070833 + pristine_git_object: ae4f7fb311aab30e84bbebbde13d0498735db57d + src/sdk/attachments.ts: + id: 01c3953a7152 + last_write_checksum: sha1:76d50aacef2fdd424feb35dd6423b2fcbf421894 + pristine_git_object: 8b35460c9b06c72c2bb7ddabde14aa95453fa723 + src/sdk/bankaccounts.ts: + id: 0f1139473f13 + last_write_checksum: sha1:e8703d3700a7a7063a4f5246869fc47ad5e090ca + pristine_git_object: 0babfd4c234f650fbd7f7d25599f340a5b63ce4e + src/sdk/companies.ts: + id: 7d7df3fca5ca + last_write_checksum: sha1:364a06b2420abe0ab8c6ce6839b6bba93acf1882 + pristine_git_object: 12e5f3369be005592affa22c2cd55803f45892f8 + src/sdk/companyinfo.ts: + id: 26e7094129e5 + last_write_checksum: sha1:e7c86a92f3f63114a996d63e99c7a95b9170f64e + pristine_git_object: 5c63a705d576cbe4bcadbe14dd2cddaab023a0ae + src/sdk/configuration.ts: + id: 747f245ccb04 + last_write_checksum: sha1:212324d41170d86d7e3e1f1b4982bb63665920fc + pristine_git_object: ba37739711d1fd002c547e6b9312a4df9c525724 + src/sdk/connections.ts: + id: 5992fff3b5cd + last_write_checksum: sha1:983f3555e8a2283cba23509db4e7bf4ece2aea42 + pristine_git_object: b028cd9e72d2ae83079be2c65cb893a5890f3466 + src/sdk/customers.ts: + id: d33e193e0c00 + last_write_checksum: sha1:54ecdd2b609979d8a142f3783fc2fdb850cc1001 + pristine_git_object: ca4606be66a08866521c1811f173ac2fae242ec0 + src/sdk/expenses.ts: + id: 89aab5f46e2b + last_write_checksum: sha1:880e3d224651de364aa27a3eb8a1570c375032e2 + pristine_git_object: 96497a4af36f298d0feda7b1c610467425a8cbc1 + src/sdk/index.ts: + id: a857902a703f + last_write_checksum: sha1:ed6d64f2a6135349aa8498b8d8cff9ba85c7fb8f + pristine_git_object: ecac2264817bb369ff2dbf0f0e9029807e67ff77 + src/sdk/managedata.ts: + id: c8cbe5c105ff + last_write_checksum: sha1:940a4a57c769ccd28dc9d3abee4a53427ac1fa4a + pristine_git_object: abc8b7a38bf7f40dc85fa3f59063608263af7402 + src/sdk/mappingoptions.ts: + id: 2a288f6944bc + last_write_checksum: sha1:a9b5acc8b32499fe6f006fa086eecf4d736edbd1 + pristine_git_object: ece14c6cf1ccba0e43b506174628d40ff89e27a9 + src/sdk/models/errors/codatsyncexpenseserror.ts: + id: c71eeae8cb54 + last_write_checksum: sha1:80b5bd16a457b1a51cad4166cff2b0ce72293771 + pristine_git_object: fceb467de6f35f455b0d1c53c426dce09c0b238c + src/sdk/models/errors/errormessage.ts: + id: 2bc5b9b70870 + last_write_checksum: sha1:955302cffb7db734dec70dbcdb4133387d51d8b3 + pristine_git_object: 91cc428f921986e1b740ec5559525204d14fe159 + src/sdk/models/errors/httpclienterrors.ts: + id: 7be0894f205a + last_write_checksum: sha1:994ced121c54fecd0af038ccfb7855fbfd3868ec + pristine_git_object: b34f612124c797c2a1106b9735708f679a90b74f + src/sdk/models/errors/index.ts: + id: 017ae2dc215b + last_write_checksum: sha1:04e3b23ae339742f0991fba4595d1a06c8e9ff64 + pristine_git_object: 7d14c11266fd69986a5bd250264256e47af65113 + src/sdk/models/errors/responsevalidationerror.ts: + id: 0b76670204e7 + last_write_checksum: sha1:0f005f1cec08a041f6208724f0f12f4ebfc0b7d3 + pristine_git_object: ea5e04dbad1a4d92b14b41b94b318ae255d8e1ad + src/sdk/models/errors/sdkerror.ts: + id: c231fdf3b914 + last_write_checksum: sha1:d152f2973648948808ef3c2a21e2ad54399819c5 + pristine_git_object: dc0c6970648cbfb42317c3f4cef4e687321d93af + src/sdk/models/errors/sdkvalidationerror.ts: + id: 7c8a11e099b9 + last_write_checksum: sha1:a69da17627bcc32b820544608f3400423ea53f26 + pristine_git_object: 6826e1208a5d7b7d310535d18909646522bf0fbd + src/sdk/models/operations/createaccount.ts: + id: 905f20b16869 + last_write_checksum: sha1:81621d593d75d516704aaf12faaa6ec994e600f6 + pristine_git_object: d8d3f68e1ee4e022893cdd8de794877b326cb1cc + src/sdk/models/operations/createadjustmenttransaction.ts: + id: 86cd66a83435 + last_write_checksum: sha1:1b677387b6f2a1d23f73e36b3fb5d638454a94d4 + pristine_git_object: 9282464cc38014c8adfd4c33027e660d14ae37f3 + src/sdk/models/operations/createbankaccount.ts: + id: 384f1f4b636d + last_write_checksum: sha1:1a711fea2b22d1efd1c6473e2c156b9f3d259be9 + pristine_git_object: dde96c24e68f2d5a8e50088e747725b5580c5228 + src/sdk/models/operations/createconnection.ts: + id: fd864cebfe91 + last_write_checksum: sha1:67abdd42c0f4b8669b59225b4cf97763bd0cca4c + pristine_git_object: dc5bcac12be709864c1f9a57ab0591899995abeb + src/sdk/models/operations/createcustomer.ts: + id: 00e2cfc2681f + last_write_checksum: sha1:b1fc8159e7ca6d67a2de1a5bdcd09b3c3533883b + pristine_git_object: 57054a54bf610d64efa736090d5eb448026fad8b + src/sdk/models/operations/createexpensetransaction.ts: + id: 8283928ba0bd + last_write_checksum: sha1:ff6aac2f133f83cbcc4f73c3ebc6c940be234663 + pristine_git_object: 4e9f5f6af80629cd439d7b3c9abefaa0c56c2eca + src/sdk/models/operations/createpartnerexpenseconnection.ts: + id: 1e47c7e9eee5 + last_write_checksum: sha1:eadce62853528b604b6a381d80643cd04421a291 + pristine_git_object: 7b71c8039a4ae0c086f6a08b093ed4b0408e51e3 + src/sdk/models/operations/createreimbursableexpensetransaction.ts: + id: 11b03ae7a0ed + last_write_checksum: sha1:924a7269310716cfcb60b26eafba678a36eb5b76 + pristine_git_object: 996da57c963fb32ee8b624eaa8f93192840f26b0 + src/sdk/models/operations/createsupplier.ts: + id: 3ac2b8655cd3 + last_write_checksum: sha1:94da000b8ea1a946a72cc7a3116f363f6d4ff6c7 + pristine_git_object: 8022daa8cabbc83b9222ddc7d633083da9afcb23 + src/sdk/models/operations/createtransfertransaction.ts: + id: 7d9973fe595d + last_write_checksum: sha1:1cb609fd8b716cb9699a2a6f95233b7c1e767b66 + pristine_git_object: ca8dae247aa217f95f0a29ef4ef3787106dcd95b + src/sdk/models/operations/deletecompany.ts: + id: feff26e831a7 + last_write_checksum: sha1:3c6c30970b77ef97770f4a9fed7866b08bfd1ad0 + pristine_git_object: dbe555534894ed6e7f64cf4f034fff5fb58ddedb + src/sdk/models/operations/deleteconnection.ts: + id: 918aad3d3a4a + last_write_checksum: sha1:47fa476012d016921380a863c5457ef7babdd186 + pristine_git_object: 83f75997084050b7c35824dc9e065e81e3677b69 + src/sdk/models/operations/getcompany.ts: + id: 4bef19281ada + last_write_checksum: sha1:3c30540e6bcdad8e8a51c616dc9e9b21934890ca + pristine_git_object: 77734decc381321230c2bfb8f340633b2064f315 + src/sdk/models/operations/getcompanyconfiguration.ts: + id: 5f47aebaa208 + last_write_checksum: sha1:3b9d67b47dddfe8debad8763d5bcaffb4e22e258 + pristine_git_object: 92ae8a4982a8bb87eb35f2bc3a35d320bfc37aee + src/sdk/models/operations/getcompanyinfo.ts: + id: d8b295b50903 + last_write_checksum: sha1:2e77a56ae39883a847350c5d01d31806a50a942a + pristine_git_object: b3eb61f13b049bafff0ae41a9033b7221b0d643c + src/sdk/models/operations/getconnection.ts: + id: e6be8d1eab2c + last_write_checksum: sha1:94309b857129d317a91f50bae1e58ab670779062 + pristine_git_object: 126d23b8515e33d0e3c796e642e68ee0f74a6e00 + src/sdk/models/operations/getcreatebankaccountsmodel.ts: + id: d2a66212235e + last_write_checksum: sha1:fc4bd85addf7319a97a5a9d57bb5de0e824bc8b2 + pristine_git_object: 455e4e838e4ab6d1db4d47c8850f33ce8398d32c + src/sdk/models/operations/getcreatechartofaccountsmodel.ts: + id: 9f0a3d0670c8 + last_write_checksum: sha1:33c89501771920391bb5916d24232bf7b3810b83 + pristine_git_object: d3b2a28a66da9dda64e2806620138bc1beaa4286 + src/sdk/models/operations/getcustomer.ts: + id: 565597aa3278 + last_write_checksum: sha1:769e69f6b07079a3366e8d3725052031f4499729 + pristine_git_object: 81a814931d44e728c655d0f857b7d712cb8892f6 + src/sdk/models/operations/getdatastatus.ts: + id: ebdcbcbe4aef + last_write_checksum: sha1:df819cbd9de3b0b3f98ed53309f6f92f68e1b4b9 + pristine_git_object: e53d4c2a1a1c3beef9498b8cdd2ca659a0cf9979 + src/sdk/models/operations/getlastsuccessfulsync.ts: + id: ca114ef6d5c1 + last_write_checksum: sha1:8b14392ad78bef7e32eb5a28f5d1c64806690721 + pristine_git_object: f34d49fb61ebadb4b79d56d549fbaa93b866db70 + src/sdk/models/operations/getlatestsync.ts: + id: bfa3f43e50c8 + last_write_checksum: sha1:0a50bd34d04cc73e8d5de0f40bfac4affae7bbcb + pristine_git_object: 79ec54e8f6618744b04110fba6b52a63c9d62152 + src/sdk/models/operations/getmappingoptions.ts: + id: adedac16e2ed + last_write_checksum: sha1:b2bade0de1677ddf70807683b0b3f28642ede8df + pristine_git_object: 8a198d5ad2327575da05ce30671b6be27d920795 + src/sdk/models/operations/getpulloperation.ts: + id: 72377e8b61d4 + last_write_checksum: sha1:0a0b81f1f3c3e124585a2be4e7325117c1d059cc + pristine_git_object: 2df9079da61727da96e0e5e57f9ba0f006c66aaf + src/sdk/models/operations/getpushoperation.ts: + id: 8b4e8573095d + last_write_checksum: sha1:e1cc048f6fff1b438aeb09e26ddd44e37f49b8e2 + pristine_git_object: 3a950624c21d3161701867af7743651708053b6f + src/sdk/models/operations/getsupplier.ts: + id: c2fe96db53c6 + last_write_checksum: sha1:9151e8143a0487fefe5d3d61bca0b5772e522933 + pristine_git_object: 6b849a6cd5e470592bc19b02b93ec17cd586a3c5 + src/sdk/models/operations/getsyncbyid.ts: + id: 3324f1ac7360 + last_write_checksum: sha1:e2bf355084c6993d3f1b48e2d8a4777672235104 + pristine_git_object: 9b31d1939602e33577cdfb11d327cf0c0dcc2e21 + src/sdk/models/operations/getsynctransaction.ts: + id: d3ade2a85202 + last_write_checksum: sha1:abb9f94feda800f8f757e3c89496c3ee21ac23f9 + pristine_git_object: 0f6f9b131d943c82e4a4b6a268cf888e4fec0a47 + src/sdk/models/operations/index.ts: + id: b2864d0519d7 + last_write_checksum: sha1:8eeae46b84699878dce150c8c7edef1346034b15 + pristine_git_object: 41dbedfe6b7376ca58a04182782eb091cdec2961 + src/sdk/models/operations/listcompanies.ts: + id: bd514f2d5c1c + last_write_checksum: sha1:1487d8f67d5a1c439e6581e854213aa1a386b9f3 + pristine_git_object: 837a6aae587e8a038402fbcedcd4fcc1873136ba + src/sdk/models/operations/listconnections.ts: + id: 5797f5b9be29 + last_write_checksum: sha1:0e709e410d2b500143f63d78e8eaa9ce4c810a6d + pristine_git_object: d1be0d9421b3b0d768650208abc91adcf7a9b721 + src/sdk/models/operations/listcustomers.ts: + id: 0c1c94e3aafd + last_write_checksum: sha1:559a4af72513a522c3a2d757e8d1740558d62e8c + pristine_git_object: df64364b9a983ef38f94706584d64632e55cb0da + src/sdk/models/operations/listpulloperations.ts: + id: 2f2dc545b414 + last_write_checksum: sha1:07db30cc5a51f31a8b19823b0248e852b13949d4 + pristine_git_object: d12f7bd86d6d9180c2042db5b65d5858f3d0c770 + src/sdk/models/operations/listpushoperations.ts: + id: d222dee2db76 + last_write_checksum: sha1:ff8ddb0760b339d9a387f998bbe61ab6b598b237 + pristine_git_object: f4617795665da43f1b717533ace47619ab5b5a34 + src/sdk/models/operations/listsuppliers.ts: + id: 5bd206cb074d + last_write_checksum: sha1:d37b07b62eda9e81d7efd94860723ecc80aebebd + pristine_git_object: 0b72b9ddc86f2756cd811b4092997bf053f36b6d + src/sdk/models/operations/listsyncs.ts: + id: fb1b5eb6a5dd + last_write_checksum: sha1:ed42d6ef5b3f6f8f35b498b2ae5cffe339256c7d + pristine_git_object: 0fd0f5150abee371b20b1515055c1a21696f5d1b + src/sdk/models/operations/listsynctransactions.ts: + id: 01ebb276981c + last_write_checksum: sha1:2a7c3b10f47523270956303fcaa657a150047ae0 + pristine_git_object: 1023458abb8dbe17413d7ff8ddb7a8461cc202ab + src/sdk/models/operations/refreshalldatatypes.ts: + id: 01573fc6fa44 + last_write_checksum: sha1:af36165b1abc045e74af458d280d0da10fa266f4 + pristine_git_object: de184ca9a7a63e876e5ffb070ec2eadc355d51bf + src/sdk/models/operations/refreshdatatype.ts: + id: 3b0dec3e2d72 + last_write_checksum: sha1:765304ce6411f8877b6d7e69270679ad53fa553b + pristine_git_object: 6b357ce8805aa5a113a8ddc573b334edccb1e248 + src/sdk/models/operations/replacecompany.ts: + id: 15f9deaaf7eb + last_write_checksum: sha1:dd56621b0a190db2faed25c4f3f8ccc58c20210e + pristine_git_object: 5ee35551d47caea122b4f502f81b95691cc291ef + src/sdk/models/operations/setcompanyconfiguration.ts: + id: b1f77555d135 + last_write_checksum: sha1:175a5f6965ee20f778eb7a1b6cff39dcaa04702c + pristine_git_object: 6040c8b7c727ec85df13b9e3221c77387408cdfc + src/sdk/models/operations/unlinkconnection.ts: + id: 91e6d25ecd14 + last_write_checksum: sha1:5f4e32b0424df5658a94c777839f8a75adbe40ed + pristine_git_object: dbdba4a38ab397554e0d92300812dda648e941fd + src/sdk/models/operations/updatecompany.ts: + id: dbafb9e0f8d9 + last_write_checksum: sha1:937aaa5e965aae942c6550456dbe3c37b5d2b280 + pristine_git_object: 37ead4428659b0b2409ad7f6cf54515e544e23ec + src/sdk/models/operations/updatecustomer.ts: + id: 3c3df1728f2b + last_write_checksum: sha1:8cbb27b974a9e7b9943b346c254448045ba1432f + pristine_git_object: 04698340a01fbe1483d9ee30359053c2b4424a66 + src/sdk/models/operations/updateexpensetransaction.ts: + id: 82ff9b9787e5 + last_write_checksum: sha1:e983c3fa1c4ba2953c031ea8e1ade30a735e52d9 + pristine_git_object: 4e1347a0295bb0421b186de441637f5e09c2aa3c + src/sdk/models/operations/updatereimbursableexpensetransaction.ts: + id: efbbd1817b07 + last_write_checksum: sha1:b1cec8c617c6c5cb428a1443b3bb7808204acd51 + pristine_git_object: 39e89ab2a1a1b566f6e2408260eb953c2c9ac158 + src/sdk/models/operations/updatesupplier.ts: + id: 4c259e646cb1 + last_write_checksum: sha1:0080741725aeace331e838f4c9fc3c6f243ae906 + pristine_git_object: 17fb665a5c58f80361c34538c37cd668bb32640f + src/sdk/models/operations/uploadexpenseattachment.ts: + id: 0652e914b50e + last_write_checksum: sha1:24cbc00c71351d492fd949c7d9d01b7dd73cbc4a + pristine_git_object: eef9b6596c3bb2e8b3d6e1a02ddd814f118f9821 + src/sdk/models/shared/accountingaddresstype.ts: + id: e3226e442011 + last_write_checksum: sha1:cff7184a3e368ccf099122029411f7f9c890bdda + pristine_git_object: 2f4e3b7a6eb1e4a17b9bbd9caa214c113784dca7 + src/sdk/models/shared/accountmappinginfo.ts: + id: 3fba03a8fd0d + last_write_checksum: sha1:65578227610bb3fa0bdeb57add57ddc18d8ed6b0 + pristine_git_object: 7341c4006c291c4c11e290feac24a4e763e1f263 + src/sdk/models/shared/accountprototype.ts: + id: ffd99325161b + last_write_checksum: sha1:e0854582c13be8739970f6c332a5754698a326f3 + pristine_git_object: cc5b1ee1791cd67ec342f61ea41e45ea73c4b137 + src/sdk/models/shared/accountstatus.ts: + id: d3b6d9d9dc1b + last_write_checksum: sha1:3d8da8c7cf6f158b91daab66c4783ddd1c9b7cd6 + pristine_git_object: 12278d094d4d7cb42873c74360d4f673ddd9e8f7 + src/sdk/models/shared/accounttype.ts: + id: d660396c78b5 + last_write_checksum: sha1:ec24c5608bc06b63cdede8ec919bf951dcdb14f8 + pristine_git_object: c71262dc67fea5fde0ee8745924e6c5472c7924e + src/sdk/models/shared/adjustmenttransactionline.ts: + id: db3c470a1501 + last_write_checksum: sha1:6cf12b91c40bde5f874af436ea4e9755a2203c58 + pristine_git_object: 4055522504c0ed02b90abe46b539a41ef5fa2074 + src/sdk/models/shared/adjustmenttransactionrequest.ts: + id: 810ce527423a + last_write_checksum: sha1:4cf06c2eba7cabb704f12ca4b5afbfcf20b44d4f + pristine_git_object: 211f76e27d7fcfcade8a112513599e8313e584a6 + src/sdk/models/shared/adjustmenttransactionresponse.ts: + id: f302843a6c85 + last_write_checksum: sha1:9bbbe607415f6e14694be052a06fa977d211a3ae + pristine_git_object: 4edb3094b58d4376873ffc114ef696d2d5d2a452 + src/sdk/models/shared/apaccountref.ts: + id: b84d733a82b3 + last_write_checksum: sha1:e97bae8f579483bbc5cb026bc5cfc3573cb28d88 + pristine_git_object: a40de9884755993a37cb3e632fadf06eb0a0dfe0 + src/sdk/models/shared/attachment.ts: + id: 22576f5ca1b9 + last_write_checksum: sha1:9c0e777c214c00c9b40a8ace6f1a8134dee27583 + pristine_git_object: 795c67ad8451e7ac749d25fc1e2872065b2e475a + src/sdk/models/shared/attachmentupload.ts: + id: 6a392fdeca2f + last_write_checksum: sha1:641e54fc2352b948d32b49bd9024807e63554757 + pristine_git_object: 9d175ab2154386e54a967876024acc02dff71994 + src/sdk/models/shared/bankaccount.ts: + id: d58b53d62458 + last_write_checksum: sha1:d13774269aed149921c3e3dc9b938b146ba619ff + pristine_git_object: 433ac67bca434c2eaa828b3398512208aba3dcc7 + src/sdk/models/shared/bankaccountdetails.ts: + id: ccedf1b98c18 + last_write_checksum: sha1:961ddbdc2f84ef92b5c62a159371bef4273e46c1 + pristine_git_object: 3f1bddb89667ecb1556b43891a2bb6b85ca72363 + src/sdk/models/shared/bankaccountstatus.ts: + id: 01e2b1dd61c8 + last_write_checksum: sha1:f52ba944c93769df04b70451d9e993db5e89571f + pristine_git_object: bca71b03045f81a36808773116eaa37664a1e10b + src/sdk/models/shared/clientratelimitwebhook.ts: + id: c691f6d7f890 + last_write_checksum: sha1:873cdc12f8278470e382ae879c4bb2eb17f7f029 + pristine_git_object: cdc40c0b87eb15c3725596b713a38dec90aa9083 + src/sdk/models/shared/clientratelimitwebhookpayload.ts: + id: d068d62c8d39 + last_write_checksum: sha1:e9a21951c06c14ff5a39fd7379cd1c3bafc314d1 + pristine_git_object: 72605d6242434c3e2be999f0006634d5a193e129 + src/sdk/models/shared/codatfile.ts: + id: c7308ff582f1 + last_write_checksum: sha1:46a60236564ab061fff7b8496ad94922d8284ade + pristine_git_object: 0bc3490e3175f93bfcdf04ef1d88f4f56f9771c2 + src/sdk/models/shared/companies.ts: + id: a4b81f9ba7c8 + last_write_checksum: sha1:81432b885d166aad72ebfcdf5b25eb9c822545b4 + pristine_git_object: 0f308542ebb67c7b1d3262721bbe236d1176ef3c + src/sdk/models/shared/company.ts: + id: 8f41ac6a5b4f + last_write_checksum: sha1:efdbf7e89c8e68e6ba9b28e7659b8285b43d837b + pristine_git_object: adc722807f52db782ecea09440050e98c0fb661d + src/sdk/models/shared/companyconfiguration.ts: + id: 14cbcd5da94b + last_write_checksum: sha1:ec31aa9d8d33fa4d133405136fbb3cd0665db83b + pristine_git_object: c3de39ac9b876dcddc8affcbbed7447d5b9119df + src/sdk/models/shared/companyinformation.ts: + id: 1ebdfe14e999 + last_write_checksum: sha1:23b255a1893da6d7725f9433d86a4598b44655d6 + pristine_git_object: 624491b9f5c3600763f3685d28c936f103afb6a6 + src/sdk/models/shared/companyreference.ts: + id: f80ee466bdc7 + last_write_checksum: sha1:a13593197e2c55252dac28abfd5493a76a400e5b + pristine_git_object: e40af5e267211b26d0d3b0296484b7450c485126 + src/sdk/models/shared/companyrequestbody.ts: + id: 9e2dd8b2247d + last_write_checksum: sha1:a3027f00426e9affb8b7f8d930db63b89c197607 + pristine_git_object: 5e438635a0842512ed8dd3a9ee464187ed7ff3fe + src/sdk/models/shared/companysyncstatus.ts: + id: 39bc93a979c5 + last_write_checksum: sha1:e5ee1afec23a784e2f88752ff5ef5822fcb31e9c + pristine_git_object: 72e7076d356d4e2e2e5c18b05e95610256ba7f07 + src/sdk/models/shared/companyupdaterequest.ts: + id: 9a4400207ec8 + last_write_checksum: sha1:371f7f83676f4130f9885c506c8184c53e202390 + pristine_git_object: 442b7a78cb3fde01477e7bb5cec5626c06a9a58b + src/sdk/models/shared/connection.ts: + id: 18ea99cdadfb + last_write_checksum: sha1:abd8bc67e12c4415d2715c3ceec533683a5b2728 + pristine_git_object: 73b4943c5383533168a044532ec3de48ada80ca7 + src/sdk/models/shared/connections.ts: + id: 221acd1ae99a + last_write_checksum: sha1:ef2d949a3163430d3095303bf231c18b7dc93c9c + pristine_git_object: 1278d54c36183c06f6113dd14c25f115be7a6465 + src/sdk/models/shared/contact.ts: + id: 0500236ba8d4 + last_write_checksum: sha1:b8fef6d8c102ea909c4848685dc00e9a6757d676 + pristine_git_object: 8b386531d0e58190d119e83c4901dcca97514266 + src/sdk/models/shared/createaccountresponse.ts: + id: 03c9d30999ae + last_write_checksum: sha1:ff63007ab937646d8ffa021f0f39baefb9735608 + pristine_git_object: 139da5baa0737a2f83bf976502641b95ca992ce4 + src/sdk/models/shared/createbankaccountresponse.ts: + id: 1aa1544fcee4 + last_write_checksum: sha1:ff26ef00fda87ae5d71f035caa3a14793eaa2e36 + pristine_git_object: a469b4f9a9a978732aeafd791cfdb60fa8e0996f + src/sdk/models/shared/createcustomerresponse.ts: + id: 60a9c685822b + last_write_checksum: sha1:fde66de8462747c4918a3cba4df341dc576f74ce + pristine_git_object: 70a6883c3da8192b6dab8e2c7b9bc81ce446a0e0 + src/sdk/models/shared/createexpenseresponse.ts: + id: 676e70c88c68 + last_write_checksum: sha1:2a9e56a4b19cdaec83a3136a097fd80f45bdb3f9 + pristine_git_object: 06b938906978e3a72d04532a795481625f33bd05 + src/sdk/models/shared/createreimbursableexpenseresponse.ts: + id: 90d0584df99a + last_write_checksum: sha1:e1a4ecd0b0742291d89a7476517560f6e33ca004 + pristine_git_object: 4e9005bea2b7d5bbcaf8111d6f9dba19acce8dcb + src/sdk/models/shared/createsupplierresponse.ts: + id: f7a96df2f35c + last_write_checksum: sha1:d77b4835622e6085947512ff39826cb0947eed19 + pristine_git_object: 1f0ed566409914485d9f4a39af7be280f5411f36 + src/sdk/models/shared/customer.ts: + id: 0461159f3445 + last_write_checksum: sha1:f33d7ce65ecfe6f4554860aae9e18967e0dd1b1e + pristine_git_object: 27486842be09e7d124ff894b8ec2d6ae08a32c95 + src/sdk/models/shared/customerdetails.ts: + id: dbf290575362 + last_write_checksum: sha1:639816731a882a6074b2d3de15ac5c95691d7234 + pristine_git_object: 63b35720deee532bcda2c5c574174f6ae58f2633 + src/sdk/models/shared/customers.ts: + id: 523f4ca27bc8 + last_write_checksum: sha1:c3fc81f2e26ada332ce76d1008fed367c9222f71 + pristine_git_object: 1ab0447562347a7a572cf903dda2a84f8a17026d + src/sdk/models/shared/customerstatus.ts: + id: a715f684b8e2 + last_write_checksum: sha1:de855607d6dd15165f942a60ad97967659202c5a + pristine_git_object: 8529e7f29d09526b967b0545ee1ca30cb6f9eba8 + src/sdk/models/shared/dataconnectionerror.ts: + id: c94cddffcec9 + last_write_checksum: sha1:e968b9983e395410ddd93aa9967671e46066eae2 + pristine_git_object: 1cb816d0f2b87e31e36ad1ece98b6f25bcdb148b + src/sdk/models/shared/dataconnectionstatus.ts: + id: 506ff77d012f + last_write_checksum: sha1:6ab2241aa8830aafaeb937d48e97918a68b9dac7 + pristine_git_object: 88889c800a39f393c9445929bbd2150fc6daf7ca + src/sdk/models/shared/datastatus.ts: + id: 4f56e78a99e5 + last_write_checksum: sha1:eba6dba549c86bfcde0d6bcc81c5d74a1d19fd00 + pristine_git_object: 431478c2d5b04d59350c804a78382def3f19baed + src/sdk/models/shared/datatype.ts: + id: 24637063ef68 + last_write_checksum: sha1:f0315c100cd3ecd8937418bc588d9be930a0d440 + pristine_git_object: e1060cb84379a05c7d444157842b05ca51b4019c + src/sdk/models/shared/definitiontransaction.ts: + id: a65574329354 + last_write_checksum: sha1:8489d99e46d1f8273f69d6068767addf599582d1 + pristine_git_object: 9fe243202e0388e736086b9f588ba97fd6d9b631 + src/sdk/models/shared/errorvalidation.ts: + id: 7595eed057da + last_write_checksum: sha1:b7f44c1f99c9de84a9177a6fba2f76704a894a48 + pristine_git_object: dc97b86b1b0a47cc49cc6ce168bbf2dc7362a7d4 + src/sdk/models/shared/errorvalidationitem.ts: + id: 0fbe584c7194 + last_write_checksum: sha1:ea42d03e55f11719c38dc24ffdd5d982be3b1ce3 + pristine_git_object: cd21ec230bfad899a805264c87467c3a1762e9bc + src/sdk/models/shared/expensecontactref.ts: + id: 43899d9f4030 + last_write_checksum: sha1:9038f5d2c67b09d536f317f79aac95abe781c3fb + pristine_git_object: 70e6d0f30aaf031fa3d9781ef4ebd21694d2f5ad + src/sdk/models/shared/expensessyncwebhook.ts: + id: 42ad7ceed53e + last_write_checksum: sha1:6ce82d31b659b22e47e78572e0e651b0f340655b + pristine_git_object: 850b509a397b85b41f62b17dc0e6e1d26430d9ad + src/sdk/models/shared/expensessyncwebhookpayload.ts: + id: ee50e885662e + last_write_checksum: sha1:aae2d903326534a6b3cb8b1d2928c29b8acc2ff2 + pristine_git_object: e0777d0ac0bb1c3a064ab40f3291a6f213d4e696 + src/sdk/models/shared/expensetransaction.ts: + id: 95975b7aa661 + last_write_checksum: sha1:4c244a773cd4cb9b860be3506dd1f28a0f03202a + pristine_git_object: c7d431f6b8690addd09cddd97001efbc07364963 + src/sdk/models/shared/expensetransactionline.ts: + id: ae44108881ac + last_write_checksum: sha1:12b8105c685c24b11c06679ee1a292869d815a86 + pristine_git_object: 4b25bc4d287364a0b9c72f9a191adf9b4a020e74 + src/sdk/models/shared/halref.ts: + id: 1c4609be4603 + last_write_checksum: sha1:b64b146493fe3613970c549edffd33e58402662a + pristine_git_object: 921d594fb96fe80f20787e9118d3def4a9e2d53c + src/sdk/models/shared/index.ts: + id: e97e906e3c14 + last_write_checksum: sha1:33e2da246cf029e624886c7620591db0adb1af25 + pristine_git_object: 9a07f8d8867a4d38223892213ca2fbc4ab797324 + src/sdk/models/shared/integrationtype.ts: + id: 7aed19d9e901 + last_write_checksum: sha1:15995af3ca6a7e3c2f6376c70b44e9d56148d545 + pristine_git_object: 405241c43469fd007ccec20cc34cb37f9bd10b16 + src/sdk/models/shared/invoiceto.ts: + id: c1bfbcefc4a6 + last_write_checksum: sha1:8632d93f4e00c41c311fb88a42c3960eed18d396 + pristine_git_object: 4821b5efcfdd446017523d63cb33237287e935a0 + src/sdk/models/shared/itemref.ts: + id: 7c811d63335d + last_write_checksum: sha1:97213b984da296d911ddcd429f366213eb447144 + pristine_git_object: c50859078190e68d20af9700ae10adf514d14e8f + src/sdk/models/shared/items.ts: + id: 9bf34b20cc56 + last_write_checksum: sha1:e4cb618c32c8f96042ca9822d1428644d0c33e32 + pristine_git_object: 71bef42e67cbc3ec2503baaed55de464adae8c9a + src/sdk/models/shared/links.ts: + id: 5c9b3efadf74 + last_write_checksum: sha1:453659d4b39a592c99b3b459eb9f44055f4c4195 + pristine_git_object: 751d7d00e4248ebfd0d28dadcc799607e058635b + src/sdk/models/shared/mappingoptions.ts: + id: b942ed328ff5 + last_write_checksum: sha1:500bd17a5b477cd9fd3452e6d57aea59c8de9b85 + pristine_git_object: c4cdff83d58daaf3b5c38e8430447691f420ac92 + src/sdk/models/shared/metadata.ts: + id: ee8aa545e342 + last_write_checksum: sha1:9639bb68412a237bd695de4fb124c3d4093117e6 + pristine_git_object: 4a678ba939b63cd6d8e9074658de2375891ff222 + src/sdk/models/shared/phonenumberitems.ts: + id: 0c7ee5a7c3bb + last_write_checksum: sha1:5b4ebb4c806d77243d65a341642ca133ee304f6a + pristine_git_object: 25b1718094ecf433268cc6e51db7cad84f8931c6 + src/sdk/models/shared/propertiedatatype.ts: + id: 4ea125ec9d70 + last_write_checksum: sha1:b926d63fd60306b126cbb858d25a22313d3d9311 + pristine_git_object: a71dac4dd4afa1f66c22f575f8659083a3678657 + src/sdk/models/shared/pulloperation.ts: + id: 1c7a111bf82e + last_write_checksum: sha1:e82d9cd137c0d78465d050b4d8b1a368b31eb6e2 + pristine_git_object: 39375036856ebf027357ff9e00321f4a91f2f806 + src/sdk/models/shared/pulloperations.ts: + id: b51faf4dfd99 + last_write_checksum: sha1:869f7219c72b210af77791cdf5d866c6e39788a8 + pristine_git_object: 475158a0012b764dc1b95440b859651810d0bc07 + src/sdk/models/shared/pushchangetype.ts: + id: cf67386a1d21 + last_write_checksum: sha1:455bd6b2ebf2a0aeee8a914030cc903e9fb12b47 + pristine_git_object: 42040ea23eda83d8cb202d9f3239f5a7c62f4bd2 + src/sdk/models/shared/pushfieldvalidation.ts: + id: 8d8e835e5634 + last_write_checksum: sha1:c377b5bd6ef9fd9ab4e480b3e7e9e2a974a741a8 + pristine_git_object: 15fc3a0f565d8c493fb5461a56309ecadbdd69b2 + src/sdk/models/shared/pushoperation.ts: + id: b6592db339e9 + last_write_checksum: sha1:a6277535acc2f3717de7a769db831f60a2fea704 + pristine_git_object: b9563094c73aa4a8e8e7bba349dae1801873eee2 + src/sdk/models/shared/pushoperationchange.ts: + id: 137f5337781d + last_write_checksum: sha1:c4fcd4f27955e10750e151667bb4ed7b1ecf29f9 + pristine_git_object: 5d771700a367ef509098146f474f10136fe3a577 + src/sdk/models/shared/pushoperationref.ts: + id: 61a311ce2153 + last_write_checksum: sha1:f123aa4fd1f944977c603f63c7e001d7086121aa + pristine_git_object: 59aa761013ab6d2792f63d7d1226311c1aabc405 + src/sdk/models/shared/pushoperations.ts: + id: b0489702427e + last_write_checksum: sha1:df0ddbf54bebf12f184c59ce0b7f9cdf5df010c9 + pristine_git_object: 35c08c7262eaf602936441cf831b2d63aafe9faf + src/sdk/models/shared/pushoperationstatus.ts: + id: 4d9d57d9f800 + last_write_checksum: sha1:7de289ab7d0d5365eae9fe17aed4caddaed26622 + pristine_git_object: 133e3b65f122ffae8912b5ca2a3e91c190c97ddf + src/sdk/models/shared/pushoption.ts: + id: 7b36845bb057 + last_write_checksum: sha1:e6da3557367628a63dd0789986bda82a2ac1c8a9 + pristine_git_object: af6a0a0a363f287ee7bc1e6a19bd87942579dfa7 + src/sdk/models/shared/pushoptionchoice.ts: + id: 4f9141171f1d + last_write_checksum: sha1:a254424966daf3d5185d1b272d0f2214424dce0f + pristine_git_object: 315b39f913390a0e7a4785a7d1c7f21693c7ca9d + src/sdk/models/shared/pushoptionproperty.ts: + id: 27745de0e67f + last_write_checksum: sha1:dd3f7838ac5ff9f5edc531b7bddc809dac397111 + pristine_git_object: 0100bc7b68eb80d19a298dc7276202c9faf85575 + src/sdk/models/shared/pushoptiontype.ts: + id: 4f2314173517 + last_write_checksum: sha1:795906b3ad06204f1dcc551385d5bb849607f61a + pristine_git_object: 298c02e2ea74d44d765eebcb7cc7b1054226aed7 + src/sdk/models/shared/pushvalidationinfo.ts: + id: c3bac2e0d020 + last_write_checksum: sha1:233611708647ac824c46a354d05fc0f3b87cdbe3 + pristine_git_object: 3479adce121324a58a8bb938a974762be7f3cae0 + src/sdk/models/shared/recordref.ts: + id: aaacf769d2aa + last_write_checksum: sha1:5ec7668a0c4008901740ca97ecd492d14da72b06 + pristine_git_object: ef4753cd00534ee63990f5c15cf23aca8721caba + src/sdk/models/shared/reimbursableexpensetransaction.ts: + id: 54c884235299 + last_write_checksum: sha1:b2b42f29d921feef53542cae837256f54fb8e62d + pristine_git_object: 82f1cbf58fb7433234e25b0eb876477d8c94e8a1 + src/sdk/models/shared/reimbursableexpensetransactionline.ts: + id: e5c70b9cfea0 + last_write_checksum: sha1:d2cc3b1caaaa831f9e6829bc097b1090cb6642e2 + pristine_git_object: c3acb46f313c529b37d4c712e2bfea5956ffd4c5 + src/sdk/models/shared/reimbursementcontactref.ts: + id: ffb307a2d5e7 + last_write_checksum: sha1:17533d74b8624cc512ca75a9acd6f0b0a649bc8f + pristine_git_object: cef4be224a447c7ef43bfee904564298e53ce06c + src/sdk/models/shared/security.ts: + id: 4a9790ed1c2f + last_write_checksum: sha1:1b51b365245ab2a0f5f5a06b90093bceb61fc084 + pristine_git_object: 675eaa5827f48cff71e28d1627f8d65a74e10623 + src/sdk/models/shared/status.ts: + id: 1ab31ee187e8 + last_write_checksum: sha1:32b3b6aa4030d2fc4688dd986f9872a86a1abe46 + pristine_git_object: 7b458b0a812628f48c33f789fe66d2fedf4c2e18 + src/sdk/models/shared/supplementaldata.ts: + id: c6dd9a2794e4 + last_write_checksum: sha1:af016589e19361a69323899755b0cd3080109e3e + pristine_git_object: bdea4887c8e5644d591b12f8097e75855b309620 + src/sdk/models/shared/supplier.ts: + id: 1bed69e4bad9 + last_write_checksum: sha1:c097d2df3c7893227ba6bf843cd62f5c56b5a232 + pristine_git_object: 9b5b3bdbb030db6a2c16d3f92a4c4e5817a62313 + src/sdk/models/shared/supplierdetails.ts: + id: 5aae26f65f1e + last_write_checksum: sha1:ae928c77134b0fff387786f0679ce4144d883960 + pristine_git_object: c6b2329d69ae2fa31d53b408225cc60a4f885a54 + src/sdk/models/shared/suppliers.ts: + id: c62b9ef17289 + last_write_checksum: sha1:9c09c3f20edc728016ab59cabbc6608599fa492d + pristine_git_object: 46de174dc4b4c6240c67ec96611007bf1f468f72 + src/sdk/models/shared/supplierstatus.ts: + id: 507c6db656fa + last_write_checksum: sha1:9d4da55011629bd22151f5c1443c7004811a4d8c + pristine_git_object: 21b6220e1fcb3d01f5cbecc67b1213167b6b158d + src/sdk/models/shared/taxratemappinginfo.ts: + id: 3015f9f4efd1 + last_write_checksum: sha1:f67194b1e5c9809fa5c2da5755607eb50503478c + pristine_git_object: 9cb982b911c500e2dca9214b766f31d9606ff75f + src/sdk/models/shared/trackingcategorymappinginfo.ts: + id: 5089c0f34783 + last_write_checksum: sha1:eddfa9f1d64de48534dbb50a4beac34082f4f05d + pristine_git_object: 112aac93d398c5005335ac87f4f5fb8f819c398f + src/sdk/models/shared/trackingref.ts: + id: a863d4731f94 + last_write_checksum: sha1:694ada5b151cf37eb4217673d9b34959fff10e50 + pristine_git_object: 11809c369eb342640a141650dd823a2b31aa3fa9 + src/sdk/models/shared/trackingrefadjustmenttransaction.ts: + id: df78bd3cb01d + last_write_checksum: sha1:8f34b359ea59bea48f3191304b27e5e2a842a0fc + pristine_git_object: 661d5e5fba4c71d2cb7f422be40900a66a5a54b0 + src/sdk/models/shared/transaction.ts: + id: 15e03bc730fe + last_write_checksum: sha1:246adea77a6f5ce98103fad324c6073cb4bc6c84 + pristine_git_object: 7f205c6f31fb3cd290996cafcc588d736f5d38c7 + src/sdk/models/shared/transactions.ts: + id: 85dead1772b5 + last_write_checksum: sha1:894088c52d89aa29ef42fc2ec2d1b946da8a5d58 + pristine_git_object: e88e27437d975a835e2916e4664e2b9b4e609783 + src/sdk/models/shared/transactionstatus.ts: + id: 2e473ce8e9ba + last_write_checksum: sha1:a43d729a74e0a3c21c82973686aee3a9b5770953 + pristine_git_object: a3c87f7290b1e2167c0ea42397e87d06d35ca269 + src/sdk/models/shared/transfertransactionrequest.ts: + id: 2c6c9aa03f0f + last_write_checksum: sha1:03a3a3e102b0a61be85ffa736834c5ac6ef54462 + pristine_git_object: 1f8432823b74d8ba0a6767fd8145a95053d5e134 + src/sdk/models/shared/transfertransactionresponse.ts: + id: 580e9c29d7d7 + last_write_checksum: sha1:c0f5aee2bc54aedd369c123f6bda4bf820da3c62 + pristine_git_object: 4356c2411e620390240d83270bd2848910b1658c + src/sdk/models/shared/updatecustomerresponse.ts: + id: 0cd35c66c59e + last_write_checksum: sha1:79ba566ae87ad26b1a2b96e0860d9d2409972246 + pristine_git_object: 3057b181e32abc6f7023b5dbd34f67d8d635514d + src/sdk/models/shared/updateexpenserequest.ts: + id: 0c13d1a2d14e + last_write_checksum: sha1:ab575720004f0005682a1029c152bc344126d557 + pristine_git_object: 119ee0aeb17047469888c5a4a44855803f2121fe + src/sdk/models/shared/updateexpenseresponse.ts: + id: 128e3655aafd + last_write_checksum: sha1:539b8eff0c78ad56ea6f93f8351fdfd13cafc2ff + pristine_git_object: 4843efea096c1c9b250425302007f9d9db0b896a + src/sdk/models/shared/updatereimbursableexpensetransactionrequest.ts: + id: 48e930635a89 + last_write_checksum: sha1:0826d088d1c22e5fb708387618c9d123f3d6f2b2 + pristine_git_object: 1b58eaa213ff86819fd9e1b050345fcd9c108ce4 + src/sdk/models/shared/updatesupplierresponse.ts: + id: 898b61502a60 + last_write_checksum: sha1:8a358ee50a0e320686ed2d901ca1458593750d14 + pristine_git_object: 249e3024095ad8e27a399ed4c97f448f8158371c + src/sdk/models/shared/validation.ts: + id: e4418d9ed08e + last_write_checksum: sha1:ecb74ca87689c6554c1520c793ce71f4d889f15c + pristine_git_object: 3a6a92030507280977e021e0012fd0064b5debff + src/sdk/models/shared/validationitem.ts: + id: 0e34cb6ff62f + last_write_checksum: sha1:7f82caee4bbad4d6d8ddf69c64bf3ebdfdf492cd + pristine_git_object: ca354aa0beffed45e429ad92c2b3e14df222ec00 + src/sdk/models/shared/validfor.ts: + id: bce41b8c301d + last_write_checksum: sha1:ba706b1d322193114ffe33ec319cac0b7f301eaa + pristine_git_object: cc19074ade0454890961e38b4df4504ee9fbc722 + src/sdk/models/shared/validtransactiontypes.ts: + id: f6316fba8167 + last_write_checksum: sha1:f81430a0ff261d012c9c15535cb28ca441c3f39e + pristine_git_object: d113dc77961dcba70318ad403e872aae31209fde + src/sdk/pushoperations.ts: + id: 51542fbcd4f3 + last_write_checksum: sha1:c1d08061b9cbc7bbadb62ca1b13cc45b19776962 + pristine_git_object: deb3ed6aea9c98d7c176ec45ce7848c9f3d300db + src/sdk/reimbursements.ts: + id: c6f5b5cd4a71 + last_write_checksum: sha1:07743267b67c003f9e6d9f8aa2f01c7fd4047757 + pristine_git_object: 01a1a07e3f9882f75f98049bcaa05c1aa59612f5 + src/sdk/sdk.ts: + id: 784571af2f69 + last_write_checksum: sha1:354162a6f542b670dd9b15cd67f75acec139b4cb + pristine_git_object: e63b02426cc55b7a08cc610894de74c7cc1427a7 + src/sdk/suppliers.ts: + id: 68b234e74022 + last_write_checksum: sha1:dccefa84c128332a1ca1a6b189682e530c8ac18b + pristine_git_object: f0e3efff3e95eeeb1085dd9cb7349490a552dc52 + src/sdk/sync.ts: + id: 2e323d0b48d5 + last_write_checksum: sha1:4f0e40b8be8322eb22afcfab031adc26bbdd4df6 + pristine_git_object: c40062f86a91884f370735befef6d3e7952920ad + src/sdk/transactionstatus.ts: + id: 8063a8351642 + last_write_checksum: sha1:f99fb9825962a3eea6b8ebb1848306b6f972c95f + pristine_git_object: 14229325a5aefaaea6b3b86bfbbe212c7f65e078 + src/sdk/transfers.ts: + id: 1e842c518280 + last_write_checksum: sha1:743f04ebcbfed4e7294da882a5fa8d984f0efb98 + pristine_git_object: d225138ea187cf8442a57d39c404cc39c9ccc724 + src/sdk/types/async.ts: + id: 966026768b05 + last_write_checksum: sha1:3ff07b3feaf390ec1aeb18ff938e139c6c4a9585 + pristine_git_object: 689dba5de50e8769e5f3bb913e3f42a146d15bc1 + src/sdk/types/blobs.ts: + id: 1def31341768 + last_write_checksum: sha1:cf45d78916671cb6345a11c97c633c64402bc27c + pristine_git_object: cce2892d4f573a120ef3907db90ab15f5979cfda + src/sdk/types/constdatetime.ts: + id: 7e64cb450e63 + last_write_checksum: sha1:dfaaf9adfaf49808bd4c9dea0039f21b7088d9c0 + pristine_git_object: fe62144eaf6a2054fc8ca9a98466e70f41b5434d + src/sdk/types/decimal.ts: + id: 4c47ee438ee8 + last_write_checksum: sha1:9e679d0ebb0a5b1efcbae4926d24893181f3fe8f + pristine_git_object: a7895d555b147e9bf9e3cd79f0b0e9f340d5ecd1 + src/sdk/types/enums.ts: + id: 2ac17fb928cd + last_write_checksum: sha1:ee590453d2c87e33e89c633d37ee46907eca0e58 + pristine_git_object: aba0ffd2a3308a31e516d83b52823d80aa65a8f9 + src/sdk/types/fp.ts: + id: d9ec77b9460c + last_write_checksum: sha1:d24994d58f37a1ca106847fcc6d2e976c6f1c093 + pristine_git_object: ccbe51eac69dfb0da5131f14fd753c4b47c1d527 + src/sdk/types/index.ts: + id: 8c869d66c5f3 + last_write_checksum: sha1:0e06df309f1646981212f4103ea27cbd65e1f50e + pristine_git_object: 19a7bd013477d20d80a670e6833a0f0c9b1c8aa7 + src/sdk/types/operations.ts: + id: c5e9c75d4266 + last_write_checksum: sha1:c49e724cfb1259296381cb57bc0fcdd2eae45865 + pristine_git_object: beb81e10f0b9eee2ed398a853fe6f737b743f818 + src/sdk/types/rfcdate.ts: + id: fc969c92a7c1 + last_write_checksum: sha1:8e5f382e02fe21c2f2e24deb1b7bbf8cddd3dd16 + pristine_git_object: c79b3f53a3dd922aa2ace5a4191c8652cf9a8e89 + src/sdk/types/streams.ts: + id: e556b428e8dc + last_write_checksum: sha1:cc9ced2dd34a76c3a1bd7784ccda1cc3b37ab9a9 + pristine_git_object: a0163e7a99cea88f21d0ad4ce3af1c720180ee20 + src/sdk/types/unrecognized.ts: + id: 690d294a1973 + last_write_checksum: sha1:d33ac686528492f4cdc0dbf81ed343b4afe020fe + pristine_git_object: b7a2a13f3dff50663429df24ae2f55b647ff1084 + src/sdk/types/webhooks.ts: + id: 0f676e5e22a7 + last_write_checksum: sha1:dbce0cb417bcdcfcae0827fa045ee93ccab1c2c8 + pristine_git_object: 9510d20c09d8dd689f6e37254030de22e997f3cc + tsconfig.json: + id: 61ebb9fd6e8c + last_write_checksum: sha1:79dc1550d921fefec69f8632ed3b24dad41ca2f6 + pristine_git_object: 76110f883cac40bb04fb2f376cd69ea8c8d6d215 examples: list-companies: - "": + speakeasy-default-list-companies: parameters: query: page: 1 pageSize: 100 query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" orderBy: "-modifiedDate" + tags: "region=uk && team=invoice-finance" responses: "200": application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": {} + "400": + application/json: {} + "500": + application/json: {} One company: parameters: query: @@ -541,9 +1992,10 @@ examples: pageSize: 100 query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" orderBy: "-modifiedDate" + tags: "region=uk && team=invoice-finance" responses: "200": - application/json: {"results": [{"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "My Test Company", "description": "My Test Company make testing software", "redirect": "https://link.codat.io/company/3fa85f64-5717-4562-b3fc-2c963f66afa6", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z", "createdByUserName": "Mike Smith", "referenceSubsidiaryCompanies": [], "dataConnections": [{"id": "51baa045-4836-4317-a42e-3542e991e581", "integrationId": "1c312d69-e638-46d4-ad31-72e6c3ba8390", "integrationKey": "vjms", "sourceId": "396c3158-5dd7-481b-a7c4-a795ca31792b", "sourceType": "Accounting", "platformName": "Pandle", "linkUrl": "https://link-api.codat.io/companies/3fa85f64-5717-4562-b3fc-2c963f66afa6/connections/51baa045-4836-4317-a42e-3542e991e581/start", "status": "Linked", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z"}]}], "pageNumber": 1, "pageSize": 100, "totalResults": 1, "_links": {"self": {"href": "/companies"}, "current": {"href": "/companies?page=1&pageSize=100"}}} + application/json: {"results": [{"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "My Test Company", "description": "My Test Company make testing software", "redirect": "https://link.codat.io/company/3fa85f64-5717-4562-b3fc-2c963f66afa6", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z", "createdByUserName": "Mike Smith", "products": ["spend-insights", "lending", "expenses-v1", "commerce"], "referenceSubsidiaryCompanies": [], "dataConnections": [{"id": "51baa045-4836-4317-a42e-3542e991e581", "integrationId": "1c312d69-e638-46d4-ad31-72e6c3ba8390", "integrationKey": "vjms", "sourceId": "396c3158-5dd7-481b-a7c4-a795ca31792b", "sourceType": "Accounting", "platformName": "Pandle", "linkUrl": "https://link-api.codat.io/companies/3fa85f64-5717-4562-b3fc-2c963f66afa6/connections/51baa045-4836-4317-a42e-3542e991e581/start", "status": "Linked", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z"}]}], "pageNumber": 1, "pageSize": 100, "totalResults": 1, "_links": {"self": {"href": "/companies"}, "current": {"href": "/companies?page=1&pageSize=100"}}} List of Companies: parameters: query: @@ -551,9 +2003,10 @@ examples: pageSize: 100 query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" orderBy: "-modifiedDate" + tags: "region=uk && team=invoice-finance" responses: "200": - application/json: {"results": [{"id": "d1568dde-adf6-11ed-afa1-0242ac120002", "name": "Technicalium", "description": "Technology services, including web and app design and development", "redirect": "https://link.codat.io/company/d1568dde-adf6-11ed-afa1-0242ac120002", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z", "createdByUserName": "Joe Bloggs", "referenceSubsidiaryCompanies": [], "dataConnections": [{"id": "51baa045-4836-4317-a42e-3542e991e581", "integrationId": "1c312d69-e638-46d4-ad31-72e6c3ba8390", "integrationKey": "vjms", "sourceId": "396c3158-5dd7-481b-a7c4-a795ca31792b", "sourceType": "Accounting", "platformName": "Pandle", "linkUrl": "https://link-api.codat.io/companies/d1568dde-adf6-11ed-afa1-0242ac120002/connections/51baa045-4836-4317-a42e-3542e991e581/start", "status": "Linked", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z"}]}, {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "referenceSubsidiaryCompanies": [{"id": "c8d3af58-7011-47ce-b3f2-89faf300ef6d", "name": "Toft stores UK", "links": {"portal": "https://app.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/summary"}}, {"id": "db94eddc-9212-4568-9b5c-3eab0e325913", "name": "Toft stores US", "links": {"portal": "https://app.codat.io/companies/db94eddc-9212-4568-9b5c-3eab0e325913/summary"}}], "dataConnections": []}, {"id": "c8d3af58-7011-47ce-b3f2-89faf300ef6d", "name": "Toft stores UK", "redirect": "https://link.codat.io/company/c8d3af58-7011-47ce-b3f2-89faf300ef6d", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "referenceParentCompany": {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores", "links": {"portal": "https://app.codat.io/companies/ab12c58d-a678-4ebf-a159-ae99e1807bd0/summary"}}, "referenceSubsidiaryCompanies": [], "dataConnections": [{"id": "d5ab61b7-1ad0-46fd-9f9f-b6761047941e", "integrationId": "cc750323-5a47-4f28-8d8e-30fbbf2ce137", "integrationKey": "akxx", "sourceId": "9815b998-024d-4415-a40b-89903b2cad6f", "sourceType": "Accounting", "platformName": "Oracle NetSuite", "linkUrl": "https://link-api.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/connections/d5ab61b7-1ad0-46fd-9f9f-b6761047941e/start", "status": "Linked", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z"}]}, {"id": "db94eddc-9212-4568-9b5c-3eab0e325913", "name": "Toft stores US", "redirect": "https://link.codat.io/company/db94eddc-9212-4568-9b5c-3eab0e325913", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "referenceParentCompany": {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores", "links": {"portal": "https://app.codat.io/companies/ab12c58d-a678-4ebf-a159-ae99e1807bd0/summary"}}, "referenceSubsidiaryCompanies": [], "dataConnections": [{"id": "1e5c8c9e-27fd-4ba9-9a2a-d02ba65bc2fb", "integrationId": "cc750323-5a47-4f28-8d8e-30fbbf2ce137", "integrationKey": "akxx", "sourceId": "9815b998-024d-4415-a40b-89903b2cad6f", "sourceType": "Accounting", "platformName": "Oracle NetSuite", "linkUrl": "https://link-api.codat.io/companies/db94eddc-9212-4568-9b5c-3eab0e325913/connections/1e5c8c9e-27fd-4ba9-9a2a-d02ba65bc2fb/start", "status": "Linked", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z"}]}], "pageNumber": 1, "pageSize": 100, "totalResults": 3, "_links": {"self": {"href": "/companies"}, "current": {"href": "/companies?page=1&pageSize=100"}}} + application/json: {"results": [{"id": "d1568dde-adf6-11ed-afa1-0242ac120002", "name": "Technicalium", "description": "Technology services, including web and app design and development", "redirect": "https://link.codat.io/company/d1568dde-adf6-11ed-afa1-0242ac120002", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z", "createdByUserName": "Joe Bloggs", "products": ["spend-insights", "lending", "payables-v2"], "referenceSubsidiaryCompanies": [], "dataConnections": [{"id": "51baa045-4836-4317-a42e-3542e991e581", "integrationId": "1c312d69-e638-46d4-ad31-72e6c3ba8390", "integrationKey": "vjms", "sourceId": "396c3158-5dd7-481b-a7c4-a795ca31792b", "sourceType": "Accounting", "platformName": "Pandle", "linkUrl": "https://link-api.codat.io/companies/d1568dde-adf6-11ed-afa1-0242ac120002/connections/51baa045-4836-4317-a42e-3542e991e581/start", "status": "Linked", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z"}]}, {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "products": ["spend-insights"], "referenceSubsidiaryCompanies": [{"id": "c8d3af58-7011-47ce-b3f2-89faf300ef6d", "name": "Toft stores UK", "links": {"portal": "https://app.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/summary"}}, {"id": "db94eddc-9212-4568-9b5c-3eab0e325913", "name": "Toft stores US", "links": {"portal": "https://app.codat.io/companies/db94eddc-9212-4568-9b5c-3eab0e325913/summary"}}], "dataConnections": []}, {"id": "c8d3af58-7011-47ce-b3f2-89faf300ef6d", "name": "Toft stores UK", "redirect": "https://link.codat.io/company/c8d3af58-7011-47ce-b3f2-89faf300ef6d", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "products": ["lending", "spend-insights", "payables"], "referenceParentCompany": {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores", "links": {"portal": "https://app.codat.io/companies/ab12c58d-a678-4ebf-a159-ae99e1807bd0/summary"}}, "referenceSubsidiaryCompanies": [], "dataConnections": [{"id": "d5ab61b7-1ad0-46fd-9f9f-b6761047941e", "integrationId": "cc750323-5a47-4f28-8d8e-30fbbf2ce137", "integrationKey": "akxx", "sourceId": "9815b998-024d-4415-a40b-89903b2cad6f", "sourceType": "Accounting", "platformName": "Oracle NetSuite", "linkUrl": "https://link-api.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/connections/d5ab61b7-1ad0-46fd-9f9f-b6761047941e/start", "status": "Linked", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z"}]}, {"id": "db94eddc-9212-4568-9b5c-3eab0e325913", "name": "Toft stores US", "redirect": "https://link.codat.io/company/db94eddc-9212-4568-9b5c-3eab0e325913", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "products": ["spend-insights"], "referenceParentCompany": {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores", "links": {"portal": "https://app.codat.io/companies/ab12c58d-a678-4ebf-a159-ae99e1807bd0/summary"}}, "referenceSubsidiaryCompanies": [], "dataConnections": [{"id": "1e5c8c9e-27fd-4ba9-9a2a-d02ba65bc2fb", "integrationId": "cc750323-5a47-4f28-8d8e-30fbbf2ce137", "integrationKey": "akxx", "sourceId": "9815b998-024d-4415-a40b-89903b2cad6f", "sourceType": "Accounting", "platformName": "Oracle NetSuite", "linkUrl": "https://link-api.codat.io/companies/db94eddc-9212-4568-9b5c-3eab0e325913/connections/1e5c8c9e-27fd-4ba9-9a2a-d02ba65bc2fb/start", "status": "Linked", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z"}]}], "pageNumber": 1, "pageSize": 100, "totalResults": 3, "_links": {"self": {"href": "/companies"}, "current": {"href": "/companies?page=1&pageSize=100"}}} Malformed query: parameters: query: @@ -561,9 +2014,12 @@ examples: pageSize: 100 query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" orderBy: "-modifiedDate" + tags: "region=uk && team=invoice-finance" responses: "400": application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} Unresolved property: parameters: query: @@ -571,35 +2027,40 @@ examples: pageSize: 100 query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" orderBy: "-modifiedDate" + tags: "region=uk && team=invoice-finance" responses: "400": application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} create-company: With no description: requestBody: application/json: {"name": "Technicalium"} responses: "200": - application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Technicalium", "description": "", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18.1950523Z", "createdByUserName": "Dan Tzabar", "referenceSubsidiaryCompanies": [], "dataConnections": []} + application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Technicalium", "description": "", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18.1950523Z", "createdByUserName": "Dan Tzabar", "products": ["spend-insights"], "referenceSubsidiaryCompanies": [], "dataConnections": []} With a description: requestBody: application/json: {"name": "Technicalium", "description": "Technology services, including web and app design and development"} responses: "200": - application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Technicalium", "description": "Technology services, including web and app design and development", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18.1950523Z", "createdByUserName": "Dan Tzabar", "referenceSubsidiaryCompanies": [], "dataConnections": []} + application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Technicalium", "description": "Technology services, including web and app design and development", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18.1950523Z", "createdByUserName": "Dan Tzabar", "products": ["spend-insights"], "referenceSubsidiaryCompanies": [], "dataConnections": []} With a tag: requestBody: application/json: {"name": "Bank of Dave", "description": "Requested early access to the new financing scheme."} responses: "200": - application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Technicalium", "description": "", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18.1950523Z", "createdByUserName": "Dan Tzabar", "tags": {"region": "us"}, "referenceSubsidiaryCompanies": [], "dataConnections": []} + application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Technicalium", "description": "", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18.1950523Z", "createdByUserName": "Dan Tzabar", "products": ["spend-insights"], "tags": {"region": "us"}, "referenceSubsidiaryCompanies": [], "dataConnections": []} Malformed query: requestBody: application/json: {"name": "Bank of Dave", "description": "Requested early access to the new financing scheme."} responses: "400": application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - update-company: + "500": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + replace-company: Update name: parameters: path: @@ -608,8 +2069,11 @@ examples: application/json: {"name": "New Name"} responses: "200": - application/json: {"id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739", "lastSync": "2022-01-01T12:00:00.000Z", "created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "tags": {"region": "us", "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c"}, "dataConnections": [{"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"}]} - "401": {} + application/json: {"id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739", "lastSync": "2022-01-01T12:00:00.000Z", "created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "products": ["spend-insights", "lending"], "tags": {"region": "us", "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c"}, "dataConnections": [{"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"}]} + "401": + application/json: {} + "500": + application/json: {} Update description: parameters: path: @@ -618,8 +2082,62 @@ examples: application/json: {"name": "Same name", "description": "Additional documents required"} responses: "200": - application/json: {"id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739", "lastSync": "2022-01-01T12:00:00.000Z", "created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "tags": {"region": "us", "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c"}, "dataConnections": [{"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"}]} - "401": {} + application/json: {"id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739", "lastSync": "2022-01-01T12:00:00.000Z", "created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "products": ["spend-insights", "lending"], "tags": {"region": "us", "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c"}, "dataConnections": [{"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"}]} + "401": + application/json: {} + "500": + application/json: {} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + requestBody: + application/json: {"name": "Bank of Dave", "description": "Requested early access to the new financing scheme."} + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-replace-company: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + requestBody: + application/json: {"name": "Bank of Dave", "description": "Requested early access to the new financing scheme."} + responses: + "200": + application/json: {"id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739", "lastSync": "2022-01-01T12:00:00.000Z", "created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "products": ["spend-insights", "lending"], "tags": {"region": "us", "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c"}, "dataConnections": [{"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"}]} + "401": + application/json: {} + "500": + application/json: {} + update-company: + Update tags: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + requestBody: + application/json: {"tags": {"refrence": "new reference"}} + responses: + "200": + application/json: {"id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739", "lastSync": "2022-01-01T12:00:00.000Z", "created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "products": ["spend-insights", "lending"], "tags": {"region": "us", "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c"}, "dataConnections": [{"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"}]} + "401": + application/json: {} + "500": + application/json: {} + Update name: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + requestBody: + application/json: {"name": "New Name"} + responses: + "200": + application/json: {"id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739", "lastSync": "2022-01-01T12:00:00.000Z", "created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "products": ["spend-insights", "lending"], "tags": {"region": "us", "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c"}, "dataConnections": [{"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"}]} + "401": + application/json: {} + "500": + application/json: {} Unauthorized: parameters: path: @@ -629,6 +2147,21 @@ examples: responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-update-company: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + requestBody: + application/json: {"name": "Bank of Dave", "description": "Requested early access to the new financing scheme."} + responses: + "200": + application/json: {"id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "string", "redirect": "https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739", "lastSync": "2022-01-01T12:00:00.000Z", "created": "2022-01-01T12:00:00.000Z", "createdByUserName": "string", "products": ["spend-insights", "lending"], "tags": {"region": "us", "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c"}, "dataConnections": [{"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"}]} + "401": + application/json: {} + "500": + application/json: {} delete-company: Unauthorized: parameters: @@ -637,6 +2170,17 @@ examples: responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-delete-company: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + responses: + "401": + application/json: {} + "500": + application/json: {} get-company: Simple company: parameters: @@ -644,21 +2188,21 @@ examples: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" responses: "200": - application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores holdings", "description": "", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "referenceSubsidiaryCompanies": [], "dataConnections": []} + application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores holdings", "description": "", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "products": ["spend-insights", "lending", "expenses-v1", "commerce"], "referenceSubsidiaryCompanies": [], "dataConnections": []} Parent multi-entity company: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" responses: "200": - application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores", "description": "", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "referenceSubsidiaryCompanies": [{"id": "c8d3af58-7011-47ce-b3f2-89faf300ef6d", "name": "Toft stores UK", "links": {"portal": "https://app.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/summary"}}, {"id": "db94eddc-9212-4568-9b5c-3eab0e325913", "name": "Toft stores US", "links": {"portal": "https://app.codat.io/companies/db94eddc-9212-4568-9b5c-3eab0e325913/summary"}}], "dataConnections": []} + application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores", "description": "", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "products": ["spend-insights", "lending", "expenses-v1", "commerce"], "referenceSubsidiaryCompanies": [{"id": "c8d3af58-7011-47ce-b3f2-89faf300ef6d", "name": "Toft stores UK", "links": {"portal": "https://app.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/summary"}}, {"id": "db94eddc-9212-4568-9b5c-3eab0e325913", "name": "Toft stores US", "links": {"portal": "https://app.codat.io/companies/db94eddc-9212-4568-9b5c-3eab0e325913/summary"}}], "dataConnections": []} Subsidiary multi-entity company: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" responses: "200": - application/json: {"id": "c8d3af58-7011-47ce-b3f2-89faf300ef6d", "name": "Toft stores UK", "description": "", "redirect": "https://link.codat.io/company/c8d3af58-7011-47ce-b3f2-89faf300ef6d", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "referenceParentCompany": {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores", "links": {"portal": "https://app.codat.io/companies/ab12c58d-a678-4ebf-a159-ae99e1807bd0/summary"}}, "referenceSubsidiaryCompanies": [], "dataConnections": [{"id": "d5ab61b7-1ad0-46fd-9f9f-b6761047941e", "integrationId": "cc750323-5a47-4f28-8d8e-30fbbf2ce137", "integrationKey": "akxx", "sourceId": "9815b998-024d-4415-a40b-89903b2cad6f", "sourceType": "Accounting", "platformName": "Oracle NetSuite", "linkUrl": "https://link-api.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/connections/d5ab61b7-1ad0-46fd-9f9f-b6761047941e/start", "status": "Linked", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z"}]} + application/json: {"id": "c8d3af58-7011-47ce-b3f2-89faf300ef6d", "name": "Toft stores UK", "description": "", "redirect": "https://link.codat.io/company/c8d3af58-7011-47ce-b3f2-89faf300ef6d", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "products": ["spend-insights", "lending", "expenses-v1", "commerce"], "referenceParentCompany": {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Toft stores", "links": {"portal": "https://app.codat.io/companies/ab12c58d-a678-4ebf-a159-ae99e1807bd0/summary"}}, "referenceSubsidiaryCompanies": [], "dataConnections": [{"id": "d5ab61b7-1ad0-46fd-9f9f-b6761047941e", "integrationId": "cc750323-5a47-4f28-8d8e-30fbbf2ce137", "integrationKey": "akxx", "sourceId": "9815b998-024d-4415-a40b-89903b2cad6f", "sourceType": "Accounting", "platformName": "Oracle NetSuite", "linkUrl": "https://link-api.codat.io/companies/c8d3af58-7011-47ce-b3f2-89faf300ef6d/connections/d5ab61b7-1ad0-46fd-9f9f-b6761047941e/start", "status": "Linked", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z"}]} Unauthorized: parameters: path: @@ -666,8 +2210,10 @@ examples: responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} list-connections: - "": + speakeasy-default-list-connections: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" @@ -679,7 +2225,10 @@ examples: responses: "200": application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": {} + "400": + application/json: {} + "500": + application/json: {} Connections: parameters: path: @@ -704,6 +2253,8 @@ examples: responses: "400": application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} Unresolved property: parameters: path: @@ -716,6 +2267,8 @@ examples: responses: "400": application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} create-connection: Connection: parameters: @@ -735,6 +2288,8 @@ examples: responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} get-connection: Connection: parameters: @@ -752,6 +2307,8 @@ examples: responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} delete-connection: Unauthorized: parameters: @@ -761,6 +2318,18 @@ examples: responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-delete-connection: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "401": + application/json: {} + "500": + application/json: {} unlink-connection: Example: parameters: @@ -772,7 +2341,10 @@ examples: responses: "200": application/json: {"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"} - "401": {} + "401": + application/json: {} + "500": + application/json: {} Unauthorized: parameters: path: @@ -781,6 +2353,20 @@ examples: responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-unlink-connection: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"} + "401": + application/json: {} + "500": + application/json: {} create-partner-expense-connection: Malformed query: parameters: @@ -789,6 +2375,19 @@ examples: responses: "400": application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-create-partner-expense-connection: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + responses: + "200": + application/json: {"id": "ee2eb431-c0fa-4dc9-93fa-d29781c12bcd", "integrationId": "bf083d72-62c7-493e-aec9-81b4dbba7e2c", "integrationKey": "dfxm", "sourceId": "bdd831ce-eebd-4896-89a7-20e5ee8989ee", "sourceType": "Banking", "platformName": "Basiq", "linkUrl": "https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/ee2eb431-c0fa-4dc9-93fa-d29781c12bcd/start", "status": "Linked", "lastSync": "2022-10-27T10:22:43.6464237Z", "created": "2022-10-27T09:53:29Z"} + "400": + application/json: {} + "500": + application/json: {} get-company-info: Example 1: parameters: @@ -804,6 +2403,8 @@ examples: responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} get-company-configuration: Unauthorized: parameters: @@ -812,17 +2413,87 @@ examples: responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - set-company-configuration: - Malformed query: + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-get-company-configuration: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + responses: + "200": + application/json: {"bankAccount": {"id": "32"}, "supplier": {}, "customer": {}} + "401": + application/json: {} + "500": + application/json: {} + set-company-configuration: + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + requestBody: + application/json: {"bankAccount": {"id": "32"}, "supplier": {}, "customer": {}} + responses: + "400": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-set-company-configuration: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + requestBody: + application/json: {"bankAccount": {"id": "32"}, "supplier": {}, "customer": {}} + responses: + "200": + application/json: {"bankAccount": {"id": "32"}, "supplier": {}, "customer": {}} + "400": + application/json: {} + "500": + application/json: {} + get-mapping-options: + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-get-mapping-options: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + responses: + "200": + application/json: {"expenseProvider": "Partner Expense", "accounts": [{"id": "127f3b99-8dc2-4b7e-854c-91ef9bd2757b", "nominalCode": "300", "name": "Purchases", "currency": "GBP", "accountType": "Expense", "fullyQualifiedCategory": "Expense.DirectCosts", "validTransactionTypes": ["Payment"], "validFor": ["expense-transactions.Payment"]}], "trackingCategories": [{"id": "DEPARTMENT_2", "name": "New York", "parentId": "DEPARTMENTS"}], "taxRates": [{"id": "23_Bills", "name": "20% Bill tax Bills", "code": "20% Bill tax", "effectiveTaxRate": 20, "totalTaxRate": 20, "validTransactionTypes": ["Payment"]}]} + "401": + application/json: {} + "500": + application/json: {} + get-last-successful-sync: + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-get-last-successful-sync: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - requestBody: - application/json: {"bankAccount": {"id": "32"}} responses: - "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-mapping-options: + "200": + application/json: {"companyId": "d4d73051-ed31-42b6-99f6-d288cd940992", "syncId": "a6a22aff-a43a-411d-a910-2dae73217cce", "syncStatusCode": 2000, "syncStatus": "Complete", "syncUtc": "2022-10-23T00:00:00Z"} + "401": + application/json: {} + "500": + application/json: {} + get-latest-sync: Unauthorized: parameters: path: @@ -830,15 +2501,20 @@ examples: responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-last-successful-sync: - Unauthorized: + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-get-latest-sync: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" responses: + "200": + application/json: {"companyId": "d4d73051-ed31-42b6-99f6-d288cd940992", "syncId": "a6a22aff-a43a-411d-a910-2dae73217cce", "syncStatusCode": 2000, "syncStatus": "Complete", "syncUtc": "2022-10-23T00:00:00Z"} "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - get-latest-sync: + application/json: {} + "500": + application/json: {} + list-syncs: Unauthorized: parameters: path: @@ -846,14 +2522,19 @@ examples: responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - list-syncs: - Unauthorized: + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-list-syncs: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" responses: + "200": + application/json: [{"companyId": "d4d73051-ed31-42b6-99f6-d288cd940992", "syncId": "a6a22aff-a43a-411d-a910-2dae73217cce", "syncStatusCode": 2000, "syncStatus": "Complete", "syncUtc": "2022-10-23T00:00:00Z"}] "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + application/json: {} + "500": + application/json: {} get-sync-by-id: Unauthorized: parameters: @@ -863,6 +2544,20 @@ examples: responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-get-sync-by-id: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + syncId: "6fb40d5e-b13e-11ed-afa1-0242ac120002" + responses: + "200": + application/json: {"companyId": "d4d73051-ed31-42b6-99f6-d288cd940992", "syncId": "a6a22aff-a43a-411d-a910-2dae73217cce", "syncStatusCode": 2000, "syncStatus": "Complete", "syncUtc": "2022-10-23T00:00:00Z"} + "401": + application/json: {} + "500": + application/json: {} list-sync-transactions: Malformed query: parameters: @@ -875,6 +2570,8 @@ examples: responses: "400": application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} Unresolved property: parameters: path: @@ -886,6 +2583,23 @@ examples: responses: "400": application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-list-sync-transactions: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + syncId: "6fb40d5e-b13e-11ed-afa1-0242ac120002" + query: + page: 1 + pageSize: 100 + responses: + "200": + application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} + "400": + application/json: {} + "500": + application/json: {} get-sync-transaction: Unauthorized: parameters: @@ -896,6 +2610,21 @@ examples: responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-get-sync-transaction: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + syncId: "6fb40d5e-b13e-11ed-afa1-0242ac120002" + transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee" + responses: + "200": + application/json: [{"transactionId": "aa02271d-ed5f-47f5-be76-778d5905225a", "status": "Completed", "integrationType": "expenses"}] + "401": + application/json: {} + "500": + application/json: {} create-expense-transaction: Payment: parameters: @@ -906,23 +2635,29 @@ examples: responses: "200": application/json: {"syncId": "cd937d46-8e41-43a9-9477-a79158ffd98a"} - "400": {} + "400": + application/json: {} + "500": + application/json: {} Refund: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" requestBody: - application/json: [{"id": "7008d3f2-aeb4-11ed-afa1-0242ac120002", "type": "Refund", "issueDate": "2024-02-17T00:00:00+00:00", "currency": "GBP", "contactRef": {"id": "430", "type": "Supplier"}, "bankAccountRef": {"id": "97"}, "merchantName": "Amazon UK", "lines": [{"netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "23_Bills"}, "accountRef": {"id": "42"}, "trackingRefs": [{"id": "DEPARTMENT_6"}]}], "notes": "APPLE.COM/BILL - 09001077498 - Card Ending: 4590"}] + application/json: [{"id": "7008d3f2-aeb4-11ed-afa1-0242ac120002", "type": "Refund", "issueDate": "2024-02-17T00:00:00+00:00", "currency": "GBP", "contactRef": {"id": "430", "type": "Supplier"}, "bankAccountRef": {"id": "97"}, "merchantName": "Amazon UK", "lines": [{"netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "23_Bills"}, "accountRef": {"id": "42"}, "trackingRefs": [{"id": "DEPARTMENT_6", "dataType": "trackingCategories"}]}], "notes": "APPLE.COM/BILL - 09001077498 - Card Ending: 4590"}] responses: "200": application/json: {"syncId": "cd937d46-8e41-43a9-9477-a79158ffd98a"} - "400": {} + "400": + application/json: {} + "500": + application/json: {} Example 1: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" requestBody: - application/json: [{"id": "a44135b0-6882-489a-83fe-a0c57a4afb19", "type": "Payment", "issueDate": "2024-05-21T00:00:00+00:00", "currency": "GBP", "currencyRate": 1, "contactRef": {"id": "430", "type": "Supplier"}, "bankAccountRef": {"id": "97"}, "merchantName": "Amazon UK", "lines": [{"netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "23_Bills"}, "accountRef": {"id": "35"}, "trackingRefs": [{"id": "DEPARTMENT_3"}, {"dataType": "trackingCategories"}], "invoiceTo": {"id": "504", "type": "customer"}}], "notes": "amazon purchase"}] + application/json: [{"id": "a44135b0-6882-489a-83fe-a0c57a4afb19", "type": "Payment", "issueDate": "2024-05-21T00:00:00+00:00", "currency": "GBP", "currencyRate": 1, "contactRef": {"id": "430", "type": "Supplier"}, "bankAccountRef": {"id": "97"}, "merchantName": "Amazon UK", "lines": [{"netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "23_Bills"}, "accountRef": {"id": "35"}, "trackingRefs": [{"id": "DEPARTMENT_3", "dataType": "trackingCategories"}, {"dataType": "trackingCategories"}], "invoiceTo": {"id": "504", "type": "customer"}}], "notes": "amazon purchase"}] responses: "200": application/json: {"syncId": "cd937d46-8e41-43a9-9477-a79158ffd98a"} @@ -931,10 +2666,12 @@ examples: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" requestBody: - application/json: [{"id": "a44135b0-6882-489a-83fe-a0c57a4afb19", "type": "Payment", "issueDate": "2024-05-21T00:00:00+00:00", "currency": "GBP", "currencyRate": 1, "contactRef": {"id": "430", "type": "Supplier"}, "bankAccountRef": {"id": "97"}, "merchantName": "Amazon UK", "lines": [{"netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "23_Bills"}, "accountRef": {"id": "35"}, "trackingRefs": [{"id": "DEPARTMENT_3"}, {"dataType": "trackingCategories"}], "invoiceTo": {"id": "504", "type": "customer"}}], "notes": "amazon purchase"}] + application/json: [{"id": "a44135b0-6882-489a-83fe-a0c57a4afb19", "type": "Payment", "issueDate": "2024-05-21T00:00:00+00:00", "currency": "GBP", "currencyRate": 1, "contactRef": {"id": "430", "type": "Supplier"}, "bankAccountRef": {"id": "97"}, "merchantName": "Amazon UK", "lines": [{"netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "23_Bills"}, "accountRef": {"id": "35"}, "trackingRefs": [{"id": "DEPARTMENT_3", "dataType": "trackingCategories"}, {"dataType": "trackingCategories"}], "invoiceTo": {"id": "504", "type": "customer"}}], "notes": "amazon purchase"}] responses: "400": application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} update-expense-transaction: Payment: parameters: @@ -943,16 +2680,39 @@ examples: transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee" requestBody: application/json: {"type": "Payment", "issueDate": "2024-05-21T00:00:00+00:00", "currency": "GBP", "currencyRate": 1, "contactRef": {"id": "430", "type": "Supplier"}, "bankAccountRef": {"id": "97"}, "merchantName": "Amazon UK", "lines": [{"netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "23_Bills"}, "accountRef": {"id": "35"}, "trackingRefs": [{"id": "DEPARTMENT_5", "dataType": "trackingCategories"}], "invoiceTo": {"id": "504", "type": "customer"}}], "notes": "APPLE.COM/BILL - 09001077498 - Card Ending: 4590"} + responses: + "202": + application/json: {"syncId": "1ad0695c-4566-4715-918c-adbb03eac81e"} + "400": + application/json: {} + "500": + application/json: {} Malformed query: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee" requestBody: - application/json: {"type": "Payment", "issueDate": "2022-06-28T00:00:00.000Z", "currency": "GBP", "contactRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd", "type": "Supplier"}, "bankAccountRef": {"id": "787dfb37-5707-4dc0-8a86-8d74e4cc78ea"}, "merchantName": "Amazon UK", "lines": [{"netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "accountRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "itemRef": {"id": "80000002-1675158984"}, "trackingRefs": [{"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}, {"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}], "invoiceTo": {"id": "80000002-1674552702", "type": "customer"}}, {"netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "accountRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "itemRef": {"id": "80000002-1675158984"}, "trackingRefs": [{"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}], "invoiceTo": {"id": "80000002-1674552702", "type": "customer"}}, {"netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "accountRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "itemRef": {"id": "80000002-1675158984"}, "trackingRefs": [{"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}, {"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}, {"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}], "invoiceTo": {"id": "80000002-1674552702", "type": "customer"}}], "notes": "APPLE.COM/BILL - 09001077498 - Card Ending: 4590"} + application/json: {"type": "Payment", "issueDate": "2022-06-28T00:00:00.000Z", "currency": "GBP", "contactRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd", "type": "Supplier"}, "bankAccountRef": {"id": "787dfb37-5707-4dc0-8a86-8d74e4cc78ea"}, "merchantName": "Amazon UK", "lines": [{"netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "accountRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "itemRef": null, "trackingRefs": null, "invoiceTo": null}], "notes": "APPLE.COM/BILL - 09001077498 - Card Ending: 4590"} responses: "400": application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-update-expense-transaction: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee" + requestBody: + application/json: {"type": "Payment", "issueDate": "2022-06-28T00:00:00.000Z", "currency": "GBP", "contactRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd", "type": "Supplier"}, "bankAccountRef": {"id": "787dfb37-5707-4dc0-8a86-8d74e4cc78ea"}, "merchantName": "Amazon UK", "lines": [{"netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "accountRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "itemRef": null, "trackingRefs": null, "invoiceTo": null}], "notes": "APPLE.COM/BILL - 09001077498 - Card Ending: 4590"} + responses: + "202": + application/json: {"syncId": "1ad0695c-4566-4715-918c-adbb03eac81e"} + "400": + application/json: {} + "500": + application/json: {} create-transfer-transaction: Create transfer: parameters: @@ -964,14 +2724,17 @@ examples: responses: "200": application/json: {"syncId": "cd937d46-8e41-43a9-9477-a79158ffd98a"} - "400": {} + "400": + application/json: {} + "500": + application/json: {} Example 1: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee" requestBody: - application/json: {"description": "Transfer from bank account Y to bank account Z", "date": "2022-10-23T00:00:00Z", "from": {"accountRef": {"id": ""}, "amount": "6384.24"}, "to": {"accountRef": {"id": ""}, "amount": "4174.58"}} + application/json: {"description": "Transfer from bank account Y to bank account Z", "date": "2022-10-23T00:00:00Z", "from": {"accountRef": {"id": ""}, "amount": 7329.18}, "to": {"accountRef": {"id": ""}, "amount": 522.15}} responses: "200": application/json: {"syncId": "cd937d46-8e41-43a9-9477-a79158ffd98a"} @@ -981,10 +2744,12 @@ examples: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee" requestBody: - application/json: {"description": "Transfer from bank account Y to bank account Z", "date": "2022-10-23T00:00:00Z", "from": {"accountRef": {"id": ""}, "amount": "690.26"}, "to": {"accountRef": {"id": ""}, "amount": "7964.74"}} + application/json: {"description": "Transfer from bank account Y to bank account Z", "date": "2022-10-23T00:00:00Z", "from": {"accountRef": {"id": ""}, "amount": 7329.18}, "to": {"accountRef": {"id": ""}, "amount": 522.15}} responses: "400": application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} create-adjustment-transaction: Create adjustment: parameters: @@ -995,13 +2760,16 @@ examples: responses: "200": application/json: {"syncId": "cd937d46-8e41-43a9-9477-a79158ffd98a"} - "400": {} + "400": + application/json: {} + "500": + application/json: {} Example 1: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" requestBody: - application/json: [{"id": "a621cf02-1cd9-4cf5-8403-315211a509a3", "date": "2022-10-23T00:00:00Z", "currency": "Netherlands Antillian Guilder", "lines": [{"amount": 50, "accountRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "description": "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", "trackingRefs": [{"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}, {"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}], "invoiceTo": {"id": "80000002-1674552702", "type": "customer"}}, {"amount": 50, "accountRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "description": "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", "trackingRefs": [{"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}, {"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}, {"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}], "invoiceTo": {"id": "80000002-1674552702", "type": "customer"}}]}] + application/json: [{"id": "6a13b8cf-d482-4389-9f93-08d52faa3dc0", "date": "2022-10-23T00:00:00Z", "currency": "Lilangeni", "lines": []}] responses: "200": application/json: {"syncId": "cd937d46-8e41-43a9-9477-a79158ffd98a"} @@ -1010,10 +2778,12 @@ examples: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" requestBody: - application/json: [{"id": "74c2becc-3769-4177-b5e0-24985613de0e", "date": "2022-10-23T00:00:00Z", "currency": "Lek", "lines": []}] + application/json: [{"id": "6a13b8cf-d482-4389-9f93-08d52faa3dc0", "date": "2022-10-23T00:00:00Z", "currency": "Lilangeni", "lines": []}] responses: "400": application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} create-reimbursable-expense-transaction: Create reimbursable expense: parameters: @@ -1024,13 +2794,16 @@ examples: responses: "200": application/json: {"syncId": "cd937d46-8e41-43a9-9477-a79158ffd98a"} - "400": {} + "400": + application/json: {} + "500": + application/json: {} Example 1: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" requestBody: - application/json: [{"id": "4d7c6929-7770-412b-91bb-44d3bc71d111", "contactRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "apAccountRef": {"id": "8000004C-1724173136"}, "issueDate": "2022-10-23T00:00:00Z", "dueDate": "2022-10-23T00:00:00Z", "currency": "GBP", "notes": "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", "lines": []}] + application/json: [{"id": "4d7c6929-7770-412b-91bb-44d3bc71d111", "contactRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "apAccountRef": null, "issueDate": "2022-10-23T00:00:00Z", "dueDate": "2022-10-23T00:00:00Z", "currency": "GBP", "notes": "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", "lines": [{"description": "2-night hotel stay", "netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "accountRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "itemRef": {"id": "80000002-1675158984"}, "trackingRefs": [{"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}], "invoiceTo": {"id": "80000002-1674552702", "type": "customer"}}]}] responses: "200": application/json: {"syncId": "cd937d46-8e41-43a9-9477-a79158ffd98a"} @@ -1039,10 +2812,12 @@ examples: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" requestBody: - application/json: [] + application/json: [{"id": "4d7c6929-7770-412b-91bb-44d3bc71d111", "contactRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "apAccountRef": null, "issueDate": "2022-10-23T00:00:00Z", "dueDate": "2022-10-23T00:00:00Z", "currency": "GBP", "notes": "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", "lines": [{"description": "2-night hotel stay", "netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "accountRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "itemRef": {"id": "80000002-1675158984"}, "trackingRefs": [{"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}], "invoiceTo": {"id": "80000002-1674552702", "type": "customer"}}]}] responses: "400": application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} update-reimbursable-expense-transaction: Update reimbursable expense: parameters: @@ -1054,14 +2829,17 @@ examples: responses: "200": application/json: {"syncId": "cd937d46-8e41-43a9-9477-a79158ffd98a"} - "400": {} + "400": + application/json: {} + "500": + application/json: {} Example 1: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee" requestBody: - application/json: {"contactRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "apAccountRef": {"id": "8000004C-1724173136"}, "issueDate": "2022-10-23T00:00:00Z", "dueDate": "2022-10-23T00:00:00Z", "currency": "GBP", "notes": "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", "lines": [{"description": "2-night hotel stay", "netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "accountRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "itemRef": {"id": "80000002-1675158984"}, "trackingRefs": [{"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}, {"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}, {"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}], "invoiceTo": {"id": "80000002-1674552702", "type": "customer"}}]} + application/json: {"contactRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "apAccountRef": {"id": "8000004C-1724173136"}, "issueDate": "2022-10-23T00:00:00Z", "dueDate": "2022-10-23T00:00:00Z", "currency": "GBP", "notes": "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", "lines": [{"description": "2-night hotel stay", "netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "accountRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "itemRef": {"id": "80000002-1675158984"}, "trackingRefs": [{"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}], "invoiceTo": {"id": "80000002-1674552702", "type": "customer"}}]} responses: "200": application/json: {"syncId": "cd937d46-8e41-43a9-9477-a79158ffd98a"} @@ -1071,10 +2849,12 @@ examples: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee" requestBody: - application/json: {"contactRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "apAccountRef": {"id": "8000004C-1724173136"}, "issueDate": "2022-10-23T00:00:00Z", "dueDate": "2022-10-23T00:00:00Z", "currency": "GBP", "notes": "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", "lines": [{"description": "2-night hotel stay", "netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "accountRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "itemRef": {"id": "80000002-1675158984"}, "trackingRefs": [], "invoiceTo": {"id": "80000002-1674552702", "type": "customer"}}, {"description": "2-night hotel stay", "netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "accountRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "itemRef": {"id": "80000002-1675158984"}, "trackingRefs": [{"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}, {"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}, {"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}], "invoiceTo": {"id": "80000002-1674552702", "type": "customer"}}, {"description": "2-night hotel stay", "netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "accountRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "itemRef": {"id": "80000002-1675158984"}, "trackingRefs": [{"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}], "invoiceTo": {"id": "80000002-1674552702", "type": "customer"}}]} + application/json: {"contactRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "apAccountRef": {"id": "8000004C-1724173136"}, "issueDate": "2022-10-23T00:00:00Z", "dueDate": "2022-10-23T00:00:00Z", "currency": "GBP", "notes": "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", "lines": [{"description": "2-night hotel stay", "netAmount": 100, "taxAmount": 20, "taxRateRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "accountRef": {"id": "40e3e57c-2322-4898-966c-ca41adfd23fd"}, "itemRef": {"id": "80000002-1675158984"}, "trackingRefs": [{"id": "e9a1b63d-9ff0-40e7-8038-016354b987e6", "dataType": "trackingCategories"}], "invoiceTo": {"id": "80000002-1674552702", "type": "customer"}}]} responses: "400": application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} upload-expense-attachment: Malformed query: parameters: @@ -1085,14 +2865,49 @@ examples: responses: "400": application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-upload-expense-attachment: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + syncId: "6fb40d5e-b13e-11ed-afa1-0242ac120002" + transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee" + responses: + "200": + application/json: {} + "400": + application/json: {} + "500": + application/json: {} refresh-all-data-types: - Unauthorized: + Malformed query: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "400": + application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + Unresolved property: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + responses: + "400": + application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-refresh-all-data-types: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + responses: + "400": + application/json: {} + "500": + application/json: {} get-data-status: Example: parameters: @@ -1108,18 +2923,43 @@ examples: responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} refresh-data-type: - Unauthorized: + Malformed query: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" dataType: "invoices" - query: {} responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "400": + application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + Unresolved property: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + dataType: "invoices" + responses: + "400": + application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-refresh-data-type: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + dataType: "invoices" + responses: + "200": + application/json: {"id": "97d60846-f07a-4d42-b5a0-0bdcc6ebf56b", "companyId": "4645bd78-8988-45bc-ac9e-67ba5df6e4e5", "connectionId": "51baa045-4836-4317-a42e-3542e991e581", "dataType": "invoices", "status": "Initial", "statusDescription": "Paused until 2022-10-23T00:00:00.000Z", "requested": "2022-11-14T11:18:37.2798351Z", "progress": 10, "isCompleted": false, "isErrored": false} + "400": + application/json: {} + "500": + application/json: {} list-pull-operations: - "": + speakeasy-default-list-pull-operations: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" @@ -1131,7 +2971,10 @@ examples: responses: "200": application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": {} + "400": + application/json: {} + "500": + application/json: {} Example: parameters: path: @@ -1156,6 +2999,8 @@ examples: responses: "400": application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} Unresolved property: parameters: path: @@ -1168,17 +3013,33 @@ examples: responses: "400": application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} get-pull-operation: Unauthorized: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - datasetId: "71a4c0fb-8e15-45bd-958d-330b4e6e9f07" + datasetId: "fa5f3e86-bd80-49b8-853c-5fbba4b201f5" responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-get-pull-operation: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + datasetId: "567094de-cafa-4f13-96d3-59e21b47ebe2" + responses: + "200": + application/json: {"id": "97d60846-f07a-4d42-b5a0-0bdcc6ebf56b", "companyId": "4645bd78-8988-45bc-ac9e-67ba5df6e4e5", "connectionId": "51baa045-4836-4317-a42e-3542e991e581", "dataType": "invoices", "status": "Initial", "statusDescription": "Paused until 2022-10-23T00:00:00.000Z", "requested": "2022-11-14T11:18:37.2798351Z", "progress": 10, "isCompleted": false, "isErrored": false} + "401": + application/json: {} + "500": + application/json: {} list-push-operations: - "": + speakeasy-default-list-push-operations: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" @@ -1190,7 +3051,10 @@ examples: responses: "200": application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": {} + "400": + application/json: {} + "500": + application/json: {} Malformed query: parameters: path: @@ -1203,6 +3067,8 @@ examples: responses: "400": application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} Unresolved property: parameters: path: @@ -1215,27 +3081,62 @@ examples: responses: "400": application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} get-push-operation: Unauthorized: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - pushOperationKey: "b888f774-3e7c-4135-a18c-6b985523c4bc" + pushOperationKey: "660e8684-c0fb-4468-9e2a-b2e3b115d747" responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-get-push-operation: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + pushOperationKey: "86946e36-000f-4e6e-b76f-84a3be88f2b5" + responses: + "200": + application/json: {"changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "e12fb736-33cd-4b97-8d90-32b5be7c8586", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Pending", "statusCode": 480134} + "401": + application/json: {} + "500": + application/json: {} create-account: Malformed query: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: {} + query: + allowSyncOnPushComplete: true requestBody: - application/json: {"nominalCode": "610", "name": "Accounts Receivable", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Current", "fullyQualifiedName": "Cash On Hand", "currency": "USD", "currentBalance": 0, "type": "Asset", "status": "Active"} + application/json: {"nominalCode": "610", "name": "Accounts Receivable", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Current", "fullyQualifiedName": "Cash On Hand", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active"} responses: "400": application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-create-account: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: + allowSyncOnPushComplete: true + requestBody: + application/json: {"nominalCode": "610", "name": "Accounts Receivable", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Current", "fullyQualifiedName": "Cash On Hand", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active"} + responses: + "200": + application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "1b6266d1-1e44-46c5-8eb5-a8f98e03124e", "nominalCode": "610", "name": "Accounts Receivable", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Current", "fullyQualifiedName": "Cash On Hand", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active"}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "936358e8-4e4d-4663-93c0-e27c0d06dd56", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Failed", "statusCode": 239266} + "400": + application/json: {} + "500": + application/json: {} get-create-chartOfAccounts-model: Exact (Netherlands): parameters: @@ -1268,7 +3169,7 @@ examples: connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" responses: "200": - application/json: {"type": "Object", "displayName": "Nominal Account", "description": "Nominal Accounts are the categories a business uses to record transactions", "required": true, "properties": {"nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": true, "validation": {"warnings": [{"field": "NominalCode", "details": "Max length of 7 characters."}], "information": []}}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": true, "validation": {"warnings": [{"field": "Name", "details": "Max length of 31 characters."}], "information": []}}, "description": {"type": "String", "displayName": "Description", "description": "Description of the account", "required": false, "validation": {"warnings": [{"field": "Description", "details": "Max length of 200 characters."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the account", "required": false, "validation": {"warnings": [{"field": "Currency", "details": "The currency must match the base currency of the QuickBooks Desktop company unless the FullyQualifiedCategory is 'Asset.AccountsReceivable','Liability.AccountsPayable' or 'Liability.CreditCard'"}, {"field": "Currency", "details": "Must be a three letter ISO code that matches an existing active currency in the QuickBooks Desktop company"}, {"field": "Currency", "details": "Can only be set if the Quickbooks Desktop company has Multicurrency enabled."}], "information": [{"field": "Currency", "details": "If not set, will default to the base currency of the QuickBooks Desktop company"}]}}, "fullyQualifiedCategory": {"type": "String", "displayName": "Fully Qualified Category", "description": "The full category of the account e.g. Liability.Current or Income.Revenue", "required": true, "options": [{"value": "Asset.AccountsReceivable", "type": "String", "displayName": "Account Receivable", "required": false}, {"value": "Asset.FixedAsset", "type": "String", "displayName": "Fixed Asset", "required": false}, {"value": "Asset.OtherCurrentAsset", "type": "String", "displayName": "Other Current Asset", "required": false}, {"value": "Asset.OtherAsset", "type": "String", "displayName": "Other Asset", "required": false}, {"value": "Income.Income", "type": "String", "displayName": "Income", "required": false}, {"value": "Income.OtherIncome", "type": "String", "displayName": "Other Income", "required": false}, {"value": "Liability.AccountsPayable", "type": "String", "displayName": "Accounts Payable", "required": false}, {"value": "Liability.CreditCard", "type": "String", "displayName": "Credit Card", "required": false}, {"value": "Liability.LongTermLiability", "type": "String", "displayName": "Long Term Liability", "required": false}, {"value": "Liability.OtherCurrentLiability", "type": "String", "displayName": "Other Current Liability", "required": false}, {"value": "Liability.CostOfGoodsSold", "type": "String", "displayName": "Cost Of Goods Sold", "required": false}, {"value": "Equity.Equity", "type": "String", "displayName": "Equity", "required": false}, {"value": "Expense.Expense", "type": "String", "displayName": "Expense", "required": false}, {"value": "Expense.OtherExpense", "type": "String", "displayName": "Other Expense", "required": false}]}, "currentBalance": {"type": "Number", "displayName": "Current Balance", "description": "The current balance in the account", "required": false}}} + application/json: {"type": "Object", "displayName": "Nominal Account", "description": "Nominal Accounts are the categories a business uses to record transactions", "required": true, "properties": {"nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": true, "validation": {"warnings": [{"field": "NominalCode", "details": "Max length of 7 characters."}], "information": []}}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": true, "validation": {"warnings": [{"field": "Name", "details": "Max length of 31 characters."}], "information": []}}, "description": {"type": "String", "displayName": "Description", "description": "Description of the account", "required": false, "validation": {"warnings": [{"field": "Description", "details": "Max length of 200 characters."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the account", "required": false, "validation": {"warnings": [{"field": "Currency", "details": "The currency must match the base currency of the QuickBooks Desktop company unless the FullyQualifiedCategory is 'Asset.AccountsReceivable','Liability.AccountsPayable' or 'Liability.CreditCard'"}, {"field": "Currency", "details": "Must be a three letter ISO code that matches an existing active currency in the QuickBooks Desktop company"}, {"field": "Currency", "details": "Can only be set if the QuickBooks Desktop company has Multicurrency enabled."}], "information": [{"field": "Currency", "details": "If not set, will default to the base currency of the QuickBooks Desktop company"}]}}, "fullyQualifiedCategory": {"type": "String", "displayName": "Fully Qualified Category", "description": "The full category of the account e.g. Liability.Current or Income.Revenue", "required": true, "options": [{"value": "Asset.AccountsReceivable", "type": "String", "displayName": "Account Receivable", "required": false}, {"value": "Asset.FixedAsset", "type": "String", "displayName": "Fixed Asset", "required": false}, {"value": "Asset.OtherCurrentAsset", "type": "String", "displayName": "Other Current Asset", "required": false}, {"value": "Asset.OtherAsset", "type": "String", "displayName": "Other Asset", "required": false}, {"value": "Income.Income", "type": "String", "displayName": "Income", "required": false}, {"value": "Income.OtherIncome", "type": "String", "displayName": "Other Income", "required": false}, {"value": "Liability.AccountsPayable", "type": "String", "displayName": "Accounts Payable", "required": false}, {"value": "Liability.CreditCard", "type": "String", "displayName": "Credit Card", "required": false}, {"value": "Liability.LongTermLiability", "type": "String", "displayName": "Long Term Liability", "required": false}, {"value": "Liability.OtherCurrentLiability", "type": "String", "displayName": "Other Current Liability", "required": false}, {"value": "Liability.CostOfGoodsSold", "type": "String", "displayName": "Cost Of Goods Sold", "required": false}, {"value": "Equity.Equity", "type": "String", "displayName": "Equity", "required": false}, {"value": "Expense.Expense", "type": "String", "displayName": "Expense", "required": false}, {"value": "Expense.OtherExpense", "type": "String", "displayName": "Other Expense", "required": false}]}, "currentBalance": {"type": "Number", "displayName": "Current Balance", "description": "The current balance in the account", "required": false}}} QuickBooks Online Sandbox: parameters: path: @@ -1308,7 +3209,7 @@ examples: connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" responses: "200": - application/json: {"type": "Object", "displayName": "Nominal Account", "description": "Nominal Accounts are the categories a business uses to record transactions", "required": true, "properties": {"nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": true}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": true}, "description": {"type": "String", "displayName": "Description", "description": "Description of the account", "required": true}, "fullyQualifiedCategory": {"type": "String", "displayName": "Fully Qualified Category", "description": "The full category of the account e.g. Liability.Current or Income.Revenue", "required": true}, "fullyQualifiedName": {"type": "String", "displayName": "Fully Qualified Name", "description": "The full name of the account e.g. Liability.Current.VAT or Income.Revenue.Sales", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the account", "required": true}, "currentBalance": {"type": "Number", "displayName": "Current Balance", "description": "The current balance in the account", "required": true}, "type": {"type": "String", "displayName": "Account Type", "description": "The type, or base category, of the account", "required": true}, "status": {"type": "String", "displayName": "Account Status", "description": "The status of the account", "required": true}, "isBankAccount": {"type": "Boolean", "displayName": "Is Bank Account?", "description": "Confirms whether the nominal account represents a bank account or not", "required": true}, "validDatatypeLinks": {"type": "Array", "displayName": "Valid Datatype Links", "description": "Describes which fields on other data types are valid links to this account in the originating system", "required": true}, "metadata": {"type": "Object", "displayName": "Metadata", "description": "Miscellaneous data about the item", "required": true}}} + application/json: {"type": "Object", "displayName": "Nominal Account", "description": "Nominal Accounts are the categories a business uses to record transactions", "required": true, "properties": {"nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": true}, "name": {"type": "String", "displayName": "Name", "description": "Name of the account", "required": true}, "description": {"type": "String", "displayName": "Description", "description": "Description of the account", "required": true}, "fullyQualifiedCategory": {"type": "String", "displayName": "Fully Qualified Category", "description": "The full category of the account e.g. Liability.Current or Income.Revenue", "required": true}, "fullyQualifiedName": {"type": "String", "displayName": "Fully Qualified Name", "description": "The full name of the account e.g. Liability.Current.VAT or Income.Revenue.Sales", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the account", "required": true}, "currentBalance": {"type": "Number", "displayName": "Current Balance", "description": "The current balance in the account", "required": true}, "type": {"type": "String", "displayName": "Account Type", "description": "The type, or base category, of the account", "required": true}, "status": {"type": "String", "displayName": "Account Status", "description": "The status of the account", "required": true}, "isBankAccount": {"type": "Boolean", "displayName": "Is Bank Account?", "description": "Confirms whether the nominal account represents a bank account or not", "required": true}, "validDatatypeLinks": {"type": "Array", "displayName": "Valid Datatype Links", "description": "Describes which fields on other data types are valid links to this account in the originating system", "required": true, "properties": {"property": {"type": "String", "displayName": "Property", "description": "The field on the source data type that other data types can link to", "required": true}, "links": {"type": "Array", "displayName": "Links", "description": "A collection of absolute names of fields from other data types, e.g. Invoice.LineItems.AccountRef.Id", "required": true}}}, "metadata": {"type": "Object", "displayName": "Metadata", "description": "Miscellaneous data about the item", "required": true, "properties": {"isDeleted": {"type": "Boolean", "displayName": "IsDeleted", "description": "A boolean to indicate whether the object has been deleted", "required": true}}}}} Xero: parameters: path: @@ -1325,42 +3226,71 @@ examples: responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} create-bank-account: QuickBooks Online: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: {} + query: + allowSyncOnPushComplete: true requestBody: application/json: {"accountName": "GBP Bank Account", "accountType": "Debit", "accountNumber": "12345678", "currency": "GBP", "status": "Active"} responses: "200": - application/json: {"changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "a621cf02-1cd9-4cf5-8403-315211a509a3", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Success", "statusCode": 550483} - "400": {} + application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "currency": "GBP", "status": "Active"}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "bbf55378-5e09-4654-9ce4-ff3208e30267", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Pending", "statusCode": 16290} + "400": + application/json: {} + "500": + application/json: {} Xero: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: {} + query: + allowSyncOnPushComplete: true requestBody: application/json: {"accountName": "Xero GBP Bank Account", "accountType": "Debit", "sortCode": "445566", "accountNumber": "12345678", "currency": "GBP", "status": "Active"} responses: "200": - application/json: {"changes": [{"recordRef": {"dataType": "invoices"}}, {"recordRef": {"dataType": "invoices"}}, {"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "774c2bec-c376-4917-b75e-024985613de0", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Pending", "statusCode": 198175} - "400": {} + application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "currency": "GBP", "status": "Active"}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "bbf55378-5e09-4654-9ce4-ff3208e30267", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Pending", "statusCode": 16290} + "400": + application/json: {} + "500": + application/json: {} Malformed query: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: {} + query: + allowSyncOnPushComplete: true requestBody: - application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "currency": "USD", "status": "Active"} + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "currency": "GBP", "status": "Active"} responses: "400": application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-create-bank-account: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: + allowSyncOnPushComplete: true + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "currency": "GBP", "status": "Active"} + responses: + "200": + application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "currency": "GBP", "status": "Active"}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "bbf55378-5e09-4654-9ce4-ff3208e30267", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Pending", "statusCode": 16290} + "400": + application/json: {} + "500": + application/json: {} get-create-bankAccounts-model: Dynamics 365 Business Central: parameters: @@ -1409,7 +3339,7 @@ examples: connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" responses: "200": - application/json: {"type": "Object", "displayName": "Bank Account", "description": "An account that bank transactions may be recorded against", "required": true, "properties": {"nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": true, "validation": {"warnings": [{"field": "NominalCode", "details": "Max length of 7 characters."}], "information": []}}, "accountName": {"type": "String", "displayName": "Name", "description": "The name of the bank account in the originating system", "required": true, "validation": {"warnings": [{"field": "AccountName", "details": "Max length of 31 characters."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the bank account", "required": false, "validation": {"warnings": [{"field": "Currency", "details": "The currency must match the base currency of the QuickBooks Desktop company unless the FullyQualifiedCategory is 'Asset.AccountsReceivable','Liability.AccountsPayable' or 'Liability.CreditCard'"}, {"field": "Currency", "details": "Must be a three letter ISO code that matches an existing active currency in the QuickBooks Desktop company"}, {"field": "Currency", "details": "Can only be set if the Quickbooks Desktop company has Multicurrency enabled."}], "information": [{"field": "Currency", "details": "If not set, will default to the base currency of the QuickBooks Desktop company"}]}}, "balance": {"type": "Number", "displayName": "Balance", "description": "The balance of the bank account", "required": false}}} + application/json: {"type": "Object", "displayName": "Bank Account", "description": "An account that bank transactions may be recorded against", "required": true, "properties": {"nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": true, "validation": {"warnings": [{"field": "NominalCode", "details": "Max length of 7 characters."}], "information": []}}, "accountName": {"type": "String", "displayName": "Name", "description": "The name of the bank account in the originating system", "required": true, "validation": {"warnings": [{"field": "AccountName", "details": "Max length of 31 characters."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the bank account", "required": false, "validation": {"warnings": [{"field": "Currency", "details": "The currency must match the base currency of the QuickBooks Desktop company unless the FullyQualifiedCategory is 'Asset.AccountsReceivable','Liability.AccountsPayable' or 'Liability.CreditCard'"}, {"field": "Currency", "details": "Must be a three letter ISO code that matches an existing active currency in the QuickBooks Desktop company"}, {"field": "Currency", "details": "Can only be set if the QuickBooks Desktop company has Multicurrency enabled."}], "information": [{"field": "Currency", "details": "If not set, will default to the base currency of the QuickBooks Desktop company"}]}}, "balance": {"type": "Number", "displayName": "Balance", "description": "The balance of the bank account", "required": false}}} QuickBooks Online Sandbox: parameters: path: @@ -1433,7 +3363,7 @@ examples: connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" responses: "200": - application/json: {"type": "Object", "displayName": "Bank Account", "description": "An account that bank transactions may be recorded against", "required": true, "properties": {"accountName": {"type": "String", "displayName": "Name", "description": "The name of the bank account in the originating system", "required": true}, "accountType": {"type": "String", "displayName": "Account Type", "description": "The type of account", "required": true}, "nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": true}, "sortCode": {"type": "String", "displayName": "Sort Code", "description": "The sort code for the bank account", "required": true}, "accountNumber": {"type": "String", "displayName": "Account Number", "description": "The account number for the bank account", "required": true}, "iBan": {"type": "String", "displayName": "IBAN", "description": "The international bank account number of the account. Often used when making or receiving international payments", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the bank account", "required": true}, "balance": {"type": "Number", "displayName": "Balance", "description": "The balance of the bank account", "required": true}, "availableBalance": {"type": "Number", "displayName": "Available Balance", "description": "The available balance of the bank account", "required": true}, "overdraftLimit": {"type": "Number", "displayName": "Overdraft Limit", "description": "The pre-arranged overdraft limit of the account", "required": true}, "institution": {"type": "String", "displayName": "Institution", "description": "The institution of the bank account", "required": true}, "metadata": {"type": "Object", "displayName": "Metadata", "description": "Miscellaneous data about the item", "required": true}}} + application/json: {"type": "Object", "displayName": "Bank Account", "description": "An account that bank transactions may be recorded against", "required": true, "properties": {"accountName": {"type": "String", "displayName": "Name", "description": "The name of the bank account in the originating system", "required": true}, "accountType": {"type": "String", "displayName": "Account Type", "description": "The type of account", "required": true}, "nominalCode": {"type": "String", "displayName": "Nominal Code", "description": "The external reference given to each nominal account for a business", "required": true}, "sortCode": {"type": "String", "displayName": "Sort Code", "description": "The sort code for the bank account", "required": true}, "accountNumber": {"type": "String", "displayName": "Account Number", "description": "The account number for the bank account", "required": true}, "iBan": {"type": "String", "displayName": "IBAN", "description": "The international bank account number of the account. Often used when making or receiving international payments", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency of the bank account", "required": true}, "balance": {"type": "Number", "displayName": "Balance", "description": "The balance of the bank account", "required": true}, "availableBalance": {"type": "Number", "displayName": "Available Balance", "description": "The available balance of the bank account", "required": true}, "overdraftLimit": {"type": "Number", "displayName": "Overdraft Limit", "description": "The pre-arranged overdraft limit of the account", "required": true}, "institution": {"type": "String", "displayName": "Institution", "description": "The institution of the bank account", "required": true}, "metadata": {"type": "Object", "displayName": "Metadata", "description": "Miscellaneous data about the item", "required": true, "properties": {"isDeleted": {"type": "Boolean", "displayName": "IsDeleted", "description": "A boolean to indicate whether the object has been deleted", "required": true}}}}} Unauthorized: parameters: path: @@ -1442,8 +3372,10 @@ examples: responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} list-customers: - "": + speakeasy-default-list-customers: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" @@ -1455,7 +3387,10 @@ examples: responses: "200": application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": {} + "400": + application/json: {} + "500": + application/json: {} Clear Books: parameters: path: @@ -1684,6 +3619,8 @@ examples: responses: "400": application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} Unresolved property: parameters: path: @@ -1696,12 +3633,14 @@ examples: responses: "400": application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} get-customer: Clear Books: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "7110701885" + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-04-26T12:38:16Z", "sourceModifiedDate": "2022-07-03T01:27:00", "id": "c8180244-74ac-40cf-a5df-6d83661c44d7", "customerName": "Arjun Kuvalis", "contactName": "Werner Langworth", "emailAddress": "Arjun34@hotmail.com", "defaultCurrency": "GBP", "phone": "014605 64820", "addresses": [{"type": "Delivery", "line1": "Suite 214", "line2": "8439 Lueilwitz Passage", "city": "Fernandohaven", "region": "Northern Ireland", "country": "United Kingdom", "postalCode": "JG04 7PV"}, {"type": "Delivery", "line1": "Suite 096", "line2": "864 Halie Course", "city": "Juliochester", "region": "England", "country": "United Kingdom", "postalCode": "DZ8 4BF"}, {"type": "Delivery", "line1": "Suite 001", "line2": "416 Stokes Fords", "city": "Naderborough", "region": "Wales", "country": "United Kingdom", "postalCode": "XG25 0XX"}], "contacts": [{"name": "Werner Langworth", "email": "Werner_Langworth@hotmail.com", "phone": [], "address": {"type": "Delivery", "line1": "Apt. 145", "line2": "317 Williamson Freeway", "city": "Hortenseville", "region": "Scotland", "country": "United Kingdom", "postalCode": "CV4 2HR"}, "status": "Active"}, {"name": "Belle Glover", "email": "Belle51@yahoo.com", "phone": [], "address": {"type": "Delivery", "line1": "Suite 075", "line2": "9921 Dickens Walk", "city": "South Ali", "region": "Scotland", "country": "United Kingdom", "postalCode": "TI04 4OO"}, "status": "Active"}], "registrationNumber": "NI7JEJVM", "taxNumber": "7505220209.583549", "status": "Active", "metadata": {"isDeleted": false}} @@ -1709,7 +3648,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "7110701885" + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2023-01-17T14:50:54Z", "id": "0e2f7751-7696-ed11-bff5-6045bd0d2ad6", "customerName": "", "contactName": "", "emailAddress": "", "defaultCurrency": "GBP", "phone": "", "addresses": [{"type": "Billing", "line1": "", "line2": "", "city": "", "region": "", "country": "", "postalCode": ""}], "contacts": [{"name": "", "email": "", "phone": [], "address": {"type": "Billing", "line1": "", "line2": "", "city": "", "region": "", "country": "", "postalCode": ""}, "status": "Active"}], "taxNumber": "", "status": "Active", "metadata": {"isDeleted": false}} @@ -1717,7 +3656,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "7110701885" + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2022-10-26T13:32:05Z", "sourceModifiedDate": "2021-06-14T15:26:37Z", "id": "555f8251-c65a-433a-a813-5dbe04321d1e", "customerName": "Ab Netherlands", "defaultCurrency": "EUR", "addresses": [{"type": "Billing", "country": "NL"}], "contacts": [], "status": "Active"} @@ -1725,7 +3664,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "7110701885" + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2022-10-26T13:33:08Z", "sourceModifiedDate": "2020-02-26T11:23:50Z", "id": "5f20075a-a28e-434d-81a6-2db0dc170e87", "customerName": "Abdi 99", "emailAddress": "email@codat.io", "defaultCurrency": "GBP", "addresses": [{"type": "Billing", "line1": "Ink Rooms", "city": "London", "country": "GB", "postalCode": "WC1X 0BE"}], "contacts": [], "registrationNumber": "123456789", "taxNumber": "GB339 0727 47", "status": "Active"} @@ -1733,7 +3672,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "EILBDVJVNUAGVKRQ" + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-04-25T14:19:12Z", "sourceModifiedDate": "2023-04-17T06:02:46Z", "id": "11526230", "customerName": "-", "contactName": "Test 1", "addresses": [{"type": "Billing", "line1": "1 Place House", "line2": "", "city": "London", "country": "United Kingdom", "postalCode": "WC1X 1AH"}], "contacts": [{"name": "Test 1", "phone": [], "address": {"type": "Billing", "line1": "1 Place House", "line2": "", "city": "London", "country": "United Kingdom", "postalCode": "WC1X 1AH"}, "status": "Unknown"}], "status": "Active", "metadata": {"isDeleted": false}} @@ -1741,7 +3680,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2" + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2022-05-18T09:23:56", "id": "634509", "customerName": "A test customer 14 (updated)", "contactName": "test person name", "emailAddress": "test14@example.com", "defaultCurrency": "GBP", "phone": "01876 541245", "addresses": [{"type": "Billing", "line1": "Line 1", "line2": "Line 2", "city": "Some city", "region": "A region", "country": "Country 1", "postalCode": "SW1 2JQ"}], "contacts": [{"name": "test person1", "email": "test14A@example.com", "phone": [{"number": "24681012", "type": "Primary"}, {"number": "121086420", "type": "Unknown"}], "status": "Active"}, {"name": "test person2", "email": "test14B@example.com", "phone": [{"number": "123456789", "type": "Primary"}, {"number": "987654321", "type": "Unknown"}], "status": "Active"}, {"name": "test person name", "email": "test14@example.com", "phone": [{"number": "01876 541245", "type": "Unknown"}], "status": "Active"}], "status": "Active", "metadata": {"isDeleted": false}} @@ -1749,7 +3688,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2" + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2022-09-30T10:29:15Z", "sourceModifiedDate": "0001-01-01T00:00:00", "id": "92227673", "customerName": "Chekko Customer Test 01", "contactName": "", "emailAddress": "", "phone": "", "addresses": [], "contacts": [{"name": "", "email": "", "phone": [], "status": "Active"}], "taxNumber": "", "status": "Active"} @@ -1757,7 +3696,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2" + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-01-30T14:48:02Z", "sourceModifiedDate": "2022-01-11T12:28:49", "id": "773", "customerName": "119 Test Customer", "contactName": "Mr Test Customer", "defaultCurrency": "GBP", "addresses": [], "contacts": [], "status": "Active"} @@ -1773,7 +3712,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "EILBDVJVNUAGVKRQ" + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-01-18T11:02:35Z", "sourceModifiedDate": "2022-12-08T15:42:59Z", "id": "9", "customerName": "Abe", "contactName": "Abraham's Company", "emailAddress": "ab@email.com", "defaultCurrency": "GBP", "addresses": [], "contacts": [{"name": "Abe", "email": "ab@email.com", "phone": [{"number": "01111111111", "type": "Mobile"}], "status": "Active"}], "registrationNumber": "XXXX9900001", "taxNumber": "XXXX9900001", "status": "Active"} @@ -1781,7 +3720,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2" + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-04-26T09:35:56Z", "sourceModifiedDate": "2016-09-12T18:53:19Z", "id": "66", "customerName": "Abercrombie International Group", "contactName": "Kristy Abercrombie", "defaultCurrency": "GBP", "addresses": [{"type": "Billing", "line1": "123 Main St", "city": "New York, NY"}], "contacts": [{"name": "Abercrombie International Group (deleted)", "phone": [], "address": {"type": "Billing", "line1": "123 Main St", "city": "New York, NY"}, "status": "Archived"}], "status": "Archived", "metadata": {"isDeleted": false}} @@ -1789,7 +3728,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "EILBDVJVNUAGVKRQ" + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2022-10-14T09:35:53Z", "sourceModifiedDate": "2022-04-27T15:17:36Z", "id": "A1D001", "customerName": "A1 Design Services", "contactName": "Lee Dalkin", "emailAddress": "newbusinessadvice@sage.com", "defaultCurrency": "GBP", "phone": "01742 876 234", "addresses": [{"type": "Delivery", "line1": "67a Station Road", "line2": "", "city": "Blackpool", "region": "Lancashire", "country": "", "postalCode": "BP12 7HT"}, {"type": "Delivery", "line1": "23a Union Street", "line2": "", "city": "Manchester", "region": "", "country": "", "postalCode": "M2 6JK"}, {"type": "Billing", "line1": "67a Station Road", "line2": "", "city": "Blackpool", "region": "Lancashire", "country": "Great Britain", "postalCode": "BP12 7HT"}], "contacts": [{"name": "Lee Dalkin", "email": "newbusinessadvice@sage.com", "phone": [{"number": "01742 876 234", "type": "Landline"}, {"number": "01742 876 235", "type": "Landline"}, {"number": "01742 876 236", "type": "Fax"}], "status": "Active"}, {"name": "Malcolm Leverret", "email": "", "phone": [], "status": "Active"}, {"name": "Jim Thomas", "email": "Jim@a1designservices.co.uk", "phone": [{"number": "01742 876 234", "type": "Landline"}, {"number": "01742 876 235", "type": "Fax"}], "status": "Active"}, {"name": "Jullian Plawsworth", "email": "Jullian@a1designservices.co.uk", "phone": [{"number": "0151 349 3939", "type": "Landline"}, {"number": "0151 349 3940", "type": "Fax"}], "status": "Active"}], "registrationNumber": "", "taxNumber": "GB238 3839 38", "status": "Active"} @@ -1813,7 +3752,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2" + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-04-04T16:32:21Z", "sourceModifiedDate": "2022-09-06T12:58:27", "id": "188", "customerName": "33Across", "contactName": "Yuna Conn", "defaultCurrency": "USD", "phone": "520-393-4468", "addresses": [{"type": "Unknown", "line1": "155 Westend Point", "line2": "", "city": "Albuquerque", "region": "NM", "country": "United States", "postalCode": "87140"}], "contacts": [{"name": "Conn, Yuna", "phone": [{"number": "520-393-4468", "type": "Primary"}], "address": {"type": "Unknown", "line1": "155 Westend Point", "line2": "", "city": "Albuquerque", "region": "NM", "country": "United States", "postalCode": "87140"}, "status": "Unknown"}], "taxNumber": "", "status": "Active", "metadata": {"isDeleted": false}} @@ -1829,7 +3768,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "7110701885" + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-03-15T20:35:10Z", "sourceModifiedDate": "2023-02-17T18:03:42", "id": "e4c9d0e2-c285-4e85-b579-6d28b180c730", "customerName": "24 Locks", "emailAddress": "", "addresses": [], "contacts": [], "status": "Active", "metadata": {"isDeleted": false}} @@ -1837,7 +3776,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "EILBDVJVNUAGVKRQ" + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2022-06-09T14:36:47", "id": "104957000000032105", "customerName": "A B", "contactName": "Contact (First Name) Contact (Last Name)", "emailAddress": "contactperson@whateveryouwantidontcare12345.com", "defaultCurrency": "GBP", "phone": "Work Phone", "addresses": [], "contacts": [{"name": "Contact (First Name) Contact (Last Name)", "email": "contactperson@whateveryouwantidontcare12345.com", "phone": [{"number": "Work Phone", "type": "Landline"}, {"number": "Mobile", "type": "Mobile"}], "status": "Active"}], "status": "Active"} @@ -1845,37 +3784,80 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - customerId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2" + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "401": application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} create-customer: Malformed query: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: {} + query: + allowSyncOnPushComplete: true requestBody: - application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "defaultCurrency": "USD", "contacts": [], "status": "Unknown"} + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "defaultCurrency": "GBP", "contacts": [{"phone": null, "status": "Unknown", "modifiedDate": "2022-10-23T00:00:00Z"}], "status": "Unknown"} responses: "400": application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-create-customer: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: + allowSyncOnPushComplete: true + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "defaultCurrency": "GBP", "contacts": [{"phone": null, "status": "Unknown", "modifiedDate": "2022-10-23T00:00:00Z"}], "status": "Unknown"} + responses: + "200": + application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "defaultCurrency": "GBP", "contacts": [{"phone": null, "status": "Unknown", "modifiedDate": "2022-10-23T00:00:00Z"}], "status": "Active"}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "6df7882c-3b9a-422b-806d-10a8882c0066", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "TimedOut", "statusCode": 973924} + "400": + application/json: {} + "500": + application/json: {} update-customer: Malformed query: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - customerId: "7110701885" - query: {} + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" + query: + allowSyncOnPushComplete: true + forceUpdate: false requestBody: - application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "defaultCurrency": "USD", "contacts": [{"phone": [{"number": "(877) 492-8687", "type": "Unknown"}, {"number": "+44 25691 154789", "type": "Unknown"}], "status": "Active", "modifiedDate": "2022-10-23T00:00:00Z"}, {"phone": [], "status": "Unknown", "modifiedDate": "2022-10-23T00:00:00Z"}, {"phone": [{"number": "+44 25691 154789", "type": "Mobile"}, {"number": "01224 658 999", "type": "Fax"}, {"number": "(877) 492-8687", "type": "Primary"}], "status": "Archived", "modifiedDate": "2022-10-23T00:00:00Z"}], "status": "Active"} + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "defaultCurrency": "GBP", "contacts": [{"phone": [{"number": "+44 25691 154789", "type": "Primary"}], "status": "Unknown", "modifiedDate": "2022-10-23T00:00:00Z"}], "status": "Active"} responses: "400": application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-update-customer: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab" + query: + allowSyncOnPushComplete: true + forceUpdate: false + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "defaultCurrency": "GBP", "contacts": [{"phone": [{"number": "+44 25691 154789", "type": "Primary"}], "status": "Unknown", "modifiedDate": "2022-10-23T00:00:00Z"}], "status": "Active"} + responses: + "200": + application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "defaultCurrency": "GBP", "contacts": [{"phone": [{"number": "+44 25691 154789", "type": "Primary"}], "status": "Unknown", "modifiedDate": "2022-10-23T00:00:00Z"}], "status": "Archived"}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "da9d96e3-14de-4669-8614-4a94010074c2", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Pending", "statusCode": 671250} + "400": + application/json: {} + "500": + application/json: {} list-suppliers: - "": + speakeasy-default-list-suppliers: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" @@ -1887,7 +3869,10 @@ examples: responses: "200": application/json: {"pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} - "400": {} + "400": + application/json: {} + "500": + application/json: {} Clear Books: parameters: path: @@ -2116,6 +4101,8 @@ examples: responses: "400": application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} Unresolved property: parameters: path: @@ -2128,12 +4115,14 @@ examples: responses: "400": application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PullApi", "error": "Error parsing query - Could not resolve property isCompleted on Dataset", "correlationId": "98457fb9956b7f9b4b2fd4f6e23bb5c8", "canBeRetried": "Unknown", "detailedErrorCode": 0} get-supplier: Clear Books: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "7110701885" + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "1660-11-28T23:18:00", "id": "owQ2Gqgj9f", "supplierName": "Abshire - Kshlerin", "contactName": "Faye Hansen", "emailAddress": "hello@Abshire-Kshlerin.info", "phone": "01338 858162", "addresses": [{"type": "Delivery", "line1": "Suite 431", "line2": "289 Giles Lake", "city": "Cesarmouth", "region": "Northern Ireland", "country": "United Kingdom", "postalCode": "BG40 9GP"}], "registrationNumber": "VYL1XZXR", "taxNumber": "1396267523.0914588", "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}} @@ -2141,7 +4130,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "7110701885" + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-03-27T14:21:12Z", "sourceModifiedDate": "2020-11-04T11:44:22Z", "id": "78623f13-931e-eb11-bbf8-0022481b3585", "supplierName": "", "contactName": "", "emailAddress": "", "phone": "", "addresses": [{"type": "Billing", "line1": "", "line2": "", "city": "", "region": "", "country": "GB", "postalCode": ""}], "taxNumber": "", "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}} @@ -2149,7 +4138,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "7110701885" + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2022-10-26T13:32:05Z", "sourceModifiedDate": "2022-07-15T12:01:15Z", "id": "3150917c-1d92-4d77-9018-31b5c4758ca9", "supplierName": "Abe", "contactName": "Kelly's Contact Name", "emailAddress": "sales@kellysupplies.com", "phone": "07999 999999", "addresses": [{"type": "Billing", "line1": "Unit 51", "city": "Bakersfield", "region": "California", "country": "US", "postalCode": "933081"}], "registrationNumber": "8409314368", "status": "Active", "defaultCurrency": "EUR"} @@ -2157,7 +4146,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "7110701885" + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2022-10-26T13:33:13Z", "sourceModifiedDate": "2017-08-02T10:58:54Z", "id": "0185fea2-0298-445b-909a-0db685118a9e", "supplierName": "a", "addresses": [{"type": "Billing", "country": "GB"}], "status": "Active", "defaultCurrency": "GBP"} @@ -2165,7 +4154,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "EILBDVJVNUAGVKRQ" + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-04-25T14:19:08Z", "sourceModifiedDate": "2023-04-17T06:02:46", "id": "11526230", "supplierName": "-", "contactName": "Test 1", "addresses": [{"type": "Billing", "line1": "1 Place House", "line2": "", "city": "London", "country": "United Kingdom", "postalCode": "WC1X 1AH"}], "status": "Active", "metadata": {"isDeleted": false}} @@ -2173,7 +4162,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2" + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-03-24T16:07:25Z", "id": "api vendor", "supplierName": "api vendor", "addresses": [], "status": "Active", "metadata": {"isDeleted": false}} @@ -2181,7 +4170,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2" + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2022-09-30T10:29:15Z", "sourceModifiedDate": "2017-05-09T00:00:00", "id": "6202387", "supplierName": "Dell", "contactName": "", "emailAddress": "", "phone": "", "addresses": [], "taxNumber": "", "status": "Unknown"} @@ -2189,7 +4178,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2" + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-01-30T14:47:02Z", "sourceModifiedDate": "2022-02-04T14:24:43", "id": "779", "supplierName": "Test Vendor", "contactName": "Test Vendor", "emailAddress": "", "phone": "", "addresses": [], "status": "Active", "defaultCurrency": "GBP"} @@ -2205,7 +4194,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "EILBDVJVNUAGVKRQ" + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-01-18T11:02:36Z", "sourceModifiedDate": "2022-12-07T10:48:18Z", "id": "41", "supplierName": "AI Support", "contactName": "AI Support", "addresses": [{"type": "Billing", "line1": "test", "region": "string", "country": "Djibouti"}], "status": "Active", "defaultCurrency": "GBP"} @@ -2213,7 +4202,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2" + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-04-26T09:35:55Z", "sourceModifiedDate": "2023-04-13T01:51:08Z", "id": "129", "supplierName": "Ally Johnson", "contactName": "Miss Smith", "phone": "0728 38474", "addresses": [{"type": "Billing", "line1": "100 London Road", "line2": "Angel", "city": "London", "region": "Greater London", "country": "England", "postalCode": "EC1M"}], "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}} @@ -2221,7 +4210,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "EILBDVJVNUAGVKRQ" + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2022-10-14T09:35:58Z", "id": "776", "supplierName": "Aaren", "contactName": "", "emailAddress": "", "phone": "", "addresses": [{"type": "Unknown", "line1": "", "line2": "", "city": "", "region": "", "country": "Great Britain", "postalCode": ""}], "taxNumber": "", "status": "Archived", "defaultCurrency": "GBP", "metadata": {"isDeleted": true}} @@ -2245,7 +4234,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2" + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-04-04T16:32:20Z", "sourceModifiedDate": "2023-02-16T09:48:27", "id": "3", "supplierName": "ADP", "contactName": "Jones, William", "phone": "214-760-9491", "addresses": [{"type": "Unknown", "line1": "208 S Akard St", "line2": "", "city": "Dallas", "region": "TX", "country": "United States", "postalCode": "75265"}], "registrationNumber": "", "taxNumber": "85-3678274", "status": "Active", "defaultCurrency": "USD", "metadata": {"isDeleted": false}} @@ -2261,7 +4250,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "7110701885" + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2023-02-17T18:03:42", "id": "e4c9d0e2-c285-4e85-b579-6d28b180c730", "supplierName": "24 Locks", "emailAddress": "", "addresses": [], "status": "Active", "metadata": {"isDeleted": false}} @@ -2269,7 +4258,7 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "EILBDVJVNUAGVKRQ" + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" responses: "200": application/json: {"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2022-09-16T13:09:56", "id": "104957000001494001", "supplierName": "Acme Corporation", "emailAddress": "", "addresses": [], "status": "Active", "defaultCurrency": "GBP"} @@ -2277,45 +4266,580 @@ examples: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" - supplierId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2" + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + create-supplier: + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: + allowSyncOnPushComplete: true + requestBody: + application/json: {"id": "73593", "supplierName": "test 20230420 1004", "contactName": "Joe Bloggs", "status": "Active"} + responses: + "200": + application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", "supplierName": "Kelly's Industrial Supplies", "contactName": "Kelly's Industrial Supplies", "emailAddress": "sales@kellysupplies.com", "phone": "07999 999999", "addresses": [{"type": "Billing", "line1": "Unit 51", "line2": "Bakersfield Industrial Estate", "city": "Bakersfield", "region": "California", "country": "USA"}], "registrationNumber": "string", "taxNumber": "string", "status": "Unknown", "defaultCurrency": "string", "metadata": {"isDeleted": true}, "supplementalData": {"content": {"property1": {"property1": "", "property2": ""}, "property2": {"property1": "", "property2": ""}}}}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "a724c908-5d52-46dc-ac48-5fbb4ff4bff9", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Failed", "statusCode": 416715} + "400": + application/json: {} + "500": + application/json: {} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: + allowSyncOnPushComplete: true + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", "supplierName": "Kelly's Industrial Supplies", "contactName": "Kelly's Industrial Supplies", "emailAddress": "sales@kellysupplies.com", "phone": "07999 999999", "addresses": [{"type": "Billing", "line1": "Unit 51", "line2": "Bakersfield Industrial Estate", "city": "Bakersfield", "region": "California", "country": "USA"}], "registrationNumber": "string", "taxNumber": "string", "status": "Unknown", "defaultCurrency": "string", "metadata": {"isDeleted": true}, "supplementalData": {"content": {"property1": {"property1": "", "property2": ""}, "property2": {"property1": "", "property2": ""}}}} responses: - "401": - application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} - create-supplier: - Sage Intacct: + "400": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + "500": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-create-supplier: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: {} + query: + allowSyncOnPushComplete: true requestBody: - application/json: {"id": "73593", "supplierName": "test 20230420 1004", "contactName": "Joe Bloggs", "status": "Active"} + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", "supplierName": "Kelly's Industrial Supplies", "contactName": "Kelly's Industrial Supplies", "emailAddress": "sales@kellysupplies.com", "phone": "07999 999999", "addresses": [{"type": "Billing", "line1": "Unit 51", "line2": "Bakersfield Industrial Estate", "city": "Bakersfield", "region": "California", "country": "USA"}], "registrationNumber": "string", "taxNumber": "string", "status": "Unknown", "defaultCurrency": "string", "metadata": {"isDeleted": true}, "supplementalData": {"content": {"property1": {"property1": "", "property2": ""}, "property2": {"property1": "", "property2": ""}}}} responses: "200": - application/json: {"changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "a621cf02-1cd9-4cf5-8403-315211a509a3", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Success", "statusCode": 550483} - "400": {} + application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", "supplierName": "Kelly's Industrial Supplies", "contactName": "Kelly's Industrial Supplies", "emailAddress": "sales@kellysupplies.com", "phone": "07999 999999", "addresses": [{"type": "Billing", "line1": "Unit 51", "line2": "Bakersfield Industrial Estate", "city": "Bakersfield", "region": "California", "country": "USA"}], "registrationNumber": "string", "taxNumber": "string", "status": "Unknown", "defaultCurrency": "string", "metadata": {"isDeleted": true}, "supplementalData": {"content": {"property1": {"property1": "", "property2": ""}, "property2": {"property1": "", "property2": ""}}}}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "a724c908-5d52-46dc-ac48-5fbb4ff4bff9", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Failed", "statusCode": 416715} + "400": + application/json: {} + "500": + application/json: {} + update-supplier: Malformed query: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - query: {} + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" + query: + allowSyncOnPushComplete: true + forceUpdate: false requestBody: application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", "supplierName": "Kelly's Industrial Supplies", "contactName": "Kelly's Industrial Supplies", "emailAddress": "sales@kellysupplies.com", "phone": "07999 999999", "addresses": [{"type": "Billing", "line1": "Unit 51", "line2": "Bakersfield Industrial Estate", "city": "Bakersfield", "region": "California", "country": "USA"}], "registrationNumber": "string", "taxNumber": "string", "status": "Unknown", "defaultCurrency": "string", "metadata": {"isDeleted": true}, "supplementalData": {"content": {"property1": {"property1": "", "property2": ""}, "property2": {"property1": "", "property2": ""}}}} responses: "400": application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} - update-supplier: - Malformed query: + "500": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + speakeasy-default-update-supplier: parameters: path: companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" - supplierId: "EILBDVJVNUAGVKRQ" - query: {} + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab" + query: + allowSyncOnPushComplete: true + forceUpdate: false requestBody: application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", "supplierName": "Kelly's Industrial Supplies", "contactName": "Kelly's Industrial Supplies", "emailAddress": "sales@kellysupplies.com", "phone": "07999 999999", "addresses": [{"type": "Billing", "line1": "Unit 51", "line2": "Bakersfield Industrial Estate", "city": "Bakersfield", "region": "California", "country": "USA"}], "registrationNumber": "string", "taxNumber": "string", "status": "Unknown", "defaultCurrency": "string", "metadata": {"isDeleted": true}, "supplementalData": {"content": {"property1": {"property1": "", "property2": ""}, "property2": {"property1": "", "property2": ""}}}} responses: + "200": + application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", "supplierName": "Kelly's Industrial Supplies", "contactName": "Kelly's Industrial Supplies", "emailAddress": "sales@kellysupplies.com", "phone": "07999 999999", "addresses": [{"type": "Billing", "line1": "Unit 51", "line2": "Bakersfield Industrial Estate", "city": "Bakersfield", "region": "California", "country": "USA"}], "registrationNumber": "string", "taxNumber": "string", "status": "Unknown", "defaultCurrency": "string", "metadata": {"isDeleted": true}, "supplementalData": {"content": {"property1": {"property1": "", "property2": ""}, "property2": {"property1": "", "property2": ""}}}}, "changes": [{"recordRef": {"dataType": "invoices"}}], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "221aa977-fea1-4c37-aad6-2bae775afc58", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Pending", "statusCode": 663803} "400": - application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + application/json: {} + "500": + application/json: {} +examplesVersion: 1.0.2 generatedTests: {} +releaseNotes: "## Typescript SDK Changes:\n* `codatsyncexpenses.connections.create()`: `response.connectionInfo.Map` **Changed** (Breaking ⚠️)\n* `codatsyncexpenses.companies.list()`: \n * `request.tags` **Added**\n * `response.results[].dataConnections[].connectionInfo.Map` **Changed** (Breaking ⚠️)\n* `codatsyncexpenses.companies.create()`: `response.dataConnections[].connectionInfo.Map` **Changed** (Breaking ⚠️)\n* `codatsyncexpenses.companies.update()`: \n * `request` **Changed** (Breaking ⚠️)\n * `response.dataConnections[].connectionInfo.Map` **Changed** (Breaking ⚠️)\n* `codatsyncexpenses.companies.get()`: `response.dataConnections[].connectionInfo.Map` **Changed** (Breaking ⚠️)\n* `codatsyncexpenses.connections.list()`: `response.results[].connectionInfo.Map` **Changed** (Breaking ⚠️)\n* `codatsyncexpenses.connections.get()`: `response.connectionInfo.Map` **Changed** (Breaking ⚠️)\n* `codatsyncexpenses.connections.unlink()`: `response.connectionInfo.Map` **Changed** (Breaking ⚠️)\n* `codatsyncexpenses.connections.createPartnerExpenseConnection()`: `response.connectionInfo.Map` **Changed** (Breaking ⚠️)\n* `codatsyncexpenses.companies.replace()`: **Added**\n* `codatsyncexpenses.manageData.refreshAllDataTypes()`: `error.status[400]` **Added**\n* `codatsyncexpenses.manageData.get()`: `response.accountTransactions.lastSuccessfulSync` **Changed**\n* `codatsyncexpenses.manageData.refreshDataType()`: `error.status[400]` **Added**\n" +generatedFiles: + - .eslintrc.cjs + - .gitattributes + - .npmignore + - CONTRIBUTING.md + - FUNCTIONS.md + - RUNTIMES.md + - USAGE.md + - docs/lib/utils/retryconfig.md + - docs/sdk/models/errors/errormessage.md + - docs/sdk/models/operations/createaccountrequest.md + - docs/sdk/models/operations/createadjustmenttransactionrequest.md + - docs/sdk/models/operations/createbankaccountrequest.md + - docs/sdk/models/operations/createconnectionrequest.md + - docs/sdk/models/operations/createconnectionrequestbody.md + - docs/sdk/models/operations/createcustomerrequest.md + - docs/sdk/models/operations/createexpensetransactionrequest.md + - docs/sdk/models/operations/createpartnerexpenseconnectionrequest.md + - docs/sdk/models/operations/createreimbursableexpensetransactionrequest.md + - docs/sdk/models/operations/createsupplierrequest.md + - docs/sdk/models/operations/createtransfertransactionrequest.md + - docs/sdk/models/operations/deletecompanyrequest.md + - docs/sdk/models/operations/deleteconnectionrequest.md + - docs/sdk/models/operations/getcompanyconfigurationrequest.md + - docs/sdk/models/operations/getcompanyinforequest.md + - docs/sdk/models/operations/getcompanyrequest.md + - docs/sdk/models/operations/getconnectionrequest.md + - docs/sdk/models/operations/getcreatebankaccountsmodelrequest.md + - docs/sdk/models/operations/getcreatechartofaccountsmodelrequest.md + - docs/sdk/models/operations/getcustomerrequest.md + - docs/sdk/models/operations/getdatastatusdatastatuses.md + - docs/sdk/models/operations/getdatastatusrequest.md + - docs/sdk/models/operations/getlastsuccessfulsyncrequest.md + - docs/sdk/models/operations/getlatestsyncrequest.md + - docs/sdk/models/operations/getmappingoptionsrequest.md + - docs/sdk/models/operations/getpulloperationrequest.md + - docs/sdk/models/operations/getpushoperationrequest.md + - docs/sdk/models/operations/getsupplierrequest.md + - docs/sdk/models/operations/getsyncbyidrequest.md + - docs/sdk/models/operations/getsynctransactionrequest.md + - docs/sdk/models/operations/listcompaniesrequest.md + - docs/sdk/models/operations/listconnectionsrequest.md + - docs/sdk/models/operations/listcustomersrequest.md + - docs/sdk/models/operations/listpulloperationsrequest.md + - docs/sdk/models/operations/listpushoperationsrequest.md + - docs/sdk/models/operations/listsuppliersrequest.md + - docs/sdk/models/operations/listsyncsrequest.md + - docs/sdk/models/operations/listsynctransactionsrequest.md + - docs/sdk/models/operations/refreshalldatatypesrequest.md + - docs/sdk/models/operations/refreshdatatyperequest.md + - docs/sdk/models/operations/setcompanyconfigurationrequest.md + - docs/sdk/models/operations/unlinkconnectionrequest.md + - docs/sdk/models/operations/unlinkconnectionupdateconnection.md + - docs/sdk/models/operations/updatecompanyrequest.md + - docs/sdk/models/operations/updatecustomerrequest.md + - docs/sdk/models/operations/updateexpensetransactionrequest.md + - docs/sdk/models/operations/updatereimbursableexpensetransactionrequest.md + - docs/sdk/models/operations/updatesupplierrequest.md + - docs/sdk/models/operations/uploadexpenseattachmentrequest.md + - docs/sdk/models/shared/accountingaccount.md + - docs/sdk/models/shared/accountingaddress.md + - docs/sdk/models/shared/accountingaddresstype.md + - docs/sdk/models/shared/accountingbankaccount.md + - docs/sdk/models/shared/accountingcustomer.md + - docs/sdk/models/shared/accountingsupplier.md + - docs/sdk/models/shared/accountmappinginfo.md + - docs/sdk/models/shared/accountmappinginfoaccounttype.md + - docs/sdk/models/shared/accountprototype.md + - docs/sdk/models/shared/accountreference.md + - docs/sdk/models/shared/accountstatus.md + - docs/sdk/models/shared/accounttype.md + - docs/sdk/models/shared/adjustmenttransactionline.md + - docs/sdk/models/shared/adjustmenttransactionrequest.md + - docs/sdk/models/shared/adjustmenttransactionresponse.md + - docs/sdk/models/shared/apaccountref.md + - docs/sdk/models/shared/attachment.md + - docs/sdk/models/shared/attachmentupload.md + - docs/sdk/models/shared/bankaccount.md + - docs/sdk/models/shared/bankaccountdetails.md + - docs/sdk/models/shared/bankaccountreference.md + - docs/sdk/models/shared/bankaccountstatus.md + - docs/sdk/models/shared/bankaccounttype.md + - docs/sdk/models/shared/clientratelimitreachedwebhook.md + - docs/sdk/models/shared/clientratelimitreachedwebhookdata.md + - docs/sdk/models/shared/clientratelimitresetwebhook.md + - docs/sdk/models/shared/clientratelimitresetwebhookdata.md + - docs/sdk/models/shared/clientratelimitwebhook.md + - docs/sdk/models/shared/clientratelimitwebhookpayload.md + - docs/sdk/models/shared/codatfile.md + - docs/sdk/models/shared/companies.md + - docs/sdk/models/shared/company.md + - docs/sdk/models/shared/companyconfiguration.md + - docs/sdk/models/shared/companyinformation.md + - docs/sdk/models/shared/companyinformationtype.md + - docs/sdk/models/shared/companyreference.md + - docs/sdk/models/shared/companyreferencelinks.md + - docs/sdk/models/shared/companyrequestbody.md + - docs/sdk/models/shared/companysyncstatus.md + - docs/sdk/models/shared/connection.md + - docs/sdk/models/shared/connections.md + - docs/sdk/models/shared/contact.md + - docs/sdk/models/shared/createaccountresponse.md + - docs/sdk/models/shared/createaccountresponsemetadata.md + - docs/sdk/models/shared/createaccountresponsevaliddatatypelinks.md + - docs/sdk/models/shared/createbankaccountresponse.md + - docs/sdk/models/shared/createbankaccountresponsebankaccounttype.md + - docs/sdk/models/shared/createcustomerresponse.md + - docs/sdk/models/shared/createexpenseresponse.md + - docs/sdk/models/shared/createreimbursableexpenseresponse.md + - docs/sdk/models/shared/createsupplierresponse.md + - docs/sdk/models/shared/customer.md + - docs/sdk/models/shared/customerdetails.md + - docs/sdk/models/shared/customers.md + - docs/sdk/models/shared/customerstatus.md + - docs/sdk/models/shared/dataconnectionerror.md + - docs/sdk/models/shared/dataconnectionstatus.md + - docs/sdk/models/shared/datasetstatus.md + - docs/sdk/models/shared/datastatus.md + - docs/sdk/models/shared/datatype.md + - docs/sdk/models/shared/datatypes.md + - docs/sdk/models/shared/definitiontransaction.md + - docs/sdk/models/shared/errorstatus.md + - docs/sdk/models/shared/errorvalidation.md + - docs/sdk/models/shared/errorvalidationitem.md + - docs/sdk/models/shared/expensecontactref.md + - docs/sdk/models/shared/expensecontactreftype.md + - docs/sdk/models/shared/expensessyncwebhook.md + - docs/sdk/models/shared/expensessyncwebhookpayload.md + - docs/sdk/models/shared/expensetransaction.md + - docs/sdk/models/shared/expensetransactionline.md + - docs/sdk/models/shared/from.md + - docs/sdk/models/shared/halref.md + - docs/sdk/models/shared/integrationtype.md + - docs/sdk/models/shared/invoiceto.md + - docs/sdk/models/shared/invoicetotype.md + - docs/sdk/models/shared/itemref.md + - docs/sdk/models/shared/items.md + - docs/sdk/models/shared/links.md + - docs/sdk/models/shared/mappingoptions.md + - docs/sdk/models/shared/metadata.md + - docs/sdk/models/shared/phone.md + - docs/sdk/models/shared/phonenumberitems.md + - docs/sdk/models/shared/phonenumbertype.md + - docs/sdk/models/shared/propertiedatatype.md + - docs/sdk/models/shared/pulloperation.md + - docs/sdk/models/shared/pulloperations.md + - docs/sdk/models/shared/pushchangetype.md + - docs/sdk/models/shared/pushfieldvalidation.md + - docs/sdk/models/shared/pushoperation.md + - docs/sdk/models/shared/pushoperationchange.md + - docs/sdk/models/shared/pushoperationref.md + - docs/sdk/models/shared/pushoperations.md + - docs/sdk/models/shared/pushoperationstatus.md + - docs/sdk/models/shared/pushoption.md + - docs/sdk/models/shared/pushoptionchoice.md + - docs/sdk/models/shared/pushoptionproperty.md + - docs/sdk/models/shared/pushoptiontype.md + - docs/sdk/models/shared/pushvalidationinfo.md + - docs/sdk/models/shared/recordref.md + - docs/sdk/models/shared/reimbursableexpensetransaction.md + - docs/sdk/models/shared/reimbursableexpensetransactionline.md + - docs/sdk/models/shared/reimbursementcontactref.md + - docs/sdk/models/shared/security.md + - docs/sdk/models/shared/sourcetype.md + - docs/sdk/models/shared/status.md + - docs/sdk/models/shared/supplementaldata.md + - docs/sdk/models/shared/supplier.md + - docs/sdk/models/shared/supplierdetails.md + - docs/sdk/models/shared/suppliers.md + - docs/sdk/models/shared/supplierstatus.md + - docs/sdk/models/shared/synccompletewebhook.md + - docs/sdk/models/shared/synccompletewebhookdata.md + - docs/sdk/models/shared/syncfailedwebhook.md + - docs/sdk/models/shared/syncfailedwebhookdata.md + - docs/sdk/models/shared/taxratemappinginfo.md + - docs/sdk/models/shared/to.md + - docs/sdk/models/shared/trackingcategorymappinginfo.md + - docs/sdk/models/shared/trackingref.md + - docs/sdk/models/shared/trackingrefadjustmenttransaction.md + - docs/sdk/models/shared/trackingrefadjustmenttransactiondatatype.md + - docs/sdk/models/shared/trackingrefdatatype.md + - docs/sdk/models/shared/transaction.md + - docs/sdk/models/shared/transactions.md + - docs/sdk/models/shared/transactionstatus.md + - docs/sdk/models/shared/transactionstatus1.md + - docs/sdk/models/shared/transfertransactionrequest.md + - docs/sdk/models/shared/transfertransactionrequestaccountreference.md + - docs/sdk/models/shared/transfertransactionresponse.md + - docs/sdk/models/shared/type.md + - docs/sdk/models/shared/updatecustomerresponse.md + - docs/sdk/models/shared/updatecustomerresponseaccountingcustomer.md + - docs/sdk/models/shared/updateexpenserequest.md + - docs/sdk/models/shared/updateexpenserequestbankaccountreference.md + - docs/sdk/models/shared/updateexpenserequesttype.md + - docs/sdk/models/shared/updateexpenseresponse.md + - docs/sdk/models/shared/updatereimbursableexpensetransactionrequest.md + - docs/sdk/models/shared/updatesupplierresponse.md + - docs/sdk/models/shared/updatesupplierresponseaccountingsupplier.md + - docs/sdk/models/shared/validation.md + - docs/sdk/models/shared/validationitem.md + - docs/sdk/models/shared/validdatatypelinks.md + - docs/sdk/models/shared/validfor.md + - docs/sdk/models/shared/validtransactiontypes.md + - docs/sdk/models/shared/weblink.md + - docs/sdks/accounts/README.md + - docs/sdks/adjustments/README.md + - docs/sdks/attachments/README.md + - docs/sdks/bankaccounts/README.md + - docs/sdks/codatsyncexpenses/README.md + - docs/sdks/companies/README.md + - docs/sdks/companyinfo/README.md + - docs/sdks/configuration/README.md + - docs/sdks/connections/README.md + - docs/sdks/customers/README.md + - docs/sdks/expenses/README.md + - docs/sdks/managedata/README.md + - docs/sdks/mappingoptions/README.md + - docs/sdks/pushoperations/README.md + - docs/sdks/reimbursements/README.md + - docs/sdks/suppliers/README.md + - docs/sdks/sync/README.md + - docs/sdks/transactionstatus/README.md + - docs/sdks/transfers/README.md + - jsr.json + - package.json + - src/core.ts + - src/funcs/accountsCreate.ts + - src/funcs/accountsGetCreateModel.ts + - src/funcs/adjustmentsCreate.ts + - src/funcs/attachmentsUpload.ts + - src/funcs/bankAccountsCreate.ts + - src/funcs/bankAccountsGetCreateModel.ts + - src/funcs/companiesCreate.ts + - src/funcs/companiesDelete.ts + - src/funcs/companiesGet.ts + - src/funcs/companiesList.ts + - src/funcs/companiesUpdate.ts + - src/funcs/companyInfoGet.ts + - src/funcs/configurationGet.ts + - src/funcs/configurationSet.ts + - src/funcs/connectionsCreate.ts + - src/funcs/connectionsCreatePartnerExpenseConnection.ts + - src/funcs/connectionsDelete.ts + - src/funcs/connectionsGet.ts + - src/funcs/connectionsList.ts + - src/funcs/connectionsUnlink.ts + - src/funcs/customersCreate.ts + - src/funcs/customersGet.ts + - src/funcs/customersList.ts + - src/funcs/customersUpdate.ts + - src/funcs/expensesCreate.ts + - src/funcs/expensesUpdate.ts + - src/funcs/manageDataGet.ts + - src/funcs/manageDataGetPullOperation.ts + - src/funcs/manageDataListPullOperations.ts + - src/funcs/manageDataRefreshAllDataTypes.ts + - src/funcs/manageDataRefreshDataType.ts + - src/funcs/mappingOptionsGetMappingOptions.ts + - src/funcs/pushOperationsGet.ts + - src/funcs/pushOperationsList.ts + - src/funcs/reimbursementsCreate.ts + - src/funcs/reimbursementsUpdate.ts + - src/funcs/suppliersCreate.ts + - src/funcs/suppliersGet.ts + - src/funcs/suppliersList.ts + - src/funcs/suppliersUpdate.ts + - src/funcs/syncGet.ts + - src/funcs/syncGetLastSuccessfulSync.ts + - src/funcs/syncGetLatestSync.ts + - src/funcs/syncList.ts + - src/funcs/transactionStatusGet.ts + - src/funcs/transactionStatusList.ts + - src/funcs/transfersCreate.ts + - src/hooks/hooks.ts + - src/hooks/index.ts + - src/hooks/types.ts + - src/index.ts + - src/lib/base64.ts + - src/lib/config.ts + - src/lib/dlv.ts + - src/lib/encodings.ts + - src/lib/files.ts + - src/lib/http.ts + - src/lib/is-plain-object.ts + - src/lib/logger.ts + - src/lib/matchers.ts + - src/lib/primitives.ts + - src/lib/retries.ts + - src/lib/schemas.ts + - src/lib/sdks.ts + - src/lib/security.ts + - src/lib/url.ts + - src/sdk/accounts.ts + - src/sdk/adjustments.ts + - src/sdk/attachments.ts + - src/sdk/bankaccounts.ts + - src/sdk/companies.ts + - src/sdk/companyinfo.ts + - src/sdk/configuration.ts + - src/sdk/connections.ts + - src/sdk/customers.ts + - src/sdk/expenses.ts + - src/sdk/index.ts + - src/sdk/managedata.ts + - src/sdk/mappingoptions.ts + - src/sdk/models/errors/errormessage.ts + - src/sdk/models/errors/httpclienterrors.ts + - src/sdk/models/errors/index.ts + - src/sdk/models/errors/sdkerror.ts + - src/sdk/models/errors/sdkvalidationerror.ts + - src/sdk/models/operations/createaccount.ts + - src/sdk/models/operations/createadjustmenttransaction.ts + - src/sdk/models/operations/createbankaccount.ts + - src/sdk/models/operations/createconnection.ts + - src/sdk/models/operations/createcustomer.ts + - src/sdk/models/operations/createexpensetransaction.ts + - src/sdk/models/operations/createpartnerexpenseconnection.ts + - src/sdk/models/operations/createreimbursableexpensetransaction.ts + - src/sdk/models/operations/createsupplier.ts + - src/sdk/models/operations/createtransfertransaction.ts + - src/sdk/models/operations/deletecompany.ts + - src/sdk/models/operations/deleteconnection.ts + - src/sdk/models/operations/getcompany.ts + - src/sdk/models/operations/getcompanyconfiguration.ts + - src/sdk/models/operations/getcompanyinfo.ts + - src/sdk/models/operations/getconnection.ts + - src/sdk/models/operations/getcreatebankaccountsmodel.ts + - src/sdk/models/operations/getcreatechartofaccountsmodel.ts + - src/sdk/models/operations/getcustomer.ts + - src/sdk/models/operations/getdatastatus.ts + - src/sdk/models/operations/getlastsuccessfulsync.ts + - src/sdk/models/operations/getlatestsync.ts + - src/sdk/models/operations/getmappingoptions.ts + - src/sdk/models/operations/getpulloperation.ts + - src/sdk/models/operations/getpushoperation.ts + - src/sdk/models/operations/getsupplier.ts + - src/sdk/models/operations/getsyncbyid.ts + - src/sdk/models/operations/getsynctransaction.ts + - src/sdk/models/operations/index.ts + - src/sdk/models/operations/listcompanies.ts + - src/sdk/models/operations/listconnections.ts + - src/sdk/models/operations/listcustomers.ts + - src/sdk/models/operations/listpulloperations.ts + - src/sdk/models/operations/listpushoperations.ts + - src/sdk/models/operations/listsuppliers.ts + - src/sdk/models/operations/listsyncs.ts + - src/sdk/models/operations/listsynctransactions.ts + - src/sdk/models/operations/refreshalldatatypes.ts + - src/sdk/models/operations/refreshdatatype.ts + - src/sdk/models/operations/setcompanyconfiguration.ts + - src/sdk/models/operations/unlinkconnection.ts + - src/sdk/models/operations/updatecompany.ts + - src/sdk/models/operations/updatecustomer.ts + - src/sdk/models/operations/updateexpensetransaction.ts + - src/sdk/models/operations/updatereimbursableexpensetransaction.ts + - src/sdk/models/operations/updatesupplier.ts + - src/sdk/models/operations/uploadexpenseattachment.ts + - src/sdk/models/shared/accountingaddresstype.ts + - src/sdk/models/shared/accountmappinginfo.ts + - src/sdk/models/shared/accountprototype.ts + - src/sdk/models/shared/accountstatus.ts + - src/sdk/models/shared/accounttype.ts + - src/sdk/models/shared/adjustmenttransactionline.ts + - src/sdk/models/shared/adjustmenttransactionrequest.ts + - src/sdk/models/shared/adjustmenttransactionresponse.ts + - src/sdk/models/shared/apaccountref.ts + - src/sdk/models/shared/attachment.ts + - src/sdk/models/shared/attachmentupload.ts + - src/sdk/models/shared/bankaccount.ts + - src/sdk/models/shared/bankaccountdetails.ts + - src/sdk/models/shared/bankaccountstatus.ts + - src/sdk/models/shared/clientratelimitreachedwebhook.ts + - src/sdk/models/shared/clientratelimitreachedwebhookdata.ts + - src/sdk/models/shared/clientratelimitresetwebhook.ts + - src/sdk/models/shared/clientratelimitresetwebhookdata.ts + - src/sdk/models/shared/clientratelimitwebhook.ts + - src/sdk/models/shared/clientratelimitwebhookpayload.ts + - src/sdk/models/shared/codatfile.ts + - src/sdk/models/shared/companies.ts + - src/sdk/models/shared/company.ts + - src/sdk/models/shared/companyconfiguration.ts + - src/sdk/models/shared/companyinformation.ts + - src/sdk/models/shared/companyreference.ts + - src/sdk/models/shared/companyrequestbody.ts + - src/sdk/models/shared/companysyncstatus.ts + - src/sdk/models/shared/connection.ts + - src/sdk/models/shared/connections.ts + - src/sdk/models/shared/contact.ts + - src/sdk/models/shared/createaccountresponse.ts + - src/sdk/models/shared/createbankaccountresponse.ts + - src/sdk/models/shared/createcustomerresponse.ts + - src/sdk/models/shared/createexpenseresponse.ts + - src/sdk/models/shared/createreimbursableexpenseresponse.ts + - src/sdk/models/shared/createsupplierresponse.ts + - src/sdk/models/shared/customer.ts + - src/sdk/models/shared/customerdetails.ts + - src/sdk/models/shared/customers.ts + - src/sdk/models/shared/customerstatus.ts + - src/sdk/models/shared/dataconnectionerror.ts + - src/sdk/models/shared/dataconnectionstatus.ts + - src/sdk/models/shared/datastatus.ts + - src/sdk/models/shared/datatype.ts + - src/sdk/models/shared/definitiontransaction.ts + - src/sdk/models/shared/errorvalidation.ts + - src/sdk/models/shared/errorvalidationitem.ts + - src/sdk/models/shared/expensecontactref.ts + - src/sdk/models/shared/expensessyncwebhook.ts + - src/sdk/models/shared/expensessyncwebhookpayload.ts + - src/sdk/models/shared/expensetransaction.ts + - src/sdk/models/shared/expensetransactionline.ts + - src/sdk/models/shared/halref.ts + - src/sdk/models/shared/index.ts + - src/sdk/models/shared/integrationtype.ts + - src/sdk/models/shared/invoiceto.ts + - src/sdk/models/shared/itemref.ts + - src/sdk/models/shared/items.ts + - src/sdk/models/shared/links.ts + - src/sdk/models/shared/mappingoptions.ts + - src/sdk/models/shared/metadata.ts + - src/sdk/models/shared/phonenumberitems.ts + - src/sdk/models/shared/phonenumbertype.ts + - src/sdk/models/shared/propertiedatatype.ts + - src/sdk/models/shared/pulloperation.ts + - src/sdk/models/shared/pulloperations.ts + - src/sdk/models/shared/pushchangetype.ts + - src/sdk/models/shared/pushfieldvalidation.ts + - src/sdk/models/shared/pushoperation.ts + - src/sdk/models/shared/pushoperationchange.ts + - src/sdk/models/shared/pushoperationref.ts + - src/sdk/models/shared/pushoperations.ts + - src/sdk/models/shared/pushoperationstatus.ts + - src/sdk/models/shared/pushoption.ts + - src/sdk/models/shared/pushoptionchoice.ts + - src/sdk/models/shared/pushoptionproperty.ts + - src/sdk/models/shared/pushoptiontype.ts + - src/sdk/models/shared/pushvalidationinfo.ts + - src/sdk/models/shared/recordref.ts + - src/sdk/models/shared/reimbursableexpensetransaction.ts + - src/sdk/models/shared/reimbursableexpensetransactionline.ts + - src/sdk/models/shared/reimbursementcontactref.ts + - src/sdk/models/shared/security.ts + - src/sdk/models/shared/status.ts + - src/sdk/models/shared/supplementaldata.ts + - src/sdk/models/shared/supplier.ts + - src/sdk/models/shared/supplierdetails.ts + - src/sdk/models/shared/suppliers.ts + - src/sdk/models/shared/supplierstatus.ts + - src/sdk/models/shared/synccompletewebhook.ts + - src/sdk/models/shared/synccompletewebhookdata.ts + - src/sdk/models/shared/syncfailedwebhook.ts + - src/sdk/models/shared/syncfailedwebhookdata.ts + - src/sdk/models/shared/taxratemappinginfo.ts + - src/sdk/models/shared/trackingcategorymappinginfo.ts + - src/sdk/models/shared/trackingref.ts + - src/sdk/models/shared/trackingrefadjustmenttransaction.ts + - src/sdk/models/shared/transaction.ts + - src/sdk/models/shared/transactions.ts + - src/sdk/models/shared/transactionstatus.ts + - src/sdk/models/shared/transfertransactionrequest.ts + - src/sdk/models/shared/transfertransactionresponse.ts + - src/sdk/models/shared/updatecustomerresponse.ts + - src/sdk/models/shared/updateexpenserequest.ts + - src/sdk/models/shared/updateexpenseresponse.ts + - src/sdk/models/shared/updatereimbursableexpensetransactionrequest.ts + - src/sdk/models/shared/updatesupplierresponse.ts + - src/sdk/models/shared/validation.ts + - src/sdk/models/shared/validationitem.ts + - src/sdk/models/shared/validfor.ts + - src/sdk/models/shared/validtransactiontypes.ts + - src/sdk/pushoperations.ts + - src/sdk/reimbursements.ts + - src/sdk/sdk.ts + - src/sdk/suppliers.ts + - src/sdk/sync.ts + - src/sdk/transactionstatus.ts + - src/sdk/transfers.ts + - src/sdk/types/blobs.ts + - src/sdk/types/constdatetime.ts + - src/sdk/types/decimal.ts + - src/sdk/types/enums.ts + - src/sdk/types/fp.ts + - src/sdk/types/index.ts + - src/sdk/types/operations.ts + - src/sdk/types/rfcdate.ts + - src/sdk/types/streams.ts + - tsconfig.json diff --git a/sync-for-expenses/.speakeasy/gen.yaml b/sync-for-expenses/.speakeasy/gen.yaml index 8382ab497..a28b1da08 100644 --- a/sync-for-expenses/.speakeasy/gen.yaml +++ b/sync-for-expenses/.speakeasy/gen.yaml @@ -4,30 +4,59 @@ generation: maintainOpenAPIOrder: true usageSnippets: optionalPropertyRendering: withExample + sdkInitStyle: constructor useClassNamesForArrayFields: true fixes: nameResolutionDec2023: true + nameResolutionFeb2025: false parameterOrderingFeb2024: true requestResponseComponentNamesFeb2024: true + securityFeb2025: false + sharedErrorComponentsApr2025: false + sharedNestedComponentsJan2026: false + nameOverrideFeb2026: false auth: oAuth2ClientCredentialsEnabled: false oAuth2PasswordEnabled: false + hoistGlobalSecurity: true + schemas: + allOfMergeStrategy: shallowMerge + requestBodyFieldName: "" + versioningStrategy: automatic + persistentEdits: {} + tests: + generateTests: true + generateNewTests: false + skipResponseBodyAssertions: false telemetryEnabled: true typescript: - version: 7.0.0 + version: 7.1.0 + acceptHeaderEnum: true additionalDependencies: dependencies: {} devDependencies: {} peerDependencies: {} additionalPackageJSON: {} + additionalScripts: {} + alwaysIncludeInboundAndOutbound: false author: Codat + baseErrorName: CodatSyncExpensesError clientServerStatusCodesAsErrors: true + constFieldsAlwaysOptional: false defaultErrorName: SDKError description: Push expenses to accounting platforms. + enableCustomCodeRegions: false + enableMCPServer: false enableReactQuery: false enumFormat: union + exportZodModelNamespace: false + flatAdditionalProperties: false flattenGlobalSecurity: true flatteningOrder: body-first + formStringArrayEncodeMode: encoded-string + forwardCompatibleEnumsByDefault: false + forwardCompatibleUnionsByDefault: "false" + generateExamples: true imports: option: openapi paths: @@ -36,12 +65,26 @@ typescript: operations: sdk/models/operations shared: sdk/models/shared webhooks: sdk/models/webhooks + inferUnionDiscriminators: true inputModelSuffix: input + jsonpath: legacy + laxMode: strict + legacyFileNaming: true maxMethodParams: 0 methodArguments: infer-optional-args + modelPropertyCasing: camel moduleFormat: commonjs + multipartArrayFormat: legacy outputModelSuffix: output packageName: '@codat/sync-for-expenses' + preApplyUnionDiscriminators: true + preserveModelFieldNames: false responseFormat: flat + sseFlatResponse: false templateVersion: v2 + unionStrategy: left-to-right + usageSDKInitImports: [] useIndexModules: true + useOxlint: false + useTsgo: false + zodVersion: v3 diff --git a/sync-for-expenses/FUNCTIONS.md b/sync-for-expenses/FUNCTIONS.md index a936645b4..5fe8f2c17 100644 --- a/sync-for-expenses/FUNCTIONS.md +++ b/sync-for-expenses/FUNCTIONS.md @@ -21,7 +21,6 @@ specific category of applications. ```typescript import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; import { companiesList } from "@codat/sync-for-expenses/funcs/companiesList.js"; -import { SDKValidationError } from "@codat/sync-for-expenses/sdk/models/errors/sdkvalidationerror.js"; // Use `CodatSyncExpensesCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -31,33 +30,16 @@ const codatSyncExpenses = new CodatSyncExpensesCore({ async function run() { const res = await companiesList(codatSyncExpenses, { - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", }); - - switch (true) { - case res.ok: - // The success case will be handled outside of the switch block - break; - case res.error instanceof SDKValidationError: - // Pretty-print validation errors. - return console.log(res.error.pretty()); - case res.error instanceof Error: - return console.log(res.error); - default: - // TypeScript's type checking will fail on the following line if the above - // cases were not exhaustive. - res.error satisfies never; - throw new Error("Assertion failed: expected error checks to be exhaustive: " + res.error); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesList failed:", res.error); } - - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); diff --git a/sync-for-expenses/README.md b/sync-for-expenses/README.md index f9fe2debd..86604df9c 100755 --- a/sync-for-expenses/README.md +++ b/sync-for-expenses/README.md @@ -7,15 +7,15 @@ ## Summary -Sync for Expenses: The API for Sync for Expenses. +Expenses: The API for Codat's Expenses solution. -Sync for Expenses is an API and a set of supporting tools. It has been built to +Expenses is an API and a set of supporting tools. It has been built to enable corporate card and expense management platforms to provide high-quality integrations with multiple accounting software through a standardized API. -[Explore product](https://docs.codat.io/sync-for-expenses/overview) | [See our OpenAPI spec](https://github.com/codatio/oas) +[Explore solution](https://docs.codat.io/sync-for-expenses/overview) | [See our OpenAPI spec](https://github.com/codatio/oas) -Not seeing the endpoints you're expecting? We've [reorganized our products](https://docs.codat.io/updates/230901-new-products), and you may be using a [different version of Sync for Expenses](https://docs.codat.io/sync-for-expenses-v1-api#/). +Not seeing the endpoints you're expecting? We've [reorganized our solutions](https://docs.codat.io/updates/230901-new-products), and you may be using a [different version of Expenses](https://docs.codat.io/sync-for-expenses-v1-api#/). --- @@ -42,19 +42,24 @@ Not seeing the endpoints you're expecting? We've [reorganized our products](http ## Table of Contents + +* [Sync for Expenses](#sync-for-expenses) + * [Endpoints](#endpoints) + * [SDK Installation](#sdk-installation) + * [Example Usage](#example-usage) + * [SDK Example Usage](#sdk-example-usage) + * [Available Resources and Operations](#available-resources-and-operations) + * [Retries](#retries) + * [Error Handling](#error-handling) + * [Server Selection](#server-selection) + * [Custom HTTP Client](#custom-http-client) + * [Authentication](#authentication) + * [Requirements](#requirements) + * [Standalone functions](#standalone-functions) + * [File uploads](#file-uploads) + * [Debugging](#debugging) + * [Support](#support) -* [SDK Installation](#sdk-installation) -* [Requirements](#requirements) -* [SDK Example Usage](#sdk-example-usage) -* [Available Resources and Operations](#available-resources-and-operations) -* [Standalone functions](#standalone-functions) -* [File uploads](#file-uploads) -* [Retries](#retries) -* [Error Handling](#error-handling) -* [Server Selection](#server-selection) -* [Custom HTTP Client](#custom-http-client) -* [Authentication](#authentication) -* [Debugging](#debugging) @@ -83,10 +88,7 @@ bun add @codat/sync-for-expenses ### Yarn ```bash -yarn add @codat/sync-for-expenses zod - -# Note that Yarn does not install peer dependencies automatically. You will need -# to install zod as shown above. +yarn add @codat/sync-for-expenses ``` @@ -105,13 +107,11 @@ const codatSyncExpenses = new CodatSyncExpenses({ async function run() { const result = await codatSyncExpenses.companies.list({ - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", }); - // Handle the result console.log(result); } @@ -126,43 +126,43 @@ run();
Available methods -### [accounts](docs/sdks/accounts/README.md) +### [Accounts](docs/sdks/accounts/README.md) * [create](docs/sdks/accounts/README.md#create) - Create account * [getCreateModel](docs/sdks/accounts/README.md#getcreatemodel) - Get create account model -### [adjustments](docs/sdks/adjustments/README.md) +### [Adjustments](docs/sdks/adjustments/README.md) * [create](docs/sdks/adjustments/README.md#create) - Create adjustment transaction -### [attachments](docs/sdks/attachments/README.md) +### [Attachments](docs/sdks/attachments/README.md) * [upload](docs/sdks/attachments/README.md#upload) - Upload attachment -### [bankAccounts](docs/sdks/bankaccounts/README.md) +### [BankAccounts](docs/sdks/bankaccounts/README.md) * [create](docs/sdks/bankaccounts/README.md#create) - Create bank account * [getCreateModel](docs/sdks/bankaccounts/README.md#getcreatemodel) - Get create bank account model - -### [companies](docs/sdks/companies/README.md) +### [Companies](docs/sdks/companies/README.md) * [list](docs/sdks/companies/README.md#list) - List companies * [create](docs/sdks/companies/README.md#create) - Create company +* [replace](docs/sdks/companies/README.md#replace) - Replace company * [update](docs/sdks/companies/README.md#update) - Update company * [delete](docs/sdks/companies/README.md#delete) - Delete a company * [get](docs/sdks/companies/README.md#get) - Get company -### [companyInfo](docs/sdks/companyinfo/README.md) +### [CompanyInfo](docs/sdks/companyinfo/README.md) * [get](docs/sdks/companyinfo/README.md#get) - Get company info -### [configuration](docs/sdks/configuration/README.md) +### [Configuration](docs/sdks/configuration/README.md) * [get](docs/sdks/configuration/README.md#get) - Get company configuration * [set](docs/sdks/configuration/README.md#set) - Set company configuration -### [connections](docs/sdks/connections/README.md) +### [Connections](docs/sdks/connections/README.md) * [list](docs/sdks/connections/README.md#list) - List connections * [create](docs/sdks/connections/README.md#create) - Create connection @@ -171,19 +171,19 @@ run(); * [unlink](docs/sdks/connections/README.md#unlink) - Unlink connection * [createPartnerExpenseConnection](docs/sdks/connections/README.md#createpartnerexpenseconnection) - Create partner expense connection -### [customers](docs/sdks/customers/README.md) +### [Customers](docs/sdks/customers/README.md) * [list](docs/sdks/customers/README.md#list) - List customers * [get](docs/sdks/customers/README.md#get) - Get customer * [create](docs/sdks/customers/README.md#create) - Create customer * [update](docs/sdks/customers/README.md#update) - Update customer -### [expenses](docs/sdks/expenses/README.md) +### [Expenses](docs/sdks/expenses/README.md) * [create](docs/sdks/expenses/README.md#create) - Create expense transaction * [update](docs/sdks/expenses/README.md#update) - Update expense transactions -### [manageData](docs/sdks/managedata/README.md) +### [ManageData](docs/sdks/managedata/README.md) * [refreshAllDataTypes](docs/sdks/managedata/README.md#refreshalldatatypes) - Refresh all data * [get](docs/sdks/managedata/README.md#get) - Get data status @@ -191,40 +191,40 @@ run(); * [listPullOperations](docs/sdks/managedata/README.md#listpulloperations) - List pull operations * [getPullOperation](docs/sdks/managedata/README.md#getpulloperation) - Get pull operation -### [mappingOptions](docs/sdks/mappingoptions/README.md) +### [MappingOptions](docs/sdks/mappingoptions/README.md) * [getMappingOptions](docs/sdks/mappingoptions/README.md#getmappingoptions) - Mapping options -### [pushOperations](docs/sdks/pushoperations/README.md) +### [PushOperations](docs/sdks/pushoperations/README.md) * [list](docs/sdks/pushoperations/README.md#list) - List push operations * [get](docs/sdks/pushoperations/README.md#get) - Get push operation -### [reimbursements](docs/sdks/reimbursements/README.md) +### [Reimbursements](docs/sdks/reimbursements/README.md) * [create](docs/sdks/reimbursements/README.md#create) - Create reimbursable expense transaction * [update](docs/sdks/reimbursements/README.md#update) - Update reimbursable expense transaction -### [suppliers](docs/sdks/suppliers/README.md) +### [Suppliers](docs/sdks/suppliers/README.md) * [list](docs/sdks/suppliers/README.md#list) - List suppliers * [get](docs/sdks/suppliers/README.md#get) - Get supplier * [create](docs/sdks/suppliers/README.md#create) - Create supplier * [update](docs/sdks/suppliers/README.md#update) - Update supplier -### [sync](docs/sdks/sync/README.md) +### [Sync](docs/sdks/sync/README.md) * [getLastSuccessfulSync](docs/sdks/sync/README.md#getlastsuccessfulsync) - Last successful sync * [getLatestSync](docs/sdks/sync/README.md#getlatestsync) - Latest sync status * [list](docs/sdks/sync/README.md#list) - List sync statuses * [get](docs/sdks/sync/README.md#get) - Get sync status -### [transactionStatus](docs/sdks/transactionstatus/README.md) +### [TransactionStatus](docs/sdks/transactionstatus/README.md) * [list](docs/sdks/transactionstatus/README.md#list) - List sync transactions * [get](docs/sdks/transactionstatus/README.md#get) - Get sync transaction -### [transfers](docs/sdks/transfers/README.md) +### [Transfers](docs/sdks/transfers/README.md) * [create](docs/sdks/transfers/README.md#create) - Create transfer transaction @@ -250,10 +250,9 @@ const codatSyncExpenses = new CodatSyncExpenses({ async function run() { const result = await codatSyncExpenses.companies.list({ - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", }, { retries: { strategy: "backoff", @@ -267,7 +266,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -295,13 +293,11 @@ const codatSyncExpenses = new CodatSyncExpenses({ async function run() { const result = await codatSyncExpenses.companies.list({ - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", }); - // Handle the result console.log(result); } @@ -313,64 +309,50 @@ run(); ## Error Handling -All SDK methods return a response object or throw an error. By default, an API error will throw a `errors.SDKError`. - -If a HTTP request fails, an operation my also throw an error from the `sdk/models/errors/httpclienterrors.ts` module: - -| HTTP Client Error | Description | -| ---------------------------------------------------- | ---------------------------------------------------- | -| RequestAbortedError | HTTP request was aborted by the client | -| RequestTimeoutError | HTTP request timed out due to an AbortSignal signal | -| ConnectionError | HTTP client was unable to make a request to a server | -| InvalidRequestError | Any input used to create a request is invalid | -| UnexpectedClientError | Unrecognised or unexpected error | - -In addition, when custom error responses are specified for an operation, the SDK may throw their associated Error type. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation. For example, the `list` method may throw the following errors: +[`CodatSyncExpensesError`](./src/sdk/models/errors/codatsyncexpenseserror.ts) is the base class for all HTTP error responses. It has the following properties: -| Error Type | Status Code | Content Type | -| ------------------- | -------------------------------------- | ---------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Property | Type | Description | +| ------------------- | ---------- | --------------------------------------------------------------------------------------- | +| `error.message` | `string` | Error message | +| `error.statusCode` | `number` | HTTP response status code eg `404` | +| `error.headers` | `Headers` | HTTP response headers | +| `error.body` | `string` | HTTP body. Can be empty string if no body is returned. | +| `error.rawResponse` | `Response` | Raw HTTP response | +| `error.data$` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). | +### Example ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; -import { - ErrorMessage, - SDKValidationError, -} from "@codat/sync-for-expenses/sdk/models/errors"; +import * as errors from "@codat/sync-for-expenses/sdk/models/errors"; const codatSyncExpenses = new CodatSyncExpenses({ authHeader: "Basic BASE_64_ENCODED(API_KEY)", }); async function run() { - let result; try { - result = await codatSyncExpenses.companies.list({ - page: 1, - pageSize: 100, + const result = await codatSyncExpenses.companies.list({ query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", }); - // Handle the result console.log(result); - } catch (err) { - switch (true) { - case (err instanceof SDKValidationError): { - // Validation errors can be pretty-printed - console.error(err.pretty()); - // Raw value may also be inspected - console.error(err.rawValue); - return; - } - case (err instanceof ErrorMessage): { - // Handle err.data$: ErrorMessageData - console.error(err); - return; - } - default: { - throw err; + } catch (error) { + // The base class for HTTP error responses + if (error instanceof errors.CodatSyncExpensesError) { + console.log(error.message); + console.log(error.statusCode); + console.log(error.body); + console.log(error.headers); + + // Depending on the method different errors may be thrown + if (error instanceof errors.ErrorMessage) { + console.log(error.data$.statusCode); // number + console.log(error.data$.service); // string + console.log(error.data$.error); // string + console.log(error.data$.correlationId); // string + console.log(error.data$.validation); // shared.ErrorValidation } } } @@ -380,7 +362,27 @@ run(); ``` -Validation errors can also occur when either method arguments or data returned from the server do not match the expected format. The `SDKValidationError` that is thrown as a result will capture the raw value that failed validation in an attribute called `rawValue`. Additionally, a `pretty()` method is available on this error that can be used to log a nicely formatted string since validation errors can list many issues and the plain error string may be difficult read when debugging. +### Error Classes +**Primary errors:** +* [`CodatSyncExpensesError`](./src/sdk/models/errors/codatsyncexpenseserror.ts): The base class for HTTP error responses. + * [`ErrorMessage`](./src/sdk/models/errors/errormessage.ts): Your `query` parameter was not correctly formed. + +
Less common errors (6) + +
+ +**Network errors:** +* [`ConnectionError`](./src/sdk/models/errors/httpclienterrors.ts): HTTP client was unable to make a request to a server. +* [`RequestTimeoutError`](./src/sdk/models/errors/httpclienterrors.ts): HTTP request timed out due to an AbortSignal signal. +* [`RequestAbortedError`](./src/sdk/models/errors/httpclienterrors.ts): HTTP request was aborted by the client. +* [`InvalidRequestError`](./src/sdk/models/errors/httpclienterrors.ts): Any input used to create a request is invalid. +* [`UnexpectedClientError`](./src/sdk/models/errors/httpclienterrors.ts): Unrecognised or unexpected error. + + +**Inherit from [`CodatSyncExpensesError`](./src/sdk/models/errors/codatsyncexpenseserror.ts)**: +* [`ResponseValidationError`](./src/sdk/models/errors/responsevalidationerror.ts): Type mismatch between the data returned from the server and the structure expected by the SDK. See `error.rawValue` for the raw value and `error.pretty()` for a nicely formatted multi-line string. + +
@@ -388,7 +390,7 @@ Validation errors can also occur when either method arguments or data returned f ### Override Server URL Per-Client -The default server can also be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example: +The default server can be overridden globally by passing a URL to the `serverURL: string` optional parameter when initializing the SDK client instance. For example: ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -399,13 +401,11 @@ const codatSyncExpenses = new CodatSyncExpenses({ async function run() { const result = await codatSyncExpenses.companies.list({ - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", }); - // Handle the result console.log(result); } @@ -427,19 +427,23 @@ The `HTTPClient` constructor takes an optional `fetcher` argument that can be used to integrate a third-party HTTP client or when writing tests to mock out the HTTP client and feed in fixtures. -The following example shows how to use the `"beforeRequest"` hook to to add a -custom header and a timeout to requests and how to use the `"requestError"` hook -to log errors: +The following example shows how to: +- route requests through a proxy server using [undici](https://www.npmjs.com/package/undici)'s ProxyAgent +- use the `"beforeRequest"` hook to add a custom header and a timeout to requests +- use the `"requestError"` hook to log errors ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; +import { ProxyAgent } from "undici"; import { HTTPClient } from "@codat/sync-for-expenses/lib/http"; +const dispatcher = new ProxyAgent("http://proxy.example.com:8080"); + const httpClient = new HTTPClient({ - // fetcher takes a function that has the same signature as native `fetch`. - fetcher: (request) => { - return fetch(request); - } + // 'fetcher' takes a function that has the same signature as native 'fetch'. + fetcher: (input, init) => + // 'dispatcher' is specific to undici and not part of the standard Fetch API. + fetch(input, { ...init, dispatcher } as RequestInit), }); httpClient.addHook("beforeRequest", (request) => { @@ -459,7 +463,7 @@ httpClient.addHook("requestError", (error, request) => { console.groupEnd(); }); -const sdk = new CodatSyncExpenses({ httpClient }); +const sdk = new CodatSyncExpenses({ httpClient: httpClient }); ``` @@ -484,13 +488,11 @@ const codatSyncExpenses = new CodatSyncExpenses({ async function run() { const result = await codatSyncExpenses.companies.list({ - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", }); - // Handle the result console.log(result); } @@ -530,6 +532,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). - [`companiesDelete`](docs/sdks/companies/README.md#delete) - Delete a company - [`companiesGet`](docs/sdks/companies/README.md#get) - Get company - [`companiesList`](docs/sdks/companies/README.md#list) - List companies +- [`companiesReplace`](docs/sdks/companies/README.md#replace) - Replace company - [`companiesUpdate`](docs/sdks/companies/README.md#update) - Update company - [`companyInfoGet`](docs/sdks/companyinfo/README.md#get) - Get company info - [`configurationGet`](docs/sdks/configuration/README.md#get) - Get company configuration @@ -599,7 +602,6 @@ async function run() { transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", }); - // Handle the result console.log(result); } diff --git a/sync-for-expenses/RELEASES.md b/sync-for-expenses/RELEASES.md index e9de324a6..92eb4f602 100644 --- a/sync-for-expenses/RELEASES.md +++ b/sync-for-expenses/RELEASES.md @@ -778,4 +778,14 @@ Based on: ### Generated - [typescript v7.0.0] sync-for-expenses ### Releases -- [NPM v7.0.0] https://www.npmjs.com/package/@codat/sync-for-expenses/v/7.0.0 - sync-for-expenses \ No newline at end of file +- [NPM v7.0.0] https://www.npmjs.com/package/@codat/sync-for-expenses/v/7.0.0 - sync-for-expenses + +## 2026-03-04 15:07:45 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.741.1 (2.849.2) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v7.1.0] sync-for-expenses +### Releases +- [NPM v7.1.0] https://www.npmjs.com/package/@codat/sync-for-expenses/v/7.1.0 - sync-for-expenses \ No newline at end of file diff --git a/sync-for-expenses/RUNTIMES.md b/sync-for-expenses/RUNTIMES.md index d08a0c075..27731c3b5 100644 --- a/sync-for-expenses/RUNTIMES.md +++ b/sync-for-expenses/RUNTIMES.md @@ -1,10 +1,10 @@ # Supported JavaScript runtimes -This SDK is intended to be used in JavaScript runtimes that support the following features: +This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features: -* [Web Fetch API][web-fetch] -* [Web Streams API][web-streams] and in particular `ReadableStream` -* [Async iterables][async-iter] using `Symbol.asyncIterator` +- [Web Fetch API][web-fetch] +- [Web Streams API][web-streams] and in particular `ReadableStream` +- [Async iterables][async-iter] using `Symbol.asyncIterator` [web-fetch]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API [web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API @@ -20,3 +20,29 @@ Runtime environments that are explicitly supported are: - Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming]) [deno-file-streaming]: https://github.com/denoland/deno/issues/11018 + +## Recommended TypeScript compiler options + +The following `tsconfig.json` options are recommended for projects using this +SDK in order to get static type support for features like async iterables, +streams and `fetch`-related APIs ([`for await...of`][for-await-of], +[`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and +so on): + +[for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of +[abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal +[request]: https://developer.mozilla.org/en-US/docs/Web/API/Request +[response]: https://developer.mozilla.org/en-US/docs/Web/API/Response + +```jsonc +{ + "compilerOptions": { + "target": "es2020", // or higher + "lib": ["es2020", "dom", "dom.iterable"] + } +} +``` + +While `target` can be set to older ECMAScript versions, it may result in extra, +unnecessary compatibility code being generated if you are not targeting old +runtimes. diff --git a/sync-for-expenses/USAGE.md b/sync-for-expenses/USAGE.md index f79b5da04..f7d004f57 100644 --- a/sync-for-expenses/USAGE.md +++ b/sync-for-expenses/USAGE.md @@ -8,13 +8,11 @@ const codatSyncExpenses = new CodatSyncExpenses({ async function run() { const result = await codatSyncExpenses.companies.list({ - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", }); - // Handle the result console.log(result); } diff --git a/sync-for-expenses/docs/sdk/models/operations/createaccountrequest.md b/sync-for-expenses/docs/sdk/models/operations/createaccountrequest.md index d0f948579..27b0dab27 100644 --- a/sync-for-expenses/docs/sdk/models/operations/createaccountrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/createaccountrequest.md @@ -4,23 +4,10 @@ ```typescript import { CreateAccountRequest } from "@codat/sync-for-expenses/sdk/models/operations"; -import { Decimal } from "@codat/sync-for-expenses/sdk/types"; let value: CreateAccountRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - accountPrototype: { - nominalCode: "610", - name: "Accounts Receivable", - description: - "Invoices the business has issued but has not yet collected payment on.", - fullyQualifiedCategory: "Asset.Current", - fullyQualifiedName: "Fixed Asset", - currency: "USD", - currentBalance: new Decimal("0"), - type: "Asset", - status: "Active", - }, }; ``` diff --git a/sync-for-expenses/docs/sdk/models/operations/createadjustmenttransactionrequest.md b/sync-for-expenses/docs/sdk/models/operations/createadjustmenttransactionrequest.md index c7d2e61ba..54b394d04 100644 --- a/sync-for-expenses/docs/sdk/models/operations/createadjustmenttransactionrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/createadjustmenttransactionrequest.md @@ -4,36 +4,9 @@ ```typescript import { CreateAdjustmentTransactionRequest } from "@codat/sync-for-expenses/sdk/models/operations"; -import { Decimal } from "@codat/sync-for-expenses/sdk/types"; let value: CreateAdjustmentTransactionRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - requestBody: [ - { - id: "84b65de0-35df-4fe4-9f31-f3b0be465b32", - date: "2022-10-23T00:00:00Z", - currency: "Tunisian Dinar", - lines: [ - { - amount: new Decimal("50"), - accountRef: { - id: "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - description: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", - trackingRefs: [ - { - id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", - dataType: "trackingCategories", - }, - ], - invoiceTo: { - id: "80000002-1674552702", - type: "customer", - }, - }, - ], - }, - ], }; ``` diff --git a/sync-for-expenses/docs/sdk/models/operations/createbankaccountrequest.md b/sync-for-expenses/docs/sdk/models/operations/createbankaccountrequest.md index aef6b6492..e4a966d67 100644 --- a/sync-for-expenses/docs/sdk/models/operations/createbankaccountrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/createbankaccountrequest.md @@ -8,12 +8,6 @@ import { CreateBankAccountRequest } from "@codat/sync-for-expenses/sdk/models/op let value: CreateBankAccountRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - bankAccount: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - currency: "EUR", - status: "Active", - }, }; ``` diff --git a/sync-for-expenses/docs/sdk/models/operations/createconnectionrequest.md b/sync-for-expenses/docs/sdk/models/operations/createconnectionrequest.md index 16e283712..b4131fdf4 100644 --- a/sync-for-expenses/docs/sdk/models/operations/createconnectionrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/createconnectionrequest.md @@ -7,9 +7,6 @@ import { CreateConnectionRequest } from "@codat/sync-for-expenses/sdk/models/ope let value: CreateConnectionRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - requestBody: { - platformKey: "gbol", - }, }; ``` diff --git a/sync-for-expenses/docs/sdk/models/operations/createcustomerrequest.md b/sync-for-expenses/docs/sdk/models/operations/createcustomerrequest.md index 50d40bbfb..a128fffd9 100644 --- a/sync-for-expenses/docs/sdk/models/operations/createcustomerrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/createcustomerrequest.md @@ -8,24 +8,6 @@ import { CreateCustomerRequest } from "@codat/sync-for-expenses/sdk/models/opera let value: CreateCustomerRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customer: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - defaultCurrency: "GBP", - contacts: [ - { - phone: [ - { - number: "+44 25691 154789", - type: "Landline", - }, - ], - status: "Active", - modifiedDate: "2022-10-23T00:00:00Z", - }, - ], - status: "Archived", - }, }; ``` diff --git a/sync-for-expenses/docs/sdk/models/operations/createexpensetransactionrequest.md b/sync-for-expenses/docs/sdk/models/operations/createexpensetransactionrequest.md index 20a88d2c3..8f18821dd 100644 --- a/sync-for-expenses/docs/sdk/models/operations/createexpensetransactionrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/createexpensetransactionrequest.md @@ -4,52 +4,9 @@ ```typescript import { CreateExpenseTransactionRequest } from "@codat/sync-for-expenses/sdk/models/operations"; -import { Decimal } from "@codat/sync-for-expenses/sdk/types"; let value: CreateExpenseTransactionRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - requestBody: [ - { - id: "a44135b0-6882-489a-83fe-a0c57a4afb19", - type: "Payment", - issueDate: "2024-05-21T00:00:00+00:00", - currency: "GBP", - currencyRate: new Decimal("1"), - contactRef: { - id: "430", - type: "Supplier", - }, - bankAccountRef: { - id: "97", - }, - merchantName: "Amazon UK", - lines: [ - { - netAmount: new Decimal("100"), - taxAmount: new Decimal("20"), - taxRateRef: { - id: "23_Bills", - }, - accountRef: { - id: "35", - }, - trackingRefs: [ - { - id: "DEPARTMENT_3", - }, - { - dataType: "trackingCategories", - }, - ], - invoiceTo: { - id: "504", - type: "customer", - }, - }, - ], - notes: "amazon purchase", - }, - ], }; ``` diff --git a/sync-for-expenses/docs/sdk/models/operations/createreimbursableexpensetransactionrequest.md b/sync-for-expenses/docs/sdk/models/operations/createreimbursableexpensetransactionrequest.md index 5dd301b9f..af3df215b 100644 --- a/sync-for-expenses/docs/sdk/models/operations/createreimbursableexpensetransactionrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/createreimbursableexpensetransactionrequest.md @@ -4,51 +4,9 @@ ```typescript import { CreateReimbursableExpenseTransactionRequest } from "@codat/sync-for-expenses/sdk/models/operations"; -import { Decimal } from "@codat/sync-for-expenses/sdk/types"; let value: CreateReimbursableExpenseTransactionRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - requestBody: [ - { - id: "4d7c6929-7770-412b-91bb-44d3bc71d111", - contactRef: { - id: "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - apAccountRef: { - id: "8000004C-1724173136", - }, - issueDate: "2022-10-23T00:00:00Z", - dueDate: "2022-10-23T00:00:00Z", - currency: "GBP", - notes: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", - lines: [ - { - description: "2-night hotel stay", - netAmount: new Decimal("100"), - taxAmount: new Decimal("20"), - taxRateRef: { - id: "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - accountRef: { - id: "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - itemRef: { - id: "80000002-1675158984", - }, - trackingRefs: [ - { - id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", - dataType: "trackingCategories", - }, - ], - invoiceTo: { - id: "80000002-1674552702", - type: "customer", - }, - }, - ], - }, - ], }; ``` diff --git a/sync-for-expenses/docs/sdk/models/operations/createsupplierrequest.md b/sync-for-expenses/docs/sdk/models/operations/createsupplierrequest.md index 6c384cb75..f6ca36308 100644 --- a/sync-for-expenses/docs/sdk/models/operations/createsupplierrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/createsupplierrequest.md @@ -8,44 +8,6 @@ import { CreateSupplierRequest } from "@codat/sync-for-expenses/sdk/models/opera let value: CreateSupplierRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - supplier: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - id: "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", - supplierName: "Kelly's Industrial Supplies", - contactName: "Kelly's Industrial Supplies", - emailAddress: "sales@kellysupplies.com", - phone: "07999 999999", - addresses: [ - { - type: "Billing", - line1: "Unit 51", - line2: "Bakersfield Industrial Estate", - city: "Bakersfield", - region: "California", - country: "USA", - }, - ], - registrationNumber: "string", - taxNumber: "string", - status: "Unknown", - defaultCurrency: "string", - metadata: { - isDeleted: true, - }, - supplementalData: { - content: { - "property1": { - "property1": null, - "property2": null, - }, - "property2": { - "property1": null, - "property2": null, - }, - }, - }, - }, }; ``` diff --git a/sync-for-expenses/docs/sdk/models/operations/createtransfertransactionrequest.md b/sync-for-expenses/docs/sdk/models/operations/createtransfertransactionrequest.md index 104423f92..c931c5332 100644 --- a/sync-for-expenses/docs/sdk/models/operations/createtransfertransactionrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/createtransfertransactionrequest.md @@ -4,27 +4,10 @@ ```typescript import { CreateTransferTransactionRequest } from "@codat/sync-for-expenses/sdk/models/operations"; -import { Decimal } from "@codat/sync-for-expenses/sdk/types"; let value: CreateTransferTransactionRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", - transferTransactionRequest: { - description: "Transfer from bank account Y to bank account Z", - date: "2022-10-23T00:00:00Z", - from: { - accountRef: { - id: "", - }, - amount: new Decimal("5173.09"), - }, - to: { - accountRef: { - id: "", - }, - amount: new Decimal("4240.89"), - }, - }, }; ``` diff --git a/sync-for-expenses/docs/sdk/models/operations/getcustomerrequest.md b/sync-for-expenses/docs/sdk/models/operations/getcustomerrequest.md index f30a5c193..87bae7537 100644 --- a/sync-for-expenses/docs/sdk/models/operations/getcustomerrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/getcustomerrequest.md @@ -7,13 +7,13 @@ import { GetCustomerRequest } from "@codat/sync-for-expenses/sdk/models/operatio let value: GetCustomerRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "EILBDVJVNUAGVKRQ", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `customerId` | *string* | :heavy_check_mark: | Unique identifier for a customer. | 13d946f0-c5d5-42bc-b092-97ece17923ab | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `customerId` | *string* | :heavy_check_mark: | Unique identifier for a customer. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/operations/getdatastatusdatastatuses.md b/sync-for-expenses/docs/sdk/models/operations/getdatastatusdatastatuses.md index 05ee78188..e12b6f663 100644 --- a/sync-for-expenses/docs/sdk/models/operations/getdatastatusdatastatuses.md +++ b/sync-for-expenses/docs/sdk/models/operations/getdatastatusdatastatuses.md @@ -9,303 +9,303 @@ import { GetDataStatusDataStatuses } from "@codat/sync-for-expenses/sdk/models/o let value: GetDataStatusDataStatuses = { accountTransactions: { - dataType: "commerce-paymentMethods", + dataType: "invoices", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "PermissionsError", + currentStatus: "ProcessingError", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, balanceSheet: { - dataType: "commerce-companyInfo", + dataType: "bankAccounts", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ValidationError", + currentStatus: "Queued", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, bankAccounts: { - dataType: "commerce-taxComponents", + dataType: "chartOfAccounts", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "PrerequisiteNotMet", + currentStatus: "InternalError", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, bankTransactions: { - dataType: "paymentMethods", + dataType: "commerce-paymentMethods", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Queued", + currentStatus: "FetchError", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, billCreditNotes: { - dataType: "directCosts", + dataType: "paymentMethods", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "MapQueued", + currentStatus: "MapError", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, billPayments: { - dataType: "journalEntries", + dataType: "commerce-payments", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Fetching", + currentStatus: "ValidationQueued", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, bills: { - dataType: "taxRates", + dataType: "paymentMethods", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "InternalError", + currentStatus: "Validating", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, cashFlowStatement: { - dataType: "commerce-payments", + dataType: "journals", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "PrerequisiteNotMet", + currentStatus: "Initial", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, chartOfAccounts: { - dataType: "salesOrders", + dataType: "suppliers", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Complete", + currentStatus: "Queued", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, company: { - dataType: "taxRates", + dataType: "invoices", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "RateLimitError", + currentStatus: "NotSupported", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, creditNotes: { - dataType: "journalEntries", + dataType: "journals", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ProcessingError", + currentStatus: "Fetching", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, customers: { - dataType: "customers", + dataType: "trackingCategories", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ProcessingQueued", + currentStatus: "AuthError", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, directCosts: { - dataType: "journalEntries", + dataType: "billPayments", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Complete", + currentStatus: "Fetching", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, directIncomes: { - dataType: "profitAndLoss", + dataType: "purchaseOrders", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "FetchError", + currentStatus: "Queued", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, invoices: { - dataType: "items", + dataType: "creditNotes", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ProcessingError", + currentStatus: "MapQueued", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, itemReceipts: { - dataType: "commerce-companyInfo", + dataType: "bankTransactions", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "MapError", + currentStatus: "NotSupported", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, items: { - dataType: "commerce-productCategories", + dataType: "commerce-products", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "RateLimitError", + currentStatus: "InternalError", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, journalEntries: { - dataType: "bankAccounts", + dataType: "commerce-products", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Complete", + currentStatus: "PrerequisiteNotMet", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, journals: { - dataType: "paymentMethods", + dataType: "commerce-transactions", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Fetching", + currentStatus: "Mapping", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, paymentMethods: { - dataType: "invoices", + dataType: "billPayments", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "AuthError", + currentStatus: "MapQueued", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, payments: { - dataType: "banking-accounts", + dataType: "payments", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", currentStatus: "Validating", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, profitAndLoss: { - dataType: "banking-transactionCategories", + dataType: "directCosts", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Mapping", + currentStatus: "ValidationQueued", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, purchaseOrders: { - dataType: "invoices", + dataType: "bills", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ValidationError", + currentStatus: "ProcessingError", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, salesOrders: { - dataType: "commerce-paymentMethods", + dataType: "commerce-products", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ProcessingError", + currentStatus: "Queued", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, suppliers: { - dataType: "directCosts", + dataType: "transfers", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Initial", + currentStatus: "AuthError", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, taxRates: { - dataType: "banking-transactionCategories", + dataType: "company", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Initial", + currentStatus: "Validating", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, trackingCategories: { - dataType: "items", + dataType: "bills", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ProcessingError", + currentStatus: "NotSupported", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, transfers: { - dataType: "commerce-productCategories", + dataType: "commerce-payments", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Queued", + currentStatus: "Processing", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, bankingAccountBalances: { - dataType: "journalEntries", + dataType: "items", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Initial", + currentStatus: "InternalError", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, bankingAccounts: { - dataType: "invoices", + dataType: "trackingCategories", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Validating", + currentStatus: "InternalError", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, bankingTransactionCategories: { - dataType: "customers", + dataType: "journals", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Mapping", + currentStatus: "InternalError", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, bankingTransactions: { - dataType: "billCreditNotes", + dataType: "invoices", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ValidationQueued", + currentStatus: "FetchError", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, commerceCompanyInfo: { - dataType: "banking-accounts", + dataType: "billPayments", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ValidationError", + currentStatus: "ProcessingError", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, commerceCustomers: { - dataType: "commerce-products", + dataType: "suppliers", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", currentStatus: "Initial", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, commerceDisputes: { - dataType: "transfers", + dataType: "banking-transactions", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ValidationQueued", + currentStatus: "ProcessingQueued", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, commerceLocations: { - dataType: "taxRates", + dataType: "transfers", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "PrerequisiteNotMet", + currentStatus: "PermissionsError", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, commerceOrders: { - dataType: "accountTransactions", + dataType: "billPayments", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ValidationError", + currentStatus: "FetchError", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, commercePaymentMethods: { - dataType: "commerce-disputes", + dataType: "trackingCategories", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Processing", + currentStatus: "NotSupported", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, commercePayments: { dataType: "invoices", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Cancelled", + currentStatus: "ProcessingError", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, commerceProductCategories: { - dataType: "billCreditNotes", + dataType: "bills", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ProcessingQueued", + currentStatus: "MapQueued", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, commerceProducts: { - dataType: "purchaseOrders", + dataType: "banking-accounts", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "ValidationError", + currentStatus: "Validating", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, commerceTaxComponents: { - dataType: "bankTransactions", + dataType: "items", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Mapping", + currentStatus: "PrerequisiteNotMet", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, commerceTransactions: { - dataType: "journalEntries", + dataType: "company", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "Validating", + currentStatus: "MapQueued", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }, diff --git a/sync-for-expenses/docs/sdk/models/operations/getpulloperationrequest.md b/sync-for-expenses/docs/sdk/models/operations/getpulloperationrequest.md index 4011a1366..e8be4affa 100644 --- a/sync-for-expenses/docs/sdk/models/operations/getpulloperationrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/getpulloperationrequest.md @@ -7,7 +7,7 @@ import { GetPullOperationRequest } from "@codat/sync-for-expenses/sdk/models/ope let value: GetPullOperationRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - datasetId: "e92fd8e8-edfe-4026-bf42-e7e2a71b3000", + datasetId: "2e524c49-3726-44e5-9563-576172cc15aa", }; ``` diff --git a/sync-for-expenses/docs/sdk/models/operations/getpushoperationrequest.md b/sync-for-expenses/docs/sdk/models/operations/getpushoperationrequest.md index cf027a86e..36492fcc3 100644 --- a/sync-for-expenses/docs/sdk/models/operations/getpushoperationrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/getpushoperationrequest.md @@ -7,7 +7,7 @@ import { GetPushOperationRequest } from "@codat/sync-for-expenses/sdk/models/ope let value: GetPushOperationRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "bea84f57-6f25-4a19-9743-8575f2159a6f", + pushOperationKey: "14a4a880-31a4-4db5-88cb-40c00b392985", }; ``` diff --git a/sync-for-expenses/docs/sdk/models/operations/getsupplierrequest.md b/sync-for-expenses/docs/sdk/models/operations/getsupplierrequest.md index 68ea4c3a3..0496c3d26 100644 --- a/sync-for-expenses/docs/sdk/models/operations/getsupplierrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/getsupplierrequest.md @@ -7,13 +7,13 @@ import { GetSupplierRequest } from "@codat/sync-for-expenses/sdk/models/operatio let value: GetSupplierRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `supplierId` | *string* | :heavy_check_mark: | Unique identifier for a supplier. | 13d946f0-c5d5-42bc-b092-97ece17923ab | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `supplierId` | *string* | :heavy_check_mark: | Unique identifier for a supplier. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/operations/listcompaniesrequest.md b/sync-for-expenses/docs/sdk/models/operations/listcompaniesrequest.md index 3810c5f79..75a1acdf8 100644 --- a/sync-for-expenses/docs/sdk/models/operations/listcompaniesrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/listcompaniesrequest.md @@ -6,18 +6,18 @@ import { ListCompaniesRequest } from "@codat/sync-for-expenses/sdk/models/operations"; let value: ListCompaniesRequest = { - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | -| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | -| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | -| `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `page` | *number* | :heavy_minus_sign: | Page number. [Read more](https://docs.codat.io/using-the-api/paging). | 1 | +| `pageSize` | *number* | :heavy_minus_sign: | Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). | 100 | +| `query` | *string* | :heavy_minus_sign: | Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). | id=e3334455-1aed-4e71-ab43-6bccf12092ee | +| `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | +| `tags` | *string* | :heavy_minus_sign: | Filter companies by tags using the "equals" (=), "not equals" (!=), and "contains" (~) operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying). | region=uk && team=invoice-finance | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/operations/listconnectionsrequest.md b/sync-for-expenses/docs/sdk/models/operations/listconnectionsrequest.md index 5fcc9dfd0..34da692d5 100644 --- a/sync-for-expenses/docs/sdk/models/operations/listconnectionsrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/listconnectionsrequest.md @@ -7,8 +7,6 @@ import { ListConnectionsRequest } from "@codat/sync-for-expenses/sdk/models/oper let value: ListConnectionsRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", }; diff --git a/sync-for-expenses/docs/sdk/models/operations/listcustomersrequest.md b/sync-for-expenses/docs/sdk/models/operations/listcustomersrequest.md index 1dee0ed3f..f803f4ef7 100644 --- a/sync-for-expenses/docs/sdk/models/operations/listcustomersrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/listcustomersrequest.md @@ -7,8 +7,6 @@ import { ListCustomersRequest } from "@codat/sync-for-expenses/sdk/models/operat let value: ListCustomersRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", }; diff --git a/sync-for-expenses/docs/sdk/models/operations/listpulloperationsrequest.md b/sync-for-expenses/docs/sdk/models/operations/listpulloperationsrequest.md index 53e6ecf21..b94d5fe2f 100644 --- a/sync-for-expenses/docs/sdk/models/operations/listpulloperationsrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/listpulloperationsrequest.md @@ -7,8 +7,6 @@ import { ListPullOperationsRequest } from "@codat/sync-for-expenses/sdk/models/o let value: ListPullOperationsRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", }; diff --git a/sync-for-expenses/docs/sdk/models/operations/listpushoperationsrequest.md b/sync-for-expenses/docs/sdk/models/operations/listpushoperationsrequest.md index 93d585dce..fc45f4aac 100644 --- a/sync-for-expenses/docs/sdk/models/operations/listpushoperationsrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/listpushoperationsrequest.md @@ -7,8 +7,6 @@ import { ListPushOperationsRequest } from "@codat/sync-for-expenses/sdk/models/o let value: ListPushOperationsRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", }; diff --git a/sync-for-expenses/docs/sdk/models/operations/listsuppliersrequest.md b/sync-for-expenses/docs/sdk/models/operations/listsuppliersrequest.md index b0f7db293..77f29b496 100644 --- a/sync-for-expenses/docs/sdk/models/operations/listsuppliersrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/listsuppliersrequest.md @@ -7,8 +7,6 @@ import { ListSuppliersRequest } from "@codat/sync-for-expenses/sdk/models/operat let value: ListSuppliersRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", }; diff --git a/sync-for-expenses/docs/sdk/models/operations/listsynctransactionsrequest.md b/sync-for-expenses/docs/sdk/models/operations/listsynctransactionsrequest.md index 4fa5ab96a..68662c906 100644 --- a/sync-for-expenses/docs/sdk/models/operations/listsynctransactionsrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/listsynctransactionsrequest.md @@ -8,8 +8,6 @@ import { ListSyncTransactionsRequest } from "@codat/sync-for-expenses/sdk/models let value: ListSyncTransactionsRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", syncId: "6fb40d5e-b13e-11ed-afa1-0242ac120002", - page: 1, - pageSize: 100, }; ``` diff --git a/sync-for-expenses/docs/sdk/models/operations/replacecompanyrequest.md b/sync-for-expenses/docs/sdk/models/operations/replacecompanyrequest.md new file mode 100644 index 000000000..39a5f1615 --- /dev/null +++ b/sync-for-expenses/docs/sdk/models/operations/replacecompanyrequest.md @@ -0,0 +1,18 @@ +# ReplaceCompanyRequest + +## Example Usage + +```typescript +import { ReplaceCompanyRequest } from "@codat/sync-for-expenses/sdk/models/operations"; + +let value: ReplaceCompanyRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `companyRequestBody` | [shared.CompanyRequestBody](../../../sdk/models/shared/companyrequestbody.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/operations/setcompanyconfigurationrequest.md b/sync-for-expenses/docs/sdk/models/operations/setcompanyconfigurationrequest.md index 167d527dd..08215ca95 100644 --- a/sync-for-expenses/docs/sdk/models/operations/setcompanyconfigurationrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/setcompanyconfigurationrequest.md @@ -7,13 +7,6 @@ import { SetCompanyConfigurationRequest } from "@codat/sync-for-expenses/sdk/mod let value: SetCompanyConfigurationRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - companyConfiguration: { - bankAccount: { - id: "32", - }, - supplier: {}, - customer: {}, - }, }; ``` diff --git a/sync-for-expenses/docs/sdk/models/operations/updatecompanyrequest.md b/sync-for-expenses/docs/sdk/models/operations/updatecompanyrequest.md index 81770cb34..f7f4e0ce7 100644 --- a/sync-for-expenses/docs/sdk/models/operations/updatecompanyrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/updatecompanyrequest.md @@ -7,16 +7,12 @@ import { UpdateCompanyRequest } from "@codat/sync-for-expenses/sdk/models/operat let value: UpdateCompanyRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - companyRequestBody: { - name: "Bank of Dave", - description: "Requested early access to the new financing scheme.", - }, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `companyRequestBody` | [shared.CompanyRequestBody](../../../sdk/models/shared/companyrequestbody.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `companyUpdateRequest` | [shared.CompanyUpdateRequest](../../../sdk/models/shared/companyupdaterequest.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/operations/updatecustomerrequest.md b/sync-for-expenses/docs/sdk/models/operations/updatecustomerrequest.md index 16a66fa66..44258e0e3 100644 --- a/sync-for-expenses/docs/sdk/models/operations/updatecustomerrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/updatecustomerrequest.md @@ -8,25 +8,7 @@ import { UpdateCustomerRequest } from "@codat/sync-for-expenses/sdk/models/opera let value: UpdateCustomerRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "EILBDVJVNUAGVKRQ", - customer: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - defaultCurrency: "USD", - contacts: [ - { - phone: [ - { - number: "01224 658 999", - type: "Unknown", - }, - ], - status: "Archived", - modifiedDate: "2022-10-23T00:00:00Z", - }, - ], - status: "Active", - }, + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", }; ``` @@ -36,7 +18,7 @@ let value: UpdateCustomerRequest = { | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `customerId` | *string* | :heavy_check_mark: | Unique identifier for a customer. | 13d946f0-c5d5-42bc-b092-97ece17923ab | +| `customerId` | *string* | :heavy_check_mark: | Unique identifier for a customer. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | | `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | | `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | | `forceUpdate` | *boolean* | :heavy_minus_sign: | When updating data in the destination platform Codat checks the `sourceModifiedDate` against the `lastupdated` date from the accounting software, 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. | | diff --git a/sync-for-expenses/docs/sdk/models/operations/updateexpensetransactionrequest.md b/sync-for-expenses/docs/sdk/models/operations/updateexpensetransactionrequest.md index d3a458fd5..1cd159b17 100644 --- a/sync-for-expenses/docs/sdk/models/operations/updateexpensetransactionrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/updateexpensetransactionrequest.md @@ -4,50 +4,10 @@ ```typescript import { UpdateExpenseTransactionRequest } from "@codat/sync-for-expenses/sdk/models/operations"; -import { Decimal } from "@codat/sync-for-expenses/sdk/types"; let value: UpdateExpenseTransactionRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", - updateExpenseRequest: { - type: "Payment", - issueDate: "2022-06-28T00:00:00.000Z", - currency: "GBP", - contactRef: { - id: "40e3e57c-2322-4898-966c-ca41adfd23fd", - type: "Supplier", - }, - bankAccountRef: { - id: "787dfb37-5707-4dc0-8a86-8d74e4cc78ea", - }, - merchantName: "Amazon UK", - lines: [ - { - netAmount: new Decimal("100"), - taxAmount: new Decimal("20"), - taxRateRef: { - id: "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - accountRef: { - id: "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - itemRef: { - id: "80000002-1675158984", - }, - trackingRefs: [ - { - id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", - dataType: "trackingCategories", - }, - ], - invoiceTo: { - id: "80000002-1674552702", - type: "customer", - }, - }, - ], - notes: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", - }, }; ``` diff --git a/sync-for-expenses/docs/sdk/models/operations/updatereimbursableexpensetransactionrequest.md b/sync-for-expenses/docs/sdk/models/operations/updatereimbursableexpensetransactionrequest.md index 0738a0ad7..46b059d4e 100644 --- a/sync-for-expenses/docs/sdk/models/operations/updatereimbursableexpensetransactionrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/updatereimbursableexpensetransactionrequest.md @@ -4,49 +4,10 @@ ```typescript import { UpdateReimbursableExpenseTransactionRequest } from "@codat/sync-for-expenses/sdk/models/operations"; -import { Decimal } from "@codat/sync-for-expenses/sdk/types"; let value: UpdateReimbursableExpenseTransactionRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", - updateReimbursableExpenseTransactionRequest: { - contactRef: { - id: "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - apAccountRef: { - id: "8000004C-1724173136", - }, - issueDate: "2022-10-23T00:00:00Z", - dueDate: "2022-10-23T00:00:00Z", - currency: "GBP", - notes: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", - lines: [ - { - description: "2-night hotel stay", - netAmount: new Decimal("100"), - taxAmount: new Decimal("20"), - taxRateRef: { - id: "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - accountRef: { - id: "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - itemRef: { - id: "80000002-1675158984", - }, - trackingRefs: [ - { - id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", - dataType: "trackingCategories", - }, - ], - invoiceTo: { - id: "80000002-1674552702", - type: "customer", - }, - }, - ], - }, }; ``` diff --git a/sync-for-expenses/docs/sdk/models/operations/updatesupplierrequest.md b/sync-for-expenses/docs/sdk/models/operations/updatesupplierrequest.md index c8a141f7b..e9f5b9548 100644 --- a/sync-for-expenses/docs/sdk/models/operations/updatesupplierrequest.md +++ b/sync-for-expenses/docs/sdk/models/operations/updatesupplierrequest.md @@ -9,44 +9,6 @@ let value: UpdateSupplierRequest = { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", - supplier: { - modifiedDate: "2022-10-23T00:00:00Z", - sourceModifiedDate: "2022-10-23T00:00:00Z", - id: "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", - supplierName: "Kelly's Industrial Supplies", - contactName: "Kelly's Industrial Supplies", - emailAddress: "sales@kellysupplies.com", - phone: "07999 999999", - addresses: [ - { - type: "Billing", - line1: "Unit 51", - line2: "Bakersfield Industrial Estate", - city: "Bakersfield", - region: "California", - country: "USA", - }, - ], - registrationNumber: "string", - taxNumber: "string", - status: "Unknown", - defaultCurrency: "string", - metadata: { - isDeleted: true, - }, - supplementalData: { - content: { - "property1": { - "property1": null, - "property2": null, - }, - "property2": { - "property1": null, - "property2": null, - }, - }, - }, - }, }; ``` @@ -56,7 +18,7 @@ let value: UpdateSupplierRequest = { | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `supplierId` | *string* | :heavy_check_mark: | Unique identifier for a supplier. | 13d946f0-c5d5-42bc-b092-97ece17923ab | +| `supplierId` | *string* | :heavy_check_mark: | Unique identifier for a supplier. | **Example 1:** 13d946f0-c5d5-42bc-b092-97ece17923ab
**Example 2:** 9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2
**Example 3:** 7110701885
**Example 4:** EILBDVJVNUAGVKRQ | | `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | | `allowSyncOnPushComplete` | *boolean* | :heavy_minus_sign: | Allow a sync upon push completion. | | | `forceUpdate` | *boolean* | :heavy_minus_sign: | When updating data in the destination platform Codat checks the `sourceModifiedDate` against the `lastupdated` date from the accounting software, 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. | | diff --git a/sync-for-expenses/docs/sdk/models/shared/accountingaccount.md b/sync-for-expenses/docs/sdk/models/shared/accountingaccount.md index 5dcacc626..4e964b870 100644 --- a/sync-for-expenses/docs/sdk/models/shared/accountingaccount.md +++ b/sync-for-expenses/docs/sdk/models/shared/accountingaccount.md @@ -44,7 +44,7 @@ let value: AccountingAccount = { description: "Invoices the business has issued but has not yet collected payment on.", fullyQualifiedCategory: "Asset.Current", - fullyQualifiedName: "Fixed Asset", + fullyQualifiedName: "Cash On Hand", currency: "GBP", currentBalance: new Decimal("0"), type: "Asset", @@ -56,15 +56,15 @@ let value: AccountingAccount = { | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `id` | *string* | :heavy_minus_sign: | Identifier for the account, unique for the company. | 1b6266d1-1e44-46c5-8eb5-a8f98e03124e | | `nominalCode` | *string* | :heavy_minus_sign: | Reference given to each nominal account for a business. It ensures money is allocated to the correct account. This code isn't a unique identifier in the Codat system. | 610 | | `name` | *string* | :heavy_minus_sign: | Name of the account. | Accounts Receivable | | `description` | *string* | :heavy_minus_sign: | Description for the account. | Invoices the business has issued but has not yet collected payment on. | | `fullyQualifiedCategory` | *string* | :heavy_minus_sign: | Full category of the account.

For example, `Liability.Current` or `Income.Revenue`. To determine a list of possible categories for each integration, see our examples, follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide, or refer to the integration's own documentation. | Asset.Current | -| `fullyQualifiedName` | *string* | :heavy_minus_sign: | Full name of the account, for example:
- `Cash On Hand`
- `Rents Held In Trust`
- `Fixed Asset` | Cash On Hand | -| `currency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | +| `fullyQualifiedName` | *string* | :heavy_minus_sign: | Full name of the account, for example:
- `Cash On Hand`
- `Rents Held In Trust`
- `Fixed Asset` | **Example 1:** Cash On Hand
**Example 2:** Fixed Asset | +| `currency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | | `currentBalance` | *Decimal* | :heavy_minus_sign: | Current balance in the account. | 0 | | `type` | [shared.AccountType](../../../sdk/models/shared/accounttype.md) | :heavy_minus_sign: | Type of account | Asset | | `status` | [shared.AccountStatus](../../../sdk/models/shared/accountstatus.md) | :heavy_minus_sign: | Status of the account | Active | diff --git a/sync-for-expenses/docs/sdk/models/shared/accountingaddress.md b/sync-for-expenses/docs/sdk/models/shared/accountingaddress.md index 8e1777cf4..dcd6f23b7 100644 --- a/sync-for-expenses/docs/sdk/models/shared/accountingaddress.md +++ b/sync-for-expenses/docs/sdk/models/shared/accountingaddress.md @@ -6,7 +6,7 @@ import { AccountingAddress } from "@codat/sync-for-expenses/sdk/models/shared"; let value: AccountingAddress = { - type: "Billing", + type: "Unknown", }; ``` diff --git a/sync-for-expenses/docs/sdk/models/shared/accountingaddresstype.md b/sync-for-expenses/docs/sdk/models/shared/accountingaddresstype.md index 9109c3b2d..329f374d8 100644 --- a/sync-for-expenses/docs/sdk/models/shared/accountingaddresstype.md +++ b/sync-for-expenses/docs/sdk/models/shared/accountingaddresstype.md @@ -7,7 +7,7 @@ The type of the address ```typescript import { AccountingAddressType } from "@codat/sync-for-expenses/sdk/models/shared"; -let value: AccountingAddressType = "Billing"; +let value: AccountingAddressType = "Unknown"; ``` ## Values diff --git a/sync-for-expenses/docs/sdk/models/shared/accountingbankaccount.md b/sync-for-expenses/docs/sdk/models/shared/accountingbankaccount.md index cb0d0e387..060a3e9cf 100644 --- a/sync-for-expenses/docs/sdk/models/shared/accountingbankaccount.md +++ b/sync-for-expenses/docs/sdk/models/shared/accountingbankaccount.md @@ -25,7 +25,7 @@ import { AccountingBankAccount } from "@codat/sync-for-expenses/sdk/models/share let value: AccountingBankAccount = { modifiedDate: "2022-10-23T00:00:00Z", sourceModifiedDate: "2022-10-23T00:00:00Z", - currency: "EUR", + currency: "GBP", status: "Active", }; ``` @@ -34,8 +34,8 @@ let value: AccountingBankAccount = { | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `id` | *string* | :heavy_minus_sign: | Identifier for the account, unique for the company in the accounting software. | | | `accountName` | *string* | :heavy_minus_sign: | Name of the bank account in the accounting software. | | | `accountType` | [shared.CreateBankAccountResponseBankAccountType](../../../sdk/models/shared/createbankaccountresponsebankaccounttype.md) | :heavy_minus_sign: | The type of transactions and balances on the account.
For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
For Debit accounts, positive balances are assets, and positive transactions **increase** assets. | | @@ -43,7 +43,7 @@ let value: AccountingBankAccount = { | `sortCode` | *string* | :heavy_minus_sign: | Sort code for the bank account.

Xero integrations
The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated. | | | `accountNumber` | *string* | :heavy_minus_sign: | Account number for the bank account.

Xero integrations
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.

FreeAgent integrations
For Credit accounts, only the last four digits are required. For other types, the field is optional. | | | `iBan` | *string* | :heavy_minus_sign: | International bank account number of the account. Often used when making or receiving international payments. | | -| `currency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | +| `currency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | | `balance` | *Decimal* | :heavy_minus_sign: | Balance of the bank account. | | | `institution` | *string* | :heavy_minus_sign: | The institution of the bank account. | | | `availableBalance` | *Decimal* | :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. | | diff --git a/sync-for-expenses/docs/sdk/models/shared/accountingcustomer.md b/sync-for-expenses/docs/sdk/models/shared/accountingcustomer.md index ee5ad0246..65cf569e8 100644 --- a/sync-for-expenses/docs/sdk/models/shared/accountingcustomer.md +++ b/sync-for-expenses/docs/sdk/models/shared/accountingcustomer.md @@ -17,20 +17,15 @@ import { AccountingCustomer } from "@codat/sync-for-expenses/sdk/models/shared"; let value: AccountingCustomer = { modifiedDate: "2022-10-23T00:00:00Z", sourceModifiedDate: "2022-10-23T00:00:00Z", - defaultCurrency: "EUR", + defaultCurrency: "GBP", contacts: [ { - phone: [ - { - number: "+44 25691 154789", - type: "Mobile", - }, - ], - status: "Unknown", + phone: null, + status: "Archived", modifiedDate: "2022-10-23T00:00:00Z", }, ], - status: "Archived", + status: "Active", }; ``` @@ -38,13 +33,13 @@ let value: AccountingCustomer = { | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `id` | *string* | :heavy_minus_sign: | Identifier for the customer, unique to the company in the accounting software. | | | `customerName` | *string* | :heavy_minus_sign: | Name of the customer as recorded in the accounting system, typically the company name. | | | `contactName` | *string* | :heavy_minus_sign: | Name of the main contact for the identified customer. | | | `emailAddress` | *string* | :heavy_minus_sign: | Email address the customer can be contacted by. | | -| `defaultCurrency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | +| `defaultCurrency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | | `phone` | *string* | :heavy_minus_sign: | Phone number the customer can be contacted by. | | | `addresses` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | An array of Addresses. | | | `contacts` | [shared.Contact](../../../sdk/models/shared/contact.md)[] | :heavy_minus_sign: | An array of Contacts. | | diff --git a/sync-for-expenses/docs/sdk/models/shared/accountingsupplier.md b/sync-for-expenses/docs/sdk/models/shared/accountingsupplier.md index a48d74f4e..a4a8675ee 100644 --- a/sync-for-expenses/docs/sdk/models/shared/accountingsupplier.md +++ b/sync-for-expenses/docs/sdk/models/shared/accountingsupplier.md @@ -39,12 +39,12 @@ let value: AccountingSupplier = { supplementalData: { content: { "property1": { - "property1": null, - "property2": null, + "property1": "", + "property2": "", }, "property2": { - "property1": null, - "property2": null, + "property1": "", + "property2": "", }, }, }, @@ -55,13 +55,13 @@ let value: AccountingSupplier = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `id` | *string* | :heavy_minus_sign: | Identifier for the supplier, unique to the company in the accounting software. | | | `supplierName` | *string* | :heavy_minus_sign: | Name of the supplier as recorded in the accounting system, typically the company name. | | | `contactName` | *string* | :heavy_minus_sign: | Name of the main contact for the supplier. | | | `emailAddress` | *string* | :heavy_minus_sign: | Email address that the supplier may be contacted on. | | -| `phone` | *string* | :heavy_minus_sign: | Phone number that the supplier may be contacted on. | +44 25691 154789 | +| `phone` | *string* | :heavy_minus_sign: | Phone number that the supplier may be contacted on. | **Example 1:** +44 25691 154789
**Example 2:** (877) 492-8687
**Example 3:** 01224 658 999 | | `addresses` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | An array of Addresses. | | | `registrationNumber` | *string* | :heavy_minus_sign: | Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. | | | `taxNumber` | *string* | :heavy_minus_sign: | Supplier's company tax number. | | diff --git a/sync-for-expenses/docs/sdk/models/shared/accountprototype.md b/sync-for-expenses/docs/sdk/models/shared/accountprototype.md index cc15157d9..0e92b9eca 100644 --- a/sync-for-expenses/docs/sdk/models/shared/accountprototype.md +++ b/sync-for-expenses/docs/sdk/models/shared/accountprototype.md @@ -12,8 +12,8 @@ let value: AccountPrototype = { description: "Invoices the business has issued but has not yet collected payment on.", fullyQualifiedCategory: "Asset.Current", - fullyQualifiedName: "Fixed Asset", - currency: "USD", + fullyQualifiedName: "Cash On Hand", + currency: "GBP", currentBalance: new Decimal("0"), type: "Asset", status: "Active", @@ -28,8 +28,8 @@ let value: AccountPrototype = { | `name` | *string* | :heavy_minus_sign: | Name of the account. | Accounts Receivable | | `description` | *string* | :heavy_minus_sign: | Description for the account. | Invoices the business has issued but has not yet collected payment on. | | `fullyQualifiedCategory` | *string* | :heavy_minus_sign: | Full category of the account.

For example, `Liability.Current` or `Income.Revenue`. To determine a list of possible categories for each integration, see our examples, follow our [Create, update, delete data](https://docs.codat.io/using-the-api/push) guide, or refer to the integration's own documentation. | Asset.Current | -| `fullyQualifiedName` | *string* | :heavy_minus_sign: | Full name of the account, for example:
- `Cash On Hand`
- `Rents Held In Trust`
- `Fixed Asset` | Cash On Hand | -| `currency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | +| `fullyQualifiedName` | *string* | :heavy_minus_sign: | Full name of the account, for example:
- `Cash On Hand`
- `Rents Held In Trust`
- `Fixed Asset` | **Example 1:** Cash On Hand
**Example 2:** Fixed Asset | +| `currency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | | `currentBalance` | *Decimal* | :heavy_minus_sign: | Current balance in the account. | 0 | | `type` | [shared.AccountType](../../../sdk/models/shared/accounttype.md) | :heavy_minus_sign: | Type of account | Asset | | `status` | [shared.AccountStatus](../../../sdk/models/shared/accountstatus.md) | :heavy_minus_sign: | Status of the account | Active | diff --git a/sync-for-expenses/docs/sdk/models/shared/adjustmenttransactionline.md b/sync-for-expenses/docs/sdk/models/shared/adjustmenttransactionline.md index 0c9fcd96f..e7b048d63 100644 --- a/sync-for-expenses/docs/sdk/models/shared/adjustmenttransactionline.md +++ b/sync-for-expenses/docs/sdk/models/shared/adjustmenttransactionline.md @@ -15,7 +15,6 @@ let value: AdjustmentTransactionLine = { trackingRefs: [ { id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", - dataType: "trackingCategories", }, ], invoiceTo: { diff --git a/sync-for-expenses/docs/sdk/models/shared/adjustmenttransactionrequest.md b/sync-for-expenses/docs/sdk/models/shared/adjustmenttransactionrequest.md index 91d6b8afa..9a51d7d46 100644 --- a/sync-for-expenses/docs/sdk/models/shared/adjustmenttransactionrequest.md +++ b/sync-for-expenses/docs/sdk/models/shared/adjustmenttransactionrequest.md @@ -4,31 +4,12 @@ ```typescript import { AdjustmentTransactionRequest } from "@codat/sync-for-expenses/sdk/models/shared"; -import { Decimal } from "@codat/sync-for-expenses/sdk/types"; let value: AdjustmentTransactionRequest = { - id: "dcdfc7c1-a2f8-464c-8790-999fa56b0aa3", + id: "f7aa2569-6e6f-42cc-9845-b7ae32ba9169", date: "2022-10-23T00:00:00Z", - currency: "Rupiah", - lines: [ - { - amount: new Decimal("50"), - accountRef: { - id: "40e3e57c-2322-4898-966c-ca41adfd23fd", - }, - description: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", - trackingRefs: [ - { - id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", - dataType: "trackingCategories", - }, - ], - invoiceTo: { - id: "80000002-1674552702", - type: "customer", - }, - }, - ], + currency: "Rwanda Franc", + lines: [], }; ``` @@ -37,7 +18,7 @@ let value: AdjustmentTransactionRequest = { | Field | Type | Required | Description | Example | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_check_mark: | Your unique identifier for the transaction. | | -| `date` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `date` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `currency` | *string* | :heavy_check_mark: | Currency the transaction was recorded in. | | | `currencyRate` | *Decimal* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.

It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.

Where the currency rate is provided by the underlying accounting software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.

## Examples with base currency of GBP

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (GBP) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **USD** \| $20 \| 0.781 \| £15.62 \|
\| **EUR** \| €20 \| 0.885 \| £17.70 \|
\| **RUB** \| ₽20 \| 0.011 \| £0.22 \|

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \|


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | | `reference` | *string* | :heavy_minus_sign: | User-friendly reference for the adjustment transaction. | | diff --git a/sync-for-expenses/docs/sdk/models/shared/bankaccount.md b/sync-for-expenses/docs/sdk/models/shared/bankaccount.md index ac916b4d1..271d7b9f6 100644 --- a/sync-for-expenses/docs/sdk/models/shared/bankaccount.md +++ b/sync-for-expenses/docs/sdk/models/shared/bankaccount.md @@ -23,7 +23,7 @@ import { BankAccount } from "@codat/sync-for-expenses/sdk/models/shared"; let value: BankAccount = { modifiedDate: "2022-10-23T00:00:00Z", sourceModifiedDate: "2022-10-23T00:00:00Z", - currency: "USD", + currency: "GBP", status: "Active", }; ``` @@ -32,8 +32,8 @@ let value: BankAccount = { | Field | Type | Required | Description | Example | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `id` | *string* | :heavy_minus_sign: | Identifier for the account, unique for the company in the accounting software. | | | `accountName` | *string* | :heavy_minus_sign: | Name of the bank account in the accounting software. | | | `accountType` | [shared.BankAccountType](../../../sdk/models/shared/bankaccounttype.md) | :heavy_minus_sign: | The type of transactions and balances on the account.
For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities.
For Debit accounts, positive balances are assets, and positive transactions **increase** assets. | | @@ -41,7 +41,7 @@ let value: BankAccount = { | `sortCode` | *string* | :heavy_minus_sign: | Sort code for the bank account.

Xero integrations
The sort code is only displayed when the currency = GBP and the sort code and account number sum to 14 digits. For non-GBP accounts, this field is not populated. | | | `accountNumber` | *string* | :heavy_minus_sign: | Account number for the bank account.

Xero integrations
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.

FreeAgent integrations
For Credit accounts, only the last four digits are required. For other types, the field is optional. | | | `iBan` | *string* | :heavy_minus_sign: | International bank account number of the account. Often used when making or receiving international payments. | | -| `currency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | +| `currency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | | `balance` | *Decimal* | :heavy_minus_sign: | Balance of the bank account. | | | `institution` | *string* | :heavy_minus_sign: | The institution of the bank account. | | | `availableBalance` | *Decimal* | :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. | | diff --git a/sync-for-expenses/docs/sdk/models/shared/clientratelimitreachedwebhook.md b/sync-for-expenses/docs/sdk/models/shared/clientratelimitreachedwebhook.md deleted file mode 100644 index 32e799495..000000000 --- a/sync-for-expenses/docs/sdk/models/shared/clientratelimitreachedwebhook.md +++ /dev/null @@ -1,35 +0,0 @@ -# ClientRateLimitReachedWebhook - -Webhook request body for a client that has reached their rate limit. - -## Example Usage - -```typescript -import { ClientRateLimitReachedWebhook } from "@codat/sync-for-expenses/sdk/models/shared"; - -let value: ClientRateLimitReachedWebhook = { - clientId: "bae71d36-ff47-420a-b4a6-f8c9ddf41140", - clientName: "Bank of Dave", - ruleId: "70af3071-65d9-4ec3-b3cb-5283e8d55dac", - ruleType: "Rate Limit Reached", - alertId: "a9367074-b5c3-42c4-9be4-be129f43577e", - message: - "The current daily rate limit quota of 1000 requests for bae71d36-ff47-420a-b4a6-f8c9ddf41140 has been reached.", - data: { - dailyQuota: 1000, - expiresUtc: "2023-05-03T00:00:00Z", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `clientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | -| `clientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | -| ~~`ruleId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Unique identifier for the rule. | -| `ruleType` | *string* | :heavy_minus_sign: | The type of rule. | -| `alertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | -| `message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | -| `data` | [shared.ClientRateLimitReachedWebhookData](../../../sdk/models/shared/clientratelimitreachedwebhookdata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/clientratelimitreachedwebhookdata.md b/sync-for-expenses/docs/sdk/models/shared/clientratelimitreachedwebhookdata.md deleted file mode 100644 index a728d0e8e..000000000 --- a/sync-for-expenses/docs/sdk/models/shared/clientratelimitreachedwebhookdata.md +++ /dev/null @@ -1,18 +0,0 @@ -# ClientRateLimitReachedWebhookData - -## Example Usage - -```typescript -import { ClientRateLimitReachedWebhookData } from "@codat/sync-for-expenses/sdk/models/shared"; - -let value: ClientRateLimitReachedWebhookData = { - expiresUtc: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `dailyQuota` | *number* | :heavy_minus_sign: | The number of available requests per day. | | -| `expiresUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/clientratelimitresetwebhook.md b/sync-for-expenses/docs/sdk/models/shared/clientratelimitresetwebhook.md deleted file mode 100644 index f028db776..000000000 --- a/sync-for-expenses/docs/sdk/models/shared/clientratelimitresetwebhook.md +++ /dev/null @@ -1,37 +0,0 @@ -# ClientRateLimitResetWebhook - -Webhook request body for a client that has had their rate limit reset. - -## Example Usage - -```typescript -import { ClientRateLimitResetWebhook } from "@codat/sync-for-expenses/sdk/models/shared"; - -let value: ClientRateLimitResetWebhook = { - clientId: "bae71d36-ff47-420a-b4a6-f8c9ddf41140", - clientName: "Bank of Dave", - ruleId: "70af3071-65d9-4ec3-b3cb-5283e8d55dac", - ruleType: "Rate Limit Reset", - alertId: "a9367074-b5c3-42c4-9be4-be129f43577e", - message: - "The current daily rate limit quota for client 30e0f9d2-52c0-4c9f-a806-bcd98a3bcd7e has been reset to 1000 requests.", - data: { - quotaRemaining: 1000, - resetReason: "The quota was reset because it is a new day.", - dailyQuota: 1000, - expiresUtc: "2023-05-03T00:00:00Z", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `clientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | -| `clientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | -| ~~`ruleId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Unique identifier for the rule. | -| `ruleType` | *string* | :heavy_minus_sign: | The type of rule. | -| `alertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | -| `message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | -| `data` | [shared.ClientRateLimitResetWebhookData](../../../sdk/models/shared/clientratelimitresetwebhookdata.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/clientratelimitresetwebhookdata.md b/sync-for-expenses/docs/sdk/models/shared/clientratelimitresetwebhookdata.md deleted file mode 100644 index 062d1a659..000000000 --- a/sync-for-expenses/docs/sdk/models/shared/clientratelimitresetwebhookdata.md +++ /dev/null @@ -1,20 +0,0 @@ -# ClientRateLimitResetWebhookData - -## Example Usage - -```typescript -import { ClientRateLimitResetWebhookData } from "@codat/sync-for-expenses/sdk/models/shared"; - -let value: ClientRateLimitResetWebhookData = { - expiresUtc: "2022-10-23T00:00:00Z", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `quotaRemaining` | *number* | :heavy_minus_sign: | Total number of requests remaining for your client. | | -| `resetReason` | *string* | :heavy_minus_sign: | The reason for your rate limit quota being reset. | | -| `dailyQuota` | *number* | :heavy_minus_sign: | The number of available requests per day. | | -| `expiresUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/clientratelimitwebhook.md b/sync-for-expenses/docs/sdk/models/shared/clientratelimitwebhook.md index 97994fa54..f7b31736e 100644 --- a/sync-for-expenses/docs/sdk/models/shared/clientratelimitwebhook.md +++ b/sync-for-expenses/docs/sdk/models/shared/clientratelimitwebhook.md @@ -20,6 +20,6 @@ let value: ClientRateLimitWebhook = { | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_minus_sign: | Unique identifier of the event. | 743ec94a-8aa4-44bb-8bd4-e1855ee0e74b | -| `eventType` | *string* | :heavy_minus_sign: | The type of event. | client.rateLimit.reset | -| `generatedDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `eventType` | *string* | :heavy_minus_sign: | The type of event. | **Example 1:** client.rateLimit.reset
**Example 2:** client.rateLimit.reached | +| `generatedDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `payload` | [shared.ClientRateLimitWebhookPayload](../../../sdk/models/shared/clientratelimitwebhookpayload.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/clientratelimitwebhookpayload.md b/sync-for-expenses/docs/sdk/models/shared/clientratelimitwebhookpayload.md index 79137d217..b2e4e808d 100644 --- a/sync-for-expenses/docs/sdk/models/shared/clientratelimitwebhookpayload.md +++ b/sync-for-expenses/docs/sdk/models/shared/clientratelimitwebhookpayload.md @@ -16,4 +16,4 @@ let value: ClientRateLimitWebhookPayload = { | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `dailyQuota` | *number* | :heavy_minus_sign: | The number of available requests per day. | | | `quotaRemaining` | *number* | :heavy_minus_sign: | Total number of requests remaining for your client. | | -| `expiryDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | \ No newline at end of file +| `expiryDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/company.md b/sync-for-expenses/docs/sdk/models/shared/company.md index d9f0a1acf..cd71b8f87 100644 --- a/sync-for-expenses/docs/sdk/models/shared/company.md +++ b/sync-for-expenses/docs/sdk/models/shared/company.md @@ -19,6 +19,10 @@ let value: Company = { lastSync: "2022-01-01T12:00:00.000Z", created: "2022-01-01T12:00:00.000Z", createdByUserName: "string", + products: [ + "spend-insights", + "lending", + ], tags: { "region": "us", "uid": "f6b0c253-16c7-4da1-a0c5-9c871e9c9d6c", @@ -49,8 +53,8 @@ let value: Company = { | `name` | *string* | :heavy_check_mark: | The name of the company | Codat Ltd. | | `description` | *string* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | | `redirect` | *string* | :heavy_check_mark: | The `redirect` [Link URL](https://docs.codat.io/auth-flow/authorize-hosted-link) enabling the customer to start their auth flow journey for the company. | https://link.codat.io/company/27628208-459c-46a2-a705-5641ce25f739 | -| `lastSync` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | -| `created` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `lastSync` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `created` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `createdByUserName` | *string* | :heavy_minus_sign: | Name of user that created the company in Codat. | | | `products` | *string*[] | :heavy_minus_sign: | An array of products that are currently enabled for the company. | | | `tags` | Record | :heavy_minus_sign: | A collection of user-defined key-value pairs that store custom metadata against the company. | | diff --git a/sync-for-expenses/docs/sdk/models/shared/companyinformation.md b/sync-for-expenses/docs/sdk/models/shared/companyinformation.md index 668b18986..ca591ec43 100644 --- a/sync-for-expenses/docs/sdk/models/shared/companyinformation.md +++ b/sync-for-expenses/docs/sdk/models/shared/companyinformation.md @@ -70,11 +70,11 @@ let value: CompanyInformation = { | `addresses` | [shared.AccountingAddress](../../../sdk/models/shared/accountingaddress.md)[] | :heavy_minus_sign: | An array of Addresses. | | | `phoneNumbers` | [shared.Phone](../../../sdk/models/shared/phone.md)[] | :heavy_minus_sign: | An array of phone numbers. | | | `webLinks` | [shared.Weblink](../../../sdk/models/shared/weblink.md)[] | :heavy_minus_sign: | An array of weblinks. | | -| `ledgerLockDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `ledgerLockDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `registrationNumber` | *string* | :heavy_minus_sign: | Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. | | | `taxNumber` | *string* | :heavy_minus_sign: | Company tax number. | | -| `financialYearStartDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `financialYearStartDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `baseCurrency` | *string* | :heavy_minus_sign: | Currency set in the accounting software of the linked company. Used by the currency rate. | | | `sourceUrls` | Record | :heavy_minus_sign: | URL addresses for the accounting source.

For example, for Xero integrations two URLs are returned. These have many potential use cases, such as [deep linking](https://developer.xero.com/documentation/api-guides/deep-link-xero). | | -| `createdDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `createdDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `supplementalData` | [shared.SupplementalData](../../../sdk/models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types.

It is referenced as a configured dynamic key value pair that is unique to the accounting software. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/companyinformationphonenumberstype.md b/sync-for-expenses/docs/sdk/models/shared/companyinformationphonenumberstype.md new file mode 100644 index 000000000..d3d67cf97 --- /dev/null +++ b/sync-for-expenses/docs/sdk/models/shared/companyinformationphonenumberstype.md @@ -0,0 +1,17 @@ +# CompanyInformationPhoneNumbersType + +The type of phone number + +## Example Usage + +```typescript +import { CompanyInformationPhoneNumbersType } from "@codat/sync-for-expenses/sdk/models/shared"; + +let value: CompanyInformationPhoneNumbersType = "Unknown"; +``` + +## Values + +```typescript +"Primary" | "Landline" | "Mobile" | "Fax" | "Unknown" +``` \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/companyinformationtype.md b/sync-for-expenses/docs/sdk/models/shared/companyinformationtype.md index cba3b2a03..aff62fba0 100644 --- a/sync-for-expenses/docs/sdk/models/shared/companyinformationtype.md +++ b/sync-for-expenses/docs/sdk/models/shared/companyinformationtype.md @@ -7,7 +7,7 @@ The type of the weblink. ```typescript import { CompanyInformationType } from "@codat/sync-for-expenses/sdk/models/shared"; -let value: CompanyInformationType = "Unknown"; +let value: CompanyInformationType = "Social"; ``` ## Values diff --git a/sync-for-expenses/docs/sdk/models/shared/companysyncstatus.md b/sync-for-expenses/docs/sdk/models/shared/companysyncstatus.md index d55d56b3c..babb4dbd8 100644 --- a/sync-for-expenses/docs/sdk/models/shared/companysyncstatus.md +++ b/sync-for-expenses/docs/sdk/models/shared/companysyncstatus.md @@ -9,7 +9,7 @@ let value: CompanySyncStatus = { companyId: "d4d73051-ed31-42b6-99f6-d288cd940992", syncId: "a6a22aff-a43a-411d-a910-2dae73217cce", syncStatusCode: 2000, - syncStatus: "NotStarted", + syncStatus: "Complete", syncUtc: "2022-10-23T00:00:00Z", }; ``` @@ -21,8 +21,8 @@ let value: CompanySyncStatus = { | `companyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | d4d73051-ed31-42b6-99f6-d288cd940992 | | `syncId` | *string* | :heavy_minus_sign: | Unique identifier of the sync. | a6a22aff-a43a-411d-a910-2dae73217cce | | `syncStatusCode` | *number* | :heavy_minus_sign: | Status code of the sync. | 2000 | -| `syncStatus` | *string* | :heavy_minus_sign: | Text status of the sync. | Complete | +| `syncStatus` | *string* | :heavy_minus_sign: | Text status of the sync. | **Example 1:** Complete
**Example 2:** PushError
**Example 3:** Started
**Example 4:** NotStarted
**Example 5:** Pushing | | `errorMessage` | *string* | :heavy_minus_sign: | Error message of the sync. | | | `syncExceptionMessage` | *string* | :heavy_minus_sign: | Exception message of the sync. | | -| `syncUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `syncUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `dataPushed` | *boolean* | :heavy_minus_sign: | Boolean of whether the sync resulted in data being pushed. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/companyupdaterequest.md b/sync-for-expenses/docs/sdk/models/shared/companyupdaterequest.md new file mode 100644 index 000000000..53f4afb62 --- /dev/null +++ b/sync-for-expenses/docs/sdk/models/shared/companyupdaterequest.md @@ -0,0 +1,20 @@ +# CompanyUpdateRequest + +## Example Usage + +```typescript +import { CompanyUpdateRequest } from "@codat/sync-for-expenses/sdk/models/shared"; + +let value: CompanyUpdateRequest = { + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | Name of company being connected. | Bank of Dave | +| `description` | *string* | :heavy_minus_sign: | Additional information about the company. This can be used to store foreign IDs, references, etc. | Requested early access to the new financing scheme. | +| `tags` | Record | :heavy_minus_sign: | A collection of user-defined key-value pairs that store custom metadata against the company. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/connection.md b/sync-for-expenses/docs/sdk/models/shared/connection.md index 103508740..6000360b1 100644 --- a/sync-for-expenses/docs/sdk/models/shared/connection.md +++ b/sync-for-expenses/docs/sdk/models/shared/connection.md @@ -43,7 +43,7 @@ let value: Connection = { | `platformName` | *string* | :heavy_check_mark: | Name of integration connected to company. | | | `linkUrl` | *string* | :heavy_check_mark: | The link URL your customers can use to authorize access to their business application. | https://link-api.codat.io/companies/86bd88cb-44ab-4dfb-b32f-87b19b14287f/connections/2e2eb431-c1fa-4dc9-93fa-d29781c12bcd/start | | `status` | [shared.DataConnectionStatus](../../../sdk/models/shared/dataconnectionstatus.md) | :heavy_check_mark: | The current authorization status of the data connection. | | -| `lastSync` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | -| `created` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `lastSync` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `created` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `dataConnectionErrors` | [shared.DataConnectionError](../../../sdk/models/shared/dataconnectionerror.md)[] | :heavy_minus_sign: | N/A | | -| `connectionInfo` | Record | :heavy_minus_sign: | N/A | | \ No newline at end of file +| `connectionInfo` | Record | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/contact.md b/sync-for-expenses/docs/sdk/models/shared/contact.md index a8c22e7a7..f286d1cd0 100644 --- a/sync-for-expenses/docs/sdk/models/shared/contact.md +++ b/sync-for-expenses/docs/sdk/models/shared/contact.md @@ -8,11 +8,11 @@ import { Contact } from "@codat/sync-for-expenses/sdk/models/shared"; let value: Contact = { phone: [ { - number: "(877) 492-8687", - type: "Mobile", + number: "+44 25691 154789", + type: "Landline", }, ], - status: "Archived", + status: "Unknown", modifiedDate: "2022-10-23T00:00:00Z", }; ``` @@ -26,4 +26,4 @@ let value: Contact = { | `phone` | [shared.PhoneNumberItems](../../../sdk/models/shared/phonenumberitems.md)[] | :heavy_minus_sign: | An array of Phone numbers. | | | `address` | [shared.Items](../../../sdk/models/shared/items.md) | :heavy_minus_sign: | N/A | | | `status` | [shared.CustomerStatus](../../../sdk/models/shared/customerstatus.md) | :heavy_check_mark: | Status of customer. | | -| `modifiedDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | \ No newline at end of file +| `modifiedDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/createaccountresponse.md b/sync-for-expenses/docs/sdk/models/shared/createaccountresponse.md index 322a82d84..b0420917d 100644 --- a/sync-for-expenses/docs/sdk/models/shared/createaccountresponse.md +++ b/sync-for-expenses/docs/sdk/models/shared/createaccountresponse.md @@ -4,8 +4,24 @@ ```typescript import { CreateAccountResponse } from "@codat/sync-for-expenses/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; let value: CreateAccountResponse = { + data: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "1b6266d1-1e44-46c5-8eb5-a8f98e03124e", + nominalCode: "610", + name: "Accounts Receivable", + description: + "Invoices the business has issued but has not yet collected payment on.", + fullyQualifiedCategory: "Asset.Current", + fullyQualifiedName: "Cash On Hand", + currency: "GBP", + currentBalance: new Decimal("0"), + type: "Asset", + status: "Active", + }, changes: [ { recordRef: { @@ -15,12 +31,12 @@ let value: CreateAccountResponse = { ], dataType: "invoices", companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "a4bf3999-3f7d-4b4d-a6e9-ebb8fa6904a4", + pushOperationKey: "288aa3e0-a66e-4df2-8ee4-f8a9f9cc1670", dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", requestedOnUtc: "2022-10-23T00:00:00Z", completedOnUtc: "2022-10-23T00:00:00Z", - status: "Failed", - statusCode: 305, + status: "Pending", + statusCode: 95026, }; ``` @@ -34,8 +50,8 @@ let value: CreateAccountResponse = { | `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `pushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | -| `completedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `completedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | | ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | | `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | diff --git a/sync-for-expenses/docs/sdk/models/shared/createbankaccountresponse.md b/sync-for-expenses/docs/sdk/models/shared/createbankaccountresponse.md index 13baf0b73..7205d6bae 100644 --- a/sync-for-expenses/docs/sdk/models/shared/createbankaccountresponse.md +++ b/sync-for-expenses/docs/sdk/models/shared/createbankaccountresponse.md @@ -6,6 +6,12 @@ import { CreateBankAccountResponse } from "@codat/sync-for-expenses/sdk/models/shared"; let value: CreateBankAccountResponse = { + data: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + currency: "GBP", + status: "Active", + }, changes: [ { recordRef: { @@ -15,12 +21,12 @@ let value: CreateBankAccountResponse = { ], dataType: "invoices", companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "78ef3a40-c569-4dad-94c2-fa3fb4380365", + pushOperationKey: "7022f410-4479-48de-8a8e-dbe049de7d31", dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", requestedOnUtc: "2022-10-23T00:00:00Z", completedOnUtc: "2022-10-23T00:00:00Z", - status: "TimedOut", - statusCode: 102, + status: "Failed", + statusCode: 962308, }; ``` @@ -34,8 +40,8 @@ let value: CreateBankAccountResponse = { | `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `pushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | -| `completedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `completedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | | ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | | `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | diff --git a/sync-for-expenses/docs/sdk/models/shared/createbankaccountresponsebankaccounttype.md b/sync-for-expenses/docs/sdk/models/shared/createbankaccountresponsebankaccounttype.md index f7815d35a..1b4c93f61 100644 --- a/sync-for-expenses/docs/sdk/models/shared/createbankaccountresponsebankaccounttype.md +++ b/sync-for-expenses/docs/sdk/models/shared/createbankaccountresponsebankaccounttype.md @@ -9,7 +9,7 @@ For Debit accounts, positive balances are assets, and positive transactions **in ```typescript import { CreateBankAccountResponseBankAccountType } from "@codat/sync-for-expenses/sdk/models/shared"; -let value: CreateBankAccountResponseBankAccountType = "Unknown"; +let value: CreateBankAccountResponseBankAccountType = "Debit"; ``` ## Values diff --git a/sync-for-expenses/docs/sdk/models/shared/createcustomerresponse.md b/sync-for-expenses/docs/sdk/models/shared/createcustomerresponse.md index 72a647974..9839b28b7 100644 --- a/sync-for-expenses/docs/sdk/models/shared/createcustomerresponse.md +++ b/sync-for-expenses/docs/sdk/models/shared/createcustomerresponse.md @@ -6,6 +6,19 @@ import { CreateCustomerResponse } from "@codat/sync-for-expenses/sdk/models/shared"; let value: CreateCustomerResponse = { + data: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + defaultCurrency: "GBP", + contacts: [ + { + phone: null, + status: "Archived", + modifiedDate: "2022-10-23T00:00:00Z", + }, + ], + status: "Archived", + }, changes: [ { recordRef: { @@ -15,12 +28,12 @@ let value: CreateCustomerResponse = { ], dataType: "invoices", companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "e5f3ffca-d4d9-4052-bf77-a52d3831dffe", + pushOperationKey: "45a8ae94-4cad-4e4b-8b91-b18ba2467f2e", dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", requestedOnUtc: "2022-10-23T00:00:00Z", completedOnUtc: "2022-10-23T00:00:00Z", - status: "Failed", - statusCode: 201, + status: "Success", + statusCode: 203449, }; ``` @@ -34,8 +47,8 @@ let value: CreateCustomerResponse = { | `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `pushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | -| `completedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `completedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | | ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | | `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | diff --git a/sync-for-expenses/docs/sdk/models/shared/createsupplierresponse.md b/sync-for-expenses/docs/sdk/models/shared/createsupplierresponse.md index e2a43ad5c..463bbad39 100644 --- a/sync-for-expenses/docs/sdk/models/shared/createsupplierresponse.md +++ b/sync-for-expenses/docs/sdk/models/shared/createsupplierresponse.md @@ -6,6 +6,44 @@ import { CreateSupplierResponse } from "@codat/sync-for-expenses/sdk/models/shared"; let value: CreateSupplierResponse = { + data: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", + supplierName: "Kelly's Industrial Supplies", + contactName: "Kelly's Industrial Supplies", + emailAddress: "sales@kellysupplies.com", + phone: "07999 999999", + addresses: [ + { + type: "Billing", + line1: "Unit 51", + line2: "Bakersfield Industrial Estate", + city: "Bakersfield", + region: "California", + country: "USA", + }, + ], + registrationNumber: "string", + taxNumber: "string", + status: "Unknown", + defaultCurrency: "string", + metadata: { + isDeleted: true, + }, + supplementalData: { + content: { + "property1": { + "property1": "", + "property2": "", + }, + "property2": { + "property1": "", + "property2": "", + }, + }, + }, + }, changes: [ { recordRef: { @@ -15,12 +53,12 @@ let value: CreateSupplierResponse = { ], dataType: "invoices", companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "688a426f-2e87-4e7b-b6eb-b5ca32cf79d7", + pushOperationKey: "5f97f72b-e5f2-4a73-8ae8-a9449b63f872", dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", requestedOnUtc: "2022-10-23T00:00:00Z", completedOnUtc: "2022-10-23T00:00:00Z", status: "TimedOut", - statusCode: 501, + statusCode: 979635, }; ``` @@ -34,8 +72,8 @@ let value: CreateSupplierResponse = { | `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `pushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | -| `completedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `completedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | | ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | | `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | diff --git a/sync-for-expenses/docs/sdk/models/shared/customer.md b/sync-for-expenses/docs/sdk/models/shared/customer.md index cd9e8ee49..18c747e2b 100644 --- a/sync-for-expenses/docs/sdk/models/shared/customer.md +++ b/sync-for-expenses/docs/sdk/models/shared/customer.md @@ -15,15 +15,10 @@ import { Customer } from "@codat/sync-for-expenses/sdk/models/shared"; let value: Customer = { modifiedDate: "2022-10-23T00:00:00Z", sourceModifiedDate: "2022-10-23T00:00:00Z", - defaultCurrency: "USD", + defaultCurrency: "GBP", contacts: [ { - phone: [ - { - number: "(877) 492-8687", - type: "Unknown", - }, - ], + phone: null, status: "Archived", modifiedDate: "2022-10-23T00:00:00Z", }, @@ -36,13 +31,13 @@ let value: Customer = { | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `id` | *string* | :heavy_minus_sign: | Identifier for the customer, unique to the company in the accounting software. | | | `customerName` | *string* | :heavy_minus_sign: | Name of the customer as recorded in the accounting system, typically the company name. | | | `contactName` | *string* | :heavy_minus_sign: | Name of the main contact for the identified customer. | | | `emailAddress` | *string* | :heavy_minus_sign: | Email address the customer can be contacted by. | | -| `defaultCurrency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | +| `defaultCurrency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | | `phone` | *string* | :heavy_minus_sign: | Phone number the customer can be contacted by. | | | `addresses` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | An array of Addresses. | | | `contacts` | [shared.Contact](../../../sdk/models/shared/contact.md)[] | :heavy_minus_sign: | An array of Contacts. | | diff --git a/sync-for-expenses/docs/sdk/models/shared/dataconnectionerror.md b/sync-for-expenses/docs/sdk/models/shared/dataconnectionerror.md index eb3a9576d..d61074d99 100644 --- a/sync-for-expenses/docs/sdk/models/shared/dataconnectionerror.md +++ b/sync-for-expenses/docs/sdk/models/shared/dataconnectionerror.md @@ -18,6 +18,6 @@ let value: DataConnectionError = { | `statusCode` | *string* | :heavy_minus_sign: | The HTTP status code returned by the source platform when the error occurred. | | | `statusText` | *string* | :heavy_minus_sign: | A non-numeric status code/text returned by the source platform when the error occurred. | | | `errorMessage` | *string* | :heavy_minus_sign: | A message about a error returned by Codat. | | -| `erroredOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `erroredOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `status` | [shared.ErrorStatus](../../../sdk/models/shared/errorstatus.md) | :heavy_minus_sign: | The current status of a transient error. Null statuses indicate that the error is not transient. | | -| `resolvedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | \ No newline at end of file +| `resolvedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/dataconnectionstatus.md b/sync-for-expenses/docs/sdk/models/shared/dataconnectionstatus.md index d03aa2387..cb907c671 100644 --- a/sync-for-expenses/docs/sdk/models/shared/dataconnectionstatus.md +++ b/sync-for-expenses/docs/sdk/models/shared/dataconnectionstatus.md @@ -7,7 +7,7 @@ The current authorization status of the data connection. ```typescript import { DataConnectionStatus } from "@codat/sync-for-expenses/sdk/models/shared"; -let value: DataConnectionStatus = "Unlinked"; +let value: DataConnectionStatus = "Deauthorized"; ``` ## Values diff --git a/sync-for-expenses/docs/sdk/models/shared/datasetstatus.md b/sync-for-expenses/docs/sdk/models/shared/datasetstatus.md index 2ae3ac00e..7969d3316 100644 --- a/sync-for-expenses/docs/sdk/models/shared/datasetstatus.md +++ b/sync-for-expenses/docs/sdk/models/shared/datasetstatus.md @@ -7,7 +7,7 @@ The current status of the dataset. ```typescript import { DatasetStatus } from "@codat/sync-for-expenses/sdk/models/shared"; -let value: DatasetStatus = "Complete"; +let value: DatasetStatus = "RateLimitError"; ``` ## Values diff --git a/sync-for-expenses/docs/sdk/models/shared/datastatus.md b/sync-for-expenses/docs/sdk/models/shared/datastatus.md index 9fa80e78d..23cfe858a 100644 --- a/sync-for-expenses/docs/sdk/models/shared/datastatus.md +++ b/sync-for-expenses/docs/sdk/models/shared/datastatus.md @@ -8,9 +8,9 @@ Describes the state of data in the Codat cache for a company and data type import { DataStatus } from "@codat/sync-for-expenses/sdk/models/shared"; let value: DataStatus = { - dataType: "chartOfAccounts", + dataType: "itemReceipts", lastSuccessfulSync: "2022-01-01T13:00:00.000Z", - currentStatus: "MapQueued", + currentStatus: "Processing", latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", }; @@ -21,7 +21,7 @@ let value: DataStatus = { | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `dataType` | [shared.DataTypes](../../../sdk/models/shared/datatypes.md) | :heavy_check_mark: | Available data types | invoices | -| `lastSuccessfulSync` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `lastSuccessfulSync` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `currentStatus` | [shared.Status](../../../sdk/models/shared/status.md) | :heavy_check_mark: | The current status of the dataset. | | | `latestSyncId` | *string* | :heavy_minus_sign: | Unique identifier for most recent sync of data type. | ad474a37-2003-478e-baee-9af9f1ec2fe3 | | `latestSuccessfulSyncId` | *string* | :heavy_minus_sign: | Unique identifier for the most recent successful sync of data type. | 8220fc90-55b6-47bc-9417-48ac6ea93101 | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/expensecontactref.md b/sync-for-expenses/docs/sdk/models/shared/expensecontactref.md index cb7b5a410..482ec9a63 100644 --- a/sync-for-expenses/docs/sdk/models/shared/expensecontactref.md +++ b/sync-for-expenses/docs/sdk/models/shared/expensecontactref.md @@ -7,7 +7,6 @@ import { ExpenseContactRef } from "@codat/sync-for-expenses/sdk/models/shared"; let value: ExpenseContactRef = { id: "40e3e57c-2322-4898-966c-ca41adfd23fd", - type: "Supplier", }; ``` diff --git a/sync-for-expenses/docs/sdk/models/shared/expensessyncwebhook.md b/sync-for-expenses/docs/sdk/models/shared/expensessyncwebhook.md index 3fb3f6f65..6ad920275 100644 --- a/sync-for-expenses/docs/sdk/models/shared/expensessyncwebhook.md +++ b/sync-for-expenses/docs/sdk/models/shared/expensessyncwebhook.md @@ -7,7 +7,7 @@ import { ExpensesSyncWebhook } from "@codat/sync-for-expenses/sdk/models/shared" let value: ExpensesSyncWebhook = { id: "ba29118f-5406-4e59-b05c-ba307ca38d01", - eventType: "expenses.sync.unsuccessful", + eventType: "expenses.sync.successful", generatedDate: "2022-10-23T00:00:00Z", payload: { referenceCompany: { @@ -24,6 +24,6 @@ let value: ExpensesSyncWebhook = { | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_minus_sign: | Unique identifier of the event. | ba29118f-5406-4e59-b05c-ba307ca38d01 | -| `eventType` | *string* | :heavy_minus_sign: | The type of event. | expenses.sync.successful | -| `generatedDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `eventType` | *string* | :heavy_minus_sign: | The type of event. | **Example 1:** expenses.sync.successful
**Example 2:** expenses.sync.unsuccessful | +| `generatedDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `payload` | [shared.ExpensesSyncWebhookPayload](../../../sdk/models/shared/expensessyncwebhookpayload.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/expensetransaction.md b/sync-for-expenses/docs/sdk/models/shared/expensetransaction.md index 0dc2d25b7..3cc7436d3 100644 --- a/sync-for-expenses/docs/sdk/models/shared/expensetransaction.md +++ b/sync-for-expenses/docs/sdk/models/shared/expensetransaction.md @@ -14,7 +14,6 @@ let value: ExpenseTransaction = { currencyRate: new Decimal("1"), contactRef: { id: "430", - type: "Supplier", }, bankAccountRef: { id: "97", @@ -34,9 +33,7 @@ let value: ExpenseTransaction = { { id: "DEPARTMENT_3", }, - { - dataType: "trackingCategories", - }, + {}, ], invoiceTo: { id: "504", @@ -54,7 +51,7 @@ let value: ExpenseTransaction = { | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `id` | *string* | :heavy_check_mark: | Your unique identifier for the transaction. | 4d7c6929-7770-412b-91bb-44d3bc71d111 | | `type` | [shared.Type](../../../sdk/models/shared/type.md) | :heavy_check_mark: | The type of transaction. | Payment | -| `issueDate` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `issueDate` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `currency` | *string* | :heavy_check_mark: | Currency the transaction was recorded in. | GBP | | `currencyRate` | *Decimal* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.

It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.

Where the currency rate is provided by the underlying accounting software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.

## Examples with base currency of GBP

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (GBP) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **USD** \| $20 \| 0.781 \| £15.62 \|
\| **EUR** \| €20 \| 0.885 \| £17.70 \|
\| **RUB** \| ₽20 \| 0.011 \| £0.22 \|

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \|


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | | `contactRef` | [shared.ExpenseContactRef](../../../sdk/models/shared/expensecontactref.md) | :heavy_minus_sign: | N/A | | diff --git a/sync-for-expenses/docs/sdk/models/shared/expensetransactionline.md b/sync-for-expenses/docs/sdk/models/shared/expensetransactionline.md index 43f04519d..483a5a4fb 100644 --- a/sync-for-expenses/docs/sdk/models/shared/expensetransactionline.md +++ b/sync-for-expenses/docs/sdk/models/shared/expensetransactionline.md @@ -21,7 +21,6 @@ let value: ExpenseTransactionLine = { trackingRefs: [ { id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", - dataType: "trackingCategories", }, ], invoiceTo: { diff --git a/sync-for-expenses/docs/sdk/models/shared/from.md b/sync-for-expenses/docs/sdk/models/shared/from.md index 137effb01..02c04adb2 100644 --- a/sync-for-expenses/docs/sdk/models/shared/from.md +++ b/sync-for-expenses/docs/sdk/models/shared/from.md @@ -10,7 +10,7 @@ let value: From = { accountRef: { id: "", }, - amount: new Decimal("5680.45"), + amount: new Decimal("5875.77"), }; ``` diff --git a/sync-for-expenses/docs/sdk/models/shared/items.md b/sync-for-expenses/docs/sdk/models/shared/items.md index c23731013..3fd970a9f 100644 --- a/sync-for-expenses/docs/sdk/models/shared/items.md +++ b/sync-for-expenses/docs/sdk/models/shared/items.md @@ -6,7 +6,7 @@ import { Items } from "@codat/sync-for-expenses/sdk/models/shared"; let value: Items = { - type: "Unknown", + type: "Billing", }; ``` diff --git a/sync-for-expenses/docs/sdk/models/shared/phonenumbertype.md b/sync-for-expenses/docs/sdk/models/shared/itemstype.md similarity index 51% rename from sync-for-expenses/docs/sdk/models/shared/phonenumbertype.md rename to sync-for-expenses/docs/sdk/models/shared/itemstype.md index b76974fcb..a29cdee3c 100644 --- a/sync-for-expenses/docs/sdk/models/shared/phonenumbertype.md +++ b/sync-for-expenses/docs/sdk/models/shared/itemstype.md @@ -1,13 +1,13 @@ -# PhoneNumberType +# ItemsType The type of phone number ## Example Usage ```typescript -import { PhoneNumberType } from "@codat/sync-for-expenses/sdk/models/shared"; +import { ItemsType } from "@codat/sync-for-expenses/sdk/models/shared"; -let value: PhoneNumberType = "Unknown"; +let value: ItemsType = "Primary"; ``` ## Values diff --git a/sync-for-expenses/docs/sdk/models/shared/mappingoptions.md b/sync-for-expenses/docs/sdk/models/shared/mappingoptions.md index 7d5ed8dc4..ac6605cbc 100644 --- a/sync-for-expenses/docs/sdk/models/shared/mappingoptions.md +++ b/sync-for-expenses/docs/sdk/models/shared/mappingoptions.md @@ -4,7 +4,6 @@ ```typescript import { MappingOptions } from "@codat/sync-for-expenses/sdk/models/shared"; -import { Decimal } from "@codat/sync-for-expenses/sdk/types"; let value: MappingOptions = { expenseProvider: "Partner Expense", @@ -31,18 +30,7 @@ let value: MappingOptions = { parentId: "DEPARTMENTS", }, ], - taxRates: [ - { - id: "23_Bills", - name: "20% Bill tax Bills", - code: "20% Bill tax", - effectiveTaxRate: new Decimal("20"), - totalTaxRate: new Decimal("20"), - validTransactionTypes: [ - "Payment", - ], - }, - ], + taxRates: null, }; ``` diff --git a/sync-for-expenses/docs/sdk/models/shared/phone.md b/sync-for-expenses/docs/sdk/models/shared/phone.md index c635cedcd..0a84604d8 100644 --- a/sync-for-expenses/docs/sdk/models/shared/phone.md +++ b/sync-for-expenses/docs/sdk/models/shared/phone.md @@ -6,14 +6,14 @@ import { Phone } from "@codat/sync-for-expenses/sdk/models/shared"; let value: Phone = { - number: "(877) 492-8687", - type: "Mobile", + number: "+44 25691 154789", + type: "Unknown", }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `number` | *string* | :heavy_minus_sign: | A phone number. | +44 25691 154789 | -| `type` | [shared.PhoneNumberType](../../../sdk/models/shared/phonenumbertype.md) | :heavy_check_mark: | The type of phone number | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | +| `number` | *string* | :heavy_minus_sign: | A phone number. | **Example 1:** +44 25691 154789
**Example 2:** (877) 492-8687
**Example 3:** 01224 658 999 | +| `type` | [shared.CompanyInformationPhoneNumbersType](../../../sdk/models/shared/companyinformationphonenumberstype.md) | :heavy_check_mark: | The type of phone number | | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/phonenumberitems.md b/sync-for-expenses/docs/sdk/models/shared/phonenumberitems.md index f66d098bb..b1cb36981 100644 --- a/sync-for-expenses/docs/sdk/models/shared/phonenumberitems.md +++ b/sync-for-expenses/docs/sdk/models/shared/phonenumberitems.md @@ -13,7 +13,7 @@ let value: PhoneNumberItems = { ## Fields -| Field | Type | Required | Description | Example | -| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | -| `number` | *string* | :heavy_minus_sign: | A phone number. | +44 25691 154789 | -| `type` | [shared.PhoneNumberType](../../../sdk/models/shared/phonenumbertype.md) | :heavy_check_mark: | The type of phone number | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | +| `number` | *string* | :heavy_minus_sign: | A phone number. | **Example 1:** +44 25691 154789
**Example 2:** (877) 492-8687
**Example 3:** 01224 658 999 | +| `type` | [shared.ItemsType](../../../sdk/models/shared/itemstype.md) | :heavy_check_mark: | The type of phone number | | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/pulloperation.md b/sync-for-expenses/docs/sdk/models/shared/pulloperation.md index db14db393..e5e1041df 100644 --- a/sync-for-expenses/docs/sdk/models/shared/pulloperation.md +++ b/sync-for-expenses/docs/sdk/models/shared/pulloperation.md @@ -33,8 +33,8 @@ let value: PullOperation = { | `status` | [shared.DatasetStatus](../../../sdk/models/shared/datasetstatus.md) | :heavy_check_mark: | The current status of the dataset. | | | `statusDescription` | *string* | :heavy_minus_sign: | Additional information about the dataset status. | Paused until 2022-10-23T00:00:00.000Z | | `errorMessage` | *string* | :heavy_minus_sign: | A message about a transient or persistent error returned by Codat or the source platform. | | -| `requested` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | -| `completed` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `requested` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `completed` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `progress` | *number* | :heavy_check_mark: | An integer signifying the progress of the pull operation. | | | `isCompleted` | *boolean* | :heavy_check_mark: | `True` if the pull operation is completed successfully. The `isCompleted` property is not queryable. To filter failed pull operations, query by `status!=Complete&&status!=NotSupported` instead. | | | `isErrored` | *boolean* | :heavy_check_mark: | `True` if the pull operation entered an error state. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/pushchangetype.md b/sync-for-expenses/docs/sdk/models/shared/pushchangetype.md index 04f7083e0..8da3b1788 100644 --- a/sync-for-expenses/docs/sdk/models/shared/pushchangetype.md +++ b/sync-for-expenses/docs/sdk/models/shared/pushchangetype.md @@ -7,7 +7,7 @@ Type of change being applied to record in third party platform. ```typescript import { PushChangeType } from "@codat/sync-for-expenses/sdk/models/shared"; -let value: PushChangeType = "Unknown"; +let value: PushChangeType = "Created"; ``` ## Values diff --git a/sync-for-expenses/docs/sdk/models/shared/pushoperation.md b/sync-for-expenses/docs/sdk/models/shared/pushoperation.md index ed4f044b0..6acec032a 100644 --- a/sync-for-expenses/docs/sdk/models/shared/pushoperation.md +++ b/sync-for-expenses/docs/sdk/models/shared/pushoperation.md @@ -6,21 +6,15 @@ import { PushOperation } from "@codat/sync-for-expenses/sdk/models/shared"; let value: PushOperation = { - changes: [ - { - recordRef: { - dataType: "invoices", - }, - }, - ], + changes: null, dataType: "invoices", companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "7321a235-d1d1-4f7f-a9b0-4141561b9481", + pushOperationKey: "9c39f707-db6c-421b-b270-d82fde811810", dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", requestedOnUtc: "2022-10-23T00:00:00Z", completedOnUtc: "2022-10-23T00:00:00Z", - status: "Success", - statusCode: 102, + status: "Failed", + statusCode: 143409, }; ``` @@ -33,8 +27,8 @@ let value: PushOperation = { | `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `pushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | -| `completedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `completedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | | ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | | `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | diff --git a/sync-for-expenses/docs/sdk/models/shared/pushoption.md b/sync-for-expenses/docs/sdk/models/shared/pushoption.md index 8584f7b72..a450a2463 100644 --- a/sync-for-expenses/docs/sdk/models/shared/pushoption.md +++ b/sync-for-expenses/docs/sdk/models/shared/pushoption.md @@ -6,8 +6,8 @@ import { PushOption } from "@codat/sync-for-expenses/sdk/models/shared"; let value: PushOption = { - type: "DateTime", - displayName: "Holden89", + type: "MultiPart", + displayName: "Travis.Ebert-Fahey", required: false, }; ``` diff --git a/sync-for-expenses/docs/sdk/models/shared/pushoptionproperty.md b/sync-for-expenses/docs/sdk/models/shared/pushoptionproperty.md index 5a9feb690..6595312ab 100644 --- a/sync-for-expenses/docs/sdk/models/shared/pushoptionproperty.md +++ b/sync-for-expenses/docs/sdk/models/shared/pushoptionproperty.md @@ -7,9 +7,10 @@ import { PushOptionProperty } from "@codat/sync-for-expenses/sdk/models/shared"; let value: PushOptionProperty = { type: "Array", - displayName: "Tevin.Zulauf86", - description: "ha intensely settle pluck shallow meh instead", - required: false, + displayName: "Fannie10", + description: + "sonar very sympathetically notwithstanding alarmed modulo grizzled", + required: true, }; ``` diff --git a/sync-for-expenses/docs/sdk/models/shared/reimbursableexpensetransaction.md b/sync-for-expenses/docs/sdk/models/shared/reimbursableexpensetransaction.md index 6fe687b5f..ec64c9002 100644 --- a/sync-for-expenses/docs/sdk/models/shared/reimbursableexpensetransaction.md +++ b/sync-for-expenses/docs/sdk/models/shared/reimbursableexpensetransaction.md @@ -35,7 +35,6 @@ let value: ReimbursableExpenseTransaction = { trackingRefs: [ { id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", - dataType: "trackingCategories", }, ], invoiceTo: { @@ -55,8 +54,8 @@ let value: ReimbursableExpenseTransaction = { | `reference` | *string* | :heavy_minus_sign: | User-friendly reference for the reimbursable expense. | | | `contactRef` | [shared.ReimbursementContactRef](../../../sdk/models/shared/reimbursementcontactref.md) | :heavy_check_mark: | N/A | | | `apAccountRef` | [shared.ApAccountRef](../../../sdk/models/shared/apaccountref.md) | :heavy_minus_sign: | N/A | | -| `issueDate` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | -| `dueDate` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `issueDate` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `dueDate` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `currency` | *string* | :heavy_check_mark: | Currency the transaction was recorded in. | GBP | | `currencyRate` | *Decimal* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.

It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.

Where the currency rate is provided by the underlying accounting software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.

## Examples with base currency of GBP

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (GBP) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **USD** \| $20 \| 0.781 \| £15.62 \|
\| **EUR** \| €20 \| 0.885 \| £17.70 \|
\| **RUB** \| ₽20 \| 0.011 \| £0.22 \|

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \|


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | | `notes` | *string* | :heavy_minus_sign: | Any private, company notes about the transaction. | APPLE.COM/BILL - 09001077498 - Card Ending: 4590 | diff --git a/sync-for-expenses/docs/sdk/models/shared/reimbursableexpensetransactionline.md b/sync-for-expenses/docs/sdk/models/shared/reimbursableexpensetransactionline.md index 177e759ab..19c0bf57f 100644 --- a/sync-for-expenses/docs/sdk/models/shared/reimbursableexpensetransactionline.md +++ b/sync-for-expenses/docs/sdk/models/shared/reimbursableexpensetransactionline.md @@ -16,13 +16,10 @@ let value: ReimbursableExpenseTransactionLine = { accountRef: { id: "40e3e57c-2322-4898-966c-ca41adfd23fd", }, - itemRef: { - id: "80000002-1675158984", - }, + itemRef: null, trackingRefs: [ { id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", - dataType: "trackingCategories", }, ], invoiceTo: { diff --git a/sync-for-expenses/docs/sdk/models/shared/supplier.md b/sync-for-expenses/docs/sdk/models/shared/supplier.md index 447d76e0b..31b15ef0c 100644 --- a/sync-for-expenses/docs/sdk/models/shared/supplier.md +++ b/sync-for-expenses/docs/sdk/models/shared/supplier.md @@ -37,12 +37,12 @@ let value: Supplier = { supplementalData: { content: { "property1": { - "property1": null, - "property2": null, + "property1": "", + "property2": "", }, "property2": { - "property1": null, - "property2": null, + "property1": "", + "property2": "", }, }, }, @@ -53,13 +53,13 @@ let value: Supplier = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `id` | *string* | :heavy_minus_sign: | Identifier for the supplier, unique to the company in the accounting software. | | | `supplierName` | *string* | :heavy_minus_sign: | Name of the supplier as recorded in the accounting system, typically the company name. | | | `contactName` | *string* | :heavy_minus_sign: | Name of the main contact for the supplier. | | | `emailAddress` | *string* | :heavy_minus_sign: | Email address that the supplier may be contacted on. | | -| `phone` | *string* | :heavy_minus_sign: | Phone number that the supplier may be contacted on. | +44 25691 154789 | +| `phone` | *string* | :heavy_minus_sign: | Phone number that the supplier may be contacted on. | **Example 1:** +44 25691 154789
**Example 2:** (877) 492-8687
**Example 3:** 01224 658 999 | | `addresses` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | An array of Addresses. | | | `registrationNumber` | *string* | :heavy_minus_sign: | Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. | | | `taxNumber` | *string* | :heavy_minus_sign: | Supplier's company tax number. | | diff --git a/sync-for-expenses/docs/sdk/models/shared/supplierstatus.md b/sync-for-expenses/docs/sdk/models/shared/supplierstatus.md index a2db54731..bae8b941d 100644 --- a/sync-for-expenses/docs/sdk/models/shared/supplierstatus.md +++ b/sync-for-expenses/docs/sdk/models/shared/supplierstatus.md @@ -7,7 +7,7 @@ Status of the supplier. ```typescript import { SupplierStatus } from "@codat/sync-for-expenses/sdk/models/shared"; -let value: SupplierStatus = "Unknown"; +let value: SupplierStatus = "Archived"; ``` ## Values diff --git a/sync-for-expenses/docs/sdk/models/shared/synccompletewebhook.md b/sync-for-expenses/docs/sdk/models/shared/synccompletewebhook.md deleted file mode 100644 index e676e4e40..000000000 --- a/sync-for-expenses/docs/sdk/models/shared/synccompletewebhook.md +++ /dev/null @@ -1,37 +0,0 @@ -# SyncCompleteWebhook - -Webhook request body used to notify that a sync has completed. - -## Example Usage - -```typescript -import { SyncCompleteWebhook } from "@codat/sync-for-expenses/sdk/models/shared"; - -let value: SyncCompleteWebhook = { - clientId: "30e0f9d2-52c0-4c9f-a806-bcd98a3bcd7e", - clientName: "Expense Sync", - companyId: "1f9559e7-8368-48c9-bdf4-f158e16b8b85", - ruleId: "5c27631d-3b63-4b50-8228-ee502fd113eb", - ruleType: "Sync Completed", - alertId: "33a4f8e9-09ae-4334-9b00-7bbe83024672", - message: - "Sync 321363b4-efa9-4fbc-b71c-0b58d62f3248 for company 1f9559e7-8368-48c9-bdf4-f158e16b8b85 of type Expense completed successfully.", - data: { - syncId: "321363b4-efa9-4fbc-b71c-0b58d62f3248", - syncType: "Expense", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `clientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | -| `clientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | | -| `companyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| ~~`ruleId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Unique identifier for the rule. | | -| `ruleType` | *string* | :heavy_minus_sign: | The type of rule. | | -| `alertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | | -| `message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | | -| `data` | [shared.SyncCompleteWebhookData](../../../sdk/models/shared/synccompletewebhookdata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/synccompletewebhookdata.md b/sync-for-expenses/docs/sdk/models/shared/synccompletewebhookdata.md deleted file mode 100644 index db79d1041..000000000 --- a/sync-for-expenses/docs/sdk/models/shared/synccompletewebhookdata.md +++ /dev/null @@ -1,18 +0,0 @@ -# SyncCompleteWebhookData - -## Example Usage - -```typescript -import { SyncCompleteWebhookData } from "@codat/sync-for-expenses/sdk/models/shared"; - -let value: SyncCompleteWebhookData = { - syncId: "a9367074-b5c3-42c4-9be4-be129f43577e", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `syncId` | *string* | :heavy_minus_sign: | Unique identifier for the failed sync. | a9367074-b5c3-42c4-9be4-be129f43577e | -| `syncType` | *string* | :heavy_minus_sign: | The type of sync being performed. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/syncfailedwebhook.md b/sync-for-expenses/docs/sdk/models/shared/syncfailedwebhook.md deleted file mode 100644 index d2a81c8ce..000000000 --- a/sync-for-expenses/docs/sdk/models/shared/syncfailedwebhook.md +++ /dev/null @@ -1,38 +0,0 @@ -# SyncFailedWebhook - -Webhook request body used to notify that a sync has failed. - -## Example Usage - -```typescript -import { SyncFailedWebhook } from "@codat/sync-for-expenses/sdk/models/shared"; - -let value: SyncFailedWebhook = { - clientId: "30e0f9d2-52c0-4c9f-a806-bcd98a3bcd7e", - clientName: "Expense Sync", - companyId: "1f9559e7-8368-48c9-bdf4-f158e16b8b85", - ruleId: "289c80dc-2aee-4b71-afff-9acd8d051080", - ruleType: "Sync Failed", - alertId: "72c1103b-7f17-4a3a-8db5-67c2d360a516", - message: - "Sync 3bead2a1-1b3d-4d90-8077-cddc5ca68b01 for company 1f9559e7-8368-48c9-bdf4-f158e16b8b85 of type Expense has failed at step Pushing.", - data: { - syncId: "3bead2a1-1b3d-4d90-8077-cddc5ca68b01", - syncType: "Expense", - failureStage: "Pushing", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `clientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | | -| `clientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | | -| `companyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| ~~`ruleId`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Unique identifier for the rule. | | -| `ruleType` | *string* | :heavy_minus_sign: | The type of rule. | | -| `alertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | | -| `message` | *string* | :heavy_minus_sign: | A human-readable message about the webhook. | | -| `data` | [shared.SyncFailedWebhookData](../../../sdk/models/shared/syncfailedwebhookdata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/syncfailedwebhookdata.md b/sync-for-expenses/docs/sdk/models/shared/syncfailedwebhookdata.md deleted file mode 100644 index 3229424c6..000000000 --- a/sync-for-expenses/docs/sdk/models/shared/syncfailedwebhookdata.md +++ /dev/null @@ -1,19 +0,0 @@ -# SyncFailedWebhookData - -## Example Usage - -```typescript -import { SyncFailedWebhookData } from "@codat/sync-for-expenses/sdk/models/shared"; - -let value: SyncFailedWebhookData = { - syncId: "a9367074-b5c3-42c4-9be4-be129f43577e", -}; -``` - -## Fields - -| Field | Type | Required | Description | Example | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -------------------------------------- | -| `syncId` | *string* | :heavy_minus_sign: | Unique identifier for the failed sync. | a9367074-b5c3-42c4-9be4-be129f43577e | -| `syncType` | *string* | :heavy_minus_sign: | The type of sync being performed. | | -| `failureStage` | *string* | :heavy_minus_sign: | The stage of the job the sync failed. | | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/to.md b/sync-for-expenses/docs/sdk/models/shared/to.md index 273f5b4b5..be0c84690 100644 --- a/sync-for-expenses/docs/sdk/models/shared/to.md +++ b/sync-for-expenses/docs/sdk/models/shared/to.md @@ -10,7 +10,7 @@ let value: To = { accountRef: { id: "", }, - amount: new Decimal("9255.97"), + amount: new Decimal("512.02"), }; ``` diff --git a/sync-for-expenses/docs/sdk/models/shared/trackingref.md b/sync-for-expenses/docs/sdk/models/shared/trackingref.md index a8d43be48..0b7429518 100644 --- a/sync-for-expenses/docs/sdk/models/shared/trackingref.md +++ b/sync-for-expenses/docs/sdk/models/shared/trackingref.md @@ -7,7 +7,6 @@ import { TrackingRef } from "@codat/sync-for-expenses/sdk/models/shared"; let value: TrackingRef = { id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", - dataType: "trackingCategories", }; ``` diff --git a/sync-for-expenses/docs/sdk/models/shared/trackingrefadjustmenttransaction.md b/sync-for-expenses/docs/sdk/models/shared/trackingrefadjustmenttransaction.md index c5cdbbe0a..085c0d045 100644 --- a/sync-for-expenses/docs/sdk/models/shared/trackingrefadjustmenttransaction.md +++ b/sync-for-expenses/docs/sdk/models/shared/trackingrefadjustmenttransaction.md @@ -7,7 +7,6 @@ import { TrackingRefAdjustmentTransaction } from "@codat/sync-for-expenses/sdk/m let value: TrackingRefAdjustmentTransaction = { id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", - dataType: "trackingCategories", }; ``` diff --git a/sync-for-expenses/docs/sdk/models/shared/transaction.md b/sync-for-expenses/docs/sdk/models/shared/transaction.md index ffd3d32aa..eef052c21 100644 --- a/sync-for-expenses/docs/sdk/models/shared/transaction.md +++ b/sync-for-expenses/docs/sdk/models/shared/transaction.md @@ -8,7 +8,6 @@ import { Transaction } from "@codat/sync-for-expenses/sdk/models/shared"; let value: Transaction = { transactionId: "aa02271d-ed5f-47f5-be76-778d5905225a", status: "Completed", - integrationType: "expenses", }; ``` diff --git a/sync-for-expenses/docs/sdk/models/shared/transactionstatus1.md b/sync-for-expenses/docs/sdk/models/shared/transactionstatus1.md index 0d5fc6a78..b988f771f 100644 --- a/sync-for-expenses/docs/sdk/models/shared/transactionstatus1.md +++ b/sync-for-expenses/docs/sdk/models/shared/transactionstatus1.md @@ -7,7 +7,7 @@ Status of transaction. ```typescript import { TransactionStatus1 } from "@codat/sync-for-expenses/sdk/models/shared"; -let value: TransactionStatus1 = "Pending"; +let value: TransactionStatus1 = "PushError"; ``` ## Values diff --git a/sync-for-expenses/docs/sdk/models/shared/transfertransactionrequest.md b/sync-for-expenses/docs/sdk/models/shared/transfertransactionrequest.md index ab4ca9911..2a745159e 100644 --- a/sync-for-expenses/docs/sdk/models/shared/transfertransactionrequest.md +++ b/sync-for-expenses/docs/sdk/models/shared/transfertransactionrequest.md @@ -13,22 +13,22 @@ let value: TransferTransactionRequest = { accountRef: { id: "", }, - amount: new Decimal("871.29"), + amount: new Decimal("2003.32"), }, to: { accountRef: { id: "", }, - amount: new Decimal("202.18"), + amount: new Decimal("625.97"), }, }; ``` ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `description` | *string* | :heavy_minus_sign: | Any private, company notes about the transaction. | Transfer from bank account Y to bank account Z | -| `date` | *string* | :heavy_check_mark: | N/A | 2022-10-23 00:00:00 +0000 UTC | -| `from` | [shared.From](../../../sdk/models/shared/from.md) | :heavy_check_mark: | N/A | | -| `to` | [shared.To](../../../sdk/models/shared/to.md) | :heavy_check_mark: | N/A | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `description` | *string* | :heavy_minus_sign: | Any private, company notes about the transaction. | Transfer from bank account Y to bank account Z | +| `date` | *string* | :heavy_check_mark: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `from` | [shared.From](../../../sdk/models/shared/from.md) | :heavy_check_mark: | N/A | | +| `to` | [shared.To](../../../sdk/models/shared/to.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/updatecustomerresponse.md b/sync-for-expenses/docs/sdk/models/shared/updatecustomerresponse.md index 4e5ae13cc..e4ed8307b 100644 --- a/sync-for-expenses/docs/sdk/models/shared/updatecustomerresponse.md +++ b/sync-for-expenses/docs/sdk/models/shared/updatecustomerresponse.md @@ -6,6 +6,19 @@ import { UpdateCustomerResponse } from "@codat/sync-for-expenses/sdk/models/shared"; let value: UpdateCustomerResponse = { + data: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + defaultCurrency: "GBP", + contacts: [ + { + phone: null, + status: "Archived", + modifiedDate: "2022-10-23T00:00:00Z", + }, + ], + status: "Unknown", + }, changes: [ { recordRef: { @@ -15,12 +28,12 @@ let value: UpdateCustomerResponse = { ], dataType: "invoices", companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "368db420-447a-4b46-82c0-bcc45945370c", + pushOperationKey: "ba87ad2c-abb7-4be6-8a33-7c96d5ec70d0", dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", requestedOnUtc: "2022-10-23T00:00:00Z", completedOnUtc: "2022-10-23T00:00:00Z", - status: "Success", - statusCode: 507, + status: "Failed", + statusCode: 813712, }; ``` @@ -34,8 +47,8 @@ let value: UpdateCustomerResponse = { | `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `pushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | -| `completedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `completedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | | ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | | `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | diff --git a/sync-for-expenses/docs/sdk/models/shared/updatecustomerresponseaccountingcustomer.md b/sync-for-expenses/docs/sdk/models/shared/updatecustomerresponseaccountingcustomer.md index bf543d343..72325ddee 100644 --- a/sync-for-expenses/docs/sdk/models/shared/updatecustomerresponseaccountingcustomer.md +++ b/sync-for-expenses/docs/sdk/models/shared/updatecustomerresponseaccountingcustomer.md @@ -20,17 +20,12 @@ let value: UpdateCustomerResponseAccountingCustomer = { defaultCurrency: "GBP", contacts: [ { - phone: [ - { - number: "01224 658 999", - type: "Primary", - }, - ], - status: "Unknown", + phone: null, + status: "Archived", modifiedDate: "2022-10-23T00:00:00Z", }, ], - status: "Archived", + status: "Active", }; ``` @@ -38,13 +33,13 @@ let value: UpdateCustomerResponseAccountingCustomer = { | Field | Type | Required | Description | Example | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `id` | *string* | :heavy_minus_sign: | Identifier for the customer, unique to the company in the accounting software. | | | `customerName` | *string* | :heavy_minus_sign: | Name of the customer as recorded in the accounting system, typically the company name. | | | `contactName` | *string* | :heavy_minus_sign: | Name of the main contact for the identified customer. | | | `emailAddress` | *string* | :heavy_minus_sign: | Email address the customer can be contacted by. | | -| `defaultCurrency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP | +| `defaultCurrency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.

## Unknown currencies

In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction.

There are only a very small number of edge cases where this currency code is returned by the Codat system. | **Example 1:** GBP
**Example 2:** USD
**Example 3:** EUR | | `phone` | *string* | :heavy_minus_sign: | Phone number the customer can be contacted by. | | | `addresses` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | An array of Addresses. | | | `contacts` | [shared.Contact](../../../sdk/models/shared/contact.md)[] | :heavy_minus_sign: | An array of Contacts. | | diff --git a/sync-for-expenses/docs/sdk/models/shared/updateexpenserequest.md b/sync-for-expenses/docs/sdk/models/shared/updateexpenserequest.md index 8836182f2..5025fc726 100644 --- a/sync-for-expenses/docs/sdk/models/shared/updateexpenserequest.md +++ b/sync-for-expenses/docs/sdk/models/shared/updateexpenserequest.md @@ -12,7 +12,6 @@ let value: UpdateExpenseRequest = { currency: "GBP", contactRef: { id: "40e3e57c-2322-4898-966c-ca41adfd23fd", - type: "Supplier", }, bankAccountRef: { id: "787dfb37-5707-4dc0-8a86-8d74e4cc78ea", @@ -34,7 +33,6 @@ let value: UpdateExpenseRequest = { trackingRefs: [ { id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", - dataType: "trackingCategories", }, ], invoiceTo: { diff --git a/sync-for-expenses/docs/sdk/models/shared/updateexpenseresponse.md b/sync-for-expenses/docs/sdk/models/shared/updateexpenseresponse.md index d1293dd87..50f783cc3 100644 --- a/sync-for-expenses/docs/sdk/models/shared/updateexpenseresponse.md +++ b/sync-for-expenses/docs/sdk/models/shared/updateexpenseresponse.md @@ -5,11 +5,13 @@ ```typescript import { UpdateExpenseResponse } from "@codat/sync-for-expenses/sdk/models/shared"; -let value: UpdateExpenseResponse = {}; +let value: UpdateExpenseResponse = { + syncId: "1ad0695c-4566-4715-918c-adbb03eac81e", +}; ``` ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `syncId` | *string* | :heavy_minus_sign: | Unique identifier for the update expense sync. | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `syncId` | *string* | :heavy_minus_sign: | Unique identifier for the update expense sync. | 1ad0695c-4566-4715-918c-adbb03eac81e | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdk/models/shared/updatereimbursableexpensetransactionrequest.md b/sync-for-expenses/docs/sdk/models/shared/updatereimbursableexpensetransactionrequest.md index a5248be61..322eb58b7 100644 --- a/sync-for-expenses/docs/sdk/models/shared/updatereimbursableexpensetransactionrequest.md +++ b/sync-for-expenses/docs/sdk/models/shared/updatereimbursableexpensetransactionrequest.md @@ -34,7 +34,6 @@ let value: UpdateReimbursableExpenseTransactionRequest = { trackingRefs: [ { id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", - dataType: "trackingCategories", }, ], invoiceTo: { @@ -53,8 +52,8 @@ let value: UpdateReimbursableExpenseTransactionRequest = { | `reference` | *string* | :heavy_minus_sign: | User-friendly reference for the reimbursable expense. | | | `contactRef` | [shared.ReimbursementContactRef](../../../sdk/models/shared/reimbursementcontactref.md) | :heavy_check_mark: | N/A | | | `apAccountRef` | [shared.ApAccountRef](../../../sdk/models/shared/apaccountref.md) | :heavy_minus_sign: | N/A | | -| `issueDate` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | -| `dueDate` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `issueDate` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `dueDate` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `currency` | *string* | :heavy_check_mark: | Currency the transaction was recorded in. | GBP | | `currencyRate` | *Decimal* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.

Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit.

It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.

Where the currency rate is provided by the underlying accounting software, it will be available from Codat with the same precision (up to a maximum of 9 decimal places).

For accounting software which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.

## Examples with base currency of GBP

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (GBP) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **USD** \| $20 \| 0.781 \| £15.62 \|
\| **EUR** \| €20 \| 0.885 \| £17.70 \|
\| **RUB** \| ₽20 \| 0.011 \| £0.22 \|

## Examples with base currency of USD

\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|
\| :--------------- \| :------------- \| :------------ \| :------------------------- \|
\| **GBP** \| £20 \| 1.277 \| $25.54 \|
\| **EUR** \| €20 \| 1.134 \| $22.68 \|
\| **RUB** \| ₽20 \| 0.015 \| $0.30 \|


### Integration-specific details

\| Integration \| Scenario \| System behavior \|
\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|
\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, specify a currencyRate in the request body. \| | | | `notes` | *string* | :heavy_minus_sign: | Any private, company notes about the transaction. | APPLE.COM/BILL - 09001077498 - Card Ending: 4590 | diff --git a/sync-for-expenses/docs/sdk/models/shared/updatesupplierresponse.md b/sync-for-expenses/docs/sdk/models/shared/updatesupplierresponse.md index cf61d3ac2..2f9eab7ad 100644 --- a/sync-for-expenses/docs/sdk/models/shared/updatesupplierresponse.md +++ b/sync-for-expenses/docs/sdk/models/shared/updatesupplierresponse.md @@ -6,6 +6,44 @@ import { UpdateSupplierResponse } from "@codat/sync-for-expenses/sdk/models/shared"; let value: UpdateSupplierResponse = { + data: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", + supplierName: "Kelly's Industrial Supplies", + contactName: "Kelly's Industrial Supplies", + emailAddress: "sales@kellysupplies.com", + phone: "07999 999999", + addresses: [ + { + type: "Billing", + line1: "Unit 51", + line2: "Bakersfield Industrial Estate", + city: "Bakersfield", + region: "California", + country: "USA", + }, + ], + registrationNumber: "string", + taxNumber: "string", + status: "Unknown", + defaultCurrency: "string", + metadata: { + isDeleted: true, + }, + supplementalData: { + content: { + "property1": { + "property1": "", + "property2": "", + }, + "property2": { + "property1": "", + "property2": "", + }, + }, + }, + }, changes: [ { recordRef: { @@ -15,12 +53,12 @@ let value: UpdateSupplierResponse = { ], dataType: "invoices", companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "a6164d0f-5502-46e1-8fd7-539006143420", + pushOperationKey: "34fa14e2-bb15-4ba5-b65a-a72a3aa6e3df", dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", requestedOnUtc: "2022-10-23T00:00:00Z", completedOnUtc: "2022-10-23T00:00:00Z", - status: "TimedOut", - statusCode: 301, + status: "Pending", + statusCode: 134294, }; ``` @@ -34,8 +72,8 @@ let value: UpdateSupplierResponse = { | `companyId` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | | `pushOperationKey` | *string* | :heavy_check_mark: | A unique identifier generated by Codat to represent this single push operation. This identifier can be used to track the status of the push, and should be persisted. | | | `dataConnectionKey` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | -| `completedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC | +| `requestedOnUtc` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `completedOnUtc` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example:

```
2020-10-08T22:40:50Z
2021-01-01T00:00:00
```



When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:

- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`
- Unqualified local time: `2021-11-15T01:00:00`
- UTC time offsets: `2021-11-15T01:00:00-05:00`

> Time zones
>
> Not all dates from Codat will contain information about time zones.
> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `timeoutInMinutes` | *number* | :heavy_minus_sign: | Number of minutes the push operation must complete within before it times out. | | | ~~`timeoutInSeconds`~~ | *number* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Number of seconds the push operation must complete within before it times out. | | | `status` | [shared.PushOperationStatus](../../../sdk/models/shared/pushoperationstatus.md) | :heavy_check_mark: | The current status of the push operation. | | diff --git a/sync-for-expenses/docs/sdk/models/shared/updatesupplierresponseaccountingsupplier.md b/sync-for-expenses/docs/sdk/models/shared/updatesupplierresponseaccountingsupplier.md index 2246cd715..548a8113e 100644 --- a/sync-for-expenses/docs/sdk/models/shared/updatesupplierresponseaccountingsupplier.md +++ b/sync-for-expenses/docs/sdk/models/shared/updatesupplierresponseaccountingsupplier.md @@ -39,12 +39,12 @@ let value: UpdateSupplierResponseAccountingSupplier = { supplementalData: { content: { "property1": { - "property1": null, - "property2": null, + "property1": "", + "property2": "", }, "property2": { - "property1": null, - "property2": null, + "property1": "", + "property2": "", }, }, }, @@ -55,13 +55,13 @@ let value: UpdateSupplierResponseAccountingSupplier = { | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `modifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | +| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | **Example 1:** 2022-10-23T00:00:00Z
**Example 2:** 2022-10-23 | | `id` | *string* | :heavy_minus_sign: | Identifier for the supplier, unique to the company in the accounting software. | | | `supplierName` | *string* | :heavy_minus_sign: | Name of the supplier as recorded in the accounting system, typically the company name. | | | `contactName` | *string* | :heavy_minus_sign: | Name of the main contact for the supplier. | | | `emailAddress` | *string* | :heavy_minus_sign: | Email address that the supplier may be contacted on. | | -| `phone` | *string* | :heavy_minus_sign: | Phone number that the supplier may be contacted on. | +44 25691 154789 | +| `phone` | *string* | :heavy_minus_sign: | Phone number that the supplier may be contacted on. | **Example 1:** +44 25691 154789
**Example 2:** (877) 492-8687
**Example 3:** 01224 658 999 | | `addresses` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | An array of Addresses. | | | `registrationNumber` | *string* | :heavy_minus_sign: | Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. | | | `taxNumber` | *string* | :heavy_minus_sign: | Supplier's company tax number. | | diff --git a/sync-for-expenses/docs/sdks/accounts/README.md b/sync-for-expenses/docs/sdks/accounts/README.md index 767feb079..1efcbdfc8 100644 --- a/sync-for-expenses/docs/sdks/accounts/README.md +++ b/sync-for-expenses/docs/sdks/accounts/README.md @@ -1,5 +1,4 @@ # Accounts -(*accounts*) ## Overview @@ -16,12 +15,13 @@ The *Create account* endpoint creates a new [account](https://docs.codat.io/sync [Accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) are the categories a business uses to record accounting transactions. -**Integration-specific behaviour** +**Integration-specific behavior** Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-chartOfAccounts-model). ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; import { Decimal } from "@codat/sync-for-expenses/sdk/types"; @@ -40,14 +40,13 @@ async function run() { description: "Invoices the business has issued but has not yet collected payment on.", fullyQualifiedCategory: "Asset.Current", fullyQualifiedName: "Cash On Hand", - currency: "USD", + currency: "GBP", currentBalance: new Decimal("0"), type: "Asset", status: "Active", }, }); - // Handle the result console.log(result); } @@ -79,21 +78,18 @@ async function run() { description: "Invoices the business has issued but has not yet collected payment on.", fullyQualifiedCategory: "Asset.Current", fullyQualifiedName: "Cash On Hand", - currency: "USD", + currency: "GBP", currentBalance: new Decimal("0"), type: "Asset", status: "Active", }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsCreate failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -114,10 +110,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## getCreateModel @@ -125,12 +122,13 @@ The *Get create account model* endpoint returns the expected data for the reques [Accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) are the categories a business uses to record accounting transactions. -**Integration-specific behaviour** +**Integration-specific behavior** See the *response examples* for integration-specific indicative models. -### Example Usage +### Example Usage: Exact (Netherlands) + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -144,7 +142,6 @@ async function run() { connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", }); - // Handle the result console.log(result); } @@ -170,20 +167,476 @@ async function run() { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` - if (!res.ok) { - throw res.error; +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { accountsGetCreateModel } from "@codat/sync-for-expenses/funcs/accountsGetCreateModel.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsGetCreateModel(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsGetCreateModel failed:", res.error); } +} + +run(); +``` +### Example Usage: MYOB AccountRight and Essentials - const { value: result } = res; + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); - // Handle the result console.log(result); } run(); ``` +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { accountsGetCreateModel } from "@codat/sync-for-expenses/funcs/accountsGetCreateModel.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsGetCreateModel(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { accountsGetCreateModel } from "@codat/sync-for-expenses/funcs/accountsGetCreateModel.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsGetCreateModel(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { accountsGetCreateModel } from "@codat/sync-for-expenses/funcs/accountsGetCreateModel.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsGetCreateModel(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { accountsGetCreateModel } from "@codat/sync-for-expenses/funcs/accountsGetCreateModel.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsGetCreateModel(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { accountsGetCreateModel } from "@codat/sync-for-expenses/funcs/accountsGetCreateModel.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsGetCreateModel(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { accountsGetCreateModel } from "@codat/sync-for-expenses/funcs/accountsGetCreateModel.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsGetCreateModel(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sandbox + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { accountsGetCreateModel } from "@codat/sync-for-expenses/funcs/accountsGetCreateModel.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsGetCreateModel(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.accounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { accountsGetCreateModel } from "@codat/sync-for-expenses/funcs/accountsGetCreateModel.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsGetCreateModel(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("accountsGetCreateModel failed:", res.error); + } +} + +run(); +``` + ### Parameters | Parameter | Type | Required | Description | @@ -199,7 +652,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/adjustments/README.md b/sync-for-expenses/docs/sdks/adjustments/README.md index ecdac3624..4abaf777b 100644 --- a/sync-for-expenses/docs/sdks/adjustments/README.md +++ b/sync-for-expenses/docs/sdks/adjustments/README.md @@ -1,5 +1,4 @@ # Adjustments -(*adjustments*) ## Overview @@ -21,8 +20,9 @@ Adjustments represent write-offs and transaction alterations, such as foreign ex |-----------------------|-----------| | QuickBooks Desktop | Yes | -### Example Usage +### Example Usage: Create adjustment + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; import { Decimal } from "@codat/sync-for-expenses/sdk/types"; @@ -51,7 +51,6 @@ async function run() { trackingRefs: [ { id: "80000003-1674553958", - dataType: "trackingCategories", }, ], invoiceTo: { @@ -68,7 +67,6 @@ async function run() { trackingRefs: [ { id: "80000003-1674553958", - dataType: "trackingCategories", }, ], }, @@ -77,7 +75,6 @@ async function run() { ], }); - // Handle the result console.log(result); } @@ -119,7 +116,6 @@ async function run() { trackingRefs: [ { id: "80000003-1674553958", - dataType: "trackingCategories", }, ], invoiceTo: { @@ -136,7 +132,6 @@ async function run() { trackingRefs: [ { id: "80000003-1674553958", - dataType: "trackingCategories", }, ], }, @@ -144,20 +139,147 @@ async function run() { }, ], }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("adjustmentsCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Example 1 + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.adjustments.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: [ + { + id: "6a13b8cf-d482-4389-9f93-08d52faa3dc0", + date: "2022-10-23T00:00:00Z", + currency: "Lilangeni", + lines: [], + }, + ], + }); + + console.log(result); +} - if (!res.ok) { - throw res.error; +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { adjustmentsCreate } from "@codat/sync-for-expenses/funcs/adjustmentsCreate.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await adjustmentsCreate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: [ + { + id: "6a13b8cf-d482-4389-9f93-08d52faa3dc0", + date: "2022-10-23T00:00:00Z", + currency: "Lilangeni", + lines: [], + }, + ], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("adjustmentsCreate failed:", res.error); } +} + +run(); +``` +### Example Usage: Malformed query + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); - const { value: result } = res; +async function run() { + const result = await codatSyncExpenses.adjustments.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: [ + { + id: "6a13b8cf-d482-4389-9f93-08d52faa3dc0", + date: "2022-10-23T00:00:00Z", + currency: "Lilangeni", + lines: [], + }, + ], + }); - // Handle the result console.log(result); } run(); ``` +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { adjustmentsCreate } from "@codat/sync-for-expenses/funcs/adjustmentsCreate.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await adjustmentsCreate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: [ + { + id: "6a13b8cf-d482-4389-9f93-08d52faa3dc0", + date: "2022-10-23T00:00:00Z", + currency: "Lilangeni", + lines: [], + }, + ], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("adjustmentsCreate failed:", res.error); + } +} + +run(); +``` + ### Parameters | Parameter | Type | Required | Description | @@ -173,7 +295,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/attachments/README.md b/sync-for-expenses/docs/sdks/attachments/README.md index 5a9d2b7bd..773d8870d 100644 --- a/sync-for-expenses/docs/sdks/attachments/README.md +++ b/sync-for-expenses/docs/sdks/attachments/README.md @@ -1,5 +1,4 @@ # Attachments -(*attachments*) ## Overview @@ -15,21 +14,23 @@ The *Upload attachment* endpoint uploads an attachment in the accounting softwar [Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) represent transactions made with a company debit or credit card. Attachments for `Adjustment` and `Transfer` transaction types are not supported for any integrations. -**Integration-specific behaviour** +**Integration-specific behavior** Each accounting software supports different file formats and sizes. -| Integration | File size | File extension |Supported transaction type -|-------------------|-----------|------------------------------------------------------------------------------------------------------------------------------------------------|--------------| -| **Xero** | 3 MB | 7Z, BMP, CSV, DOC, DOCX, EML, GIF, JPEG, JPG, KEYNOTE, MSG, NUMBERS, ODF, ODS, ODT, PAGES, PDF, PNG, PPT, PPTX, RAR, RTF, TIF, TIFF, TXT, XLS, XLSX, ZIP | All supported types | -| **QuickBooks Online** | 100 MB | AI, CSV, DOC, DOCX, EPS, GIF, JPEG, JPG, ODS, PAGES, PDF, PNG, RTF, TIF, TXT, XLS, XLSX, XML | `ReimbursableExpenses`, `ExpensePayment`, `ExpenseRefund` | -| **NetSuite** | 100 MB | BMP, CSV, XLS, XLSX, JSON, PDF, PJPG, PJPEG, PNG, TXT, SVG, TIF, TIFF, DOC, DOCX, ZIP |`ExpensePayment`, `ExpenseRefund` | -| **Dynamics 365 Business Central** | 350 MB | [No explicit requirements outlined](https://learn.microsoft.com/en-gb/dynamics365/business-central/ui-how-add-link-to-record#to-attach-a-file-to-a-purchase-invoice) for text, image, and video files. | All supported types -| **QuickBooks Desktop** | NA | Does not support attachment upload | N/A | -| **FreeAgent** | 5MB | PNG, X-PNG, JPEG, PJG, GIF, X-PDF +| Integration | File size | File extension | Supported transactions | +|-----------------------------------|-----------|-------------------------------------------------------|------------------------| +| **Xero** | 3 MB | 7Z, BMP, CSV, DOC, DOCX, EML, GIF, JPEG, JPG, KEYNOTE, MSG, NUMBERS, ODF, ODS, ODT, PAGES, PDF, PNG, PPT, PPTX, RAR, RTF, TIF, TIFF, TXT, XLS, XLSX, ZIP | All supported types | +| **QuickBooks Online** | 100 MB | AI, CSV, DOC, DOCX, EPS, GIF, JPEG, JPG, ODS, PAGES, PDF, PNG, RTF, TIF, TXT, XLS, XLSX, XML | `expense-transactions.Payment`, `expense-transactions.Refund`, `reimbursable-expense-transactions` | +| **NetSuite** | 100 MB | BMP, CSV, XLS, XLSX, JSON, PDF, PJPG, PJPEG, PNG, TXT, SVG, TIF, TIFF, DOC, DOCX, ZIP |`expense-transactions.Payment`, `expense-transactions.Refund` | +| **Dynamics 365 Business Central** | 350 MB | [No explicit requirements outlined](https://learn.microsoft.com/en-gb/dynamics365/business-central/ui-how-add-link-to-record#to-attach-a-file-to-a-purchase-invoice) for text, image, and video files. | All supported types +| **QuickBooks Desktop** | NA | Does not support attachment upload | N/A | +| **FreeAgent** | 5MB | PNG, X-PNG, JPEG, PJG, GIF, X-PDF | `expense-transactions.Payment`, `reimbursable-expense-transactions` +| **Zoho Books** | 5MB | GIF, PNG, JPEG, JPG, BMP, PDF | `expense-transactions.Payment`, `reimbursable-expense-transactions` | ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -44,7 +45,6 @@ async function run() { transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", }); - // Handle the result console.log(result); } @@ -71,15 +71,12 @@ async function run() { syncId: "6fb40d5e-b13e-11ed-afa1-0242ac120002", transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("attachmentsUpload failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -100,7 +97,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/bankaccounts/README.md b/sync-for-expenses/docs/sdks/bankaccounts/README.md index bcee034a7..fd3842220 100644 --- a/sync-for-expenses/docs/sdks/bankaccounts/README.md +++ b/sync-for-expenses/docs/sdks/bankaccounts/README.md @@ -1,5 +1,4 @@ # BankAccounts -(*bankAccounts*) ## Overview @@ -12,16 +11,80 @@ Create bank accounts and view create bank account options. ## create -The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) for a given company's connection. - -[Bank accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. - -**Integration-specific behaviour** - +The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) for a given company's connection. + +[Bank accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. + +**Integration-specific behavior** + Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-bankAccounts-model). -### Example Usage +### Example Usage: Malformed query + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.bankAccounts.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + bankAccount: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + currency: "GBP", + status: "Active", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { bankAccountsCreate } from "@codat/sync-for-expenses/funcs/bankAccountsCreate.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankAccountsCreate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + bankAccount: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + currency: "GBP", + status: "Active", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankAccountsCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -42,7 +105,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -75,20 +137,84 @@ async function run() { status: "Active", }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankAccountsCreate failed:", res.error); } +} - const { value: result } = res; +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.bankAccounts.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + bankAccount: { + accountName: "Xero GBP Bank Account", + accountType: "Debit", + sortCode: "445566", + accountNumber: "12345678", + currency: "GBP", + status: "Active", + }, + }); - // Handle the result console.log(result); } run(); ``` +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { bankAccountsCreate } from "@codat/sync-for-expenses/funcs/bankAccountsCreate.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankAccountsCreate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + bankAccount: { + accountName: "Xero GBP Bank Account", + accountType: "Debit", + sortCode: "445566", + accountNumber: "12345678", + currency: "GBP", + status: "Active", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankAccountsCreate failed:", res.error); + } +} + +run(); +``` + ### Parameters | Parameter | Type | Required | Description | @@ -104,24 +230,332 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| 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/sync-for-expenses-api#/schemas/BankAccount) for a given company and integration. - -[Bank accounts](https://docs.codat.io/sync-for-expenses-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. +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/sync-for-expenses-api#/schemas/BankAccount) for a given company and integration. + +[Bank accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. + +**Integration-specific behavior** + +See the *response examples* for integration-specific indicative models. + + +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.bankAccounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { bankAccountsGetCreateModel } from "@codat/sync-for-expenses/funcs/bankAccountsGetCreateModel.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankAccountsGetCreateModel(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankAccountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.bankAccounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { bankAccountsGetCreateModel } from "@codat/sync-for-expenses/funcs/bankAccountsGetCreateModel.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankAccountsGetCreateModel(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankAccountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.bankAccounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { bankAccountsGetCreateModel } from "@codat/sync-for-expenses/funcs/bankAccountsGetCreateModel.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankAccountsGetCreateModel(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankAccountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.bankAccounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { bankAccountsGetCreateModel } from "@codat/sync-for-expenses/funcs/bankAccountsGetCreateModel.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankAccountsGetCreateModel(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankAccountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.bankAccounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { bankAccountsGetCreateModel } from "@codat/sync-for-expenses/funcs/bankAccountsGetCreateModel.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankAccountsGetCreateModel(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankAccountsGetCreateModel failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.bankAccounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { bankAccountsGetCreateModel } from "@codat/sync-for-expenses/funcs/bankAccountsGetCreateModel.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankAccountsGetCreateModel(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankAccountsGetCreateModel failed:", res.error); + } +} -### Example Usage +run(); +``` +### Example Usage: QuickBooks Online Sandbox + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -135,7 +569,6 @@ async function run() { connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", }); - // Handle the result console.log(result); } @@ -161,20 +594,119 @@ async function run() { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankAccountsGetCreateModel failed:", res.error); + } +} - if (!res.ok) { - throw res.error; +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.bankAccounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { bankAccountsGetCreateModel } from "@codat/sync-for-expenses/funcs/bankAccountsGetCreateModel.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankAccountsGetCreateModel(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankAccountsGetCreateModel failed:", res.error); } +} + +run(); +``` +### Example Usage: Sandbox + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; - const { value: result } = res; +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.bankAccounts.getCreateModel({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); - // Handle the result console.log(result); } run(); ``` +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { bankAccountsGetCreateModel } from "@codat/sync-for-expenses/funcs/bankAccountsGetCreateModel.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankAccountsGetCreateModel(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("bankAccountsGetCreateModel failed:", res.error); + } +} + +run(); +``` + ### Parameters | Parameter | Type | Required | Description | @@ -190,7 +722,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/codatsyncexpenses/README.md b/sync-for-expenses/docs/sdks/codatsyncexpenses/README.md deleted file mode 100644 index e86931ee9..000000000 --- a/sync-for-expenses/docs/sdks/codatsyncexpenses/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# CodatSyncExpenses SDK - -## Overview - -Sync for Expenses: The API for Sync for Expenses. - -Sync for Expenses is an API and a set of supporting tools. It has been built to -enable corporate card and expense management platforms to provide high-quality -integrations with multiple accounting software through a standardized API. - -[Explore product](https://docs.codat.io/sync-for-expenses/overview) | [See our OpenAPI spec](https://github.com/codatio/oas) - -Not seeing the endpoints you're expecting? We've [reorganized our products](https://docs.codat.io/updates/230901-new-products), and you may be using a [different version of Sync for Expenses](https://docs.codat.io/sync-for-expenses-v1-api#/). - ---- - -## Endpoints - -| Endpoints | Description | -| :- |:- | -| Companies | Create and manage your SMB users' companies. | -| Connections | Create new and manage existing data connections for a company. | -| Configuration | View and manage mapping configuration and defaults for expense transactions. | -| Sync | Monitor the status of data syncs. | -| Expenses | Create and update transactions that represent your customers' spend. | -| Transfers | Create and update transactions that represent the movement of your customers' money. | -| Reimbursements | Create and update transactions that represent your customers' repayable spend. | -| Attachments | Attach receipts to a transaction for a complete audit trail. | -| Transaction status | Monitor the status of individual transactions in data syncs. | -| Manage data | Control and monitor the retrieval of data from an integration. | -| Push operations | View historic push operations. | -| Accounts | Create accounts and view account schemas. | -| Customers | Get, create, and update customers. | -| Suppliers | Get, create, and update suppliers. | - - -### Available Operations diff --git a/sync-for-expenses/docs/sdks/companies/README.md b/sync-for-expenses/docs/sdks/companies/README.md index 6c61cecc0..45ba7d15f 100644 --- a/sync-for-expenses/docs/sdks/companies/README.md +++ b/sync-for-expenses/docs/sdks/companies/README.md @@ -1,5 +1,4 @@ # Companies -(*companies*) ## Overview @@ -9,6 +8,7 @@ Create and manage your SMB users' companies. * [list](#list) - List companies * [create](#create) - Create company +* [replace](#replace) - Replace company * [update](#update) - Update company * [delete](#delete) - Delete a company * [get](#get) - Get company @@ -20,8 +20,22 @@ Create and manage your SMB users' companies. A [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. -### Example Usage +## Filter by tags + +The *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying): + +- equals (`=`) +- not equals (`!=`) +- contains (`~`) + +For example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team: +- Foreign key: `uid = {yourCustomerId}` +- Region: `region != uk` +- Owning team and region: `region = uk && owningTeam = invoice-finance` +### Example Usage: List of Companies + + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -31,13 +45,11 @@ const codatSyncExpenses = new CodatSyncExpenses({ async function run() { const result = await codatSyncExpenses.companies.list({ - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", }); - // Handle the result console.log(result); } @@ -60,25 +72,74 @@ const codatSyncExpenses = new CodatSyncExpensesCore({ async function run() { const res = await companiesList(codatSyncExpenses, { - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesList failed:", res.error); } +} + +run(); +``` +### Example Usage: One company + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; - const { value: result } = res; +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.companies.list({ + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", + }); - // Handle the result console.log(result); } run(); ``` +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { companiesList } from "@codat/sync-for-expenses/funcs/companiesList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesList(codatSyncExpenses, { + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesList failed:", res.error); + } +} + +run(); +``` + ### Parameters | Parameter | Type | Required | Description | @@ -94,10 +155,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## create @@ -108,8 +170,60 @@ Each company can have multiple [connections](https://docs.codat.io/sync-for-expe If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`. -### Example Usage +### Example Usage: Malformed query + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.companies.create({ + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { companiesCreate } from "@codat/sync-for-expenses/funcs/companiesCreate.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesCreate(codatSyncExpenses, { + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: With a description + + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -120,9 +234,9 @@ const codatSyncExpenses = new CodatSyncExpenses({ async function run() { const result = await codatSyncExpenses.companies.create({ name: "Technicalium", + description: "Technology services, including web and app design and development", }); - // Handle the result console.log(result); } @@ -146,21 +260,119 @@ const codatSyncExpenses = new CodatSyncExpensesCore({ async function run() { const res = await companiesCreate(codatSyncExpenses, { name: "Technicalium", + description: "Technology services, including web and app design and development", }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: With a tag + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.companies.create({ + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { companiesCreate } from "@codat/sync-for-expenses/funcs/companiesCreate.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); - if (!res.ok) { - throw res.error; +async function run() { + const res = await companiesCreate(codatSyncExpenses, { + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesCreate failed:", res.error); } +} + +run(); +``` +### Example Usage: With no description - const { value: result } = res; + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.companies.create({ + name: "Technicalium", + }); - // Handle the result console.log(result); } run(); ``` +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { companiesCreate } from "@codat/sync-for-expenses/funcs/companiesCreate.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesCreate(codatSyncExpenses, { + name: "Technicalium", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesCreate failed:", res.error); + } +} + +run(); +``` + ### Parameters | Parameter | Type | Required | Description | @@ -176,20 +388,22 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | -## update +## replace -Use the *Update company* endpoint to update both the name and description of the company. +Use the *Replace company* endpoint to replace the existing name, description, and tags of the company. Calling the endpoint will replace existing values even if new values haven't been defined in the payload. A [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. -### Example Usage +### Example Usage: Unauthorized + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -198,14 +412,213 @@ const codatSyncExpenses = new CodatSyncExpenses({ }); async function run() { - const result = await codatSyncExpenses.companies.update({ + const result = await codatSyncExpenses.companies.replace({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyRequestBody: { + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { companiesReplace } from "@codat/sync-for-expenses/funcs/companiesReplace.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesReplace(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyRequestBody: { + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesReplace failed:", res.error); + } +} + +run(); +``` +### Example Usage: Update description + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.companies.replace({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyRequestBody: { + name: "Same name", + description: "Additional documents required", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { companiesReplace } from "@codat/sync-for-expenses/funcs/companiesReplace.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesReplace(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyRequestBody: { + name: "Same name", + description: "Additional documents required", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesReplace failed:", res.error); + } +} + +run(); +``` +### Example Usage: Update name + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.companies.replace({ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", companyRequestBody: { name: "New Name", }, }); - // Handle the result + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { companiesReplace } from "@codat/sync-for-expenses/funcs/companiesReplace.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesReplace(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyRequestBody: { + name: "New Name", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesReplace failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ReplaceCompanyRequest](../../sdk/models/operations/replacecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Company](../../sdk/models/shared/company.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## update + +Use the *Update company* endpoint to update the name, description, or tags of the company. + +The *Update company* endpoint doesn't have any required fields. If any of the fields provided are `null` or not provided, they won't be included in the update. + +A [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data. + +### Example Usage: Unauthorized + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.companies.update({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyUpdateRequest: { + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + }, + }); + console.log(result); } @@ -229,24 +642,136 @@ const codatSyncExpenses = new CodatSyncExpensesCore({ async function run() { const res = await companiesUpdate(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - companyRequestBody: { + companyUpdateRequest: { + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesUpdate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Update name + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.companies.update({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyUpdateRequest: { name: "New Name", }, }); - if (!res.ok) { - throw res.error; + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { companiesUpdate } from "@codat/sync-for-expenses/funcs/companiesUpdate.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesUpdate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyUpdateRequest: { + name: "New Name", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesUpdate failed:", res.error); } +} - const { value: result } = res; +run(); +``` +### Example Usage: Update tags + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.companies.update({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyUpdateRequest: { + tags: { + "refrence": "new reference", + }, + }, + }); - // Handle the result console.log(result); } run(); ``` +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { companiesUpdate } from "@codat/sync-for-expenses/funcs/companiesUpdate.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesUpdate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyUpdateRequest: { + tags: { + "refrence": "new reference", + }, + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesUpdate failed:", res.error); + } +} + +run(); +``` + ### Parameters | Parameter | Type | Required | Description | @@ -262,10 +787,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## delete @@ -277,6 +803,7 @@ Each company can have multiple [connections](https://docs.codat.io/sync-for-expe ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -313,14 +840,12 @@ async function run() { const res = await companiesDelete(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("companiesDelete failed:", res.error); } - - const { value: result } = res; - - } run(); @@ -341,10 +866,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## get @@ -354,8 +880,9 @@ A [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) repres Each company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. -### Example Usage +### Example Usage: Parent multi-entity company + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -368,7 +895,6 @@ async function run() { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - // Handle the result console.log(result); } @@ -393,20 +919,115 @@ async function run() { const res = await companiesGet(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Simple company + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.companies.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: - if (!res.ok) { - throw res.error; +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { companiesGet } from "@codat/sync-for-expenses/funcs/companiesGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesGet failed:", res.error); } +} - const { value: result } = res; +run(); +``` +### Example Usage: Subsidiary multi-entity company + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.companies.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); - // Handle the result console.log(result); } run(); ``` +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { companiesGet } from "@codat/sync-for-expenses/funcs/companiesGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companiesGet failed:", res.error); + } +} + +run(); +``` + ### Parameters | Parameter | Type | Required | Description | @@ -422,7 +1043,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/companyinfo/README.md b/sync-for-expenses/docs/sdks/companyinfo/README.md index c740f67a9..6e17588f1 100644 --- a/sync-for-expenses/docs/sdks/companyinfo/README.md +++ b/sync-for-expenses/docs/sdks/companyinfo/README.md @@ -1,5 +1,4 @@ # CompanyInfo -(*companyInfo*) ## Overview @@ -15,6 +14,7 @@ Gets the latest basic info for a company. ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -27,7 +27,6 @@ async function run() { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - // Handle the result console.log(result); } @@ -52,15 +51,12 @@ async function run() { const res = await companyInfoGet(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("companyInfoGet failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -81,7 +77,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/configuration/README.md b/sync-for-expenses/docs/sdks/configuration/README.md index 512de184e..4cf27ac47 100644 --- a/sync-for-expenses/docs/sdks/configuration/README.md +++ b/sync-for-expenses/docs/sdks/configuration/README.md @@ -1,5 +1,4 @@ # Configuration -(*configuration*) ## Overview @@ -16,6 +15,7 @@ Gets a company's expense sync configuration ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -28,7 +28,6 @@ async function run() { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - // Handle the result console.log(result); } @@ -53,15 +52,12 @@ async function run() { const res = await configurationGet(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("configurationGet failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -82,10 +78,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## set @@ -93,6 +90,7 @@ Sets a company's expense sync configuration ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -112,7 +110,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -144,15 +141,12 @@ async function run() { customer: {}, }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("configurationSet failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -173,7 +167,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/connections/README.md b/sync-for-expenses/docs/sdks/connections/README.md index 78c8a07c6..4fd88fa71 100644 --- a/sync-for-expenses/docs/sdks/connections/README.md +++ b/sync-for-expenses/docs/sdks/connections/README.md @@ -1,5 +1,4 @@ # Connections -(*connections*) ## Overview @@ -20,6 +19,7 @@ Create new and manage existing data connections for a company. ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -30,13 +30,10 @@ const codatSyncExpenses = new CodatSyncExpenses({ async function run() { const result = await codatSyncExpenses.connections.list({ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", }); - // Handle the result console.log(result); } @@ -60,20 +57,15 @@ const codatSyncExpenses = new CodatSyncExpensesCore({ async function run() { const res = await connectionsList(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("connectionsList failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -94,10 +86,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## create @@ -105,8 +98,9 @@ run(); Use the [List Integrations](https://docs.codat.io/platform-api#/operations/list-integrations) endpoint to access valid platform keys. -### Example Usage +### Example Usage: Connection + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -122,7 +116,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -150,20 +143,72 @@ async function run() { platformKey: "gbol", }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("connectionsCreate failed:", res.error); } +} - const { value: result } = res; +run(); +``` +### Example Usage: Unauthorized + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.connections.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: { + platformKey: "gbol", + }, + }); - // Handle the result console.log(result); } run(); ``` +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { connectionsCreate } from "@codat/sync-for-expenses/funcs/connectionsCreate.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await connectionsCreate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: { + platformKey: "gbol", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("connectionsCreate failed:", res.error); + } +} + +run(); +``` + ### Parameters | Parameter | Type | Required | Description | @@ -179,10 +224,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## get @@ -190,6 +236,7 @@ run(); ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -203,7 +250,6 @@ async function run() { connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", }); - // Handle the result console.log(result); } @@ -229,15 +275,12 @@ async function run() { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("connectionsGet failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -258,10 +301,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## delete @@ -270,6 +314,7 @@ This operation is not reversible. The end user would need to reauthorize a new d ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -308,14 +353,12 @@ async function run() { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("connectionsDelete failed:", res.error); } - - const { value: result } = res; - - } run(); @@ -336,10 +379,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## unlink @@ -347,6 +391,7 @@ run(); ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -363,7 +408,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -392,15 +436,12 @@ async function run() { status: "Unlinked", }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("connectionsUnlink failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -421,10 +462,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## createPartnerExpenseConnection @@ -432,6 +474,7 @@ Creates a partner expense data connection ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -444,7 +487,6 @@ async function run() { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - // Handle the result console.log(result); } @@ -469,15 +511,12 @@ async function run() { const res = await connectionsCreatePartnerExpenseConnection(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("connectionsCreatePartnerExpenseConnection failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -498,7 +537,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/customers/README.md b/sync-for-expenses/docs/sdks/customers/README.md index 3708bb7c2..08faa5645 100644 --- a/sync-for-expenses/docs/sdks/customers/README.md +++ b/sync-for-expenses/docs/sdks/customers/README.md @@ -1,5 +1,4 @@ # Customers -(*customers*) ## Overview @@ -21,8 +20,1606 @@ The *List customers* endpoint returns a list of [customers](https://docs.codat.i Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). -### Example Usage +### Example Usage: Clear Books + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Wave + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListCustomersRequest](../../sdk/models/operations/listcustomersrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Customers](../../sdk/models/shared/customers.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get customer* endpoint returns a single customer for a given customerId. + +[Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). + + +### Example Usage: Clear Books + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersGet } from "@codat/sync-for-expenses/funcs/customersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersGet } from "@codat/sync-for-expenses/funcs/customersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersGet } from "@codat/sync-for-expenses/funcs/customersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersGet } from "@codat/sync-for-expenses/funcs/customersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersGet } from "@codat/sync-for-expenses/funcs/customersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersGet } from "@codat/sync-for-expenses/funcs/customersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersGet } from "@codat/sync-for-expenses/funcs/customersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersGet } from "@codat/sync-for-expenses/funcs/customersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersGet } from "@codat/sync-for-expenses/funcs/customersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersGet } from "@codat/sync-for-expenses/funcs/customersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersGet } from "@codat/sync-for-expenses/funcs/customersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersGet } from "@codat/sync-for-expenses/funcs/customersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); + } +} +run(); +``` +### Example Usage: Sage 50 (UK) + + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -31,15 +1628,11 @@ const codatSyncExpenses = new CodatSyncExpenses({ }); async function run() { - const result = await codatSyncExpenses.customers.list({ + const result = await codatSyncExpenses.customers.get({ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - page: 1, - pageSize: 100, - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", }); - // Handle the result console.log(result); } @@ -52,7 +1645,7 @@ The standalone function version of this method: ```typescript import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; -import { customersList } from "@codat/sync-for-expenses/funcs/customersList.js"; +import { customersGet } from "@codat/sync-for-expenses/funcs/customersGet.js"; // Use `CodatSyncExpensesCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -61,58 +1654,125 @@ const codatSyncExpenses = new CodatSyncExpensesCore({ }); async function run() { - const res = await customersList(codatSyncExpenses, { + const res = await customersGet(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - page: 1, - pageSize: 100, - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); - const { value: result } = res; +async function run() { + const result = await codatSyncExpenses.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); - // Handle the result console.log(result); } run(); ``` -### Parameters +### Standalone function -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListCustomersRequest](../../sdk/models/operations/listcustomersrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +The standalone function version of this method: -### Response +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersGet } from "@codat/sync-for-expenses/funcs/customersGet.js"; -**Promise\<[shared.Customers](../../sdk/models/shared/customers.md)\>** +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); -### Errors +async function run() { + const res = await customersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); + } +} -| Error Type | Status Code | Content Type | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +run(); +``` +### Example Usage: Sage Intacct -## get + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; -The *Get customer* endpoint returns a single customer for a given customerId. +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); -[Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. +async function run() { + const result = await codatSyncExpenses.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). + console.log(result); +} +run(); +``` -### Example Usage +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersGet } from "@codat/sync-for-expenses/funcs/customersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Wave + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -123,10 +1783,9 @@ const codatSyncExpenses = new CodatSyncExpenses({ async function run() { const result = await codatSyncExpenses.customers.get({ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "7110701885", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", }); - // Handle the result console.log(result); } @@ -150,22 +1809,121 @@ const codatSyncExpenses = new CodatSyncExpensesCore({ async function run() { const res = await customersGet(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - customerId: "7110701885", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", }); - if (!res.ok) { - throw res.error; + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersGet } from "@codat/sync-for-expenses/funcs/customersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); - const { value: result } = res; +async function run() { + const result = await codatSyncExpenses.customers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); - // Handle the result console.log(result); } run(); ``` +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { customersGet } from "@codat/sync-for-expenses/funcs/customersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await customersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersGet failed:", res.error); + } +} + +run(); +``` + ### Parameters | Parameter | Type | Required | Description | @@ -181,10 +1939,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## create @@ -192,12 +1951,13 @@ The *Create customer* endpoint creates a new [customer](https://docs.codat.io/sy [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. -**Integration-specific behaviour** +**Integration-specific behavior** Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-customers-model). ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -212,16 +1972,11 @@ async function run() { customer: { modifiedDate: "2022-10-23T00:00:00Z", sourceModifiedDate: "2022-10-23T00:00:00Z", - defaultCurrency: "USD", + defaultCurrency: "GBP", contacts: [ { - phone: [ - { - number: "(877) 492-8687", - type: "Fax", - }, - ], - status: "Active", + phone: null, + status: "Unknown", modifiedDate: "2022-10-23T00:00:00Z", }, ], @@ -229,7 +1984,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -257,31 +2011,23 @@ async function run() { customer: { modifiedDate: "2022-10-23T00:00:00Z", sourceModifiedDate: "2022-10-23T00:00:00Z", - defaultCurrency: "USD", + defaultCurrency: "GBP", contacts: [ { - phone: [ - { - number: "+44 25691 154789", - type: "Primary", - }, - ], - status: "Archived", + phone: null, + status: "Unknown", modifiedDate: "2022-10-23T00:00:00Z", }, ], status: "Unknown", }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersCreate failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -302,10 +2048,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## update @@ -313,12 +2060,13 @@ The *Update customer* endpoint updates an existing [customer](https://docs.codat [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. -**Integration-specific behaviour** +**Integration-specific behavior** Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-customers-model). ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -330,52 +2078,20 @@ async function run() { const result = await codatSyncExpenses.customers.update({ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "7110701885", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", customer: { modifiedDate: "2022-10-23T00:00:00Z", sourceModifiedDate: "2022-10-23T00:00:00Z", - defaultCurrency: "USD", + defaultCurrency: "GBP", contacts: [ - { - phone: [ - { - number: "(877) 492-8687", - type: "Unknown", - }, - { - number: "+44 25691 154789", - type: "Unknown", - }, - ], - status: "Active", - modifiedDate: "2022-10-23T00:00:00Z", - }, - { - phone: [ - { - number: "01224 658 999", - type: "Mobile", - }, - ], - status: "Unknown", - modifiedDate: "2022-10-23T00:00:00Z", - }, { phone: [ { number: "+44 25691 154789", - type: "Mobile", - }, - { - number: "01224 658 999", - type: "Fax", - }, - { - number: "(877) 492-8687", type: "Primary", }, ], - status: "Archived", + status: "Unknown", modifiedDate: "2022-10-23T00:00:00Z", }, ], @@ -383,7 +2099,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -408,67 +2123,32 @@ async function run() { const res = await customersUpdate(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - customerId: "7110701885", + customerId: "13d946f0-c5d5-42bc-b092-97ece17923ab", customer: { modifiedDate: "2022-10-23T00:00:00Z", sourceModifiedDate: "2022-10-23T00:00:00Z", - defaultCurrency: "USD", + defaultCurrency: "GBP", contacts: [ - { - phone: [ - { - number: "(877) 492-8687", - type: "Unknown", - }, - { - number: "+44 25691 154789", - type: "Unknown", - }, - ], - status: "Active", - modifiedDate: "2022-10-23T00:00:00Z", - }, - { - phone: [ - { - number: "(877) 492-8687", - type: "Mobile", - }, - ], - status: "Unknown", - modifiedDate: "2022-10-23T00:00:00Z", - }, { phone: [ { number: "+44 25691 154789", - type: "Mobile", - }, - { - number: "01224 658 999", - type: "Fax", - }, - { - number: "(877) 492-8687", type: "Primary", }, ], - status: "Archived", + status: "Unknown", modifiedDate: "2022-10-23T00:00:00Z", }, ], status: "Active", }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("customersUpdate failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -489,7 +2169,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/expenses/README.md b/sync-for-expenses/docs/sdks/expenses/README.md index af8ba5580..884bbe4f7 100644 --- a/sync-for-expenses/docs/sdks/expenses/README.md +++ b/sync-for-expenses/docs/sdks/expenses/README.md @@ -1,5 +1,4 @@ # Expenses -(*expenses*) ## Overview @@ -25,10 +24,272 @@ The *Create expense* endpoint creates an [expense transaction](https://docs.coda | QuickBooks Desktop | Yes | | QuickBooks Online | Yes | | Oracle NetSuite | Yes | +| Sage Intacct | Yes | | Xero | Yes | +| Zoho Books | Yes | -### Example Usage +### Example Usage: Example 1 + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.expenses.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: [ + { + id: "a44135b0-6882-489a-83fe-a0c57a4afb19", + type: "Payment", + issueDate: "2024-05-21T00:00:00+00:00", + currency: "GBP", + currencyRate: new Decimal("1"), + contactRef: { + id: "430", + }, + bankAccountRef: { + id: "97", + }, + merchantName: "Amazon UK", + lines: [ + { + netAmount: new Decimal("100"), + taxAmount: new Decimal("20"), + taxRateRef: { + id: "23_Bills", + }, + accountRef: { + id: "35", + }, + trackingRefs: [ + { + id: "DEPARTMENT_3", + }, + {}, + ], + invoiceTo: { + id: "504", + type: "customer", + }, + }, + ], + notes: "amazon purchase", + }, + ], + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { expensesCreate } from "@codat/sync-for-expenses/funcs/expensesCreate.js"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await expensesCreate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: [ + { + id: "a44135b0-6882-489a-83fe-a0c57a4afb19", + type: "Payment", + issueDate: "2024-05-21T00:00:00+00:00", + currency: "GBP", + currencyRate: new Decimal("1"), + contactRef: { + id: "430", + }, + bankAccountRef: { + id: "97", + }, + merchantName: "Amazon UK", + lines: [ + { + netAmount: new Decimal("100"), + taxAmount: new Decimal("20"), + taxRateRef: { + id: "23_Bills", + }, + accountRef: { + id: "35", + }, + trackingRefs: [ + { + id: "DEPARTMENT_3", + }, + {}, + ], + invoiceTo: { + id: "504", + type: "customer", + }, + }, + ], + notes: "amazon purchase", + }, + ], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("expensesCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Malformed query + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.expenses.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: [ + { + id: "a44135b0-6882-489a-83fe-a0c57a4afb19", + type: "Payment", + issueDate: "2024-05-21T00:00:00+00:00", + currency: "GBP", + currencyRate: new Decimal("1"), + contactRef: { + id: "430", + }, + bankAccountRef: { + id: "97", + }, + merchantName: "Amazon UK", + lines: [ + { + netAmount: new Decimal("100"), + taxAmount: new Decimal("20"), + taxRateRef: { + id: "23_Bills", + }, + accountRef: { + id: "35", + }, + trackingRefs: [ + { + id: "DEPARTMENT_3", + }, + {}, + ], + invoiceTo: { + id: "504", + type: "customer", + }, + }, + ], + notes: "amazon purchase", + }, + ], + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { expensesCreate } from "@codat/sync-for-expenses/funcs/expensesCreate.js"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await expensesCreate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: [ + { + id: "a44135b0-6882-489a-83fe-a0c57a4afb19", + type: "Payment", + issueDate: "2024-05-21T00:00:00+00:00", + currency: "GBP", + currencyRate: new Decimal("1"), + contactRef: { + id: "430", + }, + bankAccountRef: { + id: "97", + }, + merchantName: "Amazon UK", + lines: [ + { + netAmount: new Decimal("100"), + taxAmount: new Decimal("20"), + taxRateRef: { + id: "23_Bills", + }, + accountRef: { + id: "35", + }, + trackingRefs: [ + { + id: "DEPARTMENT_3", + }, + {}, + ], + invoiceTo: { + id: "504", + type: "customer", + }, + }, + ], + notes: "amazon purchase", + }, + ], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("expensesCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Payment + + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; import { Decimal } from "@codat/sync-for-expenses/sdk/types"; @@ -49,7 +310,6 @@ async function run() { currencyRate: new Decimal("1"), contactRef: { id: "430", - type: "Supplier", }, bankAccountRef: { id: "97", @@ -68,7 +328,6 @@ async function run() { trackingRefs: [ { id: "DEPARTMENT_5", - dataType: "trackingCategories", }, ], invoiceTo: { @@ -82,7 +341,6 @@ async function run() { ], }); - // Handle the result console.log(result); } @@ -116,7 +374,6 @@ async function run() { currencyRate: new Decimal("1"), contactRef: { id: "430", - type: "Supplier", }, bankAccountRef: { id: "97", @@ -135,7 +392,6 @@ async function run() { trackingRefs: [ { id: "DEPARTMENT_5", - dataType: "trackingCategories", }, ], invoiceTo: { @@ -148,20 +404,134 @@ async function run() { }, ], }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("expensesCreate failed:", res.error); } +} - const { value: result } = res; +run(); +``` +### Example Usage: Refund + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.expenses.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: [ + { + id: "7008d3f2-aeb4-11ed-afa1-0242ac120002", + type: "Refund", + issueDate: "2024-02-17T00:00:00+00:00", + currency: "GBP", + contactRef: { + id: "430", + }, + bankAccountRef: { + id: "97", + }, + merchantName: "Amazon UK", + lines: [ + { + netAmount: new Decimal("100"), + taxAmount: new Decimal("20"), + taxRateRef: { + id: "23_Bills", + }, + accountRef: { + id: "42", + }, + trackingRefs: [ + { + id: "DEPARTMENT_6", + }, + ], + }, + ], + notes: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", + }, + ], + }); - // Handle the result console.log(result); } run(); ``` +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { expensesCreate } from "@codat/sync-for-expenses/funcs/expensesCreate.js"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await expensesCreate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: [ + { + id: "7008d3f2-aeb4-11ed-afa1-0242ac120002", + type: "Refund", + issueDate: "2024-02-17T00:00:00+00:00", + currency: "GBP", + contactRef: { + id: "430", + }, + bankAccountRef: { + id: "97", + }, + merchantName: "Amazon UK", + lines: [ + { + netAmount: new Decimal("100"), + taxAmount: new Decimal("20"), + taxRateRef: { + id: "23_Bills", + }, + accountRef: { + id: "42", + }, + trackingRefs: [ + { + id: "DEPARTMENT_6", + }, + ], + }, + ], + notes: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", + }, + ], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("expensesCreate failed:", res.error); + } +} + +run(); +``` + ### Parameters | Parameter | Type | Required | Description | @@ -177,10 +547,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## update @@ -188,17 +559,136 @@ The *Update expense* endpoint updates an existing [expense transaction](https:// [Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/UpdateExpenseRequest) represent transactions made with a company debit or credit card. -### Supported Integrations +### Supported integrations The following integrations are supported for the [Payment](https://docs.codat.io/expenses/sync-process/expense-transactions#transaction-types) transaction `type` only: | Integration | Supported | |-----------------------|-----------| | FreeAgent | Yes | +| QuickBooks Desktop | Yes | | QuickBooks Online | Yes | | Oracle NetSuite | Yes | +| Sage Intacct | Yes | | Xero | Yes | +| Zoho Books | Yes | + +#### Integration-specific behavior -### Example Usage +| Integration | Specifics | +|-----------------------|-----------| +| Sage Intacct | To sync **debit card expenses**, map the debit card to a Credit Card with the account type set to `Debit`.| +### Example Usage: Malformed query + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.expenses.update({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", + updateExpenseRequest: { + type: "Payment", + issueDate: "2022-06-28T00:00:00.000Z", + currency: "GBP", + contactRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + bankAccountRef: { + id: "787dfb37-5707-4dc0-8a86-8d74e4cc78ea", + }, + merchantName: "Amazon UK", + lines: [ + { + netAmount: new Decimal("100"), + taxAmount: new Decimal("20"), + taxRateRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + accountRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + itemRef: null, + trackingRefs: null, + invoiceTo: null, + }, + ], + notes: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { expensesUpdate } from "@codat/sync-for-expenses/funcs/expensesUpdate.js"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await expensesUpdate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", + updateExpenseRequest: { + type: "Payment", + issueDate: "2022-06-28T00:00:00.000Z", + currency: "GBP", + contactRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + bankAccountRef: { + id: "787dfb37-5707-4dc0-8a86-8d74e4cc78ea", + }, + merchantName: "Amazon UK", + lines: [ + { + netAmount: new Decimal("100"), + taxAmount: new Decimal("20"), + taxRateRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + accountRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + itemRef: null, + trackingRefs: null, + invoiceTo: null, + }, + ], + notes: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("expensesUpdate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Payment + + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; import { Decimal } from "@codat/sync-for-expenses/sdk/types"; @@ -218,7 +708,6 @@ async function run() { currencyRate: new Decimal("1"), contactRef: { id: "430", - type: "Supplier", }, bankAccountRef: { id: "97", @@ -237,7 +726,6 @@ async function run() { trackingRefs: [ { id: "DEPARTMENT_5", - dataType: "trackingCategories", }, ], invoiceTo: { @@ -250,7 +738,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -283,7 +770,6 @@ async function run() { currencyRate: new Decimal("1"), contactRef: { id: "430", - type: "Supplier", }, bankAccountRef: { id: "97", @@ -302,7 +788,6 @@ async function run() { trackingRefs: [ { id: "DEPARTMENT_5", - dataType: "trackingCategories", }, ], invoiceTo: { @@ -314,15 +799,12 @@ async function run() { notes: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("expensesUpdate failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -343,7 +825,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 422, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 422, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/managedata/README.md b/sync-for-expenses/docs/sdks/managedata/README.md index 1189c869b..6d2c36771 100644 --- a/sync-for-expenses/docs/sdks/managedata/README.md +++ b/sync-for-expenses/docs/sdks/managedata/README.md @@ -1,5 +1,4 @@ # ManageData -(*manageData*) ## Overview @@ -23,6 +22,7 @@ This is an asynchronous operation, and will bring updated data into Codat from t ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -59,14 +59,12 @@ async function run() { const res = await manageDataRefreshAllDataTypes(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + + } else { + console.log("manageDataRefreshAllDataTypes failed:", res.error); } - - const { value: result } = res; - - } run(); @@ -87,10 +85,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## get @@ -98,6 +97,7 @@ Get the state of each data type for a company ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -110,7 +110,6 @@ async function run() { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - // Handle the result console.log(result); } @@ -135,15 +134,12 @@ async function run() { const res = await manageDataGet(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("manageDataGet failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -164,10 +160,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## refreshDataType @@ -177,6 +174,7 @@ This is an asynchronous operation, and will bring updated data into Codat from t ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -190,7 +188,6 @@ async function run() { dataType: "invoices", }); - // Handle the result console.log(result); } @@ -216,15 +213,12 @@ async function run() { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", dataType: "invoices", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("manageDataRefreshDataType failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -245,10 +239,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## listPullOperations @@ -256,6 +251,7 @@ Gets the pull operation history (datasets) for a given company. ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -266,13 +262,10 @@ const codatSyncExpenses = new CodatSyncExpenses({ async function run() { const result = await codatSyncExpenses.manageData.listPullOperations({ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", }); - // Handle the result console.log(result); } @@ -296,20 +289,15 @@ const codatSyncExpenses = new CodatSyncExpensesCore({ async function run() { const res = await manageDataListPullOperations(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("manageDataListPullOperations failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -330,10 +318,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## getPullOperation @@ -341,6 +330,7 @@ Retrieve information about a single dataset or pull operation. ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -351,10 +341,9 @@ const codatSyncExpenses = new CodatSyncExpenses({ async function run() { const result = await codatSyncExpenses.manageData.getPullOperation({ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - datasetId: "71a4c0fb-8e15-45bd-958d-330b4e6e9f07", + datasetId: "fa5f3e86-bd80-49b8-853c-5fbba4b201f5", }); - // Handle the result console.log(result); } @@ -378,17 +367,14 @@ const codatSyncExpenses = new CodatSyncExpensesCore({ async function run() { const res = await manageDataGetPullOperation(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - datasetId: "71a4c0fb-8e15-45bd-958d-330b4e6e9f07", + datasetId: "fa5f3e86-bd80-49b8-853c-5fbba4b201f5", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("manageDataGetPullOperation failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -409,7 +395,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/mappingoptions/README.md b/sync-for-expenses/docs/sdks/mappingoptions/README.md index e9342e525..6a5f6047e 100644 --- a/sync-for-expenses/docs/sdks/mappingoptions/README.md +++ b/sync-for-expenses/docs/sdks/mappingoptions/README.md @@ -1,5 +1,4 @@ # MappingOptions -(*mappingOptions*) ## Overview @@ -15,6 +14,7 @@ Gets the mapping options (accounts, trackingCategories and taxRates) for a compa ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -27,7 +27,6 @@ async function run() { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - // Handle the result console.log(result); } @@ -52,15 +51,12 @@ async function run() { const res = await mappingOptionsGetMappingOptions(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("mappingOptionsGetMappingOptions failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -81,7 +77,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/pushoperations/README.md b/sync-for-expenses/docs/sdks/pushoperations/README.md index 180863cfa..d6ecb414c 100644 --- a/sync-for-expenses/docs/sdks/pushoperations/README.md +++ b/sync-for-expenses/docs/sdks/pushoperations/README.md @@ -1,5 +1,4 @@ # PushOperations -(*pushOperations*) ## Overview @@ -16,6 +15,7 @@ List push operation records. ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -26,13 +26,10 @@ const codatSyncExpenses = new CodatSyncExpenses({ async function run() { const result = await codatSyncExpenses.pushOperations.list({ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", }); - // Handle the result console.log(result); } @@ -56,20 +53,15 @@ const codatSyncExpenses = new CodatSyncExpensesCore({ async function run() { const res = await pushOperationsList(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - page: 1, - pageSize: 100, query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", orderBy: "-modifiedDate", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("pushOperationsList failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -90,10 +82,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## get @@ -101,6 +94,7 @@ Retrieve push operation. ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -111,10 +105,9 @@ const codatSyncExpenses = new CodatSyncExpenses({ async function run() { const result = await codatSyncExpenses.pushOperations.get({ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "b888f774-3e7c-4135-a18c-6b985523c4bc", + pushOperationKey: "660e8684-c0fb-4468-9e2a-b2e3b115d747", }); - // Handle the result console.log(result); } @@ -138,17 +131,14 @@ const codatSyncExpenses = new CodatSyncExpensesCore({ async function run() { const res = await pushOperationsGet(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - pushOperationKey: "b888f774-3e7c-4135-a18c-6b985523c4bc", + pushOperationKey: "660e8684-c0fb-4468-9e2a-b2e3b115d747", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("pushOperationsGet failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -169,7 +159,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/reimbursements/README.md b/sync-for-expenses/docs/sdks/reimbursements/README.md index c1cd98a80..d11c97540 100644 --- a/sync-for-expenses/docs/sdks/reimbursements/README.md +++ b/sync-for-expenses/docs/sdks/reimbursements/README.md @@ -1,5 +1,4 @@ # Reimbursements -(*reimbursements*) ## Overview @@ -12,20 +11,23 @@ Create and update transactions that represent your customers' repayable spend. ## create -Use the *Create reimbursable expense* endpoint to submit an employee expense claim in the accounting platform for a given company's connection. - -[Reimbursable expense requests](https://docs.codat.io/sync-for-expenses-api#/schemas/ReimbursableExpenseTransactionRequest) are reflected in the accounting software in the form of **Bills** against an employee (who exists as a supplier in the accounting platform). - -### Supported Integrations -| Integration | Supported | -|-----------------------|-----------| -| FreeAgent | Yes | -| QuickBooks Desktop | Yes | -| QuickBooks Online | Yes | +Use the *Create reimbursable expense* endpoint to submit an employee expense claim in the accounting platform for a given company's connection. + +[Reimbursable expense requests](https://docs.codat.io/sync-for-expenses-api#/schemas/ReimbursableExpenseTransactionRequest) are reflected in the accounting software in the form of **Bills** against an employee (who exists as a supplier in the accounting platform). + +### Supported Integrations +| Integration | Supported | +|-----------------------|-----------| +| FreeAgent | Yes | +| QuickBooks Desktop | Yes | +| QuickBooks Online | Yes | | Oracle NetSuite | Yes | +| Zoho Books | Yes | +| Sage Intacct | Yes | -### Example Usage +### Example Usage: Create reimbursable expense + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; import { Decimal } from "@codat/sync-for-expenses/sdk/types"; @@ -63,7 +65,6 @@ async function run() { trackingRefs: [ { id: "DEPARTMENT_5", - dataType: "trackingCategories", }, ], invoiceTo: { @@ -76,7 +77,6 @@ async function run() { ], }); - // Handle the result console.log(result); } @@ -127,7 +127,6 @@ async function run() { trackingRefs: [ { id: "DEPARTMENT_5", - dataType: "trackingCategories", }, ], invoiceTo: { @@ -139,20 +138,271 @@ async function run() { }, ], }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("reimbursementsCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Example 1 + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.reimbursements.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: [ + { + id: "4d7c6929-7770-412b-91bb-44d3bc71d111", + contactRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + apAccountRef: null, + issueDate: "2022-10-23T00:00:00Z", + dueDate: "2022-10-23T00:00:00Z", + currency: "GBP", + notes: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", + lines: [ + { + description: "2-night hotel stay", + netAmount: new Decimal("100"), + taxAmount: new Decimal("20"), + taxRateRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + accountRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + itemRef: { + id: "80000002-1675158984", + }, + trackingRefs: [ + { + id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", + }, + ], + invoiceTo: { + id: "80000002-1674552702", + type: "customer", + }, + }, + ], + }, + ], + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { reimbursementsCreate } from "@codat/sync-for-expenses/funcs/reimbursementsCreate.js"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; - if (!res.ok) { - throw res.error; +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await reimbursementsCreate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: [ + { + id: "4d7c6929-7770-412b-91bb-44d3bc71d111", + contactRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + apAccountRef: null, + issueDate: "2022-10-23T00:00:00Z", + dueDate: "2022-10-23T00:00:00Z", + currency: "GBP", + notes: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", + lines: [ + { + description: "2-night hotel stay", + netAmount: new Decimal("100"), + taxAmount: new Decimal("20"), + taxRateRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + accountRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + itemRef: { + id: "80000002-1675158984", + }, + trackingRefs: [ + { + id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", + }, + ], + invoiceTo: { + id: "80000002-1674552702", + type: "customer", + }, + }, + ], + }, + ], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("reimbursementsCreate failed:", res.error); } +} - const { value: result } = res; +run(); +``` +### Example Usage: Malformed query + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.reimbursements.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: [ + { + id: "4d7c6929-7770-412b-91bb-44d3bc71d111", + contactRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + apAccountRef: null, + issueDate: "2022-10-23T00:00:00Z", + dueDate: "2022-10-23T00:00:00Z", + currency: "GBP", + notes: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", + lines: [ + { + description: "2-night hotel stay", + netAmount: new Decimal("100"), + taxAmount: new Decimal("20"), + taxRateRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + accountRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + itemRef: { + id: "80000002-1675158984", + }, + trackingRefs: [ + { + id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", + }, + ], + invoiceTo: { + id: "80000002-1674552702", + type: "customer", + }, + }, + ], + }, + ], + }); - // Handle the result console.log(result); } run(); ``` +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { reimbursementsCreate } from "@codat/sync-for-expenses/funcs/reimbursementsCreate.js"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await reimbursementsCreate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: [ + { + id: "4d7c6929-7770-412b-91bb-44d3bc71d111", + contactRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + apAccountRef: null, + issueDate: "2022-10-23T00:00:00Z", + dueDate: "2022-10-23T00:00:00Z", + currency: "GBP", + notes: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", + lines: [ + { + description: "2-night hotel stay", + netAmount: new Decimal("100"), + taxAmount: new Decimal("20"), + taxRateRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + accountRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + itemRef: { + id: "80000002-1675158984", + }, + trackingRefs: [ + { + id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", + }, + ], + invoiceTo: { + id: "80000002-1674552702", + type: "customer", + }, + }, + ], + }, + ], + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("reimbursementsCreate failed:", res.error); + } +} + +run(); +``` + ### Parameters | Parameter | Type | Required | Description | @@ -168,26 +418,284 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## update -The *Update reimbursable expense* endpoint updates an existing employee expense claim in the accounting platform for a given company's connection. - -Updating an existing [reimbursable expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/UpdateReimbursableExpenseTransactionRequest) will update the existing **bill** against an employee (who exists as a supplier in the accounting software). - -### Supported Integrations -| Integration | Supported | -|-----------------------|-----------| -| FreeAgent | Yes | -| QuickBooks Online | Yes | +The *Update reimbursable expense* endpoint updates an existing employee expense claim in the accounting platform for a given company's connection. + +Updating an existing [reimbursable expense transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/UpdateReimbursableExpenseTransactionRequest) will update the existing **bill** against an employee (who exists as a supplier in the accounting software). + +### Supported Integrations +| Integration | Supported | +|-----------------------|-----------| +| FreeAgent | Yes | +| QuickBooks Online | Yes | | Oracle NetSuite | Yes | +| Sage Intacct | Yes | +| Zoho Books | Yes | -### Example Usage +### Example Usage: Example 1 + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.reimbursements.update({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", + updateReimbursableExpenseTransactionRequest: { + contactRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + apAccountRef: { + id: "8000004C-1724173136", + }, + issueDate: "2022-10-23T00:00:00Z", + dueDate: "2022-10-23T00:00:00Z", + currency: "GBP", + notes: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", + lines: [ + { + description: "2-night hotel stay", + netAmount: new Decimal("100"), + taxAmount: new Decimal("20"), + taxRateRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + accountRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + itemRef: { + id: "80000002-1675158984", + }, + trackingRefs: [ + { + id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", + }, + ], + invoiceTo: { + id: "80000002-1674552702", + type: "customer", + }, + }, + ], + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { reimbursementsUpdate } from "@codat/sync-for-expenses/funcs/reimbursementsUpdate.js"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await reimbursementsUpdate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", + updateReimbursableExpenseTransactionRequest: { + contactRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + apAccountRef: { + id: "8000004C-1724173136", + }, + issueDate: "2022-10-23T00:00:00Z", + dueDate: "2022-10-23T00:00:00Z", + currency: "GBP", + notes: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", + lines: [ + { + description: "2-night hotel stay", + netAmount: new Decimal("100"), + taxAmount: new Decimal("20"), + taxRateRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + accountRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + itemRef: { + id: "80000002-1675158984", + }, + trackingRefs: [ + { + id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", + }, + ], + invoiceTo: { + id: "80000002-1674552702", + type: "customer", + }, + }, + ], + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("reimbursementsUpdate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Malformed query + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.reimbursements.update({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", + updateReimbursableExpenseTransactionRequest: { + contactRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + apAccountRef: { + id: "8000004C-1724173136", + }, + issueDate: "2022-10-23T00:00:00Z", + dueDate: "2022-10-23T00:00:00Z", + currency: "GBP", + notes: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", + lines: [ + { + description: "2-night hotel stay", + netAmount: new Decimal("100"), + taxAmount: new Decimal("20"), + taxRateRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + accountRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + itemRef: { + id: "80000002-1675158984", + }, + trackingRefs: [ + { + id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", + }, + ], + invoiceTo: { + id: "80000002-1674552702", + type: "customer", + }, + }, + ], + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { reimbursementsUpdate } from "@codat/sync-for-expenses/funcs/reimbursementsUpdate.js"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await reimbursementsUpdate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", + updateReimbursableExpenseTransactionRequest: { + contactRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + apAccountRef: { + id: "8000004C-1724173136", + }, + issueDate: "2022-10-23T00:00:00Z", + dueDate: "2022-10-23T00:00:00Z", + currency: "GBP", + notes: "APPLE.COM/BILL - 09001077498 - Card Ending: 4590", + lines: [ + { + description: "2-night hotel stay", + netAmount: new Decimal("100"), + taxAmount: new Decimal("20"), + taxRateRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + accountRef: { + id: "40e3e57c-2322-4898-966c-ca41adfd23fd", + }, + itemRef: { + id: "80000002-1675158984", + }, + trackingRefs: [ + { + id: "e9a1b63d-9ff0-40e7-8038-016354b987e6", + }, + ], + invoiceTo: { + id: "80000002-1674552702", + type: "customer", + }, + }, + ], + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("reimbursementsUpdate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Update reimbursable expense + + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; import { Decimal } from "@codat/sync-for-expenses/sdk/types"; @@ -224,7 +732,6 @@ async function run() { trackingRefs: [ { id: "DEPARTMENT_5", - dataType: "trackingCategories", }, ], invoiceTo: { @@ -236,7 +743,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -286,7 +792,6 @@ async function run() { trackingRefs: [ { id: "DEPARTMENT_5", - dataType: "trackingCategories", }, ], invoiceTo: { @@ -297,15 +802,12 @@ async function run() { ], }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("reimbursementsUpdate failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -326,7 +828,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/suppliers/README.md b/sync-for-expenses/docs/sdks/suppliers/README.md index 95f55bf39..72498acb8 100644 --- a/sync-for-expenses/docs/sdks/suppliers/README.md +++ b/sync-for-expenses/docs/sdks/suppliers/README.md @@ -1,5 +1,4 @@ # Suppliers -(*suppliers*) ## Overview @@ -18,11 +17,1737 @@ The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.i [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). - +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-all-data-types). -### Example Usage +### Supported Integrations + +| Integration | Supported | +|-------------------------------|-----------| +| Dynamics 365 Business Central | Yes | +| FreeAgent | Yes | +| Oracle NetSuite | Yes | +| QuickBooks Desktop | Yes | +| QuickBooks Online | Yes | +| Sage Intacct | Yes | +| Xero | Yes | +| Zoho Books | Yes | + + +### Example Usage: Clear Books + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Wave + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Xero + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.list({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersList failed:", res.error); + } +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListSuppliersRequest](../../sdk/models/operations/listsuppliersrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[shared.Suppliers](../../sdk/models/shared/suppliers.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | + +## get + +The *Get supplier* endpoint returns a single supplier for a given supplierId. + +[Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-all-data-types). + +### Supported Integrations + +| Integration | Supported | +|-------------------------------|-----------| +| Dynamics 365 Business Central | Yes | +| FreeAgent | Yes | +| Oracle NetSuite | Yes | +| QuickBooks Desktop | Yes | +| QuickBooks Online | Yes | +| Sage Intacct | Yes | +| Xero | Yes | +| Zoho Books | Yes | + + +### Example Usage: Clear Books + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersGet } from "@codat/sync-for-expenses/funcs/suppliersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Dynamics 365 Business Central + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersGet } from "@codat/sync-for-expenses/funcs/suppliersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (Netherlands) + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersGet } from "@codat/sync-for-expenses/funcs/suppliersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Exact (UK) + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersGet } from "@codat/sync-for-expenses/funcs/suppliersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreeAgent + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersGet } from "@codat/sync-for-expenses/funcs/suppliersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: FreshBooks + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersGet } from "@codat/sync-for-expenses/funcs/suppliersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: KashFlow + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersGet } from "@codat/sync-for-expenses/funcs/suppliersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Oracle NetSuite + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersGet } from "@codat/sync-for-expenses/funcs/suppliersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Desktop + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersGet } from "@codat/sync-for-expenses/funcs/suppliersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersGet } from "@codat/sync-for-expenses/funcs/suppliersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: QuickBooks Online Sandbox + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersGet } from "@codat/sync-for-expenses/funcs/suppliersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 200cloud + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersGet } from "@codat/sync-for-expenses/funcs/suppliersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage 50 (UK) + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersGet } from "@codat/sync-for-expenses/funcs/suppliersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Business Cloud Accounting + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersGet } from "@codat/sync-for-expenses/funcs/suppliersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); + } +} +run(); +``` +### Example Usage: Sage Intacct + + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -31,15 +1756,11 @@ const codatSyncExpenses = new CodatSyncExpenses({ }); async function run() { - const result = await codatSyncExpenses.suppliers.list({ + const result = await codatSyncExpenses.suppliers.get({ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - page: 1, - pageSize: 100, - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", }); - // Handle the result console.log(result); } @@ -52,7 +1773,7 @@ The standalone function version of this method: ```typescript import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; -import { suppliersList } from "@codat/sync-for-expenses/funcs/suppliersList.js"; +import { suppliersGet } from "@codat/sync-for-expenses/funcs/suppliersGet.js"; // Use `CodatSyncExpensesCore` for best tree-shaking performance. // You can create one instance of it to use across an application. @@ -61,58 +1782,125 @@ const codatSyncExpenses = new CodatSyncExpensesCore({ }); async function run() { - const res = await suppliersList(codatSyncExpenses, { + const res = await suppliersGet(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - page: 1, - pageSize: 100, - query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", - orderBy: "-modifiedDate", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); } +} + +run(); +``` +### Example Usage: Wave + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); - const { value: result } = res; +async function run() { + const result = await codatSyncExpenses.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); - // Handle the result console.log(result); } run(); ``` -### Parameters +### Standalone function -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `request` | [operations.ListSuppliersRequest](../../sdk/models/operations/listsuppliersrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | -| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | -| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | +The standalone function version of this method: -### Response +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersGet } from "@codat/sync-for-expenses/funcs/suppliersGet.js"; -**Promise\<[shared.Suppliers](../../sdk/models/shared/suppliers.md)\>** +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); -### Errors +async function run() { + const res = await suppliersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); + } +} -| Error Type | Status Code | Content Type | -| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 409, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +run(); +``` +### Example Usage: Xero -## get + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; -The *Get supplier* endpoint returns a single supplier for a given supplierId. +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); -[Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. +async function run() { + const result = await codatSyncExpenses.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + + console.log(result); +} -Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). +run(); +``` +### Standalone function -### Example Usage +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersGet } from "@codat/sync-for-expenses/funcs/suppliersGet.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersGet(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); + } +} + +run(); +``` +### Example Usage: Zoho Books + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -123,10 +1911,9 @@ const codatSyncExpenses = new CodatSyncExpenses({ async function run() { const result = await codatSyncExpenses.suppliers.get({ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "7110701885", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", }); - // Handle the result console.log(result); } @@ -150,17 +1937,14 @@ const codatSyncExpenses = new CodatSyncExpensesCore({ async function run() { const res = await suppliersGet(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - supplierId: "7110701885", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersGet failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -181,24 +1965,166 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 409, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 409, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## create -The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection. - -[Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - -**Integration-specific behaviour** - -Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-suppliers-model). +The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection. + +[Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. +**Integration-specific behavior** -### Example Usage +Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-suppliers-model). + +### Supported Integrations + +| Integration | Supported | +|-------------------------------|-----------| +| Dynamics 365 Business Central | Yes | +| FreeAgent | Yes | +| Oracle NetSuite | Yes | +| QuickBooks Desktop | Yes | +| QuickBooks Online | Yes | +| Sage Intacct | Yes | +| Xero | Yes | +| Zoho Books | Yes | + + +### Example Usage: Malformed query + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); +async function run() { + const result = await codatSyncExpenses.suppliers.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + supplier: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", + supplierName: "Kelly's Industrial Supplies", + contactName: "Kelly's Industrial Supplies", + emailAddress: "sales@kellysupplies.com", + phone: "07999 999999", + addresses: [ + { + type: "Billing", + line1: "Unit 51", + line2: "Bakersfield Industrial Estate", + city: "Bakersfield", + region: "California", + country: "USA", + }, + ], + registrationNumber: "string", + taxNumber: "string", + status: "Unknown", + defaultCurrency: "string", + metadata: { + isDeleted: true, + }, + supplementalData: { + content: { + "property1": { + "property1": "", + "property2": "", + }, + "property2": { + "property1": "", + "property2": "", + }, + }, + }, + }, + }); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { suppliersCreate } from "@codat/sync-for-expenses/funcs/suppliersCreate.js"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersCreate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + supplier: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "C520FFD4-F6F6-4FC2-A6D2-5D7088B2B14F", + supplierName: "Kelly's Industrial Supplies", + contactName: "Kelly's Industrial Supplies", + emailAddress: "sales@kellysupplies.com", + phone: "07999 999999", + addresses: [ + { + type: "Billing", + line1: "Unit 51", + line2: "Bakersfield Industrial Estate", + city: "Bakersfield", + region: "California", + country: "USA", + }, + ], + registrationNumber: "string", + taxNumber: "string", + status: "Unknown", + defaultCurrency: "string", + metadata: { + isDeleted: true, + }, + supplementalData: { + content: { + "property1": { + "property1": "", + "property2": "", + }, + "property2": { + "property1": "", + "property2": "", + }, + }, + }, + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Sage Intacct + + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -218,7 +2144,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -250,15 +2175,12 @@ async function run() { status: "Active", }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersCreate failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -279,23 +2201,34 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## update -The *Update supplier* endpoint updates an existing [supplier](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection. - -[Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. - -**Integration-specific behaviour** - +The *Update supplier* endpoint updates an existing [supplier](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) for a given company's connection. + +[Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + +**Integration-specific behavior** + Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-suppliers-model). +### Supported Integrations + +| Integration | Supported | +|-------------------|-----------| +| FreeAgent | Yes | +| QuickBooks Online | Yes | +| Xero | Yes | + + ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -307,7 +2240,7 @@ async function run() { const result = await codatSyncExpenses.suppliers.update({ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - supplierId: "EILBDVJVNUAGVKRQ", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", supplier: { modifiedDate: "2022-10-23T00:00:00Z", sourceModifiedDate: "2022-10-23T00:00:00Z", @@ -348,7 +2281,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -373,7 +2305,7 @@ async function run() { const res = await suppliersUpdate(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - supplierId: "EILBDVJVNUAGVKRQ", + supplierId: "13d946f0-c5d5-42bc-b092-97ece17923ab", supplier: { modifiedDate: "2022-10-23T00:00:00Z", sourceModifiedDate: "2022-10-23T00:00:00Z", @@ -413,15 +2345,12 @@ async function run() { }, }, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("suppliersUpdate failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -442,7 +2371,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/sync/README.md b/sync-for-expenses/docs/sdks/sync/README.md index eaf32d6c6..98c55ce05 100644 --- a/sync-for-expenses/docs/sdks/sync/README.md +++ b/sync-for-expenses/docs/sdks/sync/README.md @@ -1,5 +1,4 @@ # Sync -(*sync*) ## Overview @@ -18,6 +17,7 @@ Gets the status of the last successful sync ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -30,7 +30,6 @@ async function run() { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - // Handle the result console.log(result); } @@ -55,15 +54,12 @@ async function run() { const res = await syncGetLastSuccessfulSync(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("syncGetLastSuccessfulSync failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -84,10 +80,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## getLatestSync @@ -95,6 +92,7 @@ Gets the latest sync status ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -107,7 +105,6 @@ async function run() { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - // Handle the result console.log(result); } @@ -132,15 +129,12 @@ async function run() { const res = await syncGetLatestSync(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("syncGetLatestSync failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -161,10 +155,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## list @@ -172,6 +167,7 @@ Gets a list of sync statuses ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -184,7 +180,6 @@ async function run() { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - // Handle the result console.log(result); } @@ -209,15 +204,12 @@ async function run() { const res = await syncList(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("syncList failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -238,10 +230,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## get @@ -249,6 +242,7 @@ Get the sync status for a specified sync ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -262,7 +256,6 @@ async function run() { syncId: "6fb40d5e-b13e-11ed-afa1-0242ac120002", }); - // Handle the result console.log(result); } @@ -288,15 +281,12 @@ async function run() { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", syncId: "6fb40d5e-b13e-11ed-afa1-0242ac120002", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("syncGet failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -317,7 +307,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/transactionstatus/README.md b/sync-for-expenses/docs/sdks/transactionstatus/README.md index d8a50b5d8..05eb6e943 100644 --- a/sync-for-expenses/docs/sdks/transactionstatus/README.md +++ b/sync-for-expenses/docs/sdks/transactionstatus/README.md @@ -1,5 +1,4 @@ # TransactionStatus -(*transactionStatus*) ## Overview @@ -16,6 +15,7 @@ Gets the transactions and status for a sync ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -27,11 +27,8 @@ async function run() { const result = await codatSyncExpenses.transactionStatus.list({ companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", syncId: "6fb40d5e-b13e-11ed-afa1-0242ac120002", - page: 1, - pageSize: 100, }); - // Handle the result console.log(result); } @@ -56,18 +53,13 @@ async function run() { const res = await transactionStatusList(codatSyncExpenses, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", syncId: "6fb40d5e-b13e-11ed-afa1-0242ac120002", - page: 1, - pageSize: 100, }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionStatusList failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -88,10 +80,11 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | ## get @@ -99,6 +92,7 @@ Gets the status of a transaction for a sync ### Example Usage + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; @@ -113,7 +107,6 @@ async function run() { transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", }); - // Handle the result console.log(result); } @@ -140,15 +133,12 @@ async function run() { syncId: "6fb40d5e-b13e-11ed-afa1-0242ac120002", transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", }); - - if (!res.ok) { - throw res.error; + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transactionStatusGet failed:", res.error); } - - const { value: result } = res; - - // Handle the result - console.log(result); } run(); @@ -169,7 +159,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| --------------------------------- | --------------------------------- | --------------------------------- | -| errors.ErrorMessage | 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ----------------------- | ----------------------- | ----------------------- | +| errors.ErrorMessage | 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/docs/sdks/transfers/README.md b/sync-for-expenses/docs/sdks/transfers/README.md index 2f114d828..40a9011b4 100644 --- a/sync-for-expenses/docs/sdks/transfers/README.md +++ b/sync-for-expenses/docs/sdks/transfers/README.md @@ -1,5 +1,4 @@ # Transfers -(*transfers*) ## Overview @@ -11,22 +10,27 @@ Create and update transactions that represent the movement of your customers' mo ## create -Use the *Create transfer* endpoint to create or update a [transfer transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/TransferTransactionRequest) in the accounting software for a given company's connection. - -Transfers record the movement of money between two bank accounts, or between a bank account and a nominal account. Use them to represent actions such as topping up a debit card account or a balance transfer to another credit card. - -The `from.amount` and `to.amount` fields are in the native currency of the account. - -### Supported Integrations -| Integration | Supported | -|-----------------------|-----------| -| FreeAgent | Yes | -| QuickBooks Desktop | Yes | -| QuickBooks Online | Yes | -| Xero | Yes | - -### Example Usage +Use the *Create transfer* endpoint to create or update a [transfer transaction](https://docs.codat.io/sync-for-expenses-api#/schemas/TransferTransactionRequest) in the accounting software for a given company's connection. +Transfers record the movement of money between two bank accounts, or between a bank account and a nominal account. Use them to represent actions such as topping up a debit card account or a balance transfer to another credit card. + +The `from.amount` and `to.amount` fields are in the native currency of the account. + +### Supported Integrations +| Integration | Create transfer | Update transfer | +|-----------------------|------------------|------------------| +| Dynamics | No | No | +| FreeAgent | Yes | Yes | +| NetSuite | No | No | +| QuickBooks Desktop | Yes | No | +| QuickBooks Online | Yes | Yes | +| Sage Intacct | No | No | +| Xero | Yes | No | +| Zoho Books | No | No | + +### Example Usage: Create transfer + + ```typescript import { CodatSyncExpenses } from "@codat/sync-for-expenses"; import { Decimal } from "@codat/sync-for-expenses/sdk/types"; @@ -57,7 +61,6 @@ async function run() { }, }); - // Handle the result console.log(result); } @@ -100,20 +103,187 @@ async function run() { }, }, }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transfersCreate failed:", res.error); + } +} + +run(); +``` +### Example Usage: Example 1 + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.transfers.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", + transferTransactionRequest: { + description: "Transfer from bank account Y to bank account Z", + date: "2022-10-23T00:00:00Z", + from: { + accountRef: { + id: "", + }, + amount: new Decimal("7329.18"), + }, + to: { + accountRef: { + id: "", + }, + amount: new Decimal("522.15"), + }, + }, + }); - if (!res.ok) { - throw res.error; + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { transfersCreate } from "@codat/sync-for-expenses/funcs/transfersCreate.js"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transfersCreate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", + transferTransactionRequest: { + description: "Transfer from bank account Y to bank account Z", + date: "2022-10-23T00:00:00Z", + from: { + accountRef: { + id: "", + }, + amount: new Decimal("7329.18"), + }, + to: { + accountRef: { + id: "", + }, + amount: new Decimal("522.15"), + }, + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transfersCreate failed:", res.error); } +} - const { value: result } = res; +run(); +``` +### Example Usage: Malformed query + + +```typescript +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncExpenses.transfers.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", + transferTransactionRequest: { + description: "Transfer from bank account Y to bank account Z", + date: "2022-10-23T00:00:00Z", + from: { + accountRef: { + id: "", + }, + amount: new Decimal("7329.18"), + }, + to: { + accountRef: { + id: "", + }, + amount: new Decimal("522.15"), + }, + }, + }); - // Handle the result console.log(result); } run(); ``` +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncExpensesCore } from "@codat/sync-for-expenses/core.js"; +import { transfersCreate } from "@codat/sync-for-expenses/funcs/transfersCreate.js"; +import { Decimal } from "@codat/sync-for-expenses/sdk/types"; + +// Use `CodatSyncExpensesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncExpenses = new CodatSyncExpensesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await transfersCreate(codatSyncExpenses, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + transactionId: "336694d8-2dca-4cb5-a28d-3ccb83e55eee", + transferTransactionRequest: { + description: "Transfer from bank account Y to bank account Z", + date: "2022-10-23T00:00:00Z", + from: { + accountRef: { + id: "", + }, + amount: new Decimal("7329.18"), + }, + to: { + accountRef: { + id: "", + }, + amount: new Decimal("522.15"), + }, + }, + }); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("transfersCreate failed:", res.error); + } +} + +run(); +``` + ### Parameters | Parameter | Type | Required | Description | @@ -129,7 +299,8 @@ run(); ### Errors -| Error Type | Status Code | Content Type | -| -------------------------------------- | -------------------------------------- | -------------------------------------- | -| errors.ErrorMessage | 400, 401, 402, 403, 404, 429, 500, 503 | application/json | -| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file +| Error Type | Status Code | Content Type | +| ---------------------------- | ---------------------------- | ---------------------------- | +| errors.ErrorMessage | 400, 401, 402, 403, 404, 429 | application/json | +| errors.ErrorMessage | 500, 503 | application/json | +| errors.SDKError | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/sync-for-expenses/eslint.config.mjs b/sync-for-expenses/eslint.config.mjs new file mode 100644 index 000000000..67bccfec9 --- /dev/null +++ b/sync-for-expenses/eslint.config.mjs @@ -0,0 +1,22 @@ +import globals from "globals"; +import pluginJs from "@eslint/js"; +import tseslint from "typescript-eslint"; + +/** @type {import('eslint').Linter.Config[]} */ +export default [ + { files: ["**/*.{js,mjs,cjs,ts}"] }, + { languageOptions: { globals: globals.browser } }, + pluginJs.configs.recommended, + ...tseslint.configs.recommended, + { + rules: { + "no-constant-condition": "off", + "no-useless-escape": "off", + // Handled by typescript compiler + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-empty-object-type": "off", + "@typescript-eslint/no-namespace": "off", + }, + }, +]; diff --git a/sync-for-expenses/examples/.env.template b/sync-for-expenses/examples/.env.template new file mode 100644 index 000000000..23674a471 --- /dev/null +++ b/sync-for-expenses/examples/.env.template @@ -0,0 +1,3 @@ +# @codat/sync-for-expenses SDK Environment Variables +# Copy this file to .env and fill in your actual values +# DO NOT commit the .env file to version control diff --git a/sync-for-expenses/examples/README.md b/sync-for-expenses/examples/README.md new file mode 100644 index 000000000..b6858cb2d --- /dev/null +++ b/sync-for-expenses/examples/README.md @@ -0,0 +1,31 @@ +# @codat/sync-for-expenses Examples + +This directory contains example scripts demonstrating how to use the @codat/sync-for-expenses SDK. + +## Prerequisites + +- Node.js (v18 or higher) +- npm + +## Setup + +1. Copy `.env.template` to `.env`: + ```bash + cp .env.template .env + ``` + +2. Edit `.env` and add your actual credentials + +## Running the Examples + +To run an example file from the examples directory: + +```bash +npm run build && npx tsx example.ts +``` + +## Creating new examples + +Duplicate an existing example file, they won't be overwritten by the generation process. + + diff --git a/sync-for-expenses/examples/companiesList.example.ts b/sync-for-expenses/examples/companiesList.example.ts new file mode 100644 index 000000000..43452f74c --- /dev/null +++ b/sync-for-expenses/examples/companiesList.example.ts @@ -0,0 +1,30 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import dotenv from "dotenv"; +dotenv.config(); +/** + * Example usage of the @codat/sync-for-expenses SDK + * + * To run this example from the examples directory: + * npm run build && npx tsx companiesList.example.ts + */ + +import { CodatSyncExpenses } from "@codat/sync-for-expenses"; + +const codatSyncExpenses = new CodatSyncExpenses({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function main() { + const result = await codatSyncExpenses.companies.list({ + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + tags: "region=uk && team=invoice-finance", + }); + + console.log(result); +} + +main().catch(console.error); diff --git a/sync-for-expenses/examples/package-lock.json b/sync-for-expenses/examples/package-lock.json new file mode 100644 index 000000000..14642cadf --- /dev/null +++ b/sync-for-expenses/examples/package-lock.json @@ -0,0 +1,611 @@ +{ + "name": "@codat/sync-for-expenses-examples", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@codat/sync-for-expenses-examples", + "version": "1.0.0", + "dependencies": { + "@codat/sync-for-expenses": "file:.." + }, + "devDependencies": { + "@types/node": "^20.0.0", + "dotenv": "^16.4.5", + "tsx": "^4.19.2" + } + }, + "..": { + "name": "@codat/sync-for-expenses", + "version": "7.1.0", + "dependencies": { + "decimal.js": "^10.4.3", + "zod": "^3.25.0 || ^4.0.0" + }, + "devDependencies": { + "@eslint/js": "^9.26.0", + "eslint": "^9.26.0", + "globals": "^15.14.0", + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" + } + }, + "node_modules/@codat/sync-for-expenses": { + "resolved": "..", + "link": true + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.3.tgz", + "integrity": "sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.3.tgz", + "integrity": "sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.3.tgz", + "integrity": "sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.3.tgz", + "integrity": "sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.3.tgz", + "integrity": "sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.3.tgz", + "integrity": "sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.3.tgz", + "integrity": "sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.3.tgz", + "integrity": "sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.3.tgz", + "integrity": "sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.3.tgz", + "integrity": "sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.3.tgz", + "integrity": "sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.3.tgz", + "integrity": "sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.3.tgz", + "integrity": "sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.3.tgz", + "integrity": "sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.3.tgz", + "integrity": "sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.3.tgz", + "integrity": "sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.3.tgz", + "integrity": "sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.3.tgz", + "integrity": "sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.3.tgz", + "integrity": "sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.3.tgz", + "integrity": "sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.3.tgz", + "integrity": "sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.3.tgz", + "integrity": "sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.3.tgz", + "integrity": "sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.3.tgz", + "integrity": "sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.3.tgz", + "integrity": "sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.3.tgz", + "integrity": "sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@types/node": { + "version": "20.19.35", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.35.tgz", + "integrity": "sha512-Uarfe6J91b9HAUXxjvSOdiO2UPOKLm07Q1oh0JHxoZ1y8HoqxDAu3gVrsrOHeiio0kSsoVBt4wFrKOm0dKxVPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/esbuild": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz", + "integrity": "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.3", + "@esbuild/android-arm": "0.27.3", + "@esbuild/android-arm64": "0.27.3", + "@esbuild/android-x64": "0.27.3", + "@esbuild/darwin-arm64": "0.27.3", + "@esbuild/darwin-x64": "0.27.3", + "@esbuild/freebsd-arm64": "0.27.3", + "@esbuild/freebsd-x64": "0.27.3", + "@esbuild/linux-arm": "0.27.3", + "@esbuild/linux-arm64": "0.27.3", + "@esbuild/linux-ia32": "0.27.3", + "@esbuild/linux-loong64": "0.27.3", + "@esbuild/linux-mips64el": "0.27.3", + "@esbuild/linux-ppc64": "0.27.3", + "@esbuild/linux-riscv64": "0.27.3", + "@esbuild/linux-s390x": "0.27.3", + "@esbuild/linux-x64": "0.27.3", + "@esbuild/netbsd-arm64": "0.27.3", + "@esbuild/netbsd-x64": "0.27.3", + "@esbuild/openbsd-arm64": "0.27.3", + "@esbuild/openbsd-x64": "0.27.3", + "@esbuild/openharmony-arm64": "0.27.3", + "@esbuild/sunos-x64": "0.27.3", + "@esbuild/win32-arm64": "0.27.3", + "@esbuild/win32-ia32": "0.27.3", + "@esbuild/win32-x64": "0.27.3" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-tsconfig": { + "version": "4.13.6", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.6.tgz", + "integrity": "sha512-shZT/QMiSHc/YBLxxOkMtgSid5HFoauqCE3/exfsEcwg1WkeqjG+V40yBbBrsD+jW2HDXcs28xOfcbm2jI8Ddw==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/tsx": { + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz", + "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.27.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/sync-for-expenses/examples/package.json b/sync-for-expenses/examples/package.json new file mode 100644 index 000000000..6d1eb0717 --- /dev/null +++ b/sync-for-expenses/examples/package.json @@ -0,0 +1,18 @@ +{ + "name": "@codat/sync-for-expenses-examples", + "version": "1.0.0", + "private": true, + "scripts": { + "build:parent": "cd .. && npm i && npm run build && cd -", + "build:examples": "npm i", + "build": "npm run build:parent && npm run build:examples" + }, + "devDependencies": { + "@types/node": "^20.0.0", + "dotenv": "^16.4.5", + "tsx": "^4.19.2" + }, + "dependencies": { + "@codat/sync-for-expenses": "file:.." + } +} \ No newline at end of file diff --git a/sync-for-expenses/jsr.json b/sync-for-expenses/jsr.json index 0e4ab78c8..ede210b76 100644 --- a/sync-for-expenses/jsr.json +++ b/sync-for-expenses/jsr.json @@ -2,7 +2,7 @@ { "name": "@codat/sync-for-expenses", - "version": "7.0.0", + "version": "7.1.0", "exports": { ".": "./src/index.ts", "./sdk/models/errors": "./src/sdk/models/errors/index.ts", diff --git a/sync-for-expenses/package-lock.json b/sync-for-expenses/package-lock.json index ddf0f968b..8c81ab896 100644 --- a/sync-for-expenses/package-lock.json +++ b/sync-for-expenses/package-lock.json @@ -1,84 +1,146 @@ { "name": "@codat/sync-for-expenses", - "version": "7.0.0", + "version": "7.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@codat/sync-for-expenses", - "version": "7.0.0", + "version": "7.1.0", "dependencies": { - "decimal.js": "^10.4.3" + "decimal.js": "^10.4.3", + "zod": "^3.25.0 || ^4.0.0" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^7.7.1", - "@typescript-eslint/parser": "^7.7.1", - "eslint": "^8.57.0", - "eslint-import-resolver-typescript": "^3.6.1", - "eslint-plugin-import": "^2.29.1", - "typescript": "^5.4.5", - "zod": "^3.23.4" - }, - "peerDependencies": { - "react": "^18 || ^19", - "react-dom": "^18 || ^19", - "zod": ">= 3" + "@eslint/js": "^9.26.0", + "eslint": "^9.26.0", + "globals": "^15.14.0", + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", "dev": true, "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "node_modules/@eslint-community/regexpp": { - "version": "4.11.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", - "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", "dev": true, "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/config-array": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.1.tgz", + "integrity": "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.7", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.2.tgz", + "integrity": "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.17.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.17.0.tgz", + "integrity": "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@eslint/eslintrc": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", - "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.4.tgz", + "integrity": "sha512-4h4MVF8pmBsncB60r0wSJiIeUKTSD4m7FmTFThG8RHlsg9ajqckLm9OraguFGZE4vVdpiI1Q4+hFnisopmG6gQ==", "dev": true, "license": "MIT", "dependencies": { - "ajv": "^6.12.4", + "ajv": "^6.14.0", "debug": "^4.3.2", - "espree": "^9.6.0", - "globals": "^13.19.0", + "espree": "^10.0.1", + "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", + "js-yaml": "^4.1.1", + "minimatch": "^3.1.3", "strip-json-comments": "^3.1.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -86,10 +148,23 @@ "concat-map": "0.0.1" } }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@eslint/eslintrc/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "dev": true, "license": "ISC", "dependencies": { @@ -100,53 +175,64 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "9.39.3", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.39.3.tgz", + "integrity": "sha512-1B1VkCq6FuUNlQvlBYb+1jDu/gV297TIs/OeiaSR9l1H27SVW55ONE1e1Vp16NqP683+xEGzxYtv4XCiDPaQiw==", "dev": true, "license": "MIT", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", - "deprecated": "Use @eslint/config-array instead", + "node_modules/@eslint/object-schema": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.7.tgz", + "integrity": "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.4.1.tgz", + "integrity": "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", - "debug": "^4.3.1", - "minimatch": "^3.0.5" + "@eslint/core": "^0.17.0", + "levn": "^0.4.1" }, "engines": { - "node": ">=10.10.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" } }, - "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", "dev": true, - "license": "ISC", + "license": "Apache-2.0", "dependencies": { - "brace-expansion": "^1.1.7" + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" }, "engines": { - "node": "*" + "node": ">=18.18.0" } }, "node_modules/@humanwhocodes/module-importer": { @@ -163,528 +249,474 @@ "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", - "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", - "deprecated": "Use @eslint/object-schema instead", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "engines": { - "node": ">= 8" + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } + "license": "MIT" }, - "node_modules/@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true, "license": "MIT" }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.16.1.tgz", - "integrity": "sha512-SxdPak/5bO0EnGktV05+Hq8oatjAYVY3Zh2bye9pGZy6+jwyR3LG3YKkV4YatlsgqXP28BTeVm9pqwJM96vf2A==", + "node_modules/@typescript-eslint/project-service": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.56.1.tgz", + "integrity": "sha512-TAdqQTzHNNvlVFfR+hu2PDJrURiwKsUvxFn1M0h95BB8ah5jejas08jUWG4dBA68jDMI988IvtfdAI53JzEHOQ==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.16.1", - "@typescript-eslint/type-utils": "7.16.1", - "@typescript-eslint/utils": "7.16.1", - "@typescript-eslint/visitor-keys": "7.16.1", - "graphemer": "^1.4.0", - "ignore": "^5.3.1", - "natural-compare": "^1.4.0", - "ts-api-utils": "^1.3.0" + "@typescript-eslint/tsconfig-utils": "^8.56.1", + "@typescript-eslint/types": "^8.56.1", + "debug": "^4.4.3" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^7.0.0", - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/parser": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.16.1.tgz", - "integrity": "sha512-u+1Qx86jfGQ5i4JjK33/FnawZRpsLxRnKzGE6EABZ40KxVT/vWsiZFEBBHjFOljmmV3MBYOHEKi0Jm9hbAOClA==", + "node_modules/@typescript-eslint/project-service/node_modules/@typescript-eslint/types": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.56.1.tgz", + "integrity": "sha512-dbMkdIUkIkchgGDIv7KLUpa0Mda4IYjo4IAMJUZ+3xNoUXxMsk9YtKpTHSChRS85o+H9ftm51gsK1dZReY9CVw==", "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "7.16.1", - "@typescript-eslint/types": "7.16.1", - "@typescript-eslint/typescript-estree": "7.16.1", - "@typescript-eslint/visitor-keys": "7.16.1", - "debug": "^4.3.4" - }, + "license": "MIT", "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } } }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.16.1.tgz", - "integrity": "sha512-nYpyv6ALte18gbMz323RM+vpFpTjfNdyakbf3nsLvF43uF9KeNC289SUEW3QLZ1xPtyINJ1dIsZOuWuSRIWygw==", + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.56.1.tgz", + "integrity": "sha512-qOtCYzKEeyr3aR9f28mPJqBty7+DBqsdd63eO0yyDwc6vgThj2UjWfJIcsFeSucYydqcuudMOprZ+x1SpF3ZuQ==", "dev": true, "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "7.16.1", - "@typescript-eslint/visitor-keys": "7.16.1" - }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.16.1.tgz", - "integrity": "sha512-rbu/H2MWXN4SkjIIyWcmYBjlp55VT+1G3duFOIukTNFxr9PI35pLc2ydwAfejCEitCv4uztA07q0QWanOHC7dA==", + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.56.1.tgz", + "integrity": "sha512-yB/7dxi7MgTtGhZdaHCemf7PuwrHMenHjmzgUW1aJpO+bBU43OycnM3Wn+DdvDO/8zzA9HlhaJ0AUGuvri4oGg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "7.16.1", - "@typescript-eslint/utils": "7.16.1", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/typescript-estree": "8.56.1", + "@typescript-eslint/utils": "8.56.1", + "debug": "^4.4.3", + "ts-api-utils": "^2.4.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/types": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.16.1.tgz", - "integrity": "sha512-AQn9XqCzUXd4bAVEsAXM/Izk11Wx2u4H3BAfQVhSfzfDOm/wAON9nP7J5rpkCxts7E5TELmN845xTUCQrD1xIQ==", + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.56.1.tgz", + "integrity": "sha512-dbMkdIUkIkchgGDIv7KLUpa0Mda4IYjo4IAMJUZ+3xNoUXxMsk9YtKpTHSChRS85o+H9ftm51gsK1dZReY9CVw==", "dev": true, "license": "MIT", "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.16.1.tgz", - "integrity": "sha512-0vFPk8tMjj6apaAZ1HlwM8w7jbghC8jc1aRNJG5vN8Ym5miyhTQGMqU++kuBFDNKe9NcPeZ6x0zfSzV8xC1UlQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "7.16.1", - "@typescript-eslint/visitor-keys": "7.16.1", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } } }, - "node_modules/@typescript-eslint/utils": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.16.1.tgz", - "integrity": "sha512-WrFM8nzCowV0he0RlkotGDujx78xudsxnGMBHI88l5J8wEhED6yBwaSLP99ygfrzAjsQvcYQ94quDwI0d7E1fA==", + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.56.1.tgz", + "integrity": "sha512-qzUL1qgalIvKWAf9C1HpvBjif+Vm6rcT5wZd4VoMb9+Km3iS3Cv9DY6dMRMDtPnwRAFyAi7YXJpTIEXLvdfPxg==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.16.1", - "@typescript-eslint/types": "7.16.1", - "@typescript-eslint/typescript-estree": "7.16.1" + "@typescript-eslint/project-service": "8.56.1", + "@typescript-eslint/tsconfig-utils": "8.56.1", + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/visitor-keys": "8.56.1", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.4.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.56.0" + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.16.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.16.1.tgz", - "integrity": "sha512-Qlzzx4sE4u3FsHTPQAAQFJFNOuqtuY0LFrZHwQ8IHK705XxBiWOFkfKRWu6niB7hwfgnwIpO4jTC75ozW1PHWg==", + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.56.1.tgz", + "integrity": "sha512-KiROIzYdEV85YygXw6BI/Dx4fnBlFQu6Mq4QE4MOH9fFnhohw6wX/OAvDY2/C+ut0I3RSPKenvZJIVYqJNkhEw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.16.1", - "eslint-visitor-keys": "^3.4.3" + "@typescript-eslint/types": "8.56.1", + "eslint-visitor-keys": "^5.0.0" }, "engines": { - "node": "^18.18.0 || >=20.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", - "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "node_modules/@typescript-eslint/type-utils/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + "node": "18 || 20 || >=22" } }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "node_modules/@typescript-eslint/type-utils/node_modules/brace-expansion": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz", + "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==", "dev": true, "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "balanced-match": "^4.0.2" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" + "engines": { + "node": "18 || 20 || >=22" } }, - "node_modules/ansi-regex": { + "node_modules/@typescript-eslint/type-utils/node_modules/eslint-visitor-keys": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "engines": { - "node": ">=8" + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/@typescript-eslint/type-utils/node_modules/minimatch": { + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", + "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", "dev": true, - "license": "MIT", + "license": "BlueOak-1.0.0", "dependencies": { - "color-convert": "^2.0.1" + "brace-expansion": "^5.0.2" }, "engines": { - "node": ">=8" + "node": "18 || 20 || >=22" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "node_modules/@typescript-eslint/type-utils/node_modules/ts-api-utils": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz", + "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==", "dev": true, - "license": "Python-2.0" + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } }, - "node_modules/array-buffer-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", - "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "node_modules/@typescript-eslint/utils": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.56.1.tgz", + "integrity": "sha512-HPAVNIME3tABJ61siYlHzSWCGtOoeP2RTIaHXFMPqjrQKCGB9OgUVdiNgH7TJS2JNIQ5qQ4RsAUDuGaGme/KOA==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.5", - "is-array-buffer": "^3.0.4" + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.56.1", + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/typescript-estree": "8.56.1" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/array-includes": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", - "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.56.1.tgz", + "integrity": "sha512-YAi4VDKcIZp0O4tz/haYKhmIDZFEUPOreKbfdAN3SzUDMcPhJ8QI99xQXqX+HoUVq8cs85eRKnD+rne2UAnj2w==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "is-string": "^1.0.7" + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/visitor-keys": "8.56.1" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.56.1.tgz", + "integrity": "sha512-dbMkdIUkIkchgGDIv7KLUpa0Mda4IYjo4IAMJUZ+3xNoUXxMsk9YtKpTHSChRS85o+H9ftm51gsK1dZReY9CVw==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/array.prototype.findlastindex": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", - "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.56.1.tgz", + "integrity": "sha512-qzUL1qgalIvKWAf9C1HpvBjif+Vm6rcT5wZd4VoMb9+Km3iS3Cv9DY6dMRMDtPnwRAFyAi7YXJpTIEXLvdfPxg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-shim-unscopables": "^1.0.2" + "@typescript-eslint/project-service": "8.56.1", + "@typescript-eslint/tsconfig-utils": "8.56.1", + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/visitor-keys": "8.56.1", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.4.0" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/array.prototype.flat": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", - "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.56.1.tgz", + "integrity": "sha512-KiROIzYdEV85YygXw6BI/Dx4fnBlFQu6Mq4QE4MOH9fFnhohw6wX/OAvDY2/C+ut0I3RSPKenvZJIVYqJNkhEw==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" + "@typescript-eslint/types": "8.56.1", + "eslint-visitor-keys": "^5.0.0" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/array.prototype.flatmap": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", - "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", + "node_modules/@typescript-eslint/utils/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "18 || 20 || >=22" } }, - "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", - "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "node_modules/@typescript-eslint/utils/node_modules/brace-expansion": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz", + "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==", "dev": true, "license": "MIT", "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "es-abstract": "^1.22.3", - "es-errors": "^1.2.1", - "get-intrinsic": "^1.2.3", - "is-array-buffer": "^3.0.4", - "is-shared-array-buffer": "^1.0.2" + "balanced-match": "^4.0.2" }, "engines": { - "node": ">= 0.4" + "node": "18 || 20 || >=22" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://opencollective.com/eslint" } }, - "node_modules/available-typed-arrays": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", - "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "node_modules/@typescript-eslint/utils/node_modules/minimatch": { + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", + "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", "dev": true, - "license": "MIT", + "license": "BlueOak-1.0.0", "dependencies": { - "possible-typed-array-names": "^1.0.0" + "brace-expansion": "^5.0.2" }, "engines": { - "node": ">= 0.4" + "node": "18 || 20 || >=22" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "node_modules/@typescript-eslint/utils/node_modules/ts-api-utils": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz", + "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==", "dev": true, "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" } }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "node_modules/acorn": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" + "bin": { + "acorn": "bin/acorn" }, "engines": { - "node": ">=8" + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", + "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "license": "MIT", "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "color-convert": "^2.0.1" }, "engines": { - "node": ">= 0.4" + "node": ">=8" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -740,9 +772,9 @@ "license": "MIT" }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "license": "MIT", "dependencies": { @@ -754,68 +786,14 @@ "node": ">= 8" } }, - "node_modules/data-view-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", - "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", - "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/data-view-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", - "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-data-view": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -839,222 +817,6 @@ "dev": true, "license": "MIT" }, - "node_modules/define-data-property": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "gopd": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/define-properties": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/dir-glob": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", - "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/enhanced-resolve": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.0.tgz", - "integrity": "sha512-dwDPwZL0dmye8Txp2gzFmA6sxALaSvdRDjPH0viLcKrtlOL3tw62nWWweVD1SdILDTJrbrL6tdWVN58Wo6U3eA==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/es-abstract": { - "version": "1.23.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", - "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", - "dev": true, - "license": "MIT", - "dependencies": { - "array-buffer-byte-length": "^1.0.1", - "arraybuffer.prototype.slice": "^1.0.3", - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "data-view-buffer": "^1.0.1", - "data-view-byte-length": "^1.0.1", - "data-view-byte-offset": "^1.0.0", - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "es-set-tostringtag": "^2.0.3", - "es-to-primitive": "^1.2.1", - "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.4", - "get-symbol-description": "^1.0.2", - "globalthis": "^1.0.3", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.3", - "has-symbols": "^1.0.3", - "hasown": "^2.0.2", - "internal-slot": "^1.0.7", - "is-array-buffer": "^3.0.4", - "is-callable": "^1.2.7", - "is-data-view": "^1.0.1", - "is-negative-zero": "^2.0.3", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.3", - "is-string": "^1.0.7", - "is-typed-array": "^1.1.13", - "is-weakref": "^1.0.2", - "object-inspect": "^1.13.1", - "object-keys": "^1.1.1", - "object.assign": "^4.1.5", - "regexp.prototype.flags": "^1.5.2", - "safe-array-concat": "^1.1.2", - "safe-regex-test": "^1.0.3", - "string.prototype.trim": "^1.2.9", - "string.prototype.trimend": "^1.0.8", - "string.prototype.trimstart": "^1.0.8", - "typed-array-buffer": "^1.0.2", - "typed-array-byte-length": "^1.0.1", - "typed-array-byte-offset": "^1.0.2", - "typed-array-length": "^1.0.6", - "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.15" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-errors": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-object-atoms": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", - "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.2.4", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.1" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-shim-unscopables": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", - "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.0" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", @@ -1069,170 +831,96 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "9.39.3", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.39.3.tgz", + "integrity": "sha512-VmQ+sifHUbI/IcSopBCF/HO3YiHQx/AVd3UVyYL6weuwW+HvON9VYn5l6Zl1WZzPWXPNZrSQpxwkkZ/VuvJZzg==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.1", + "@eslint/config-helpers": "^0.4.2", + "@eslint/core": "^0.17.0", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.39.3", + "@eslint/plugin-kit": "^0.4.1", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "@ungap/structured-clone": "^1.2.0", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.6", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.3", - "espree": "^9.6.1", - "esquery": "^1.4.2", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "graphemer": "^1.4.0", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.3", - "strip-ansi": "^6.0.1", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-import-resolver-typescript": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.1.tgz", - "integrity": "sha512-xgdptdoi5W3niYeuQxKmzVDTATvLYqhpwmykwsh7f6HIOStGWEIL9iqZgQDF9u9OEzrRwR8no5q2VT+bjAujTg==", - "dev": true, - "license": "ISC", - "dependencies": { - "debug": "^4.3.4", - "enhanced-resolve": "^5.12.0", - "eslint-module-utils": "^2.7.4", - "fast-glob": "^3.3.1", - "get-tsconfig": "^4.5.0", - "is-core-module": "^2.11.0", - "is-glob": "^4.0.3" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + "url": "https://eslint.org/donate" }, "peerDependencies": { - "eslint": "*", - "eslint-plugin-import": "*" - } - }, - "node_modules/eslint-module-utils": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", - "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7" - }, - "engines": { - "node": ">=4" + "jiti": "*" }, "peerDependenciesMeta": { - "eslint": { + "jiti": { "optional": true } } }, - "node_modules/eslint-module-utils/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", "dependencies": { - "ms": "^2.1.1" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-plugin-import": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", - "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, - "license": "MIT", - "dependencies": { - "array-includes": "^3.1.7", - "array.prototype.findlastindex": "^1.2.3", - "array.prototype.flat": "^1.3.2", - "array.prototype.flatmap": "^1.3.2", - "debug": "^3.2.7", - "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.8.0", - "hasown": "^2.0.0", - "is-core-module": "^2.13.1", - "is-glob": "^4.0.3", - "minimatch": "^3.1.2", - "object.fromentries": "^2.0.7", - "object.groupby": "^1.0.1", - "object.values": "^1.1.7", - "semver": "^6.3.1", - "tsconfig-paths": "^3.15.0" - }, + "license": "Apache-2.0", "engines": { - "node": ">=4" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "peerDependencies": { - "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-plugin-import/node_modules/brace-expansion": { + "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", @@ -1243,30 +931,20 @@ "concat-map": "0.0.1" } }, - "node_modules/eslint-plugin-import/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/eslint-plugin-import/node_modules/doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, "engines": { - "node": ">=0.10.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-plugin-import/node_modules/minimatch": { + "node_modules/eslint/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", @@ -1279,83 +957,32 @@ "node": "*" } }, - "node_modules/eslint-plugin-import/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/eslint-scope": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", - "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, "license": "Apache-2.0", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/eslint/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/espree": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", - "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "acorn": "^8.9.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" @@ -1414,36 +1041,6 @@ "dev": true, "license": "MIT" }, - "node_modules/fast-glob": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", - "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.4" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -1458,40 +1055,17 @@ "dev": true, "license": "MIT" }, - "node_modules/fastq": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", - "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", "dependencies": { - "to-regex-range": "^5.0.1" + "flat-cache": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=16.0.0" } }, "node_modules/find-up": { @@ -1512,239 +1086,195 @@ } }, "node_modules/flat-cache": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", - "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "license": "MIT", "dependencies": { "flatted": "^3.2.9", - "keyv": "^4.5.3", - "rimraf": "^3.0.2" + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.4.tgz", + "integrity": "sha512-3+mMldrTAPdta5kjX2G2J7iX4zxtnwpdA8Tr2ZSjkyPSanvbZAcy6flmtnXbEybHrDcU9641lxrMfFuUxVz9vA==", "dev": true, "license": "ISC" }, - "node_modules/for-each": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", - "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, - "license": "MIT", + "license": "ISC", "dependencies": { - "is-callable": "^1.1.3" + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" } }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "node_modules/globals": { + "version": "15.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", + "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", "dev": true, "license": "MIT", + "engines": { + "node": ">=18" + }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">= 4" } }, - "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", "dev": true, "license": "MIT", "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=6" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/get-symbol-description": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", - "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.5", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=0.8.19" } }, - "node_modules/get-tsconfig": { - "version": "4.7.5", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.5.tgz", - "integrity": "sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==", + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, "license": "MIT", - "dependencies": { - "resolve-pkg-maps": "^1.0.0" - }, - "funding": { - "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + "engines": { + "node": ">=0.10.0" } }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "is-extglob": "^2.1.1" }, "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=0.10.0" } }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } + "license": "ISC" }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } + "license": "MIT" }, - "node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, "license": "MIT", "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "json-buffer": "3.0.1" } }, - "node_modules/globalthis": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", - "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "license": "MIT", "dependencies": { - "define-properties": "^1.2.1", - "gopd": "^1.0.1" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.8.0" } }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "license": "MIT", "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" + "p-locate": "^5.0.0" }, "engines": { "node": ">=10" @@ -1753,762 +1283,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true, - "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "MIT" }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, - "license": "ISC" + "license": "MIT" }, - "node_modules/graphemer": { + "node_modules/natural-compare": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", - "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true, "license": "MIT" }, - "node_modules/has-bigints": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", - "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/has-property-descriptors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.19" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "license": "ISC", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/internal-slot": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/is-array-buffer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", - "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-bigints": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-callable": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", - "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-core-module": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", - "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", - "dev": true, - "license": "MIT", - "dependencies": { - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-data-view": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", - "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typed-array": "^1.1.13" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", - "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", - "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", - "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "which-typed-array": "^1.1.14" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isarray": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "dev": true, - "license": "MIT" - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true, - "license": "ISC" - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "license": "MIT", - "peer": true - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "license": "MIT", - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT" - }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT" - }, - "node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "license": "MIT", - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.1" - } - }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.merge": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "license": "MIT", - "peer": true, - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, - "node_modules/object-inspect": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", - "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", - "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.5", - "define-properties": "^1.2.1", - "has-symbols": "^1.0.3", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.fromentries": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", - "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object.groupby": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", - "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.values": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", - "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "license": "ISC", - "dependencies": { - "wrappy": "1" - } - }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -2516,528 +1311,146 @@ "dev": true, "license": "MIT", "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true, - "license": "MIT" - }, - "node_modules/path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/possible-typed-array-names": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", - "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/react": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", - "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", - "license": "MIT", - "peer": true, - "dependencies": { - "loose-envify": "^1.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "18.3.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", - "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", - "license": "MIT", - "peer": true, - "dependencies": { - "loose-envify": "^1.1.0", - "scheduler": "^0.23.2" - }, - "peerDependencies": { - "react": "^18.3.1" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", - "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.6", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "set-function-name": "^2.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-core-module": "^2.13.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-array-concat": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", - "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "get-intrinsic": "^1.2.4", - "has-symbols": "^1.0.3", - "isarray": "^2.0.5" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.8.0" } }, - "node_modules/safe-regex-test": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", - "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.6", - "es-errors": "^1.3.0", - "is-regex": "^1.1.4" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/scheduler": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", - "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "loose-envify": "^1.1.0" - } - }, - "node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" + "p-limit": "^3.0.2" }, "engines": { "node": ">=10" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" }, - "engines": { - "node": ">= 0.4" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "license": "MIT", "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" + "callsites": "^3.0.0" }, "engines": { - "node": ">= 0.4" + "node": ">=6" } }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, "license": "MIT", - "dependencies": { - "shebang-regex": "^3.0.0" - }, "engines": { "node": ">=8" } }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">= 0.8.0" } }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "license": "MIT", "engines": { - "node": ">=8" + "node": ">=6" } }, - "node_modules/string.prototype.trim": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", - "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.0", - "es-object-atoms": "^1.0.0" - }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", - "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=4" } }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", - "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-object-atoms": "^1.0.0" + "license": "ISC", + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=10" } }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^5.0.1" + "shebang-regex": "^3.0.0" }, "engines": { "node": ">=8" } }, - "node_modules/strip-bom": { + "node_modules/shebang-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, "license": "MIT", "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/strip-json-comments": { @@ -3066,206 +1479,310 @@ "node": ">=8" } }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", "dev": true, "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, "engines": { - "node": ">= 0.4" + "node": ">=12.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/SuperchupuDev" } }, - "node_modules/tapable": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "node_modules/tinyglobby/node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", "engines": { - "node": ">=6" + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } } }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "node_modules/tinyglobby/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "license": "MIT", "dependencies": { - "is-number": "^7.0.0" + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=8.0" + "node": ">=14.17" } }, - "node_modules/ts-api-utils": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", - "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "node_modules/typescript-eslint": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.56.1.tgz", + "integrity": "sha512-U4lM6pjmBX7J5wk4szltF7I1cGBHXZopnAXCMXb3+fZ3B/0Z3hq3wS/CCUB2NZBNAExK92mCU2tEohWuwVMsDQ==", "dev": true, "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.56.1", + "@typescript-eslint/parser": "8.56.1", + "@typescript-eslint/typescript-estree": "8.56.1", + "@typescript-eslint/utils": "8.56.1" + }, "engines": { - "node": ">=16" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.2.0" + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "node_modules/typescript-eslint/node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.56.1.tgz", + "integrity": "sha512-Jz9ZztpB37dNC+HU2HI28Bs9QXpzCz+y/twHOwhyrIRdbuVDxSytJNDl6z/aAKlaRIwC7y8wJdkBv7FxYGgi0A==", "dev": true, "license": "MIT", "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.56.1", + "@typescript-eslint/type-utils": "8.56.1", + "@typescript-eslint/utils": "8.56.1", + "@typescript-eslint/visitor-keys": "8.56.1", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.56.1", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "node_modules/typescript-eslint/node_modules/@typescript-eslint/parser": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.56.1.tgz", + "integrity": "sha512-klQbnPAAiGYFyI02+znpBRLyjL4/BrBd0nyWkdC0s/6xFLkXYQ8OoRrSkqacS1ddVxf/LDyODIKbQ5TgKAf/Fg==", "dev": true, "license": "MIT", "dependencies": { - "prelude-ls": "^1.2.1" + "@typescript-eslint/scope-manager": "8.56.1", + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/typescript-estree": "8.56.1", + "@typescript-eslint/visitor-keys": "8.56.1", + "debug": "^4.4.3" }, "engines": { - "node": ">= 0.8.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "node_modules/typescript-eslint/node_modules/@typescript-eslint/scope-manager": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.56.1.tgz", + "integrity": "sha512-YAi4VDKcIZp0O4tz/haYKhmIDZFEUPOreKbfdAN3SzUDMcPhJ8QI99xQXqX+HoUVq8cs85eRKnD+rne2UAnj2w==", "dev": true, - "license": "(MIT OR CC0-1.0)", + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/visitor-keys": "8.56.1" + }, "engines": { - "node": ">=10" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/typed-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", - "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "node_modules/typescript-eslint/node_modules/@typescript-eslint/types": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.56.1.tgz", + "integrity": "sha512-dbMkdIUkIkchgGDIv7KLUpa0Mda4IYjo4IAMJUZ+3xNoUXxMsk9YtKpTHSChRS85o+H9ftm51gsK1dZReY9CVw==", "dev": true, "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "is-typed-array": "^1.1.13" - }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/typed-array-byte-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", - "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "node_modules/typescript-eslint/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.56.1.tgz", + "integrity": "sha512-qzUL1qgalIvKWAf9C1HpvBjif+Vm6rcT5wZd4VoMb9+Km3iS3Cv9DY6dMRMDtPnwRAFyAi7YXJpTIEXLvdfPxg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "@typescript-eslint/project-service": "8.56.1", + "@typescript-eslint/tsconfig-utils": "8.56.1", + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/visitor-keys": "8.56.1", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.4.0" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/typed-array-byte-offset": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", - "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "node_modules/typescript-eslint/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.56.1.tgz", + "integrity": "sha512-KiROIzYdEV85YygXw6BI/Dx4fnBlFQu6Mq4QE4MOH9fFnhohw6wX/OAvDY2/C+ut0I3RSPKenvZJIVYqJNkhEw==", "dev": true, "license": "MIT", "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13" + "@typescript-eslint/types": "8.56.1", + "eslint-visitor-keys": "^5.0.0" }, "engines": { - "node": ">= 0.4" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/typescript-eslint/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" } }, - "node_modules/typed-array-length": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", - "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "node_modules/typescript-eslint/node_modules/brace-expansion": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz", + "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-proto": "^1.0.3", - "is-typed-array": "^1.1.13", - "possible-typed-array-names": "^1.0.0" + "balanced-match": "^4.0.2" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "18 || 20 || >=22" } }, - "node_modules/typescript": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", - "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", + "node_modules/typescript-eslint/node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", "dev": true, "license": "Apache-2.0", - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, "engines": { - "node": ">=14.17" + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/unbox-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", - "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "node_modules/typescript-eslint/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "dev": true, "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/typescript-eslint/node_modules/minimatch": { + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", + "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", + "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { - "call-bind": "^1.0.2", - "has-bigints": "^1.0.2", - "has-symbols": "^1.0.3", - "which-boxed-primitive": "^1.0.2" + "brace-expansion": "^5.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typescript-eslint/node_modules/ts-api-utils": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz", + "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" } }, "node_modules/uri-js": { @@ -3294,43 +1811,6 @@ "node": ">= 8" } }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", - "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", - "dev": true, - "license": "MIT", - "dependencies": { - "available-typed-arrays": "^1.0.7", - "call-bind": "^1.0.7", - "for-each": "^0.3.3", - "gopd": "^1.0.1", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", @@ -3341,13 +1821,6 @@ "node": ">=0.10.0" } }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true, - "license": "ISC" - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -3362,10 +1835,9 @@ } }, "node_modules/zod": { - "version": "3.23.8", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", - "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", - "dev": true, + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", + "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" diff --git a/sync-for-expenses/package.json b/sync-for-expenses/package.json index 7270a31b3..ffb94e74a 100644 --- a/sync-for-expenses/package.json +++ b/sync-for-expenses/package.json @@ -1,6 +1,6 @@ { "name": "@codat/sync-for-expenses", - "version": "7.0.0", + "version": "7.1.0", "author": "Codat", "main": "./index.js", "sideEffects": false, @@ -10,25 +10,22 @@ "directory": "sync-for-expenses" }, "scripts": { - "lint": "eslint --max-warnings=0 src", + "lint": "eslint --cache --max-warnings=0 src", "build": "tsc", "prepublishOnly": "npm run build" }, "peerDependencies": { - "react": "^18 || ^19", - "react-dom": "^18 || ^19", - "zod": ">= 3" + }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^7.7.1", - "@typescript-eslint/parser": "^7.7.1", - "eslint": "^8.57.0", - "eslint-import-resolver-typescript": "^3.6.1", - "eslint-plugin-import": "^2.29.1", - "typescript": "^5.4.5", - "zod": "^3.23.4" + "@eslint/js": "^9.26.0", + "eslint": "^9.26.0", + "globals": "^15.14.0", + "typescript": "~5.8.3", + "typescript-eslint": "^8.26.0" }, "dependencies": { - "decimal.js": "^10.4.3" + "decimal.js": "^10.4.3", + "zod": "^3.25.0 || ^4.0.0" } } diff --git a/sync-for-expenses/src/funcs/accountsCreate.ts b/sync-for-expenses/src/funcs/accountsCreate.ts index 6cd63940e..3fa75ec99 100644 --- a/sync-for-expenses/src/funcs/accountsCreate.ts +++ b/sync-for-expenses/src/funcs/accountsCreate.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -31,26 +34,55 @@ import { Result } from "../sdk/types/fp.js"; * * [Accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) are the categories a business uses to record accounting transactions. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-chartOfAccounts-model). */ -export async function accountsCreate( +export function accountsCreate( client: CodatSyncExpensesCore, request: operations.CreateAccountRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.CreateAccountResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.CreateAccountRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.CreateAccountResponse, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +90,7 @@ export async function accountsCreate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload.accountPrototype, { explode: true }); @@ -83,18 +115,20 @@ export async function accountsCreate( "timeoutInMinutes": payload.timeoutInMinutes, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create-account", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -118,14 +152,16 @@ export async function accountsCreate( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -147,7 +183,7 @@ export async function accountsCreate( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -158,24 +194,27 @@ export async function accountsCreate( const [result] = await M.match< shared.CreateAccountResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.CreateAccountResponse$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/accountsGetCreateModel.ts b/sync-for-expenses/src/funcs/accountsGetCreateModel.ts index 59072df4e..0abb213c9 100644 --- a/sync-for-expenses/src/funcs/accountsGetCreateModel.ts +++ b/sync-for-expenses/src/funcs/accountsGetCreateModel.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -31,26 +34,55 @@ import { Result } from "../sdk/types/fp.js"; * * [Accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) are the categories a business uses to record accounting transactions. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * See the *response examples* for integration-specific indicative models. */ -export async function accountsGetCreateModel( +export function accountsGetCreateModel( client: CodatSyncExpensesCore, request: operations.GetCreateChartOfAccountsModelRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.PushOption, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.GetCreateChartOfAccountsModelRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.PushOption, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -61,7 +93,7 @@ export async function accountsGetCreateModel( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -81,17 +113,19 @@ export async function accountsGetCreateModel( "/companies/{companyId}/connections/{connectionId}/options/chartOfAccounts", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get-create-chartOfAccounts-model", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -115,13 +149,15 @@ export async function accountsGetCreateModel( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -132,7 +168,7 @@ export async function accountsGetCreateModel( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -143,24 +179,24 @@ export async function accountsGetCreateModel( const [result] = await M.match< shared.PushOption, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.PushOption$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/adjustmentsCreate.ts b/sync-for-expenses/src/funcs/adjustmentsCreate.ts index d64c20017..d701ca073 100644 --- a/sync-for-expenses/src/funcs/adjustmentsCreate.ts +++ b/sync-for-expenses/src/funcs/adjustmentsCreate.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -37,22 +40,51 @@ import { Result } from "../sdk/types/fp.js"; * |-----------------------|-----------| * | QuickBooks Desktop | Yes | */ -export async function adjustmentsCreate( +export function adjustmentsCreate( client: CodatSyncExpensesCore, request: operations.CreateAdjustmentTransactionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.AdjustmentTransactionResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.CreateAdjustmentTransactionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.AdjustmentTransactionResponse, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -61,7 +93,7 @@ export async function adjustmentsCreate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload.RequestBody, { explode: true }); @@ -77,18 +109,20 @@ export async function adjustmentsCreate( "/companies/{companyId}/sync/expenses/adjustment-transactions", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create-adjustment-transaction", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -112,13 +146,15 @@ export async function adjustmentsCreate( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -140,7 +176,7 @@ export async function adjustmentsCreate( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -151,24 +187,27 @@ export async function adjustmentsCreate( const [result] = await M.match< shared.AdjustmentTransactionResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.AdjustmentTransactionResponse$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/attachmentsUpload.ts b/sync-for-expenses/src/funcs/attachmentsUpload.ts index 002720ccc..30a109d4b 100644 --- a/sync-for-expenses/src/funcs/attachmentsUpload.ts +++ b/sync-for-expenses/src/funcs/attachmentsUpload.ts @@ -3,13 +3,18 @@ */ import { CodatSyncExpensesCore } from "../core.js"; -import { encodeSimple } from "../lib/encodings.js"; -import { readableStreamToArrayBuffer } from "../lib/files.js"; +import { appendForm, encodeSimple } from "../lib/encodings.js"; +import { + getContentTypeFromFileName, + readableStreamToArrayBuffer, +} from "../lib/files.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -18,10 +23,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { isBlobLike } from "../sdk/types/blobs.js"; import { Result } from "../sdk/types/fp.js"; import { isReadableStream } from "../sdk/types/streams.js"; @@ -34,35 +40,65 @@ import { isReadableStream } from "../sdk/types/streams.js"; * * [Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) represent transactions made with a company debit or credit card. Attachments for `Adjustment` and `Transfer` transaction types are not supported for any integrations. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * Each accounting software supports different file formats and sizes. * - * | Integration | File size | File extension |Supported transaction type - * |-------------------|-----------|------------------------------------------------------------------------------------------------------------------------------------------------|--------------| - * | **Xero** | 3 MB | 7Z, BMP, CSV, DOC, DOCX, EML, GIF, JPEG, JPG, KEYNOTE, MSG, NUMBERS, ODF, ODS, ODT, PAGES, PDF, PNG, PPT, PPTX, RAR, RTF, TIF, TIFF, TXT, XLS, XLSX, ZIP | All supported types | - * | **QuickBooks Online** | 100 MB | AI, CSV, DOC, DOCX, EPS, GIF, JPEG, JPG, ODS, PAGES, PDF, PNG, RTF, TIF, TXT, XLS, XLSX, XML | `ReimbursableExpenses`, `ExpensePayment`, `ExpenseRefund` | - * | **NetSuite** | 100 MB | BMP, CSV, XLS, XLSX, JSON, PDF, PJPG, PJPEG, PNG, TXT, SVG, TIF, TIFF, DOC, DOCX, ZIP |`ExpensePayment`, `ExpenseRefund` | - * | **Dynamics 365 Business Central** | 350 MB | [No explicit requirements outlined](https://learn.microsoft.com/en-gb/dynamics365/business-central/ui-how-add-link-to-record#to-attach-a-file-to-a-purchase-invoice) for text, image, and video files. | All supported types - * | **QuickBooks Desktop** | NA | Does not support attachment upload | N/A | - * | **FreeAgent** | 5MB | PNG, X-PNG, JPEG, PJG, GIF, X-PDF + * | Integration | File size | File extension | Supported transactions | + * |-----------------------------------|-----------|-------------------------------------------------------|------------------------| + * | **Xero** | 3 MB | 7Z, BMP, CSV, DOC, DOCX, EML, GIF, JPEG, JPG, KEYNOTE, MSG, NUMBERS, ODF, ODS, ODT, PAGES, PDF, PNG, PPT, PPTX, RAR, RTF, TIF, TIFF, TXT, XLS, XLSX, ZIP | All supported types | + * | **QuickBooks Online** | 100 MB | AI, CSV, DOC, DOCX, EPS, GIF, JPEG, JPG, ODS, PAGES, PDF, PNG, RTF, TIF, TXT, XLS, XLSX, XML | `expense-transactions.Payment`, `expense-transactions.Refund`, `reimbursable-expense-transactions` | + * | **NetSuite** | 100 MB | BMP, CSV, XLS, XLSX, JSON, PDF, PJPG, PJPEG, PNG, TXT, SVG, TIF, TIFF, DOC, DOCX, ZIP |`expense-transactions.Payment`, `expense-transactions.Refund` | + * | **Dynamics 365 Business Central** | 350 MB | [No explicit requirements outlined](https://learn.microsoft.com/en-gb/dynamics365/business-central/ui-how-add-link-to-record#to-attach-a-file-to-a-purchase-invoice) for text, image, and video files. | All supported types + * | **QuickBooks Desktop** | NA | Does not support attachment upload | N/A | + * | **FreeAgent** | 5MB | PNG, X-PNG, JPEG, PJG, GIF, X-PDF | `expense-transactions.Payment`, `reimbursable-expense-transactions` + * | **Zoho Books** | 5MB | GIF, PNG, JPEG, JPG, BMP, PDF | `expense-transactions.Payment`, `reimbursable-expense-transactions` | */ -export async function attachmentsUpload( +export function attachmentsUpload( client: CodatSyncExpensesCore, request: operations.UploadExpenseAttachmentRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.Attachment, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.UploadExpenseAttachmentRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.Attachment, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -71,24 +107,44 @@ export async function attachmentsUpload( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = new FormData(); if (payload.AttachmentUpload != null) { if (isBlobLike(payload.AttachmentUpload.file)) { - body.append("file", payload.AttachmentUpload.file); + appendForm(body, "file", payload.AttachmentUpload.file); } else if (isReadableStream(payload.AttachmentUpload.file.content)) { const buffer = await readableStreamToArrayBuffer( payload.AttachmentUpload.file.content, ); - const blob = new Blob([buffer], { type: "application/octet-stream" }); - body.append("file", blob); + const contentType = + getContentTypeFromFileName(payload.AttachmentUpload.file.fileName) + || "application/octet-stream"; + const blob = new Blob([buffer], { type: contentType }); + appendForm(body, "file", blob, payload.AttachmentUpload.file.fileName); + } else if (payload.AttachmentUpload.file.content instanceof Uint8Array) { + const contentType = + getContentTypeFromFileName(payload.AttachmentUpload.file.fileName) + || "application/octet-stream"; + appendForm( + body, + "file", + new Blob( + [new Uint8Array(payload.AttachmentUpload.file.content).buffer], + { type: contentType }, + ), + payload.AttachmentUpload.file.fileName, + ); } else { - body.append( + const contentType = + getContentTypeFromFileName(payload.AttachmentUpload.file.fileName) + || "application/octet-stream"; + appendForm( + body, "file", new Blob([payload.AttachmentUpload.file.content], { - type: "application/octet-stream", + type: contentType, }), payload.AttachmentUpload.file.fileName, ); @@ -114,17 +170,19 @@ export async function attachmentsUpload( "/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions/{transactionId}/attachments", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "upload-expense-attachment", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -148,13 +206,15 @@ export async function attachmentsUpload( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -176,7 +236,7 @@ export async function attachmentsUpload( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -187,24 +247,27 @@ export async function attachmentsUpload( const [result] = await M.match< shared.Attachment, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.Attachment$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/bankAccountsCreate.ts b/sync-for-expenses/src/funcs/bankAccountsCreate.ts index af4c6dfbe..6efc224e4 100644 --- a/sync-for-expenses/src/funcs/bankAccountsCreate.ts +++ b/sync-for-expenses/src/funcs/bankAccountsCreate.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -31,26 +34,55 @@ import { Result } from "../sdk/types/fp.js"; * * [Bank accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-bankAccounts-model). */ -export async function bankAccountsCreate( +export function bankAccountsCreate( client: CodatSyncExpensesCore, request: operations.CreateBankAccountRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.CreateBankAccountResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.CreateBankAccountRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.CreateBankAccountResponse, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +90,7 @@ export async function bankAccountsCreate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload.BankAccount, { explode: true }); @@ -83,18 +115,20 @@ export async function bankAccountsCreate( "timeoutInMinutes": payload.timeoutInMinutes, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create-bank-account", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -118,14 +152,16 @@ export async function bankAccountsCreate( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -147,7 +183,7 @@ export async function bankAccountsCreate( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -158,24 +194,27 @@ export async function bankAccountsCreate( const [result] = await M.match< shared.CreateBankAccountResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.CreateBankAccountResponse$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/bankAccountsGetCreateModel.ts b/sync-for-expenses/src/funcs/bankAccountsGetCreateModel.ts index 874a03766..3a9c2279f 100644 --- a/sync-for-expenses/src/funcs/bankAccountsGetCreateModel.ts +++ b/sync-for-expenses/src/funcs/bankAccountsGetCreateModel.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -31,26 +34,55 @@ import { Result } from "../sdk/types/fp.js"; * * [Bank accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * See the *response examples* for integration-specific indicative models. */ -export async function bankAccountsGetCreateModel( +export function bankAccountsGetCreateModel( client: CodatSyncExpensesCore, request: operations.GetCreateBankAccountsModelRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.PushOption, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.GetCreateBankAccountsModelRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.PushOption, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -59,7 +91,7 @@ export async function bankAccountsGetCreateModel( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -79,17 +111,19 @@ export async function bankAccountsGetCreateModel( "/companies/{companyId}/connections/{connectionId}/options/bankAccounts", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get-create-bankAccounts-model", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -113,13 +147,15 @@ export async function bankAccountsGetCreateModel( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -130,7 +166,7 @@ export async function bankAccountsGetCreateModel( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -141,24 +177,24 @@ export async function bankAccountsGetCreateModel( const [result] = await M.match< shared.PushOption, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.PushOption$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/companiesCreate.ts b/sync-for-expenses/src/funcs/companiesCreate.ts index 7fb22d786..db65a6aa6 100644 --- a/sync-for-expenses/src/funcs/companiesCreate.ts +++ b/sync-for-expenses/src/funcs/companiesCreate.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeJSON } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,9 +19,10 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -33,22 +36,51 @@ import { Result } from "../sdk/types/fp.js"; * * If forbidden characters (see `name` pattern) are present in the request, a company will be created with the forbidden characters removed. For example, `Company (Codat[1])` with be created as `Company Codat1`. */ -export async function companiesCreate( +export function companiesCreate( client: CodatSyncExpensesCore, request?: shared.CompanyRequestBody | undefined, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.Company, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request?: shared.CompanyRequestBody | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + shared.Company, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -56,7 +88,7 @@ export async function companiesCreate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = payload === undefined @@ -65,18 +97,20 @@ export async function companiesCreate( const path = pathToFunc("/companies")(); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create-company", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -100,13 +134,15 @@ export async function companiesCreate( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -117,7 +153,7 @@ export async function companiesCreate( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -128,24 +164,24 @@ export async function companiesCreate( const [result] = await M.match< shared.Company, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.Company$inboundSchema), - M.jsonErr( - [400, 401, 402, 403, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([400, 401, 402, 403, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/companiesDelete.ts b/sync-for-expenses/src/funcs/companiesDelete.ts index 64261fc23..a8b2cd606 100644 --- a/sync-for-expenses/src/funcs/companiesDelete.ts +++ b/sync-for-expenses/src/funcs/companiesDelete.ts @@ -2,14 +2,16 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -18,9 +20,10 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -32,22 +35,51 @@ import { Result } from "../sdk/types/fp.js"; * A [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data. * Each company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. */ -export async function companiesDelete( +export function companiesDelete( client: CodatSyncExpensesCore, request: operations.DeleteCompanyRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< void, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.DeleteCompanyRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -55,7 +87,7 @@ export async function companiesDelete( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -69,17 +101,19 @@ export async function companiesDelete( const path = pathToFunc("/companies/{companyId}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "delete-company", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -103,13 +137,15 @@ export async function companiesDelete( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -120,7 +156,7 @@ export async function companiesDelete( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -131,24 +167,24 @@ export async function companiesDelete( const [result] = await M.match< void, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(204, z.void()), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/companiesGet.ts b/sync-for-expenses/src/funcs/companiesGet.ts index 1c59ece35..d298ca279 100644 --- a/sync-for-expenses/src/funcs/companiesGet.ts +++ b/sync-for-expenses/src/funcs/companiesGet.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -32,22 +35,51 @@ import { Result } from "../sdk/types/fp.js"; * A [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data. * Each company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. */ -export async function companiesGet( +export function companiesGet( client: CodatSyncExpensesCore, request: operations.GetCompanyRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.Company, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.GetCompanyRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.Company, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -55,7 +87,7 @@ export async function companiesGet( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -69,17 +101,19 @@ export async function companiesGet( const path = pathToFunc("/companies/{companyId}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get-company", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -103,13 +137,15 @@ export async function companiesGet( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -120,7 +156,7 @@ export async function companiesGet( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -131,24 +167,24 @@ export async function companiesGet( const [result] = await M.match< shared.Company, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.Company$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/companiesList.ts b/sync-for-expenses/src/funcs/companiesList.ts index f9a451c2e..6c11b88fd 100644 --- a/sync-for-expenses/src/funcs/companiesList.ts +++ b/sync-for-expenses/src/funcs/companiesList.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeFormQuery } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -31,23 +34,65 @@ import { Result } from "../sdk/types/fp.js"; * * A [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data. * Each company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. + * + * ## Filter by tags + * + * The *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying): + * + * - equals (`=`) + * - not equals (`!=`) + * - contains (`~`) + * + * For example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team: + * - Foreign key: `uid = {yourCustomerId}` + * - Region: `region != uk` + * - Owning team and region: `region = uk && owningTeam = invoice-finance` */ -export async function companiesList( +export function companiesList( client: CodatSyncExpensesCore, request?: operations.ListCompaniesRequest | undefined, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.Companies, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request?: operations.ListCompaniesRequest | undefined, + options?: RequestOptions, +): Promise< + [ + Result< + shared.Companies, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -56,7 +101,7 @@ export async function companiesList( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -68,19 +113,22 @@ export async function companiesList( "page": payload?.page, "pageSize": payload?.pageSize, "query": payload?.query, + "tags": payload?.tags, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "list-companies", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -104,14 +152,16 @@ export async function companiesList( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -133,7 +183,7 @@ export async function companiesList( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -144,24 +194,27 @@ export async function companiesList( const [result] = await M.match< shared.Companies, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.Companies$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/companiesReplace.ts b/sync-for-expenses/src/funcs/companiesReplace.ts new file mode 100644 index 000000000..afa89e569 --- /dev/null +++ b/sync-for-expenses/src/funcs/companiesReplace.ts @@ -0,0 +1,193 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncExpensesCore } from "../core.js"; +import { encodeJSON, encodeSimple } from "../lib/encodings.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../sdk/models/errors/httpclienterrors.js"; +import * as errors from "../sdk/models/errors/index.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Replace company + * + * @remarks + * Use the *Replace company* endpoint to replace the existing name, description, and tags of the company. Calling the endpoint will replace existing values even if new values haven't been defined in the payload. + * + * A [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data. + * Each company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. + */ +export function companiesReplace( + client: CodatSyncExpensesCore, + request: operations.ReplaceCompanyRequest, + options?: RequestOptions, +): APIPromise< + Result< + shared.Company, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.ReplaceCompanyRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.Company, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const parsed = safeParse( + request, + (value) => operations.ReplaceCompanyRequest$outboundSchema.parse(value), + "Input validation failed", + ); + if (!parsed.ok) { + return [parsed, { status: "invalid" }]; + } + const payload = parsed.value; + const body = encodeJSON("body", payload.CompanyRequestBody, { + explode: true, + }); + + const pathParams = { + companyId: encodeSimple("companyId", payload.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path = pathToFunc("/companies/{companyId}")(pathParams); + + const headers = new Headers(compactMap({ + "Content-Type": "application/json", + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.authHeader); + const securityInput = secConfig == null ? {} : { authHeader: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "replace-company", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.authHeader, + retryConfig: options?.retries + || client._options.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + } + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "PUT", + baseURL: options?.serverURL, + path: path, + headers: headers, + body: body, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + shared.Company, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, shared.Company$inboundSchema), + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/sync-for-expenses/src/funcs/companiesUpdate.ts b/sync-for-expenses/src/funcs/companiesUpdate.ts index a0f680412..41ddd1a93 100644 --- a/sync-for-expenses/src/funcs/companiesUpdate.ts +++ b/sync-for-expenses/src/funcs/companiesUpdate.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,37 +19,68 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** * Update company * * @remarks - * Use the *Update company* endpoint to update both the name and description of the company. + * Use the *Update company* endpoint to update the name, description, or tags of the company. + * + * The *Update company* endpoint doesn't have any required fields. If any of the fields provided are `null` or not provided, they won't be included in the update. * * A [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data. - * Each company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. */ -export async function companiesUpdate( +export function companiesUpdate( client: CodatSyncExpensesCore, request: operations.UpdateCompanyRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.Company, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.UpdateCompanyRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.Company, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -55,10 +88,10 @@ export async function companiesUpdate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; - const body = encodeJSON("body", payload.CompanyRequestBody, { + const body = encodeJSON("body", payload.CompanyUpdateRequest, { explode: true, }); @@ -71,18 +104,20 @@ export async function companiesUpdate( const path = pathToFunc("/companies/{companyId}")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "update-company", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -105,14 +140,16 @@ export async function companiesUpdate( const requestRes = client._createRequest(context, { security: requestSecurity, - method: "PUT", + method: "PATCH", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -123,7 +160,7 @@ export async function companiesUpdate( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -134,24 +171,24 @@ export async function companiesUpdate( const [result] = await M.match< shared.Company, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.Company$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/companyInfoGet.ts b/sync-for-expenses/src/funcs/companyInfoGet.ts index 98e8f3133..a3495ed39 100644 --- a/sync-for-expenses/src/funcs/companyInfoGet.ts +++ b/sync-for-expenses/src/funcs/companyInfoGet.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -29,22 +32,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Gets the latest basic info for a company. */ -export async function companyInfoGet( +export function companyInfoGet( client: CodatSyncExpensesCore, request: operations.GetCompanyInfoRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.CompanyInformation, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.GetCompanyInfoRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.CompanyInformation, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -52,7 +84,7 @@ export async function companyInfoGet( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -66,17 +98,19 @@ export async function companyInfoGet( const path = pathToFunc("/companies/{companyId}/data/info")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get-company-info", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -100,13 +134,15 @@ export async function companyInfoGet( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -128,7 +164,7 @@ export async function companyInfoGet( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -139,24 +175,27 @@ export async function companyInfoGet( const [result] = await M.match< shared.CompanyInformation, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.CompanyInformation$inboundSchema), M.jsonErr( - [401, 402, 403, 404, 409, 429, 500, 503], + [401, 402, 403, 404, 409, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/configurationGet.ts b/sync-for-expenses/src/funcs/configurationGet.ts index 7b20dc685..9c153dd31 100644 --- a/sync-for-expenses/src/funcs/configurationGet.ts +++ b/sync-for-expenses/src/funcs/configurationGet.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -29,22 +32,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Gets a company's expense sync configuration */ -export async function configurationGet( +export function configurationGet( client: CodatSyncExpensesCore, request: operations.GetCompanyConfigurationRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.CompanyConfiguration, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.GetCompanyConfigurationRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.CompanyConfiguration, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -53,7 +85,7 @@ export async function configurationGet( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -69,17 +101,19 @@ export async function configurationGet( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get-company-configuration", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -103,13 +137,15 @@ export async function configurationGet( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -120,7 +156,7 @@ export async function configurationGet( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -131,24 +167,24 @@ export async function configurationGet( const [result] = await M.match< shared.CompanyConfiguration, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.CompanyConfiguration$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/configurationSet.ts b/sync-for-expenses/src/funcs/configurationSet.ts index ac34ecf55..1e2a91a84 100644 --- a/sync-for-expenses/src/funcs/configurationSet.ts +++ b/sync-for-expenses/src/funcs/configurationSet.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -29,22 +32,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Sets a company's expense sync configuration */ -export async function configurationSet( +export function configurationSet( client: CodatSyncExpensesCore, request: operations.SetCompanyConfigurationRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.CompanyConfiguration, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.SetCompanyConfigurationRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.CompanyConfiguration, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -53,7 +85,7 @@ export async function configurationSet( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload.CompanyConfiguration, { @@ -71,18 +103,20 @@ export async function configurationSet( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "set-company-configuration", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -106,13 +140,15 @@ export async function configurationSet( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -134,7 +170,7 @@ export async function configurationSet( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -145,24 +181,27 @@ export async function configurationSet( const [result] = await M.match< shared.CompanyConfiguration, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.CompanyConfiguration$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/connectionsCreate.ts b/sync-for-expenses/src/funcs/connectionsCreate.ts index d01a52e81..1117875f2 100644 --- a/sync-for-expenses/src/funcs/connectionsCreate.ts +++ b/sync-for-expenses/src/funcs/connectionsCreate.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -31,22 +34,51 @@ import { Result } from "../sdk/types/fp.js"; * * Use the [List Integrations](https://docs.codat.io/platform-api#/operations/list-integrations) endpoint to access valid platform keys. */ -export async function connectionsCreate( +export function connectionsCreate( client: CodatSyncExpensesCore, request: operations.CreateConnectionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.Connection, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.CreateConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.Connection, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -54,7 +86,7 @@ export async function connectionsCreate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload.RequestBody, { explode: true }); @@ -68,18 +100,20 @@ export async function connectionsCreate( const path = pathToFunc("/companies/{companyId}/connections")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create-connection", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -103,13 +137,15 @@ export async function connectionsCreate( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -120,7 +156,7 @@ export async function connectionsCreate( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -131,24 +167,24 @@ export async function connectionsCreate( const [result] = await M.match< shared.Connection, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.Connection$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/connectionsCreatePartnerExpenseConnection.ts b/sync-for-expenses/src/funcs/connectionsCreatePartnerExpenseConnection.ts index 25528a213..f4fb1fb9b 100644 --- a/sync-for-expenses/src/funcs/connectionsCreatePartnerExpenseConnection.ts +++ b/sync-for-expenses/src/funcs/connectionsCreatePartnerExpenseConnection.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -29,22 +32,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Creates a partner expense data connection */ -export async function connectionsCreatePartnerExpenseConnection( +export function connectionsCreatePartnerExpenseConnection( client: CodatSyncExpensesCore, request: operations.CreatePartnerExpenseConnectionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.Connection, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.CreatePartnerExpenseConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.Connection, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -55,7 +87,7 @@ export async function connectionsCreatePartnerExpenseConnection( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -71,17 +103,19 @@ export async function connectionsCreatePartnerExpenseConnection( "/companies/{companyId}/sync/expenses/connections/partnerExpense", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create-partner-expense-connection", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -105,13 +139,15 @@ export async function connectionsCreatePartnerExpenseConnection( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -133,7 +169,7 @@ export async function connectionsCreatePartnerExpenseConnection( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -144,24 +180,27 @@ export async function connectionsCreatePartnerExpenseConnection( const [result] = await M.match< shared.Connection, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.Connection$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/connectionsDelete.ts b/sync-for-expenses/src/funcs/connectionsDelete.ts index 0a7af8159..37bb93331 100644 --- a/sync-for-expenses/src/funcs/connectionsDelete.ts +++ b/sync-for-expenses/src/funcs/connectionsDelete.ts @@ -2,14 +2,16 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -18,9 +20,10 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -30,22 +33,51 @@ import { Result } from "../sdk/types/fp.js"; * Revoke and remove a connection from a company. * This operation is not reversible. The end user would need to reauthorize a new data connection if you wish to view new data for this company. */ -export async function connectionsDelete( +export function connectionsDelete( client: CodatSyncExpensesCore, request: operations.DeleteConnectionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< void, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.DeleteConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -53,7 +85,7 @@ export async function connectionsDelete( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -73,17 +105,19 @@ export async function connectionsDelete( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "delete-connection", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -107,13 +141,15 @@ export async function connectionsDelete( const requestRes = client._createRequest(context, { security: requestSecurity, method: "DELETE", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -124,7 +160,7 @@ export async function connectionsDelete( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -135,24 +171,24 @@ export async function connectionsDelete( const [result] = await M.match< void, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(200, z.void()), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/connectionsGet.ts b/sync-for-expenses/src/funcs/connectionsGet.ts index df5261b86..ca1a71aa2 100644 --- a/sync-for-expenses/src/funcs/connectionsGet.ts +++ b/sync-for-expenses/src/funcs/connectionsGet.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -29,22 +32,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Returns a specific connection for a company when valid identifiers are provided. If the identifiers are for a deleted company and/or connection, a not found response is returned. */ -export async function connectionsGet( +export function connectionsGet( client: CodatSyncExpensesCore, request: operations.GetConnectionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.Connection, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.GetConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.Connection, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -52,7 +84,7 @@ export async function connectionsGet( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -72,17 +104,19 @@ export async function connectionsGet( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get-connection", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -106,13 +140,15 @@ export async function connectionsGet( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -123,7 +159,7 @@ export async function connectionsGet( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -134,24 +170,24 @@ export async function connectionsGet( const [result] = await M.match< shared.Connection, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.Connection$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/connectionsList.ts b/sync-for-expenses/src/funcs/connectionsList.ts index 191d9f7a5..cfcd35260 100644 --- a/sync-for-expenses/src/funcs/connectionsList.ts +++ b/sync-for-expenses/src/funcs/connectionsList.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -29,22 +32,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * List the connections for a company. */ -export async function connectionsList( +export function connectionsList( client: CodatSyncExpensesCore, request: operations.ListConnectionsRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.Connections, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.ListConnectionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.Connections, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -52,7 +84,7 @@ export async function connectionsList( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -73,17 +105,19 @@ export async function connectionsList( "query": payload.query, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "list-connections", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -107,14 +141,16 @@ export async function connectionsList( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -136,7 +172,7 @@ export async function connectionsList( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -147,24 +183,27 @@ export async function connectionsList( const [result] = await M.match< shared.Connections, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.Connections$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/connectionsUnlink.ts b/sync-for-expenses/src/funcs/connectionsUnlink.ts index 25ddfec5b..5b976008d 100644 --- a/sync-for-expenses/src/funcs/connectionsUnlink.ts +++ b/sync-for-expenses/src/funcs/connectionsUnlink.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -29,22 +32,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * This allows you to deauthorize a connection, without deleting it from Codat. This means you can still view any data that has previously been pulled into Codat, and also lets you re-authorize in future if your customer wishes to resume sharing their data. */ -export async function connectionsUnlink( +export function connectionsUnlink( client: CodatSyncExpensesCore, request: operations.UnlinkConnectionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.Connection, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.UnlinkConnectionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.Connection, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -52,7 +84,7 @@ export async function connectionsUnlink( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload.RequestBody, { explode: true }); @@ -72,18 +104,20 @@ export async function connectionsUnlink( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "unlink-connection", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -107,13 +141,15 @@ export async function connectionsUnlink( const requestRes = client._createRequest(context, { security: requestSecurity, method: "PATCH", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -124,7 +160,7 @@ export async function connectionsUnlink( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -135,24 +171,24 @@ export async function connectionsUnlink( const [result] = await M.match< shared.Connection, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.Connection$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/customersCreate.ts b/sync-for-expenses/src/funcs/customersCreate.ts index bdd4c82be..e5a5569a8 100644 --- a/sync-for-expenses/src/funcs/customersCreate.ts +++ b/sync-for-expenses/src/funcs/customersCreate.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -31,26 +34,55 @@ import { Result } from "../sdk/types/fp.js"; * * [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-customers-model). */ -export async function customersCreate( +export function customersCreate( client: CodatSyncExpensesCore, request: operations.CreateCustomerRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.CreateCustomerResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.CreateCustomerRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.CreateCustomerResponse, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +90,7 @@ export async function customersCreate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload.Customer, { explode: true }); @@ -83,18 +115,20 @@ export async function customersCreate( "timeoutInMinutes": payload.timeoutInMinutes, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create-customer", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -118,14 +152,16 @@ export async function customersCreate( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -147,7 +183,7 @@ export async function customersCreate( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -158,24 +194,27 @@ export async function customersCreate( const [result] = await M.match< shared.CreateCustomerResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.CreateCustomerResponse$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/customersGet.ts b/sync-for-expenses/src/funcs/customersGet.ts index fecc01907..ca75df952 100644 --- a/sync-for-expenses/src/funcs/customersGet.ts +++ b/sync-for-expenses/src/funcs/customersGet.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -33,22 +36,51 @@ import { Result } from "../sdk/types/fp.js"; * * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). */ -export async function customersGet( +export function customersGet( client: CodatSyncExpensesCore, request: operations.GetCustomerRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.Customer, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.GetCustomerRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.Customer, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -56,7 +88,7 @@ export async function customersGet( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -76,17 +108,19 @@ export async function customersGet( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get-customer", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -110,13 +144,15 @@ export async function customersGet( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -138,7 +174,7 @@ export async function customersGet( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -149,24 +185,27 @@ export async function customersGet( const [result] = await M.match< shared.Customer, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.Customer$inboundSchema), M.jsonErr( - [401, 402, 403, 404, 409, 429, 500, 503], + [401, 402, 403, 404, 409, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/customersList.ts b/sync-for-expenses/src/funcs/customersList.ts index d473d4688..29c9738d4 100644 --- a/sync-for-expenses/src/funcs/customersList.ts +++ b/sync-for-expenses/src/funcs/customersList.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -33,22 +36,51 @@ import { Result } from "../sdk/types/fp.js"; * * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). */ -export async function customersList( +export function customersList( client: CodatSyncExpensesCore, request: operations.ListCustomersRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.Customers, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.ListCustomersRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.Customers, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -56,7 +88,7 @@ export async function customersList( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -77,17 +109,19 @@ export async function customersList( "query": payload.query, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "list-customers", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -111,14 +145,16 @@ export async function customersList( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -141,7 +177,7 @@ export async function customersList( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -152,24 +188,27 @@ export async function customersList( const [result] = await M.match< shared.Customers, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.Customers$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 409, 429, 500, 503], + [400, 401, 402, 403, 404, 409, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/customersUpdate.ts b/sync-for-expenses/src/funcs/customersUpdate.ts index beff330de..ddde6228a 100644 --- a/sync-for-expenses/src/funcs/customersUpdate.ts +++ b/sync-for-expenses/src/funcs/customersUpdate.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -31,26 +34,55 @@ import { Result } from "../sdk/types/fp.js"; * * [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-customers-model). */ -export async function customersUpdate( +export function customersUpdate( client: CodatSyncExpensesCore, request: operations.UpdateCustomerRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.UpdateCustomerResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.UpdateCustomerRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.UpdateCustomerResponse, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +90,7 @@ export async function customersUpdate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload.Customer, { explode: true }); @@ -88,18 +120,20 @@ export async function customersUpdate( "timeoutInMinutes": payload.timeoutInMinutes, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "update-customer", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -123,14 +157,16 @@ export async function customersUpdate( const requestRes = client._createRequest(context, { security: requestSecurity, method: "PUT", + baseURL: options?.serverURL, path: path, headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -152,7 +188,7 @@ export async function customersUpdate( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -163,24 +199,27 @@ export async function customersUpdate( const [result] = await M.match< shared.UpdateCustomerResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.UpdateCustomerResponse$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/expensesCreate.ts b/sync-for-expenses/src/funcs/expensesCreate.ts index c2c358b57..617e05dbb 100644 --- a/sync-for-expenses/src/funcs/expensesCreate.ts +++ b/sync-for-expenses/src/funcs/expensesCreate.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -40,24 +43,55 @@ import { Result } from "../sdk/types/fp.js"; * | QuickBooks Desktop | Yes | * | QuickBooks Online | Yes | * | Oracle NetSuite | Yes | + * | Sage Intacct | Yes | * | Xero | Yes | + * | Zoho Books | Yes | */ -export async function expensesCreate( +export function expensesCreate( client: CodatSyncExpensesCore, request: operations.CreateExpenseTransactionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.CreateExpenseResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.CreateExpenseTransactionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.CreateExpenseResponse, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -66,7 +100,7 @@ export async function expensesCreate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload.RequestBody, { explode: true }); @@ -82,18 +116,20 @@ export async function expensesCreate( "/companies/{companyId}/sync/expenses/expense-transactions", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create-expense-transaction", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -117,13 +153,15 @@ export async function expensesCreate( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -145,7 +183,7 @@ export async function expensesCreate( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -156,24 +194,27 @@ export async function expensesCreate( const [result] = await M.match< shared.CreateExpenseResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.CreateExpenseResponse$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/expensesUpdate.ts b/sync-for-expenses/src/funcs/expensesUpdate.ts index 83e7d3d35..626dd3aef 100644 --- a/sync-for-expenses/src/funcs/expensesUpdate.ts +++ b/sync-for-expenses/src/funcs/expensesUpdate.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -31,31 +34,69 @@ import { Result } from "../sdk/types/fp.js"; * * [Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/UpdateExpenseRequest) represent transactions made with a company debit or credit card. * - * ### Supported Integrations + * ### Supported integrations * The following integrations are supported for the [Payment](https://docs.codat.io/expenses/sync-process/expense-transactions#transaction-types) transaction `type` only: * | Integration | Supported | * |-----------------------|-----------| * | FreeAgent | Yes | + * | QuickBooks Desktop | Yes | * | QuickBooks Online | Yes | * | Oracle NetSuite | Yes | + * | Sage Intacct | Yes | * | Xero | Yes | + * | Zoho Books | Yes | + * + * #### Integration-specific behavior + * + * | Integration | Specifics | + * |-----------------------|-----------| + * | Sage Intacct | To sync **debit card expenses**, map the debit card to a Credit Card with the account type set to `Debit`.| */ -export async function expensesUpdate( +export function expensesUpdate( client: CodatSyncExpensesCore, request: operations.UpdateExpenseTransactionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.UpdateExpenseResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.UpdateExpenseTransactionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.UpdateExpenseResponse, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -64,7 +105,7 @@ export async function expensesUpdate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload.UpdateExpenseRequest, { @@ -86,18 +127,20 @@ export async function expensesUpdate( "/companies/{companyId}/sync/expenses/expense-transactions/{transactionId}", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "update-expense-transaction", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -121,13 +164,15 @@ export async function expensesUpdate( const requestRes = client._createRequest(context, { security: requestSecurity, method: "PUT", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -150,7 +195,7 @@ export async function expensesUpdate( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -161,24 +206,27 @@ export async function expensesUpdate( const [result] = await M.match< shared.UpdateExpenseResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(202, shared.UpdateExpenseResponse$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 422, 429, 500, 503], + [400, 401, 402, 403, 404, 422, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/manageDataGet.ts b/sync-for-expenses/src/funcs/manageDataGet.ts index 04d60a3f5..d38e06dd7 100644 --- a/sync-for-expenses/src/funcs/manageDataGet.ts +++ b/sync-for-expenses/src/funcs/manageDataGet.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,9 +19,10 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -28,22 +31,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Get the state of each data type for a company */ -export async function manageDataGet( +export function manageDataGet( client: CodatSyncExpensesCore, request: operations.GetDataStatusRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< operations.GetDataStatusDataStatuses, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.GetDataStatusRequest, + options?: RequestOptions, +): Promise< + [ + Result< + operations.GetDataStatusDataStatuses, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -51,7 +83,7 @@ export async function manageDataGet( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -65,17 +97,19 @@ export async function manageDataGet( const path = pathToFunc("/companies/{companyId}/dataStatus")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get-data-status", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -99,13 +133,15 @@ export async function manageDataGet( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -116,7 +152,7 @@ export async function manageDataGet( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -127,24 +163,24 @@ export async function manageDataGet( const [result] = await M.match< operations.GetDataStatusDataStatuses, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, operations.GetDataStatusDataStatuses$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/manageDataGetPullOperation.ts b/sync-for-expenses/src/funcs/manageDataGetPullOperation.ts index a2816d8bb..49d4a7aeb 100644 --- a/sync-for-expenses/src/funcs/manageDataGetPullOperation.ts +++ b/sync-for-expenses/src/funcs/manageDataGetPullOperation.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -29,22 +32,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Retrieve information about a single dataset or pull operation. */ -export async function manageDataGetPullOperation( +export function manageDataGetPullOperation( client: CodatSyncExpensesCore, request: operations.GetPullOperationRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.PullOperation, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.GetPullOperationRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.PullOperation, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -52,7 +84,7 @@ export async function manageDataGetPullOperation( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -72,17 +104,19 @@ export async function manageDataGetPullOperation( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get-pull-operation", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -106,13 +140,15 @@ export async function manageDataGetPullOperation( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -123,7 +159,7 @@ export async function manageDataGetPullOperation( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -134,24 +170,24 @@ export async function manageDataGetPullOperation( const [result] = await M.match< shared.PullOperation, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.PullOperation$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/manageDataListPullOperations.ts b/sync-for-expenses/src/funcs/manageDataListPullOperations.ts index 96197062d..b4d5539c4 100644 --- a/sync-for-expenses/src/funcs/manageDataListPullOperations.ts +++ b/sync-for-expenses/src/funcs/manageDataListPullOperations.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -29,22 +32,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Gets the pull operation history (datasets) for a given company. */ -export async function manageDataListPullOperations( +export function manageDataListPullOperations( client: CodatSyncExpensesCore, request: operations.ListPullOperationsRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.PullOperations, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.ListPullOperationsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.PullOperations, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -52,7 +84,7 @@ export async function manageDataListPullOperations( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -73,17 +105,19 @@ export async function manageDataListPullOperations( "query": payload.query, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "list-pull-operations", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -107,14 +141,16 @@ export async function manageDataListPullOperations( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -136,7 +172,7 @@ export async function manageDataListPullOperations( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -147,24 +183,27 @@ export async function manageDataListPullOperations( const [result] = await M.match< shared.PullOperations, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.PullOperations$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/manageDataRefreshAllDataTypes.ts b/sync-for-expenses/src/funcs/manageDataRefreshAllDataTypes.ts index d0e36cde5..13ce62816 100644 --- a/sync-for-expenses/src/funcs/manageDataRefreshAllDataTypes.ts +++ b/sync-for-expenses/src/funcs/manageDataRefreshAllDataTypes.ts @@ -2,14 +2,16 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -18,9 +20,10 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -33,22 +36,51 @@ import { Result } from "../sdk/types/fp.js"; * * [Read more](https://docs.codat.io/core-concepts/data-type-settings) about data type settings and `fetch on first link`. */ -export async function manageDataRefreshAllDataTypes( +export function manageDataRefreshAllDataTypes( client: CodatSyncExpensesCore, request: operations.RefreshAllDataTypesRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< void, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.RefreshAllDataTypesRequest, + options?: RequestOptions, +): Promise< + [ + Result< + void, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -57,7 +89,7 @@ export async function manageDataRefreshAllDataTypes( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -71,17 +103,19 @@ export async function manageDataRefreshAllDataTypes( const path = pathToFunc("/companies/{companyId}/data/all")(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "refresh-all-data-types", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -105,24 +139,37 @@ export async function manageDataRefreshAllDataTypes( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -133,24 +180,27 @@ export async function manageDataRefreshAllDataTypes( const [result] = await M.match< void, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.nil(204, z.void()), M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/manageDataRefreshDataType.ts b/sync-for-expenses/src/funcs/manageDataRefreshDataType.ts index 589b169f5..3829c01ee 100644 --- a/sync-for-expenses/src/funcs/manageDataRefreshDataType.ts +++ b/sync-for-expenses/src/funcs/manageDataRefreshDataType.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -31,22 +34,51 @@ import { Result } from "../sdk/types/fp.js"; * * This is an asynchronous operation, and will bring updated data into Codat from the linked integration for you to view. */ -export async function manageDataRefreshDataType( +export function manageDataRefreshDataType( client: CodatSyncExpensesCore, request: operations.RefreshDataTypeRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.PullOperation, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.RefreshDataTypeRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.PullOperation, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -54,7 +86,7 @@ export async function manageDataRefreshDataType( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -78,17 +110,19 @@ export async function manageDataRefreshDataType( "connectionId": payload.connectionId, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "refresh-data-type", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -112,25 +146,38 @@ export async function manageDataRefreshDataType( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; const doResult = await client._do(req, { context, - errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], retryConfig: context.retryConfig, retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -141,24 +188,27 @@ export async function manageDataRefreshDataType( const [result] = await M.match< shared.PullOperation, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.PullOperation$inboundSchema), M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/mappingOptionsGetMappingOptions.ts b/sync-for-expenses/src/funcs/mappingOptionsGetMappingOptions.ts index 15504048e..f4c147aaf 100644 --- a/sync-for-expenses/src/funcs/mappingOptionsGetMappingOptions.ts +++ b/sync-for-expenses/src/funcs/mappingOptionsGetMappingOptions.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -29,22 +32,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Gets the mapping options (accounts, trackingCategories and taxRates) for a company's accounting software */ -export async function mappingOptionsGetMappingOptions( +export function mappingOptionsGetMappingOptions( client: CodatSyncExpensesCore, request: operations.GetMappingOptionsRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.MappingOptions, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.GetMappingOptionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.MappingOptions, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -52,7 +84,7 @@ export async function mappingOptionsGetMappingOptions( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -68,17 +100,19 @@ export async function mappingOptionsGetMappingOptions( "/companies/{companyId}/sync/expenses/mappingOptions", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get-mapping-options", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -102,13 +136,15 @@ export async function mappingOptionsGetMappingOptions( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -119,7 +155,7 @@ export async function mappingOptionsGetMappingOptions( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -130,24 +166,24 @@ export async function mappingOptionsGetMappingOptions( const [result] = await M.match< shared.MappingOptions, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.MappingOptions$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/pushOperationsGet.ts b/sync-for-expenses/src/funcs/pushOperationsGet.ts index 00c0437c9..7e3b12881 100644 --- a/sync-for-expenses/src/funcs/pushOperationsGet.ts +++ b/sync-for-expenses/src/funcs/pushOperationsGet.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -29,22 +32,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Retrieve push operation. */ -export async function pushOperationsGet( +export function pushOperationsGet( client: CodatSyncExpensesCore, request: operations.GetPushOperationRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.PushOperation, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.GetPushOperationRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.PushOperation, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -52,7 +84,7 @@ export async function pushOperationsGet( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -73,17 +105,19 @@ export async function pushOperationsGet( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get-push-operation", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -107,13 +141,15 @@ export async function pushOperationsGet( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -124,7 +160,7 @@ export async function pushOperationsGet( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -135,24 +171,24 @@ export async function pushOperationsGet( const [result] = await M.match< shared.PushOperation, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.PushOperation$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/pushOperationsList.ts b/sync-for-expenses/src/funcs/pushOperationsList.ts index 2104246bd..3911997c4 100644 --- a/sync-for-expenses/src/funcs/pushOperationsList.ts +++ b/sync-for-expenses/src/funcs/pushOperationsList.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -29,22 +32,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * List push operation records. */ -export async function pushOperationsList( +export function pushOperationsList( client: CodatSyncExpensesCore, request: operations.ListPushOperationsRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.PushOperations, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.ListPushOperationsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.PushOperations, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -52,7 +84,7 @@ export async function pushOperationsList( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -73,17 +105,19 @@ export async function pushOperationsList( "query": payload.query, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "list-push-operations", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -107,14 +141,16 @@ export async function pushOperationsList( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -136,7 +172,7 @@ export async function pushOperationsList( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -147,24 +183,27 @@ export async function pushOperationsList( const [result] = await M.match< shared.PushOperations, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.PushOperations$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/reimbursementsCreate.ts b/sync-for-expenses/src/funcs/reimbursementsCreate.ts index 0f2bdf1ef..0972e1912 100644 --- a/sync-for-expenses/src/funcs/reimbursementsCreate.ts +++ b/sync-for-expenses/src/funcs/reimbursementsCreate.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -38,23 +41,54 @@ import { Result } from "../sdk/types/fp.js"; * | QuickBooks Desktop | Yes | * | QuickBooks Online | Yes | * | Oracle NetSuite | Yes | + * | Zoho Books | Yes | + * | Sage Intacct | Yes | */ -export async function reimbursementsCreate( +export function reimbursementsCreate( client: CodatSyncExpensesCore, request: operations.CreateReimbursableExpenseTransactionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.CreateReimbursableExpenseResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.CreateReimbursableExpenseTransactionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.CreateReimbursableExpenseResponse, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -64,7 +98,7 @@ export async function reimbursementsCreate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload.RequestBody, { explode: true }); @@ -80,18 +114,20 @@ export async function reimbursementsCreate( "/companies/{companyId}/sync/expenses/reimbursable-expense-transactions", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create-reimbursable-expense-transaction", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -115,13 +151,15 @@ export async function reimbursementsCreate( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -143,7 +181,7 @@ export async function reimbursementsCreate( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -154,24 +192,27 @@ export async function reimbursementsCreate( const [result] = await M.match< shared.CreateReimbursableExpenseResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.CreateReimbursableExpenseResponse$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/reimbursementsUpdate.ts b/sync-for-expenses/src/funcs/reimbursementsUpdate.ts index d4aafefe8..32d3b6a90 100644 --- a/sync-for-expenses/src/funcs/reimbursementsUpdate.ts +++ b/sync-for-expenses/src/funcs/reimbursementsUpdate.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -37,23 +40,54 @@ import { Result } from "../sdk/types/fp.js"; * | FreeAgent | Yes | * | QuickBooks Online | Yes | * | Oracle NetSuite | Yes | + * | Sage Intacct | Yes | + * | Zoho Books | Yes | */ -export async function reimbursementsUpdate( +export function reimbursementsUpdate( client: CodatSyncExpensesCore, request: operations.UpdateReimbursableExpenseTransactionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.CreateReimbursableExpenseResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.UpdateReimbursableExpenseTransactionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.CreateReimbursableExpenseResponse, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -63,7 +97,7 @@ export async function reimbursementsUpdate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON( @@ -87,18 +121,20 @@ export async function reimbursementsUpdate( "/companies/{companyId}/sync/expenses/reimbursable-expense-transactions/{transactionId}", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "update-reimbursable-expense-transaction", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -122,13 +158,15 @@ export async function reimbursementsUpdate( const requestRes = client._createRequest(context, { security: requestSecurity, method: "PUT", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -150,7 +188,7 @@ export async function reimbursementsUpdate( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -161,24 +199,27 @@ export async function reimbursementsUpdate( const [result] = await M.match< shared.CreateReimbursableExpenseResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.CreateReimbursableExpenseResponse$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/suppliersCreate.ts b/sync-for-expenses/src/funcs/suppliersCreate.ts index f4dab0ce8..78afa7fd4 100644 --- a/sync-for-expenses/src/funcs/suppliersCreate.ts +++ b/sync-for-expenses/src/funcs/suppliersCreate.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -31,26 +34,68 @@ import { Result } from "../sdk/types/fp.js"; * * [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-suppliers-model). + * + * ### Supported Integrations + * + * | Integration | Supported | + * |-------------------------------|-----------| + * | Dynamics 365 Business Central | Yes | + * | FreeAgent | Yes | + * | Oracle NetSuite | Yes | + * | QuickBooks Desktop | Yes | + * | QuickBooks Online | Yes | + * | Sage Intacct | Yes | + * | Xero | Yes | + * | Zoho Books | Yes | */ -export async function suppliersCreate( +export function suppliersCreate( client: CodatSyncExpensesCore, request: operations.CreateSupplierRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.CreateSupplierResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.CreateSupplierRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.CreateSupplierResponse, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +103,7 @@ export async function suppliersCreate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload.Supplier, { explode: true }); @@ -83,18 +128,20 @@ export async function suppliersCreate( "timeoutInMinutes": payload.timeoutInMinutes, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create-supplier", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -118,14 +165,16 @@ export async function suppliersCreate( const requestRes = client._createRequest(context, { security: requestSecurity, method: "POST", + baseURL: options?.serverURL, path: path, headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -147,7 +196,7 @@ export async function suppliersCreate( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -158,24 +207,27 @@ export async function suppliersCreate( const [result] = await M.match< shared.CreateSupplierResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.CreateSupplierResponse$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/suppliersGet.ts b/sync-for-expenses/src/funcs/suppliersGet.ts index afe01dd2a..ec56c806a 100644 --- a/sync-for-expenses/src/funcs/suppliersGet.ts +++ b/sync-for-expenses/src/funcs/suppliersGet.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -31,24 +34,66 @@ import { Result } from "../sdk/types/fp.js"; * * [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-all-data-types). + * + * ### Supported Integrations + * + * | Integration | Supported | + * |-------------------------------|-----------| + * | Dynamics 365 Business Central | Yes | + * | FreeAgent | Yes | + * | Oracle NetSuite | Yes | + * | QuickBooks Desktop | Yes | + * | QuickBooks Online | Yes | + * | Sage Intacct | Yes | + * | Xero | Yes | + * | Zoho Books | Yes | */ -export async function suppliersGet( +export function suppliersGet( client: CodatSyncExpensesCore, request: operations.GetSupplierRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.Supplier, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.GetSupplierRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.Supplier, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -56,7 +101,7 @@ export async function suppliersGet( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -76,17 +121,19 @@ export async function suppliersGet( pathParams, ); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get-supplier", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -110,13 +157,15 @@ export async function suppliersGet( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -138,7 +187,7 @@ export async function suppliersGet( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -149,24 +198,27 @@ export async function suppliersGet( const [result] = await M.match< shared.Supplier, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.Supplier$inboundSchema), M.jsonErr( - [401, 402, 403, 404, 409, 429, 500, 503], + [401, 402, 403, 404, 409, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/suppliersList.ts b/sync-for-expenses/src/funcs/suppliersList.ts index 3a25e0064..c43c13a01 100644 --- a/sync-for-expenses/src/funcs/suppliersList.ts +++ b/sync-for-expenses/src/funcs/suppliersList.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -31,24 +34,66 @@ import { Result } from "../sdk/types/fp.js"; * * [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-all-data-types). + * + * ### Supported Integrations + * + * | Integration | Supported | + * |-------------------------------|-----------| + * | Dynamics 365 Business Central | Yes | + * | FreeAgent | Yes | + * | Oracle NetSuite | Yes | + * | QuickBooks Desktop | Yes | + * | QuickBooks Online | Yes | + * | Sage Intacct | Yes | + * | Xero | Yes | + * | Zoho Books | Yes | */ -export async function suppliersList( +export function suppliersList( client: CodatSyncExpensesCore, request: operations.ListSuppliersRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.Suppliers, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.ListSuppliersRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.Suppliers, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -56,7 +101,7 @@ export async function suppliersList( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -77,17 +122,19 @@ export async function suppliersList( "query": payload.query, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "list-suppliers", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -111,14 +158,16 @@ export async function suppliersList( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -141,7 +190,7 @@ export async function suppliersList( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -152,24 +201,27 @@ export async function suppliersList( const [result] = await M.match< shared.Suppliers, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.Suppliers$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 409, 429, 500, 503], + [400, 401, 402, 403, 404, 409, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/suppliersUpdate.ts b/sync-for-expenses/src/funcs/suppliersUpdate.ts index 856eddc83..1f2630f79 100644 --- a/sync-for-expenses/src/funcs/suppliersUpdate.ts +++ b/sync-for-expenses/src/funcs/suppliersUpdate.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -31,26 +34,63 @@ import { Result } from "../sdk/types/fp.js"; * * [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-suppliers-model). + * + * ### Supported Integrations + * + * | Integration | Supported | + * |-------------------|-----------| + * | FreeAgent | Yes | + * | QuickBooks Online | Yes | + * | Xero | Yes | */ -export async function suppliersUpdate( +export function suppliersUpdate( client: CodatSyncExpensesCore, request: operations.UpdateSupplierRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.UpdateSupplierResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.UpdateSupplierRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.UpdateSupplierResponse, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -58,7 +98,7 @@ export async function suppliersUpdate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload.Supplier, { explode: true }); @@ -88,18 +128,20 @@ export async function suppliersUpdate( "timeoutInMinutes": payload.timeoutInMinutes, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "update-supplier", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -123,14 +165,16 @@ export async function suppliersUpdate( const requestRes = client._createRequest(context, { security: requestSecurity, method: "PUT", + baseURL: options?.serverURL, path: path, headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -152,7 +196,7 @@ export async function suppliersUpdate( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -163,24 +207,27 @@ export async function suppliersUpdate( const [result] = await M.match< shared.UpdateSupplierResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.UpdateSupplierResponse$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/syncGet.ts b/sync-for-expenses/src/funcs/syncGet.ts index 3f01509f9..8c815fd13 100644 --- a/sync-for-expenses/src/funcs/syncGet.ts +++ b/sync-for-expenses/src/funcs/syncGet.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -29,22 +32,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Get the sync status for a specified sync */ -export async function syncGet( +export function syncGet( client: CodatSyncExpensesCore, request: operations.GetSyncByIdRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.CompanySyncStatus, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.GetSyncByIdRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.CompanySyncStatus, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -52,7 +84,7 @@ export async function syncGet( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -72,17 +104,19 @@ export async function syncGet( "/companies/{companyId}/sync/expenses/syncs/{syncId}/status", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get-sync-by-id", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -106,13 +140,15 @@ export async function syncGet( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -123,7 +159,7 @@ export async function syncGet( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -134,24 +170,24 @@ export async function syncGet( const [result] = await M.match< shared.CompanySyncStatus, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.CompanySyncStatus$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/syncGetLastSuccessfulSync.ts b/sync-for-expenses/src/funcs/syncGetLastSuccessfulSync.ts index 41a6c5b02..3acdd1587 100644 --- a/sync-for-expenses/src/funcs/syncGetLastSuccessfulSync.ts +++ b/sync-for-expenses/src/funcs/syncGetLastSuccessfulSync.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -29,22 +32,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Gets the status of the last successful sync */ -export async function syncGetLastSuccessfulSync( +export function syncGetLastSuccessfulSync( client: CodatSyncExpensesCore, request: operations.GetLastSuccessfulSyncRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.CompanySyncStatus, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.GetLastSuccessfulSyncRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.CompanySyncStatus, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -53,7 +85,7 @@ export async function syncGetLastSuccessfulSync( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -69,17 +101,19 @@ export async function syncGetLastSuccessfulSync( "/companies/{companyId}/sync/expenses/syncs/lastSuccessful/status", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get-last-successful-sync", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -103,13 +137,15 @@ export async function syncGetLastSuccessfulSync( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -120,7 +156,7 @@ export async function syncGetLastSuccessfulSync( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -131,24 +167,24 @@ export async function syncGetLastSuccessfulSync( const [result] = await M.match< shared.CompanySyncStatus, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.CompanySyncStatus$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/syncGetLatestSync.ts b/sync-for-expenses/src/funcs/syncGetLatestSync.ts index 9a58f1236..215e402f9 100644 --- a/sync-for-expenses/src/funcs/syncGetLatestSync.ts +++ b/sync-for-expenses/src/funcs/syncGetLatestSync.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -29,22 +32,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Gets the latest sync status */ -export async function syncGetLatestSync( +export function syncGetLatestSync( client: CodatSyncExpensesCore, request: operations.GetLatestSyncRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.CompanySyncStatus, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.GetLatestSyncRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.CompanySyncStatus, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -52,7 +84,7 @@ export async function syncGetLatestSync( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -68,17 +100,19 @@ export async function syncGetLatestSync( "/companies/{companyId}/sync/expenses/syncs/latest/status", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get-latest-sync", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -102,13 +136,15 @@ export async function syncGetLatestSync( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -119,7 +155,7 @@ export async function syncGetLatestSync( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -130,24 +166,24 @@ export async function syncGetLatestSync( const [result] = await M.match< shared.CompanySyncStatus, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.CompanySyncStatus$inboundSchema), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/syncList.ts b/sync-for-expenses/src/funcs/syncList.ts index a185704ad..18f0cd5f1 100644 --- a/sync-for-expenses/src/funcs/syncList.ts +++ b/sync-for-expenses/src/funcs/syncList.ts @@ -2,14 +2,16 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -18,10 +20,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -30,22 +33,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Gets a list of sync statuses */ -export async function syncList( +export function syncList( client: CodatSyncExpensesCore, request: operations.ListSyncsRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< Array, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.ListSyncsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -53,7 +85,7 @@ export async function syncList( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -69,17 +101,19 @@ export async function syncList( "/companies/{companyId}/sync/expenses/syncs/list/status", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "list-syncs", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -103,13 +137,15 @@ export async function syncList( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -120,7 +156,7 @@ export async function syncList( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -131,24 +167,24 @@ export async function syncList( const [result] = await M.match< Array, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, z.array(shared.CompanySyncStatus$inboundSchema)), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/transactionStatusGet.ts b/sync-for-expenses/src/funcs/transactionStatusGet.ts index d1f88924c..543b7a00f 100644 --- a/sync-for-expenses/src/funcs/transactionStatusGet.ts +++ b/sync-for-expenses/src/funcs/transactionStatusGet.ts @@ -2,14 +2,16 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { CodatSyncExpensesCore } from "../core.js"; import { encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -18,10 +20,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -30,22 +33,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Gets the status of a transaction for a sync */ -export async function transactionStatusGet( +export function transactionStatusGet( client: CodatSyncExpensesCore, request: operations.GetSyncTransactionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< Array, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.GetSyncTransactionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + Array, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -53,7 +85,7 @@ export async function transactionStatusGet( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -77,17 +109,19 @@ export async function transactionStatusGet( "/companies/{companyId}/sync/expenses/syncs/{syncId}/transactions/{transactionId}", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "get-sync-transaction", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -111,13 +145,15 @@ export async function transactionStatusGet( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -128,7 +164,7 @@ export async function transactionStatusGet( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -139,24 +175,24 @@ export async function transactionStatusGet( const [result] = await M.match< Array, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, z.array(shared.Transaction$inboundSchema)), - M.jsonErr( - [401, 402, 403, 404, 429, 500, 503], - errors.ErrorMessage$inboundSchema, - ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema), + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/transactionStatusList.ts b/sync-for-expenses/src/funcs/transactionStatusList.ts index 60e4f59bf..98393991f 100644 --- a/sync-for-expenses/src/funcs/transactionStatusList.ts +++ b/sync-for-expenses/src/funcs/transactionStatusList.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeFormQuery, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -29,22 +32,51 @@ import { Result } from "../sdk/types/fp.js"; * @remarks * Gets the transactions and status for a sync */ -export async function transactionStatusList( +export function transactionStatusList( client: CodatSyncExpensesCore, request: operations.ListSyncTransactionsRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.Transactions, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.ListSyncTransactionsRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.Transactions, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -53,7 +85,7 @@ export async function transactionStatusList( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = null; @@ -78,17 +110,19 @@ export async function transactionStatusList( "pageSize": payload.pageSize, }); - const headers = new Headers({ + const headers = new Headers(compactMap({ Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "list-sync-transactions", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -112,14 +146,16 @@ export async function transactionStatusList( const requestRes = client._createRequest(context, { security: requestSecurity, method: "GET", + baseURL: options?.serverURL, path: path, headers: headers, query: query, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -141,7 +177,7 @@ export async function transactionStatusList( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -152,24 +188,27 @@ export async function transactionStatusList( const [result] = await M.match< shared.Transactions, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.Transactions$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/transfersCreate.ts b/sync-for-expenses/src/funcs/transfersCreate.ts index 6d3ade7b6..4a047cfa0 100644 --- a/sync-for-expenses/src/funcs/transfersCreate.ts +++ b/sync-for-expenses/src/funcs/transfersCreate.ts @@ -5,10 +5,12 @@ import { CodatSyncExpensesCore } from "../core.js"; import { encodeJSON, encodeSimple } from "../lib/encodings.js"; import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { RequestOptions } from "../lib/sdks.js"; import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; import { pathToFunc } from "../lib/url.js"; +import { CodatSyncExpensesError } from "../sdk/models/errors/codatsyncexpenseserror.js"; import { ConnectionError, InvalidRequestError, @@ -17,10 +19,11 @@ import { UnexpectedClientError, } from "../sdk/models/errors/httpclienterrors.js"; import * as errors from "../sdk/models/errors/index.js"; -import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import * as operations from "../sdk/models/operations/index.js"; import * as shared from "../sdk/models/shared/index.js"; +import { APICall, APIPromise } from "../sdk/types/async.js"; import { Result } from "../sdk/types/fp.js"; /** @@ -34,29 +37,62 @@ import { Result } from "../sdk/types/fp.js"; * The `from.amount` and `to.amount` fields are in the native currency of the account. * * ### Supported Integrations - * | Integration | Supported | - * |-----------------------|-----------| - * | FreeAgent | Yes | - * | QuickBooks Desktop | Yes | - * | QuickBooks Online | Yes | - * | Xero | Yes | + * | Integration | Create transfer | Update transfer | + * |-----------------------|------------------|------------------| + * | Dynamics | No | No | + * | FreeAgent | Yes | Yes | + * | NetSuite | No | No | + * | QuickBooks Desktop | Yes | No | + * | QuickBooks Online | Yes | Yes | + * | Sage Intacct | No | No | + * | Xero | Yes | No | + * | Zoho Books | No | No | */ -export async function transfersCreate( +export function transfersCreate( client: CodatSyncExpensesCore, request: operations.CreateTransferTransactionRequest, options?: RequestOptions, -): Promise< +): APIPromise< Result< shared.TransferTransactionResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError > +> { + return new APIPromise($do( + client, + request, + options, + )); +} + +async function $do( + client: CodatSyncExpensesCore, + request: operations.CreateTransferTransactionRequest, + options?: RequestOptions, +): Promise< + [ + Result< + shared.TransferTransactionResponse, + | errors.ErrorMessage + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] > { const parsed = safeParse( request, @@ -65,7 +101,7 @@ export async function transfersCreate( "Input validation failed", ); if (!parsed.ok) { - return parsed; + return [parsed, { status: "invalid" }]; } const payload = parsed.value; const body = encodeJSON("body", payload.TransferTransactionRequest, { @@ -87,18 +123,20 @@ export async function transfersCreate( "/companies/{companyId}/sync/expenses/transfer-transactions/{transactionId}", )(pathParams); - const headers = new Headers({ + const headers = new Headers(compactMap({ "Content-Type": "application/json", Accept: "application/json", - }); + })); const secConfig = await extractSecurity(client._options.authHeader); const securityInput = secConfig == null ? {} : { authHeader: secConfig }; const requestSecurity = resolveGlobalSecurity(securityInput); const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", operationID: "create-transfer-transaction", - oAuth2Scopes: [], + oAuth2Scopes: null, resolvedSecurity: requestSecurity, @@ -122,13 +160,15 @@ export async function transfersCreate( const requestRes = client._createRequest(context, { security: requestSecurity, method: "PUT", + baseURL: options?.serverURL, path: path, headers: headers, body: body, + userAgent: client._options.userAgent, timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, }, options); if (!requestRes.ok) { - return requestRes; + return [requestRes, { status: "invalid" }]; } const req = requestRes.value; @@ -150,7 +190,7 @@ export async function transfersCreate( retryCodes: context.retryCodes, }); if (!doResult.ok) { - return doResult; + return [doResult, { status: "request-error", request: req }]; } const response = doResult.value; @@ -161,24 +201,27 @@ export async function transfersCreate( const [result] = await M.match< shared.TransferTransactionResponse, | errors.ErrorMessage - | SDKError - | SDKValidationError - | UnexpectedClientError - | InvalidRequestError + | CodatSyncExpensesError + | ResponseValidationError + | ConnectionError | RequestAbortedError | RequestTimeoutError - | ConnectionError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError >( M.json(200, shared.TransferTransactionResponse$inboundSchema), M.jsonErr( - [400, 401, 402, 403, 404, 429, 500, 503], + [400, 401, 402, 403, 404, 429], errors.ErrorMessage$inboundSchema, ), - M.fail(["4XX", "5XX"]), - )(response, { extraFields: responseFields }); + M.jsonErr([500, 503], errors.ErrorMessage$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); if (!result.ok) { - return result; + return [result, { status: "complete", request: req, response }]; } - return result; + return [result, { status: "complete", request: req, response }]; } diff --git a/sync-for-expenses/src/funcs/validateWebhook.ts b/sync-for-expenses/src/funcs/validateWebhook.ts new file mode 100644 index 000000000..77bac9aaf --- /dev/null +++ b/sync-for-expenses/src/funcs/validateWebhook.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncExpensesCore } from "../core.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as shared from "../sdk/models/shared/index.js"; +import { ERR, Result } from "../sdk/types/fp.js"; + +export async function validateWebhook(_client: CodatSyncExpensesCore, { + request: rawRequest, +}: { + request: { + body: BodyInit; + method: string; + url: string; + headers: Record | Headers; + } | Request; +}): Promise< + Result< + shared.ExpensesSyncWebhook | undefined | shared.ClientRateLimitWebhook, + SDKValidationError + > +> { + const request = normalizeRequest(rawRequest); + const knownSchemas = [ + shared.expensesSyncWebhookFromJSON, + shared.expensesSyncWebhookFromJSON, + shared.clientRateLimitWebhookFromJSON, + shared.clientRateLimitWebhookFromJSON, + ]; + + const jsonString = await request.text(); + + for (const schema of knownSchemas) { + const ret = schema(jsonString); + if (ret.ok) { + return ret; + } + } + + return ERR( + new SDKValidationError( + "No matching schema found for the given webhook payload", + jsonString, + jsonString, + ), + ); +} + +function normalizeRequest( + request: { + body: BodyInit; + method: string; + url: string; + headers: Record | Headers; + } | Request, +): Request { + if (request instanceof Request) { + return request; + } + return new Request(request.url, request); +} diff --git a/sync-for-expenses/src/hooks/hooks.ts b/sync-for-expenses/src/hooks/hooks.ts index d1b3396f5..d34c88497 100644 --- a/sync-for-expenses/src/hooks/hooks.ts +++ b/sync-for-expenses/src/hooks/hooks.ts @@ -12,6 +12,7 @@ import { BeforeCreateRequestHook, BeforeRequestContext, BeforeRequestHook, + Hook, Hooks, SDKInitHook, SDKInitOptions, @@ -27,6 +28,25 @@ export class SDKHooks implements Hooks { afterErrorHooks: AfterErrorHook[] = []; constructor() { + const presetHooks: Array = []; + + for (const hook of presetHooks) { + if ("sdkInit" in hook) { + this.registerSDKInitHook(hook); + } + if ("beforeCreateRequest" in hook) { + this.registerBeforeCreateRequestHook(hook); + } + if ("beforeRequest" in hook) { + this.registerBeforeRequestHook(hook); + } + if ("afterSuccess" in hook) { + this.registerAfterSuccessHook(hook); + } + if ("afterError" in hook) { + this.registerAfterErrorHook(hook); + } + } initHooks(this); } diff --git a/sync-for-expenses/src/hooks/types.ts b/sync-for-expenses/src/hooks/types.ts index df5237dce..494395f66 100644 --- a/sync-for-expenses/src/hooks/types.ts +++ b/sync-for-expenses/src/hooks/types.ts @@ -2,16 +2,21 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import { SDKOptions } from "../lib/config.js"; import { HTTPClient, RequestInput } from "../lib/http.js"; import { RetryConfig } from "../lib/retries.js"; import { SecurityState } from "../lib/security.js"; +import { WebhookRecipient } from "../sdk/types/webhooks.js"; export type HookContext = { + baseURL: string | URL; operationID: string; - oAuth2Scopes?: string[]; + oAuth2Scopes: string[] | null; + webhookRecipient?: WebhookRecipient; securitySource?: any | (() => Promise); retryConfig: RetryConfig; resolvedSecurity: SecurityState | null; + options: SDKOptions; }; export type Awaitable = T | Promise; @@ -100,3 +105,10 @@ export interface Hooks { /** Registers a hook to be used by the SDK for the after error event. */ registerAfterErrorHook(hook: AfterErrorHook): void; } + +export type Hook = + | SDKInitHook + | BeforeCreateRequestHook + | BeforeRequestHook + | AfterSuccessHook + | AfterErrorHook; diff --git a/sync-for-expenses/src/index.ts b/sync-for-expenses/src/index.ts index 5ddc765ed..dbcba164a 100644 --- a/sync-for-expenses/src/index.ts +++ b/sync-for-expenses/src/index.ts @@ -4,4 +4,6 @@ export * from "./lib/config.js"; export * as files from "./lib/files.js"; +export { HTTPClient } from "./lib/http.js"; +export type { Fetcher, HTTPClientOptions } from "./lib/http.js"; export * from "./sdk/sdk.js"; diff --git a/sync-for-expenses/src/lib/base64.ts b/sync-for-expenses/src/lib/base64.ts index c2d5b3898..0aebd8b0a 100644 --- a/sync-for-expenses/src/lib/base64.ts +++ b/sync-for-expenses/src/lib/base64.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; export function bytesToBase64(u8arr: Uint8Array): string { return btoa(String.fromCodePoint(...u8arr)); diff --git a/sync-for-expenses/src/lib/config.ts b/sync-for-expenses/src/lib/config.ts index 345f897e2..7bb6d0de6 100644 --- a/sync-for-expenses/src/lib/config.ts +++ b/sync-for-expenses/src/lib/config.ts @@ -15,17 +15,21 @@ export const ServerList = [ ] as const; export type SDKOptions = { - authHeader?: string | (() => Promise); + authHeader?: string | (() => Promise) | undefined; httpClient?: HTTPClient; /** * Allows overriding the default server used by the SDK */ - serverIdx?: number; + serverIdx?: number | undefined; /** * Allows overriding the default server URL used by the SDK */ - serverURL?: string; + serverURL?: string | undefined; + /** + * Allows overriding the default user agent used by the SDK + */ + userAgent?: string | undefined; /** * Allows overriding the default retry config used by the SDK */ @@ -54,8 +58,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "prealpha", - sdkVersion: "7.0.0", - genVersion: "2.463.0", + sdkVersion: "7.1.0", + genVersion: "2.849.2", userAgent: - "speakeasy-sdk/typescript 7.0.0 2.463.0 prealpha @codat/sync-for-expenses", + "speakeasy-sdk/typescript 7.1.0 2.849.2 prealpha @codat/sync-for-expenses", } as const; diff --git a/sync-for-expenses/src/lib/encodings.ts b/sync-for-expenses/src/lib/encodings.ts index 44fa72840..31cd37339 100644 --- a/sync-for-expenses/src/lib/encodings.ts +++ b/sync-for-expenses/src/lib/encodings.ts @@ -16,12 +16,16 @@ export function encodeMatrix( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string { +): string | undefined { let out = ""; const pairs: [string, unknown][] = options?.explode ? explode(key, value) : [[key, value]]; + if (pairs.every(([_, v]) => v == null)) { + return; + } + const encodeString = (v: string) => { return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; }; @@ -29,21 +33,25 @@ export function encodeMatrix( pairs.forEach(([pk, pv]) => { let tmp = ""; - let encValue = ""; + let encValue: string | null | undefined = null; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join(","); + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(","); } else if (isPlainObject(pv)) { - encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { return `,${encodeString(k)},${encodeValue(v)}`; - }).join(""); - encValue = encValue.slice(1); + }); + encValue = mapped?.join("").slice(1); } else { encValue = `${encodeValue(pv)}`; } + if (encValue == null) { + return; + } + const keyPrefix = encodeString(pk); tmp = `${keyPrefix}=${encValue}`; // trim trailing '=' if value was empty @@ -66,36 +74,41 @@ export function encodeLabel( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string { +): string | undefined { let out = ""; const pairs: [string, unknown][] = options?.explode ? explode(key, value) : [[key, value]]; + if (pairs.every(([_, v]) => v == null)) { + return; + } + const encodeString = (v: string) => { return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; }; const encodeValue = (v: unknown) => encodeString(serializeValue(v)); pairs.forEach(([pk, pv]) => { - let encValue = ""; + let encValue: string | null | undefined = ""; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join("."); + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join("."); } else if (isPlainObject(pv)) { - encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { return `.${encodeString(k)}.${encodeValue(v)}`; - }).join(""); - encValue = encValue.slice(1); + }); + encValue = mapped?.join("").slice(1); } else { - const k = - options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : ""; + const k = options?.explode && isPlainObject(value) + ? `${encodeString(pk)}=` + : ""; encValue = `${k}${encodeValue(pv)}`; } - out += `.${encValue}`; + out += encValue == null ? "" : `.${encValue}`; }); return out; @@ -105,7 +118,7 @@ type FormEncoder = ( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -) => string; +) => string | undefined; function formEncoder(sep: string): FormEncoder { return ( @@ -118,6 +131,10 @@ function formEncoder(sep: string): FormEncoder { ? explode(key, value) : [[key, value]]; + if (pairs.every(([_, v]) => v == null)) { + return; + } + const encodeString = (v: string) => { return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; }; @@ -128,20 +145,24 @@ function formEncoder(sep: string): FormEncoder { pairs.forEach(([pk, pv]) => { let tmp = ""; - let encValue = ""; + let encValue: string | null | undefined = null; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { - encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join(encodedSep); + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(encodedSep); } else if (isPlainObject(pv)) { encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { return `${encodeString(k)}${encodedSep}${encodeValue(v)}`; - }).join(encodedSep); + })?.join(encodedSep); } else { encValue = `${encodeValue(pv)}`; } + if (encValue == null) { + return; + } + tmp = `${encodeString(pk)}=${encValue}`; // If we end up with the nothing then skip forward @@ -180,7 +201,7 @@ export function encodeBodyForm( let tmp = ""; let encValue = ""; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { encValue = JSON.stringify(pv, jsonReplacer); @@ -207,14 +228,14 @@ export function encodeDeepObject( key: string, value: unknown, options?: { charEncoding?: "percent" | "none" }, -): string { +): string | undefined { if (value == null) { - return ""; + return; } if (!isPlainObject(value)) { throw new EncodingError( - `Value of parameter '${key}' which uses deepObject encoding must be an object`, + `Value of parameter '${key}' which uses deepObject encoding must be an object or null`, ); } @@ -225,9 +246,9 @@ export function encodeDeepObjectObject( key: string, value: unknown, options?: { charEncoding?: "percent" | "none" }, -): string { +): string | undefined { if (value == null) { - return ""; + return; } let out = ""; @@ -241,7 +262,7 @@ export function encodeDeepObjectObject( } Object.entries(value).forEach(([ck, cv]) => { - if (cv === undefined) { + if (cv == null) { return; } @@ -250,19 +271,17 @@ export function encodeDeepObjectObject( if (isPlainObject(cv)) { const objOut = encodeDeepObjectObject(pk, cv, options); - out += `&${objOut}`; + out += objOut == null ? "" : `&${objOut}`; return; } const pairs: unknown[] = Array.isArray(cv) ? cv : [cv]; - let encoded = ""; - - encoded = mapDefined(pairs, (v) => { + const encoded = mapDefined(pairs, (v) => { return `${encodeString(pk)}=${encodeString(serializeValue(v))}`; - }).join("&"); + })?.join("&"); - out += `&${encoded}`; + out += encoded == null ? "" : `&${encoded}`; }); return out.slice(1); @@ -272,9 +291,9 @@ export function encodeJSON( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string { +): string | undefined { if (typeof value === "undefined") { - return ""; + return; } const encodeString = (v: string) => { @@ -290,40 +309,39 @@ export const encodeSimple = ( key: string, value: unknown, options?: { explode?: boolean; charEncoding?: "percent" | "none" }, -): string => { +): string | undefined => { let out = ""; const pairs: [string, unknown][] = options?.explode ? explode(key, value) : [[key, value]]; + if (pairs.every(([_, v]) => v == null)) { + return; + } + const encodeString = (v: string) => { return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; }; const encodeValue = (v: unknown) => encodeString(serializeValue(v)); pairs.forEach(([pk, pv]) => { - let tmp = ""; + let tmp: string | null | undefined = ""; - if (pv === undefined) { + if (pv == null) { return; } else if (Array.isArray(pv)) { - tmp = mapDefined(pv, (v) => `${encodeValue(v)}`).join(","); + tmp = mapDefined(pv, (v) => `${encodeValue(v)}`)?.join(","); } else if (isPlainObject(pv)) { - tmp = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + const mapped = mapDefinedEntries(Object.entries(pv), ([k, v]) => { return `,${encodeString(k)},${encodeValue(v)}`; - }).join(""); - tmp = tmp.slice(1); + }); + tmp = mapped?.join("").slice(1); } else { const k = options?.explode && isPlainObject(value) ? `${pk}=` : ""; tmp = `${k}${encodeValue(pv)}`; } - // If we end up with the nothing then skip forward - if (!tmp) { - return; - } - - out += `,${tmp}`; + out += tmp ? `,${tmp}` : ""; }); return out.slice(1); @@ -341,9 +359,7 @@ function explode(key: string, value: unknown): [string, unknown][] { } function serializeValue(value: unknown): string { - if (value === null) { - return "null"; - } else if (typeof value === "undefined") { + if (value == null) { return ""; } else if (value instanceof Date) { return value.toISOString(); @@ -364,14 +380,14 @@ function jsonReplacer(_: string, value: unknown): unknown { } } -function mapDefined(inp: T[], mapper: (v: T) => R): R[] { - return inp.reduce((acc, v) => { - if (v === undefined) { +function mapDefined(inp: T[], mapper: (v: T) => R): R[] | null { + const res = inp.reduce((acc, v) => { + if (v == null) { return acc; } const m = mapper(v); - if (m === undefined) { + if (m == null) { return acc; } @@ -379,43 +395,46 @@ function mapDefined(inp: T[], mapper: (v: T) => R): R[] { return acc; }, []); + + return res.length ? res : null; } function mapDefinedEntries( inp: Iterable<[K, V]>, mapper: (v: [K, V]) => R, -): R[] { +): R[] | null { const acc: R[] = []; for (const [k, v] of inp) { - if (v === undefined) { + if (v == null) { continue; } const m = mapper([k, v]); - if (m === undefined) { + if (m == null) { continue; } acc.push(m); } - return acc; + return acc.length ? acc : null; } -export function queryJoin(...args: string[]): string { +export function queryJoin(...args: (string | undefined)[]): string { return args.filter(Boolean).join("&"); } type QueryEncoderOptions = { explode?: boolean; charEncoding?: "percent" | "none"; + allowEmptyValue?: string[]; }; type QueryEncoder = ( key: string, value: unknown, options?: QueryEncoderOptions, -) => string; +) => string | undefined; type BulkQueryEncoder = ( values: Record, @@ -423,7 +442,7 @@ type BulkQueryEncoder = ( ) => string; export function queryEncoder(f: QueryEncoder): BulkQueryEncoder { - const bulkEncode = function ( + const bulkEncode = function( values: Record, options?: QueryEncoderOptions, ): string { @@ -433,7 +452,19 @@ export function queryEncoder(f: QueryEncoder): BulkQueryEncoder { charEncoding: options?.charEncoding ?? "percent", }; + const allowEmptySet = new Set(options?.allowEmptyValue ?? []); + const encoded = Object.entries(values).map(([key, value]) => { + if (allowEmptySet.has(key)) { + if ( + value === undefined + || value === null + || value === "" + || (Array.isArray(value) && value.length === 0) + ) { + return `${encodeURIComponent(key)}=`; + } + } return f(key, value, opts); }); return queryJoin(...encoded); @@ -447,3 +478,20 @@ export const encodeFormQuery = queryEncoder(encodeForm); export const encodeSpaceDelimitedQuery = queryEncoder(encodeSpaceDelimited); export const encodePipeDelimitedQuery = queryEncoder(encodePipeDelimited); export const encodeDeepObjectQuery = queryEncoder(encodeDeepObject); + +export function appendForm( + fd: FormData, + key: string, + value: unknown, + fileName?: string, +): void { + if (value == null) { + return; + } else if (value instanceof Blob && fileName) { + fd.append(key, value, fileName); + } else if (value instanceof Blob) { + fd.append(key, value); + } else { + fd.append(key, String(value)); + } +} diff --git a/sync-for-expenses/src/lib/files.ts b/sync-for-expenses/src/lib/files.ts index 19e08041f..0344cd046 100644 --- a/sync-for-expenses/src/lib/files.ts +++ b/sync-for-expenses/src/lib/files.ts @@ -36,5 +36,47 @@ export async function readableStreamToArrayBuffer( offset += chunk.length; } - return concatenatedChunks.buffer; + return concatenatedChunks.buffer as ArrayBuffer; +} + +/** + * Determines the MIME content type based on a file's extension. + * Returns null if the extension is not recognized. + */ +export function getContentTypeFromFileName(fileName: string): string | null { + if (!fileName) return null; + + const ext = fileName.toLowerCase().split(".").pop(); + if (!ext) return null; + + const mimeTypes: Record = { + json: "application/json", + xml: "application/xml", + html: "text/html", + htm: "text/html", + txt: "text/plain", + csv: "text/csv", + pdf: "application/pdf", + png: "image/png", + jpg: "image/jpeg", + jpeg: "image/jpeg", + gif: "image/gif", + svg: "image/svg+xml", + js: "application/javascript", + css: "text/css", + zip: "application/zip", + tar: "application/x-tar", + gz: "application/gzip", + mp4: "video/mp4", + mp3: "audio/mpeg", + wav: "audio/wav", + webp: "image/webp", + ico: "image/x-icon", + woff: "font/woff", + woff2: "font/woff2", + ttf: "font/ttf", + otf: "font/otf", + }; + + return mimeTypes[ext] || null; } diff --git a/sync-for-expenses/src/lib/matchers.ts b/sync-for-expenses/src/lib/matchers.ts index 948c33240..b096d6f20 100644 --- a/sync-for-expenses/src/lib/matchers.ts +++ b/sync-for-expenses/src/lib/matchers.ts @@ -2,14 +2,14 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js"; import { SDKError } from "../sdk/models/errors/sdkerror.js"; -import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; -import { Result } from "../sdk/types/fp.js"; +import { ERR, OK, Result } from "../sdk/types/fp.js"; import { matchResponse, matchStatusCode, StatusCodePredicate } from "./http.js"; import { isPlainObject } from "./is-plain-object.js"; -import { safeParse } from "./schemas.js"; export type Encoding = + | "jsonl" | "json" | "text" | "bytes" @@ -19,6 +19,7 @@ export type Encoding = | "fail"; const DEFAULT_CONTENT_TYPES: Record = { + jsonl: "application/jsonl", json: "application/json", text: "text/plain", bytes: "application/octet-stream", @@ -72,6 +73,21 @@ export function json( return { ...options, enc: "json", codes, schema }; } +export function jsonl( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "jsonl", codes, schema }; +} + +export function jsonlErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "jsonl", codes, schema }; +} export function textErr( codes: StatusCodePredicate, schema: Schema, @@ -159,17 +175,19 @@ export type MatchedError = Matchers extends Matcher[] : never; export type MatchFunc = ( response: Response, + request: Request, options?: { resultKey?: string; extraFields?: Record }, ) => Promise<[result: Result, raw: unknown]>; export function match( ...matchers: Array> -): MatchFunc { +): MatchFunc { return async function matchFunc( response: Response, + request: Request, options?: { resultKey?: string; extraFields?: Record }, ): Promise< - [result: Result, raw: unknown] + [result: Result, raw: unknown] > { let raw: unknown; let matcher: Matcher | undefined; @@ -188,21 +206,25 @@ export function match( } if (!matcher) { - const responseBody = await response.text(); return [{ ok: false, - error: new SDKError( - "Unexpected API response status or content-type", + error: new SDKError("Unexpected Status or Content-Type", { response, - responseBody, - ), - }, responseBody]; + request, + body: await response.text().catch(() => ""), + }), + }, raw]; } const encoding = matcher.enc; + let body = ""; switch (encoding) { case "json": - raw = await response.json(); + body = await response.text(); + raw = JSON.parse(body); + break; + case "jsonl": + raw = response.body; break; case "bytes": raw = new Uint8Array(await response.arrayBuffer()); @@ -211,30 +233,30 @@ export function match( raw = response.body; break; case "text": - raw = await response.text(); + body = await response.text(); + raw = body; break; case "sse": raw = response.body; break; case "nil": - raw = await discardResponseBody(response); + body = await response.text(); + raw = undefined; break; case "fail": - raw = await response.text(); + body = await response.text(); + raw = body; break; default: - encoding satisfies never; - throw new Error(`Unsupported response type: ${encoding}`); + throw new Error( + `Unsupported response type: ${encoding satisfies never}`, + ); } if (matcher.enc === "fail") { return [{ ok: false, - error: new SDKError( - "API error occurred", - response, - typeof raw === "string" ? raw : "", - ), + error: new SDKError("API error occurred", { request, response, body }), }, raw]; } @@ -246,6 +268,9 @@ export function match( ...options?.extraFields, ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), ...(isPlainObject(raw) ? raw : null), + request$: request, + response$: response, + body$: body, }; } else if (resultKey) { data = { @@ -264,18 +289,20 @@ export function match( } if ("err" in matcher) { - const result = safeParse( + const result = safeParseResponse( data, (v: unknown) => matcher.schema.parse(v), "Response validation failed", + { request, response, body }, ); return [result.ok ? { ok: false, error: result.value } : result, raw]; } else { return [ - safeParse( + safeParseResponse( data, (v: unknown) => matcher.schema.parse(v), "Response validation failed", + { request, response, body }, ), raw, ]; @@ -298,25 +325,22 @@ export function unpackHeaders(headers: Headers): Record { return out; } -/** - * Discards the response body to free up resources. - * - * To learn why this is need, see the undici docs: - * https://undici.nodejs.org/#/?id=garbage-collection - */ -export async function discardResponseBody(res: Response) { - const reader = res.body?.getReader(); - if (reader == null) { - return; - } - +function safeParseResponse( + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, + httpMeta: { response: Response; request: Request; body: string }, +): Result { try { - let done = false; - while (!done) { - const res = await reader.read(); - done = res.done; - } - } finally { - reader.releaseLock(); + return OK(fn(rawValue)); + } catch (err) { + return ERR( + new ResponseValidationError(errorMessage, { + cause: err, + rawValue, + rawMessage: errorMessage, + ...httpMeta, + }), + ); } } diff --git a/sync-for-expenses/src/lib/primitives.ts b/sync-for-expenses/src/lib/primitives.ts index 1dc4ee435..d21f1dc49 100644 --- a/sync-for-expenses/src/lib/primitives.ts +++ b/sync-for-expenses/src/lib/primitives.ts @@ -120,3 +120,31 @@ export function abortSignalAny(signals: AbortSignal[]): AbortSignal { return result; } + +export function compactMap( + values: Record, +): Record { + const out: Record = {}; + + for (const [k, v] of Object.entries(values)) { + if (typeof v !== "undefined") { + out[k] = v; + } + } + + return out; +} + +export function allRequired>( + v: V, +): + | { + [K in keyof V]: NonNullable; + } + | undefined { + if (Object.values(v).every((x) => x == null)) { + return void 0; + } + + return v as ReturnType>; +} diff --git a/sync-for-expenses/src/lib/retries.ts b/sync-for-expenses/src/lib/retries.ts index 93ebc8def..e3ce9aba7 100644 --- a/sync-for-expenses/src/lib/retries.ts +++ b/sync-for-expenses/src/lib/retries.ts @@ -158,7 +158,6 @@ async function retryBackoff( const start = Date.now(); let x = 0; - // eslint-disable-next-line no-constant-condition while (true) { try { const res = await fn(); diff --git a/sync-for-expenses/src/lib/schemas.ts b/sync-for-expenses/src/lib/schemas.ts index a2ad30da3..dc2510e33 100644 --- a/sync-for-expenses/src/lib/schemas.ts +++ b/sync-for-expenses/src/lib/schemas.ts @@ -9,7 +9,7 @@ import { ZodObject, ZodRawShape, ZodTypeAny, -} from "zod"; +} from "zod/v3"; import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; import { ERR, OK, Result } from "../sdk/types/fp.js"; @@ -57,6 +57,7 @@ export function collectExtraKeys< >( obj: ZodObject, extrasKey: K, + optional: boolean, ): ZodEffects< typeof obj, & output> @@ -81,6 +82,10 @@ export function collectExtraKeys< delete val[key]; } + if (optional && Object.keys(extras).length === 0) { + return val; + } + return { ...val, [extrasKey]: extras }; }); } diff --git a/sync-for-expenses/src/lib/sdks.ts b/sync-for-expenses/src/lib/sdks.ts index 14e2d9371..126029ae9 100644 --- a/sync-for-expenses/src/lib/sdks.ts +++ b/sync-for-expenses/src/lib/sdks.ts @@ -42,22 +42,29 @@ export type RequestOptions = { */ retryCodes?: string[]; /** + * Overrides the base server URL that will be used by an operation. + */ + serverURL?: string | URL; + /** + * @deprecated `fetchOptions` has been flattened into `RequestOptions`. + * * Sets various request options on the `fetch` call made by an SDK method. * * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request} */ fetchOptions?: Omit; -}; +} & Omit; type RequestConfig = { method: string; path: string; - baseURL?: string | URL; + baseURL?: string | URL | undefined; query?: string; body?: RequestInit["body"]; headers?: HeadersInit; security?: SecurityState | null; uaHeader?: string; + userAgent?: string | undefined; timeoutMs?: number; }; @@ -74,7 +81,7 @@ export class ClientSDK { readonly #httpClient: HTTPClient; readonly #hooks: SDKHooks; readonly #logger?: Logger | undefined; - protected readonly _baseURL: URL | null; + public readonly _baseURL: URL | null; public readonly _options: SDKOptions & { hooks?: SDKHooks }; constructor(options: SDKOptions = {}) { @@ -89,19 +96,21 @@ export class ClientSDK { } else { this.#hooks = new SDKHooks(); } - this._options = { ...options, hooks: this.#hooks }; - const url = serverURLFromOptions(options); if (url) { url.pathname = url.pathname.replace(/\/+$/, "") + "/"; } + const { baseURL, client } = this.#hooks.sdkInit({ baseURL: url, client: options.httpClient || new HTTPClient(), }); this._baseURL = baseURL; this.#httpClient = client; - this.#logger = options.debugLogger; + + this._options = { ...options, hooks: this.#hooks }; + + this.#logger = this._options.debugLogger; } public _createRequest( @@ -119,6 +128,7 @@ export class ClientSDK { const inputURL = new URL(path, reqURL); if (path) { + reqURL.pathname += reqURL.pathname.endsWith("/") ? "" : "/"; reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); } @@ -126,7 +136,10 @@ export class ClientSDK { const secQuery: string[] = []; for (const [k, v] of Object.entries(security?.queryParams || {})) { - secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); + const q = encodeForm(k, v, { charEncoding: "percent" }); + if (typeof q !== "undefined") { + secQuery.push(q); + } } if (secQuery.length) { finalQuery += `&${secQuery.join("&")}`; @@ -160,7 +173,9 @@ export class ClientSDK { cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; headers.set("cookie", cookie); - const userHeaders = new Headers(options?.fetchOptions?.headers); + const userHeaders = new Headers( + options?.headers ?? options?.fetchOptions?.headers, + ); for (const [k, v] of userHeaders) { headers.set(k, v); } @@ -168,29 +183,23 @@ export class ClientSDK { // Only set user agent header in non-browser-like environments since CORS // policy disallows setting it in browsers e.g. Chrome throws an error. if (!isBrowserLike) { - headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent); + headers.set( + conf.uaHeader ?? "user-agent", + conf.userAgent ?? SDK_METADATA.userAgent, + ); } - let fetchOptions = options?.fetchOptions; + const fetchOptions: Omit = { + ...options?.fetchOptions, + ...options, + }; if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); - if (!fetchOptions) { - fetchOptions = { signal: timeoutSignal }; - } else { - fetchOptions.signal = timeoutSignal; - } + fetchOptions.signal = timeoutSignal; } if (conf.body instanceof ReadableStream) { - if (!fetchOptions) { - fetchOptions = { - // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 - duplex: "half", - }; - } else { - // @ts-expect-error see https://github.com/node-fetch/node-fetch/issues/1769 - fetchOptions.duplex = "half"; - } + Object.assign(fetchOptions, { duplex: "half" }); } let input; @@ -295,7 +304,9 @@ export class ClientSDK { } } -const jsonLikeContentTypeRE = /^application\/(?:.{0,100}\+)?json/; +const jsonLikeContentTypeRE = /^(application|text)\/([^+]+\+)*json.*/; +const jsonlLikeContentTypeRE = + /^(application|text)\/([^+]+\+)*(jsonl|x-ndjson)\b.*/; async function logRequest(logger: Logger | undefined, req: Request) { if (!logger) { return; @@ -361,9 +372,13 @@ async function logResponse( logger.group("Body:"); switch (true) { case matchContentType(res, "application/json") - || jsonLikeContentTypeRE.test(ct): + || jsonLikeContentTypeRE.test(ct) && !jsonlLikeContentTypeRE.test(ct): logger.log(await res.clone().json()); break; + case matchContentType(res, "application/jsonl") + || jsonlLikeContentTypeRE.test(ct): + logger.log(await res.clone().text()); + break; case matchContentType(res, "text/event-stream"): logger.log(`<${contentType}>`); break; diff --git a/sync-for-expenses/src/lib/security.ts b/sync-for-expenses/src/lib/security.ts index 5d9f81476..5d93cd4a1 100644 --- a/sync-for-expenses/src/lib/security.ts +++ b/sync-for-expenses/src/lib/security.ts @@ -6,8 +6,8 @@ import * as shared from "../sdk/models/shared/index.js"; type OAuth2PasswordFlow = { username: string; - password?: string | undefined; - clientID: string; + password: string; + clientID?: string | undefined; clientSecret?: string | undefined; tokenURL: string; }; @@ -83,9 +83,14 @@ type SecurityInputOAuth2 = { type SecurityInputOAuth2ClientCredentials = { type: "oauth2:client_credentials"; value: - | { clientID?: string | undefined; clientSecret?: string | undefined } + | { + clientID?: string | undefined; + clientSecret?: string | undefined; + } | null + | string | undefined; + fieldName?: string; }; type SecurityInputOAuth2PasswordCredentials = { @@ -94,13 +99,13 @@ type SecurityInputOAuth2PasswordCredentials = { | string | null | undefined; - fieldName: string; + fieldName?: string; }; type SecurityInputCustom = { type: "http:custom"; value: any | null | undefined; - fieldName: string; + fieldName?: string; }; export type SecurityInput = @@ -117,7 +122,7 @@ export function resolveSecurity( ...options: SecurityInput[][] ): SecurityState | null { const state: SecurityState = { - basic: { username: "", password: "" }, + basic: {}, headers: {}, queryParams: {}, cookies: {}, @@ -137,6 +142,9 @@ export function resolveSecurity( typeof o.value === "string" && !!o.value ); } else if (o.type === "oauth2:client_credentials") { + if (typeof o.value == "string") { + return !!o.value; + } return o.value.clientID != null || o.value.clientSecret != null; } else if (typeof o.value === "string") { return !!o.value; @@ -189,8 +197,7 @@ export function resolveSecurity( applyBearer(state, spec); break; default: - spec satisfies never; - throw SecurityError.unrecognizedType(type); + throw SecurityError.unrecognizedType((spec satisfies never, type)); } }); @@ -225,7 +232,9 @@ function applyBearer( value = `Bearer ${value}`; } - state.headers[spec.fieldName] = value; + if (spec.fieldName !== undefined) { + state.headers[spec.fieldName] = value; + } } export function resolveGlobalSecurity( diff --git a/sync-for-expenses/src/lib/url.ts b/sync-for-expenses/src/lib/url.ts index 6bc6356e2..f3a8de6c0 100644 --- a/sync-for-expenses/src/lib/url.ts +++ b/sync-for-expenses/src/lib/url.ts @@ -10,7 +10,7 @@ export function pathToFunc( pathPattern: string, options?: { charEncoding?: "percent" | "none" }, ): (params?: Params) => string { - const paramRE = /\{([a-zA-Z0-9_]+?)\}/g; + const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g; return function buildURLPath(params: Record = {}): string { return pathPattern.replace(paramRE, function (_, placeholder) { diff --git a/sync-for-expenses/src/sdk/accounts.ts b/sync-for-expenses/src/sdk/accounts.ts index d68c03ff1..32022dc48 100644 --- a/sync-for-expenses/src/sdk/accounts.ts +++ b/sync-for-expenses/src/sdk/accounts.ts @@ -18,7 +18,7 @@ export class Accounts extends ClientSDK { * * [Accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) are the categories a business uses to record accounting transactions. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * Required data may vary by integration. To see what data to post, first call [Get create account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-chartOfAccounts-model). */ @@ -41,7 +41,7 @@ export class Accounts extends ClientSDK { * * [Accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/Account) are the categories a business uses to record accounting transactions. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * See the *response examples* for integration-specific indicative models. */ diff --git a/sync-for-expenses/src/sdk/attachments.ts b/sync-for-expenses/src/sdk/attachments.ts index fa1889503..8b35460c9 100644 --- a/sync-for-expenses/src/sdk/attachments.ts +++ b/sync-for-expenses/src/sdk/attachments.ts @@ -17,18 +17,19 @@ export class Attachments extends ClientSDK { * * [Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/ExpenseTransaction) represent transactions made with a company debit or credit card. Attachments for `Adjustment` and `Transfer` transaction types are not supported for any integrations. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * Each accounting software supports different file formats and sizes. * - * | Integration | File size | File extension |Supported transaction type - * |-------------------|-----------|------------------------------------------------------------------------------------------------------------------------------------------------|--------------| - * | **Xero** | 3 MB | 7Z, BMP, CSV, DOC, DOCX, EML, GIF, JPEG, JPG, KEYNOTE, MSG, NUMBERS, ODF, ODS, ODT, PAGES, PDF, PNG, PPT, PPTX, RAR, RTF, TIF, TIFF, TXT, XLS, XLSX, ZIP | All supported types | - * | **QuickBooks Online** | 100 MB | AI, CSV, DOC, DOCX, EPS, GIF, JPEG, JPG, ODS, PAGES, PDF, PNG, RTF, TIF, TXT, XLS, XLSX, XML | `ReimbursableExpenses`, `ExpensePayment`, `ExpenseRefund` | - * | **NetSuite** | 100 MB | BMP, CSV, XLS, XLSX, JSON, PDF, PJPG, PJPEG, PNG, TXT, SVG, TIF, TIFF, DOC, DOCX, ZIP |`ExpensePayment`, `ExpenseRefund` | - * | **Dynamics 365 Business Central** | 350 MB | [No explicit requirements outlined](https://learn.microsoft.com/en-gb/dynamics365/business-central/ui-how-add-link-to-record#to-attach-a-file-to-a-purchase-invoice) for text, image, and video files. | All supported types - * | **QuickBooks Desktop** | NA | Does not support attachment upload | N/A | - * | **FreeAgent** | 5MB | PNG, X-PNG, JPEG, PJG, GIF, X-PDF + * | Integration | File size | File extension | Supported transactions | + * |-----------------------------------|-----------|-------------------------------------------------------|------------------------| + * | **Xero** | 3 MB | 7Z, BMP, CSV, DOC, DOCX, EML, GIF, JPEG, JPG, KEYNOTE, MSG, NUMBERS, ODF, ODS, ODT, PAGES, PDF, PNG, PPT, PPTX, RAR, RTF, TIF, TIFF, TXT, XLS, XLSX, ZIP | All supported types | + * | **QuickBooks Online** | 100 MB | AI, CSV, DOC, DOCX, EPS, GIF, JPEG, JPG, ODS, PAGES, PDF, PNG, RTF, TIF, TXT, XLS, XLSX, XML | `expense-transactions.Payment`, `expense-transactions.Refund`, `reimbursable-expense-transactions` | + * | **NetSuite** | 100 MB | BMP, CSV, XLS, XLSX, JSON, PDF, PJPG, PJPEG, PNG, TXT, SVG, TIF, TIFF, DOC, DOCX, ZIP |`expense-transactions.Payment`, `expense-transactions.Refund` | + * | **Dynamics 365 Business Central** | 350 MB | [No explicit requirements outlined](https://learn.microsoft.com/en-gb/dynamics365/business-central/ui-how-add-link-to-record#to-attach-a-file-to-a-purchase-invoice) for text, image, and video files. | All supported types + * | **QuickBooks Desktop** | NA | Does not support attachment upload | N/A | + * | **FreeAgent** | 5MB | PNG, X-PNG, JPEG, PJG, GIF, X-PDF | `expense-transactions.Payment`, `reimbursable-expense-transactions` + * | **Zoho Books** | 5MB | GIF, PNG, JPEG, JPG, BMP, PDF | `expense-transactions.Payment`, `reimbursable-expense-transactions` | */ async upload( request: operations.UploadExpenseAttachmentRequest, diff --git a/sync-for-expenses/src/sdk/bankaccounts.ts b/sync-for-expenses/src/sdk/bankaccounts.ts index 8cdc3bdf6..0babfd4c2 100644 --- a/sync-for-expenses/src/sdk/bankaccounts.ts +++ b/sync-for-expenses/src/sdk/bankaccounts.ts @@ -18,7 +18,7 @@ export class BankAccounts extends ClientSDK { * * [Bank accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-bankAccounts-model). */ @@ -41,7 +41,7 @@ export class BankAccounts extends ClientSDK { * * [Bank accounts](https://docs.codat.io/sync-for-expenses-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * See the *response examples* for integration-specific indicative models. */ diff --git a/sync-for-expenses/src/sdk/companies.ts b/sync-for-expenses/src/sdk/companies.ts index 00607c6f2..12e5f3369 100644 --- a/sync-for-expenses/src/sdk/companies.ts +++ b/sync-for-expenses/src/sdk/companies.ts @@ -6,6 +6,7 @@ import { companiesCreate } from "../funcs/companiesCreate.js"; import { companiesDelete } from "../funcs/companiesDelete.js"; import { companiesGet } from "../funcs/companiesGet.js"; import { companiesList } from "../funcs/companiesList.js"; +import { companiesReplace } from "../funcs/companiesReplace.js"; import { companiesUpdate } from "../funcs/companiesUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "./models/operations/index.js"; @@ -21,6 +22,19 @@ export class Companies extends ClientSDK { * * A [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data. * Each company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. + * + * ## Filter by tags + * + * The *List companies* endpoint supports the filtering of companies using [tags](https://docs.codat.io/using-the-api/managing-companies#add-metadata-to-a-company). It supports the following operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying): + * + * - equals (`=`) + * - not equals (`!=`) + * - contains (`~`) + * + * For example, you can use the querying to filter companies tagged with a specific foreign key, region, or owning team: + * - Foreign key: `uid = {yourCustomerId}` + * - Region: `region != uk` + * - Owning team and region: `region = uk && owningTeam = invoice-finance` */ async list( request?: operations.ListCompaniesRequest | undefined, @@ -56,14 +70,35 @@ export class Companies extends ClientSDK { } /** - * Update company + * Replace company * * @remarks - * Use the *Update company* endpoint to update both the name and description of the company. + * Use the *Replace company* endpoint to replace the existing name, description, and tags of the company. Calling the endpoint will replace existing values even if new values haven't been defined in the payload. * * A [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data. * Each company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources, such as one connection to Xero for accounting data, two connections to Plaid for two bank accounts, and a connection to Zettle for POS data. */ + async replace( + request: operations.ReplaceCompanyRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(companiesReplace( + this, + request, + options, + )); + } + + /** + * Update company + * + * @remarks + * Use the *Update company* endpoint to update the name, description, or tags of the company. + * + * The *Update company* endpoint doesn't have any required fields. If any of the fields provided are `null` or not provided, they won't be included in the update. + * + * A [company](https://docs.codat.io/sync-for-expenses-api#/schemas/Company) represents a business sharing access to their data. + */ async update( request: operations.UpdateCompanyRequest, options?: RequestOptions, diff --git a/sync-for-expenses/src/sdk/customers.ts b/sync-for-expenses/src/sdk/customers.ts index ec9b838c8..ca4606be6 100644 --- a/sync-for-expenses/src/sdk/customers.ts +++ b/sync-for-expenses/src/sdk/customers.ts @@ -62,7 +62,7 @@ export class Customers extends ClientSDK { * * [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-customers-model). */ @@ -85,7 +85,7 @@ export class Customers extends ClientSDK { * * [Customers](https://docs.codat.io/sync-for-expenses-api#/schemas/Customer) are people or organizations that buy goods or services from the SMB. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * Required data may vary by integration. To see what data to post, first call [Get create/update customer model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-customers-model). */ diff --git a/sync-for-expenses/src/sdk/expenses.ts b/sync-for-expenses/src/sdk/expenses.ts index 114013fb7..96497a4af 100644 --- a/sync-for-expenses/src/sdk/expenses.ts +++ b/sync-for-expenses/src/sdk/expenses.ts @@ -27,7 +27,9 @@ export class Expenses extends ClientSDK { * | QuickBooks Desktop | Yes | * | QuickBooks Online | Yes | * | Oracle NetSuite | Yes | + * | Sage Intacct | Yes | * | Xero | Yes | + * | Zoho Books | Yes | */ async create( request: operations.CreateExpenseTransactionRequest, @@ -48,14 +50,23 @@ export class Expenses extends ClientSDK { * * [Expense transactions](https://docs.codat.io/sync-for-expenses-api#/schemas/UpdateExpenseRequest) represent transactions made with a company debit or credit card. * - * ### Supported Integrations + * ### Supported integrations * The following integrations are supported for the [Payment](https://docs.codat.io/expenses/sync-process/expense-transactions#transaction-types) transaction `type` only: * | Integration | Supported | * |-----------------------|-----------| * | FreeAgent | Yes | + * | QuickBooks Desktop | Yes | * | QuickBooks Online | Yes | * | Oracle NetSuite | Yes | + * | Sage Intacct | Yes | * | Xero | Yes | + * | Zoho Books | Yes | + * + * #### Integration-specific behavior + * + * | Integration | Specifics | + * |-----------------------|-----------| + * | Sage Intacct | To sync **debit card expenses**, map the debit card to a Credit Card with the account type set to `Debit`.| */ async update( request: operations.UpdateExpenseTransactionRequest, diff --git a/sync-for-expenses/src/sdk/models/errors/codatsyncexpenseserror.ts b/sync-for-expenses/src/sdk/models/errors/codatsyncexpenseserror.ts new file mode 100644 index 000000000..fceb467de --- /dev/null +++ b/sync-for-expenses/src/sdk/models/errors/codatsyncexpenseserror.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** The base class for all HTTP error responses */ +export class CodatSyncExpensesError extends Error { + /** HTTP status code */ + public readonly statusCode: number; + /** HTTP body */ + public readonly body: string; + /** HTTP headers */ + public readonly headers: Headers; + /** HTTP content type */ + public readonly contentType: string; + /** Raw response */ + public readonly rawResponse: Response; + + constructor( + message: string, + httpMeta: { + response: Response; + request: Request; + body: string; + }, + ) { + super(message); + this.statusCode = httpMeta.response.status; + this.body = httpMeta.body; + this.headers = httpMeta.response.headers; + this.contentType = httpMeta.response.headers.get("content-type") || ""; + this.rawResponse = httpMeta.response; + + this.name = "CodatSyncExpensesError"; + } +} diff --git a/sync-for-expenses/src/sdk/models/errors/errormessage.ts b/sync-for-expenses/src/sdk/models/errors/errormessage.ts index 657f7c6f7..91cc428f9 100644 --- a/sync-for-expenses/src/sdk/models/errors/errormessage.ts +++ b/sync-for-expenses/src/sdk/models/errors/errormessage.ts @@ -2,8 +2,9 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import * as shared from "../shared/index.js"; +import { CodatSyncExpensesError } from "./codatsyncexpenseserror.js"; /** * Your `query` parameter was not correctly formed @@ -42,11 +43,7 @@ export type ErrorMessageData = { /** * Your `query` parameter was not correctly formed */ -export class ErrorMessage extends Error { - /** - * The HTTP status code returned by the error. - */ - statusCode?: number | undefined; +export class ErrorMessage extends CodatSyncExpensesError { /** * Codat's service the returned the error. */ @@ -75,14 +72,15 @@ export class ErrorMessage extends Error { /** The original data that was passed to this error instance. */ data$: ErrorMessageData; - constructor(err: ErrorMessageData) { + constructor( + err: ErrorMessageData, + httpMeta: { response: Response; request: Request; body: string }, + ) { const message = "message" in err && typeof err.message === "string" ? err.message : `API error occurred: ${JSON.stringify(err)}`; - super(message); + super(message, httpMeta); this.data$ = err; - - if (err.statusCode != null) this.statusCode = err.statusCode; if (err.service != null) this.service = err.service; if (err.error != null) this.error = err.error; if (err.correlationId != null) this.correlationId = err.correlationId; @@ -109,48 +107,14 @@ export const ErrorMessage$inboundSchema: z.ZodType< validation: z.nullable(shared.ErrorValidation$inboundSchema).optional(), canBeRetried: z.string().optional(), detailedErrorCode: z.number().int().optional(), + request$: z.instanceof(Request), + response$: z.instanceof(Response), + body$: z.string(), }) .transform((v) => { - return new ErrorMessage(v); + return new ErrorMessage(v, { + request: v.request$, + response: v.response$, + body: v.body$, + }); }); - -/** @internal */ -export type ErrorMessage$Outbound = { - statusCode?: number | undefined; - service?: string | undefined; - error?: string | undefined; - correlationId?: string | undefined; - validation?: shared.ErrorValidation$Outbound | null | undefined; - canBeRetried?: string | undefined; - detailedErrorCode?: number | undefined; -}; - -/** @internal */ -export const ErrorMessage$outboundSchema: z.ZodType< - ErrorMessage$Outbound, - z.ZodTypeDef, - ErrorMessage -> = z.instanceof(ErrorMessage) - .transform(v => v.data$) - .pipe(z.object({ - statusCode: z.number().int().optional(), - service: z.string().optional(), - error: z.string().optional(), - correlationId: z.string().optional(), - validation: z.nullable(shared.ErrorValidation$outboundSchema).optional(), - canBeRetried: z.string().optional(), - detailedErrorCode: z.number().int().optional(), - })); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ErrorMessage$ { - /** @deprecated use `ErrorMessage$inboundSchema` instead. */ - export const inboundSchema = ErrorMessage$inboundSchema; - /** @deprecated use `ErrorMessage$outboundSchema` instead. */ - export const outboundSchema = ErrorMessage$outboundSchema; - /** @deprecated use `ErrorMessage$Outbound` instead. */ - export type Outbound = ErrorMessage$Outbound; -} diff --git a/sync-for-expenses/src/sdk/models/errors/index.ts b/sync-for-expenses/src/sdk/models/errors/index.ts index 615a51570..7d14c1126 100644 --- a/sync-for-expenses/src/sdk/models/errors/index.ts +++ b/sync-for-expenses/src/sdk/models/errors/index.ts @@ -2,7 +2,9 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +export * from "./codatsyncexpenseserror.js"; export * from "./errormessage.js"; export * from "./httpclienterrors.js"; +export * from "./responsevalidationerror.js"; export * from "./sdkerror.js"; export * from "./sdkvalidationerror.js"; diff --git a/sync-for-expenses/src/sdk/models/errors/responsevalidationerror.ts b/sync-for-expenses/src/sdk/models/errors/responsevalidationerror.ts new file mode 100644 index 000000000..ea5e04dba --- /dev/null +++ b/sync-for-expenses/src/sdk/models/errors/responsevalidationerror.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { CodatSyncExpensesError } from "./codatsyncexpenseserror.js"; +import { formatZodError } from "./sdkvalidationerror.js"; + +export class ResponseValidationError extends CodatSyncExpensesError { + /** + * The raw value that failed validation. + */ + public readonly rawValue: unknown; + + /** + * The raw message that failed validation. + */ + public readonly rawMessage: unknown; + + constructor( + message: string, + extra: { + response: Response; + request: Request; + body: string; + cause: unknown; + rawValue: unknown; + rawMessage: unknown; + }, + ) { + super(message, extra); + this.name = "ResponseValidationError"; + this.cause = extra.cause; + this.rawValue = extra.rawValue; + this.rawMessage = extra.rawMessage; + } + + /** + * Return a pretty-formatted error message if the underlying validation error + * is a ZodError or some other recognized error type, otherwise return the + * default error message. + */ + public pretty(): string { + if (this.cause instanceof z.ZodError) { + return `${this.rawMessage}\n${formatZodError(this.cause)}`; + } else { + return this.toString(); + } + } +} diff --git a/sync-for-expenses/src/sdk/models/errors/sdkerror.ts b/sync-for-expenses/src/sdk/models/errors/sdkerror.ts index 001f46592..dc0c69706 100644 --- a/sync-for-expenses/src/sdk/models/errors/sdkerror.ts +++ b/sync-for-expenses/src/sdk/models/errors/sdkerror.ts @@ -2,26 +2,39 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export class SDKError extends Error { - public readonly statusCode: number; - public readonly contentType: string; +import { CodatSyncExpensesError } from "./codatsyncexpenseserror.js"; +/** The fallback error class if no more specific error class is matched */ +export class SDKError extends CodatSyncExpensesError { constructor( message: string, - public readonly rawResponse: Response, - public readonly body: string = "", + httpMeta: { + response: Response; + request: Request; + body: string; + }, ) { - const statusCode = rawResponse.status; - const contentType = rawResponse.headers.get("content-type") || ""; - const bodyString = body.length > 0 ? `\n${body}` : ""; - - super( - `${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`, - ); - - this.statusCode = statusCode; - this.contentType = contentType; - + if (message) { + message += `: `; + } + message += `Status ${httpMeta.response.status}`; + const contentType = httpMeta.response.headers.get("content-type") || `""`; + if (contentType !== "application/json") { + message += ` Content-Type ${ + contentType.includes(" ") ? `"${contentType}"` : contentType + }`; + } + const body = httpMeta.body || `""`; + message += body.length > 100 ? "\n" : ". "; + let bodyDisplay = body; + if (body.length > 10000) { + const truncated = body.substring(0, 10000); + const remaining = body.length - 10000; + bodyDisplay = `${truncated}...and ${remaining} more chars`; + } + message += `Body: ${bodyDisplay}`; + message = message.trim(); + super(message, httpMeta); this.name = "SDKError"; } } diff --git a/sync-for-expenses/src/sdk/models/errors/sdkvalidationerror.ts b/sync-for-expenses/src/sdk/models/errors/sdkvalidationerror.ts index 16929b9e5..6826e1208 100644 --- a/sync-for-expenses/src/sdk/models/errors/sdkvalidationerror.ts +++ b/sync-for-expenses/src/sdk/models/errors/sdkvalidationerror.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; export class SDKValidationError extends Error { /** @@ -15,6 +15,18 @@ export class SDKValidationError extends Error { */ public readonly rawMessage: unknown; + // Allows for backwards compatibility for `instanceof` checks of `ResponseValidationError` + static override [Symbol.hasInstance]( + instance: unknown, + ): instance is SDKValidationError { + if (!(instance instanceof Error)) return false; + if (!("rawValue" in instance)) return false; + if (!("rawMessage" in instance)) return false; + if (!("pretty" in instance)) return false; + if (typeof instance.pretty !== "function") return false; + return true; + } + constructor(message: string, cause: unknown, rawValue: unknown) { super(`${message}: ${cause}`); this.name = "SDKValidationError"; diff --git a/sync-for-expenses/src/sdk/models/operations/createaccount.ts b/sync-for-expenses/src/sdk/models/operations/createaccount.ts index 702d63dff..d8d3f68e1 100644 --- a/sync-for-expenses/src/sdk/models/operations/createaccount.ts +++ b/sync-for-expenses/src/sdk/models/operations/createaccount.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; import * as shared from "../shared/index.js"; export type CreateAccountRequest = { @@ -28,19 +25,6 @@ export type CreateAccountRequest = { accountPrototype?: shared.AccountPrototype | undefined; }; -/** @internal */ -export const CreateAccountRequest$inboundSchema: z.ZodType< - CreateAccountRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - timeoutInMinutes: z.number().int().optional(), - allowSyncOnPushComplete: z.boolean().default(true), - accountPrototype: shared.AccountPrototype$inboundSchema.optional(), -}); - /** @internal */ export type CreateAccountRequest$Outbound = { companyId: string; @@ -63,19 +47,6 @@ export const CreateAccountRequest$outboundSchema: z.ZodType< accountPrototype: shared.AccountPrototype$outboundSchema.optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateAccountRequest$ { - /** @deprecated use `CreateAccountRequest$inboundSchema` instead. */ - export const inboundSchema = CreateAccountRequest$inboundSchema; - /** @deprecated use `CreateAccountRequest$outboundSchema` instead. */ - export const outboundSchema = CreateAccountRequest$outboundSchema; - /** @deprecated use `CreateAccountRequest$Outbound` instead. */ - export type Outbound = CreateAccountRequest$Outbound; -} - export function createAccountRequestToJSON( createAccountRequest: CreateAccountRequest, ): string { @@ -83,13 +54,3 @@ export function createAccountRequestToJSON( CreateAccountRequest$outboundSchema.parse(createAccountRequest), ); } - -export function createAccountRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateAccountRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateAccountRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/createadjustmenttransaction.ts b/sync-for-expenses/src/sdk/models/operations/createadjustmenttransaction.ts index 458c77de1..9282464cc 100644 --- a/sync-for-expenses/src/sdk/models/operations/createadjustmenttransaction.ts +++ b/sync-for-expenses/src/sdk/models/operations/createadjustmenttransaction.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as shared from "../shared/index.js"; export type CreateAdjustmentTransactionRequest = { @@ -17,21 +14,6 @@ export type CreateAdjustmentTransactionRequest = { requestBody?: Array | undefined; }; -/** @internal */ -export const CreateAdjustmentTransactionRequest$inboundSchema: z.ZodType< - CreateAdjustmentTransactionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - RequestBody: z.array(shared.AdjustmentTransactionRequest$inboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - "RequestBody": "requestBody", - }); -}); - /** @internal */ export type CreateAdjustmentTransactionRequest$Outbound = { companyId: string; @@ -53,20 +35,6 @@ export const CreateAdjustmentTransactionRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateAdjustmentTransactionRequest$ { - /** @deprecated use `CreateAdjustmentTransactionRequest$inboundSchema` instead. */ - export const inboundSchema = CreateAdjustmentTransactionRequest$inboundSchema; - /** @deprecated use `CreateAdjustmentTransactionRequest$outboundSchema` instead. */ - export const outboundSchema = - CreateAdjustmentTransactionRequest$outboundSchema; - /** @deprecated use `CreateAdjustmentTransactionRequest$Outbound` instead. */ - export type Outbound = CreateAdjustmentTransactionRequest$Outbound; -} - export function createAdjustmentTransactionRequestToJSON( createAdjustmentTransactionRequest: CreateAdjustmentTransactionRequest, ): string { @@ -76,14 +44,3 @@ export function createAdjustmentTransactionRequestToJSON( ), ); } - -export function createAdjustmentTransactionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - CreateAdjustmentTransactionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateAdjustmentTransactionRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/createbankaccount.ts b/sync-for-expenses/src/sdk/models/operations/createbankaccount.ts index 877521f97..dde96c24e 100644 --- a/sync-for-expenses/src/sdk/models/operations/createbankaccount.ts +++ b/sync-for-expenses/src/sdk/models/operations/createbankaccount.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as shared from "../shared/index.js"; export type CreateBankAccountRequest = { @@ -29,23 +26,6 @@ export type CreateBankAccountRequest = { bankAccount?: shared.BankAccount | null | undefined; }; -/** @internal */ -export const CreateBankAccountRequest$inboundSchema: z.ZodType< - CreateBankAccountRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - timeoutInMinutes: z.number().int().optional(), - allowSyncOnPushComplete: z.boolean().default(true), - BankAccount: z.nullable(shared.BankAccount$inboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - "BankAccount": "bankAccount", - }); -}); - /** @internal */ export type CreateBankAccountRequest$Outbound = { companyId: string; @@ -72,19 +52,6 @@ export const CreateBankAccountRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateBankAccountRequest$ { - /** @deprecated use `CreateBankAccountRequest$inboundSchema` instead. */ - export const inboundSchema = CreateBankAccountRequest$inboundSchema; - /** @deprecated use `CreateBankAccountRequest$outboundSchema` instead. */ - export const outboundSchema = CreateBankAccountRequest$outboundSchema; - /** @deprecated use `CreateBankAccountRequest$Outbound` instead. */ - export type Outbound = CreateBankAccountRequest$Outbound; -} - export function createBankAccountRequestToJSON( createBankAccountRequest: CreateBankAccountRequest, ): string { @@ -92,13 +59,3 @@ export function createBankAccountRequestToJSON( CreateBankAccountRequest$outboundSchema.parse(createBankAccountRequest), ); } - -export function createBankAccountRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateBankAccountRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateBankAccountRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/createconnection.ts b/sync-for-expenses/src/sdk/models/operations/createconnection.ts index 84f50733d..dc5bcac12 100644 --- a/sync-for-expenses/src/sdk/models/operations/createconnection.ts +++ b/sync-for-expenses/src/sdk/models/operations/createconnection.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type CreateConnectionRequestBody = { /** @@ -23,15 +20,6 @@ export type CreateConnectionRequest = { requestBody?: CreateConnectionRequestBody | undefined; }; -/** @internal */ -export const CreateConnectionRequestBody$inboundSchema: z.ZodType< - CreateConnectionRequestBody, - z.ZodTypeDef, - unknown -> = z.object({ - platformKey: z.string().optional(), -}); - /** @internal */ export type CreateConnectionRequestBody$Outbound = { platformKey?: string | undefined; @@ -46,19 +34,6 @@ export const CreateConnectionRequestBody$outboundSchema: z.ZodType< platformKey: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateConnectionRequestBody$ { - /** @deprecated use `CreateConnectionRequestBody$inboundSchema` instead. */ - export const inboundSchema = CreateConnectionRequestBody$inboundSchema; - /** @deprecated use `CreateConnectionRequestBody$outboundSchema` instead. */ - export const outboundSchema = CreateConnectionRequestBody$outboundSchema; - /** @deprecated use `CreateConnectionRequestBody$Outbound` instead. */ - export type Outbound = CreateConnectionRequestBody$Outbound; -} - export function createConnectionRequestBodyToJSON( createConnectionRequestBody: CreateConnectionRequestBody, ): string { @@ -69,31 +44,6 @@ export function createConnectionRequestBodyToJSON( ); } -export function createConnectionRequestBodyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateConnectionRequestBody$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateConnectionRequestBody' from JSON`, - ); -} - -/** @internal */ -export const CreateConnectionRequest$inboundSchema: z.ZodType< - CreateConnectionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - RequestBody: z.lazy(() => CreateConnectionRequestBody$inboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - "RequestBody": "requestBody", - }); -}); - /** @internal */ export type CreateConnectionRequest$Outbound = { companyId: string; @@ -115,19 +65,6 @@ export const CreateConnectionRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateConnectionRequest$ { - /** @deprecated use `CreateConnectionRequest$inboundSchema` instead. */ - export const inboundSchema = CreateConnectionRequest$inboundSchema; - /** @deprecated use `CreateConnectionRequest$outboundSchema` instead. */ - export const outboundSchema = CreateConnectionRequest$outboundSchema; - /** @deprecated use `CreateConnectionRequest$Outbound` instead. */ - export type Outbound = CreateConnectionRequest$Outbound; -} - export function createConnectionRequestToJSON( createConnectionRequest: CreateConnectionRequest, ): string { @@ -135,13 +72,3 @@ export function createConnectionRequestToJSON( CreateConnectionRequest$outboundSchema.parse(createConnectionRequest), ); } - -export function createConnectionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateConnectionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateConnectionRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/createcustomer.ts b/sync-for-expenses/src/sdk/models/operations/createcustomer.ts index 45406a33c..57054a54b 100644 --- a/sync-for-expenses/src/sdk/models/operations/createcustomer.ts +++ b/sync-for-expenses/src/sdk/models/operations/createcustomer.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as shared from "../shared/index.js"; export type CreateCustomerRequest = { @@ -29,23 +26,6 @@ export type CreateCustomerRequest = { customer?: shared.Customer | null | undefined; }; -/** @internal */ -export const CreateCustomerRequest$inboundSchema: z.ZodType< - CreateCustomerRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - timeoutInMinutes: z.number().int().optional(), - allowSyncOnPushComplete: z.boolean().default(true), - Customer: z.nullable(shared.Customer$inboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - "Customer": "customer", - }); -}); - /** @internal */ export type CreateCustomerRequest$Outbound = { companyId: string; @@ -72,19 +52,6 @@ export const CreateCustomerRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateCustomerRequest$ { - /** @deprecated use `CreateCustomerRequest$inboundSchema` instead. */ - export const inboundSchema = CreateCustomerRequest$inboundSchema; - /** @deprecated use `CreateCustomerRequest$outboundSchema` instead. */ - export const outboundSchema = CreateCustomerRequest$outboundSchema; - /** @deprecated use `CreateCustomerRequest$Outbound` instead. */ - export type Outbound = CreateCustomerRequest$Outbound; -} - export function createCustomerRequestToJSON( createCustomerRequest: CreateCustomerRequest, ): string { @@ -92,13 +59,3 @@ export function createCustomerRequestToJSON( CreateCustomerRequest$outboundSchema.parse(createCustomerRequest), ); } - -export function createCustomerRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateCustomerRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateCustomerRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/createexpensetransaction.ts b/sync-for-expenses/src/sdk/models/operations/createexpensetransaction.ts index 92b364141..4e9f5f6af 100644 --- a/sync-for-expenses/src/sdk/models/operations/createexpensetransaction.ts +++ b/sync-for-expenses/src/sdk/models/operations/createexpensetransaction.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as shared from "../shared/index.js"; export type CreateExpenseTransactionRequest = { @@ -17,20 +14,6 @@ export type CreateExpenseTransactionRequest = { requestBody?: Array | undefined; }; -/** @internal */ -export const CreateExpenseTransactionRequest$inboundSchema: z.ZodType< - CreateExpenseTransactionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - RequestBody: z.array(shared.ExpenseTransaction$inboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - "RequestBody": "requestBody", - }); -}); - /** @internal */ export type CreateExpenseTransactionRequest$Outbound = { companyId: string; @@ -51,19 +34,6 @@ export const CreateExpenseTransactionRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateExpenseTransactionRequest$ { - /** @deprecated use `CreateExpenseTransactionRequest$inboundSchema` instead. */ - export const inboundSchema = CreateExpenseTransactionRequest$inboundSchema; - /** @deprecated use `CreateExpenseTransactionRequest$outboundSchema` instead. */ - export const outboundSchema = CreateExpenseTransactionRequest$outboundSchema; - /** @deprecated use `CreateExpenseTransactionRequest$Outbound` instead. */ - export type Outbound = CreateExpenseTransactionRequest$Outbound; -} - export function createExpenseTransactionRequestToJSON( createExpenseTransactionRequest: CreateExpenseTransactionRequest, ): string { @@ -73,13 +43,3 @@ export function createExpenseTransactionRequestToJSON( ), ); } - -export function createExpenseTransactionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateExpenseTransactionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateExpenseTransactionRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/createpartnerexpenseconnection.ts b/sync-for-expenses/src/sdk/models/operations/createpartnerexpenseconnection.ts index a49bb3479..7b71c8039 100644 --- a/sync-for-expenses/src/sdk/models/operations/createpartnerexpenseconnection.ts +++ b/sync-for-expenses/src/sdk/models/operations/createpartnerexpenseconnection.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type CreatePartnerExpenseConnectionRequest = { /** @@ -14,15 +11,6 @@ export type CreatePartnerExpenseConnectionRequest = { companyId: string; }; -/** @internal */ -export const CreatePartnerExpenseConnectionRequest$inboundSchema: z.ZodType< - CreatePartnerExpenseConnectionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), -}); - /** @internal */ export type CreatePartnerExpenseConnectionRequest$Outbound = { companyId: string; @@ -37,21 +25,6 @@ export const CreatePartnerExpenseConnectionRequest$outboundSchema: z.ZodType< companyId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreatePartnerExpenseConnectionRequest$ { - /** @deprecated use `CreatePartnerExpenseConnectionRequest$inboundSchema` instead. */ - export const inboundSchema = - CreatePartnerExpenseConnectionRequest$inboundSchema; - /** @deprecated use `CreatePartnerExpenseConnectionRequest$outboundSchema` instead. */ - export const outboundSchema = - CreatePartnerExpenseConnectionRequest$outboundSchema; - /** @deprecated use `CreatePartnerExpenseConnectionRequest$Outbound` instead. */ - export type Outbound = CreatePartnerExpenseConnectionRequest$Outbound; -} - export function createPartnerExpenseConnectionRequestToJSON( createPartnerExpenseConnectionRequest: CreatePartnerExpenseConnectionRequest, ): string { @@ -61,14 +34,3 @@ export function createPartnerExpenseConnectionRequestToJSON( ), ); } - -export function createPartnerExpenseConnectionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - CreatePartnerExpenseConnectionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreatePartnerExpenseConnectionRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/createreimbursableexpensetransaction.ts b/sync-for-expenses/src/sdk/models/operations/createreimbursableexpensetransaction.ts index 06064f3d5..996da57c9 100644 --- a/sync-for-expenses/src/sdk/models/operations/createreimbursableexpensetransaction.ts +++ b/sync-for-expenses/src/sdk/models/operations/createreimbursableexpensetransaction.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as shared from "../shared/index.js"; export type CreateReimbursableExpenseTransactionRequest = { @@ -17,22 +14,6 @@ export type CreateReimbursableExpenseTransactionRequest = { requestBody?: Array | undefined; }; -/** @internal */ -export const CreateReimbursableExpenseTransactionRequest$inboundSchema: - z.ZodType< - CreateReimbursableExpenseTransactionRequest, - z.ZodTypeDef, - unknown - > = z.object({ - companyId: z.string(), - RequestBody: z.array(shared.ReimbursableExpenseTransaction$inboundSchema) - .optional(), - }).transform((v) => { - return remap$(v, { - "RequestBody": "requestBody", - }); - }); - /** @internal */ export type CreateReimbursableExpenseTransactionRequest$Outbound = { companyId: string; @@ -57,21 +38,6 @@ export const CreateReimbursableExpenseTransactionRequest$outboundSchema: }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateReimbursableExpenseTransactionRequest$ { - /** @deprecated use `CreateReimbursableExpenseTransactionRequest$inboundSchema` instead. */ - export const inboundSchema = - CreateReimbursableExpenseTransactionRequest$inboundSchema; - /** @deprecated use `CreateReimbursableExpenseTransactionRequest$outboundSchema` instead. */ - export const outboundSchema = - CreateReimbursableExpenseTransactionRequest$outboundSchema; - /** @deprecated use `CreateReimbursableExpenseTransactionRequest$Outbound` instead. */ - export type Outbound = CreateReimbursableExpenseTransactionRequest$Outbound; -} - export function createReimbursableExpenseTransactionRequestToJSON( createReimbursableExpenseTransactionRequest: CreateReimbursableExpenseTransactionRequest, @@ -82,19 +48,3 @@ export function createReimbursableExpenseTransactionRequestToJSON( ), ); } - -export function createReimbursableExpenseTransactionRequestFromJSON( - jsonString: string, -): SafeParseResult< - CreateReimbursableExpenseTransactionRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - CreateReimbursableExpenseTransactionRequest$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'CreateReimbursableExpenseTransactionRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/createsupplier.ts b/sync-for-expenses/src/sdk/models/operations/createsupplier.ts index d42de94ee..8022daa8c 100644 --- a/sync-for-expenses/src/sdk/models/operations/createsupplier.ts +++ b/sync-for-expenses/src/sdk/models/operations/createsupplier.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as shared from "../shared/index.js"; export type CreateSupplierRequest = { @@ -29,23 +26,6 @@ export type CreateSupplierRequest = { supplier?: shared.Supplier | null | undefined; }; -/** @internal */ -export const CreateSupplierRequest$inboundSchema: z.ZodType< - CreateSupplierRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - timeoutInMinutes: z.number().int().optional(), - allowSyncOnPushComplete: z.boolean().default(true), - Supplier: z.nullable(shared.Supplier$inboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - "Supplier": "supplier", - }); -}); - /** @internal */ export type CreateSupplierRequest$Outbound = { companyId: string; @@ -72,19 +52,6 @@ export const CreateSupplierRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateSupplierRequest$ { - /** @deprecated use `CreateSupplierRequest$inboundSchema` instead. */ - export const inboundSchema = CreateSupplierRequest$inboundSchema; - /** @deprecated use `CreateSupplierRequest$outboundSchema` instead. */ - export const outboundSchema = CreateSupplierRequest$outboundSchema; - /** @deprecated use `CreateSupplierRequest$Outbound` instead. */ - export type Outbound = CreateSupplierRequest$Outbound; -} - export function createSupplierRequestToJSON( createSupplierRequest: CreateSupplierRequest, ): string { @@ -92,13 +59,3 @@ export function createSupplierRequestToJSON( CreateSupplierRequest$outboundSchema.parse(createSupplierRequest), ); } - -export function createSupplierRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateSupplierRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateSupplierRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/createtransfertransaction.ts b/sync-for-expenses/src/sdk/models/operations/createtransfertransaction.ts index 1d6e52e85..ca8dae247 100644 --- a/sync-for-expenses/src/sdk/models/operations/createtransfertransaction.ts +++ b/sync-for-expenses/src/sdk/models/operations/createtransfertransaction.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as shared from "../shared/index.js"; export type CreateTransferTransactionRequest = { @@ -21,22 +18,6 @@ export type CreateTransferTransactionRequest = { transferTransactionRequest?: shared.TransferTransactionRequest | undefined; }; -/** @internal */ -export const CreateTransferTransactionRequest$inboundSchema: z.ZodType< - CreateTransferTransactionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - transactionId: z.string(), - TransferTransactionRequest: shared.TransferTransactionRequest$inboundSchema - .optional(), -}).transform((v) => { - return remap$(v, { - "TransferTransactionRequest": "transferTransactionRequest", - }); -}); - /** @internal */ export type CreateTransferTransactionRequest$Outbound = { companyId: string; @@ -62,19 +43,6 @@ export const CreateTransferTransactionRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateTransferTransactionRequest$ { - /** @deprecated use `CreateTransferTransactionRequest$inboundSchema` instead. */ - export const inboundSchema = CreateTransferTransactionRequest$inboundSchema; - /** @deprecated use `CreateTransferTransactionRequest$outboundSchema` instead. */ - export const outboundSchema = CreateTransferTransactionRequest$outboundSchema; - /** @deprecated use `CreateTransferTransactionRequest$Outbound` instead. */ - export type Outbound = CreateTransferTransactionRequest$Outbound; -} - export function createTransferTransactionRequestToJSON( createTransferTransactionRequest: CreateTransferTransactionRequest, ): string { @@ -84,13 +52,3 @@ export function createTransferTransactionRequestToJSON( ), ); } - -export function createTransferTransactionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateTransferTransactionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateTransferTransactionRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/deletecompany.ts b/sync-for-expenses/src/sdk/models/operations/deletecompany.ts index 5f2d2ed1d..dbe555534 100644 --- a/sync-for-expenses/src/sdk/models/operations/deletecompany.ts +++ b/sync-for-expenses/src/sdk/models/operations/deletecompany.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type DeleteCompanyRequest = { /** @@ -14,15 +11,6 @@ export type DeleteCompanyRequest = { companyId: string; }; -/** @internal */ -export const DeleteCompanyRequest$inboundSchema: z.ZodType< - DeleteCompanyRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), -}); - /** @internal */ export type DeleteCompanyRequest$Outbound = { companyId: string; @@ -37,19 +25,6 @@ export const DeleteCompanyRequest$outboundSchema: z.ZodType< companyId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteCompanyRequest$ { - /** @deprecated use `DeleteCompanyRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteCompanyRequest$inboundSchema; - /** @deprecated use `DeleteCompanyRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteCompanyRequest$outboundSchema; - /** @deprecated use `DeleteCompanyRequest$Outbound` instead. */ - export type Outbound = DeleteCompanyRequest$Outbound; -} - export function deleteCompanyRequestToJSON( deleteCompanyRequest: DeleteCompanyRequest, ): string { @@ -57,13 +32,3 @@ export function deleteCompanyRequestToJSON( DeleteCompanyRequest$outboundSchema.parse(deleteCompanyRequest), ); } - -export function deleteCompanyRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeleteCompanyRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteCompanyRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/deleteconnection.ts b/sync-for-expenses/src/sdk/models/operations/deleteconnection.ts index e3e5e8adb..83f759970 100644 --- a/sync-for-expenses/src/sdk/models/operations/deleteconnection.ts +++ b/sync-for-expenses/src/sdk/models/operations/deleteconnection.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type DeleteConnectionRequest = { /** @@ -18,16 +15,6 @@ export type DeleteConnectionRequest = { connectionId: string; }; -/** @internal */ -export const DeleteConnectionRequest$inboundSchema: z.ZodType< - DeleteConnectionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - connectionId: z.string(), -}); - /** @internal */ export type DeleteConnectionRequest$Outbound = { companyId: string; @@ -44,19 +31,6 @@ export const DeleteConnectionRequest$outboundSchema: z.ZodType< connectionId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteConnectionRequest$ { - /** @deprecated use `DeleteConnectionRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteConnectionRequest$inboundSchema; - /** @deprecated use `DeleteConnectionRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteConnectionRequest$outboundSchema; - /** @deprecated use `DeleteConnectionRequest$Outbound` instead. */ - export type Outbound = DeleteConnectionRequest$Outbound; -} - export function deleteConnectionRequestToJSON( deleteConnectionRequest: DeleteConnectionRequest, ): string { @@ -64,13 +38,3 @@ export function deleteConnectionRequestToJSON( DeleteConnectionRequest$outboundSchema.parse(deleteConnectionRequest), ); } - -export function deleteConnectionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeleteConnectionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteConnectionRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/getcompany.ts b/sync-for-expenses/src/sdk/models/operations/getcompany.ts index 41f97ff9e..77734decc 100644 --- a/sync-for-expenses/src/sdk/models/operations/getcompany.ts +++ b/sync-for-expenses/src/sdk/models/operations/getcompany.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type GetCompanyRequest = { /** @@ -14,15 +11,6 @@ export type GetCompanyRequest = { companyId: string; }; -/** @internal */ -export const GetCompanyRequest$inboundSchema: z.ZodType< - GetCompanyRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), -}); - /** @internal */ export type GetCompanyRequest$Outbound = { companyId: string; @@ -37,19 +25,6 @@ export const GetCompanyRequest$outboundSchema: z.ZodType< companyId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetCompanyRequest$ { - /** @deprecated use `GetCompanyRequest$inboundSchema` instead. */ - export const inboundSchema = GetCompanyRequest$inboundSchema; - /** @deprecated use `GetCompanyRequest$outboundSchema` instead. */ - export const outboundSchema = GetCompanyRequest$outboundSchema; - /** @deprecated use `GetCompanyRequest$Outbound` instead. */ - export type Outbound = GetCompanyRequest$Outbound; -} - export function getCompanyRequestToJSON( getCompanyRequest: GetCompanyRequest, ): string { @@ -57,13 +32,3 @@ export function getCompanyRequestToJSON( GetCompanyRequest$outboundSchema.parse(getCompanyRequest), ); } - -export function getCompanyRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetCompanyRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetCompanyRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/getcompanyconfiguration.ts b/sync-for-expenses/src/sdk/models/operations/getcompanyconfiguration.ts index db1b1ca9a..92ae8a498 100644 --- a/sync-for-expenses/src/sdk/models/operations/getcompanyconfiguration.ts +++ b/sync-for-expenses/src/sdk/models/operations/getcompanyconfiguration.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type GetCompanyConfigurationRequest = { /** @@ -14,15 +11,6 @@ export type GetCompanyConfigurationRequest = { companyId: string; }; -/** @internal */ -export const GetCompanyConfigurationRequest$inboundSchema: z.ZodType< - GetCompanyConfigurationRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), -}); - /** @internal */ export type GetCompanyConfigurationRequest$Outbound = { companyId: string; @@ -37,19 +25,6 @@ export const GetCompanyConfigurationRequest$outboundSchema: z.ZodType< companyId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetCompanyConfigurationRequest$ { - /** @deprecated use `GetCompanyConfigurationRequest$inboundSchema` instead. */ - export const inboundSchema = GetCompanyConfigurationRequest$inboundSchema; - /** @deprecated use `GetCompanyConfigurationRequest$outboundSchema` instead. */ - export const outboundSchema = GetCompanyConfigurationRequest$outboundSchema; - /** @deprecated use `GetCompanyConfigurationRequest$Outbound` instead. */ - export type Outbound = GetCompanyConfigurationRequest$Outbound; -} - export function getCompanyConfigurationRequestToJSON( getCompanyConfigurationRequest: GetCompanyConfigurationRequest, ): string { @@ -59,13 +34,3 @@ export function getCompanyConfigurationRequestToJSON( ), ); } - -export function getCompanyConfigurationRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetCompanyConfigurationRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetCompanyConfigurationRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/getcompanyinfo.ts b/sync-for-expenses/src/sdk/models/operations/getcompanyinfo.ts index a29f78ae5..b3eb61f13 100644 --- a/sync-for-expenses/src/sdk/models/operations/getcompanyinfo.ts +++ b/sync-for-expenses/src/sdk/models/operations/getcompanyinfo.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type GetCompanyInfoRequest = { /** @@ -14,15 +11,6 @@ export type GetCompanyInfoRequest = { companyId: string; }; -/** @internal */ -export const GetCompanyInfoRequest$inboundSchema: z.ZodType< - GetCompanyInfoRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), -}); - /** @internal */ export type GetCompanyInfoRequest$Outbound = { companyId: string; @@ -37,19 +25,6 @@ export const GetCompanyInfoRequest$outboundSchema: z.ZodType< companyId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetCompanyInfoRequest$ { - /** @deprecated use `GetCompanyInfoRequest$inboundSchema` instead. */ - export const inboundSchema = GetCompanyInfoRequest$inboundSchema; - /** @deprecated use `GetCompanyInfoRequest$outboundSchema` instead. */ - export const outboundSchema = GetCompanyInfoRequest$outboundSchema; - /** @deprecated use `GetCompanyInfoRequest$Outbound` instead. */ - export type Outbound = GetCompanyInfoRequest$Outbound; -} - export function getCompanyInfoRequestToJSON( getCompanyInfoRequest: GetCompanyInfoRequest, ): string { @@ -57,13 +32,3 @@ export function getCompanyInfoRequestToJSON( GetCompanyInfoRequest$outboundSchema.parse(getCompanyInfoRequest), ); } - -export function getCompanyInfoRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetCompanyInfoRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetCompanyInfoRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/getconnection.ts b/sync-for-expenses/src/sdk/models/operations/getconnection.ts index 8c0d6650e..126d23b85 100644 --- a/sync-for-expenses/src/sdk/models/operations/getconnection.ts +++ b/sync-for-expenses/src/sdk/models/operations/getconnection.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type GetConnectionRequest = { /** @@ -18,16 +15,6 @@ export type GetConnectionRequest = { connectionId: string; }; -/** @internal */ -export const GetConnectionRequest$inboundSchema: z.ZodType< - GetConnectionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - connectionId: z.string(), -}); - /** @internal */ export type GetConnectionRequest$Outbound = { companyId: string; @@ -44,19 +31,6 @@ export const GetConnectionRequest$outboundSchema: z.ZodType< connectionId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetConnectionRequest$ { - /** @deprecated use `GetConnectionRequest$inboundSchema` instead. */ - export const inboundSchema = GetConnectionRequest$inboundSchema; - /** @deprecated use `GetConnectionRequest$outboundSchema` instead. */ - export const outboundSchema = GetConnectionRequest$outboundSchema; - /** @deprecated use `GetConnectionRequest$Outbound` instead. */ - export type Outbound = GetConnectionRequest$Outbound; -} - export function getConnectionRequestToJSON( getConnectionRequest: GetConnectionRequest, ): string { @@ -64,13 +38,3 @@ export function getConnectionRequestToJSON( GetConnectionRequest$outboundSchema.parse(getConnectionRequest), ); } - -export function getConnectionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetConnectionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetConnectionRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/getcreatebankaccountsmodel.ts b/sync-for-expenses/src/sdk/models/operations/getcreatebankaccountsmodel.ts index 654781636..455e4e838 100644 --- a/sync-for-expenses/src/sdk/models/operations/getcreatebankaccountsmodel.ts +++ b/sync-for-expenses/src/sdk/models/operations/getcreatebankaccountsmodel.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type GetCreateBankAccountsModelRequest = { /** @@ -18,16 +15,6 @@ export type GetCreateBankAccountsModelRequest = { connectionId: string; }; -/** @internal */ -export const GetCreateBankAccountsModelRequest$inboundSchema: z.ZodType< - GetCreateBankAccountsModelRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - connectionId: z.string(), -}); - /** @internal */ export type GetCreateBankAccountsModelRequest$Outbound = { companyId: string; @@ -44,20 +31,6 @@ export const GetCreateBankAccountsModelRequest$outboundSchema: z.ZodType< connectionId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetCreateBankAccountsModelRequest$ { - /** @deprecated use `GetCreateBankAccountsModelRequest$inboundSchema` instead. */ - export const inboundSchema = GetCreateBankAccountsModelRequest$inboundSchema; - /** @deprecated use `GetCreateBankAccountsModelRequest$outboundSchema` instead. */ - export const outboundSchema = - GetCreateBankAccountsModelRequest$outboundSchema; - /** @deprecated use `GetCreateBankAccountsModelRequest$Outbound` instead. */ - export type Outbound = GetCreateBankAccountsModelRequest$Outbound; -} - export function getCreateBankAccountsModelRequestToJSON( getCreateBankAccountsModelRequest: GetCreateBankAccountsModelRequest, ): string { @@ -67,13 +40,3 @@ export function getCreateBankAccountsModelRequestToJSON( ), ); } - -export function getCreateBankAccountsModelRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetCreateBankAccountsModelRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetCreateBankAccountsModelRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/getcreatechartofaccountsmodel.ts b/sync-for-expenses/src/sdk/models/operations/getcreatechartofaccountsmodel.ts index 48d9d2b54..d3b2a28a6 100644 --- a/sync-for-expenses/src/sdk/models/operations/getcreatechartofaccountsmodel.ts +++ b/sync-for-expenses/src/sdk/models/operations/getcreatechartofaccountsmodel.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type GetCreateChartOfAccountsModelRequest = { /** @@ -18,16 +15,6 @@ export type GetCreateChartOfAccountsModelRequest = { connectionId: string; }; -/** @internal */ -export const GetCreateChartOfAccountsModelRequest$inboundSchema: z.ZodType< - GetCreateChartOfAccountsModelRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - connectionId: z.string(), -}); - /** @internal */ export type GetCreateChartOfAccountsModelRequest$Outbound = { companyId: string; @@ -44,21 +31,6 @@ export const GetCreateChartOfAccountsModelRequest$outboundSchema: z.ZodType< connectionId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetCreateChartOfAccountsModelRequest$ { - /** @deprecated use `GetCreateChartOfAccountsModelRequest$inboundSchema` instead. */ - export const inboundSchema = - GetCreateChartOfAccountsModelRequest$inboundSchema; - /** @deprecated use `GetCreateChartOfAccountsModelRequest$outboundSchema` instead. */ - export const outboundSchema = - GetCreateChartOfAccountsModelRequest$outboundSchema; - /** @deprecated use `GetCreateChartOfAccountsModelRequest$Outbound` instead. */ - export type Outbound = GetCreateChartOfAccountsModelRequest$Outbound; -} - export function getCreateChartOfAccountsModelRequestToJSON( getCreateChartOfAccountsModelRequest: GetCreateChartOfAccountsModelRequest, ): string { @@ -68,14 +40,3 @@ export function getCreateChartOfAccountsModelRequestToJSON( ), ); } - -export function getCreateChartOfAccountsModelRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - GetCreateChartOfAccountsModelRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetCreateChartOfAccountsModelRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/getcustomer.ts b/sync-for-expenses/src/sdk/models/operations/getcustomer.ts index 59dcaff77..81a814931 100644 --- a/sync-for-expenses/src/sdk/models/operations/getcustomer.ts +++ b/sync-for-expenses/src/sdk/models/operations/getcustomer.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type GetCustomerRequest = { /** @@ -18,16 +15,6 @@ export type GetCustomerRequest = { customerId: string; }; -/** @internal */ -export const GetCustomerRequest$inboundSchema: z.ZodType< - GetCustomerRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - customerId: z.string(), -}); - /** @internal */ export type GetCustomerRequest$Outbound = { companyId: string; @@ -44,19 +31,6 @@ export const GetCustomerRequest$outboundSchema: z.ZodType< customerId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetCustomerRequest$ { - /** @deprecated use `GetCustomerRequest$inboundSchema` instead. */ - export const inboundSchema = GetCustomerRequest$inboundSchema; - /** @deprecated use `GetCustomerRequest$outboundSchema` instead. */ - export const outboundSchema = GetCustomerRequest$outboundSchema; - /** @deprecated use `GetCustomerRequest$Outbound` instead. */ - export type Outbound = GetCustomerRequest$Outbound; -} - export function getCustomerRequestToJSON( getCustomerRequest: GetCustomerRequest, ): string { @@ -64,13 +38,3 @@ export function getCustomerRequestToJSON( GetCustomerRequest$outboundSchema.parse(getCustomerRequest), ); } - -export function getCustomerRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetCustomerRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetCustomerRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/getdatastatus.ts b/sync-for-expenses/src/sdk/models/operations/getdatastatus.ts index e84ca64a1..e53d4c2a1 100644 --- a/sync-for-expenses/src/sdk/models/operations/getdatastatus.ts +++ b/sync-for-expenses/src/sdk/models/operations/getdatastatus.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -194,15 +194,6 @@ export type GetDataStatusDataStatuses = { commerceTransactions?: shared.DataStatus | undefined; }; -/** @internal */ -export const GetDataStatusRequest$inboundSchema: z.ZodType< - GetDataStatusRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), -}); - /** @internal */ export type GetDataStatusRequest$Outbound = { companyId: string; @@ -217,19 +208,6 @@ export const GetDataStatusRequest$outboundSchema: z.ZodType< companyId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetDataStatusRequest$ { - /** @deprecated use `GetDataStatusRequest$inboundSchema` instead. */ - export const inboundSchema = GetDataStatusRequest$inboundSchema; - /** @deprecated use `GetDataStatusRequest$outboundSchema` instead. */ - export const outboundSchema = GetDataStatusRequest$outboundSchema; - /** @deprecated use `GetDataStatusRequest$Outbound` instead. */ - export type Outbound = GetDataStatusRequest$Outbound; -} - export function getDataStatusRequestToJSON( getDataStatusRequest: GetDataStatusRequest, ): string { @@ -238,16 +216,6 @@ export function getDataStatusRequestToJSON( ); } -export function getDataStatusRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetDataStatusRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetDataStatusRequest' from JSON`, - ); -} - /** @internal */ export const GetDataStatusDataStatuses$inboundSchema: z.ZodType< GetDataStatusDataStatuses, @@ -317,143 +285,6 @@ export const GetDataStatusDataStatuses$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type GetDataStatusDataStatuses$Outbound = { - accountTransactions?: shared.DataStatus$Outbound | undefined; - balanceSheet?: shared.DataStatus$Outbound | undefined; - bankAccounts?: shared.DataStatus$Outbound | undefined; - bankTransactions?: shared.DataStatus$Outbound | undefined; - billCreditNotes?: shared.DataStatus$Outbound | undefined; - billPayments?: shared.DataStatus$Outbound | undefined; - bills?: shared.DataStatus$Outbound | undefined; - cashFlowStatement?: shared.DataStatus$Outbound | undefined; - chartOfAccounts?: shared.DataStatus$Outbound | undefined; - company?: shared.DataStatus$Outbound | undefined; - creditNotes?: shared.DataStatus$Outbound | undefined; - customers?: shared.DataStatus$Outbound | undefined; - directCosts?: shared.DataStatus$Outbound | undefined; - directIncomes?: shared.DataStatus$Outbound | undefined; - invoices?: shared.DataStatus$Outbound | undefined; - itemReceipts?: shared.DataStatus$Outbound | undefined; - items?: shared.DataStatus$Outbound | undefined; - journalEntries?: shared.DataStatus$Outbound | undefined; - journals?: shared.DataStatus$Outbound | undefined; - paymentMethods?: shared.DataStatus$Outbound | undefined; - payments?: shared.DataStatus$Outbound | undefined; - profitAndLoss?: shared.DataStatus$Outbound | undefined; - purchaseOrders?: shared.DataStatus$Outbound | undefined; - salesOrders?: shared.DataStatus$Outbound | undefined; - suppliers?: shared.DataStatus$Outbound | undefined; - taxRates?: shared.DataStatus$Outbound | undefined; - trackingCategories?: shared.DataStatus$Outbound | undefined; - transfers?: shared.DataStatus$Outbound | undefined; - "banking-accountBalances"?: shared.DataStatus$Outbound | undefined; - "banking-accounts"?: shared.DataStatus$Outbound | undefined; - "banking-transactionCategories"?: shared.DataStatus$Outbound | undefined; - "banking-transactions"?: shared.DataStatus$Outbound | undefined; - "commerce-companyInfo"?: shared.DataStatus$Outbound | undefined; - "commerce-customers"?: shared.DataStatus$Outbound | undefined; - "commerce-disputes"?: shared.DataStatus$Outbound | undefined; - "commerce-locations"?: shared.DataStatus$Outbound | undefined; - "commerce-orders"?: shared.DataStatus$Outbound | undefined; - "commerce-paymentMethods"?: shared.DataStatus$Outbound | undefined; - "commerce-payments"?: shared.DataStatus$Outbound | undefined; - "commerce-productCategories"?: shared.DataStatus$Outbound | undefined; - "commerce-products"?: shared.DataStatus$Outbound | undefined; - "commerce-taxComponents"?: shared.DataStatus$Outbound | undefined; - "commerce-transactions"?: shared.DataStatus$Outbound | undefined; -}; - -/** @internal */ -export const GetDataStatusDataStatuses$outboundSchema: z.ZodType< - GetDataStatusDataStatuses$Outbound, - z.ZodTypeDef, - GetDataStatusDataStatuses -> = z.object({ - accountTransactions: shared.DataStatus$outboundSchema.optional(), - balanceSheet: shared.DataStatus$outboundSchema.optional(), - bankAccounts: shared.DataStatus$outboundSchema.optional(), - bankTransactions: shared.DataStatus$outboundSchema.optional(), - billCreditNotes: shared.DataStatus$outboundSchema.optional(), - billPayments: shared.DataStatus$outboundSchema.optional(), - bills: shared.DataStatus$outboundSchema.optional(), - cashFlowStatement: shared.DataStatus$outboundSchema.optional(), - chartOfAccounts: shared.DataStatus$outboundSchema.optional(), - company: shared.DataStatus$outboundSchema.optional(), - creditNotes: shared.DataStatus$outboundSchema.optional(), - customers: shared.DataStatus$outboundSchema.optional(), - directCosts: shared.DataStatus$outboundSchema.optional(), - directIncomes: shared.DataStatus$outboundSchema.optional(), - invoices: shared.DataStatus$outboundSchema.optional(), - itemReceipts: shared.DataStatus$outboundSchema.optional(), - items: shared.DataStatus$outboundSchema.optional(), - journalEntries: shared.DataStatus$outboundSchema.optional(), - journals: shared.DataStatus$outboundSchema.optional(), - paymentMethods: shared.DataStatus$outboundSchema.optional(), - payments: shared.DataStatus$outboundSchema.optional(), - profitAndLoss: shared.DataStatus$outboundSchema.optional(), - purchaseOrders: shared.DataStatus$outboundSchema.optional(), - salesOrders: shared.DataStatus$outboundSchema.optional(), - suppliers: shared.DataStatus$outboundSchema.optional(), - taxRates: shared.DataStatus$outboundSchema.optional(), - trackingCategories: shared.DataStatus$outboundSchema.optional(), - transfers: shared.DataStatus$outboundSchema.optional(), - bankingAccountBalances: shared.DataStatus$outboundSchema.optional(), - bankingAccounts: shared.DataStatus$outboundSchema.optional(), - bankingTransactionCategories: shared.DataStatus$outboundSchema.optional(), - bankingTransactions: shared.DataStatus$outboundSchema.optional(), - commerceCompanyInfo: shared.DataStatus$outboundSchema.optional(), - commerceCustomers: shared.DataStatus$outboundSchema.optional(), - commerceDisputes: shared.DataStatus$outboundSchema.optional(), - commerceLocations: shared.DataStatus$outboundSchema.optional(), - commerceOrders: shared.DataStatus$outboundSchema.optional(), - commercePaymentMethods: shared.DataStatus$outboundSchema.optional(), - commercePayments: shared.DataStatus$outboundSchema.optional(), - commerceProductCategories: shared.DataStatus$outboundSchema.optional(), - commerceProducts: shared.DataStatus$outboundSchema.optional(), - commerceTaxComponents: shared.DataStatus$outboundSchema.optional(), - commerceTransactions: shared.DataStatus$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - bankingAccountBalances: "banking-accountBalances", - bankingAccounts: "banking-accounts", - bankingTransactionCategories: "banking-transactionCategories", - bankingTransactions: "banking-transactions", - commerceCompanyInfo: "commerce-companyInfo", - commerceCustomers: "commerce-customers", - commerceDisputes: "commerce-disputes", - commerceLocations: "commerce-locations", - commerceOrders: "commerce-orders", - commercePaymentMethods: "commerce-paymentMethods", - commercePayments: "commerce-payments", - commerceProductCategories: "commerce-productCategories", - commerceProducts: "commerce-products", - commerceTaxComponents: "commerce-taxComponents", - commerceTransactions: "commerce-transactions", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetDataStatusDataStatuses$ { - /** @deprecated use `GetDataStatusDataStatuses$inboundSchema` instead. */ - export const inboundSchema = GetDataStatusDataStatuses$inboundSchema; - /** @deprecated use `GetDataStatusDataStatuses$outboundSchema` instead. */ - export const outboundSchema = GetDataStatusDataStatuses$outboundSchema; - /** @deprecated use `GetDataStatusDataStatuses$Outbound` instead. */ - export type Outbound = GetDataStatusDataStatuses$Outbound; -} - -export function getDataStatusDataStatusesToJSON( - getDataStatusDataStatuses: GetDataStatusDataStatuses, -): string { - return JSON.stringify( - GetDataStatusDataStatuses$outboundSchema.parse(getDataStatusDataStatuses), - ); -} - export function getDataStatusDataStatusesFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/operations/getlastsuccessfulsync.ts b/sync-for-expenses/src/sdk/models/operations/getlastsuccessfulsync.ts index 66bb1a5fc..f34d49fb6 100644 --- a/sync-for-expenses/src/sdk/models/operations/getlastsuccessfulsync.ts +++ b/sync-for-expenses/src/sdk/models/operations/getlastsuccessfulsync.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type GetLastSuccessfulSyncRequest = { /** @@ -14,15 +11,6 @@ export type GetLastSuccessfulSyncRequest = { companyId: string; }; -/** @internal */ -export const GetLastSuccessfulSyncRequest$inboundSchema: z.ZodType< - GetLastSuccessfulSyncRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), -}); - /** @internal */ export type GetLastSuccessfulSyncRequest$Outbound = { companyId: string; @@ -37,19 +25,6 @@ export const GetLastSuccessfulSyncRequest$outboundSchema: z.ZodType< companyId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetLastSuccessfulSyncRequest$ { - /** @deprecated use `GetLastSuccessfulSyncRequest$inboundSchema` instead. */ - export const inboundSchema = GetLastSuccessfulSyncRequest$inboundSchema; - /** @deprecated use `GetLastSuccessfulSyncRequest$outboundSchema` instead. */ - export const outboundSchema = GetLastSuccessfulSyncRequest$outboundSchema; - /** @deprecated use `GetLastSuccessfulSyncRequest$Outbound` instead. */ - export type Outbound = GetLastSuccessfulSyncRequest$Outbound; -} - export function getLastSuccessfulSyncRequestToJSON( getLastSuccessfulSyncRequest: GetLastSuccessfulSyncRequest, ): string { @@ -59,13 +34,3 @@ export function getLastSuccessfulSyncRequestToJSON( ), ); } - -export function getLastSuccessfulSyncRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetLastSuccessfulSyncRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetLastSuccessfulSyncRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/getlatestsync.ts b/sync-for-expenses/src/sdk/models/operations/getlatestsync.ts index 55388d946..79ec54e8f 100644 --- a/sync-for-expenses/src/sdk/models/operations/getlatestsync.ts +++ b/sync-for-expenses/src/sdk/models/operations/getlatestsync.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type GetLatestSyncRequest = { /** @@ -14,15 +11,6 @@ export type GetLatestSyncRequest = { companyId: string; }; -/** @internal */ -export const GetLatestSyncRequest$inboundSchema: z.ZodType< - GetLatestSyncRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), -}); - /** @internal */ export type GetLatestSyncRequest$Outbound = { companyId: string; @@ -37,19 +25,6 @@ export const GetLatestSyncRequest$outboundSchema: z.ZodType< companyId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetLatestSyncRequest$ { - /** @deprecated use `GetLatestSyncRequest$inboundSchema` instead. */ - export const inboundSchema = GetLatestSyncRequest$inboundSchema; - /** @deprecated use `GetLatestSyncRequest$outboundSchema` instead. */ - export const outboundSchema = GetLatestSyncRequest$outboundSchema; - /** @deprecated use `GetLatestSyncRequest$Outbound` instead. */ - export type Outbound = GetLatestSyncRequest$Outbound; -} - export function getLatestSyncRequestToJSON( getLatestSyncRequest: GetLatestSyncRequest, ): string { @@ -57,13 +32,3 @@ export function getLatestSyncRequestToJSON( GetLatestSyncRequest$outboundSchema.parse(getLatestSyncRequest), ); } - -export function getLatestSyncRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetLatestSyncRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetLatestSyncRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/getmappingoptions.ts b/sync-for-expenses/src/sdk/models/operations/getmappingoptions.ts index 822bd02f8..8a198d5ad 100644 --- a/sync-for-expenses/src/sdk/models/operations/getmappingoptions.ts +++ b/sync-for-expenses/src/sdk/models/operations/getmappingoptions.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type GetMappingOptionsRequest = { /** @@ -14,15 +11,6 @@ export type GetMappingOptionsRequest = { companyId: string; }; -/** @internal */ -export const GetMappingOptionsRequest$inboundSchema: z.ZodType< - GetMappingOptionsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), -}); - /** @internal */ export type GetMappingOptionsRequest$Outbound = { companyId: string; @@ -37,19 +25,6 @@ export const GetMappingOptionsRequest$outboundSchema: z.ZodType< companyId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetMappingOptionsRequest$ { - /** @deprecated use `GetMappingOptionsRequest$inboundSchema` instead. */ - export const inboundSchema = GetMappingOptionsRequest$inboundSchema; - /** @deprecated use `GetMappingOptionsRequest$outboundSchema` instead. */ - export const outboundSchema = GetMappingOptionsRequest$outboundSchema; - /** @deprecated use `GetMappingOptionsRequest$Outbound` instead. */ - export type Outbound = GetMappingOptionsRequest$Outbound; -} - export function getMappingOptionsRequestToJSON( getMappingOptionsRequest: GetMappingOptionsRequest, ): string { @@ -57,13 +32,3 @@ export function getMappingOptionsRequestToJSON( GetMappingOptionsRequest$outboundSchema.parse(getMappingOptionsRequest), ); } - -export function getMappingOptionsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetMappingOptionsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetMappingOptionsRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/getpulloperation.ts b/sync-for-expenses/src/sdk/models/operations/getpulloperation.ts index 3c50ac5fd..2df9079da 100644 --- a/sync-for-expenses/src/sdk/models/operations/getpulloperation.ts +++ b/sync-for-expenses/src/sdk/models/operations/getpulloperation.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type GetPullOperationRequest = { /** @@ -18,16 +15,6 @@ export type GetPullOperationRequest = { datasetId: string; }; -/** @internal */ -export const GetPullOperationRequest$inboundSchema: z.ZodType< - GetPullOperationRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - datasetId: z.string(), -}); - /** @internal */ export type GetPullOperationRequest$Outbound = { companyId: string; @@ -44,19 +31,6 @@ export const GetPullOperationRequest$outboundSchema: z.ZodType< datasetId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetPullOperationRequest$ { - /** @deprecated use `GetPullOperationRequest$inboundSchema` instead. */ - export const inboundSchema = GetPullOperationRequest$inboundSchema; - /** @deprecated use `GetPullOperationRequest$outboundSchema` instead. */ - export const outboundSchema = GetPullOperationRequest$outboundSchema; - /** @deprecated use `GetPullOperationRequest$Outbound` instead. */ - export type Outbound = GetPullOperationRequest$Outbound; -} - export function getPullOperationRequestToJSON( getPullOperationRequest: GetPullOperationRequest, ): string { @@ -64,13 +38,3 @@ export function getPullOperationRequestToJSON( GetPullOperationRequest$outboundSchema.parse(getPullOperationRequest), ); } - -export function getPullOperationRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetPullOperationRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetPullOperationRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/getpushoperation.ts b/sync-for-expenses/src/sdk/models/operations/getpushoperation.ts index 174ea3f09..3a950624c 100644 --- a/sync-for-expenses/src/sdk/models/operations/getpushoperation.ts +++ b/sync-for-expenses/src/sdk/models/operations/getpushoperation.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type GetPushOperationRequest = { /** @@ -18,16 +15,6 @@ export type GetPushOperationRequest = { pushOperationKey: string; }; -/** @internal */ -export const GetPushOperationRequest$inboundSchema: z.ZodType< - GetPushOperationRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - pushOperationKey: z.string(), -}); - /** @internal */ export type GetPushOperationRequest$Outbound = { companyId: string; @@ -44,19 +31,6 @@ export const GetPushOperationRequest$outboundSchema: z.ZodType< pushOperationKey: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetPushOperationRequest$ { - /** @deprecated use `GetPushOperationRequest$inboundSchema` instead. */ - export const inboundSchema = GetPushOperationRequest$inboundSchema; - /** @deprecated use `GetPushOperationRequest$outboundSchema` instead. */ - export const outboundSchema = GetPushOperationRequest$outboundSchema; - /** @deprecated use `GetPushOperationRequest$Outbound` instead. */ - export type Outbound = GetPushOperationRequest$Outbound; -} - export function getPushOperationRequestToJSON( getPushOperationRequest: GetPushOperationRequest, ): string { @@ -64,13 +38,3 @@ export function getPushOperationRequestToJSON( GetPushOperationRequest$outboundSchema.parse(getPushOperationRequest), ); } - -export function getPushOperationRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetPushOperationRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetPushOperationRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/getsupplier.ts b/sync-for-expenses/src/sdk/models/operations/getsupplier.ts index d143d0f12..6b849a6cd 100644 --- a/sync-for-expenses/src/sdk/models/operations/getsupplier.ts +++ b/sync-for-expenses/src/sdk/models/operations/getsupplier.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type GetSupplierRequest = { /** @@ -18,16 +15,6 @@ export type GetSupplierRequest = { supplierId: string; }; -/** @internal */ -export const GetSupplierRequest$inboundSchema: z.ZodType< - GetSupplierRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - supplierId: z.string(), -}); - /** @internal */ export type GetSupplierRequest$Outbound = { companyId: string; @@ -44,19 +31,6 @@ export const GetSupplierRequest$outboundSchema: z.ZodType< supplierId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetSupplierRequest$ { - /** @deprecated use `GetSupplierRequest$inboundSchema` instead. */ - export const inboundSchema = GetSupplierRequest$inboundSchema; - /** @deprecated use `GetSupplierRequest$outboundSchema` instead. */ - export const outboundSchema = GetSupplierRequest$outboundSchema; - /** @deprecated use `GetSupplierRequest$Outbound` instead. */ - export type Outbound = GetSupplierRequest$Outbound; -} - export function getSupplierRequestToJSON( getSupplierRequest: GetSupplierRequest, ): string { @@ -64,13 +38,3 @@ export function getSupplierRequestToJSON( GetSupplierRequest$outboundSchema.parse(getSupplierRequest), ); } - -export function getSupplierRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetSupplierRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSupplierRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/getsyncbyid.ts b/sync-for-expenses/src/sdk/models/operations/getsyncbyid.ts index 2c7373fe2..9b31d1939 100644 --- a/sync-for-expenses/src/sdk/models/operations/getsyncbyid.ts +++ b/sync-for-expenses/src/sdk/models/operations/getsyncbyid.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type GetSyncByIdRequest = { /** @@ -18,16 +15,6 @@ export type GetSyncByIdRequest = { syncId: string; }; -/** @internal */ -export const GetSyncByIdRequest$inboundSchema: z.ZodType< - GetSyncByIdRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - syncId: z.string(), -}); - /** @internal */ export type GetSyncByIdRequest$Outbound = { companyId: string; @@ -44,19 +31,6 @@ export const GetSyncByIdRequest$outboundSchema: z.ZodType< syncId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetSyncByIdRequest$ { - /** @deprecated use `GetSyncByIdRequest$inboundSchema` instead. */ - export const inboundSchema = GetSyncByIdRequest$inboundSchema; - /** @deprecated use `GetSyncByIdRequest$outboundSchema` instead. */ - export const outboundSchema = GetSyncByIdRequest$outboundSchema; - /** @deprecated use `GetSyncByIdRequest$Outbound` instead. */ - export type Outbound = GetSyncByIdRequest$Outbound; -} - export function getSyncByIdRequestToJSON( getSyncByIdRequest: GetSyncByIdRequest, ): string { @@ -64,13 +38,3 @@ export function getSyncByIdRequestToJSON( GetSyncByIdRequest$outboundSchema.parse(getSyncByIdRequest), ); } - -export function getSyncByIdRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetSyncByIdRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSyncByIdRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/getsynctransaction.ts b/sync-for-expenses/src/sdk/models/operations/getsynctransaction.ts index 238600c14..0f6f9b131 100644 --- a/sync-for-expenses/src/sdk/models/operations/getsynctransaction.ts +++ b/sync-for-expenses/src/sdk/models/operations/getsynctransaction.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type GetSyncTransactionRequest = { /** @@ -22,17 +19,6 @@ export type GetSyncTransactionRequest = { transactionId: string; }; -/** @internal */ -export const GetSyncTransactionRequest$inboundSchema: z.ZodType< - GetSyncTransactionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - syncId: z.string(), - transactionId: z.string(), -}); - /** @internal */ export type GetSyncTransactionRequest$Outbound = { companyId: string; @@ -51,19 +37,6 @@ export const GetSyncTransactionRequest$outboundSchema: z.ZodType< transactionId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetSyncTransactionRequest$ { - /** @deprecated use `GetSyncTransactionRequest$inboundSchema` instead. */ - export const inboundSchema = GetSyncTransactionRequest$inboundSchema; - /** @deprecated use `GetSyncTransactionRequest$outboundSchema` instead. */ - export const outboundSchema = GetSyncTransactionRequest$outboundSchema; - /** @deprecated use `GetSyncTransactionRequest$Outbound` instead. */ - export type Outbound = GetSyncTransactionRequest$Outbound; -} - export function getSyncTransactionRequestToJSON( getSyncTransactionRequest: GetSyncTransactionRequest, ): string { @@ -71,13 +44,3 @@ export function getSyncTransactionRequestToJSON( GetSyncTransactionRequest$outboundSchema.parse(getSyncTransactionRequest), ); } - -export function getSyncTransactionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetSyncTransactionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetSyncTransactionRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/index.ts b/sync-for-expenses/src/sdk/models/operations/index.ts index 8c8a4f02c..41dbedfe6 100644 --- a/sync-for-expenses/src/sdk/models/operations/index.ts +++ b/sync-for-expenses/src/sdk/models/operations/index.ts @@ -40,6 +40,7 @@ export * from "./listsyncs.js"; export * from "./listsynctransactions.js"; export * from "./refreshalldatatypes.js"; export * from "./refreshdatatype.js"; +export * from "./replacecompany.js"; export * from "./setcompanyconfiguration.js"; export * from "./unlinkconnection.js"; export * from "./updatecompany.js"; diff --git a/sync-for-expenses/src/sdk/models/operations/listcompanies.ts b/sync-for-expenses/src/sdk/models/operations/listcompanies.ts index 95bf0265c..837a6aae5 100644 --- a/sync-for-expenses/src/sdk/models/operations/listcompanies.ts +++ b/sync-for-expenses/src/sdk/models/operations/listcompanies.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type ListCompaniesRequest = { /** @@ -24,26 +21,19 @@ export type ListCompaniesRequest = { * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). */ orderBy?: string | undefined; + /** + * Filter companies by tags using the "equals" (=), "not equals" (!=), and "contains" (~) operators with [Codat’s query language](https://docs.codat.io/using-the-api/querying). + */ + tags?: string | undefined; }; -/** @internal */ -export const ListCompaniesRequest$inboundSchema: z.ZodType< - ListCompaniesRequest, - z.ZodTypeDef, - unknown -> = z.object({ - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - /** @internal */ export type ListCompaniesRequest$Outbound = { page: number; pageSize: number; query?: string | undefined; orderBy?: string | undefined; + tags?: string | undefined; }; /** @internal */ @@ -56,21 +46,9 @@ export const ListCompaniesRequest$outboundSchema: z.ZodType< pageSize: z.number().int().default(100), query: z.string().optional(), orderBy: z.string().optional(), + tags: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListCompaniesRequest$ { - /** @deprecated use `ListCompaniesRequest$inboundSchema` instead. */ - export const inboundSchema = ListCompaniesRequest$inboundSchema; - /** @deprecated use `ListCompaniesRequest$outboundSchema` instead. */ - export const outboundSchema = ListCompaniesRequest$outboundSchema; - /** @deprecated use `ListCompaniesRequest$Outbound` instead. */ - export type Outbound = ListCompaniesRequest$Outbound; -} - export function listCompaniesRequestToJSON( listCompaniesRequest: ListCompaniesRequest, ): string { @@ -78,13 +56,3 @@ export function listCompaniesRequestToJSON( ListCompaniesRequest$outboundSchema.parse(listCompaniesRequest), ); } - -export function listCompaniesRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListCompaniesRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListCompaniesRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/listconnections.ts b/sync-for-expenses/src/sdk/models/operations/listconnections.ts index 7fe54afef..d1be0d942 100644 --- a/sync-for-expenses/src/sdk/models/operations/listconnections.ts +++ b/sync-for-expenses/src/sdk/models/operations/listconnections.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type ListConnectionsRequest = { /** @@ -30,19 +27,6 @@ export type ListConnectionsRequest = { orderBy?: string | undefined; }; -/** @internal */ -export const ListConnectionsRequest$inboundSchema: z.ZodType< - ListConnectionsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - /** @internal */ export type ListConnectionsRequest$Outbound = { companyId: string; @@ -65,19 +49,6 @@ export const ListConnectionsRequest$outboundSchema: z.ZodType< orderBy: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListConnectionsRequest$ { - /** @deprecated use `ListConnectionsRequest$inboundSchema` instead. */ - export const inboundSchema = ListConnectionsRequest$inboundSchema; - /** @deprecated use `ListConnectionsRequest$outboundSchema` instead. */ - export const outboundSchema = ListConnectionsRequest$outboundSchema; - /** @deprecated use `ListConnectionsRequest$Outbound` instead. */ - export type Outbound = ListConnectionsRequest$Outbound; -} - export function listConnectionsRequestToJSON( listConnectionsRequest: ListConnectionsRequest, ): string { @@ -85,13 +56,3 @@ export function listConnectionsRequestToJSON( ListConnectionsRequest$outboundSchema.parse(listConnectionsRequest), ); } - -export function listConnectionsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListConnectionsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListConnectionsRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/listcustomers.ts b/sync-for-expenses/src/sdk/models/operations/listcustomers.ts index 452972639..df64364b9 100644 --- a/sync-for-expenses/src/sdk/models/operations/listcustomers.ts +++ b/sync-for-expenses/src/sdk/models/operations/listcustomers.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type ListCustomersRequest = { /** @@ -30,19 +27,6 @@ export type ListCustomersRequest = { orderBy?: string | undefined; }; -/** @internal */ -export const ListCustomersRequest$inboundSchema: z.ZodType< - ListCustomersRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - /** @internal */ export type ListCustomersRequest$Outbound = { companyId: string; @@ -65,19 +49,6 @@ export const ListCustomersRequest$outboundSchema: z.ZodType< orderBy: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListCustomersRequest$ { - /** @deprecated use `ListCustomersRequest$inboundSchema` instead. */ - export const inboundSchema = ListCustomersRequest$inboundSchema; - /** @deprecated use `ListCustomersRequest$outboundSchema` instead. */ - export const outboundSchema = ListCustomersRequest$outboundSchema; - /** @deprecated use `ListCustomersRequest$Outbound` instead. */ - export type Outbound = ListCustomersRequest$Outbound; -} - export function listCustomersRequestToJSON( listCustomersRequest: ListCustomersRequest, ): string { @@ -85,13 +56,3 @@ export function listCustomersRequestToJSON( ListCustomersRequest$outboundSchema.parse(listCustomersRequest), ); } - -export function listCustomersRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListCustomersRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListCustomersRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/listpulloperations.ts b/sync-for-expenses/src/sdk/models/operations/listpulloperations.ts index f178ec22f..d12f7bd86 100644 --- a/sync-for-expenses/src/sdk/models/operations/listpulloperations.ts +++ b/sync-for-expenses/src/sdk/models/operations/listpulloperations.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type ListPullOperationsRequest = { /** @@ -30,19 +27,6 @@ export type ListPullOperationsRequest = { orderBy?: string | undefined; }; -/** @internal */ -export const ListPullOperationsRequest$inboundSchema: z.ZodType< - ListPullOperationsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - /** @internal */ export type ListPullOperationsRequest$Outbound = { companyId: string; @@ -65,19 +49,6 @@ export const ListPullOperationsRequest$outboundSchema: z.ZodType< orderBy: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListPullOperationsRequest$ { - /** @deprecated use `ListPullOperationsRequest$inboundSchema` instead. */ - export const inboundSchema = ListPullOperationsRequest$inboundSchema; - /** @deprecated use `ListPullOperationsRequest$outboundSchema` instead. */ - export const outboundSchema = ListPullOperationsRequest$outboundSchema; - /** @deprecated use `ListPullOperationsRequest$Outbound` instead. */ - export type Outbound = ListPullOperationsRequest$Outbound; -} - export function listPullOperationsRequestToJSON( listPullOperationsRequest: ListPullOperationsRequest, ): string { @@ -85,13 +56,3 @@ export function listPullOperationsRequestToJSON( ListPullOperationsRequest$outboundSchema.parse(listPullOperationsRequest), ); } - -export function listPullOperationsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListPullOperationsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListPullOperationsRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/listpushoperations.ts b/sync-for-expenses/src/sdk/models/operations/listpushoperations.ts index a5a15f471..f46177956 100644 --- a/sync-for-expenses/src/sdk/models/operations/listpushoperations.ts +++ b/sync-for-expenses/src/sdk/models/operations/listpushoperations.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type ListPushOperationsRequest = { /** @@ -30,19 +27,6 @@ export type ListPushOperationsRequest = { orderBy?: string | undefined; }; -/** @internal */ -export const ListPushOperationsRequest$inboundSchema: z.ZodType< - ListPushOperationsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - /** @internal */ export type ListPushOperationsRequest$Outbound = { companyId: string; @@ -65,19 +49,6 @@ export const ListPushOperationsRequest$outboundSchema: z.ZodType< orderBy: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListPushOperationsRequest$ { - /** @deprecated use `ListPushOperationsRequest$inboundSchema` instead. */ - export const inboundSchema = ListPushOperationsRequest$inboundSchema; - /** @deprecated use `ListPushOperationsRequest$outboundSchema` instead. */ - export const outboundSchema = ListPushOperationsRequest$outboundSchema; - /** @deprecated use `ListPushOperationsRequest$Outbound` instead. */ - export type Outbound = ListPushOperationsRequest$Outbound; -} - export function listPushOperationsRequestToJSON( listPushOperationsRequest: ListPushOperationsRequest, ): string { @@ -85,13 +56,3 @@ export function listPushOperationsRequestToJSON( ListPushOperationsRequest$outboundSchema.parse(listPushOperationsRequest), ); } - -export function listPushOperationsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListPushOperationsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListPushOperationsRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/listsuppliers.ts b/sync-for-expenses/src/sdk/models/operations/listsuppliers.ts index 70f82c48b..0b72b9ddc 100644 --- a/sync-for-expenses/src/sdk/models/operations/listsuppliers.ts +++ b/sync-for-expenses/src/sdk/models/operations/listsuppliers.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type ListSuppliersRequest = { /** @@ -30,19 +27,6 @@ export type ListSuppliersRequest = { orderBy?: string | undefined; }; -/** @internal */ -export const ListSuppliersRequest$inboundSchema: z.ZodType< - ListSuppliersRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), - query: z.string().optional(), - orderBy: z.string().optional(), -}); - /** @internal */ export type ListSuppliersRequest$Outbound = { companyId: string; @@ -65,19 +49,6 @@ export const ListSuppliersRequest$outboundSchema: z.ZodType< orderBy: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListSuppliersRequest$ { - /** @deprecated use `ListSuppliersRequest$inboundSchema` instead. */ - export const inboundSchema = ListSuppliersRequest$inboundSchema; - /** @deprecated use `ListSuppliersRequest$outboundSchema` instead. */ - export const outboundSchema = ListSuppliersRequest$outboundSchema; - /** @deprecated use `ListSuppliersRequest$Outbound` instead. */ - export type Outbound = ListSuppliersRequest$Outbound; -} - export function listSuppliersRequestToJSON( listSuppliersRequest: ListSuppliersRequest, ): string { @@ -85,13 +56,3 @@ export function listSuppliersRequestToJSON( ListSuppliersRequest$outboundSchema.parse(listSuppliersRequest), ); } - -export function listSuppliersRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListSuppliersRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListSuppliersRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/listsyncs.ts b/sync-for-expenses/src/sdk/models/operations/listsyncs.ts index 1ab884290..0fd0f5150 100644 --- a/sync-for-expenses/src/sdk/models/operations/listsyncs.ts +++ b/sync-for-expenses/src/sdk/models/operations/listsyncs.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type ListSyncsRequest = { /** @@ -14,15 +11,6 @@ export type ListSyncsRequest = { companyId: string; }; -/** @internal */ -export const ListSyncsRequest$inboundSchema: z.ZodType< - ListSyncsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), -}); - /** @internal */ export type ListSyncsRequest$Outbound = { companyId: string; @@ -37,19 +25,6 @@ export const ListSyncsRequest$outboundSchema: z.ZodType< companyId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListSyncsRequest$ { - /** @deprecated use `ListSyncsRequest$inboundSchema` instead. */ - export const inboundSchema = ListSyncsRequest$inboundSchema; - /** @deprecated use `ListSyncsRequest$outboundSchema` instead. */ - export const outboundSchema = ListSyncsRequest$outboundSchema; - /** @deprecated use `ListSyncsRequest$Outbound` instead. */ - export type Outbound = ListSyncsRequest$Outbound; -} - export function listSyncsRequestToJSON( listSyncsRequest: ListSyncsRequest, ): string { @@ -57,13 +32,3 @@ export function listSyncsRequestToJSON( ListSyncsRequest$outboundSchema.parse(listSyncsRequest), ); } - -export function listSyncsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListSyncsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListSyncsRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/listsynctransactions.ts b/sync-for-expenses/src/sdk/models/operations/listsynctransactions.ts index 2aab7b572..1023458ab 100644 --- a/sync-for-expenses/src/sdk/models/operations/listsynctransactions.ts +++ b/sync-for-expenses/src/sdk/models/operations/listsynctransactions.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type ListSyncTransactionsRequest = { /** @@ -26,18 +23,6 @@ export type ListSyncTransactionsRequest = { pageSize?: number | undefined; }; -/** @internal */ -export const ListSyncTransactionsRequest$inboundSchema: z.ZodType< - ListSyncTransactionsRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - syncId: z.string(), - page: z.number().int().default(1), - pageSize: z.number().int().default(100), -}); - /** @internal */ export type ListSyncTransactionsRequest$Outbound = { companyId: string; @@ -58,19 +43,6 @@ export const ListSyncTransactionsRequest$outboundSchema: z.ZodType< pageSize: z.number().int().default(100), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListSyncTransactionsRequest$ { - /** @deprecated use `ListSyncTransactionsRequest$inboundSchema` instead. */ - export const inboundSchema = ListSyncTransactionsRequest$inboundSchema; - /** @deprecated use `ListSyncTransactionsRequest$outboundSchema` instead. */ - export const outboundSchema = ListSyncTransactionsRequest$outboundSchema; - /** @deprecated use `ListSyncTransactionsRequest$Outbound` instead. */ - export type Outbound = ListSyncTransactionsRequest$Outbound; -} - export function listSyncTransactionsRequestToJSON( listSyncTransactionsRequest: ListSyncTransactionsRequest, ): string { @@ -80,13 +52,3 @@ export function listSyncTransactionsRequestToJSON( ), ); } - -export function listSyncTransactionsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListSyncTransactionsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListSyncTransactionsRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/refreshalldatatypes.ts b/sync-for-expenses/src/sdk/models/operations/refreshalldatatypes.ts index a186ae8e9..de184ca9a 100644 --- a/sync-for-expenses/src/sdk/models/operations/refreshalldatatypes.ts +++ b/sync-for-expenses/src/sdk/models/operations/refreshalldatatypes.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type RefreshAllDataTypesRequest = { /** @@ -14,15 +11,6 @@ export type RefreshAllDataTypesRequest = { companyId: string; }; -/** @internal */ -export const RefreshAllDataTypesRequest$inboundSchema: z.ZodType< - RefreshAllDataTypesRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), -}); - /** @internal */ export type RefreshAllDataTypesRequest$Outbound = { companyId: string; @@ -37,19 +25,6 @@ export const RefreshAllDataTypesRequest$outboundSchema: z.ZodType< companyId: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RefreshAllDataTypesRequest$ { - /** @deprecated use `RefreshAllDataTypesRequest$inboundSchema` instead. */ - export const inboundSchema = RefreshAllDataTypesRequest$inboundSchema; - /** @deprecated use `RefreshAllDataTypesRequest$outboundSchema` instead. */ - export const outboundSchema = RefreshAllDataTypesRequest$outboundSchema; - /** @deprecated use `RefreshAllDataTypesRequest$Outbound` instead. */ - export type Outbound = RefreshAllDataTypesRequest$Outbound; -} - export function refreshAllDataTypesRequestToJSON( refreshAllDataTypesRequest: RefreshAllDataTypesRequest, ): string { @@ -57,13 +32,3 @@ export function refreshAllDataTypesRequestToJSON( RefreshAllDataTypesRequest$outboundSchema.parse(refreshAllDataTypesRequest), ); } - -export function refreshAllDataTypesRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => RefreshAllDataTypesRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RefreshAllDataTypesRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/refreshdatatype.ts b/sync-for-expenses/src/sdk/models/operations/refreshdatatype.ts index 0a1c2ff5a..6b357ce88 100644 --- a/sync-for-expenses/src/sdk/models/operations/refreshdatatype.ts +++ b/sync-for-expenses/src/sdk/models/operations/refreshdatatype.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; import * as shared from "../shared/index.js"; export type RefreshDataTypeRequest = { @@ -23,17 +20,6 @@ export type RefreshDataTypeRequest = { connectionId?: string | undefined; }; -/** @internal */ -export const RefreshDataTypeRequest$inboundSchema: z.ZodType< - RefreshDataTypeRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - dataType: shared.DataType$inboundSchema, - connectionId: z.string().optional(), -}); - /** @internal */ export type RefreshDataTypeRequest$Outbound = { companyId: string; @@ -52,19 +38,6 @@ export const RefreshDataTypeRequest$outboundSchema: z.ZodType< connectionId: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RefreshDataTypeRequest$ { - /** @deprecated use `RefreshDataTypeRequest$inboundSchema` instead. */ - export const inboundSchema = RefreshDataTypeRequest$inboundSchema; - /** @deprecated use `RefreshDataTypeRequest$outboundSchema` instead. */ - export const outboundSchema = RefreshDataTypeRequest$outboundSchema; - /** @deprecated use `RefreshDataTypeRequest$Outbound` instead. */ - export type Outbound = RefreshDataTypeRequest$Outbound; -} - export function refreshDataTypeRequestToJSON( refreshDataTypeRequest: RefreshDataTypeRequest, ): string { @@ -72,13 +45,3 @@ export function refreshDataTypeRequestToJSON( RefreshDataTypeRequest$outboundSchema.parse(refreshDataTypeRequest), ); } - -export function refreshDataTypeRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => RefreshDataTypeRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RefreshDataTypeRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/replacecompany.ts b/sync-for-expenses/src/sdk/models/operations/replacecompany.ts new file mode 100644 index 000000000..5ee35551d --- /dev/null +++ b/sync-for-expenses/src/sdk/models/operations/replacecompany.ts @@ -0,0 +1,43 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import * as shared from "../shared/index.js"; + +export type ReplaceCompanyRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + companyRequestBody?: shared.CompanyRequestBody | undefined; +}; + +/** @internal */ +export type ReplaceCompanyRequest$Outbound = { + companyId: string; + CompanyRequestBody?: shared.CompanyRequestBody$Outbound | undefined; +}; + +/** @internal */ +export const ReplaceCompanyRequest$outboundSchema: z.ZodType< + ReplaceCompanyRequest$Outbound, + z.ZodTypeDef, + ReplaceCompanyRequest +> = z.object({ + companyId: z.string(), + companyRequestBody: shared.CompanyRequestBody$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + companyRequestBody: "CompanyRequestBody", + }); +}); + +export function replaceCompanyRequestToJSON( + replaceCompanyRequest: ReplaceCompanyRequest, +): string { + return JSON.stringify( + ReplaceCompanyRequest$outboundSchema.parse(replaceCompanyRequest), + ); +} diff --git a/sync-for-expenses/src/sdk/models/operations/setcompanyconfiguration.ts b/sync-for-expenses/src/sdk/models/operations/setcompanyconfiguration.ts index 1978ea78a..6040c8b7c 100644 --- a/sync-for-expenses/src/sdk/models/operations/setcompanyconfiguration.ts +++ b/sync-for-expenses/src/sdk/models/operations/setcompanyconfiguration.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as shared from "../shared/index.js"; export type SetCompanyConfigurationRequest = { @@ -17,20 +14,6 @@ export type SetCompanyConfigurationRequest = { companyConfiguration?: shared.CompanyConfiguration | undefined; }; -/** @internal */ -export const SetCompanyConfigurationRequest$inboundSchema: z.ZodType< - SetCompanyConfigurationRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - CompanyConfiguration: shared.CompanyConfiguration$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "CompanyConfiguration": "companyConfiguration", - }); -}); - /** @internal */ export type SetCompanyConfigurationRequest$Outbound = { companyId: string; @@ -51,19 +34,6 @@ export const SetCompanyConfigurationRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SetCompanyConfigurationRequest$ { - /** @deprecated use `SetCompanyConfigurationRequest$inboundSchema` instead. */ - export const inboundSchema = SetCompanyConfigurationRequest$inboundSchema; - /** @deprecated use `SetCompanyConfigurationRequest$outboundSchema` instead. */ - export const outboundSchema = SetCompanyConfigurationRequest$outboundSchema; - /** @deprecated use `SetCompanyConfigurationRequest$Outbound` instead. */ - export type Outbound = SetCompanyConfigurationRequest$Outbound; -} - export function setCompanyConfigurationRequestToJSON( setCompanyConfigurationRequest: SetCompanyConfigurationRequest, ): string { @@ -73,13 +43,3 @@ export function setCompanyConfigurationRequestToJSON( ), ); } - -export function setCompanyConfigurationRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => SetCompanyConfigurationRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SetCompanyConfigurationRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/unlinkconnection.ts b/sync-for-expenses/src/sdk/models/operations/unlinkconnection.ts index 4b4c9bb4b..dbdba4a38 100644 --- a/sync-for-expenses/src/sdk/models/operations/unlinkconnection.ts +++ b/sync-for-expenses/src/sdk/models/operations/unlinkconnection.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as shared from "../shared/index.js"; export type UnlinkConnectionUpdateConnection = { @@ -28,15 +25,6 @@ export type UnlinkConnectionRequest = { requestBody?: UnlinkConnectionUpdateConnection | undefined; }; -/** @internal */ -export const UnlinkConnectionUpdateConnection$inboundSchema: z.ZodType< - UnlinkConnectionUpdateConnection, - z.ZodTypeDef, - unknown -> = z.object({ - status: shared.DataConnectionStatus$inboundSchema.optional(), -}); - /** @internal */ export type UnlinkConnectionUpdateConnection$Outbound = { status?: string | undefined; @@ -51,19 +39,6 @@ export const UnlinkConnectionUpdateConnection$outboundSchema: z.ZodType< status: shared.DataConnectionStatus$outboundSchema.optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UnlinkConnectionUpdateConnection$ { - /** @deprecated use `UnlinkConnectionUpdateConnection$inboundSchema` instead. */ - export const inboundSchema = UnlinkConnectionUpdateConnection$inboundSchema; - /** @deprecated use `UnlinkConnectionUpdateConnection$outboundSchema` instead. */ - export const outboundSchema = UnlinkConnectionUpdateConnection$outboundSchema; - /** @deprecated use `UnlinkConnectionUpdateConnection$Outbound` instead. */ - export type Outbound = UnlinkConnectionUpdateConnection$Outbound; -} - export function unlinkConnectionUpdateConnectionToJSON( unlinkConnectionUpdateConnection: UnlinkConnectionUpdateConnection, ): string { @@ -74,32 +49,6 @@ export function unlinkConnectionUpdateConnectionToJSON( ); } -export function unlinkConnectionUpdateConnectionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UnlinkConnectionUpdateConnection$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UnlinkConnectionUpdateConnection' from JSON`, - ); -} - -/** @internal */ -export const UnlinkConnectionRequest$inboundSchema: z.ZodType< - UnlinkConnectionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - RequestBody: z.lazy(() => UnlinkConnectionUpdateConnection$inboundSchema) - .optional(), -}).transform((v) => { - return remap$(v, { - "RequestBody": "requestBody", - }); -}); - /** @internal */ export type UnlinkConnectionRequest$Outbound = { companyId: string; @@ -123,19 +72,6 @@ export const UnlinkConnectionRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UnlinkConnectionRequest$ { - /** @deprecated use `UnlinkConnectionRequest$inboundSchema` instead. */ - export const inboundSchema = UnlinkConnectionRequest$inboundSchema; - /** @deprecated use `UnlinkConnectionRequest$outboundSchema` instead. */ - export const outboundSchema = UnlinkConnectionRequest$outboundSchema; - /** @deprecated use `UnlinkConnectionRequest$Outbound` instead. */ - export type Outbound = UnlinkConnectionRequest$Outbound; -} - export function unlinkConnectionRequestToJSON( unlinkConnectionRequest: UnlinkConnectionRequest, ): string { @@ -143,13 +79,3 @@ export function unlinkConnectionRequestToJSON( UnlinkConnectionRequest$outboundSchema.parse(unlinkConnectionRequest), ); } - -export function unlinkConnectionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UnlinkConnectionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UnlinkConnectionRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/updatecompany.ts b/sync-for-expenses/src/sdk/models/operations/updatecompany.ts index 80a6e7a39..37ead4428 100644 --- a/sync-for-expenses/src/sdk/models/operations/updatecompany.ts +++ b/sync-for-expenses/src/sdk/models/operations/updatecompany.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as shared from "../shared/index.js"; export type UpdateCompanyRequest = { @@ -14,27 +11,13 @@ export type UpdateCompanyRequest = { * Unique identifier for a company. */ companyId: string; - companyRequestBody?: shared.CompanyRequestBody | undefined; + companyUpdateRequest?: shared.CompanyUpdateRequest | undefined; }; -/** @internal */ -export const UpdateCompanyRequest$inboundSchema: z.ZodType< - UpdateCompanyRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - CompanyRequestBody: shared.CompanyRequestBody$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "CompanyRequestBody": "companyRequestBody", - }); -}); - /** @internal */ export type UpdateCompanyRequest$Outbound = { companyId: string; - CompanyRequestBody?: shared.CompanyRequestBody$Outbound | undefined; + CompanyUpdateRequest?: shared.CompanyUpdateRequest$Outbound | undefined; }; /** @internal */ @@ -44,26 +27,13 @@ export const UpdateCompanyRequest$outboundSchema: z.ZodType< UpdateCompanyRequest > = z.object({ companyId: z.string(), - companyRequestBody: shared.CompanyRequestBody$outboundSchema.optional(), + companyUpdateRequest: shared.CompanyUpdateRequest$outboundSchema.optional(), }).transform((v) => { return remap$(v, { - companyRequestBody: "CompanyRequestBody", + companyUpdateRequest: "CompanyUpdateRequest", }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateCompanyRequest$ { - /** @deprecated use `UpdateCompanyRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateCompanyRequest$inboundSchema; - /** @deprecated use `UpdateCompanyRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateCompanyRequest$outboundSchema; - /** @deprecated use `UpdateCompanyRequest$Outbound` instead. */ - export type Outbound = UpdateCompanyRequest$Outbound; -} - export function updateCompanyRequestToJSON( updateCompanyRequest: UpdateCompanyRequest, ): string { @@ -71,13 +41,3 @@ export function updateCompanyRequestToJSON( UpdateCompanyRequest$outboundSchema.parse(updateCompanyRequest), ); } - -export function updateCompanyRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateCompanyRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateCompanyRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/updatecustomer.ts b/sync-for-expenses/src/sdk/models/operations/updatecustomer.ts index da80fbda7..04698340a 100644 --- a/sync-for-expenses/src/sdk/models/operations/updatecustomer.ts +++ b/sync-for-expenses/src/sdk/models/operations/updatecustomer.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as shared from "../shared/index.js"; export type UpdateCustomerRequest = { @@ -37,25 +34,6 @@ export type UpdateCustomerRequest = { customer?: shared.Customer | null | undefined; }; -/** @internal */ -export const UpdateCustomerRequest$inboundSchema: z.ZodType< - UpdateCustomerRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - customerId: z.string(), - timeoutInMinutes: z.number().int().optional(), - allowSyncOnPushComplete: z.boolean().default(true), - forceUpdate: z.boolean().default(false), - Customer: z.nullable(shared.Customer$inboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - "Customer": "customer", - }); -}); - /** @internal */ export type UpdateCustomerRequest$Outbound = { companyId: string; @@ -86,19 +64,6 @@ export const UpdateCustomerRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateCustomerRequest$ { - /** @deprecated use `UpdateCustomerRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateCustomerRequest$inboundSchema; - /** @deprecated use `UpdateCustomerRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateCustomerRequest$outboundSchema; - /** @deprecated use `UpdateCustomerRequest$Outbound` instead. */ - export type Outbound = UpdateCustomerRequest$Outbound; -} - export function updateCustomerRequestToJSON( updateCustomerRequest: UpdateCustomerRequest, ): string { @@ -106,13 +71,3 @@ export function updateCustomerRequestToJSON( UpdateCustomerRequest$outboundSchema.parse(updateCustomerRequest), ); } - -export function updateCustomerRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateCustomerRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateCustomerRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/updateexpensetransaction.ts b/sync-for-expenses/src/sdk/models/operations/updateexpensetransaction.ts index 55c0f026e..4e1347a02 100644 --- a/sync-for-expenses/src/sdk/models/operations/updateexpensetransaction.ts +++ b/sync-for-expenses/src/sdk/models/operations/updateexpensetransaction.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as shared from "../shared/index.js"; export type UpdateExpenseTransactionRequest = { @@ -21,21 +18,6 @@ export type UpdateExpenseTransactionRequest = { updateExpenseRequest?: shared.UpdateExpenseRequest | undefined; }; -/** @internal */ -export const UpdateExpenseTransactionRequest$inboundSchema: z.ZodType< - UpdateExpenseTransactionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - transactionId: z.string(), - UpdateExpenseRequest: shared.UpdateExpenseRequest$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "UpdateExpenseRequest": "updateExpenseRequest", - }); -}); - /** @internal */ export type UpdateExpenseTransactionRequest$Outbound = { companyId: string; @@ -58,19 +40,6 @@ export const UpdateExpenseTransactionRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateExpenseTransactionRequest$ { - /** @deprecated use `UpdateExpenseTransactionRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateExpenseTransactionRequest$inboundSchema; - /** @deprecated use `UpdateExpenseTransactionRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateExpenseTransactionRequest$outboundSchema; - /** @deprecated use `UpdateExpenseTransactionRequest$Outbound` instead. */ - export type Outbound = UpdateExpenseTransactionRequest$Outbound; -} - export function updateExpenseTransactionRequestToJSON( updateExpenseTransactionRequest: UpdateExpenseTransactionRequest, ): string { @@ -80,13 +49,3 @@ export function updateExpenseTransactionRequestToJSON( ), ); } - -export function updateExpenseTransactionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateExpenseTransactionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateExpenseTransactionRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/updatereimbursableexpensetransaction.ts b/sync-for-expenses/src/sdk/models/operations/updatereimbursableexpensetransaction.ts index 4210c3285..39e89ab2a 100644 --- a/sync-for-expenses/src/sdk/models/operations/updatereimbursableexpensetransaction.ts +++ b/sync-for-expenses/src/sdk/models/operations/updatereimbursableexpensetransaction.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as shared from "../shared/index.js"; export type UpdateReimbursableExpenseTransactionRequest = { @@ -23,24 +20,6 @@ export type UpdateReimbursableExpenseTransactionRequest = { | undefined; }; -/** @internal */ -export const UpdateReimbursableExpenseTransactionRequest$inboundSchema: - z.ZodType< - UpdateReimbursableExpenseTransactionRequest, - z.ZodTypeDef, - unknown - > = z.object({ - companyId: z.string(), - transactionId: z.string(), - UpdateReimbursableExpenseTransactionRequest: shared - .UpdateReimbursableExpenseTransactionRequest$inboundSchema.optional(), - }).transform((v) => { - return remap$(v, { - "UpdateReimbursableExpenseTransactionRequest": - "updateReimbursableExpenseTransactionRequest", - }); - }); - /** @internal */ export type UpdateReimbursableExpenseTransactionRequest$Outbound = { companyId: string; @@ -68,21 +47,6 @@ export const UpdateReimbursableExpenseTransactionRequest$outboundSchema: }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateReimbursableExpenseTransactionRequest$ { - /** @deprecated use `UpdateReimbursableExpenseTransactionRequest$inboundSchema` instead. */ - export const inboundSchema = - UpdateReimbursableExpenseTransactionRequest$inboundSchema; - /** @deprecated use `UpdateReimbursableExpenseTransactionRequest$outboundSchema` instead. */ - export const outboundSchema = - UpdateReimbursableExpenseTransactionRequest$outboundSchema; - /** @deprecated use `UpdateReimbursableExpenseTransactionRequest$Outbound` instead. */ - export type Outbound = UpdateReimbursableExpenseTransactionRequest$Outbound; -} - export function updateReimbursableExpenseTransactionRequestToJSON( updateReimbursableExpenseTransactionRequest: UpdateReimbursableExpenseTransactionRequest, @@ -93,19 +57,3 @@ export function updateReimbursableExpenseTransactionRequestToJSON( ), ); } - -export function updateReimbursableExpenseTransactionRequestFromJSON( - jsonString: string, -): SafeParseResult< - UpdateReimbursableExpenseTransactionRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - UpdateReimbursableExpenseTransactionRequest$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'UpdateReimbursableExpenseTransactionRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/updatesupplier.ts b/sync-for-expenses/src/sdk/models/operations/updatesupplier.ts index 4181a0216..17fb665a5 100644 --- a/sync-for-expenses/src/sdk/models/operations/updatesupplier.ts +++ b/sync-for-expenses/src/sdk/models/operations/updatesupplier.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as shared from "../shared/index.js"; export type UpdateSupplierRequest = { @@ -37,25 +34,6 @@ export type UpdateSupplierRequest = { supplier?: shared.Supplier | null | undefined; }; -/** @internal */ -export const UpdateSupplierRequest$inboundSchema: z.ZodType< - UpdateSupplierRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - connectionId: z.string(), - supplierId: z.string(), - timeoutInMinutes: z.number().int().optional(), - allowSyncOnPushComplete: z.boolean().default(true), - forceUpdate: z.boolean().default(false), - Supplier: z.nullable(shared.Supplier$inboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - "Supplier": "supplier", - }); -}); - /** @internal */ export type UpdateSupplierRequest$Outbound = { companyId: string; @@ -86,19 +64,6 @@ export const UpdateSupplierRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateSupplierRequest$ { - /** @deprecated use `UpdateSupplierRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateSupplierRequest$inboundSchema; - /** @deprecated use `UpdateSupplierRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateSupplierRequest$outboundSchema; - /** @deprecated use `UpdateSupplierRequest$Outbound` instead. */ - export type Outbound = UpdateSupplierRequest$Outbound; -} - export function updateSupplierRequestToJSON( updateSupplierRequest: UpdateSupplierRequest, ): string { @@ -106,13 +71,3 @@ export function updateSupplierRequestToJSON( UpdateSupplierRequest$outboundSchema.parse(updateSupplierRequest), ); } - -export function updateSupplierRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateSupplierRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateSupplierRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/operations/uploadexpenseattachment.ts b/sync-for-expenses/src/sdk/models/operations/uploadexpenseattachment.ts index fe92942b9..eef9b6596 100644 --- a/sync-for-expenses/src/sdk/models/operations/uploadexpenseattachment.ts +++ b/sync-for-expenses/src/sdk/models/operations/uploadexpenseattachment.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as shared from "../shared/index.js"; export type UploadExpenseAttachmentRequest = { @@ -25,22 +22,6 @@ export type UploadExpenseAttachmentRequest = { attachmentUpload?: shared.AttachmentUpload | undefined; }; -/** @internal */ -export const UploadExpenseAttachmentRequest$inboundSchema: z.ZodType< - UploadExpenseAttachmentRequest, - z.ZodTypeDef, - unknown -> = z.object({ - companyId: z.string(), - syncId: z.string(), - transactionId: z.string(), - AttachmentUpload: shared.AttachmentUpload$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "AttachmentUpload": "attachmentUpload", - }); -}); - /** @internal */ export type UploadExpenseAttachmentRequest$Outbound = { companyId: string; @@ -65,19 +46,6 @@ export const UploadExpenseAttachmentRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UploadExpenseAttachmentRequest$ { - /** @deprecated use `UploadExpenseAttachmentRequest$inboundSchema` instead. */ - export const inboundSchema = UploadExpenseAttachmentRequest$inboundSchema; - /** @deprecated use `UploadExpenseAttachmentRequest$outboundSchema` instead. */ - export const outboundSchema = UploadExpenseAttachmentRequest$outboundSchema; - /** @deprecated use `UploadExpenseAttachmentRequest$Outbound` instead. */ - export type Outbound = UploadExpenseAttachmentRequest$Outbound; -} - export function uploadExpenseAttachmentRequestToJSON( uploadExpenseAttachmentRequest: UploadExpenseAttachmentRequest, ): string { @@ -87,13 +55,3 @@ export function uploadExpenseAttachmentRequestToJSON( ), ); } - -export function uploadExpenseAttachmentRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UploadExpenseAttachmentRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UploadExpenseAttachmentRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/accountingaddresstype.ts b/sync-for-expenses/src/sdk/models/shared/accountingaddresstype.ts index 5ca428861..2f4e3b7a6 100644 --- a/sync-for-expenses/src/sdk/models/shared/accountingaddresstype.ts +++ b/sync-for-expenses/src/sdk/models/shared/accountingaddresstype.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -22,19 +22,7 @@ export type AccountingAddressType = ClosedEnum; export const AccountingAddressType$inboundSchema: z.ZodNativeEnum< typeof AccountingAddressType > = z.nativeEnum(AccountingAddressType); - /** @internal */ export const AccountingAddressType$outboundSchema: z.ZodNativeEnum< typeof AccountingAddressType > = AccountingAddressType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AccountingAddressType$ { - /** @deprecated use `AccountingAddressType$inboundSchema` instead. */ - export const inboundSchema = AccountingAddressType$inboundSchema; - /** @deprecated use `AccountingAddressType$outboundSchema` instead. */ - export const outboundSchema = AccountingAddressType$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/models/shared/accountmappinginfo.ts b/sync-for-expenses/src/sdk/models/shared/accountmappinginfo.ts index 576476bed..7341c4006 100644 --- a/sync-for-expenses/src/sdk/models/shared/accountmappinginfo.ts +++ b/sync-for-expenses/src/sdk/models/shared/accountmappinginfo.ts @@ -2,20 +2,15 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - ValidFor, - ValidFor$inboundSchema, - ValidFor$outboundSchema, -} from "./validfor.js"; +import { ValidFor, ValidFor$inboundSchema } from "./validfor.js"; import { ValidTransactionTypes, ValidTransactionTypes$inboundSchema, - ValidTransactionTypes$outboundSchema, } from "./validtransactiontypes.js"; /** @@ -79,22 +74,6 @@ export const AccountMappingInfoAccountType$inboundSchema: z.ZodNativeEnum< typeof AccountMappingInfoAccountType > = z.nativeEnum(AccountMappingInfoAccountType); -/** @internal */ -export const AccountMappingInfoAccountType$outboundSchema: z.ZodNativeEnum< - typeof AccountMappingInfoAccountType -> = AccountMappingInfoAccountType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AccountMappingInfoAccountType$ { - /** @deprecated use `AccountMappingInfoAccountType$inboundSchema` instead. */ - export const inboundSchema = AccountMappingInfoAccountType$inboundSchema; - /** @deprecated use `AccountMappingInfoAccountType$outboundSchema` instead. */ - export const outboundSchema = AccountMappingInfoAccountType$outboundSchema; -} - /** @internal */ export const AccountMappingInfo$inboundSchema: z.ZodType< AccountMappingInfo, @@ -113,58 +92,6 @@ export const AccountMappingInfo$inboundSchema: z.ZodType< validFor: z.array(ValidFor$inboundSchema).optional(), }); -/** @internal */ -export type AccountMappingInfo$Outbound = { - id?: string | undefined; - nominalCode?: string | null | undefined; - name?: string | undefined; - currency?: string | undefined; - accountType?: string | undefined; - fullyQualifiedCategory?: string | undefined; - isBankAccount?: boolean | undefined; - validTransactionTypes?: Array | undefined; - validFor?: Array | undefined; -}; - -/** @internal */ -export const AccountMappingInfo$outboundSchema: z.ZodType< - AccountMappingInfo$Outbound, - z.ZodTypeDef, - AccountMappingInfo -> = z.object({ - id: z.string().optional(), - nominalCode: z.nullable(z.string()).optional(), - name: z.string().optional(), - currency: z.string().optional(), - accountType: AccountMappingInfoAccountType$outboundSchema.optional(), - fullyQualifiedCategory: z.string().optional(), - isBankAccount: z.boolean().optional(), - validTransactionTypes: z.array(ValidTransactionTypes$outboundSchema) - .optional(), - validFor: z.array(ValidFor$outboundSchema).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AccountMappingInfo$ { - /** @deprecated use `AccountMappingInfo$inboundSchema` instead. */ - export const inboundSchema = AccountMappingInfo$inboundSchema; - /** @deprecated use `AccountMappingInfo$outboundSchema` instead. */ - export const outboundSchema = AccountMappingInfo$outboundSchema; - /** @deprecated use `AccountMappingInfo$Outbound` instead. */ - export type Outbound = AccountMappingInfo$Outbound; -} - -export function accountMappingInfoToJSON( - accountMappingInfo: AccountMappingInfo, -): string { - return JSON.stringify( - AccountMappingInfo$outboundSchema.parse(accountMappingInfo), - ); -} - export function accountMappingInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/accountprototype.ts b/sync-for-expenses/src/sdk/models/shared/accountprototype.ts index 5f45adf56..cc5b1ee17 100644 --- a/sync-for-expenses/src/sdk/models/shared/accountprototype.ts +++ b/sync-for-expenses/src/sdk/models/shared/accountprototype.ts @@ -2,24 +2,15 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; +import * as z from "zod/v3"; import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { AccountStatus, - AccountStatus$inboundSchema, AccountStatus$outboundSchema, } from "./accountstatus.js"; -import { - AccountType, - AccountType$inboundSchema, - AccountType$outboundSchema, -} from "./accounttype.js"; +import { AccountType, AccountType$outboundSchema } from "./accounttype.js"; import { SupplementalData, - SupplementalData$inboundSchema, SupplementalData$Outbound, SupplementalData$outboundSchema, } from "./supplementaldata.js"; @@ -149,16 +140,6 @@ export type AccountPrototype = { supplementalData?: SupplementalData | undefined; }; -/** @internal */ -export const ValidDataTypeLinks$inboundSchema: z.ZodType< - ValidDataTypeLinks, - z.ZodTypeDef, - unknown -> = z.object({ - property: z.nullable(z.string()).optional(), - links: z.nullable(z.array(z.string())).optional(), -}); - /** @internal */ export type ValidDataTypeLinks$Outbound = { property?: string | null | undefined; @@ -175,19 +156,6 @@ export const ValidDataTypeLinks$outboundSchema: z.ZodType< links: z.nullable(z.array(z.string())).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ValidDataTypeLinks$ { - /** @deprecated use `ValidDataTypeLinks$inboundSchema` instead. */ - export const inboundSchema = ValidDataTypeLinks$inboundSchema; - /** @deprecated use `ValidDataTypeLinks$outboundSchema` instead. */ - export const outboundSchema = ValidDataTypeLinks$outboundSchema; - /** @deprecated use `ValidDataTypeLinks$Outbound` instead. */ - export type Outbound = ValidDataTypeLinks$Outbound; -} - export function validDataTypeLinksToJSON( validDataTypeLinks: ValidDataTypeLinks, ): string { @@ -196,39 +164,6 @@ export function validDataTypeLinksToJSON( ); } -export function validDataTypeLinksFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ValidDataTypeLinks$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ValidDataTypeLinks' from JSON`, - ); -} - -/** @internal */ -export const AccountPrototype$inboundSchema: z.ZodType< - AccountPrototype, - z.ZodTypeDef, - unknown -> = z.object({ - nominalCode: z.nullable(z.string()).optional(), - name: z.nullable(z.string()).optional(), - description: z.nullable(z.string()).optional(), - fullyQualifiedCategory: z.nullable(z.string()).optional(), - fullyQualifiedName: z.nullable(z.string()).optional(), - currency: z.string().optional(), - currentBalance: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - type: AccountType$inboundSchema.optional(), - status: AccountStatus$inboundSchema.optional(), - isBankAccount: z.boolean().optional(), - validDatatypeLinks: z.nullable( - z.array(z.lazy(() => ValidDataTypeLinks$inboundSchema)), - ).optional(), - supplementalData: SupplementalData$inboundSchema.optional(), -}); - /** @internal */ export type AccountPrototype$Outbound = { nominalCode?: string | null | undefined; @@ -271,19 +206,6 @@ export const AccountPrototype$outboundSchema: z.ZodType< supplementalData: SupplementalData$outboundSchema.optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AccountPrototype$ { - /** @deprecated use `AccountPrototype$inboundSchema` instead. */ - export const inboundSchema = AccountPrototype$inboundSchema; - /** @deprecated use `AccountPrototype$outboundSchema` instead. */ - export const outboundSchema = AccountPrototype$outboundSchema; - /** @deprecated use `AccountPrototype$Outbound` instead. */ - export type Outbound = AccountPrototype$Outbound; -} - export function accountPrototypeToJSON( accountPrototype: AccountPrototype, ): string { @@ -291,13 +213,3 @@ export function accountPrototypeToJSON( AccountPrototype$outboundSchema.parse(accountPrototype), ); } - -export function accountPrototypeFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountPrototype$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountPrototype' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/accountstatus.ts b/sync-for-expenses/src/sdk/models/shared/accountstatus.ts index 5932cfb46..12278d094 100644 --- a/sync-for-expenses/src/sdk/models/shared/accountstatus.ts +++ b/sync-for-expenses/src/sdk/models/shared/accountstatus.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -23,19 +23,7 @@ export type AccountStatus = ClosedEnum; export const AccountStatus$inboundSchema: z.ZodNativeEnum< typeof AccountStatus > = z.nativeEnum(AccountStatus); - /** @internal */ export const AccountStatus$outboundSchema: z.ZodNativeEnum< typeof AccountStatus > = AccountStatus$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AccountStatus$ { - /** @deprecated use `AccountStatus$inboundSchema` instead. */ - export const inboundSchema = AccountStatus$inboundSchema; - /** @deprecated use `AccountStatus$outboundSchema` instead. */ - export const outboundSchema = AccountStatus$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/models/shared/accounttype.ts b/sync-for-expenses/src/sdk/models/shared/accounttype.ts index 129692dba..c71262dc6 100644 --- a/sync-for-expenses/src/sdk/models/shared/accounttype.ts +++ b/sync-for-expenses/src/sdk/models/shared/accounttype.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -24,18 +24,6 @@ export type AccountType = ClosedEnum; /** @internal */ export const AccountType$inboundSchema: z.ZodNativeEnum = z .nativeEnum(AccountType); - /** @internal */ export const AccountType$outboundSchema: z.ZodNativeEnum = AccountType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AccountType$ { - /** @deprecated use `AccountType$inboundSchema` instead. */ - export const inboundSchema = AccountType$inboundSchema; - /** @deprecated use `AccountType$outboundSchema` instead. */ - export const outboundSchema = AccountType$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/models/shared/adjustmenttransactionline.ts b/sync-for-expenses/src/sdk/models/shared/adjustmenttransactionline.ts index f527c5f20..405552250 100644 --- a/sync-for-expenses/src/sdk/models/shared/adjustmenttransactionline.ts +++ b/sync-for-expenses/src/sdk/models/shared/adjustmenttransactionline.ts @@ -2,26 +2,20 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; +import * as z from "zod/v3"; import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { InvoiceTo, - InvoiceTo$inboundSchema, InvoiceTo$Outbound, InvoiceTo$outboundSchema, } from "./invoiceto.js"; import { RecordRef, - RecordRef$inboundSchema, RecordRef$Outbound, RecordRef$outboundSchema, } from "./recordref.js"; import { TrackingRefAdjustmentTransaction, - TrackingRefAdjustmentTransaction$inboundSchema, TrackingRefAdjustmentTransaction$Outbound, TrackingRefAdjustmentTransaction$outboundSchema, } from "./trackingrefadjustmenttransaction.js"; @@ -43,21 +37,6 @@ export type AdjustmentTransactionLine = { invoiceTo?: InvoiceTo | null | undefined; }; -/** @internal */ -export const AdjustmentTransactionLine$inboundSchema: z.ZodType< - AdjustmentTransactionLine, - z.ZodTypeDef, - unknown -> = z.object({ - amount: z.number().transform(v => new Decimal$(v)), - accountRef: RecordRef$inboundSchema, - description: z.string().optional(), - trackingRefs: z.nullable( - z.array(TrackingRefAdjustmentTransaction$inboundSchema), - ).optional(), - invoiceTo: z.nullable(InvoiceTo$inboundSchema).optional(), -}); - /** @internal */ export type AdjustmentTransactionLine$Outbound = { amount: number; @@ -87,19 +66,6 @@ export const AdjustmentTransactionLine$outboundSchema: z.ZodType< invoiceTo: z.nullable(InvoiceTo$outboundSchema).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AdjustmentTransactionLine$ { - /** @deprecated use `AdjustmentTransactionLine$inboundSchema` instead. */ - export const inboundSchema = AdjustmentTransactionLine$inboundSchema; - /** @deprecated use `AdjustmentTransactionLine$outboundSchema` instead. */ - export const outboundSchema = AdjustmentTransactionLine$outboundSchema; - /** @deprecated use `AdjustmentTransactionLine$Outbound` instead. */ - export type Outbound = AdjustmentTransactionLine$Outbound; -} - export function adjustmentTransactionLineToJSON( adjustmentTransactionLine: AdjustmentTransactionLine, ): string { @@ -107,13 +73,3 @@ export function adjustmentTransactionLineToJSON( AdjustmentTransactionLine$outboundSchema.parse(adjustmentTransactionLine), ); } - -export function adjustmentTransactionLineFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AdjustmentTransactionLine$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AdjustmentTransactionLine' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/adjustmenttransactionrequest.ts b/sync-for-expenses/src/sdk/models/shared/adjustmenttransactionrequest.ts index 7d65c900b..211f76e27 100644 --- a/sync-for-expenses/src/sdk/models/shared/adjustmenttransactionrequest.ts +++ b/sync-for-expenses/src/sdk/models/shared/adjustmenttransactionrequest.ts @@ -2,14 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; +import * as z from "zod/v3"; import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { AdjustmentTransactionLine, - AdjustmentTransactionLine$inboundSchema, AdjustmentTransactionLine$Outbound, AdjustmentTransactionLine$outboundSchema, } from "./adjustmenttransactionline.js"; @@ -91,21 +87,6 @@ export type AdjustmentTransactionRequest = { lines: Array; }; -/** @internal */ -export const AdjustmentTransactionRequest$inboundSchema: z.ZodType< - AdjustmentTransactionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - date: z.string(), - currency: z.string(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - reference: z.nullable(z.string()).optional(), - lines: z.array(AdjustmentTransactionLine$inboundSchema), -}); - /** @internal */ export type AdjustmentTransactionRequest$Outbound = { id: string; @@ -134,19 +115,6 @@ export const AdjustmentTransactionRequest$outboundSchema: z.ZodType< lines: z.array(AdjustmentTransactionLine$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AdjustmentTransactionRequest$ { - /** @deprecated use `AdjustmentTransactionRequest$inboundSchema` instead. */ - export const inboundSchema = AdjustmentTransactionRequest$inboundSchema; - /** @deprecated use `AdjustmentTransactionRequest$outboundSchema` instead. */ - export const outboundSchema = AdjustmentTransactionRequest$outboundSchema; - /** @deprecated use `AdjustmentTransactionRequest$Outbound` instead. */ - export type Outbound = AdjustmentTransactionRequest$Outbound; -} - export function adjustmentTransactionRequestToJSON( adjustmentTransactionRequest: AdjustmentTransactionRequest, ): string { @@ -156,13 +124,3 @@ export function adjustmentTransactionRequestToJSON( ), ); } - -export function adjustmentTransactionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AdjustmentTransactionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AdjustmentTransactionRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/adjustmenttransactionresponse.ts b/sync-for-expenses/src/sdk/models/shared/adjustmenttransactionresponse.ts index ba2c520d5..4edb3094b 100644 --- a/sync-for-expenses/src/sdk/models/shared/adjustmenttransactionresponse.ts +++ b/sync-for-expenses/src/sdk/models/shared/adjustmenttransactionresponse.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -23,43 +23,6 @@ export const AdjustmentTransactionResponse$inboundSchema: z.ZodType< syncId: z.string().optional(), }); -/** @internal */ -export type AdjustmentTransactionResponse$Outbound = { - syncId?: string | undefined; -}; - -/** @internal */ -export const AdjustmentTransactionResponse$outboundSchema: z.ZodType< - AdjustmentTransactionResponse$Outbound, - z.ZodTypeDef, - AdjustmentTransactionResponse -> = z.object({ - syncId: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AdjustmentTransactionResponse$ { - /** @deprecated use `AdjustmentTransactionResponse$inboundSchema` instead. */ - export const inboundSchema = AdjustmentTransactionResponse$inboundSchema; - /** @deprecated use `AdjustmentTransactionResponse$outboundSchema` instead. */ - export const outboundSchema = AdjustmentTransactionResponse$outboundSchema; - /** @deprecated use `AdjustmentTransactionResponse$Outbound` instead. */ - export type Outbound = AdjustmentTransactionResponse$Outbound; -} - -export function adjustmentTransactionResponseToJSON( - adjustmentTransactionResponse: AdjustmentTransactionResponse, -): string { - return JSON.stringify( - AdjustmentTransactionResponse$outboundSchema.parse( - adjustmentTransactionResponse, - ), - ); -} - export function adjustmentTransactionResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/apaccountref.ts b/sync-for-expenses/src/sdk/models/shared/apaccountref.ts index 6177c425b..a40de9884 100644 --- a/sync-for-expenses/src/sdk/models/shared/apaccountref.ts +++ b/sync-for-expenses/src/sdk/models/shared/apaccountref.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type ApAccountRef = { /** @@ -14,15 +11,6 @@ export type ApAccountRef = { id?: string | undefined; }; -/** @internal */ -export const ApAccountRef$inboundSchema: z.ZodType< - ApAccountRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), -}); - /** @internal */ export type ApAccountRef$Outbound = { id?: string | undefined; @@ -37,29 +25,6 @@ export const ApAccountRef$outboundSchema: z.ZodType< id: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ApAccountRef$ { - /** @deprecated use `ApAccountRef$inboundSchema` instead. */ - export const inboundSchema = ApAccountRef$inboundSchema; - /** @deprecated use `ApAccountRef$outboundSchema` instead. */ - export const outboundSchema = ApAccountRef$outboundSchema; - /** @deprecated use `ApAccountRef$Outbound` instead. */ - export type Outbound = ApAccountRef$Outbound; -} - export function apAccountRefToJSON(apAccountRef: ApAccountRef): string { return JSON.stringify(ApAccountRef$outboundSchema.parse(apAccountRef)); } - -export function apAccountRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ApAccountRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ApAccountRef' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/attachment.ts b/sync-for-expenses/src/sdk/models/shared/attachment.ts index 0a23ca6df..795c67ad8 100644 --- a/sync-for-expenses/src/sdk/models/shared/attachment.ts +++ b/sync-for-expenses/src/sdk/models/shared/attachment.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -33,41 +33,6 @@ export const Attachment$inboundSchema: z.ZodType< transactionId: z.string().optional(), }); -/** @internal */ -export type Attachment$Outbound = { - companyId?: string | undefined; - id?: string | undefined; - transactionId?: string | undefined; -}; - -/** @internal */ -export const Attachment$outboundSchema: z.ZodType< - Attachment$Outbound, - z.ZodTypeDef, - Attachment -> = z.object({ - companyId: z.string().optional(), - id: z.string().optional(), - transactionId: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Attachment$ { - /** @deprecated use `Attachment$inboundSchema` instead. */ - export const inboundSchema = Attachment$inboundSchema; - /** @deprecated use `Attachment$outboundSchema` instead. */ - export const outboundSchema = Attachment$outboundSchema; - /** @deprecated use `Attachment$Outbound` instead. */ - export type Outbound = Attachment$Outbound; -} - -export function attachmentToJSON(attachment: Attachment): string { - return JSON.stringify(Attachment$outboundSchema.parse(attachment)); -} - export function attachmentFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/attachmentupload.ts b/sync-for-expenses/src/sdk/models/shared/attachmentupload.ts index 9734ff97c..9d175ab21 100644 --- a/sync-for-expenses/src/sdk/models/shared/attachmentupload.ts +++ b/sync-for-expenses/src/sdk/models/shared/attachmentupload.ts @@ -2,14 +2,10 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; +import * as z from "zod/v3"; import { blobLikeSchema } from "../../types/blobs.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CodatFile, - CodatFile$inboundSchema, CodatFile$Outbound, CodatFile$outboundSchema, } from "./codatfile.js"; @@ -21,15 +17,6 @@ export type AttachmentUpload = { file: CodatFile | Blob; }; -/** @internal */ -export const AttachmentUpload$inboundSchema: z.ZodType< - AttachmentUpload, - z.ZodTypeDef, - unknown -> = z.object({ - file: CodatFile$inboundSchema, -}); - /** @internal */ export type AttachmentUpload$Outbound = { file: CodatFile$Outbound | Blob; @@ -44,19 +31,6 @@ export const AttachmentUpload$outboundSchema: z.ZodType< file: CodatFile$outboundSchema.or(blobLikeSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AttachmentUpload$ { - /** @deprecated use `AttachmentUpload$inboundSchema` instead. */ - export const inboundSchema = AttachmentUpload$inboundSchema; - /** @deprecated use `AttachmentUpload$outboundSchema` instead. */ - export const outboundSchema = AttachmentUpload$outboundSchema; - /** @deprecated use `AttachmentUpload$Outbound` instead. */ - export type Outbound = AttachmentUpload$Outbound; -} - export function attachmentUploadToJSON( attachmentUpload: AttachmentUpload, ): string { @@ -64,13 +38,3 @@ export function attachmentUploadToJSON( AttachmentUpload$outboundSchema.parse(attachmentUpload), ); } - -export function attachmentUploadFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AttachmentUpload$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AttachmentUpload' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/bankaccount.ts b/sync-for-expenses/src/sdk/models/shared/bankaccount.ts index 1b1dd738c..433ac67bc 100644 --- a/sync-for-expenses/src/sdk/models/shared/bankaccount.ts +++ b/sync-for-expenses/src/sdk/models/shared/bankaccount.ts @@ -2,26 +2,20 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; +import * as z from "zod/v3"; import { Decimal as Decimal$ } from "../../types/decimal.js"; import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { BankAccountStatus, - BankAccountStatus$inboundSchema, BankAccountStatus$outboundSchema, } from "./bankaccountstatus.js"; import { Metadata, - Metadata$inboundSchema, Metadata$Outbound, Metadata$outboundSchema, } from "./metadata.js"; import { SupplementalData, - SupplementalData$inboundSchema, SupplementalData$Outbound, SupplementalData$outboundSchema, } from "./supplementaldata.js"; @@ -160,53 +154,10 @@ export type BankAccount = { supplementalData?: SupplementalData | undefined; }; -/** @internal */ -export const BankAccountType$inboundSchema: z.ZodNativeEnum< - typeof BankAccountType -> = z.nativeEnum(BankAccountType); - /** @internal */ export const BankAccountType$outboundSchema: z.ZodNativeEnum< typeof BankAccountType -> = BankAccountType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace BankAccountType$ { - /** @deprecated use `BankAccountType$inboundSchema` instead. */ - export const inboundSchema = BankAccountType$inboundSchema; - /** @deprecated use `BankAccountType$outboundSchema` instead. */ - export const outboundSchema = BankAccountType$outboundSchema; -} - -/** @internal */ -export const BankAccount$inboundSchema: z.ZodType< - BankAccount, - z.ZodTypeDef, - unknown -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - accountName: z.nullable(z.string()).optional(), - accountType: BankAccountType$inboundSchema.optional(), - nominalCode: z.nullable(z.string()).optional(), - sortCode: z.nullable(z.string()).optional(), - accountNumber: z.nullable(z.string()).optional(), - iBan: z.nullable(z.string()).optional(), - currency: z.string().optional(), - balance: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), - institution: z.nullable(z.string()).optional(), - availableBalance: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - overdraftLimit: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - status: BankAccountStatus$inboundSchema.optional(), - metadata: Metadata$inboundSchema.optional(), - supplementalData: SupplementalData$inboundSchema.optional(), -}); +> = z.nativeEnum(BankAccountType); /** @internal */ export type BankAccount$Outbound = { @@ -266,29 +217,6 @@ export const BankAccount$outboundSchema: z.ZodType< supplementalData: SupplementalData$outboundSchema.optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace BankAccount$ { - /** @deprecated use `BankAccount$inboundSchema` instead. */ - export const inboundSchema = BankAccount$inboundSchema; - /** @deprecated use `BankAccount$outboundSchema` instead. */ - export const outboundSchema = BankAccount$outboundSchema; - /** @deprecated use `BankAccount$Outbound` instead. */ - export type Outbound = BankAccount$Outbound; -} - export function bankAccountToJSON(bankAccount: BankAccount): string { return JSON.stringify(BankAccount$outboundSchema.parse(bankAccount)); } - -export function bankAccountFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BankAccount$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BankAccount' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/bankaccountdetails.ts b/sync-for-expenses/src/sdk/models/shared/bankaccountdetails.ts index 3e6c31da7..3f1bddb89 100644 --- a/sync-for-expenses/src/sdk/models/shared/bankaccountdetails.ts +++ b/sync-for-expenses/src/sdk/models/shared/bankaccountdetails.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const BankAccountDetails$inboundSchema: z.ZodType< > = z.object({ id: z.string().optional(), }); - /** @internal */ export type BankAccountDetails$Outbound = { id?: string | undefined; @@ -37,19 +36,6 @@ export const BankAccountDetails$outboundSchema: z.ZodType< id: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace BankAccountDetails$ { - /** @deprecated use `BankAccountDetails$inboundSchema` instead. */ - export const inboundSchema = BankAccountDetails$inboundSchema; - /** @deprecated use `BankAccountDetails$outboundSchema` instead. */ - export const outboundSchema = BankAccountDetails$outboundSchema; - /** @deprecated use `BankAccountDetails$Outbound` instead. */ - export type Outbound = BankAccountDetails$Outbound; -} - export function bankAccountDetailsToJSON( bankAccountDetails: BankAccountDetails, ): string { @@ -57,7 +43,6 @@ export function bankAccountDetailsToJSON( BankAccountDetails$outboundSchema.parse(bankAccountDetails), ); } - export function bankAccountDetailsFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/bankaccountstatus.ts b/sync-for-expenses/src/sdk/models/shared/bankaccountstatus.ts index 636071113..bca71b030 100644 --- a/sync-for-expenses/src/sdk/models/shared/bankaccountstatus.ts +++ b/sync-for-expenses/src/sdk/models/shared/bankaccountstatus.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -23,19 +23,7 @@ export type BankAccountStatus = ClosedEnum; export const BankAccountStatus$inboundSchema: z.ZodNativeEnum< typeof BankAccountStatus > = z.nativeEnum(BankAccountStatus); - /** @internal */ export const BankAccountStatus$outboundSchema: z.ZodNativeEnum< typeof BankAccountStatus > = BankAccountStatus$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace BankAccountStatus$ { - /** @deprecated use `BankAccountStatus$inboundSchema` instead. */ - export const inboundSchema = BankAccountStatus$inboundSchema; - /** @deprecated use `BankAccountStatus$outboundSchema` instead. */ - export const outboundSchema = BankAccountStatus$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/models/shared/clientratelimitreachedwebhook.ts b/sync-for-expenses/src/sdk/models/shared/clientratelimitreachedwebhook.ts deleted file mode 100644 index d68f15545..000000000 --- a/sync-for-expenses/src/sdk/models/shared/clientratelimitreachedwebhook.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - ClientRateLimitReachedWebhookData, - ClientRateLimitReachedWebhookData$inboundSchema, - ClientRateLimitReachedWebhookData$Outbound, - ClientRateLimitReachedWebhookData$outboundSchema, -} from "./clientratelimitreachedwebhookdata.js"; - -/** - * Webhook request body for a client that has reached their rate limit. - */ -export type ClientRateLimitReachedWebhook = { - /** - * Unique identifier for your client in Codat. - */ - clientId?: string | undefined; - /** - * Name of your client in Codat. - */ - clientName?: string | undefined; - /** - * Unique identifier for the rule. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - ruleId?: string | undefined; - /** - * The type of rule. - */ - ruleType?: string | undefined; - /** - * Unique identifier of the webhook event. - */ - alertId?: string | undefined; - /** - * A human-readable message about the webhook. - */ - message?: string | undefined; - data?: ClientRateLimitReachedWebhookData | undefined; -}; - -/** @internal */ -export const ClientRateLimitReachedWebhook$inboundSchema: z.ZodType< - ClientRateLimitReachedWebhook, - z.ZodTypeDef, - unknown -> = z.object({ - ClientId: z.string().optional(), - ClientName: z.string().optional(), - RuleId: z.string().optional(), - RuleType: z.string().optional(), - AlertId: z.string().optional(), - Message: z.string().optional(), - Data: ClientRateLimitReachedWebhookData$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "ClientId": "clientId", - "ClientName": "clientName", - "RuleId": "ruleId", - "RuleType": "ruleType", - "AlertId": "alertId", - "Message": "message", - "Data": "data", - }); -}); - -/** @internal */ -export type ClientRateLimitReachedWebhook$Outbound = { - ClientId?: string | undefined; - ClientName?: string | undefined; - RuleId?: string | undefined; - RuleType?: string | undefined; - AlertId?: string | undefined; - Message?: string | undefined; - Data?: ClientRateLimitReachedWebhookData$Outbound | undefined; -}; - -/** @internal */ -export const ClientRateLimitReachedWebhook$outboundSchema: z.ZodType< - ClientRateLimitReachedWebhook$Outbound, - z.ZodTypeDef, - ClientRateLimitReachedWebhook -> = z.object({ - clientId: z.string().optional(), - clientName: z.string().optional(), - ruleId: z.string().optional(), - ruleType: z.string().optional(), - alertId: z.string().optional(), - message: z.string().optional(), - data: ClientRateLimitReachedWebhookData$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - clientId: "ClientId", - clientName: "ClientName", - ruleId: "RuleId", - ruleType: "RuleType", - alertId: "AlertId", - message: "Message", - data: "Data", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ClientRateLimitReachedWebhook$ { - /** @deprecated use `ClientRateLimitReachedWebhook$inboundSchema` instead. */ - export const inboundSchema = ClientRateLimitReachedWebhook$inboundSchema; - /** @deprecated use `ClientRateLimitReachedWebhook$outboundSchema` instead. */ - export const outboundSchema = ClientRateLimitReachedWebhook$outboundSchema; - /** @deprecated use `ClientRateLimitReachedWebhook$Outbound` instead. */ - export type Outbound = ClientRateLimitReachedWebhook$Outbound; -} - -export function clientRateLimitReachedWebhookToJSON( - clientRateLimitReachedWebhook: ClientRateLimitReachedWebhook, -): string { - return JSON.stringify( - ClientRateLimitReachedWebhook$outboundSchema.parse( - clientRateLimitReachedWebhook, - ), - ); -} - -export function clientRateLimitReachedWebhookFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ClientRateLimitReachedWebhook$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ClientRateLimitReachedWebhook' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/clientratelimitreachedwebhookdata.ts b/sync-for-expenses/src/sdk/models/shared/clientratelimitreachedwebhookdata.ts deleted file mode 100644 index 2a311f44f..000000000 --- a/sync-for-expenses/src/sdk/models/shared/clientratelimitreachedwebhookdata.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ClientRateLimitReachedWebhookData = { - /** - * The number of available requests per day. - */ - dailyQuota?: number | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00:00` - * - UTC time offsets: `2021-11-15T01:00:00-05:00` - * - * > Time zones - * > - * > Not all dates from Codat will contain information about time zones. - * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. - */ - expiresUtc?: string | undefined; -}; - -/** @internal */ -export const ClientRateLimitReachedWebhookData$inboundSchema: z.ZodType< - ClientRateLimitReachedWebhookData, - z.ZodTypeDef, - unknown -> = z.object({ - DailyQuota: z.number().int().optional(), - ExpiresUtc: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "DailyQuota": "dailyQuota", - "ExpiresUtc": "expiresUtc", - }); -}); - -/** @internal */ -export type ClientRateLimitReachedWebhookData$Outbound = { - DailyQuota?: number | undefined; - ExpiresUtc?: string | undefined; -}; - -/** @internal */ -export const ClientRateLimitReachedWebhookData$outboundSchema: z.ZodType< - ClientRateLimitReachedWebhookData$Outbound, - z.ZodTypeDef, - ClientRateLimitReachedWebhookData -> = z.object({ - dailyQuota: z.number().int().optional(), - expiresUtc: z.string().optional(), -}).transform((v) => { - return remap$(v, { - dailyQuota: "DailyQuota", - expiresUtc: "ExpiresUtc", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ClientRateLimitReachedWebhookData$ { - /** @deprecated use `ClientRateLimitReachedWebhookData$inboundSchema` instead. */ - export const inboundSchema = ClientRateLimitReachedWebhookData$inboundSchema; - /** @deprecated use `ClientRateLimitReachedWebhookData$outboundSchema` instead. */ - export const outboundSchema = - ClientRateLimitReachedWebhookData$outboundSchema; - /** @deprecated use `ClientRateLimitReachedWebhookData$Outbound` instead. */ - export type Outbound = ClientRateLimitReachedWebhookData$Outbound; -} - -export function clientRateLimitReachedWebhookDataToJSON( - clientRateLimitReachedWebhookData: ClientRateLimitReachedWebhookData, -): string { - return JSON.stringify( - ClientRateLimitReachedWebhookData$outboundSchema.parse( - clientRateLimitReachedWebhookData, - ), - ); -} - -export function clientRateLimitReachedWebhookDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ClientRateLimitReachedWebhookData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ClientRateLimitReachedWebhookData' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/clientratelimitresetwebhook.ts b/sync-for-expenses/src/sdk/models/shared/clientratelimitresetwebhook.ts deleted file mode 100644 index e0559b0f3..000000000 --- a/sync-for-expenses/src/sdk/models/shared/clientratelimitresetwebhook.ts +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - ClientRateLimitResetWebhookData, - ClientRateLimitResetWebhookData$inboundSchema, - ClientRateLimitResetWebhookData$Outbound, - ClientRateLimitResetWebhookData$outboundSchema, -} from "./clientratelimitresetwebhookdata.js"; - -/** - * Webhook request body for a client that has had their rate limit reset. - */ -export type ClientRateLimitResetWebhook = { - /** - * Unique identifier for your client in Codat. - */ - clientId?: string | undefined; - /** - * Name of your client in Codat. - */ - clientName?: string | undefined; - /** - * Unique identifier for the rule. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - ruleId?: string | undefined; - /** - * The type of rule. - */ - ruleType?: string | undefined; - /** - * Unique identifier of the webhook event. - */ - alertId?: string | undefined; - /** - * A human-readable message about the webhook. - */ - message?: string | undefined; - data?: ClientRateLimitResetWebhookData | undefined; -}; - -/** @internal */ -export const ClientRateLimitResetWebhook$inboundSchema: z.ZodType< - ClientRateLimitResetWebhook, - z.ZodTypeDef, - unknown -> = z.object({ - ClientId: z.string().optional(), - ClientName: z.string().optional(), - RuleId: z.string().optional(), - RuleType: z.string().optional(), - AlertId: z.string().optional(), - Message: z.string().optional(), - Data: ClientRateLimitResetWebhookData$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "ClientId": "clientId", - "ClientName": "clientName", - "RuleId": "ruleId", - "RuleType": "ruleType", - "AlertId": "alertId", - "Message": "message", - "Data": "data", - }); -}); - -/** @internal */ -export type ClientRateLimitResetWebhook$Outbound = { - ClientId?: string | undefined; - ClientName?: string | undefined; - RuleId?: string | undefined; - RuleType?: string | undefined; - AlertId?: string | undefined; - Message?: string | undefined; - Data?: ClientRateLimitResetWebhookData$Outbound | undefined; -}; - -/** @internal */ -export const ClientRateLimitResetWebhook$outboundSchema: z.ZodType< - ClientRateLimitResetWebhook$Outbound, - z.ZodTypeDef, - ClientRateLimitResetWebhook -> = z.object({ - clientId: z.string().optional(), - clientName: z.string().optional(), - ruleId: z.string().optional(), - ruleType: z.string().optional(), - alertId: z.string().optional(), - message: z.string().optional(), - data: ClientRateLimitResetWebhookData$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - clientId: "ClientId", - clientName: "ClientName", - ruleId: "RuleId", - ruleType: "RuleType", - alertId: "AlertId", - message: "Message", - data: "Data", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ClientRateLimitResetWebhook$ { - /** @deprecated use `ClientRateLimitResetWebhook$inboundSchema` instead. */ - export const inboundSchema = ClientRateLimitResetWebhook$inboundSchema; - /** @deprecated use `ClientRateLimitResetWebhook$outboundSchema` instead. */ - export const outboundSchema = ClientRateLimitResetWebhook$outboundSchema; - /** @deprecated use `ClientRateLimitResetWebhook$Outbound` instead. */ - export type Outbound = ClientRateLimitResetWebhook$Outbound; -} - -export function clientRateLimitResetWebhookToJSON( - clientRateLimitResetWebhook: ClientRateLimitResetWebhook, -): string { - return JSON.stringify( - ClientRateLimitResetWebhook$outboundSchema.parse( - clientRateLimitResetWebhook, - ), - ); -} - -export function clientRateLimitResetWebhookFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ClientRateLimitResetWebhook$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ClientRateLimitResetWebhook' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/clientratelimitresetwebhookdata.ts b/sync-for-expenses/src/sdk/models/shared/clientratelimitresetwebhookdata.ts deleted file mode 100644 index eae413fae..000000000 --- a/sync-for-expenses/src/sdk/models/shared/clientratelimitresetwebhookdata.ts +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type ClientRateLimitResetWebhookData = { - /** - * Total number of requests remaining for your client. - */ - quotaRemaining?: number | null | undefined; - /** - * The reason for your rate limit quota being reset. - */ - resetReason?: string | undefined; - /** - * The number of available requests per day. - */ - dailyQuota?: number | undefined; - /** - * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: - * - * @remarks - * - * ``` - * 2020-10-08T22:40:50Z - * 2021-01-01T00:00:00 - * ``` - * - * When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information: - * - * - Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z` - * - Unqualified local time: `2021-11-15T01:00:00` - * - UTC time offsets: `2021-11-15T01:00:00-05:00` - * - * > Time zones - * > - * > Not all dates from Codat will contain information about time zones. - * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. - */ - expiresUtc?: string | undefined; -}; - -/** @internal */ -export const ClientRateLimitResetWebhookData$inboundSchema: z.ZodType< - ClientRateLimitResetWebhookData, - z.ZodTypeDef, - unknown -> = z.object({ - QuotaRemaining: z.nullable(z.number().int()).optional(), - ResetReason: z.string().optional(), - DailyQuota: z.number().int().optional(), - ExpiresUtc: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "QuotaRemaining": "quotaRemaining", - "ResetReason": "resetReason", - "DailyQuota": "dailyQuota", - "ExpiresUtc": "expiresUtc", - }); -}); - -/** @internal */ -export type ClientRateLimitResetWebhookData$Outbound = { - QuotaRemaining?: number | null | undefined; - ResetReason?: string | undefined; - DailyQuota?: number | undefined; - ExpiresUtc?: string | undefined; -}; - -/** @internal */ -export const ClientRateLimitResetWebhookData$outboundSchema: z.ZodType< - ClientRateLimitResetWebhookData$Outbound, - z.ZodTypeDef, - ClientRateLimitResetWebhookData -> = z.object({ - quotaRemaining: z.nullable(z.number().int()).optional(), - resetReason: z.string().optional(), - dailyQuota: z.number().int().optional(), - expiresUtc: z.string().optional(), -}).transform((v) => { - return remap$(v, { - quotaRemaining: "QuotaRemaining", - resetReason: "ResetReason", - dailyQuota: "DailyQuota", - expiresUtc: "ExpiresUtc", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ClientRateLimitResetWebhookData$ { - /** @deprecated use `ClientRateLimitResetWebhookData$inboundSchema` instead. */ - export const inboundSchema = ClientRateLimitResetWebhookData$inboundSchema; - /** @deprecated use `ClientRateLimitResetWebhookData$outboundSchema` instead. */ - export const outboundSchema = ClientRateLimitResetWebhookData$outboundSchema; - /** @deprecated use `ClientRateLimitResetWebhookData$Outbound` instead. */ - export type Outbound = ClientRateLimitResetWebhookData$Outbound; -} - -export function clientRateLimitResetWebhookDataToJSON( - clientRateLimitResetWebhookData: ClientRateLimitResetWebhookData, -): string { - return JSON.stringify( - ClientRateLimitResetWebhookData$outboundSchema.parse( - clientRateLimitResetWebhookData, - ), - ); -} - -export function clientRateLimitResetWebhookDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ClientRateLimitResetWebhookData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ClientRateLimitResetWebhookData' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/clientratelimitwebhook.ts b/sync-for-expenses/src/sdk/models/shared/clientratelimitwebhook.ts index ce6bc2982..cdc40c0b8 100644 --- a/sync-for-expenses/src/sdk/models/shared/clientratelimitwebhook.ts +++ b/sync-for-expenses/src/sdk/models/shared/clientratelimitwebhook.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -58,7 +58,6 @@ export const ClientRateLimitWebhook$inboundSchema: z.ZodType< generatedDate: z.string().optional(), payload: ClientRateLimitWebhookPayload$inboundSchema.optional(), }); - /** @internal */ export type ClientRateLimitWebhook$Outbound = { id?: string | undefined; @@ -79,19 +78,6 @@ export const ClientRateLimitWebhook$outboundSchema: z.ZodType< payload: ClientRateLimitWebhookPayload$outboundSchema.optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ClientRateLimitWebhook$ { - /** @deprecated use `ClientRateLimitWebhook$inboundSchema` instead. */ - export const inboundSchema = ClientRateLimitWebhook$inboundSchema; - /** @deprecated use `ClientRateLimitWebhook$outboundSchema` instead. */ - export const outboundSchema = ClientRateLimitWebhook$outboundSchema; - /** @deprecated use `ClientRateLimitWebhook$Outbound` instead. */ - export type Outbound = ClientRateLimitWebhook$Outbound; -} - export function clientRateLimitWebhookToJSON( clientRateLimitWebhook: ClientRateLimitWebhook, ): string { @@ -99,7 +85,6 @@ export function clientRateLimitWebhookToJSON( ClientRateLimitWebhook$outboundSchema.parse(clientRateLimitWebhook), ); } - export function clientRateLimitWebhookFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/clientratelimitwebhookpayload.ts b/sync-for-expenses/src/sdk/models/shared/clientratelimitwebhookpayload.ts index 78ae04345..72605d624 100644 --- a/sync-for-expenses/src/sdk/models/shared/clientratelimitwebhookpayload.ts +++ b/sync-for-expenses/src/sdk/models/shared/clientratelimitwebhookpayload.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -50,7 +50,6 @@ export const ClientRateLimitWebhookPayload$inboundSchema: z.ZodType< quotaRemaining: z.number().int().optional(), expiryDate: z.string().optional(), }); - /** @internal */ export type ClientRateLimitWebhookPayload$Outbound = { dailyQuota?: number | undefined; @@ -69,19 +68,6 @@ export const ClientRateLimitWebhookPayload$outboundSchema: z.ZodType< expiryDate: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ClientRateLimitWebhookPayload$ { - /** @deprecated use `ClientRateLimitWebhookPayload$inboundSchema` instead. */ - export const inboundSchema = ClientRateLimitWebhookPayload$inboundSchema; - /** @deprecated use `ClientRateLimitWebhookPayload$outboundSchema` instead. */ - export const outboundSchema = ClientRateLimitWebhookPayload$outboundSchema; - /** @deprecated use `ClientRateLimitWebhookPayload$Outbound` instead. */ - export type Outbound = ClientRateLimitWebhookPayload$Outbound; -} - export function clientRateLimitWebhookPayloadToJSON( clientRateLimitWebhookPayload: ClientRateLimitWebhookPayload, ): string { @@ -91,7 +77,6 @@ export function clientRateLimitWebhookPayloadToJSON( ), ); } - export function clientRateLimitWebhookPayloadFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/codatfile.ts b/sync-for-expenses/src/sdk/models/shared/codatfile.ts index b80ea444e..0bc3490e3 100644 --- a/sync-for-expenses/src/sdk/models/shared/codatfile.ts +++ b/sync-for-expenses/src/sdk/models/shared/codatfile.ts @@ -2,31 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type CodatFile = { fileName: string; content: ReadableStream | Blob | ArrayBuffer | Uint8Array; }; -/** @internal */ -export const CodatFile$inboundSchema: z.ZodType< - CodatFile, - z.ZodTypeDef, - unknown -> = z.object({ - fileName: z.string(), - content: z.union([ - z.instanceof(ReadableStream), - z.instanceof(Blob), - z.instanceof(ArrayBuffer), - z.instanceof(Uint8Array), - ]), -}); - /** @internal */ export type CodatFile$Outbound = { fileName: string; @@ -48,29 +30,6 @@ export const CodatFile$outboundSchema: z.ZodType< ]), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CodatFile$ { - /** @deprecated use `CodatFile$inboundSchema` instead. */ - export const inboundSchema = CodatFile$inboundSchema; - /** @deprecated use `CodatFile$outboundSchema` instead. */ - export const outboundSchema = CodatFile$outboundSchema; - /** @deprecated use `CodatFile$Outbound` instead. */ - export type Outbound = CodatFile$Outbound; -} - export function codatFileToJSON(codatFile: CodatFile): string { return JSON.stringify(CodatFile$outboundSchema.parse(codatFile)); } - -export function codatFileFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CodatFile$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CodatFile' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/companies.ts b/sync-for-expenses/src/sdk/models/shared/companies.ts index deb1677dc..0f308542e 100644 --- a/sync-for-expenses/src/sdk/models/shared/companies.ts +++ b/sync-for-expenses/src/sdk/models/shared/companies.ts @@ -2,23 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - Company, - Company$inboundSchema, - Company$Outbound, - Company$outboundSchema, -} from "./company.js"; -import { - Links, - Links$inboundSchema, - Links$Outbound, - Links$outboundSchema, -} from "./links.js"; +import { Company, Company$inboundSchema } from "./company.js"; +import { Links, Links$inboundSchema } from "./links.js"; export type Companies = { results?: Array | undefined; @@ -54,49 +44,6 @@ export const Companies$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type Companies$Outbound = { - results?: Array | undefined; - pageNumber: number; - pageSize: number; - totalResults: number; - _links: Links$Outbound; -}; - -/** @internal */ -export const Companies$outboundSchema: z.ZodType< - Companies$Outbound, - z.ZodTypeDef, - Companies -> = z.object({ - results: z.array(Company$outboundSchema).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - links: Links$outboundSchema, -}).transform((v) => { - return remap$(v, { - links: "_links", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Companies$ { - /** @deprecated use `Companies$inboundSchema` instead. */ - export const inboundSchema = Companies$inboundSchema; - /** @deprecated use `Companies$outboundSchema` instead. */ - export const outboundSchema = Companies$outboundSchema; - /** @deprecated use `Companies$Outbound` instead. */ - export type Outbound = Companies$Outbound; -} - -export function companiesToJSON(companies: Companies): string { - return JSON.stringify(Companies$outboundSchema.parse(companies)); -} - export function companiesFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/company.ts b/sync-for-expenses/src/sdk/models/shared/company.ts index 89af4bef8..adc722807 100644 --- a/sync-for-expenses/src/sdk/models/shared/company.ts +++ b/sync-for-expenses/src/sdk/models/shared/company.ts @@ -2,22 +2,15 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CompanyReference, CompanyReference$inboundSchema, - CompanyReference$Outbound, - CompanyReference$outboundSchema, } from "./companyreference.js"; -import { - Connection, - Connection$inboundSchema, - Connection$Outbound, - Connection$outboundSchema, -} from "./connection.js"; +import { Connection, Connection$inboundSchema } from "./connection.js"; /** * In Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/sync-for-expenses-api#/schemas/Connection) to different data sources such as one connection to [Xero](https://docs.codat.io/integrations/accounting/xero/accounting-xero) for accounting data, two connections to [Plaid](https://docs.codat.io/integrations/banking/plaid/banking-plaid) for two bank accounts and a connection to [Zettle](https://docs.codat.io/integrations/commerce/zettle/commerce-zettle) for POS data. @@ -127,60 +120,6 @@ export const Company$inboundSchema: z.ZodType = dataConnections: z.array(Connection$inboundSchema).optional(), }); -/** @internal */ -export type Company$Outbound = { - id: string; - name: string; - description?: string | undefined; - redirect: string; - lastSync?: string | undefined; - created?: string | undefined; - createdByUserName?: string | null | undefined; - products?: Array | undefined; - tags?: { [k: string]: string } | undefined; - referenceParentCompany?: CompanyReference$Outbound | undefined; - referenceSubsidiaryCompanies?: Array | undefined; - dataConnections?: Array | undefined; -}; - -/** @internal */ -export const Company$outboundSchema: z.ZodType< - Company$Outbound, - z.ZodTypeDef, - Company -> = z.object({ - id: z.string(), - name: z.string(), - description: z.string().optional(), - redirect: z.string(), - lastSync: z.string().optional(), - created: z.string().optional(), - createdByUserName: z.nullable(z.string()).optional(), - products: z.array(z.string()).optional(), - tags: z.record(z.string()).optional(), - referenceParentCompany: CompanyReference$outboundSchema.optional(), - referenceSubsidiaryCompanies: z.array(CompanyReference$outboundSchema) - .optional(), - dataConnections: z.array(Connection$outboundSchema).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Company$ { - /** @deprecated use `Company$inboundSchema` instead. */ - export const inboundSchema = Company$inboundSchema; - /** @deprecated use `Company$outboundSchema` instead. */ - export const outboundSchema = Company$outboundSchema; - /** @deprecated use `Company$Outbound` instead. */ - export type Outbound = Company$Outbound; -} - -export function companyToJSON(company: Company): string { - return JSON.stringify(Company$outboundSchema.parse(company)); -} - export function companyFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/companyconfiguration.ts b/sync-for-expenses/src/sdk/models/shared/companyconfiguration.ts index 690ebd561..c3de39ac9 100644 --- a/sync-for-expenses/src/sdk/models/shared/companyconfiguration.ts +++ b/sync-for-expenses/src/sdk/models/shared/companyconfiguration.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -41,7 +41,6 @@ export const CompanyConfiguration$inboundSchema: z.ZodType< supplier: SupplierDetails$inboundSchema, customer: CustomerDetails$inboundSchema, }); - /** @internal */ export type CompanyConfiguration$Outbound = { bankAccount: BankAccountDetails$Outbound; @@ -60,19 +59,6 @@ export const CompanyConfiguration$outboundSchema: z.ZodType< customer: CustomerDetails$outboundSchema, }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompanyConfiguration$ { - /** @deprecated use `CompanyConfiguration$inboundSchema` instead. */ - export const inboundSchema = CompanyConfiguration$inboundSchema; - /** @deprecated use `CompanyConfiguration$outboundSchema` instead. */ - export const outboundSchema = CompanyConfiguration$outboundSchema; - /** @deprecated use `CompanyConfiguration$Outbound` instead. */ - export type Outbound = CompanyConfiguration$Outbound; -} - export function companyConfigurationToJSON( companyConfiguration: CompanyConfiguration, ): string { @@ -80,7 +66,6 @@ export function companyConfigurationToJSON( CompanyConfiguration$outboundSchema.parse(companyConfiguration), ); } - export function companyConfigurationFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/companyinformation.ts b/sync-for-expenses/src/sdk/models/shared/companyinformation.ts index 6eb9e1326..624491b9f 100644 --- a/sync-for-expenses/src/sdk/models/shared/companyinformation.ts +++ b/sync-for-expenses/src/sdk/models/shared/companyinformation.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -10,18 +10,10 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { AccountingAddressType, AccountingAddressType$inboundSchema, - AccountingAddressType$outboundSchema, } from "./accountingaddresstype.js"; -import { - PhoneNumberType, - PhoneNumberType$inboundSchema, - PhoneNumberType$outboundSchema, -} from "./phonenumbertype.js"; import { SupplementalData, SupplementalData$inboundSchema, - SupplementalData$Outbound, - SupplementalData$outboundSchema, } from "./supplementaldata.js"; export type AccountingAddress = { @@ -55,6 +47,23 @@ export type AccountingAddress = { postalCode?: string | null | undefined; }; +/** + * The type of phone number + */ +export const CompanyInformationPhoneNumbersType = { + Primary: "Primary", + Landline: "Landline", + Mobile: "Mobile", + Fax: "Fax", + Unknown: "Unknown", +} as const; +/** + * The type of phone number + */ +export type CompanyInformationPhoneNumbersType = ClosedEnum< + typeof CompanyInformationPhoneNumbersType +>; + export type Phone = { /** * A phone number. @@ -63,7 +72,7 @@ export type Phone = { /** * The type of phone number */ - type: PhoneNumberType; + type: CompanyInformationPhoneNumbersType; }; /** @@ -190,7 +199,7 @@ export type CompanyInformation = { * * For example, for Xero integrations two URLs are returned. These have many potential use cases, such as [deep linking](https://developer.xero.com/documentation/api-guides/deep-link-xero). */ - sourceUrls?: { [k: string]: string } | null | undefined; + sourceUrls?: { [k: string]: string | null } | null | undefined; /** * In Codat's data model, dates and times are represented using the ISO 8601 standard. Date and time fields are formatted as strings; for example: * @@ -238,53 +247,6 @@ export const AccountingAddress$inboundSchema: z.ZodType< postalCode: z.nullable(z.string()).optional(), }); -/** @internal */ -export type AccountingAddress$Outbound = { - type: string; - line1?: string | null | undefined; - line2?: string | null | undefined; - city?: string | null | undefined; - region?: string | null | undefined; - country?: string | null | undefined; - postalCode?: string | null | undefined; -}; - -/** @internal */ -export const AccountingAddress$outboundSchema: z.ZodType< - AccountingAddress$Outbound, - z.ZodTypeDef, - AccountingAddress -> = z.object({ - type: AccountingAddressType$outboundSchema, - line1: z.nullable(z.string()).optional(), - line2: z.nullable(z.string()).optional(), - city: z.nullable(z.string()).optional(), - region: z.nullable(z.string()).optional(), - country: z.nullable(z.string()).optional(), - postalCode: z.nullable(z.string()).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AccountingAddress$ { - /** @deprecated use `AccountingAddress$inboundSchema` instead. */ - export const inboundSchema = AccountingAddress$inboundSchema; - /** @deprecated use `AccountingAddress$outboundSchema` instead. */ - export const outboundSchema = AccountingAddress$outboundSchema; - /** @deprecated use `AccountingAddress$Outbound` instead. */ - export type Outbound = AccountingAddress$Outbound; -} - -export function accountingAddressToJSON( - accountingAddress: AccountingAddress, -): string { - return JSON.stringify( - AccountingAddress$outboundSchema.parse(accountingAddress), - ); -} - export function accountingAddressFromJSON( jsonString: string, ): SafeParseResult { @@ -295,46 +257,18 @@ export function accountingAddressFromJSON( ); } +/** @internal */ +export const CompanyInformationPhoneNumbersType$inboundSchema: z.ZodNativeEnum< + typeof CompanyInformationPhoneNumbersType +> = z.nativeEnum(CompanyInformationPhoneNumbersType); + /** @internal */ export const Phone$inboundSchema: z.ZodType = z .object({ number: z.nullable(z.string()).optional(), - type: PhoneNumberType$inboundSchema, + type: CompanyInformationPhoneNumbersType$inboundSchema, }); -/** @internal */ -export type Phone$Outbound = { - number?: string | null | undefined; - type: string; -}; - -/** @internal */ -export const Phone$outboundSchema: z.ZodType< - Phone$Outbound, - z.ZodTypeDef, - Phone -> = z.object({ - number: z.nullable(z.string()).optional(), - type: PhoneNumberType$outboundSchema, -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Phone$ { - /** @deprecated use `Phone$inboundSchema` instead. */ - export const inboundSchema = Phone$inboundSchema; - /** @deprecated use `Phone$outboundSchema` instead. */ - export const outboundSchema = Phone$outboundSchema; - /** @deprecated use `Phone$Outbound` instead. */ - export type Outbound = Phone$Outbound; -} - -export function phoneToJSON(phone: Phone): string { - return JSON.stringify(Phone$outboundSchema.parse(phone)); -} - export function phoneFromJSON( jsonString: string, ): SafeParseResult { @@ -350,22 +284,6 @@ export const CompanyInformationType$inboundSchema: z.ZodNativeEnum< typeof CompanyInformationType > = z.nativeEnum(CompanyInformationType); -/** @internal */ -export const CompanyInformationType$outboundSchema: z.ZodNativeEnum< - typeof CompanyInformationType -> = CompanyInformationType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompanyInformationType$ { - /** @deprecated use `CompanyInformationType$inboundSchema` instead. */ - export const inboundSchema = CompanyInformationType$inboundSchema; - /** @deprecated use `CompanyInformationType$outboundSchema` instead. */ - export const outboundSchema = CompanyInformationType$outboundSchema; -} - /** @internal */ export const Weblink$inboundSchema: z.ZodType = z.object({ @@ -373,39 +291,6 @@ export const Weblink$inboundSchema: z.ZodType = url: z.string().optional(), }); -/** @internal */ -export type Weblink$Outbound = { - type?: string | undefined; - url?: string | undefined; -}; - -/** @internal */ -export const Weblink$outboundSchema: z.ZodType< - Weblink$Outbound, - z.ZodTypeDef, - Weblink -> = z.object({ - type: CompanyInformationType$outboundSchema.optional(), - url: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Weblink$ { - /** @deprecated use `Weblink$inboundSchema` instead. */ - export const inboundSchema = Weblink$inboundSchema; - /** @deprecated use `Weblink$outboundSchema` instead. */ - export const outboundSchema = Weblink$outboundSchema; - /** @deprecated use `Weblink$Outbound` instead. */ - export type Outbound = Weblink$Outbound; -} - -export function weblinkToJSON(weblink: Weblink): string { - return JSON.stringify(Weblink$outboundSchema.parse(weblink)); -} - export function weblinkFromJSON( jsonString: string, ): SafeParseResult { @@ -435,75 +320,11 @@ export const CompanyInformation$inboundSchema: z.ZodType< taxNumber: z.nullable(z.string()).optional(), financialYearStartDate: z.string().optional(), baseCurrency: z.nullable(z.string()).optional(), - sourceUrls: z.nullable(z.record(z.string())).optional(), + sourceUrls: z.nullable(z.record(z.nullable(z.string()))).optional(), createdDate: z.string().optional(), supplementalData: SupplementalData$inboundSchema.optional(), }); -/** @internal */ -export type CompanyInformation$Outbound = { - companyName?: string | null | undefined; - accountingPlatformRef?: string | null | undefined; - companyLegalName?: string | null | undefined; - addresses?: Array | null | undefined; - phoneNumbers?: Array | null | undefined; - webLinks?: Array | null | undefined; - ledgerLockDate?: string | undefined; - registrationNumber?: string | null | undefined; - taxNumber?: string | null | undefined; - financialYearStartDate?: string | undefined; - baseCurrency?: string | null | undefined; - sourceUrls?: { [k: string]: string } | null | undefined; - createdDate?: string | undefined; - supplementalData?: SupplementalData$Outbound | undefined; -}; - -/** @internal */ -export const CompanyInformation$outboundSchema: z.ZodType< - CompanyInformation$Outbound, - z.ZodTypeDef, - CompanyInformation -> = z.object({ - companyName: z.nullable(z.string()).optional(), - accountingPlatformRef: z.nullable(z.string()).optional(), - companyLegalName: z.nullable(z.string()).optional(), - addresses: z.nullable(z.array(z.lazy(() => AccountingAddress$outboundSchema))) - .optional(), - phoneNumbers: z.nullable(z.array(z.lazy(() => Phone$outboundSchema))) - .optional(), - webLinks: z.nullable(z.array(z.lazy(() => Weblink$outboundSchema))) - .optional(), - ledgerLockDate: z.string().optional(), - registrationNumber: z.nullable(z.string()).optional(), - taxNumber: z.nullable(z.string()).optional(), - financialYearStartDate: z.string().optional(), - baseCurrency: z.nullable(z.string()).optional(), - sourceUrls: z.nullable(z.record(z.string())).optional(), - createdDate: z.string().optional(), - supplementalData: SupplementalData$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompanyInformation$ { - /** @deprecated use `CompanyInformation$inboundSchema` instead. */ - export const inboundSchema = CompanyInformation$inboundSchema; - /** @deprecated use `CompanyInformation$outboundSchema` instead. */ - export const outboundSchema = CompanyInformation$outboundSchema; - /** @deprecated use `CompanyInformation$Outbound` instead. */ - export type Outbound = CompanyInformation$Outbound; -} - -export function companyInformationToJSON( - companyInformation: CompanyInformation, -): string { - return JSON.stringify( - CompanyInformation$outboundSchema.parse(companyInformation), - ); -} - export function companyInformationFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/companyreference.ts b/sync-for-expenses/src/sdk/models/shared/companyreference.ts index 6409b598a..e40af5e26 100644 --- a/sync-for-expenses/src/sdk/models/shared/companyreference.ts +++ b/sync-for-expenses/src/sdk/models/shared/companyreference.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -48,7 +48,6 @@ export const CompanyReferenceLinks$inboundSchema: z.ZodType< > = z.object({ portal: z.string().optional(), }); - /** @internal */ export type CompanyReferenceLinks$Outbound = { portal?: string | undefined; @@ -63,19 +62,6 @@ export const CompanyReferenceLinks$outboundSchema: z.ZodType< portal: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompanyReferenceLinks$ { - /** @deprecated use `CompanyReferenceLinks$inboundSchema` instead. */ - export const inboundSchema = CompanyReferenceLinks$inboundSchema; - /** @deprecated use `CompanyReferenceLinks$outboundSchema` instead. */ - export const outboundSchema = CompanyReferenceLinks$outboundSchema; - /** @deprecated use `CompanyReferenceLinks$Outbound` instead. */ - export type Outbound = CompanyReferenceLinks$Outbound; -} - export function companyReferenceLinksToJSON( companyReferenceLinks: CompanyReferenceLinks, ): string { @@ -83,7 +69,6 @@ export function companyReferenceLinksToJSON( CompanyReferenceLinks$outboundSchema.parse(companyReferenceLinks), ); } - export function companyReferenceLinksFromJSON( jsonString: string, ): SafeParseResult { @@ -106,7 +91,6 @@ export const CompanyReference$inboundSchema: z.ZodType< links: z.lazy(() => CompanyReferenceLinks$inboundSchema).optional(), tags: z.record(z.string()).optional(), }); - /** @internal */ export type CompanyReference$Outbound = { id?: string | undefined; @@ -129,19 +113,6 @@ export const CompanyReference$outboundSchema: z.ZodType< tags: z.record(z.string()).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompanyReference$ { - /** @deprecated use `CompanyReference$inboundSchema` instead. */ - export const inboundSchema = CompanyReference$inboundSchema; - /** @deprecated use `CompanyReference$outboundSchema` instead. */ - export const outboundSchema = CompanyReference$outboundSchema; - /** @deprecated use `CompanyReference$Outbound` instead. */ - export type Outbound = CompanyReference$Outbound; -} - export function companyReferenceToJSON( companyReference: CompanyReference, ): string { @@ -149,7 +120,6 @@ export function companyReferenceToJSON( CompanyReference$outboundSchema.parse(companyReference), ); } - export function companyReferenceFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/companyrequestbody.ts b/sync-for-expenses/src/sdk/models/shared/companyrequestbody.ts index 99de1b88b..5e438635a 100644 --- a/sync-for-expenses/src/sdk/models/shared/companyrequestbody.ts +++ b/sync-for-expenses/src/sdk/models/shared/companyrequestbody.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type CompanyRequestBody = { /** @@ -22,17 +19,6 @@ export type CompanyRequestBody = { tags?: { [k: string]: string } | undefined; }; -/** @internal */ -export const CompanyRequestBody$inboundSchema: z.ZodType< - CompanyRequestBody, - z.ZodTypeDef, - unknown -> = z.object({ - name: z.string(), - description: z.string().optional(), - tags: z.record(z.string()).optional(), -}); - /** @internal */ export type CompanyRequestBody$Outbound = { name: string; @@ -51,19 +37,6 @@ export const CompanyRequestBody$outboundSchema: z.ZodType< tags: z.record(z.string()).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompanyRequestBody$ { - /** @deprecated use `CompanyRequestBody$inboundSchema` instead. */ - export const inboundSchema = CompanyRequestBody$inboundSchema; - /** @deprecated use `CompanyRequestBody$outboundSchema` instead. */ - export const outboundSchema = CompanyRequestBody$outboundSchema; - /** @deprecated use `CompanyRequestBody$Outbound` instead. */ - export type Outbound = CompanyRequestBody$Outbound; -} - export function companyRequestBodyToJSON( companyRequestBody: CompanyRequestBody, ): string { @@ -71,13 +44,3 @@ export function companyRequestBodyToJSON( CompanyRequestBody$outboundSchema.parse(companyRequestBody), ); } - -export function companyRequestBodyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CompanyRequestBody$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CompanyRequestBody' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/companysyncstatus.ts b/sync-for-expenses/src/sdk/models/shared/companysyncstatus.ts index 22055b840..72e7076d3 100644 --- a/sync-for-expenses/src/sdk/models/shared/companysyncstatus.ts +++ b/sync-for-expenses/src/sdk/models/shared/companysyncstatus.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -76,55 +76,6 @@ export const CompanySyncStatus$inboundSchema: z.ZodType< dataPushed: z.boolean().optional(), }); -/** @internal */ -export type CompanySyncStatus$Outbound = { - companyId?: string | null | undefined; - syncId?: string | null | undefined; - syncStatusCode?: number | undefined; - syncStatus?: string | null | undefined; - errorMessage?: string | null | undefined; - syncExceptionMessage?: string | null | undefined; - syncUtc?: string | undefined; - dataPushed?: boolean | undefined; -}; - -/** @internal */ -export const CompanySyncStatus$outboundSchema: z.ZodType< - CompanySyncStatus$Outbound, - z.ZodTypeDef, - CompanySyncStatus -> = z.object({ - companyId: z.nullable(z.string()).optional(), - syncId: z.nullable(z.string()).optional(), - syncStatusCode: z.number().int().optional(), - syncStatus: z.nullable(z.string()).optional(), - errorMessage: z.nullable(z.string()).optional(), - syncExceptionMessage: z.nullable(z.string()).optional(), - syncUtc: z.string().optional(), - dataPushed: z.boolean().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompanySyncStatus$ { - /** @deprecated use `CompanySyncStatus$inboundSchema` instead. */ - export const inboundSchema = CompanySyncStatus$inboundSchema; - /** @deprecated use `CompanySyncStatus$outboundSchema` instead. */ - export const outboundSchema = CompanySyncStatus$outboundSchema; - /** @deprecated use `CompanySyncStatus$Outbound` instead. */ - export type Outbound = CompanySyncStatus$Outbound; -} - -export function companySyncStatusToJSON( - companySyncStatus: CompanySyncStatus, -): string { - return JSON.stringify( - CompanySyncStatus$outboundSchema.parse(companySyncStatus), - ); -} - export function companySyncStatusFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/companyupdaterequest.ts b/sync-for-expenses/src/sdk/models/shared/companyupdaterequest.ts new file mode 100644 index 000000000..442b7a78c --- /dev/null +++ b/sync-for-expenses/src/sdk/models/shared/companyupdaterequest.ts @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v3"; + +export type CompanyUpdateRequest = { + /** + * Name of company being connected. + */ + name?: string | undefined; + /** + * Additional information about the company. This can be used to store foreign IDs, references, etc. + */ + description?: string | undefined; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + */ + tags?: { [k: string]: string } | undefined; +}; + +/** @internal */ +export type CompanyUpdateRequest$Outbound = { + name?: string | undefined; + description?: string | undefined; + tags?: { [k: string]: string } | undefined; +}; + +/** @internal */ +export const CompanyUpdateRequest$outboundSchema: z.ZodType< + CompanyUpdateRequest$Outbound, + z.ZodTypeDef, + CompanyUpdateRequest +> = z.object({ + name: z.string().optional(), + description: z.string().optional(), + tags: z.record(z.string()).optional(), +}); + +export function companyUpdateRequestToJSON( + companyUpdateRequest: CompanyUpdateRequest, +): string { + return JSON.stringify( + CompanyUpdateRequest$outboundSchema.parse(companyUpdateRequest), + ); +} diff --git a/sync-for-expenses/src/sdk/models/shared/connection.ts b/sync-for-expenses/src/sdk/models/shared/connection.ts index 974b3c6a6..73b4943c5 100644 --- a/sync-for-expenses/src/sdk/models/shared/connection.ts +++ b/sync-for-expenses/src/sdk/models/shared/connection.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -10,13 +10,10 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { DataConnectionError, DataConnectionError$inboundSchema, - DataConnectionError$Outbound, - DataConnectionError$outboundSchema, } from "./dataconnectionerror.js"; import { DataConnectionStatus, DataConnectionStatus$inboundSchema, - DataConnectionStatus$outboundSchema, } from "./dataconnectionstatus.js"; /** @@ -128,28 +125,13 @@ export type Connection = { */ created: string; dataConnectionErrors?: Array | null | undefined; - connectionInfo?: { [k: string]: string } | null | undefined; + connectionInfo?: { [k: string]: any } | null | undefined; }; /** @internal */ export const SourceType$inboundSchema: z.ZodNativeEnum = z .nativeEnum(SourceType); -/** @internal */ -export const SourceType$outboundSchema: z.ZodNativeEnum = - SourceType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SourceType$ { - /** @deprecated use `SourceType$inboundSchema` instead. */ - export const inboundSchema = SourceType$inboundSchema; - /** @deprecated use `SourceType$outboundSchema` instead. */ - export const outboundSchema = SourceType$outboundSchema; -} - /** @internal */ export const Connection$inboundSchema: z.ZodType< Connection, @@ -168,63 +150,9 @@ export const Connection$inboundSchema: z.ZodType< created: z.string(), dataConnectionErrors: z.nullable(z.array(DataConnectionError$inboundSchema)) .optional(), - connectionInfo: z.nullable(z.record(z.string())).optional(), + connectionInfo: z.nullable(z.record(z.any())).optional(), }); -/** @internal */ -export type Connection$Outbound = { - id: string; - integrationId: string; - integrationKey: string; - sourceId: string; - sourceType: string; - platformName: string; - linkUrl: string; - status: string; - lastSync?: string | undefined; - created: string; - dataConnectionErrors?: Array | null | undefined; - connectionInfo?: { [k: string]: string } | null | undefined; -}; - -/** @internal */ -export const Connection$outboundSchema: z.ZodType< - Connection$Outbound, - z.ZodTypeDef, - Connection -> = z.object({ - id: z.string(), - integrationId: z.string(), - integrationKey: z.string(), - sourceId: z.string(), - sourceType: SourceType$outboundSchema, - platformName: z.string(), - linkUrl: z.string(), - status: DataConnectionStatus$outboundSchema, - lastSync: z.string().optional(), - created: z.string(), - dataConnectionErrors: z.nullable(z.array(DataConnectionError$outboundSchema)) - .optional(), - connectionInfo: z.nullable(z.record(z.string())).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Connection$ { - /** @deprecated use `Connection$inboundSchema` instead. */ - export const inboundSchema = Connection$inboundSchema; - /** @deprecated use `Connection$outboundSchema` instead. */ - export const outboundSchema = Connection$outboundSchema; - /** @deprecated use `Connection$Outbound` instead. */ - export type Outbound = Connection$Outbound; -} - -export function connectionToJSON(connection: Connection): string { - return JSON.stringify(Connection$outboundSchema.parse(connection)); -} - export function connectionFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/connections.ts b/sync-for-expenses/src/sdk/models/shared/connections.ts index f954a6903..1278d54c3 100644 --- a/sync-for-expenses/src/sdk/models/shared/connections.ts +++ b/sync-for-expenses/src/sdk/models/shared/connections.ts @@ -2,23 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - Connection, - Connection$inboundSchema, - Connection$Outbound, - Connection$outboundSchema, -} from "./connection.js"; -import { - Links, - Links$inboundSchema, - Links$Outbound, - Links$outboundSchema, -} from "./links.js"; +import { Connection, Connection$inboundSchema } from "./connection.js"; +import { Links, Links$inboundSchema } from "./links.js"; export type Connections = { results?: Array | undefined; @@ -54,49 +44,6 @@ export const Connections$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type Connections$Outbound = { - results?: Array | undefined; - pageNumber: number; - pageSize: number; - totalResults: number; - _links: Links$Outbound; -}; - -/** @internal */ -export const Connections$outboundSchema: z.ZodType< - Connections$Outbound, - z.ZodTypeDef, - Connections -> = z.object({ - results: z.array(Connection$outboundSchema).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - links: Links$outboundSchema, -}).transform((v) => { - return remap$(v, { - links: "_links", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Connections$ { - /** @deprecated use `Connections$inboundSchema` instead. */ - export const inboundSchema = Connections$inboundSchema; - /** @deprecated use `Connections$outboundSchema` instead. */ - export const outboundSchema = Connections$outboundSchema; - /** @deprecated use `Connections$Outbound` instead. */ - export type Outbound = Connections$Outbound; -} - -export function connectionsToJSON(connections: Connections): string { - return JSON.stringify(Connections$outboundSchema.parse(connections)); -} - export function connectionsFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/contact.ts b/sync-for-expenses/src/sdk/models/shared/contact.ts index e34c24790..8b386531d 100644 --- a/sync-for-expenses/src/sdk/models/shared/contact.ts +++ b/sync-for-expenses/src/sdk/models/shared/contact.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -76,7 +76,6 @@ export const Contact$inboundSchema: z.ZodType = status: CustomerStatus$inboundSchema, modifiedDate: z.string().optional(), }); - /** @internal */ export type Contact$Outbound = { name?: string | null | undefined; @@ -101,23 +100,9 @@ export const Contact$outboundSchema: z.ZodType< modifiedDate: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Contact$ { - /** @deprecated use `Contact$inboundSchema` instead. */ - export const inboundSchema = Contact$inboundSchema; - /** @deprecated use `Contact$outboundSchema` instead. */ - export const outboundSchema = Contact$outboundSchema; - /** @deprecated use `Contact$Outbound` instead. */ - export type Outbound = Contact$Outbound; -} - export function contactToJSON(contact: Contact): string { return JSON.stringify(Contact$outboundSchema.parse(contact)); } - export function contactFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/createaccountresponse.ts b/sync-for-expenses/src/sdk/models/shared/createaccountresponse.ts index 8281dc37f..139da5baa 100644 --- a/sync-for-expenses/src/sdk/models/shared/createaccountresponse.ts +++ b/sync-for-expenses/src/sdk/models/shared/createaccountresponse.ts @@ -2,49 +2,30 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Decimal as Decimal$ } from "../../types/decimal.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - AccountStatus, - AccountStatus$inboundSchema, - AccountStatus$outboundSchema, -} from "./accountstatus.js"; -import { - AccountType, - AccountType$inboundSchema, - AccountType$outboundSchema, -} from "./accounttype.js"; +import { AccountStatus, AccountStatus$inboundSchema } from "./accountstatus.js"; +import { AccountType, AccountType$inboundSchema } from "./accounttype.js"; import { PropertieDataType, PropertieDataType$inboundSchema, - PropertieDataType$outboundSchema, } from "./propertiedatatype.js"; import { PushOperationChange, PushOperationChange$inboundSchema, - PushOperationChange$Outbound, - PushOperationChange$outboundSchema, } from "./pushoperationchange.js"; import { PushOperationStatus, PushOperationStatus$inboundSchema, - PushOperationStatus$outboundSchema, } from "./pushoperationstatus.js"; import { SupplementalData, SupplementalData$inboundSchema, - SupplementalData$Outbound, - SupplementalData$outboundSchema, } from "./supplementaldata.js"; -import { - Validation, - Validation$inboundSchema, - Validation$Outbound, - Validation$outboundSchema, -} from "./validation.js"; +import { Validation, Validation$inboundSchema } from "./validation.js"; /** * When querying Codat's data model, some data types return `validDatatypeLinks` metadata in the JSON response. This indicates where that object can be used as a reference—a _valid link_—when creating or updating other data. @@ -324,48 +305,6 @@ export const CreateAccountResponseValidDataTypeLinks$inboundSchema: z.ZodType< links: z.nullable(z.array(z.string())).optional(), }); -/** @internal */ -export type CreateAccountResponseValidDataTypeLinks$Outbound = { - property?: string | null | undefined; - links?: Array | null | undefined; -}; - -/** @internal */ -export const CreateAccountResponseValidDataTypeLinks$outboundSchema: z.ZodType< - CreateAccountResponseValidDataTypeLinks$Outbound, - z.ZodTypeDef, - CreateAccountResponseValidDataTypeLinks -> = z.object({ - property: z.nullable(z.string()).optional(), - links: z.nullable(z.array(z.string())).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateAccountResponseValidDataTypeLinks$ { - /** @deprecated use `CreateAccountResponseValidDataTypeLinks$inboundSchema` instead. */ - export const inboundSchema = - CreateAccountResponseValidDataTypeLinks$inboundSchema; - /** @deprecated use `CreateAccountResponseValidDataTypeLinks$outboundSchema` instead. */ - export const outboundSchema = - CreateAccountResponseValidDataTypeLinks$outboundSchema; - /** @deprecated use `CreateAccountResponseValidDataTypeLinks$Outbound` instead. */ - export type Outbound = CreateAccountResponseValidDataTypeLinks$Outbound; -} - -export function createAccountResponseValidDataTypeLinksToJSON( - createAccountResponseValidDataTypeLinks: - CreateAccountResponseValidDataTypeLinks, -): string { - return JSON.stringify( - CreateAccountResponseValidDataTypeLinks$outboundSchema.parse( - createAccountResponseValidDataTypeLinks, - ), - ); -} - export function createAccountResponseValidDataTypeLinksFromJSON( jsonString: string, ): SafeParseResult< @@ -391,43 +330,6 @@ export const CreateAccountResponseMetadata$inboundSchema: z.ZodType< isDeleted: z.nullable(z.boolean()).optional(), }); -/** @internal */ -export type CreateAccountResponseMetadata$Outbound = { - isDeleted?: boolean | null | undefined; -}; - -/** @internal */ -export const CreateAccountResponseMetadata$outboundSchema: z.ZodType< - CreateAccountResponseMetadata$Outbound, - z.ZodTypeDef, - CreateAccountResponseMetadata -> = z.object({ - isDeleted: z.nullable(z.boolean()).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateAccountResponseMetadata$ { - /** @deprecated use `CreateAccountResponseMetadata$inboundSchema` instead. */ - export const inboundSchema = CreateAccountResponseMetadata$inboundSchema; - /** @deprecated use `CreateAccountResponseMetadata$outboundSchema` instead. */ - export const outboundSchema = CreateAccountResponseMetadata$outboundSchema; - /** @deprecated use `CreateAccountResponseMetadata$Outbound` instead. */ - export type Outbound = CreateAccountResponseMetadata$Outbound; -} - -export function createAccountResponseMetadataToJSON( - createAccountResponseMetadata: CreateAccountResponseMetadata, -): string { - return JSON.stringify( - CreateAccountResponseMetadata$outboundSchema.parse( - createAccountResponseMetadata, - ), - ); -} - export function createAccountResponseMetadataFromJSON( jsonString: string, ): SafeParseResult { @@ -468,83 +370,6 @@ export const AccountingAccount$inboundSchema: z.ZodType< .optional(), }); -/** @internal */ -export type AccountingAccount$Outbound = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - id?: string | undefined; - nominalCode?: string | null | undefined; - name?: string | null | undefined; - description?: string | null | undefined; - fullyQualifiedCategory?: string | null | undefined; - fullyQualifiedName?: string | null | undefined; - currency?: string | undefined; - currentBalance?: number | null | undefined; - type?: string | undefined; - status?: string | undefined; - isBankAccount?: boolean | undefined; - validDatatypeLinks?: - | Array - | null - | undefined; - supplementalData?: SupplementalData$Outbound | undefined; - metadata?: CreateAccountResponseMetadata$Outbound | undefined; -}; - -/** @internal */ -export const AccountingAccount$outboundSchema: z.ZodType< - AccountingAccount$Outbound, - z.ZodTypeDef, - AccountingAccount -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - nominalCode: z.nullable(z.string()).optional(), - name: z.nullable(z.string()).optional(), - description: z.nullable(z.string()).optional(), - fullyQualifiedCategory: z.nullable(z.string()).optional(), - fullyQualifiedName: z.nullable(z.string()).optional(), - currency: z.string().optional(), - currentBalance: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - type: AccountType$outboundSchema.optional(), - status: AccountStatus$outboundSchema.optional(), - isBankAccount: z.boolean().optional(), - validDatatypeLinks: z.nullable( - z.array( - z.lazy(() => CreateAccountResponseValidDataTypeLinks$outboundSchema), - ), - ).optional(), - supplementalData: SupplementalData$outboundSchema.optional(), - metadata: z.lazy(() => CreateAccountResponseMetadata$outboundSchema) - .optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AccountingAccount$ { - /** @deprecated use `AccountingAccount$inboundSchema` instead. */ - export const inboundSchema = AccountingAccount$inboundSchema; - /** @deprecated use `AccountingAccount$outboundSchema` instead. */ - export const outboundSchema = AccountingAccount$outboundSchema; - /** @deprecated use `AccountingAccount$Outbound` instead. */ - export type Outbound = AccountingAccount$Outbound; -} - -export function accountingAccountToJSON( - accountingAccount: AccountingAccount, -): string { - return JSON.stringify( - AccountingAccount$outboundSchema.parse(accountingAccount), - ); -} - export function accountingAccountFromJSON( jsonString: string, ): SafeParseResult { @@ -577,67 +402,6 @@ export const CreateAccountResponse$inboundSchema: z.ZodType< statusCode: z.number().int(), }); -/** @internal */ -export type CreateAccountResponse$Outbound = { - data?: AccountingAccount$Outbound | null | undefined; - changes?: Array | null | undefined; - dataType?: string | undefined; - companyId: string; - pushOperationKey: string; - dataConnectionKey: string; - requestedOnUtc: string; - completedOnUtc?: string | undefined; - timeoutInMinutes?: number | null | undefined; - timeoutInSeconds?: number | null | undefined; - status: string; - errorMessage?: string | null | undefined; - validation?: Validation$Outbound | undefined; - statusCode: number; -}; - -/** @internal */ -export const CreateAccountResponse$outboundSchema: z.ZodType< - CreateAccountResponse$Outbound, - z.ZodTypeDef, - CreateAccountResponse -> = z.object({ - data: z.nullable(z.lazy(() => AccountingAccount$outboundSchema)).optional(), - changes: z.nullable(z.array(PushOperationChange$outboundSchema)).optional(), - dataType: PropertieDataType$outboundSchema.optional(), - companyId: z.string(), - pushOperationKey: z.string(), - dataConnectionKey: z.string(), - requestedOnUtc: z.string(), - completedOnUtc: z.string().optional(), - timeoutInMinutes: z.nullable(z.number().int()).optional(), - timeoutInSeconds: z.nullable(z.number().int()).optional(), - status: PushOperationStatus$outboundSchema, - errorMessage: z.nullable(z.string()).optional(), - validation: Validation$outboundSchema.optional(), - statusCode: z.number().int(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateAccountResponse$ { - /** @deprecated use `CreateAccountResponse$inboundSchema` instead. */ - export const inboundSchema = CreateAccountResponse$inboundSchema; - /** @deprecated use `CreateAccountResponse$outboundSchema` instead. */ - export const outboundSchema = CreateAccountResponse$outboundSchema; - /** @deprecated use `CreateAccountResponse$Outbound` instead. */ - export type Outbound = CreateAccountResponse$Outbound; -} - -export function createAccountResponseToJSON( - createAccountResponse: CreateAccountResponse, -): string { - return JSON.stringify( - CreateAccountResponse$outboundSchema.parse(createAccountResponse), - ); -} - export function createAccountResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/createbankaccountresponse.ts b/sync-for-expenses/src/sdk/models/shared/createbankaccountresponse.ts index 9710d0853..a469b4f9a 100644 --- a/sync-for-expenses/src/sdk/models/shared/createbankaccountresponse.ts +++ b/sync-for-expenses/src/sdk/models/shared/createbankaccountresponse.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Decimal as Decimal$ } from "../../types/decimal.js"; import { ClosedEnum } from "../../types/enums.js"; @@ -11,42 +11,25 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { BankAccountStatus, BankAccountStatus$inboundSchema, - BankAccountStatus$outboundSchema, } from "./bankaccountstatus.js"; -import { - Metadata, - Metadata$inboundSchema, - Metadata$Outbound, - Metadata$outboundSchema, -} from "./metadata.js"; +import { Metadata, Metadata$inboundSchema } from "./metadata.js"; import { PropertieDataType, PropertieDataType$inboundSchema, - PropertieDataType$outboundSchema, } from "./propertiedatatype.js"; import { PushOperationChange, PushOperationChange$inboundSchema, - PushOperationChange$Outbound, - PushOperationChange$outboundSchema, } from "./pushoperationchange.js"; import { PushOperationStatus, PushOperationStatus$inboundSchema, - PushOperationStatus$outboundSchema, } from "./pushoperationstatus.js"; import { SupplementalData, SupplementalData$inboundSchema, - SupplementalData$Outbound, - SupplementalData$outboundSchema, } from "./supplementaldata.js"; -import { - Validation, - Validation$inboundSchema, - Validation$Outbound, - Validation$outboundSchema, -} from "./validation.js"; +import { Validation, Validation$inboundSchema } from "./validation.js"; /** * The type of transactions and balances on the account. @@ -285,24 +268,6 @@ export const CreateBankAccountResponseBankAccountType$inboundSchema: z.ZodNativeEnum = z .nativeEnum(CreateBankAccountResponseBankAccountType); -/** @internal */ -export const CreateBankAccountResponseBankAccountType$outboundSchema: - z.ZodNativeEnum = - CreateBankAccountResponseBankAccountType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateBankAccountResponseBankAccountType$ { - /** @deprecated use `CreateBankAccountResponseBankAccountType$inboundSchema` instead. */ - export const inboundSchema = - CreateBankAccountResponseBankAccountType$inboundSchema; - /** @deprecated use `CreateBankAccountResponseBankAccountType$outboundSchema` instead. */ - export const outboundSchema = - CreateBankAccountResponseBankAccountType$outboundSchema; -} - /** @internal */ export const AccountingBankAccount$inboundSchema: z.ZodType< AccountingBankAccount, @@ -331,86 +296,6 @@ export const AccountingBankAccount$inboundSchema: z.ZodType< supplementalData: SupplementalData$inboundSchema.optional(), }); -/** @internal */ -export type AccountingBankAccount$Outbound = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - id?: string | undefined; - accountName?: string | null | undefined; - accountType?: string | undefined; - nominalCode?: string | null | undefined; - sortCode?: string | null | undefined; - accountNumber?: string | null | undefined; - iBan?: string | null | undefined; - currency?: string | undefined; - balance?: number | null | undefined; - institution?: string | null | undefined; - availableBalance?: number | null | undefined; - overdraftLimit?: number | null | undefined; - status?: string | undefined; - metadata?: Metadata$Outbound | undefined; - supplementalData?: SupplementalData$Outbound | undefined; -}; - -/** @internal */ -export const AccountingBankAccount$outboundSchema: z.ZodType< - AccountingBankAccount$Outbound, - z.ZodTypeDef, - AccountingBankAccount -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - accountName: z.nullable(z.string()).optional(), - accountType: CreateBankAccountResponseBankAccountType$outboundSchema - .optional(), - nominalCode: z.nullable(z.string()).optional(), - sortCode: z.nullable(z.string()).optional(), - accountNumber: z.nullable(z.string()).optional(), - iBan: z.nullable(z.string()).optional(), - currency: z.string().optional(), - balance: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - institution: z.nullable(z.string()).optional(), - availableBalance: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - overdraftLimit: z.nullable( - z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ), - ).optional(), - status: BankAccountStatus$outboundSchema.optional(), - metadata: Metadata$outboundSchema.optional(), - supplementalData: SupplementalData$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AccountingBankAccount$ { - /** @deprecated use `AccountingBankAccount$inboundSchema` instead. */ - export const inboundSchema = AccountingBankAccount$inboundSchema; - /** @deprecated use `AccountingBankAccount$outboundSchema` instead. */ - export const outboundSchema = AccountingBankAccount$outboundSchema; - /** @deprecated use `AccountingBankAccount$Outbound` instead. */ - export type Outbound = AccountingBankAccount$Outbound; -} - -export function accountingBankAccountToJSON( - accountingBankAccount: AccountingBankAccount, -): string { - return JSON.stringify( - AccountingBankAccount$outboundSchema.parse(accountingBankAccount), - ); -} - export function accountingBankAccountFromJSON( jsonString: string, ): SafeParseResult { @@ -444,68 +329,6 @@ export const CreateBankAccountResponse$inboundSchema: z.ZodType< statusCode: z.number().int(), }); -/** @internal */ -export type CreateBankAccountResponse$Outbound = { - data?: AccountingBankAccount$Outbound | null | undefined; - changes?: Array | null | undefined; - dataType?: string | undefined; - companyId: string; - pushOperationKey: string; - dataConnectionKey: string; - requestedOnUtc: string; - completedOnUtc?: string | undefined; - timeoutInMinutes?: number | null | undefined; - timeoutInSeconds?: number | null | undefined; - status: string; - errorMessage?: string | null | undefined; - validation?: Validation$Outbound | undefined; - statusCode: number; -}; - -/** @internal */ -export const CreateBankAccountResponse$outboundSchema: z.ZodType< - CreateBankAccountResponse$Outbound, - z.ZodTypeDef, - CreateBankAccountResponse -> = z.object({ - data: z.nullable(z.lazy(() => AccountingBankAccount$outboundSchema)) - .optional(), - changes: z.nullable(z.array(PushOperationChange$outboundSchema)).optional(), - dataType: PropertieDataType$outboundSchema.optional(), - companyId: z.string(), - pushOperationKey: z.string(), - dataConnectionKey: z.string(), - requestedOnUtc: z.string(), - completedOnUtc: z.string().optional(), - timeoutInMinutes: z.nullable(z.number().int()).optional(), - timeoutInSeconds: z.nullable(z.number().int()).optional(), - status: PushOperationStatus$outboundSchema, - errorMessage: z.nullable(z.string()).optional(), - validation: Validation$outboundSchema.optional(), - statusCode: z.number().int(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateBankAccountResponse$ { - /** @deprecated use `CreateBankAccountResponse$inboundSchema` instead. */ - export const inboundSchema = CreateBankAccountResponse$inboundSchema; - /** @deprecated use `CreateBankAccountResponse$outboundSchema` instead. */ - export const outboundSchema = CreateBankAccountResponse$outboundSchema; - /** @deprecated use `CreateBankAccountResponse$Outbound` instead. */ - export type Outbound = CreateBankAccountResponse$Outbound; -} - -export function createBankAccountResponseToJSON( - createBankAccountResponse: CreateBankAccountResponse, -): string { - return JSON.stringify( - CreateBankAccountResponse$outboundSchema.parse(createBankAccountResponse), - ); -} - export function createBankAccountResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/createcustomerresponse.ts b/sync-for-expenses/src/sdk/models/shared/createcustomerresponse.ts index d35b2e51e..70a6883c3 100644 --- a/sync-for-expenses/src/sdk/models/shared/createcustomerresponse.ts +++ b/sync-for-expenses/src/sdk/models/shared/createcustomerresponse.ts @@ -2,61 +2,34 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - Contact, - Contact$inboundSchema, - Contact$Outbound, - Contact$outboundSchema, -} from "./contact.js"; +import { Contact, Contact$inboundSchema } from "./contact.js"; import { CustomerStatus, CustomerStatus$inboundSchema, - CustomerStatus$outboundSchema, } from "./customerstatus.js"; -import { - Items, - Items$inboundSchema, - Items$Outbound, - Items$outboundSchema, -} from "./items.js"; -import { - Metadata, - Metadata$inboundSchema, - Metadata$Outbound, - Metadata$outboundSchema, -} from "./metadata.js"; +import { Items, Items$inboundSchema } from "./items.js"; +import { Metadata, Metadata$inboundSchema } from "./metadata.js"; import { PropertieDataType, PropertieDataType$inboundSchema, - PropertieDataType$outboundSchema, } from "./propertiedatatype.js"; import { PushOperationChange, PushOperationChange$inboundSchema, - PushOperationChange$Outbound, - PushOperationChange$outboundSchema, } from "./pushoperationchange.js"; import { PushOperationStatus, PushOperationStatus$inboundSchema, - PushOperationStatus$outboundSchema, } from "./pushoperationstatus.js"; import { SupplementalData, SupplementalData$inboundSchema, - SupplementalData$Outbound, - SupplementalData$outboundSchema, } from "./supplementaldata.js"; -import { - Validation, - Validation$inboundSchema, - Validation$Outbound, - Validation$outboundSchema, -} from "./validation.js"; +import { Validation, Validation$inboundSchema } from "./validation.js"; /** * ## Overview @@ -252,69 +225,6 @@ export const AccountingCustomer$inboundSchema: z.ZodType< supplementalData: SupplementalData$inboundSchema.optional(), }); -/** @internal */ -export type AccountingCustomer$Outbound = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - id?: string | undefined; - customerName?: string | null | undefined; - contactName?: string | null | undefined; - emailAddress?: string | null | undefined; - defaultCurrency?: string | undefined; - phone?: string | null | undefined; - addresses?: Array | null | undefined; - contacts?: Array | null | undefined; - registrationNumber?: string | null | undefined; - taxNumber?: string | null | undefined; - status: string; - metadata?: Metadata$Outbound | undefined; - supplementalData?: SupplementalData$Outbound | undefined; -}; - -/** @internal */ -export const AccountingCustomer$outboundSchema: z.ZodType< - AccountingCustomer$Outbound, - z.ZodTypeDef, - AccountingCustomer -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - customerName: z.nullable(z.string()).optional(), - contactName: z.nullable(z.string()).optional(), - emailAddress: z.nullable(z.string()).optional(), - defaultCurrency: z.string().optional(), - phone: z.nullable(z.string()).optional(), - addresses: z.nullable(z.array(Items$outboundSchema)).optional(), - contacts: z.nullable(z.array(Contact$outboundSchema)).optional(), - registrationNumber: z.nullable(z.string()).optional(), - taxNumber: z.nullable(z.string()).optional(), - status: CustomerStatus$outboundSchema, - metadata: Metadata$outboundSchema.optional(), - supplementalData: SupplementalData$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AccountingCustomer$ { - /** @deprecated use `AccountingCustomer$inboundSchema` instead. */ - export const inboundSchema = AccountingCustomer$inboundSchema; - /** @deprecated use `AccountingCustomer$outboundSchema` instead. */ - export const outboundSchema = AccountingCustomer$outboundSchema; - /** @deprecated use `AccountingCustomer$Outbound` instead. */ - export type Outbound = AccountingCustomer$Outbound; -} - -export function accountingCustomerToJSON( - accountingCustomer: AccountingCustomer, -): string { - return JSON.stringify( - AccountingCustomer$outboundSchema.parse(accountingCustomer), - ); -} - export function accountingCustomerFromJSON( jsonString: string, ): SafeParseResult { @@ -347,67 +257,6 @@ export const CreateCustomerResponse$inboundSchema: z.ZodType< statusCode: z.number().int(), }); -/** @internal */ -export type CreateCustomerResponse$Outbound = { - data?: AccountingCustomer$Outbound | null | undefined; - changes?: Array | null | undefined; - dataType?: string | undefined; - companyId: string; - pushOperationKey: string; - dataConnectionKey: string; - requestedOnUtc: string; - completedOnUtc?: string | undefined; - timeoutInMinutes?: number | null | undefined; - timeoutInSeconds?: number | null | undefined; - status: string; - errorMessage?: string | null | undefined; - validation?: Validation$Outbound | undefined; - statusCode: number; -}; - -/** @internal */ -export const CreateCustomerResponse$outboundSchema: z.ZodType< - CreateCustomerResponse$Outbound, - z.ZodTypeDef, - CreateCustomerResponse -> = z.object({ - data: z.nullable(z.lazy(() => AccountingCustomer$outboundSchema)).optional(), - changes: z.nullable(z.array(PushOperationChange$outboundSchema)).optional(), - dataType: PropertieDataType$outboundSchema.optional(), - companyId: z.string(), - pushOperationKey: z.string(), - dataConnectionKey: z.string(), - requestedOnUtc: z.string(), - completedOnUtc: z.string().optional(), - timeoutInMinutes: z.nullable(z.number().int()).optional(), - timeoutInSeconds: z.nullable(z.number().int()).optional(), - status: PushOperationStatus$outboundSchema, - errorMessage: z.nullable(z.string()).optional(), - validation: Validation$outboundSchema.optional(), - statusCode: z.number().int(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateCustomerResponse$ { - /** @deprecated use `CreateCustomerResponse$inboundSchema` instead. */ - export const inboundSchema = CreateCustomerResponse$inboundSchema; - /** @deprecated use `CreateCustomerResponse$outboundSchema` instead. */ - export const outboundSchema = CreateCustomerResponse$outboundSchema; - /** @deprecated use `CreateCustomerResponse$Outbound` instead. */ - export type Outbound = CreateCustomerResponse$Outbound; -} - -export function createCustomerResponseToJSON( - createCustomerResponse: CreateCustomerResponse, -): string { - return JSON.stringify( - CreateCustomerResponse$outboundSchema.parse(createCustomerResponse), - ); -} - export function createCustomerResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/createexpenseresponse.ts b/sync-for-expenses/src/sdk/models/shared/createexpenseresponse.ts index ed43325bf..06b938906 100644 --- a/sync-for-expenses/src/sdk/models/shared/createexpenseresponse.ts +++ b/sync-for-expenses/src/sdk/models/shared/createexpenseresponse.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -23,41 +23,6 @@ export const CreateExpenseResponse$inboundSchema: z.ZodType< syncId: z.string().optional(), }); -/** @internal */ -export type CreateExpenseResponse$Outbound = { - syncId?: string | undefined; -}; - -/** @internal */ -export const CreateExpenseResponse$outboundSchema: z.ZodType< - CreateExpenseResponse$Outbound, - z.ZodTypeDef, - CreateExpenseResponse -> = z.object({ - syncId: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateExpenseResponse$ { - /** @deprecated use `CreateExpenseResponse$inboundSchema` instead. */ - export const inboundSchema = CreateExpenseResponse$inboundSchema; - /** @deprecated use `CreateExpenseResponse$outboundSchema` instead. */ - export const outboundSchema = CreateExpenseResponse$outboundSchema; - /** @deprecated use `CreateExpenseResponse$Outbound` instead. */ - export type Outbound = CreateExpenseResponse$Outbound; -} - -export function createExpenseResponseToJSON( - createExpenseResponse: CreateExpenseResponse, -): string { - return JSON.stringify( - CreateExpenseResponse$outboundSchema.parse(createExpenseResponse), - ); -} - export function createExpenseResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/createreimbursableexpenseresponse.ts b/sync-for-expenses/src/sdk/models/shared/createreimbursableexpenseresponse.ts index 9d55eeded..4e9005bea 100644 --- a/sync-for-expenses/src/sdk/models/shared/createreimbursableexpenseresponse.ts +++ b/sync-for-expenses/src/sdk/models/shared/createreimbursableexpenseresponse.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -23,44 +23,6 @@ export const CreateReimbursableExpenseResponse$inboundSchema: z.ZodType< syncId: z.string().optional(), }); -/** @internal */ -export type CreateReimbursableExpenseResponse$Outbound = { - syncId?: string | undefined; -}; - -/** @internal */ -export const CreateReimbursableExpenseResponse$outboundSchema: z.ZodType< - CreateReimbursableExpenseResponse$Outbound, - z.ZodTypeDef, - CreateReimbursableExpenseResponse -> = z.object({ - syncId: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateReimbursableExpenseResponse$ { - /** @deprecated use `CreateReimbursableExpenseResponse$inboundSchema` instead. */ - export const inboundSchema = CreateReimbursableExpenseResponse$inboundSchema; - /** @deprecated use `CreateReimbursableExpenseResponse$outboundSchema` instead. */ - export const outboundSchema = - CreateReimbursableExpenseResponse$outboundSchema; - /** @deprecated use `CreateReimbursableExpenseResponse$Outbound` instead. */ - export type Outbound = CreateReimbursableExpenseResponse$Outbound; -} - -export function createReimbursableExpenseResponseToJSON( - createReimbursableExpenseResponse: CreateReimbursableExpenseResponse, -): string { - return JSON.stringify( - CreateReimbursableExpenseResponse$outboundSchema.parse( - createReimbursableExpenseResponse, - ), - ); -} - export function createReimbursableExpenseResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/createsupplierresponse.ts b/sync-for-expenses/src/sdk/models/shared/createsupplierresponse.ts index 62c04f5cc..1f0ed5664 100644 --- a/sync-for-expenses/src/sdk/models/shared/createsupplierresponse.ts +++ b/sync-for-expenses/src/sdk/models/shared/createsupplierresponse.ts @@ -2,55 +2,33 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - Items, - Items$inboundSchema, - Items$Outbound, - Items$outboundSchema, -} from "./items.js"; -import { - Metadata, - Metadata$inboundSchema, - Metadata$Outbound, - Metadata$outboundSchema, -} from "./metadata.js"; +import { Items, Items$inboundSchema } from "./items.js"; +import { Metadata, Metadata$inboundSchema } from "./metadata.js"; import { PropertieDataType, PropertieDataType$inboundSchema, - PropertieDataType$outboundSchema, } from "./propertiedatatype.js"; import { PushOperationChange, PushOperationChange$inboundSchema, - PushOperationChange$Outbound, - PushOperationChange$outboundSchema, } from "./pushoperationchange.js"; import { PushOperationStatus, PushOperationStatus$inboundSchema, - PushOperationStatus$outboundSchema, } from "./pushoperationstatus.js"; import { SupplementalData, SupplementalData$inboundSchema, - SupplementalData$Outbound, - SupplementalData$outboundSchema, } from "./supplementaldata.js"; import { SupplierStatus, SupplierStatus$inboundSchema, - SupplierStatus$outboundSchema, } from "./supplierstatus.js"; -import { - Validation, - Validation$inboundSchema, - Validation$Outbound, - Validation$outboundSchema, -} from "./validation.js"; +import { Validation, Validation$inboundSchema } from "./validation.js"; /** * ## Overview @@ -231,67 +209,6 @@ export const AccountingSupplier$inboundSchema: z.ZodType< supplementalData: SupplementalData$inboundSchema.optional(), }); -/** @internal */ -export type AccountingSupplier$Outbound = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - id?: string | undefined; - supplierName?: string | null | undefined; - contactName?: string | null | undefined; - emailAddress?: string | null | undefined; - phone?: string | null | undefined; - addresses?: Array | null | undefined; - registrationNumber?: string | null | undefined; - taxNumber?: string | null | undefined; - status: string; - defaultCurrency?: string | null | undefined; - metadata?: Metadata$Outbound | undefined; - supplementalData?: SupplementalData$Outbound | undefined; -}; - -/** @internal */ -export const AccountingSupplier$outboundSchema: z.ZodType< - AccountingSupplier$Outbound, - z.ZodTypeDef, - AccountingSupplier -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - supplierName: z.nullable(z.string()).optional(), - contactName: z.nullable(z.string()).optional(), - emailAddress: z.nullable(z.string()).optional(), - phone: z.nullable(z.string()).optional(), - addresses: z.nullable(z.array(Items$outboundSchema)).optional(), - registrationNumber: z.nullable(z.string()).optional(), - taxNumber: z.nullable(z.string()).optional(), - status: SupplierStatus$outboundSchema, - defaultCurrency: z.nullable(z.string()).optional(), - metadata: Metadata$outboundSchema.optional(), - supplementalData: SupplementalData$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AccountingSupplier$ { - /** @deprecated use `AccountingSupplier$inboundSchema` instead. */ - export const inboundSchema = AccountingSupplier$inboundSchema; - /** @deprecated use `AccountingSupplier$outboundSchema` instead. */ - export const outboundSchema = AccountingSupplier$outboundSchema; - /** @deprecated use `AccountingSupplier$Outbound` instead. */ - export type Outbound = AccountingSupplier$Outbound; -} - -export function accountingSupplierToJSON( - accountingSupplier: AccountingSupplier, -): string { - return JSON.stringify( - AccountingSupplier$outboundSchema.parse(accountingSupplier), - ); -} - export function accountingSupplierFromJSON( jsonString: string, ): SafeParseResult { @@ -324,67 +241,6 @@ export const CreateSupplierResponse$inboundSchema: z.ZodType< statusCode: z.number().int(), }); -/** @internal */ -export type CreateSupplierResponse$Outbound = { - data?: AccountingSupplier$Outbound | null | undefined; - changes?: Array | null | undefined; - dataType?: string | undefined; - companyId: string; - pushOperationKey: string; - dataConnectionKey: string; - requestedOnUtc: string; - completedOnUtc?: string | undefined; - timeoutInMinutes?: number | null | undefined; - timeoutInSeconds?: number | null | undefined; - status: string; - errorMessage?: string | null | undefined; - validation?: Validation$Outbound | undefined; - statusCode: number; -}; - -/** @internal */ -export const CreateSupplierResponse$outboundSchema: z.ZodType< - CreateSupplierResponse$Outbound, - z.ZodTypeDef, - CreateSupplierResponse -> = z.object({ - data: z.nullable(z.lazy(() => AccountingSupplier$outboundSchema)).optional(), - changes: z.nullable(z.array(PushOperationChange$outboundSchema)).optional(), - dataType: PropertieDataType$outboundSchema.optional(), - companyId: z.string(), - pushOperationKey: z.string(), - dataConnectionKey: z.string(), - requestedOnUtc: z.string(), - completedOnUtc: z.string().optional(), - timeoutInMinutes: z.nullable(z.number().int()).optional(), - timeoutInSeconds: z.nullable(z.number().int()).optional(), - status: PushOperationStatus$outboundSchema, - errorMessage: z.nullable(z.string()).optional(), - validation: Validation$outboundSchema.optional(), - statusCode: z.number().int(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateSupplierResponse$ { - /** @deprecated use `CreateSupplierResponse$inboundSchema` instead. */ - export const inboundSchema = CreateSupplierResponse$inboundSchema; - /** @deprecated use `CreateSupplierResponse$outboundSchema` instead. */ - export const outboundSchema = CreateSupplierResponse$outboundSchema; - /** @deprecated use `CreateSupplierResponse$Outbound` instead. */ - export type Outbound = CreateSupplierResponse$Outbound; -} - -export function createSupplierResponseToJSON( - createSupplierResponse: CreateSupplierResponse, -): string { - return JSON.stringify( - CreateSupplierResponse$outboundSchema.parse(createSupplierResponse), - ); -} - export function createSupplierResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/customer.ts b/sync-for-expenses/src/sdk/models/shared/customer.ts index 3b5ea23df..27486842b 100644 --- a/sync-for-expenses/src/sdk/models/shared/customer.ts +++ b/sync-for-expenses/src/sdk/models/shared/customer.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -133,7 +133,6 @@ export const Customer$inboundSchema: z.ZodType< metadata: Metadata$inboundSchema.optional(), supplementalData: SupplementalData$inboundSchema.optional(), }); - /** @internal */ export type Customer$Outbound = { modifiedDate?: string | undefined; @@ -176,23 +175,9 @@ export const Customer$outboundSchema: z.ZodType< supplementalData: SupplementalData$outboundSchema.optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Customer$ { - /** @deprecated use `Customer$inboundSchema` instead. */ - export const inboundSchema = Customer$inboundSchema; - /** @deprecated use `Customer$outboundSchema` instead. */ - export const outboundSchema = Customer$outboundSchema; - /** @deprecated use `Customer$Outbound` instead. */ - export type Outbound = Customer$Outbound; -} - export function customerToJSON(customer: Customer): string { return JSON.stringify(Customer$outboundSchema.parse(customer)); } - export function customerFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/customerdetails.ts b/sync-for-expenses/src/sdk/models/shared/customerdetails.ts index 6a6b738e7..63b35720d 100644 --- a/sync-for-expenses/src/sdk/models/shared/customerdetails.ts +++ b/sync-for-expenses/src/sdk/models/shared/customerdetails.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const CustomerDetails$inboundSchema: z.ZodType< > = z.object({ id: z.string().optional(), }); - /** @internal */ export type CustomerDetails$Outbound = { id?: string | undefined; @@ -37,25 +36,11 @@ export const CustomerDetails$outboundSchema: z.ZodType< id: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CustomerDetails$ { - /** @deprecated use `CustomerDetails$inboundSchema` instead. */ - export const inboundSchema = CustomerDetails$inboundSchema; - /** @deprecated use `CustomerDetails$outboundSchema` instead. */ - export const outboundSchema = CustomerDetails$outboundSchema; - /** @deprecated use `CustomerDetails$Outbound` instead. */ - export type Outbound = CustomerDetails$Outbound; -} - export function customerDetailsToJSON( customerDetails: CustomerDetails, ): string { return JSON.stringify(CustomerDetails$outboundSchema.parse(customerDetails)); } - export function customerDetailsFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/customers.ts b/sync-for-expenses/src/sdk/models/shared/customers.ts index 3c81ad3f5..1ab044756 100644 --- a/sync-for-expenses/src/sdk/models/shared/customers.ts +++ b/sync-for-expenses/src/sdk/models/shared/customers.ts @@ -2,26 +2,16 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - Customer, - Customer$inboundSchema, - Customer$Outbound, - Customer$outboundSchema, -} from "./customer.js"; -import { - Links, - Links$inboundSchema, - Links$Outbound, - Links$outboundSchema, -} from "./links.js"; +import { Customer, Customer$inboundSchema } from "./customer.js"; +import { Links, Links$inboundSchema } from "./links.js"; export type Customers = { - results?: Array | undefined; + results?: Array | undefined; /** * Current page number. */ @@ -43,7 +33,7 @@ export const Customers$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - results: z.array(Customer$inboundSchema).optional(), + results: z.array(z.nullable(Customer$inboundSchema)).optional(), pageNumber: z.number().int(), pageSize: z.number().int(), totalResults: z.number().int(), @@ -54,49 +44,6 @@ export const Customers$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type Customers$Outbound = { - results?: Array | undefined; - pageNumber: number; - pageSize: number; - totalResults: number; - _links: Links$Outbound; -}; - -/** @internal */ -export const Customers$outboundSchema: z.ZodType< - Customers$Outbound, - z.ZodTypeDef, - Customers -> = z.object({ - results: z.array(Customer$outboundSchema).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - links: Links$outboundSchema, -}).transform((v) => { - return remap$(v, { - links: "_links", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Customers$ { - /** @deprecated use `Customers$inboundSchema` instead. */ - export const inboundSchema = Customers$inboundSchema; - /** @deprecated use `Customers$outboundSchema` instead. */ - export const outboundSchema = Customers$outboundSchema; - /** @deprecated use `Customers$Outbound` instead. */ - export type Outbound = Customers$Outbound; -} - -export function customersToJSON(customers: Customers): string { - return JSON.stringify(Customers$outboundSchema.parse(customers)); -} - export function customersFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/customerstatus.ts b/sync-for-expenses/src/sdk/models/shared/customerstatus.ts index 833be05fa..8529e7f29 100644 --- a/sync-for-expenses/src/sdk/models/shared/customerstatus.ts +++ b/sync-for-expenses/src/sdk/models/shared/customerstatus.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -22,19 +22,7 @@ export type CustomerStatus = ClosedEnum; export const CustomerStatus$inboundSchema: z.ZodNativeEnum< typeof CustomerStatus > = z.nativeEnum(CustomerStatus); - /** @internal */ export const CustomerStatus$outboundSchema: z.ZodNativeEnum< typeof CustomerStatus > = CustomerStatus$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CustomerStatus$ { - /** @deprecated use `CustomerStatus$inboundSchema` instead. */ - export const inboundSchema = CustomerStatus$inboundSchema; - /** @deprecated use `CustomerStatus$outboundSchema` instead. */ - export const outboundSchema = CustomerStatus$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/models/shared/dataconnectionerror.ts b/sync-for-expenses/src/sdk/models/shared/dataconnectionerror.ts index b94a57444..1cb816d0f 100644 --- a/sync-for-expenses/src/sdk/models/shared/dataconnectionerror.ts +++ b/sync-for-expenses/src/sdk/models/shared/dataconnectionerror.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -87,21 +87,6 @@ export type DataConnectionError = { export const ErrorStatus$inboundSchema: z.ZodNativeEnum = z .nativeEnum(ErrorStatus); -/** @internal */ -export const ErrorStatus$outboundSchema: z.ZodNativeEnum = - ErrorStatus$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ErrorStatus$ { - /** @deprecated use `ErrorStatus$inboundSchema` instead. */ - export const inboundSchema = ErrorStatus$inboundSchema; - /** @deprecated use `ErrorStatus$outboundSchema` instead. */ - export const outboundSchema = ErrorStatus$outboundSchema; -} - /** @internal */ export const DataConnectionError$inboundSchema: z.ZodType< DataConnectionError, @@ -116,51 +101,6 @@ export const DataConnectionError$inboundSchema: z.ZodType< resolvedOnUtc: z.string().optional(), }); -/** @internal */ -export type DataConnectionError$Outbound = { - statusCode?: string | undefined; - statusText?: string | undefined; - errorMessage?: string | undefined; - erroredOnUtc?: string | undefined; - status?: string | null | undefined; - resolvedOnUtc?: string | undefined; -}; - -/** @internal */ -export const DataConnectionError$outboundSchema: z.ZodType< - DataConnectionError$Outbound, - z.ZodTypeDef, - DataConnectionError -> = z.object({ - statusCode: z.string().optional(), - statusText: z.string().optional(), - errorMessage: z.string().optional(), - erroredOnUtc: z.string().optional(), - status: z.nullable(ErrorStatus$outboundSchema).optional(), - resolvedOnUtc: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DataConnectionError$ { - /** @deprecated use `DataConnectionError$inboundSchema` instead. */ - export const inboundSchema = DataConnectionError$inboundSchema; - /** @deprecated use `DataConnectionError$outboundSchema` instead. */ - export const outboundSchema = DataConnectionError$outboundSchema; - /** @deprecated use `DataConnectionError$Outbound` instead. */ - export type Outbound = DataConnectionError$Outbound; -} - -export function dataConnectionErrorToJSON( - dataConnectionError: DataConnectionError, -): string { - return JSON.stringify( - DataConnectionError$outboundSchema.parse(dataConnectionError), - ); -} - export function dataConnectionErrorFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/dataconnectionstatus.ts b/sync-for-expenses/src/sdk/models/shared/dataconnectionstatus.ts index d96ea52c0..88889c800 100644 --- a/sync-for-expenses/src/sdk/models/shared/dataconnectionstatus.ts +++ b/sync-for-expenses/src/sdk/models/shared/dataconnectionstatus.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -23,19 +23,7 @@ export type DataConnectionStatus = ClosedEnum; export const DataConnectionStatus$inboundSchema: z.ZodNativeEnum< typeof DataConnectionStatus > = z.nativeEnum(DataConnectionStatus); - /** @internal */ export const DataConnectionStatus$outboundSchema: z.ZodNativeEnum< typeof DataConnectionStatus > = DataConnectionStatus$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DataConnectionStatus$ { - /** @deprecated use `DataConnectionStatus$inboundSchema` instead. */ - export const inboundSchema = DataConnectionStatus$inboundSchema; - /** @deprecated use `DataConnectionStatus$outboundSchema` instead. */ - export const outboundSchema = DataConnectionStatus$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/models/shared/datastatus.ts b/sync-for-expenses/src/sdk/models/shared/datastatus.ts index 79bbd24bb..431478c2d 100644 --- a/sync-for-expenses/src/sdk/models/shared/datastatus.ts +++ b/sync-for-expenses/src/sdk/models/shared/datastatus.ts @@ -2,16 +2,12 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - Status, - Status$inboundSchema, - Status$outboundSchema, -} from "./status.js"; +import { Status, Status$inboundSchema } from "./status.js"; /** * Available data types @@ -95,7 +91,7 @@ export type DataStatus = { * > Not all dates from Codat will contain information about time zones. * > Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. */ - lastSuccessfulSync: string; + lastSuccessfulSync?: string | undefined; /** * The current status of the dataset. */ @@ -114,21 +110,6 @@ export type DataStatus = { export const DataTypes$inboundSchema: z.ZodNativeEnum = z .nativeEnum(DataTypes); -/** @internal */ -export const DataTypes$outboundSchema: z.ZodNativeEnum = - DataTypes$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DataTypes$ { - /** @deprecated use `DataTypes$inboundSchema` instead. */ - export const inboundSchema = DataTypes$inboundSchema; - /** @deprecated use `DataTypes$outboundSchema` instead. */ - export const outboundSchema = DataTypes$outboundSchema; -} - /** @internal */ export const DataStatus$inboundSchema: z.ZodType< DataStatus, @@ -136,51 +117,12 @@ export const DataStatus$inboundSchema: z.ZodType< unknown > = z.object({ dataType: DataTypes$inboundSchema, - lastSuccessfulSync: z.string(), + lastSuccessfulSync: z.string().optional(), currentStatus: Status$inboundSchema, latestSyncId: z.string().optional(), latestSuccessfulSyncId: z.string().optional(), }); -/** @internal */ -export type DataStatus$Outbound = { - dataType: string; - lastSuccessfulSync: string; - currentStatus: string; - latestSyncId?: string | undefined; - latestSuccessfulSyncId?: string | undefined; -}; - -/** @internal */ -export const DataStatus$outboundSchema: z.ZodType< - DataStatus$Outbound, - z.ZodTypeDef, - DataStatus -> = z.object({ - dataType: DataTypes$outboundSchema, - lastSuccessfulSync: z.string(), - currentStatus: Status$outboundSchema, - latestSyncId: z.string().optional(), - latestSuccessfulSyncId: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DataStatus$ { - /** @deprecated use `DataStatus$inboundSchema` instead. */ - export const inboundSchema = DataStatus$inboundSchema; - /** @deprecated use `DataStatus$outboundSchema` instead. */ - export const outboundSchema = DataStatus$outboundSchema; - /** @deprecated use `DataStatus$Outbound` instead. */ - export type Outbound = DataStatus$Outbound; -} - -export function dataStatusToJSON(dataStatus: DataStatus): string { - return JSON.stringify(DataStatus$outboundSchema.parse(dataStatus)); -} - export function dataStatusFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/datatype.ts b/sync-for-expenses/src/sdk/models/shared/datatype.ts index 65186430c..e1060cb84 100644 --- a/sync-for-expenses/src/sdk/models/shared/datatype.ts +++ b/sync-for-expenses/src/sdk/models/shared/datatype.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -59,20 +59,5 @@ export const DataType = { export type DataType = ClosedEnum; /** @internal */ -export const DataType$inboundSchema: z.ZodNativeEnum = z +export const DataType$outboundSchema: z.ZodNativeEnum = z .nativeEnum(DataType); - -/** @internal */ -export const DataType$outboundSchema: z.ZodNativeEnum = - DataType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DataType$ { - /** @deprecated use `DataType$inboundSchema` instead. */ - export const inboundSchema = DataType$inboundSchema; - /** @deprecated use `DataType$outboundSchema` instead. */ - export const outboundSchema = DataType$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/models/shared/definitiontransaction.ts b/sync-for-expenses/src/sdk/models/shared/definitiontransaction.ts index 676739563..9fe243202 100644 --- a/sync-for-expenses/src/sdk/models/shared/definitiontransaction.ts +++ b/sync-for-expenses/src/sdk/models/shared/definitiontransaction.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -42,23 +42,11 @@ export type DefinitionTransaction = { export const TransactionStatus1$inboundSchema: z.ZodNativeEnum< typeof TransactionStatus1 > = z.nativeEnum(TransactionStatus1); - /** @internal */ export const TransactionStatus1$outboundSchema: z.ZodNativeEnum< typeof TransactionStatus1 > = TransactionStatus1$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TransactionStatus1$ { - /** @deprecated use `TransactionStatus1$inboundSchema` instead. */ - export const inboundSchema = TransactionStatus1$inboundSchema; - /** @deprecated use `TransactionStatus1$outboundSchema` instead. */ - export const outboundSchema = TransactionStatus1$outboundSchema; -} - /** @internal */ export const DefinitionTransaction$inboundSchema: z.ZodType< DefinitionTransaction, @@ -69,7 +57,6 @@ export const DefinitionTransaction$inboundSchema: z.ZodType< status: TransactionStatus1$inboundSchema.optional(), errorMessage: z.nullable(z.string()).optional(), }); - /** @internal */ export type DefinitionTransaction$Outbound = { id?: string | undefined; @@ -88,19 +75,6 @@ export const DefinitionTransaction$outboundSchema: z.ZodType< errorMessage: z.nullable(z.string()).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DefinitionTransaction$ { - /** @deprecated use `DefinitionTransaction$inboundSchema` instead. */ - export const inboundSchema = DefinitionTransaction$inboundSchema; - /** @deprecated use `DefinitionTransaction$outboundSchema` instead. */ - export const outboundSchema = DefinitionTransaction$outboundSchema; - /** @deprecated use `DefinitionTransaction$Outbound` instead. */ - export type Outbound = DefinitionTransaction$Outbound; -} - export function definitionTransactionToJSON( definitionTransaction: DefinitionTransaction, ): string { @@ -108,7 +82,6 @@ export function definitionTransactionToJSON( DefinitionTransaction$outboundSchema.parse(definitionTransaction), ); } - export function definitionTransactionFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/errorvalidation.ts b/sync-for-expenses/src/sdk/models/shared/errorvalidation.ts index 05433e305..dc97b86b1 100644 --- a/sync-for-expenses/src/sdk/models/shared/errorvalidation.ts +++ b/sync-for-expenses/src/sdk/models/shared/errorvalidation.ts @@ -2,15 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ErrorValidationItem, ErrorValidationItem$inboundSchema, - ErrorValidationItem$Outbound, - ErrorValidationItem$outboundSchema, } from "./errorvalidationitem.js"; /** @@ -31,41 +29,6 @@ export const ErrorValidation$inboundSchema: z.ZodType< warnings: z.nullable(z.array(ErrorValidationItem$inboundSchema)).optional(), }); -/** @internal */ -export type ErrorValidation$Outbound = { - errors?: Array | null | undefined; - warnings?: Array | null | undefined; -}; - -/** @internal */ -export const ErrorValidation$outboundSchema: z.ZodType< - ErrorValidation$Outbound, - z.ZodTypeDef, - ErrorValidation -> = z.object({ - errors: z.nullable(z.array(ErrorValidationItem$outboundSchema)).optional(), - warnings: z.nullable(z.array(ErrorValidationItem$outboundSchema)).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ErrorValidation$ { - /** @deprecated use `ErrorValidation$inboundSchema` instead. */ - export const inboundSchema = ErrorValidation$inboundSchema; - /** @deprecated use `ErrorValidation$outboundSchema` instead. */ - export const outboundSchema = ErrorValidation$outboundSchema; - /** @deprecated use `ErrorValidation$Outbound` instead. */ - export type Outbound = ErrorValidation$Outbound; -} - -export function errorValidationToJSON( - errorValidation: ErrorValidation, -): string { - return JSON.stringify(ErrorValidation$outboundSchema.parse(errorValidation)); -} - export function errorValidationFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/errorvalidationitem.ts b/sync-for-expenses/src/sdk/models/shared/errorvalidationitem.ts index 786bbcb33..cd21ec230 100644 --- a/sync-for-expenses/src/sdk/models/shared/errorvalidationitem.ts +++ b/sync-for-expenses/src/sdk/models/shared/errorvalidationitem.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -33,45 +33,6 @@ export const ErrorValidationItem$inboundSchema: z.ZodType< validatorName: z.nullable(z.string()).optional(), }); -/** @internal */ -export type ErrorValidationItem$Outbound = { - itemId?: string | null | undefined; - message?: string | null | undefined; - validatorName?: string | null | undefined; -}; - -/** @internal */ -export const ErrorValidationItem$outboundSchema: z.ZodType< - ErrorValidationItem$Outbound, - z.ZodTypeDef, - ErrorValidationItem -> = z.object({ - itemId: z.nullable(z.string()).optional(), - message: z.nullable(z.string()).optional(), - validatorName: z.nullable(z.string()).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ErrorValidationItem$ { - /** @deprecated use `ErrorValidationItem$inboundSchema` instead. */ - export const inboundSchema = ErrorValidationItem$inboundSchema; - /** @deprecated use `ErrorValidationItem$outboundSchema` instead. */ - export const outboundSchema = ErrorValidationItem$outboundSchema; - /** @deprecated use `ErrorValidationItem$Outbound` instead. */ - export type Outbound = ErrorValidationItem$Outbound; -} - -export function errorValidationItemToJSON( - errorValidationItem: ErrorValidationItem, -): string { - return JSON.stringify( - ErrorValidationItem$outboundSchema.parse(errorValidationItem), - ); -} - export function errorValidationItemFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/expensecontactref.ts b/sync-for-expenses/src/sdk/models/shared/expensecontactref.ts index b2964ee2f..70e6d0f30 100644 --- a/sync-for-expenses/src/sdk/models/shared/expensecontactref.ts +++ b/sync-for-expenses/src/sdk/models/shared/expensecontactref.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The type of contact. @@ -30,36 +27,10 @@ export type ExpenseContactRef = { type?: ExpenseContactRefType | undefined; }; -/** @internal */ -export const ExpenseContactRefType$inboundSchema: z.ZodNativeEnum< - typeof ExpenseContactRefType -> = z.nativeEnum(ExpenseContactRefType); - /** @internal */ export const ExpenseContactRefType$outboundSchema: z.ZodNativeEnum< typeof ExpenseContactRefType -> = ExpenseContactRefType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ExpenseContactRefType$ { - /** @deprecated use `ExpenseContactRefType$inboundSchema` instead. */ - export const inboundSchema = ExpenseContactRefType$inboundSchema; - /** @deprecated use `ExpenseContactRefType$outboundSchema` instead. */ - export const outboundSchema = ExpenseContactRefType$outboundSchema; -} - -/** @internal */ -export const ExpenseContactRef$inboundSchema: z.ZodType< - ExpenseContactRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - type: ExpenseContactRefType$inboundSchema.default("Supplier"), -}); +> = z.nativeEnum(ExpenseContactRefType); /** @internal */ export type ExpenseContactRef$Outbound = { @@ -77,19 +48,6 @@ export const ExpenseContactRef$outboundSchema: z.ZodType< type: ExpenseContactRefType$outboundSchema.default("Supplier"), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ExpenseContactRef$ { - /** @deprecated use `ExpenseContactRef$inboundSchema` instead. */ - export const inboundSchema = ExpenseContactRef$inboundSchema; - /** @deprecated use `ExpenseContactRef$outboundSchema` instead. */ - export const outboundSchema = ExpenseContactRef$outboundSchema; - /** @deprecated use `ExpenseContactRef$Outbound` instead. */ - export type Outbound = ExpenseContactRef$Outbound; -} - export function expenseContactRefToJSON( expenseContactRef: ExpenseContactRef, ): string { @@ -97,13 +55,3 @@ export function expenseContactRefToJSON( ExpenseContactRef$outboundSchema.parse(expenseContactRef), ); } - -export function expenseContactRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ExpenseContactRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ExpenseContactRef' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/expensessyncwebhook.ts b/sync-for-expenses/src/sdk/models/shared/expensessyncwebhook.ts index 1ef8a38ce..850b509a3 100644 --- a/sync-for-expenses/src/sdk/models/shared/expensessyncwebhook.ts +++ b/sync-for-expenses/src/sdk/models/shared/expensessyncwebhook.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -58,7 +58,6 @@ export const ExpensesSyncWebhook$inboundSchema: z.ZodType< generatedDate: z.string().optional(), payload: ExpensesSyncWebhookPayload$inboundSchema.optional(), }); - /** @internal */ export type ExpensesSyncWebhook$Outbound = { id?: string | undefined; @@ -79,19 +78,6 @@ export const ExpensesSyncWebhook$outboundSchema: z.ZodType< payload: ExpensesSyncWebhookPayload$outboundSchema.optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ExpensesSyncWebhook$ { - /** @deprecated use `ExpensesSyncWebhook$inboundSchema` instead. */ - export const inboundSchema = ExpensesSyncWebhook$inboundSchema; - /** @deprecated use `ExpensesSyncWebhook$outboundSchema` instead. */ - export const outboundSchema = ExpensesSyncWebhook$outboundSchema; - /** @deprecated use `ExpensesSyncWebhook$Outbound` instead. */ - export type Outbound = ExpensesSyncWebhook$Outbound; -} - export function expensesSyncWebhookToJSON( expensesSyncWebhook: ExpensesSyncWebhook, ): string { @@ -99,7 +85,6 @@ export function expensesSyncWebhookToJSON( ExpensesSyncWebhook$outboundSchema.parse(expensesSyncWebhook), ); } - export function expensesSyncWebhookFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/expensessyncwebhookpayload.ts b/sync-for-expenses/src/sdk/models/shared/expensessyncwebhookpayload.ts index adb1646c4..e0777d0ac 100644 --- a/sync-for-expenses/src/sdk/models/shared/expensessyncwebhookpayload.ts +++ b/sync-for-expenses/src/sdk/models/shared/expensessyncwebhookpayload.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -38,7 +38,6 @@ export const ExpensesSyncWebhookPayload$inboundSchema: z.ZodType< syncId: z.string().optional(), transactions: z.array(DefinitionTransaction$inboundSchema).optional(), }); - /** @internal */ export type ExpensesSyncWebhookPayload$Outbound = { referenceCompany?: CompanyReference$Outbound | undefined; @@ -57,19 +56,6 @@ export const ExpensesSyncWebhookPayload$outboundSchema: z.ZodType< transactions: z.array(DefinitionTransaction$outboundSchema).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ExpensesSyncWebhookPayload$ { - /** @deprecated use `ExpensesSyncWebhookPayload$inboundSchema` instead. */ - export const inboundSchema = ExpensesSyncWebhookPayload$inboundSchema; - /** @deprecated use `ExpensesSyncWebhookPayload$outboundSchema` instead. */ - export const outboundSchema = ExpensesSyncWebhookPayload$outboundSchema; - /** @deprecated use `ExpensesSyncWebhookPayload$Outbound` instead. */ - export type Outbound = ExpensesSyncWebhookPayload$Outbound; -} - export function expensesSyncWebhookPayloadToJSON( expensesSyncWebhookPayload: ExpensesSyncWebhookPayload, ): string { @@ -77,7 +63,6 @@ export function expensesSyncWebhookPayloadToJSON( ExpensesSyncWebhookPayload$outboundSchema.parse(expensesSyncWebhookPayload), ); } - export function expensesSyncWebhookPayloadFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/expensetransaction.ts b/sync-for-expenses/src/sdk/models/shared/expensetransaction.ts index 078bef282..c7d431f6b 100644 --- a/sync-for-expenses/src/sdk/models/shared/expensetransaction.ts +++ b/sync-for-expenses/src/sdk/models/shared/expensetransaction.ts @@ -2,21 +2,16 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; +import * as z from "zod/v3"; import { Decimal as Decimal$ } from "../../types/decimal.js"; import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ExpenseContactRef, - ExpenseContactRef$inboundSchema, ExpenseContactRef$Outbound, ExpenseContactRef$outboundSchema, } from "./expensecontactref.js"; import { ExpenseTransactionLine, - ExpenseTransactionLine$inboundSchema, ExpenseTransactionLine$Outbound, ExpenseTransactionLine$outboundSchema, } from "./expensetransactionline.js"; @@ -138,34 +133,10 @@ export type ExpenseTransaction = { }; /** @internal */ -export const Type$inboundSchema: z.ZodNativeEnum = z.nativeEnum( +export const Type$outboundSchema: z.ZodNativeEnum = z.nativeEnum( Type, ); -/** @internal */ -export const Type$outboundSchema: z.ZodNativeEnum = - Type$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Type$ { - /** @deprecated use `Type$inboundSchema` instead. */ - export const inboundSchema = Type$inboundSchema; - /** @deprecated use `Type$outboundSchema` instead. */ - export const outboundSchema = Type$outboundSchema; -} - -/** @internal */ -export const BankAccountReference$inboundSchema: z.ZodType< - BankAccountReference, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), -}); - /** @internal */ export type BankAccountReference$Outbound = { id?: string | undefined; @@ -180,19 +151,6 @@ export const BankAccountReference$outboundSchema: z.ZodType< id: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace BankAccountReference$ { - /** @deprecated use `BankAccountReference$inboundSchema` instead. */ - export const inboundSchema = BankAccountReference$inboundSchema; - /** @deprecated use `BankAccountReference$outboundSchema` instead. */ - export const outboundSchema = BankAccountReference$outboundSchema; - /** @deprecated use `BankAccountReference$Outbound` instead. */ - export type Outbound = BankAccountReference$Outbound; -} - export function bankAccountReferenceToJSON( bankAccountReference: BankAccountReference, ): string { @@ -201,37 +159,6 @@ export function bankAccountReferenceToJSON( ); } -export function bankAccountReferenceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => BankAccountReference$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'BankAccountReference' from JSON`, - ); -} - -/** @internal */ -export const ExpenseTransaction$inboundSchema: z.ZodType< - ExpenseTransaction, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - type: Type$inboundSchema, - issueDate: z.string(), - currency: z.string(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - contactRef: ExpenseContactRef$inboundSchema.optional(), - bankAccountRef: z.lazy(() => BankAccountReference$inboundSchema).optional(), - reference: z.nullable(z.string()).optional(), - merchantName: z.string().optional(), - lines: z.array(ExpenseTransactionLine$inboundSchema).optional(), - notes: z.string().optional(), - postAsDraft: z.nullable(z.boolean()).optional(), -}); - /** @internal */ export type ExpenseTransaction$Outbound = { id: string; @@ -272,19 +199,6 @@ export const ExpenseTransaction$outboundSchema: z.ZodType< postAsDraft: z.nullable(z.boolean()).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ExpenseTransaction$ { - /** @deprecated use `ExpenseTransaction$inboundSchema` instead. */ - export const inboundSchema = ExpenseTransaction$inboundSchema; - /** @deprecated use `ExpenseTransaction$outboundSchema` instead. */ - export const outboundSchema = ExpenseTransaction$outboundSchema; - /** @deprecated use `ExpenseTransaction$Outbound` instead. */ - export type Outbound = ExpenseTransaction$Outbound; -} - export function expenseTransactionToJSON( expenseTransaction: ExpenseTransaction, ): string { @@ -292,13 +206,3 @@ export function expenseTransactionToJSON( ExpenseTransaction$outboundSchema.parse(expenseTransaction), ); } - -export function expenseTransactionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ExpenseTransaction$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ExpenseTransaction' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/expensetransactionline.ts b/sync-for-expenses/src/sdk/models/shared/expensetransactionline.ts index 0d2cecea2..4b25bc4d2 100644 --- a/sync-for-expenses/src/sdk/models/shared/expensetransactionline.ts +++ b/sync-for-expenses/src/sdk/models/shared/expensetransactionline.ts @@ -2,32 +2,25 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; +import * as z from "zod/v3"; import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { InvoiceTo, - InvoiceTo$inboundSchema, InvoiceTo$Outbound, InvoiceTo$outboundSchema, } from "./invoiceto.js"; import { ItemRef, - ItemRef$inboundSchema, ItemRef$Outbound, ItemRef$outboundSchema, } from "./itemref.js"; import { RecordRef, - RecordRef$inboundSchema, RecordRef$Outbound, RecordRef$outboundSchema, } from "./recordref.js"; import { TrackingRef, - TrackingRef$inboundSchema, TrackingRef$Outbound, TrackingRef$outboundSchema, } from "./trackingref.js"; @@ -51,21 +44,6 @@ export type ExpenseTransactionLine = { invoiceTo?: InvoiceTo | null | undefined; }; -/** @internal */ -export const ExpenseTransactionLine$inboundSchema: z.ZodType< - ExpenseTransactionLine, - z.ZodTypeDef, - unknown -> = z.object({ - netAmount: z.number().transform(v => new Decimal$(v)), - taxAmount: z.number().transform(v => new Decimal$(v)).optional(), - taxRateRef: RecordRef$inboundSchema.optional(), - accountRef: RecordRef$inboundSchema.optional(), - itemRef: z.nullable(ItemRef$inboundSchema).optional(), - trackingRefs: z.nullable(z.array(TrackingRef$inboundSchema)).optional(), - invoiceTo: z.nullable(InvoiceTo$inboundSchema).optional(), -}); - /** @internal */ export type ExpenseTransactionLine$Outbound = { netAmount: number; @@ -96,19 +74,6 @@ export const ExpenseTransactionLine$outboundSchema: z.ZodType< invoiceTo: z.nullable(InvoiceTo$outboundSchema).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ExpenseTransactionLine$ { - /** @deprecated use `ExpenseTransactionLine$inboundSchema` instead. */ - export const inboundSchema = ExpenseTransactionLine$inboundSchema; - /** @deprecated use `ExpenseTransactionLine$outboundSchema` instead. */ - export const outboundSchema = ExpenseTransactionLine$outboundSchema; - /** @deprecated use `ExpenseTransactionLine$Outbound` instead. */ - export type Outbound = ExpenseTransactionLine$Outbound; -} - export function expenseTransactionLineToJSON( expenseTransactionLine: ExpenseTransactionLine, ): string { @@ -116,13 +81,3 @@ export function expenseTransactionLineToJSON( ExpenseTransactionLine$outboundSchema.parse(expenseTransactionLine), ); } - -export function expenseTransactionLineFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ExpenseTransactionLine$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ExpenseTransactionLine' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/halref.ts b/sync-for-expenses/src/sdk/models/shared/halref.ts index 30ac29e93..921d594fb 100644 --- a/sync-for-expenses/src/sdk/models/shared/halref.ts +++ b/sync-for-expenses/src/sdk/models/shared/halref.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -20,37 +20,6 @@ export const HalRef$inboundSchema: z.ZodType = z href: z.string().optional(), }); -/** @internal */ -export type HalRef$Outbound = { - href?: string | undefined; -}; - -/** @internal */ -export const HalRef$outboundSchema: z.ZodType< - HalRef$Outbound, - z.ZodTypeDef, - HalRef -> = z.object({ - href: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace HalRef$ { - /** @deprecated use `HalRef$inboundSchema` instead. */ - export const inboundSchema = HalRef$inboundSchema; - /** @deprecated use `HalRef$outboundSchema` instead. */ - export const outboundSchema = HalRef$outboundSchema; - /** @deprecated use `HalRef$Outbound` instead. */ - export type Outbound = HalRef$Outbound; -} - -export function halRefToJSON(halRef: HalRef): string { - return JSON.stringify(HalRef$outboundSchema.parse(halRef)); -} - export function halRefFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/index.ts b/sync-for-expenses/src/sdk/models/shared/index.ts index 36931e03f..9a07f8d88 100644 --- a/sync-for-expenses/src/sdk/models/shared/index.ts +++ b/sync-for-expenses/src/sdk/models/shared/index.ts @@ -16,10 +16,6 @@ export * from "./attachmentupload.js"; export * from "./bankaccount.js"; export * from "./bankaccountdetails.js"; export * from "./bankaccountstatus.js"; -export * from "./clientratelimitreachedwebhook.js"; -export * from "./clientratelimitreachedwebhookdata.js"; -export * from "./clientratelimitresetwebhook.js"; -export * from "./clientratelimitresetwebhookdata.js"; export * from "./clientratelimitwebhook.js"; export * from "./clientratelimitwebhookpayload.js"; export * from "./codatfile.js"; @@ -30,6 +26,7 @@ export * from "./companyinformation.js"; export * from "./companyreference.js"; export * from "./companyrequestbody.js"; export * from "./companysyncstatus.js"; +export * from "./companyupdaterequest.js"; export * from "./connection.js"; export * from "./connections.js"; export * from "./contact.js"; @@ -64,7 +61,6 @@ export * from "./links.js"; export * from "./mappingoptions.js"; export * from "./metadata.js"; export * from "./phonenumberitems.js"; -export * from "./phonenumbertype.js"; export * from "./propertiedatatype.js"; export * from "./pulloperation.js"; export * from "./pulloperations.js"; @@ -91,10 +87,6 @@ export * from "./supplier.js"; export * from "./supplierdetails.js"; export * from "./suppliers.js"; export * from "./supplierstatus.js"; -export * from "./synccompletewebhook.js"; -export * from "./synccompletewebhookdata.js"; -export * from "./syncfailedwebhook.js"; -export * from "./syncfailedwebhookdata.js"; export * from "./taxratemappinginfo.js"; export * from "./trackingcategorymappinginfo.js"; export * from "./trackingref.js"; diff --git a/sync-for-expenses/src/sdk/models/shared/integrationtype.ts b/sync-for-expenses/src/sdk/models/shared/integrationtype.ts index c74c44ac2..405241c43 100644 --- a/sync-for-expenses/src/sdk/models/shared/integrationtype.ts +++ b/sync-for-expenses/src/sdk/models/shared/integrationtype.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -21,19 +21,3 @@ export type IntegrationType = ClosedEnum; export const IntegrationType$inboundSchema: z.ZodNativeEnum< typeof IntegrationType > = z.nativeEnum(IntegrationType); - -/** @internal */ -export const IntegrationType$outboundSchema: z.ZodNativeEnum< - typeof IntegrationType -> = IntegrationType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace IntegrationType$ { - /** @deprecated use `IntegrationType$inboundSchema` instead. */ - export const inboundSchema = IntegrationType$inboundSchema; - /** @deprecated use `IntegrationType$outboundSchema` instead. */ - export const outboundSchema = IntegrationType$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/models/shared/invoiceto.ts b/sync-for-expenses/src/sdk/models/shared/invoiceto.ts index de41e96b6..4821b5efc 100644 --- a/sync-for-expenses/src/sdk/models/shared/invoiceto.ts +++ b/sync-for-expenses/src/sdk/models/shared/invoiceto.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The type of contact. @@ -33,36 +30,10 @@ export type InvoiceTo = { type?: InvoiceToType | undefined; }; -/** @internal */ -export const InvoiceToType$inboundSchema: z.ZodNativeEnum< - typeof InvoiceToType -> = z.nativeEnum(InvoiceToType); - /** @internal */ export const InvoiceToType$outboundSchema: z.ZodNativeEnum< typeof InvoiceToType -> = InvoiceToType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace InvoiceToType$ { - /** @deprecated use `InvoiceToType$inboundSchema` instead. */ - export const inboundSchema = InvoiceToType$inboundSchema; - /** @deprecated use `InvoiceToType$outboundSchema` instead. */ - export const outboundSchema = InvoiceToType$outboundSchema; -} - -/** @internal */ -export const InvoiceTo$inboundSchema: z.ZodType< - InvoiceTo, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - type: InvoiceToType$inboundSchema.optional(), -}); +> = z.nativeEnum(InvoiceToType); /** @internal */ export type InvoiceTo$Outbound = { @@ -80,29 +51,6 @@ export const InvoiceTo$outboundSchema: z.ZodType< type: InvoiceToType$outboundSchema.optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace InvoiceTo$ { - /** @deprecated use `InvoiceTo$inboundSchema` instead. */ - export const inboundSchema = InvoiceTo$inboundSchema; - /** @deprecated use `InvoiceTo$outboundSchema` instead. */ - export const outboundSchema = InvoiceTo$outboundSchema; - /** @deprecated use `InvoiceTo$Outbound` instead. */ - export type Outbound = InvoiceTo$Outbound; -} - export function invoiceToToJSON(invoiceTo: InvoiceTo): string { return JSON.stringify(InvoiceTo$outboundSchema.parse(invoiceTo)); } - -export function invoiceToFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => InvoiceTo$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'InvoiceTo' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/itemref.ts b/sync-for-expenses/src/sdk/models/shared/itemref.ts index 4447db30a..c50859078 100644 --- a/sync-for-expenses/src/sdk/models/shared/itemref.ts +++ b/sync-for-expenses/src/sdk/models/shared/itemref.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type ItemRef = { /** @@ -14,12 +11,6 @@ export type ItemRef = { id?: string | undefined; }; -/** @internal */ -export const ItemRef$inboundSchema: z.ZodType = - z.object({ - id: z.string().optional(), - }); - /** @internal */ export type ItemRef$Outbound = { id?: string | undefined; @@ -34,29 +25,6 @@ export const ItemRef$outboundSchema: z.ZodType< id: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ItemRef$ { - /** @deprecated use `ItemRef$inboundSchema` instead. */ - export const inboundSchema = ItemRef$inboundSchema; - /** @deprecated use `ItemRef$outboundSchema` instead. */ - export const outboundSchema = ItemRef$outboundSchema; - /** @deprecated use `ItemRef$Outbound` instead. */ - export type Outbound = ItemRef$Outbound; -} - export function itemRefToJSON(itemRef: ItemRef): string { return JSON.stringify(ItemRef$outboundSchema.parse(itemRef)); } - -export function itemRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ItemRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ItemRef' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/items.ts b/sync-for-expenses/src/sdk/models/shared/items.ts index 8f35022a2..71bef42e6 100644 --- a/sync-for-expenses/src/sdk/models/shared/items.ts +++ b/sync-for-expenses/src/sdk/models/shared/items.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -54,7 +54,6 @@ export const Items$inboundSchema: z.ZodType = z country: z.nullable(z.string()).optional(), postalCode: z.nullable(z.string()).optional(), }); - /** @internal */ export type Items$Outbound = { type: string; @@ -81,23 +80,9 @@ export const Items$outboundSchema: z.ZodType< postalCode: z.nullable(z.string()).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Items$ { - /** @deprecated use `Items$inboundSchema` instead. */ - export const inboundSchema = Items$inboundSchema; - /** @deprecated use `Items$outboundSchema` instead. */ - export const outboundSchema = Items$outboundSchema; - /** @deprecated use `Items$Outbound` instead. */ - export type Outbound = Items$Outbound; -} - export function itemsToJSON(items: Items): string { return JSON.stringify(Items$outboundSchema.parse(items)); } - export function itemsFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/links.ts b/sync-for-expenses/src/sdk/models/shared/links.ts index 1a8a3117e..751d7d00e 100644 --- a/sync-for-expenses/src/sdk/models/shared/links.ts +++ b/sync-for-expenses/src/sdk/models/shared/links.ts @@ -2,16 +2,11 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - HalRef, - HalRef$inboundSchema, - HalRef$Outbound, - HalRef$outboundSchema, -} from "./halref.js"; +import { HalRef, HalRef$inboundSchema } from "./halref.js"; export type Links = { self: HalRef; @@ -29,43 +24,6 @@ export const Links$inboundSchema: z.ZodType = z previous: HalRef$inboundSchema.optional(), }); -/** @internal */ -export type Links$Outbound = { - self: HalRef$Outbound; - current: HalRef$Outbound; - next?: HalRef$Outbound | undefined; - previous?: HalRef$Outbound | undefined; -}; - -/** @internal */ -export const Links$outboundSchema: z.ZodType< - Links$Outbound, - z.ZodTypeDef, - Links -> = z.object({ - self: HalRef$outboundSchema, - current: HalRef$outboundSchema, - next: HalRef$outboundSchema.optional(), - previous: HalRef$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Links$ { - /** @deprecated use `Links$inboundSchema` instead. */ - export const inboundSchema = Links$inboundSchema; - /** @deprecated use `Links$outboundSchema` instead. */ - export const outboundSchema = Links$outboundSchema; - /** @deprecated use `Links$Outbound` instead. */ - export type Outbound = Links$Outbound; -} - -export function linksToJSON(links: Links): string { - return JSON.stringify(Links$outboundSchema.parse(links)); -} - export function linksFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/mappingoptions.ts b/sync-for-expenses/src/sdk/models/shared/mappingoptions.ts index 02be3e76b..c4cdff83d 100644 --- a/sync-for-expenses/src/sdk/models/shared/mappingoptions.ts +++ b/sync-for-expenses/src/sdk/models/shared/mappingoptions.ts @@ -2,27 +2,21 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { AccountMappingInfo, AccountMappingInfo$inboundSchema, - AccountMappingInfo$Outbound, - AccountMappingInfo$outboundSchema, } from "./accountmappinginfo.js"; import { TaxRateMappingInfo, TaxRateMappingInfo$inboundSchema, - TaxRateMappingInfo$Outbound, - TaxRateMappingInfo$outboundSchema, } from "./taxratemappinginfo.js"; import { TrackingCategoryMappingInfo, TrackingCategoryMappingInfo$inboundSchema, - TrackingCategoryMappingInfo$Outbound, - TrackingCategoryMappingInfo$outboundSchema, } from "./trackingcategorymappinginfo.js"; export type MappingOptions = { @@ -58,48 +52,6 @@ export const MappingOptions$inboundSchema: z.ZodType< taxRates: z.nullable(z.array(TaxRateMappingInfo$inboundSchema)).optional(), }); -/** @internal */ -export type MappingOptions$Outbound = { - expenseProvider?: string | null | undefined; - accounts?: Array | null | undefined; - trackingCategories?: - | Array - | null - | undefined; - taxRates?: Array | null | undefined; -}; - -/** @internal */ -export const MappingOptions$outboundSchema: z.ZodType< - MappingOptions$Outbound, - z.ZodTypeDef, - MappingOptions -> = z.object({ - expenseProvider: z.nullable(z.string()).optional(), - accounts: z.nullable(z.array(AccountMappingInfo$outboundSchema)).optional(), - trackingCategories: z.nullable( - z.array(TrackingCategoryMappingInfo$outboundSchema), - ).optional(), - taxRates: z.nullable(z.array(TaxRateMappingInfo$outboundSchema)).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MappingOptions$ { - /** @deprecated use `MappingOptions$inboundSchema` instead. */ - export const inboundSchema = MappingOptions$inboundSchema; - /** @deprecated use `MappingOptions$outboundSchema` instead. */ - export const outboundSchema = MappingOptions$outboundSchema; - /** @deprecated use `MappingOptions$Outbound` instead. */ - export type Outbound = MappingOptions$Outbound; -} - -export function mappingOptionsToJSON(mappingOptions: MappingOptions): string { - return JSON.stringify(MappingOptions$outboundSchema.parse(mappingOptions)); -} - export function mappingOptionsFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/metadata.ts b/sync-for-expenses/src/sdk/models/shared/metadata.ts index 00cc5a8d1..4a678ba93 100644 --- a/sync-for-expenses/src/sdk/models/shared/metadata.ts +++ b/sync-for-expenses/src/sdk/models/shared/metadata.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const Metadata$inboundSchema: z.ZodType< > = z.object({ isDeleted: z.nullable(z.boolean()).optional(), }); - /** @internal */ export type Metadata$Outbound = { isDeleted?: boolean | null | undefined; @@ -37,23 +36,9 @@ export const Metadata$outboundSchema: z.ZodType< isDeleted: z.nullable(z.boolean()).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Metadata$ { - /** @deprecated use `Metadata$inboundSchema` instead. */ - export const inboundSchema = Metadata$inboundSchema; - /** @deprecated use `Metadata$outboundSchema` instead. */ - export const outboundSchema = Metadata$outboundSchema; - /** @deprecated use `Metadata$Outbound` instead. */ - export type Outbound = Metadata$Outbound; -} - export function metadataToJSON(metadata: Metadata): string { return JSON.stringify(Metadata$outboundSchema.parse(metadata)); } - export function metadataFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/phonenumberitems.ts b/sync-for-expenses/src/sdk/models/shared/phonenumberitems.ts index f6e07e200..25b171809 100644 --- a/sync-for-expenses/src/sdk/models/shared/phonenumberitems.ts +++ b/sync-for-expenses/src/sdk/models/shared/phonenumberitems.ts @@ -2,15 +2,26 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; +import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - PhoneNumberType, - PhoneNumberType$inboundSchema, - PhoneNumberType$outboundSchema, -} from "./phonenumbertype.js"; + +/** + * The type of phone number + */ +export const ItemsType = { + Primary: "Primary", + Landline: "Landline", + Mobile: "Mobile", + Fax: "Fax", + Unknown: "Unknown", +} as const; +/** + * The type of phone number + */ +export type ItemsType = ClosedEnum; export type PhoneNumberItems = { /** @@ -20,9 +31,16 @@ export type PhoneNumberItems = { /** * The type of phone number */ - type: PhoneNumberType; + type: ItemsType; }; +/** @internal */ +export const ItemsType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(ItemsType); +/** @internal */ +export const ItemsType$outboundSchema: z.ZodNativeEnum = + ItemsType$inboundSchema; + /** @internal */ export const PhoneNumberItems$inboundSchema: z.ZodType< PhoneNumberItems, @@ -30,9 +48,8 @@ export const PhoneNumberItems$inboundSchema: z.ZodType< unknown > = z.object({ number: z.nullable(z.string()).optional(), - type: PhoneNumberType$inboundSchema, + type: ItemsType$inboundSchema, }); - /** @internal */ export type PhoneNumberItems$Outbound = { number?: string | null | undefined; @@ -46,22 +63,9 @@ export const PhoneNumberItems$outboundSchema: z.ZodType< PhoneNumberItems > = z.object({ number: z.nullable(z.string()).optional(), - type: PhoneNumberType$outboundSchema, + type: ItemsType$outboundSchema, }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PhoneNumberItems$ { - /** @deprecated use `PhoneNumberItems$inboundSchema` instead. */ - export const inboundSchema = PhoneNumberItems$inboundSchema; - /** @deprecated use `PhoneNumberItems$outboundSchema` instead. */ - export const outboundSchema = PhoneNumberItems$outboundSchema; - /** @deprecated use `PhoneNumberItems$Outbound` instead. */ - export type Outbound = PhoneNumberItems$Outbound; -} - export function phoneNumberItemsToJSON( phoneNumberItems: PhoneNumberItems, ): string { @@ -69,7 +73,6 @@ export function phoneNumberItemsToJSON( PhoneNumberItems$outboundSchema.parse(phoneNumberItems), ); } - export function phoneNumberItemsFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/phonenumbertype.ts b/sync-for-expenses/src/sdk/models/shared/phonenumbertype.ts deleted file mode 100644 index 833a84c36..000000000 --- a/sync-for-expenses/src/sdk/models/shared/phonenumbertype.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { ClosedEnum } from "../../types/enums.js"; - -/** - * The type of phone number - */ -export const PhoneNumberType = { - Primary: "Primary", - Landline: "Landline", - Mobile: "Mobile", - Fax: "Fax", - Unknown: "Unknown", -} as const; -/** - * The type of phone number - */ -export type PhoneNumberType = ClosedEnum; - -/** @internal */ -export const PhoneNumberType$inboundSchema: z.ZodNativeEnum< - typeof PhoneNumberType -> = z.nativeEnum(PhoneNumberType); - -/** @internal */ -export const PhoneNumberType$outboundSchema: z.ZodNativeEnum< - typeof PhoneNumberType -> = PhoneNumberType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PhoneNumberType$ { - /** @deprecated use `PhoneNumberType$inboundSchema` instead. */ - export const inboundSchema = PhoneNumberType$inboundSchema; - /** @deprecated use `PhoneNumberType$outboundSchema` instead. */ - export const outboundSchema = PhoneNumberType$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/models/shared/propertiedatatype.ts b/sync-for-expenses/src/sdk/models/shared/propertiedatatype.ts index 84677eb73..a71dac4dd 100644 --- a/sync-for-expenses/src/sdk/models/shared/propertiedatatype.ts +++ b/sync-for-expenses/src/sdk/models/shared/propertiedatatype.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -62,19 +62,3 @@ export type PropertieDataType = ClosedEnum; export const PropertieDataType$inboundSchema: z.ZodNativeEnum< typeof PropertieDataType > = z.nativeEnum(PropertieDataType); - -/** @internal */ -export const PropertieDataType$outboundSchema: z.ZodNativeEnum< - typeof PropertieDataType -> = PropertieDataType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PropertieDataType$ { - /** @deprecated use `PropertieDataType$inboundSchema` instead. */ - export const inboundSchema = PropertieDataType$inboundSchema; - /** @deprecated use `PropertieDataType$outboundSchema` instead. */ - export const outboundSchema = PropertieDataType$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/models/shared/pulloperation.ts b/sync-for-expenses/src/sdk/models/shared/pulloperation.ts index b30ff695b..393750368 100644 --- a/sync-for-expenses/src/sdk/models/shared/pulloperation.ts +++ b/sync-for-expenses/src/sdk/models/shared/pulloperation.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -137,22 +137,6 @@ export const DatasetStatus$inboundSchema: z.ZodNativeEnum< typeof DatasetStatus > = z.nativeEnum(DatasetStatus); -/** @internal */ -export const DatasetStatus$outboundSchema: z.ZodNativeEnum< - typeof DatasetStatus -> = DatasetStatus$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DatasetStatus$ { - /** @deprecated use `DatasetStatus$inboundSchema` instead. */ - export const inboundSchema = DatasetStatus$inboundSchema; - /** @deprecated use `DatasetStatus$outboundSchema` instead. */ - export const outboundSchema = DatasetStatus$outboundSchema; -} - /** @internal */ export const PullOperation$inboundSchema: z.ZodType< PullOperation, @@ -173,59 +157,6 @@ export const PullOperation$inboundSchema: z.ZodType< isErrored: z.boolean(), }); -/** @internal */ -export type PullOperation$Outbound = { - id: string; - companyId: string; - connectionId: string; - dataType: string; - status: string; - statusDescription?: string | null | undefined; - errorMessage?: string | null | undefined; - requested: string; - completed?: string | undefined; - progress: number; - isCompleted: boolean; - isErrored: boolean; -}; - -/** @internal */ -export const PullOperation$outboundSchema: z.ZodType< - PullOperation$Outbound, - z.ZodTypeDef, - PullOperation -> = z.object({ - id: z.string(), - companyId: z.string(), - connectionId: z.string(), - dataType: z.string(), - status: DatasetStatus$outboundSchema, - statusDescription: z.nullable(z.string()).optional(), - errorMessage: z.nullable(z.string()).optional(), - requested: z.string(), - completed: z.string().optional(), - progress: z.number().int(), - isCompleted: z.boolean(), - isErrored: z.boolean(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PullOperation$ { - /** @deprecated use `PullOperation$inboundSchema` instead. */ - export const inboundSchema = PullOperation$inboundSchema; - /** @deprecated use `PullOperation$outboundSchema` instead. */ - export const outboundSchema = PullOperation$outboundSchema; - /** @deprecated use `PullOperation$Outbound` instead. */ - export type Outbound = PullOperation$Outbound; -} - -export function pullOperationToJSON(pullOperation: PullOperation): string { - return JSON.stringify(PullOperation$outboundSchema.parse(pullOperation)); -} - export function pullOperationFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/pulloperations.ts b/sync-for-expenses/src/sdk/models/shared/pulloperations.ts index 93aeb90b2..475158a00 100644 --- a/sync-for-expenses/src/sdk/models/shared/pulloperations.ts +++ b/sync-for-expenses/src/sdk/models/shared/pulloperations.ts @@ -2,23 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - Links, - Links$inboundSchema, - Links$Outbound, - Links$outboundSchema, -} from "./links.js"; -import { - PullOperation, - PullOperation$inboundSchema, - PullOperation$Outbound, - PullOperation$outboundSchema, -} from "./pulloperation.js"; +import { Links, Links$inboundSchema } from "./links.js"; +import { PullOperation, PullOperation$inboundSchema } from "./pulloperation.js"; export type PullOperations = { results?: Array | undefined; @@ -54,49 +44,6 @@ export const PullOperations$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type PullOperations$Outbound = { - results?: Array | undefined; - pageNumber: number; - pageSize: number; - totalResults: number; - _links: Links$Outbound; -}; - -/** @internal */ -export const PullOperations$outboundSchema: z.ZodType< - PullOperations$Outbound, - z.ZodTypeDef, - PullOperations -> = z.object({ - results: z.array(PullOperation$outboundSchema).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - links: Links$outboundSchema, -}).transform((v) => { - return remap$(v, { - links: "_links", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PullOperations$ { - /** @deprecated use `PullOperations$inboundSchema` instead. */ - export const inboundSchema = PullOperations$inboundSchema; - /** @deprecated use `PullOperations$outboundSchema` instead. */ - export const outboundSchema = PullOperations$outboundSchema; - /** @deprecated use `PullOperations$Outbound` instead. */ - export type Outbound = PullOperations$Outbound; -} - -export function pullOperationsToJSON(pullOperations: PullOperations): string { - return JSON.stringify(PullOperations$outboundSchema.parse(pullOperations)); -} - export function pullOperationsFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/pushchangetype.ts b/sync-for-expenses/src/sdk/models/shared/pushchangetype.ts index 9f6cbdc71..42040ea23 100644 --- a/sync-for-expenses/src/sdk/models/shared/pushchangetype.ts +++ b/sync-for-expenses/src/sdk/models/shared/pushchangetype.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -24,19 +24,3 @@ export type PushChangeType = ClosedEnum; export const PushChangeType$inboundSchema: z.ZodNativeEnum< typeof PushChangeType > = z.nativeEnum(PushChangeType); - -/** @internal */ -export const PushChangeType$outboundSchema: z.ZodNativeEnum< - typeof PushChangeType -> = PushChangeType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PushChangeType$ { - /** @deprecated use `PushChangeType$inboundSchema` instead. */ - export const inboundSchema = PushChangeType$inboundSchema; - /** @deprecated use `PushChangeType$outboundSchema` instead. */ - export const outboundSchema = PushChangeType$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/models/shared/pushfieldvalidation.ts b/sync-for-expenses/src/sdk/models/shared/pushfieldvalidation.ts index d7512282d..15fc3a0f5 100644 --- a/sync-for-expenses/src/sdk/models/shared/pushfieldvalidation.ts +++ b/sync-for-expenses/src/sdk/models/shared/pushfieldvalidation.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -33,45 +33,6 @@ export const PushFieldValidation$inboundSchema: z.ZodType< ref: z.nullable(z.string()).optional(), }); -/** @internal */ -export type PushFieldValidation$Outbound = { - field?: string | undefined; - details: string; - ref?: string | null | undefined; -}; - -/** @internal */ -export const PushFieldValidation$outboundSchema: z.ZodType< - PushFieldValidation$Outbound, - z.ZodTypeDef, - PushFieldValidation -> = z.object({ - field: z.string().optional(), - details: z.string(), - ref: z.nullable(z.string()).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PushFieldValidation$ { - /** @deprecated use `PushFieldValidation$inboundSchema` instead. */ - export const inboundSchema = PushFieldValidation$inboundSchema; - /** @deprecated use `PushFieldValidation$outboundSchema` instead. */ - export const outboundSchema = PushFieldValidation$outboundSchema; - /** @deprecated use `PushFieldValidation$Outbound` instead. */ - export type Outbound = PushFieldValidation$Outbound; -} - -export function pushFieldValidationToJSON( - pushFieldValidation: PushFieldValidation, -): string { - return JSON.stringify( - PushFieldValidation$outboundSchema.parse(pushFieldValidation), - ); -} - export function pushFieldValidationFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/pushoperation.ts b/sync-for-expenses/src/sdk/models/shared/pushoperation.ts index 4628117fb..b9563094c 100644 --- a/sync-for-expenses/src/sdk/models/shared/pushoperation.ts +++ b/sync-for-expenses/src/sdk/models/shared/pushoperation.ts @@ -2,32 +2,23 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { PropertieDataType, PropertieDataType$inboundSchema, - PropertieDataType$outboundSchema, } from "./propertiedatatype.js"; import { PushOperationChange, PushOperationChange$inboundSchema, - PushOperationChange$Outbound, - PushOperationChange$outboundSchema, } from "./pushoperationchange.js"; import { PushOperationStatus, PushOperationStatus$inboundSchema, - PushOperationStatus$outboundSchema, } from "./pushoperationstatus.js"; -import { - Validation, - Validation$inboundSchema, - Validation$Outbound, - Validation$outboundSchema, -} from "./validation.js"; +import { Validation, Validation$inboundSchema } from "./validation.js"; export type PushOperation = { /** @@ -143,61 +134,6 @@ export const PushOperation$inboundSchema: z.ZodType< statusCode: z.number().int(), }); -/** @internal */ -export type PushOperation$Outbound = { - changes?: Array | null | undefined; - dataType?: string | undefined; - companyId: string; - pushOperationKey: string; - dataConnectionKey: string; - requestedOnUtc: string; - completedOnUtc?: string | undefined; - timeoutInMinutes?: number | null | undefined; - timeoutInSeconds?: number | null | undefined; - status: string; - errorMessage?: string | null | undefined; - validation?: Validation$Outbound | undefined; - statusCode: number; -}; - -/** @internal */ -export const PushOperation$outboundSchema: z.ZodType< - PushOperation$Outbound, - z.ZodTypeDef, - PushOperation -> = z.object({ - changes: z.nullable(z.array(PushOperationChange$outboundSchema)).optional(), - dataType: PropertieDataType$outboundSchema.optional(), - companyId: z.string(), - pushOperationKey: z.string(), - dataConnectionKey: z.string(), - requestedOnUtc: z.string(), - completedOnUtc: z.string().optional(), - timeoutInMinutes: z.nullable(z.number().int()).optional(), - timeoutInSeconds: z.nullable(z.number().int()).optional(), - status: PushOperationStatus$outboundSchema, - errorMessage: z.nullable(z.string()).optional(), - validation: Validation$outboundSchema.optional(), - statusCode: z.number().int(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PushOperation$ { - /** @deprecated use `PushOperation$inboundSchema` instead. */ - export const inboundSchema = PushOperation$inboundSchema; - /** @deprecated use `PushOperation$outboundSchema` instead. */ - export const outboundSchema = PushOperation$outboundSchema; - /** @deprecated use `PushOperation$Outbound` instead. */ - export type Outbound = PushOperation$Outbound; -} - -export function pushOperationToJSON(pushOperation: PushOperation): string { - return JSON.stringify(PushOperation$outboundSchema.parse(pushOperation)); -} - export function pushOperationFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/pushoperationchange.ts b/sync-for-expenses/src/sdk/models/shared/pushoperationchange.ts index 61d2ac831..5d771700a 100644 --- a/sync-for-expenses/src/sdk/models/shared/pushoperationchange.ts +++ b/sync-for-expenses/src/sdk/models/shared/pushoperationchange.ts @@ -2,20 +2,17 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { PushChangeType, PushChangeType$inboundSchema, - PushChangeType$outboundSchema, } from "./pushchangetype.js"; import { PushOperationRef, PushOperationRef$inboundSchema, - PushOperationRef$Outbound, - PushOperationRef$outboundSchema, } from "./pushoperationref.js"; export type PushOperationChange = { @@ -41,45 +38,6 @@ export const PushOperationChange$inboundSchema: z.ZodType< attachmentId: z.nullable(z.string()).optional(), }); -/** @internal */ -export type PushOperationChange$Outbound = { - type?: string | undefined; - recordRef?: PushOperationRef$Outbound | undefined; - attachmentId?: string | null | undefined; -}; - -/** @internal */ -export const PushOperationChange$outboundSchema: z.ZodType< - PushOperationChange$Outbound, - z.ZodTypeDef, - PushOperationChange -> = z.object({ - type: PushChangeType$outboundSchema.optional(), - recordRef: PushOperationRef$outboundSchema.optional(), - attachmentId: z.nullable(z.string()).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PushOperationChange$ { - /** @deprecated use `PushOperationChange$inboundSchema` instead. */ - export const inboundSchema = PushOperationChange$inboundSchema; - /** @deprecated use `PushOperationChange$outboundSchema` instead. */ - export const outboundSchema = PushOperationChange$outboundSchema; - /** @deprecated use `PushOperationChange$Outbound` instead. */ - export type Outbound = PushOperationChange$Outbound; -} - -export function pushOperationChangeToJSON( - pushOperationChange: PushOperationChange, -): string { - return JSON.stringify( - PushOperationChange$outboundSchema.parse(pushOperationChange), - ); -} - export function pushOperationChangeFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/pushoperationref.ts b/sync-for-expenses/src/sdk/models/shared/pushoperationref.ts index 1c6dcb207..59aa76101 100644 --- a/sync-for-expenses/src/sdk/models/shared/pushoperationref.ts +++ b/sync-for-expenses/src/sdk/models/shared/pushoperationref.ts @@ -2,14 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { PropertieDataType, PropertieDataType$inboundSchema, - PropertieDataType$outboundSchema, } from "./propertiedatatype.js"; export type PushOperationRef = { @@ -33,43 +32,6 @@ export const PushOperationRef$inboundSchema: z.ZodType< dataType: PropertieDataType$inboundSchema.optional(), }); -/** @internal */ -export type PushOperationRef$Outbound = { - id?: string | undefined; - dataType?: string | undefined; -}; - -/** @internal */ -export const PushOperationRef$outboundSchema: z.ZodType< - PushOperationRef$Outbound, - z.ZodTypeDef, - PushOperationRef -> = z.object({ - id: z.string().optional(), - dataType: PropertieDataType$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PushOperationRef$ { - /** @deprecated use `PushOperationRef$inboundSchema` instead. */ - export const inboundSchema = PushOperationRef$inboundSchema; - /** @deprecated use `PushOperationRef$outboundSchema` instead. */ - export const outboundSchema = PushOperationRef$outboundSchema; - /** @deprecated use `PushOperationRef$Outbound` instead. */ - export type Outbound = PushOperationRef$Outbound; -} - -export function pushOperationRefToJSON( - pushOperationRef: PushOperationRef, -): string { - return JSON.stringify( - PushOperationRef$outboundSchema.parse(pushOperationRef), - ); -} - export function pushOperationRefFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/pushoperations.ts b/sync-for-expenses/src/sdk/models/shared/pushoperations.ts index 0b70ea64e..35c08c726 100644 --- a/sync-for-expenses/src/sdk/models/shared/pushoperations.ts +++ b/sync-for-expenses/src/sdk/models/shared/pushoperations.ts @@ -2,23 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - Links, - Links$inboundSchema, - Links$Outbound, - Links$outboundSchema, -} from "./links.js"; -import { - PushOperation, - PushOperation$inboundSchema, - PushOperation$Outbound, - PushOperation$outboundSchema, -} from "./pushoperation.js"; +import { Links, Links$inboundSchema } from "./links.js"; +import { PushOperation, PushOperation$inboundSchema } from "./pushoperation.js"; export type PushOperations = { results?: Array | undefined; @@ -54,49 +44,6 @@ export const PushOperations$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type PushOperations$Outbound = { - results?: Array | undefined; - pageNumber: number; - pageSize: number; - totalResults: number; - _links: Links$Outbound; -}; - -/** @internal */ -export const PushOperations$outboundSchema: z.ZodType< - PushOperations$Outbound, - z.ZodTypeDef, - PushOperations -> = z.object({ - results: z.array(PushOperation$outboundSchema).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - links: Links$outboundSchema, -}).transform((v) => { - return remap$(v, { - links: "_links", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PushOperations$ { - /** @deprecated use `PushOperations$inboundSchema` instead. */ - export const inboundSchema = PushOperations$inboundSchema; - /** @deprecated use `PushOperations$outboundSchema` instead. */ - export const outboundSchema = PushOperations$outboundSchema; - /** @deprecated use `PushOperations$Outbound` instead. */ - export type Outbound = PushOperations$Outbound; -} - -export function pushOperationsToJSON(pushOperations: PushOperations): string { - return JSON.stringify(PushOperations$outboundSchema.parse(pushOperations)); -} - export function pushOperationsFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/pushoperationstatus.ts b/sync-for-expenses/src/sdk/models/shared/pushoperationstatus.ts index f4da233b5..133e3b65f 100644 --- a/sync-for-expenses/src/sdk/models/shared/pushoperationstatus.ts +++ b/sync-for-expenses/src/sdk/models/shared/pushoperationstatus.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -23,19 +23,3 @@ export type PushOperationStatus = ClosedEnum; export const PushOperationStatus$inboundSchema: z.ZodNativeEnum< typeof PushOperationStatus > = z.nativeEnum(PushOperationStatus); - -/** @internal */ -export const PushOperationStatus$outboundSchema: z.ZodNativeEnum< - typeof PushOperationStatus -> = PushOperationStatus$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PushOperationStatus$ { - /** @deprecated use `PushOperationStatus$inboundSchema` instead. */ - export const inboundSchema = PushOperationStatus$inboundSchema; - /** @deprecated use `PushOperationStatus$outboundSchema` instead. */ - export const outboundSchema = PushOperationStatus$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/models/shared/pushoption.ts b/sync-for-expenses/src/sdk/models/shared/pushoption.ts index ae1091ccd..af6a0a0a3 100644 --- a/sync-for-expenses/src/sdk/models/shared/pushoption.ts +++ b/sync-for-expenses/src/sdk/models/shared/pushoption.ts @@ -2,32 +2,25 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { PushOptionChoice, PushOptionChoice$inboundSchema, - PushOptionChoice$Outbound, - PushOptionChoice$outboundSchema, } from "./pushoptionchoice.js"; import { PushOptionProperty, PushOptionProperty$inboundSchema, - PushOptionProperty$Outbound, - PushOptionProperty$outboundSchema, } from "./pushoptionproperty.js"; import { PushOptionType, PushOptionType$inboundSchema, - PushOptionType$outboundSchema, } from "./pushoptiontype.js"; import { PushValidationInfo, PushValidationInfo$inboundSchema, - PushValidationInfo$Outbound, - PushValidationInfo$outboundSchema, } from "./pushvalidationinfo.js"; export type PushOption = { @@ -67,50 +60,6 @@ export const PushOption$inboundSchema: z.ZodType< validation: PushValidationInfo$inboundSchema.optional(), }); -/** @internal */ -export type PushOption$Outbound = { - type: string; - displayName: string; - description?: string | undefined; - required: boolean; - properties?: { [k: string]: PushOptionProperty$Outbound } | null | undefined; - options?: Array | null | undefined; - validation?: PushValidationInfo$Outbound | undefined; -}; - -/** @internal */ -export const PushOption$outboundSchema: z.ZodType< - PushOption$Outbound, - z.ZodTypeDef, - PushOption -> = z.object({ - type: PushOptionType$outboundSchema, - displayName: z.string(), - description: z.string().optional(), - required: z.boolean(), - properties: z.nullable(z.record(PushOptionProperty$outboundSchema)) - .optional(), - options: z.nullable(z.array(PushOptionChoice$outboundSchema)).optional(), - validation: PushValidationInfo$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PushOption$ { - /** @deprecated use `PushOption$inboundSchema` instead. */ - export const inboundSchema = PushOption$inboundSchema; - /** @deprecated use `PushOption$outboundSchema` instead. */ - export const outboundSchema = PushOption$outboundSchema; - /** @deprecated use `PushOption$Outbound` instead. */ - export type Outbound = PushOption$Outbound; -} - -export function pushOptionToJSON(pushOption: PushOption): string { - return JSON.stringify(PushOption$outboundSchema.parse(pushOption)); -} - export function pushOptionFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/pushoptionchoice.ts b/sync-for-expenses/src/sdk/models/shared/pushoptionchoice.ts index efcb89002..315b39f91 100644 --- a/sync-for-expenses/src/sdk/models/shared/pushoptionchoice.ts +++ b/sync-for-expenses/src/sdk/models/shared/pushoptionchoice.ts @@ -2,14 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { PushOptionType, PushOptionType$inboundSchema, - PushOptionType$outboundSchema, } from "./pushoptiontype.js"; export type PushOptionChoice = { @@ -48,49 +47,6 @@ export const PushOptionChoice$inboundSchema: z.ZodType< required: z.boolean().optional(), }); -/** @internal */ -export type PushOptionChoice$Outbound = { - value?: string | undefined; - type?: string | undefined; - displayName?: string | undefined; - description?: string | undefined; - required?: boolean | undefined; -}; - -/** @internal */ -export const PushOptionChoice$outboundSchema: z.ZodType< - PushOptionChoice$Outbound, - z.ZodTypeDef, - PushOptionChoice -> = z.object({ - value: z.string().optional(), - type: PushOptionType$outboundSchema.optional(), - displayName: z.string().optional(), - description: z.string().optional(), - required: z.boolean().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PushOptionChoice$ { - /** @deprecated use `PushOptionChoice$inboundSchema` instead. */ - export const inboundSchema = PushOptionChoice$inboundSchema; - /** @deprecated use `PushOptionChoice$outboundSchema` instead. */ - export const outboundSchema = PushOptionChoice$outboundSchema; - /** @deprecated use `PushOptionChoice$Outbound` instead. */ - export type Outbound = PushOptionChoice$Outbound; -} - -export function pushOptionChoiceToJSON( - pushOptionChoice: PushOptionChoice, -): string { - return JSON.stringify( - PushOptionChoice$outboundSchema.parse(pushOptionChoice), - ); -} - export function pushOptionChoiceFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/pushoptionproperty.ts b/sync-for-expenses/src/sdk/models/shared/pushoptionproperty.ts index b2f6bc4c6..0100bc7b6 100644 --- a/sync-for-expenses/src/sdk/models/shared/pushoptionproperty.ts +++ b/sync-for-expenses/src/sdk/models/shared/pushoptionproperty.ts @@ -2,26 +2,21 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { PushOptionChoice, PushOptionChoice$inboundSchema, - PushOptionChoice$Outbound, - PushOptionChoice$outboundSchema, } from "./pushoptionchoice.js"; import { PushOptionType, PushOptionType$inboundSchema, - PushOptionType$outboundSchema, } from "./pushoptiontype.js"; import { PushValidationInfo, PushValidationInfo$inboundSchema, - PushValidationInfo$Outbound, - PushValidationInfo$outboundSchema, } from "./pushvalidationinfo.js"; export type PushOptionProperty = { @@ -63,55 +58,6 @@ export const PushOptionProperty$inboundSchema: z.ZodType< validation: PushValidationInfo$inboundSchema.optional(), }); -/** @internal */ -export type PushOptionProperty$Outbound = { - type: string; - displayName: string; - description: string; - required: boolean; - properties?: { [k: string]: PushOptionProperty$Outbound } | null | undefined; - options?: Array | null | undefined; - validation?: PushValidationInfo$Outbound | undefined; -}; - -/** @internal */ -export const PushOptionProperty$outboundSchema: z.ZodType< - PushOptionProperty$Outbound, - z.ZodTypeDef, - PushOptionProperty -> = z.object({ - type: PushOptionType$outboundSchema, - displayName: z.string(), - description: z.string(), - required: z.boolean(), - properties: z.nullable( - z.record(z.lazy(() => PushOptionProperty$outboundSchema)), - ).optional(), - options: z.nullable(z.array(PushOptionChoice$outboundSchema)).optional(), - validation: PushValidationInfo$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PushOptionProperty$ { - /** @deprecated use `PushOptionProperty$inboundSchema` instead. */ - export const inboundSchema = PushOptionProperty$inboundSchema; - /** @deprecated use `PushOptionProperty$outboundSchema` instead. */ - export const outboundSchema = PushOptionProperty$outboundSchema; - /** @deprecated use `PushOptionProperty$Outbound` instead. */ - export type Outbound = PushOptionProperty$Outbound; -} - -export function pushOptionPropertyToJSON( - pushOptionProperty: PushOptionProperty, -): string { - return JSON.stringify( - PushOptionProperty$outboundSchema.parse(pushOptionProperty), - ); -} - export function pushOptionPropertyFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/pushoptiontype.ts b/sync-for-expenses/src/sdk/models/shared/pushoptiontype.ts index 4f470dbae..298c02e2e 100644 --- a/sync-for-expenses/src/sdk/models/shared/pushoptiontype.ts +++ b/sync-for-expenses/src/sdk/models/shared/pushoptiontype.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -27,19 +27,3 @@ export type PushOptionType = ClosedEnum; export const PushOptionType$inboundSchema: z.ZodNativeEnum< typeof PushOptionType > = z.nativeEnum(PushOptionType); - -/** @internal */ -export const PushOptionType$outboundSchema: z.ZodNativeEnum< - typeof PushOptionType -> = PushOptionType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PushOptionType$ { - /** @deprecated use `PushOptionType$inboundSchema` instead. */ - export const inboundSchema = PushOptionType$inboundSchema; - /** @deprecated use `PushOptionType$outboundSchema` instead. */ - export const outboundSchema = PushOptionType$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/models/shared/pushvalidationinfo.ts b/sync-for-expenses/src/sdk/models/shared/pushvalidationinfo.ts index 513bfaa8b..3479adce1 100644 --- a/sync-for-expenses/src/sdk/models/shared/pushvalidationinfo.ts +++ b/sync-for-expenses/src/sdk/models/shared/pushvalidationinfo.ts @@ -2,15 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { PushFieldValidation, PushFieldValidation$inboundSchema, - PushFieldValidation$Outbound, - PushFieldValidation$outboundSchema, } from "./pushfieldvalidation.js"; export type PushValidationInfo = { @@ -29,44 +27,6 @@ export const PushValidationInfo$inboundSchema: z.ZodType< .optional(), }); -/** @internal */ -export type PushValidationInfo$Outbound = { - warnings?: Array | null | undefined; - information?: Array | null | undefined; -}; - -/** @internal */ -export const PushValidationInfo$outboundSchema: z.ZodType< - PushValidationInfo$Outbound, - z.ZodTypeDef, - PushValidationInfo -> = z.object({ - warnings: z.nullable(z.array(PushFieldValidation$outboundSchema)).optional(), - information: z.nullable(z.array(PushFieldValidation$outboundSchema)) - .optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PushValidationInfo$ { - /** @deprecated use `PushValidationInfo$inboundSchema` instead. */ - export const inboundSchema = PushValidationInfo$inboundSchema; - /** @deprecated use `PushValidationInfo$outboundSchema` instead. */ - export const outboundSchema = PushValidationInfo$outboundSchema; - /** @deprecated use `PushValidationInfo$Outbound` instead. */ - export type Outbound = PushValidationInfo$Outbound; -} - -export function pushValidationInfoToJSON( - pushValidationInfo: PushValidationInfo, -): string { - return JSON.stringify( - PushValidationInfo$outboundSchema.parse(pushValidationInfo), - ); -} - export function pushValidationInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/recordref.ts b/sync-for-expenses/src/sdk/models/shared/recordref.ts index dcfda8467..ef4753cd0 100644 --- a/sync-for-expenses/src/sdk/models/shared/recordref.ts +++ b/sync-for-expenses/src/sdk/models/shared/recordref.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type RecordRef = { /** @@ -14,15 +11,6 @@ export type RecordRef = { id?: string | undefined; }; -/** @internal */ -export const RecordRef$inboundSchema: z.ZodType< - RecordRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), -}); - /** @internal */ export type RecordRef$Outbound = { id?: string | undefined; @@ -37,29 +25,6 @@ export const RecordRef$outboundSchema: z.ZodType< id: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RecordRef$ { - /** @deprecated use `RecordRef$inboundSchema` instead. */ - export const inboundSchema = RecordRef$inboundSchema; - /** @deprecated use `RecordRef$outboundSchema` instead. */ - export const outboundSchema = RecordRef$outboundSchema; - /** @deprecated use `RecordRef$Outbound` instead. */ - export type Outbound = RecordRef$Outbound; -} - export function recordRefToJSON(recordRef: RecordRef): string { return JSON.stringify(RecordRef$outboundSchema.parse(recordRef)); } - -export function recordRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => RecordRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'RecordRef' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/reimbursableexpensetransaction.ts b/sync-for-expenses/src/sdk/models/shared/reimbursableexpensetransaction.ts index e08a32f41..82f1cbf58 100644 --- a/sync-for-expenses/src/sdk/models/shared/reimbursableexpensetransaction.ts +++ b/sync-for-expenses/src/sdk/models/shared/reimbursableexpensetransaction.ts @@ -2,26 +2,20 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; +import * as z from "zod/v3"; import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ApAccountRef, - ApAccountRef$inboundSchema, ApAccountRef$Outbound, ApAccountRef$outboundSchema, } from "./apaccountref.js"; import { ReimbursableExpenseTransactionLine, - ReimbursableExpenseTransactionLine$inboundSchema, ReimbursableExpenseTransactionLine$Outbound, ReimbursableExpenseTransactionLine$outboundSchema, } from "./reimbursableexpensetransactionline.js"; import { ReimbursementContactRef, - ReimbursementContactRef$inboundSchema, ReimbursementContactRef$Outbound, ReimbursementContactRef$outboundSchema, } from "./reimbursementcontactref.js"; @@ -131,25 +125,6 @@ export type ReimbursableExpenseTransaction = { lines?: Array | undefined; }; -/** @internal */ -export const ReimbursableExpenseTransaction$inboundSchema: z.ZodType< - ReimbursableExpenseTransaction, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), - reference: z.nullable(z.string()).optional(), - contactRef: ReimbursementContactRef$inboundSchema, - apAccountRef: z.nullable(ApAccountRef$inboundSchema).optional(), - issueDate: z.string(), - dueDate: z.string(), - currency: z.string(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - notes: z.string().optional(), - lines: z.array(ReimbursableExpenseTransactionLine$inboundSchema).optional(), -}); - /** @internal */ export type ReimbursableExpenseTransaction$Outbound = { id: string; @@ -186,19 +161,6 @@ export const ReimbursableExpenseTransaction$outboundSchema: z.ZodType< lines: z.array(ReimbursableExpenseTransactionLine$outboundSchema).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ReimbursableExpenseTransaction$ { - /** @deprecated use `ReimbursableExpenseTransaction$inboundSchema` instead. */ - export const inboundSchema = ReimbursableExpenseTransaction$inboundSchema; - /** @deprecated use `ReimbursableExpenseTransaction$outboundSchema` instead. */ - export const outboundSchema = ReimbursableExpenseTransaction$outboundSchema; - /** @deprecated use `ReimbursableExpenseTransaction$Outbound` instead. */ - export type Outbound = ReimbursableExpenseTransaction$Outbound; -} - export function reimbursableExpenseTransactionToJSON( reimbursableExpenseTransaction: ReimbursableExpenseTransaction, ): string { @@ -208,13 +170,3 @@ export function reimbursableExpenseTransactionToJSON( ), ); } - -export function reimbursableExpenseTransactionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ReimbursableExpenseTransaction$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ReimbursableExpenseTransaction' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/reimbursableexpensetransactionline.ts b/sync-for-expenses/src/sdk/models/shared/reimbursableexpensetransactionline.ts index c8b046b59..c3acb46f3 100644 --- a/sync-for-expenses/src/sdk/models/shared/reimbursableexpensetransactionline.ts +++ b/sync-for-expenses/src/sdk/models/shared/reimbursableexpensetransactionline.ts @@ -2,32 +2,25 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; +import * as z from "zod/v3"; import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { InvoiceTo, - InvoiceTo$inboundSchema, InvoiceTo$Outbound, InvoiceTo$outboundSchema, } from "./invoiceto.js"; import { ItemRef, - ItemRef$inboundSchema, ItemRef$Outbound, ItemRef$outboundSchema, } from "./itemref.js"; import { RecordRef, - RecordRef$inboundSchema, RecordRef$Outbound, RecordRef$outboundSchema, } from "./recordref.js"; import { TrackingRef, - TrackingRef$inboundSchema, TrackingRef$Outbound, TrackingRef$outboundSchema, } from "./trackingref.js"; @@ -55,22 +48,6 @@ export type ReimbursableExpenseTransactionLine = { invoiceTo?: InvoiceTo | null | undefined; }; -/** @internal */ -export const ReimbursableExpenseTransactionLine$inboundSchema: z.ZodType< - ReimbursableExpenseTransactionLine, - z.ZodTypeDef, - unknown -> = z.object({ - description: z.string().optional(), - netAmount: z.number().transform(v => new Decimal$(v)), - taxAmount: z.number().transform(v => new Decimal$(v)).optional(), - taxRateRef: RecordRef$inboundSchema.optional(), - accountRef: RecordRef$inboundSchema.optional(), - itemRef: z.nullable(ItemRef$inboundSchema).optional(), - trackingRefs: z.nullable(z.array(TrackingRef$inboundSchema)).optional(), - invoiceTo: z.nullable(InvoiceTo$inboundSchema).optional(), -}); - /** @internal */ export type ReimbursableExpenseTransactionLine$Outbound = { description?: string | undefined; @@ -103,20 +80,6 @@ export const ReimbursableExpenseTransactionLine$outboundSchema: z.ZodType< invoiceTo: z.nullable(InvoiceTo$outboundSchema).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ReimbursableExpenseTransactionLine$ { - /** @deprecated use `ReimbursableExpenseTransactionLine$inboundSchema` instead. */ - export const inboundSchema = ReimbursableExpenseTransactionLine$inboundSchema; - /** @deprecated use `ReimbursableExpenseTransactionLine$outboundSchema` instead. */ - export const outboundSchema = - ReimbursableExpenseTransactionLine$outboundSchema; - /** @deprecated use `ReimbursableExpenseTransactionLine$Outbound` instead. */ - export type Outbound = ReimbursableExpenseTransactionLine$Outbound; -} - export function reimbursableExpenseTransactionLineToJSON( reimbursableExpenseTransactionLine: ReimbursableExpenseTransactionLine, ): string { @@ -126,14 +89,3 @@ export function reimbursableExpenseTransactionLineToJSON( ), ); } - -export function reimbursableExpenseTransactionLineFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - ReimbursableExpenseTransactionLine$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ReimbursableExpenseTransactionLine' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/reimbursementcontactref.ts b/sync-for-expenses/src/sdk/models/shared/reimbursementcontactref.ts index d90943201..cef4be224 100644 --- a/sync-for-expenses/src/sdk/models/shared/reimbursementcontactref.ts +++ b/sync-for-expenses/src/sdk/models/shared/reimbursementcontactref.ts @@ -2,10 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; +import * as z from "zod/v3"; export type ReimbursementContactRef = { /** @@ -14,15 +11,6 @@ export type ReimbursementContactRef = { id: string; }; -/** @internal */ -export const ReimbursementContactRef$inboundSchema: z.ZodType< - ReimbursementContactRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), -}); - /** @internal */ export type ReimbursementContactRef$Outbound = { id: string; @@ -37,19 +25,6 @@ export const ReimbursementContactRef$outboundSchema: z.ZodType< id: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ReimbursementContactRef$ { - /** @deprecated use `ReimbursementContactRef$inboundSchema` instead. */ - export const inboundSchema = ReimbursementContactRef$inboundSchema; - /** @deprecated use `ReimbursementContactRef$outboundSchema` instead. */ - export const outboundSchema = ReimbursementContactRef$outboundSchema; - /** @deprecated use `ReimbursementContactRef$Outbound` instead. */ - export type Outbound = ReimbursementContactRef$Outbound; -} - export function reimbursementContactRefToJSON( reimbursementContactRef: ReimbursementContactRef, ): string { @@ -57,13 +32,3 @@ export function reimbursementContactRefToJSON( ReimbursementContactRef$outboundSchema.parse(reimbursementContactRef), ); } - -export function reimbursementContactRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ReimbursementContactRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ReimbursementContactRef' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/security.ts b/sync-for-expenses/src/sdk/models/shared/security.ts index 072d578cf..675eaa582 100644 --- a/sync-for-expenses/src/sdk/models/shared/security.ts +++ b/sync-for-expenses/src/sdk/models/shared/security.ts @@ -2,29 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type Security = { authHeader: string; }; -/** @internal */ -export const Security$inboundSchema: z.ZodType< - Security, - z.ZodTypeDef, - unknown -> = z.object({ - auth_header: z.string(), -}).transform((v) => { - return remap$(v, { - "auth_header": "authHeader", - }); -}); - /** @internal */ export type Security$Outbound = { auth_header: string; @@ -43,29 +27,6 @@ export const Security$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Security$ { - /** @deprecated use `Security$inboundSchema` instead. */ - export const inboundSchema = Security$inboundSchema; - /** @deprecated use `Security$outboundSchema` instead. */ - export const outboundSchema = Security$outboundSchema; - /** @deprecated use `Security$Outbound` instead. */ - export type Outbound = Security$Outbound; -} - export function securityToJSON(security: Security): string { return JSON.stringify(Security$outboundSchema.parse(security)); } - -export function securityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Security$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Security' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/status.ts b/sync-for-expenses/src/sdk/models/shared/status.ts index 9d1667b9f..7b458b0a8 100644 --- a/sync-for-expenses/src/sdk/models/shared/status.ts +++ b/sync-for-expenses/src/sdk/models/shared/status.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -39,18 +39,3 @@ export type Status = ClosedEnum; /** @internal */ export const Status$inboundSchema: z.ZodNativeEnum = z .nativeEnum(Status); - -/** @internal */ -export const Status$outboundSchema: z.ZodNativeEnum = - Status$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Status$ { - /** @deprecated use `Status$inboundSchema` instead. */ - export const inboundSchema = Status$inboundSchema; - /** @deprecated use `Status$outboundSchema` instead. */ - export const outboundSchema = Status$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/models/shared/supplementaldata.ts b/sync-for-expenses/src/sdk/models/shared/supplementaldata.ts index c3fb21f8d..bdea4887c 100644 --- a/sync-for-expenses/src/sdk/models/shared/supplementaldata.ts +++ b/sync-for-expenses/src/sdk/models/shared/supplementaldata.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -26,7 +26,6 @@ export const SupplementalData$inboundSchema: z.ZodType< > = z.object({ content: z.nullable(z.record(z.record(z.any()))).optional(), }); - /** @internal */ export type SupplementalData$Outbound = { content?: { [k: string]: { [k: string]: any } } | null | undefined; @@ -41,19 +40,6 @@ export const SupplementalData$outboundSchema: z.ZodType< content: z.nullable(z.record(z.record(z.any()))).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SupplementalData$ { - /** @deprecated use `SupplementalData$inboundSchema` instead. */ - export const inboundSchema = SupplementalData$inboundSchema; - /** @deprecated use `SupplementalData$outboundSchema` instead. */ - export const outboundSchema = SupplementalData$outboundSchema; - /** @deprecated use `SupplementalData$Outbound` instead. */ - export type Outbound = SupplementalData$Outbound; -} - export function supplementalDataToJSON( supplementalData: SupplementalData, ): string { @@ -61,7 +47,6 @@ export function supplementalDataToJSON( SupplementalData$outboundSchema.parse(supplementalData), ); } - export function supplementalDataFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/supplier.ts b/sync-for-expenses/src/sdk/models/shared/supplier.ts index 18cdbeedb..9b5b3bdbb 100644 --- a/sync-for-expenses/src/sdk/models/shared/supplier.ts +++ b/sync-for-expenses/src/sdk/models/shared/supplier.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -112,7 +112,6 @@ export const Supplier$inboundSchema: z.ZodType< metadata: Metadata$inboundSchema.optional(), supplementalData: SupplementalData$inboundSchema.optional(), }); - /** @internal */ export type Supplier$Outbound = { modifiedDate?: string | undefined; @@ -153,23 +152,9 @@ export const Supplier$outboundSchema: z.ZodType< supplementalData: SupplementalData$outboundSchema.optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Supplier$ { - /** @deprecated use `Supplier$inboundSchema` instead. */ - export const inboundSchema = Supplier$inboundSchema; - /** @deprecated use `Supplier$outboundSchema` instead. */ - export const outboundSchema = Supplier$outboundSchema; - /** @deprecated use `Supplier$Outbound` instead. */ - export type Outbound = Supplier$Outbound; -} - export function supplierToJSON(supplier: Supplier): string { return JSON.stringify(Supplier$outboundSchema.parse(supplier)); } - export function supplierFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/supplierdetails.ts b/sync-for-expenses/src/sdk/models/shared/supplierdetails.ts index 8b8a68e3d..c6b2329d6 100644 --- a/sync-for-expenses/src/sdk/models/shared/supplierdetails.ts +++ b/sync-for-expenses/src/sdk/models/shared/supplierdetails.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -22,7 +22,6 @@ export const SupplierDetails$inboundSchema: z.ZodType< > = z.object({ id: z.string().optional(), }); - /** @internal */ export type SupplierDetails$Outbound = { id?: string | undefined; @@ -37,25 +36,11 @@ export const SupplierDetails$outboundSchema: z.ZodType< id: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SupplierDetails$ { - /** @deprecated use `SupplierDetails$inboundSchema` instead. */ - export const inboundSchema = SupplierDetails$inboundSchema; - /** @deprecated use `SupplierDetails$outboundSchema` instead. */ - export const outboundSchema = SupplierDetails$outboundSchema; - /** @deprecated use `SupplierDetails$Outbound` instead. */ - export type Outbound = SupplierDetails$Outbound; -} - export function supplierDetailsToJSON( supplierDetails: SupplierDetails, ): string { return JSON.stringify(SupplierDetails$outboundSchema.parse(supplierDetails)); } - export function supplierDetailsFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/suppliers.ts b/sync-for-expenses/src/sdk/models/shared/suppliers.ts index dab99dc14..46de174dc 100644 --- a/sync-for-expenses/src/sdk/models/shared/suppliers.ts +++ b/sync-for-expenses/src/sdk/models/shared/suppliers.ts @@ -2,26 +2,16 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - Links, - Links$inboundSchema, - Links$Outbound, - Links$outboundSchema, -} from "./links.js"; -import { - Supplier, - Supplier$inboundSchema, - Supplier$Outbound, - Supplier$outboundSchema, -} from "./supplier.js"; +import { Links, Links$inboundSchema } from "./links.js"; +import { Supplier, Supplier$inboundSchema } from "./supplier.js"; export type Suppliers = { - results?: Array | undefined; + results?: Array | undefined; /** * Current page number. */ @@ -43,7 +33,7 @@ export const Suppliers$inboundSchema: z.ZodType< z.ZodTypeDef, unknown > = z.object({ - results: z.array(Supplier$inboundSchema).optional(), + results: z.array(z.nullable(Supplier$inboundSchema)).optional(), pageNumber: z.number().int(), pageSize: z.number().int(), totalResults: z.number().int(), @@ -54,49 +44,6 @@ export const Suppliers$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type Suppliers$Outbound = { - results?: Array | undefined; - pageNumber: number; - pageSize: number; - totalResults: number; - _links: Links$Outbound; -}; - -/** @internal */ -export const Suppliers$outboundSchema: z.ZodType< - Suppliers$Outbound, - z.ZodTypeDef, - Suppliers -> = z.object({ - results: z.array(Supplier$outboundSchema).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - links: Links$outboundSchema, -}).transform((v) => { - return remap$(v, { - links: "_links", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Suppliers$ { - /** @deprecated use `Suppliers$inboundSchema` instead. */ - export const inboundSchema = Suppliers$inboundSchema; - /** @deprecated use `Suppliers$outboundSchema` instead. */ - export const outboundSchema = Suppliers$outboundSchema; - /** @deprecated use `Suppliers$Outbound` instead. */ - export type Outbound = Suppliers$Outbound; -} - -export function suppliersToJSON(suppliers: Suppliers): string { - return JSON.stringify(Suppliers$outboundSchema.parse(suppliers)); -} - export function suppliersFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/supplierstatus.ts b/sync-for-expenses/src/sdk/models/shared/supplierstatus.ts index 4d55a94e6..21b6220e1 100644 --- a/sync-for-expenses/src/sdk/models/shared/supplierstatus.ts +++ b/sync-for-expenses/src/sdk/models/shared/supplierstatus.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -22,19 +22,7 @@ export type SupplierStatus = ClosedEnum; export const SupplierStatus$inboundSchema: z.ZodNativeEnum< typeof SupplierStatus > = z.nativeEnum(SupplierStatus); - /** @internal */ export const SupplierStatus$outboundSchema: z.ZodNativeEnum< typeof SupplierStatus > = SupplierStatus$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SupplierStatus$ { - /** @deprecated use `SupplierStatus$inboundSchema` instead. */ - export const inboundSchema = SupplierStatus$inboundSchema; - /** @deprecated use `SupplierStatus$outboundSchema` instead. */ - export const outboundSchema = SupplierStatus$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/models/shared/synccompletewebhook.ts b/sync-for-expenses/src/sdk/models/shared/synccompletewebhook.ts deleted file mode 100644 index 12145ffb2..000000000 --- a/sync-for-expenses/src/sdk/models/shared/synccompletewebhook.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - SyncCompleteWebhookData, - SyncCompleteWebhookData$inboundSchema, - SyncCompleteWebhookData$Outbound, - SyncCompleteWebhookData$outboundSchema, -} from "./synccompletewebhookdata.js"; - -/** - * Webhook request body used to notify that a sync has completed. - */ -export type SyncCompleteWebhook = { - /** - * Unique identifier for your client in Codat. - */ - clientId?: string | undefined; - /** - * Name of your client in Codat. - */ - clientName?: string | undefined; - /** - * Unique identifier for your SMB in Codat. - */ - companyId?: string | undefined; - /** - * Unique identifier for the rule. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - ruleId?: string | undefined; - /** - * The type of rule. - */ - ruleType?: string | undefined; - /** - * Unique identifier of the webhook event. - */ - alertId?: string | undefined; - /** - * A human-readable message about the webhook. - */ - message?: string | undefined; - data?: SyncCompleteWebhookData | undefined; -}; - -/** @internal */ -export const SyncCompleteWebhook$inboundSchema: z.ZodType< - SyncCompleteWebhook, - z.ZodTypeDef, - unknown -> = z.object({ - ClientId: z.string().optional(), - ClientName: z.string().optional(), - CompanyId: z.string().optional(), - RuleId: z.string().optional(), - RuleType: z.string().optional(), - AlertId: z.string().optional(), - Message: z.string().optional(), - Data: SyncCompleteWebhookData$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "ClientId": "clientId", - "ClientName": "clientName", - "CompanyId": "companyId", - "RuleId": "ruleId", - "RuleType": "ruleType", - "AlertId": "alertId", - "Message": "message", - "Data": "data", - }); -}); - -/** @internal */ -export type SyncCompleteWebhook$Outbound = { - ClientId?: string | undefined; - ClientName?: string | undefined; - CompanyId?: string | undefined; - RuleId?: string | undefined; - RuleType?: string | undefined; - AlertId?: string | undefined; - Message?: string | undefined; - Data?: SyncCompleteWebhookData$Outbound | undefined; -}; - -/** @internal */ -export const SyncCompleteWebhook$outboundSchema: z.ZodType< - SyncCompleteWebhook$Outbound, - z.ZodTypeDef, - SyncCompleteWebhook -> = z.object({ - clientId: z.string().optional(), - clientName: z.string().optional(), - companyId: z.string().optional(), - ruleId: z.string().optional(), - ruleType: z.string().optional(), - alertId: z.string().optional(), - message: z.string().optional(), - data: SyncCompleteWebhookData$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - clientId: "ClientId", - clientName: "ClientName", - companyId: "CompanyId", - ruleId: "RuleId", - ruleType: "RuleType", - alertId: "AlertId", - message: "Message", - data: "Data", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SyncCompleteWebhook$ { - /** @deprecated use `SyncCompleteWebhook$inboundSchema` instead. */ - export const inboundSchema = SyncCompleteWebhook$inboundSchema; - /** @deprecated use `SyncCompleteWebhook$outboundSchema` instead. */ - export const outboundSchema = SyncCompleteWebhook$outboundSchema; - /** @deprecated use `SyncCompleteWebhook$Outbound` instead. */ - export type Outbound = SyncCompleteWebhook$Outbound; -} - -export function syncCompleteWebhookToJSON( - syncCompleteWebhook: SyncCompleteWebhook, -): string { - return JSON.stringify( - SyncCompleteWebhook$outboundSchema.parse(syncCompleteWebhook), - ); -} - -export function syncCompleteWebhookFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => SyncCompleteWebhook$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SyncCompleteWebhook' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/synccompletewebhookdata.ts b/sync-for-expenses/src/sdk/models/shared/synccompletewebhookdata.ts deleted file mode 100644 index ded6f55be..000000000 --- a/sync-for-expenses/src/sdk/models/shared/synccompletewebhookdata.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type SyncCompleteWebhookData = { - /** - * Unique identifier for the failed sync. - */ - syncId?: string | undefined; - /** - * The type of sync being performed. - */ - syncType?: string | undefined; -}; - -/** @internal */ -export const SyncCompleteWebhookData$inboundSchema: z.ZodType< - SyncCompleteWebhookData, - z.ZodTypeDef, - unknown -> = z.object({ - syncId: z.string().optional(), - syncType: z.string().optional(), -}); - -/** @internal */ -export type SyncCompleteWebhookData$Outbound = { - syncId?: string | undefined; - syncType?: string | undefined; -}; - -/** @internal */ -export const SyncCompleteWebhookData$outboundSchema: z.ZodType< - SyncCompleteWebhookData$Outbound, - z.ZodTypeDef, - SyncCompleteWebhookData -> = z.object({ - syncId: z.string().optional(), - syncType: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SyncCompleteWebhookData$ { - /** @deprecated use `SyncCompleteWebhookData$inboundSchema` instead. */ - export const inboundSchema = SyncCompleteWebhookData$inboundSchema; - /** @deprecated use `SyncCompleteWebhookData$outboundSchema` instead. */ - export const outboundSchema = SyncCompleteWebhookData$outboundSchema; - /** @deprecated use `SyncCompleteWebhookData$Outbound` instead. */ - export type Outbound = SyncCompleteWebhookData$Outbound; -} - -export function syncCompleteWebhookDataToJSON( - syncCompleteWebhookData: SyncCompleteWebhookData, -): string { - return JSON.stringify( - SyncCompleteWebhookData$outboundSchema.parse(syncCompleteWebhookData), - ); -} - -export function syncCompleteWebhookDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => SyncCompleteWebhookData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SyncCompleteWebhookData' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/syncfailedwebhook.ts b/sync-for-expenses/src/sdk/models/shared/syncfailedwebhook.ts deleted file mode 100644 index e92467652..000000000 --- a/sync-for-expenses/src/sdk/models/shared/syncfailedwebhook.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - SyncFailedWebhookData, - SyncFailedWebhookData$inboundSchema, - SyncFailedWebhookData$Outbound, - SyncFailedWebhookData$outboundSchema, -} from "./syncfailedwebhookdata.js"; - -/** - * Webhook request body used to notify that a sync has failed. - */ -export type SyncFailedWebhook = { - /** - * Unique identifier for your client in Codat. - */ - clientId?: string | undefined; - /** - * Name of your client in Codat. - */ - clientName?: string | undefined; - /** - * Unique identifier for your SMB in Codat. - */ - companyId?: string | undefined; - /** - * Unique identifier for the rule. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - ruleId?: string | undefined; - /** - * The type of rule. - */ - ruleType?: string | undefined; - /** - * Unique identifier of the webhook event. - */ - alertId?: string | undefined; - /** - * A human-readable message about the webhook. - */ - message?: string | undefined; - data?: SyncFailedWebhookData | undefined; -}; - -/** @internal */ -export const SyncFailedWebhook$inboundSchema: z.ZodType< - SyncFailedWebhook, - z.ZodTypeDef, - unknown -> = z.object({ - ClientId: z.string().optional(), - ClientName: z.string().optional(), - CompanyId: z.string().optional(), - RuleId: z.string().optional(), - RuleType: z.string().optional(), - AlertId: z.string().optional(), - Message: z.string().optional(), - Data: SyncFailedWebhookData$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "ClientId": "clientId", - "ClientName": "clientName", - "CompanyId": "companyId", - "RuleId": "ruleId", - "RuleType": "ruleType", - "AlertId": "alertId", - "Message": "message", - "Data": "data", - }); -}); - -/** @internal */ -export type SyncFailedWebhook$Outbound = { - ClientId?: string | undefined; - ClientName?: string | undefined; - CompanyId?: string | undefined; - RuleId?: string | undefined; - RuleType?: string | undefined; - AlertId?: string | undefined; - Message?: string | undefined; - Data?: SyncFailedWebhookData$Outbound | undefined; -}; - -/** @internal */ -export const SyncFailedWebhook$outboundSchema: z.ZodType< - SyncFailedWebhook$Outbound, - z.ZodTypeDef, - SyncFailedWebhook -> = z.object({ - clientId: z.string().optional(), - clientName: z.string().optional(), - companyId: z.string().optional(), - ruleId: z.string().optional(), - ruleType: z.string().optional(), - alertId: z.string().optional(), - message: z.string().optional(), - data: SyncFailedWebhookData$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - clientId: "ClientId", - clientName: "ClientName", - companyId: "CompanyId", - ruleId: "RuleId", - ruleType: "RuleType", - alertId: "AlertId", - message: "Message", - data: "Data", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SyncFailedWebhook$ { - /** @deprecated use `SyncFailedWebhook$inboundSchema` instead. */ - export const inboundSchema = SyncFailedWebhook$inboundSchema; - /** @deprecated use `SyncFailedWebhook$outboundSchema` instead. */ - export const outboundSchema = SyncFailedWebhook$outboundSchema; - /** @deprecated use `SyncFailedWebhook$Outbound` instead. */ - export type Outbound = SyncFailedWebhook$Outbound; -} - -export function syncFailedWebhookToJSON( - syncFailedWebhook: SyncFailedWebhook, -): string { - return JSON.stringify( - SyncFailedWebhook$outboundSchema.parse(syncFailedWebhook), - ); -} - -export function syncFailedWebhookFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => SyncFailedWebhook$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SyncFailedWebhook' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/syncfailedwebhookdata.ts b/sync-for-expenses/src/sdk/models/shared/syncfailedwebhookdata.ts deleted file mode 100644 index 9c72a6ed6..000000000 --- a/sync-for-expenses/src/sdk/models/shared/syncfailedwebhookdata.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod"; -import { remap as remap$ } from "../../../lib/primitives.js"; -import { safeParse } from "../../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; - -export type SyncFailedWebhookData = { - /** - * Unique identifier for the failed sync. - */ - syncId?: string | undefined; - /** - * The type of sync being performed. - */ - syncType?: string | undefined; - /** - * The stage of the job the sync failed. - */ - failureStage?: string | undefined; -}; - -/** @internal */ -export const SyncFailedWebhookData$inboundSchema: z.ZodType< - SyncFailedWebhookData, - z.ZodTypeDef, - unknown -> = z.object({ - syncId: z.string().optional(), - syncType: z.string().optional(), - FailureStage: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "FailureStage": "failureStage", - }); -}); - -/** @internal */ -export type SyncFailedWebhookData$Outbound = { - syncId?: string | undefined; - syncType?: string | undefined; - FailureStage?: string | undefined; -}; - -/** @internal */ -export const SyncFailedWebhookData$outboundSchema: z.ZodType< - SyncFailedWebhookData$Outbound, - z.ZodTypeDef, - SyncFailedWebhookData -> = z.object({ - syncId: z.string().optional(), - syncType: z.string().optional(), - failureStage: z.string().optional(), -}).transform((v) => { - return remap$(v, { - failureStage: "FailureStage", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SyncFailedWebhookData$ { - /** @deprecated use `SyncFailedWebhookData$inboundSchema` instead. */ - export const inboundSchema = SyncFailedWebhookData$inboundSchema; - /** @deprecated use `SyncFailedWebhookData$outboundSchema` instead. */ - export const outboundSchema = SyncFailedWebhookData$outboundSchema; - /** @deprecated use `SyncFailedWebhookData$Outbound` instead. */ - export type Outbound = SyncFailedWebhookData$Outbound; -} - -export function syncFailedWebhookDataToJSON( - syncFailedWebhookData: SyncFailedWebhookData, -): string { - return JSON.stringify( - SyncFailedWebhookData$outboundSchema.parse(syncFailedWebhookData), - ); -} - -export function syncFailedWebhookDataFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => SyncFailedWebhookData$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SyncFailedWebhookData' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/taxratemappinginfo.ts b/sync-for-expenses/src/sdk/models/shared/taxratemappinginfo.ts index 9ede05e0f..9cb982b91 100644 --- a/sync-for-expenses/src/sdk/models/shared/taxratemappinginfo.ts +++ b/sync-for-expenses/src/sdk/models/shared/taxratemappinginfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Decimal as Decimal$ } from "../../types/decimal.js"; import { Result as SafeParseResult } from "../../types/fp.js"; @@ -10,7 +10,6 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ValidTransactionTypes, ValidTransactionTypes$inboundSchema, - ValidTransactionTypes$outboundSchema, } from "./validtransactiontypes.js"; export type TaxRateMappingInfo = { @@ -55,56 +54,6 @@ export const TaxRateMappingInfo$inboundSchema: z.ZodType< .optional(), }); -/** @internal */ -export type TaxRateMappingInfo$Outbound = { - id?: string | undefined; - name?: string | undefined; - code?: string | null | undefined; - effectiveTaxRate?: number | undefined; - totalTaxRate?: number | undefined; - validTransactionTypes?: Array | undefined; -}; - -/** @internal */ -export const TaxRateMappingInfo$outboundSchema: z.ZodType< - TaxRateMappingInfo$Outbound, - z.ZodTypeDef, - TaxRateMappingInfo -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), - code: z.nullable(z.string()).optional(), - effectiveTaxRate: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ).optional(), - totalTaxRate: z.union([z.instanceof(Decimal$), z.number()]).transform(v => - typeof v === "number" ? v : v.toNumber() - ).optional(), - validTransactionTypes: z.array(ValidTransactionTypes$outboundSchema) - .optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TaxRateMappingInfo$ { - /** @deprecated use `TaxRateMappingInfo$inboundSchema` instead. */ - export const inboundSchema = TaxRateMappingInfo$inboundSchema; - /** @deprecated use `TaxRateMappingInfo$outboundSchema` instead. */ - export const outboundSchema = TaxRateMappingInfo$outboundSchema; - /** @deprecated use `TaxRateMappingInfo$Outbound` instead. */ - export type Outbound = TaxRateMappingInfo$Outbound; -} - -export function taxRateMappingInfoToJSON( - taxRateMappingInfo: TaxRateMappingInfo, -): string { - return JSON.stringify( - TaxRateMappingInfo$outboundSchema.parse(taxRateMappingInfo), - ); -} - export function taxRateMappingInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/trackingcategorymappinginfo.ts b/sync-for-expenses/src/sdk/models/shared/trackingcategorymappinginfo.ts index a2911a7ab..112aac93d 100644 --- a/sync-for-expenses/src/sdk/models/shared/trackingcategorymappinginfo.ts +++ b/sync-for-expenses/src/sdk/models/shared/trackingcategorymappinginfo.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -38,49 +38,6 @@ export const TrackingCategoryMappingInfo$inboundSchema: z.ZodType< parentId: z.nullable(z.string()).optional(), }); -/** @internal */ -export type TrackingCategoryMappingInfo$Outbound = { - id?: string | undefined; - name?: string | undefined; - hasChildren?: boolean | undefined; - parentId?: string | null | undefined; -}; - -/** @internal */ -export const TrackingCategoryMappingInfo$outboundSchema: z.ZodType< - TrackingCategoryMappingInfo$Outbound, - z.ZodTypeDef, - TrackingCategoryMappingInfo -> = z.object({ - id: z.string().optional(), - name: z.string().optional(), - hasChildren: z.boolean().optional(), - parentId: z.nullable(z.string()).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TrackingCategoryMappingInfo$ { - /** @deprecated use `TrackingCategoryMappingInfo$inboundSchema` instead. */ - export const inboundSchema = TrackingCategoryMappingInfo$inboundSchema; - /** @deprecated use `TrackingCategoryMappingInfo$outboundSchema` instead. */ - export const outboundSchema = TrackingCategoryMappingInfo$outboundSchema; - /** @deprecated use `TrackingCategoryMappingInfo$Outbound` instead. */ - export type Outbound = TrackingCategoryMappingInfo$Outbound; -} - -export function trackingCategoryMappingInfoToJSON( - trackingCategoryMappingInfo: TrackingCategoryMappingInfo, -): string { - return JSON.stringify( - TrackingCategoryMappingInfo$outboundSchema.parse( - trackingCategoryMappingInfo, - ), - ); -} - export function trackingCategoryMappingInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/trackingref.ts b/sync-for-expenses/src/sdk/models/shared/trackingref.ts index 310e59e70..11809c369 100644 --- a/sync-for-expenses/src/sdk/models/shared/trackingref.ts +++ b/sync-for-expenses/src/sdk/models/shared/trackingref.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The type of the linked reference @@ -31,36 +28,10 @@ export type TrackingRef = { dataType?: TrackingRefDataType | undefined; }; -/** @internal */ -export const TrackingRefDataType$inboundSchema: z.ZodNativeEnum< - typeof TrackingRefDataType -> = z.nativeEnum(TrackingRefDataType); - /** @internal */ export const TrackingRefDataType$outboundSchema: z.ZodNativeEnum< typeof TrackingRefDataType -> = TrackingRefDataType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TrackingRefDataType$ { - /** @deprecated use `TrackingRefDataType$inboundSchema` instead. */ - export const inboundSchema = TrackingRefDataType$inboundSchema; - /** @deprecated use `TrackingRefDataType$outboundSchema` instead. */ - export const outboundSchema = TrackingRefDataType$outboundSchema; -} - -/** @internal */ -export const TrackingRef$inboundSchema: z.ZodType< - TrackingRef, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - dataType: TrackingRefDataType$inboundSchema.default("trackingCategories"), -}); +> = z.nativeEnum(TrackingRefDataType); /** @internal */ export type TrackingRef$Outbound = { @@ -78,29 +49,6 @@ export const TrackingRef$outboundSchema: z.ZodType< dataType: TrackingRefDataType$outboundSchema.default("trackingCategories"), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TrackingRef$ { - /** @deprecated use `TrackingRef$inboundSchema` instead. */ - export const inboundSchema = TrackingRef$inboundSchema; - /** @deprecated use `TrackingRef$outboundSchema` instead. */ - export const outboundSchema = TrackingRef$outboundSchema; - /** @deprecated use `TrackingRef$Outbound` instead. */ - export type Outbound = TrackingRef$Outbound; -} - export function trackingRefToJSON(trackingRef: TrackingRef): string { return JSON.stringify(TrackingRef$outboundSchema.parse(trackingRef)); } - -export function trackingRefFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TrackingRef$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TrackingRef' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/trackingrefadjustmenttransaction.ts b/sync-for-expenses/src/sdk/models/shared/trackingrefadjustmenttransaction.ts index de9066c49..661d5e5fb 100644 --- a/sync-for-expenses/src/sdk/models/shared/trackingrefadjustmenttransaction.ts +++ b/sync-for-expenses/src/sdk/models/shared/trackingrefadjustmenttransaction.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * The type of the linked reference @@ -35,40 +32,10 @@ export type TrackingRefAdjustmentTransaction = { }; /** @internal */ -export const TrackingRefAdjustmentTransactionDataType$inboundSchema: +export const TrackingRefAdjustmentTransactionDataType$outboundSchema: z.ZodNativeEnum = z .nativeEnum(TrackingRefAdjustmentTransactionDataType); -/** @internal */ -export const TrackingRefAdjustmentTransactionDataType$outboundSchema: - z.ZodNativeEnum = - TrackingRefAdjustmentTransactionDataType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TrackingRefAdjustmentTransactionDataType$ { - /** @deprecated use `TrackingRefAdjustmentTransactionDataType$inboundSchema` instead. */ - export const inboundSchema = - TrackingRefAdjustmentTransactionDataType$inboundSchema; - /** @deprecated use `TrackingRefAdjustmentTransactionDataType$outboundSchema` instead. */ - export const outboundSchema = - TrackingRefAdjustmentTransactionDataType$outboundSchema; -} - -/** @internal */ -export const TrackingRefAdjustmentTransaction$inboundSchema: z.ZodType< - TrackingRefAdjustmentTransaction, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), - dataType: TrackingRefAdjustmentTransactionDataType$inboundSchema.default( - "trackingCategories", - ), -}); - /** @internal */ export type TrackingRefAdjustmentTransaction$Outbound = { id?: string | undefined; @@ -87,19 +54,6 @@ export const TrackingRefAdjustmentTransaction$outboundSchema: z.ZodType< ), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TrackingRefAdjustmentTransaction$ { - /** @deprecated use `TrackingRefAdjustmentTransaction$inboundSchema` instead. */ - export const inboundSchema = TrackingRefAdjustmentTransaction$inboundSchema; - /** @deprecated use `TrackingRefAdjustmentTransaction$outboundSchema` instead. */ - export const outboundSchema = TrackingRefAdjustmentTransaction$outboundSchema; - /** @deprecated use `TrackingRefAdjustmentTransaction$Outbound` instead. */ - export type Outbound = TrackingRefAdjustmentTransaction$Outbound; -} - export function trackingRefAdjustmentTransactionToJSON( trackingRefAdjustmentTransaction: TrackingRefAdjustmentTransaction, ): string { @@ -109,13 +63,3 @@ export function trackingRefAdjustmentTransactionToJSON( ), ); } - -export function trackingRefAdjustmentTransactionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TrackingRefAdjustmentTransaction$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TrackingRefAdjustmentTransaction' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/transaction.ts b/sync-for-expenses/src/sdk/models/shared/transaction.ts index 56be98f90..7f205c6f3 100644 --- a/sync-for-expenses/src/sdk/models/shared/transaction.ts +++ b/sync-for-expenses/src/sdk/models/shared/transaction.ts @@ -2,19 +2,17 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { IntegrationType, IntegrationType$inboundSchema, - IntegrationType$outboundSchema, } from "./integrationtype.js"; import { TransactionStatus, TransactionStatus$inboundSchema, - TransactionStatus$outboundSchema, } from "./transactionstatus.js"; export type Transaction = { @@ -33,7 +31,7 @@ export type Transaction = { /** * Type of transaction that has been processed e.g. Expense or Bank Feed. */ - integrationType?: IntegrationType | null | undefined; + integrationType: IntegrationType | null; }; /** @internal */ @@ -50,45 +48,6 @@ export const Transaction$inboundSchema: z.ZodType< ), }); -/** @internal */ -export type Transaction$Outbound = { - transactionId?: string | null | undefined; - status?: string | null | undefined; - message?: string | null | undefined; - integrationType: string | null; -}; - -/** @internal */ -export const Transaction$outboundSchema: z.ZodType< - Transaction$Outbound, - z.ZodTypeDef, - Transaction -> = z.object({ - transactionId: z.nullable(z.string()).optional(), - status: z.nullable(TransactionStatus$outboundSchema).optional(), - message: z.nullable(z.string()).optional(), - integrationType: z.nullable( - IntegrationType$outboundSchema.default("expenses"), - ), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Transaction$ { - /** @deprecated use `Transaction$inboundSchema` instead. */ - export const inboundSchema = Transaction$inboundSchema; - /** @deprecated use `Transaction$outboundSchema` instead. */ - export const outboundSchema = Transaction$outboundSchema; - /** @deprecated use `Transaction$Outbound` instead. */ - export type Outbound = Transaction$Outbound; -} - -export function transactionToJSON(transaction: Transaction): string { - return JSON.stringify(Transaction$outboundSchema.parse(transaction)); -} - export function transactionFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/transactions.ts b/sync-for-expenses/src/sdk/models/shared/transactions.ts index 2319279ea..e88e27437 100644 --- a/sync-for-expenses/src/sdk/models/shared/transactions.ts +++ b/sync-for-expenses/src/sdk/models/shared/transactions.ts @@ -2,23 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { remap as remap$ } from "../../../lib/primitives.js"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - Links, - Links$inboundSchema, - Links$Outbound, - Links$outboundSchema, -} from "./links.js"; -import { - Transaction, - Transaction$inboundSchema, - Transaction$Outbound, - Transaction$outboundSchema, -} from "./transaction.js"; +import { Links, Links$inboundSchema } from "./links.js"; +import { Transaction, Transaction$inboundSchema } from "./transaction.js"; export type Transactions = { results?: Array | undefined; @@ -54,49 +44,6 @@ export const Transactions$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type Transactions$Outbound = { - results?: Array | undefined; - pageNumber: number; - pageSize: number; - totalResults: number; - _links: Links$Outbound; -}; - -/** @internal */ -export const Transactions$outboundSchema: z.ZodType< - Transactions$Outbound, - z.ZodTypeDef, - Transactions -> = z.object({ - results: z.array(Transaction$outboundSchema).optional(), - pageNumber: z.number().int(), - pageSize: z.number().int(), - totalResults: z.number().int(), - links: Links$outboundSchema, -}).transform((v) => { - return remap$(v, { - links: "_links", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Transactions$ { - /** @deprecated use `Transactions$inboundSchema` instead. */ - export const inboundSchema = Transactions$inboundSchema; - /** @deprecated use `Transactions$outboundSchema` instead. */ - export const outboundSchema = Transactions$outboundSchema; - /** @deprecated use `Transactions$Outbound` instead. */ - export type Outbound = Transactions$Outbound; -} - -export function transactionsToJSON(transactions: Transactions): string { - return JSON.stringify(Transactions$outboundSchema.parse(transactions)); -} - export function transactionsFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/transactionstatus.ts b/sync-for-expenses/src/sdk/models/shared/transactionstatus.ts index 2adb82133..a3c87f729 100644 --- a/sync-for-expenses/src/sdk/models/shared/transactionstatus.ts +++ b/sync-for-expenses/src/sdk/models/shared/transactionstatus.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; /** @@ -24,19 +24,3 @@ export type TransactionStatus = ClosedEnum; export const TransactionStatus$inboundSchema: z.ZodNativeEnum< typeof TransactionStatus > = z.nativeEnum(TransactionStatus); - -/** @internal */ -export const TransactionStatus$outboundSchema: z.ZodNativeEnum< - typeof TransactionStatus -> = TransactionStatus$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TransactionStatus$ { - /** @deprecated use `TransactionStatus$inboundSchema` instead. */ - export const inboundSchema = TransactionStatus$inboundSchema; - /** @deprecated use `TransactionStatus$outboundSchema` instead. */ - export const outboundSchema = TransactionStatus$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/models/shared/transfertransactionrequest.ts b/sync-for-expenses/src/sdk/models/shared/transfertransactionrequest.ts index 59cdfd268..1f8432823 100644 --- a/sync-for-expenses/src/sdk/models/shared/transfertransactionrequest.ts +++ b/sync-for-expenses/src/sdk/models/shared/transfertransactionrequest.ts @@ -2,11 +2,8 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; +import * as z from "zod/v3"; import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Reference of the account you are transferring money from. @@ -60,15 +57,6 @@ export type TransferTransactionRequest = { to: To; }; -/** @internal */ -export const AccountReference$inboundSchema: z.ZodType< - AccountReference, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string(), -}); - /** @internal */ export type AccountReference$Outbound = { id: string; @@ -83,19 +71,6 @@ export const AccountReference$outboundSchema: z.ZodType< id: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AccountReference$ { - /** @deprecated use `AccountReference$inboundSchema` instead. */ - export const inboundSchema = AccountReference$inboundSchema; - /** @deprecated use `AccountReference$outboundSchema` instead. */ - export const outboundSchema = AccountReference$outboundSchema; - /** @deprecated use `AccountReference$Outbound` instead. */ - export type Outbound = AccountReference$Outbound; -} - export function accountReferenceToJSON( accountReference: AccountReference, ): string { @@ -104,23 +79,6 @@ export function accountReferenceToJSON( ); } -export function accountReferenceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => AccountReference$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'AccountReference' from JSON`, - ); -} - -/** @internal */ -export const From$inboundSchema: z.ZodType = z - .object({ - accountRef: z.lazy(() => AccountReference$inboundSchema), - amount: z.number().transform(v => new Decimal$(v)), - }); - /** @internal */ export type From$Outbound = { accountRef: AccountReference$Outbound; @@ -136,40 +94,10 @@ export const From$outboundSchema: z.ZodType = ), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace From$ { - /** @deprecated use `From$inboundSchema` instead. */ - export const inboundSchema = From$inboundSchema; - /** @deprecated use `From$outboundSchema` instead. */ - export const outboundSchema = From$outboundSchema; - /** @deprecated use `From$Outbound` instead. */ - export type Outbound = From$Outbound; -} - export function fromToJSON(from: From): string { return JSON.stringify(From$outboundSchema.parse(from)); } -export function fromFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => From$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'From' from JSON`, - ); -} - -/** @internal */ -export const TransferTransactionRequestAccountReference$inboundSchema: - z.ZodType = - z.object({ - id: z.string(), - }); - /** @internal */ export type TransferTransactionRequestAccountReference$Outbound = { id: string; @@ -185,21 +113,6 @@ export const TransferTransactionRequestAccountReference$outboundSchema: id: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TransferTransactionRequestAccountReference$ { - /** @deprecated use `TransferTransactionRequestAccountReference$inboundSchema` instead. */ - export const inboundSchema = - TransferTransactionRequestAccountReference$inboundSchema; - /** @deprecated use `TransferTransactionRequestAccountReference$outboundSchema` instead. */ - export const outboundSchema = - TransferTransactionRequestAccountReference$outboundSchema; - /** @deprecated use `TransferTransactionRequestAccountReference$Outbound` instead. */ - export type Outbound = TransferTransactionRequestAccountReference$Outbound; -} - export function transferTransactionRequestAccountReferenceToJSON( transferTransactionRequestAccountReference: TransferTransactionRequestAccountReference, @@ -211,30 +124,6 @@ export function transferTransactionRequestAccountReferenceToJSON( ); } -export function transferTransactionRequestAccountReferenceFromJSON( - jsonString: string, -): SafeParseResult< - TransferTransactionRequestAccountReference, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - TransferTransactionRequestAccountReference$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'TransferTransactionRequestAccountReference' from JSON`, - ); -} - -/** @internal */ -export const To$inboundSchema: z.ZodType = z.object({ - accountRef: z.lazy(() => - TransferTransactionRequestAccountReference$inboundSchema - ), - amount: z.number().transform(v => new Decimal$(v)), -}); - /** @internal */ export type To$Outbound = { accountRef: TransferTransactionRequestAccountReference$Outbound; @@ -252,45 +141,10 @@ export const To$outboundSchema: z.ZodType = z ), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace To$ { - /** @deprecated use `To$inboundSchema` instead. */ - export const inboundSchema = To$inboundSchema; - /** @deprecated use `To$outboundSchema` instead. */ - export const outboundSchema = To$outboundSchema; - /** @deprecated use `To$Outbound` instead. */ - export type Outbound = To$Outbound; -} - export function toToJSON(to: To): string { return JSON.stringify(To$outboundSchema.parse(to)); } -export function toFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => To$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'To' from JSON`, - ); -} - -/** @internal */ -export const TransferTransactionRequest$inboundSchema: z.ZodType< - TransferTransactionRequest, - z.ZodTypeDef, - unknown -> = z.object({ - description: z.string().optional(), - date: z.string(), - from: z.lazy(() => From$inboundSchema), - to: z.lazy(() => To$inboundSchema), -}); - /** @internal */ export type TransferTransactionRequest$Outbound = { description?: string | undefined; @@ -311,19 +165,6 @@ export const TransferTransactionRequest$outboundSchema: z.ZodType< to: z.lazy(() => To$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TransferTransactionRequest$ { - /** @deprecated use `TransferTransactionRequest$inboundSchema` instead. */ - export const inboundSchema = TransferTransactionRequest$inboundSchema; - /** @deprecated use `TransferTransactionRequest$outboundSchema` instead. */ - export const outboundSchema = TransferTransactionRequest$outboundSchema; - /** @deprecated use `TransferTransactionRequest$Outbound` instead. */ - export type Outbound = TransferTransactionRequest$Outbound; -} - export function transferTransactionRequestToJSON( transferTransactionRequest: TransferTransactionRequest, ): string { @@ -331,13 +172,3 @@ export function transferTransactionRequestToJSON( TransferTransactionRequest$outboundSchema.parse(transferTransactionRequest), ); } - -export function transferTransactionRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => TransferTransactionRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'TransferTransactionRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/transfertransactionresponse.ts b/sync-for-expenses/src/sdk/models/shared/transfertransactionresponse.ts index 421cfce64..4356c2411 100644 --- a/sync-for-expenses/src/sdk/models/shared/transfertransactionresponse.ts +++ b/sync-for-expenses/src/sdk/models/shared/transfertransactionresponse.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -23,43 +23,6 @@ export const TransferTransactionResponse$inboundSchema: z.ZodType< syncId: z.string().optional(), }); -/** @internal */ -export type TransferTransactionResponse$Outbound = { - syncId?: string | undefined; -}; - -/** @internal */ -export const TransferTransactionResponse$outboundSchema: z.ZodType< - TransferTransactionResponse$Outbound, - z.ZodTypeDef, - TransferTransactionResponse -> = z.object({ - syncId: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TransferTransactionResponse$ { - /** @deprecated use `TransferTransactionResponse$inboundSchema` instead. */ - export const inboundSchema = TransferTransactionResponse$inboundSchema; - /** @deprecated use `TransferTransactionResponse$outboundSchema` instead. */ - export const outboundSchema = TransferTransactionResponse$outboundSchema; - /** @deprecated use `TransferTransactionResponse$Outbound` instead. */ - export type Outbound = TransferTransactionResponse$Outbound; -} - -export function transferTransactionResponseToJSON( - transferTransactionResponse: TransferTransactionResponse, -): string { - return JSON.stringify( - TransferTransactionResponse$outboundSchema.parse( - transferTransactionResponse, - ), - ); -} - export function transferTransactionResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/updatecustomerresponse.ts b/sync-for-expenses/src/sdk/models/shared/updatecustomerresponse.ts index 7f03ae40c..3057b181e 100644 --- a/sync-for-expenses/src/sdk/models/shared/updatecustomerresponse.ts +++ b/sync-for-expenses/src/sdk/models/shared/updatecustomerresponse.ts @@ -2,61 +2,34 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - Contact, - Contact$inboundSchema, - Contact$Outbound, - Contact$outboundSchema, -} from "./contact.js"; +import { Contact, Contact$inboundSchema } from "./contact.js"; import { CustomerStatus, CustomerStatus$inboundSchema, - CustomerStatus$outboundSchema, } from "./customerstatus.js"; -import { - Items, - Items$inboundSchema, - Items$Outbound, - Items$outboundSchema, -} from "./items.js"; -import { - Metadata, - Metadata$inboundSchema, - Metadata$Outbound, - Metadata$outboundSchema, -} from "./metadata.js"; +import { Items, Items$inboundSchema } from "./items.js"; +import { Metadata, Metadata$inboundSchema } from "./metadata.js"; import { PropertieDataType, PropertieDataType$inboundSchema, - PropertieDataType$outboundSchema, } from "./propertiedatatype.js"; import { PushOperationChange, PushOperationChange$inboundSchema, - PushOperationChange$Outbound, - PushOperationChange$outboundSchema, } from "./pushoperationchange.js"; import { PushOperationStatus, PushOperationStatus$inboundSchema, - PushOperationStatus$outboundSchema, } from "./pushoperationstatus.js"; import { SupplementalData, SupplementalData$inboundSchema, - SupplementalData$Outbound, - SupplementalData$outboundSchema, } from "./supplementaldata.js"; -import { - Validation, - Validation$inboundSchema, - Validation$Outbound, - Validation$outboundSchema, -} from "./validation.js"; +import { Validation, Validation$inboundSchema } from "./validation.js"; /** * ## Overview @@ -252,74 +225,6 @@ export const UpdateCustomerResponseAccountingCustomer$inboundSchema: z.ZodType< supplementalData: SupplementalData$inboundSchema.optional(), }); -/** @internal */ -export type UpdateCustomerResponseAccountingCustomer$Outbound = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - id?: string | undefined; - customerName?: string | null | undefined; - contactName?: string | null | undefined; - emailAddress?: string | null | undefined; - defaultCurrency?: string | undefined; - phone?: string | null | undefined; - addresses?: Array | null | undefined; - contacts?: Array | null | undefined; - registrationNumber?: string | null | undefined; - taxNumber?: string | null | undefined; - status: string; - metadata?: Metadata$Outbound | undefined; - supplementalData?: SupplementalData$Outbound | undefined; -}; - -/** @internal */ -export const UpdateCustomerResponseAccountingCustomer$outboundSchema: z.ZodType< - UpdateCustomerResponseAccountingCustomer$Outbound, - z.ZodTypeDef, - UpdateCustomerResponseAccountingCustomer -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - customerName: z.nullable(z.string()).optional(), - contactName: z.nullable(z.string()).optional(), - emailAddress: z.nullable(z.string()).optional(), - defaultCurrency: z.string().optional(), - phone: z.nullable(z.string()).optional(), - addresses: z.nullable(z.array(Items$outboundSchema)).optional(), - contacts: z.nullable(z.array(Contact$outboundSchema)).optional(), - registrationNumber: z.nullable(z.string()).optional(), - taxNumber: z.nullable(z.string()).optional(), - status: CustomerStatus$outboundSchema, - metadata: Metadata$outboundSchema.optional(), - supplementalData: SupplementalData$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateCustomerResponseAccountingCustomer$ { - /** @deprecated use `UpdateCustomerResponseAccountingCustomer$inboundSchema` instead. */ - export const inboundSchema = - UpdateCustomerResponseAccountingCustomer$inboundSchema; - /** @deprecated use `UpdateCustomerResponseAccountingCustomer$outboundSchema` instead. */ - export const outboundSchema = - UpdateCustomerResponseAccountingCustomer$outboundSchema; - /** @deprecated use `UpdateCustomerResponseAccountingCustomer$Outbound` instead. */ - export type Outbound = UpdateCustomerResponseAccountingCustomer$Outbound; -} - -export function updateCustomerResponseAccountingCustomerToJSON( - updateCustomerResponseAccountingCustomer: - UpdateCustomerResponseAccountingCustomer, -): string { - return JSON.stringify( - UpdateCustomerResponseAccountingCustomer$outboundSchema.parse( - updateCustomerResponseAccountingCustomer, - ), - ); -} - export function updateCustomerResponseAccountingCustomerFromJSON( jsonString: string, ): SafeParseResult< @@ -360,69 +265,6 @@ export const UpdateCustomerResponse$inboundSchema: z.ZodType< statusCode: z.number().int(), }); -/** @internal */ -export type UpdateCustomerResponse$Outbound = { - data?: UpdateCustomerResponseAccountingCustomer$Outbound | null | undefined; - changes?: Array | null | undefined; - dataType?: string | undefined; - companyId: string; - pushOperationKey: string; - dataConnectionKey: string; - requestedOnUtc: string; - completedOnUtc?: string | undefined; - timeoutInMinutes?: number | null | undefined; - timeoutInSeconds?: number | null | undefined; - status: string; - errorMessage?: string | null | undefined; - validation?: Validation$Outbound | undefined; - statusCode: number; -}; - -/** @internal */ -export const UpdateCustomerResponse$outboundSchema: z.ZodType< - UpdateCustomerResponse$Outbound, - z.ZodTypeDef, - UpdateCustomerResponse -> = z.object({ - data: z.nullable( - z.lazy(() => UpdateCustomerResponseAccountingCustomer$outboundSchema), - ).optional(), - changes: z.nullable(z.array(PushOperationChange$outboundSchema)).optional(), - dataType: PropertieDataType$outboundSchema.optional(), - companyId: z.string(), - pushOperationKey: z.string(), - dataConnectionKey: z.string(), - requestedOnUtc: z.string(), - completedOnUtc: z.string().optional(), - timeoutInMinutes: z.nullable(z.number().int()).optional(), - timeoutInSeconds: z.nullable(z.number().int()).optional(), - status: PushOperationStatus$outboundSchema, - errorMessage: z.nullable(z.string()).optional(), - validation: Validation$outboundSchema.optional(), - statusCode: z.number().int(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateCustomerResponse$ { - /** @deprecated use `UpdateCustomerResponse$inboundSchema` instead. */ - export const inboundSchema = UpdateCustomerResponse$inboundSchema; - /** @deprecated use `UpdateCustomerResponse$outboundSchema` instead. */ - export const outboundSchema = UpdateCustomerResponse$outboundSchema; - /** @deprecated use `UpdateCustomerResponse$Outbound` instead. */ - export type Outbound = UpdateCustomerResponse$Outbound; -} - -export function updateCustomerResponseToJSON( - updateCustomerResponse: UpdateCustomerResponse, -): string { - return JSON.stringify( - UpdateCustomerResponse$outboundSchema.parse(updateCustomerResponse), - ); -} - export function updateCustomerResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/updateexpenserequest.ts b/sync-for-expenses/src/sdk/models/shared/updateexpenserequest.ts index 7037f7530..119ee0aeb 100644 --- a/sync-for-expenses/src/sdk/models/shared/updateexpenserequest.ts +++ b/sync-for-expenses/src/sdk/models/shared/updateexpenserequest.ts @@ -2,21 +2,16 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; +import * as z from "zod/v3"; import { Decimal as Decimal$ } from "../../types/decimal.js"; import { ClosedEnum } from "../../types/enums.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ExpenseContactRef, - ExpenseContactRef$inboundSchema, ExpenseContactRef$Outbound, ExpenseContactRef$outboundSchema, } from "./expensecontactref.js"; import { ExpenseTransactionLine, - ExpenseTransactionLine$inboundSchema, ExpenseTransactionLine$Outbound, ExpenseTransactionLine$outboundSchema, } from "./expensetransactionline.js"; @@ -109,35 +104,10 @@ export type UpdateExpenseRequest = { notes?: string | undefined; }; -/** @internal */ -export const UpdateExpenseRequestType$inboundSchema: z.ZodNativeEnum< - typeof UpdateExpenseRequestType -> = z.nativeEnum(UpdateExpenseRequestType); - /** @internal */ export const UpdateExpenseRequestType$outboundSchema: z.ZodNativeEnum< typeof UpdateExpenseRequestType -> = UpdateExpenseRequestType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateExpenseRequestType$ { - /** @deprecated use `UpdateExpenseRequestType$inboundSchema` instead. */ - export const inboundSchema = UpdateExpenseRequestType$inboundSchema; - /** @deprecated use `UpdateExpenseRequestType$outboundSchema` instead. */ - export const outboundSchema = UpdateExpenseRequestType$outboundSchema; -} - -/** @internal */ -export const UpdateExpenseRequestBankAccountReference$inboundSchema: z.ZodType< - UpdateExpenseRequestBankAccountReference, - z.ZodTypeDef, - unknown -> = z.object({ - id: z.string().optional(), -}); +> = z.nativeEnum(UpdateExpenseRequestType); /** @internal */ export type UpdateExpenseRequestBankAccountReference$Outbound = { @@ -153,21 +123,6 @@ export const UpdateExpenseRequestBankAccountReference$outboundSchema: z.ZodType< id: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateExpenseRequestBankAccountReference$ { - /** @deprecated use `UpdateExpenseRequestBankAccountReference$inboundSchema` instead. */ - export const inboundSchema = - UpdateExpenseRequestBankAccountReference$inboundSchema; - /** @deprecated use `UpdateExpenseRequestBankAccountReference$outboundSchema` instead. */ - export const outboundSchema = - UpdateExpenseRequestBankAccountReference$outboundSchema; - /** @deprecated use `UpdateExpenseRequestBankAccountReference$Outbound` instead. */ - export type Outbound = UpdateExpenseRequestBankAccountReference$Outbound; -} - export function updateExpenseRequestBankAccountReferenceToJSON( updateExpenseRequestBankAccountReference: UpdateExpenseRequestBankAccountReference, @@ -179,42 +134,6 @@ export function updateExpenseRequestBankAccountReferenceToJSON( ); } -export function updateExpenseRequestBankAccountReferenceFromJSON( - jsonString: string, -): SafeParseResult< - UpdateExpenseRequestBankAccountReference, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - UpdateExpenseRequestBankAccountReference$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'UpdateExpenseRequestBankAccountReference' from JSON`, - ); -} - -/** @internal */ -export const UpdateExpenseRequest$inboundSchema: z.ZodType< - UpdateExpenseRequest, - z.ZodTypeDef, - unknown -> = z.object({ - type: UpdateExpenseRequestType$inboundSchema, - issueDate: z.string(), - currency: z.string(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - contactRef: ExpenseContactRef$inboundSchema.optional(), - bankAccountRef: z.lazy(() => - UpdateExpenseRequestBankAccountReference$inboundSchema - ).optional(), - merchantName: z.string().optional(), - lines: z.array(ExpenseTransactionLine$inboundSchema).optional(), - notes: z.string().optional(), -}); - /** @internal */ export type UpdateExpenseRequest$Outbound = { type: string; @@ -253,19 +172,6 @@ export const UpdateExpenseRequest$outboundSchema: z.ZodType< notes: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateExpenseRequest$ { - /** @deprecated use `UpdateExpenseRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateExpenseRequest$inboundSchema; - /** @deprecated use `UpdateExpenseRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateExpenseRequest$outboundSchema; - /** @deprecated use `UpdateExpenseRequest$Outbound` instead. */ - export type Outbound = UpdateExpenseRequest$Outbound; -} - export function updateExpenseRequestToJSON( updateExpenseRequest: UpdateExpenseRequest, ): string { @@ -273,13 +179,3 @@ export function updateExpenseRequestToJSON( UpdateExpenseRequest$outboundSchema.parse(updateExpenseRequest), ); } - -export function updateExpenseRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateExpenseRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateExpenseRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/updateexpenseresponse.ts b/sync-for-expenses/src/sdk/models/shared/updateexpenseresponse.ts index ac447f5d1..4843efea0 100644 --- a/sync-for-expenses/src/sdk/models/shared/updateexpenseresponse.ts +++ b/sync-for-expenses/src/sdk/models/shared/updateexpenseresponse.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -23,41 +23,6 @@ export const UpdateExpenseResponse$inboundSchema: z.ZodType< syncId: z.string().optional(), }); -/** @internal */ -export type UpdateExpenseResponse$Outbound = { - syncId?: string | undefined; -}; - -/** @internal */ -export const UpdateExpenseResponse$outboundSchema: z.ZodType< - UpdateExpenseResponse$Outbound, - z.ZodTypeDef, - UpdateExpenseResponse -> = z.object({ - syncId: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateExpenseResponse$ { - /** @deprecated use `UpdateExpenseResponse$inboundSchema` instead. */ - export const inboundSchema = UpdateExpenseResponse$inboundSchema; - /** @deprecated use `UpdateExpenseResponse$outboundSchema` instead. */ - export const outboundSchema = UpdateExpenseResponse$outboundSchema; - /** @deprecated use `UpdateExpenseResponse$Outbound` instead. */ - export type Outbound = UpdateExpenseResponse$Outbound; -} - -export function updateExpenseResponseToJSON( - updateExpenseResponse: UpdateExpenseResponse, -): string { - return JSON.stringify( - UpdateExpenseResponse$outboundSchema.parse(updateExpenseResponse), - ); -} - export function updateExpenseResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/updatereimbursableexpensetransactionrequest.ts b/sync-for-expenses/src/sdk/models/shared/updatereimbursableexpensetransactionrequest.ts index 8ebae549f..1b58eaa21 100644 --- a/sync-for-expenses/src/sdk/models/shared/updatereimbursableexpensetransactionrequest.ts +++ b/sync-for-expenses/src/sdk/models/shared/updatereimbursableexpensetransactionrequest.ts @@ -2,26 +2,20 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; -import { safeParse } from "../../../lib/schemas.js"; +import * as z from "zod/v3"; import { Decimal as Decimal$ } from "../../types/decimal.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ApAccountRef, - ApAccountRef$inboundSchema, ApAccountRef$Outbound, ApAccountRef$outboundSchema, } from "./apaccountref.js"; import { ReimbursableExpenseTransactionLine, - ReimbursableExpenseTransactionLine$inboundSchema, ReimbursableExpenseTransactionLine$Outbound, ReimbursableExpenseTransactionLine$outboundSchema, } from "./reimbursableexpensetransactionline.js"; import { ReimbursementContactRef, - ReimbursementContactRef$inboundSchema, ReimbursementContactRef$Outbound, ReimbursementContactRef$outboundSchema, } from "./reimbursementcontactref.js"; @@ -127,25 +121,6 @@ export type UpdateReimbursableExpenseTransactionRequest = { lines?: Array | undefined; }; -/** @internal */ -export const UpdateReimbursableExpenseTransactionRequest$inboundSchema: - z.ZodType< - UpdateReimbursableExpenseTransactionRequest, - z.ZodTypeDef, - unknown - > = z.object({ - reference: z.nullable(z.string()).optional(), - contactRef: ReimbursementContactRef$inboundSchema, - apAccountRef: z.nullable(ApAccountRef$inboundSchema).optional(), - issueDate: z.string(), - dueDate: z.string(), - currency: z.string(), - currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) - .optional(), - notes: z.string().optional(), - lines: z.array(ReimbursableExpenseTransactionLine$inboundSchema).optional(), - }); - /** @internal */ export type UpdateReimbursableExpenseTransactionRequest$Outbound = { reference?: string | null | undefined; @@ -182,21 +157,6 @@ export const UpdateReimbursableExpenseTransactionRequest$outboundSchema: .optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateReimbursableExpenseTransactionRequest$ { - /** @deprecated use `UpdateReimbursableExpenseTransactionRequest$inboundSchema` instead. */ - export const inboundSchema = - UpdateReimbursableExpenseTransactionRequest$inboundSchema; - /** @deprecated use `UpdateReimbursableExpenseTransactionRequest$outboundSchema` instead. */ - export const outboundSchema = - UpdateReimbursableExpenseTransactionRequest$outboundSchema; - /** @deprecated use `UpdateReimbursableExpenseTransactionRequest$Outbound` instead. */ - export type Outbound = UpdateReimbursableExpenseTransactionRequest$Outbound; -} - export function updateReimbursableExpenseTransactionRequestToJSON( updateReimbursableExpenseTransactionRequest: UpdateReimbursableExpenseTransactionRequest, @@ -207,19 +167,3 @@ export function updateReimbursableExpenseTransactionRequestToJSON( ), ); } - -export function updateReimbursableExpenseTransactionRequestFromJSON( - jsonString: string, -): SafeParseResult< - UpdateReimbursableExpenseTransactionRequest, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - UpdateReimbursableExpenseTransactionRequest$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'UpdateReimbursableExpenseTransactionRequest' from JSON`, - ); -} diff --git a/sync-for-expenses/src/sdk/models/shared/updatesupplierresponse.ts b/sync-for-expenses/src/sdk/models/shared/updatesupplierresponse.ts index 7d6bd9af1..249e30240 100644 --- a/sync-for-expenses/src/sdk/models/shared/updatesupplierresponse.ts +++ b/sync-for-expenses/src/sdk/models/shared/updatesupplierresponse.ts @@ -2,55 +2,33 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; -import { - Items, - Items$inboundSchema, - Items$Outbound, - Items$outboundSchema, -} from "./items.js"; -import { - Metadata, - Metadata$inboundSchema, - Metadata$Outbound, - Metadata$outboundSchema, -} from "./metadata.js"; +import { Items, Items$inboundSchema } from "./items.js"; +import { Metadata, Metadata$inboundSchema } from "./metadata.js"; import { PropertieDataType, PropertieDataType$inboundSchema, - PropertieDataType$outboundSchema, } from "./propertiedatatype.js"; import { PushOperationChange, PushOperationChange$inboundSchema, - PushOperationChange$Outbound, - PushOperationChange$outboundSchema, } from "./pushoperationchange.js"; import { PushOperationStatus, PushOperationStatus$inboundSchema, - PushOperationStatus$outboundSchema, } from "./pushoperationstatus.js"; import { SupplementalData, SupplementalData$inboundSchema, - SupplementalData$Outbound, - SupplementalData$outboundSchema, } from "./supplementaldata.js"; import { SupplierStatus, SupplierStatus$inboundSchema, - SupplierStatus$outboundSchema, } from "./supplierstatus.js"; -import { - Validation, - Validation$inboundSchema, - Validation$Outbound, - Validation$outboundSchema, -} from "./validation.js"; +import { Validation, Validation$inboundSchema } from "./validation.js"; /** * ## Overview @@ -231,72 +209,6 @@ export const UpdateSupplierResponseAccountingSupplier$inboundSchema: z.ZodType< supplementalData: SupplementalData$inboundSchema.optional(), }); -/** @internal */ -export type UpdateSupplierResponseAccountingSupplier$Outbound = { - modifiedDate?: string | undefined; - sourceModifiedDate?: string | undefined; - id?: string | undefined; - supplierName?: string | null | undefined; - contactName?: string | null | undefined; - emailAddress?: string | null | undefined; - phone?: string | null | undefined; - addresses?: Array | null | undefined; - registrationNumber?: string | null | undefined; - taxNumber?: string | null | undefined; - status: string; - defaultCurrency?: string | null | undefined; - metadata?: Metadata$Outbound | undefined; - supplementalData?: SupplementalData$Outbound | undefined; -}; - -/** @internal */ -export const UpdateSupplierResponseAccountingSupplier$outboundSchema: z.ZodType< - UpdateSupplierResponseAccountingSupplier$Outbound, - z.ZodTypeDef, - UpdateSupplierResponseAccountingSupplier -> = z.object({ - modifiedDate: z.string().optional(), - sourceModifiedDate: z.string().optional(), - id: z.string().optional(), - supplierName: z.nullable(z.string()).optional(), - contactName: z.nullable(z.string()).optional(), - emailAddress: z.nullable(z.string()).optional(), - phone: z.nullable(z.string()).optional(), - addresses: z.nullable(z.array(Items$outboundSchema)).optional(), - registrationNumber: z.nullable(z.string()).optional(), - taxNumber: z.nullable(z.string()).optional(), - status: SupplierStatus$outboundSchema, - defaultCurrency: z.nullable(z.string()).optional(), - metadata: Metadata$outboundSchema.optional(), - supplementalData: SupplementalData$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateSupplierResponseAccountingSupplier$ { - /** @deprecated use `UpdateSupplierResponseAccountingSupplier$inboundSchema` instead. */ - export const inboundSchema = - UpdateSupplierResponseAccountingSupplier$inboundSchema; - /** @deprecated use `UpdateSupplierResponseAccountingSupplier$outboundSchema` instead. */ - export const outboundSchema = - UpdateSupplierResponseAccountingSupplier$outboundSchema; - /** @deprecated use `UpdateSupplierResponseAccountingSupplier$Outbound` instead. */ - export type Outbound = UpdateSupplierResponseAccountingSupplier$Outbound; -} - -export function updateSupplierResponseAccountingSupplierToJSON( - updateSupplierResponseAccountingSupplier: - UpdateSupplierResponseAccountingSupplier, -): string { - return JSON.stringify( - UpdateSupplierResponseAccountingSupplier$outboundSchema.parse( - updateSupplierResponseAccountingSupplier, - ), - ); -} - export function updateSupplierResponseAccountingSupplierFromJSON( jsonString: string, ): SafeParseResult< @@ -337,69 +249,6 @@ export const UpdateSupplierResponse$inboundSchema: z.ZodType< statusCode: z.number().int(), }); -/** @internal */ -export type UpdateSupplierResponse$Outbound = { - data?: UpdateSupplierResponseAccountingSupplier$Outbound | null | undefined; - changes?: Array | null | undefined; - dataType?: string | undefined; - companyId: string; - pushOperationKey: string; - dataConnectionKey: string; - requestedOnUtc: string; - completedOnUtc?: string | undefined; - timeoutInMinutes?: number | null | undefined; - timeoutInSeconds?: number | null | undefined; - status: string; - errorMessage?: string | null | undefined; - validation?: Validation$Outbound | undefined; - statusCode: number; -}; - -/** @internal */ -export const UpdateSupplierResponse$outboundSchema: z.ZodType< - UpdateSupplierResponse$Outbound, - z.ZodTypeDef, - UpdateSupplierResponse -> = z.object({ - data: z.nullable( - z.lazy(() => UpdateSupplierResponseAccountingSupplier$outboundSchema), - ).optional(), - changes: z.nullable(z.array(PushOperationChange$outboundSchema)).optional(), - dataType: PropertieDataType$outboundSchema.optional(), - companyId: z.string(), - pushOperationKey: z.string(), - dataConnectionKey: z.string(), - requestedOnUtc: z.string(), - completedOnUtc: z.string().optional(), - timeoutInMinutes: z.nullable(z.number().int()).optional(), - timeoutInSeconds: z.nullable(z.number().int()).optional(), - status: PushOperationStatus$outboundSchema, - errorMessage: z.nullable(z.string()).optional(), - validation: Validation$outboundSchema.optional(), - statusCode: z.number().int(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateSupplierResponse$ { - /** @deprecated use `UpdateSupplierResponse$inboundSchema` instead. */ - export const inboundSchema = UpdateSupplierResponse$inboundSchema; - /** @deprecated use `UpdateSupplierResponse$outboundSchema` instead. */ - export const outboundSchema = UpdateSupplierResponse$outboundSchema; - /** @deprecated use `UpdateSupplierResponse$Outbound` instead. */ - export type Outbound = UpdateSupplierResponse$Outbound; -} - -export function updateSupplierResponseToJSON( - updateSupplierResponse: UpdateSupplierResponse, -): string { - return JSON.stringify( - UpdateSupplierResponse$outboundSchema.parse(updateSupplierResponse), - ); -} - export function updateSupplierResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/validation.ts b/sync-for-expenses/src/sdk/models/shared/validation.ts index a9e68bab1..3a6a92030 100644 --- a/sync-for-expenses/src/sdk/models/shared/validation.ts +++ b/sync-for-expenses/src/sdk/models/shared/validation.ts @@ -2,15 +2,13 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { ValidationItem, ValidationItem$inboundSchema, - ValidationItem$Outbound, - ValidationItem$outboundSchema, } from "./validationitem.js"; /** @@ -31,39 +29,6 @@ export const Validation$inboundSchema: z.ZodType< warnings: z.nullable(z.array(ValidationItem$inboundSchema)).optional(), }); -/** @internal */ -export type Validation$Outbound = { - errors?: Array | null | undefined; - warnings?: Array | null | undefined; -}; - -/** @internal */ -export const Validation$outboundSchema: z.ZodType< - Validation$Outbound, - z.ZodTypeDef, - Validation -> = z.object({ - errors: z.nullable(z.array(ValidationItem$outboundSchema)).optional(), - warnings: z.nullable(z.array(ValidationItem$outboundSchema)).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Validation$ { - /** @deprecated use `Validation$inboundSchema` instead. */ - export const inboundSchema = Validation$inboundSchema; - /** @deprecated use `Validation$outboundSchema` instead. */ - export const outboundSchema = Validation$outboundSchema; - /** @deprecated use `Validation$Outbound` instead. */ - export type Outbound = Validation$Outbound; -} - -export function validationToJSON(validation: Validation): string { - return JSON.stringify(Validation$outboundSchema.parse(validation)); -} - export function validationFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/validationitem.ts b/sync-for-expenses/src/sdk/models/shared/validationitem.ts index 072c8870b..ca354aa0b 100644 --- a/sync-for-expenses/src/sdk/models/shared/validationitem.ts +++ b/sync-for-expenses/src/sdk/models/shared/validationitem.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { safeParse } from "../../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -33,41 +33,6 @@ export const ValidationItem$inboundSchema: z.ZodType< validatorName: z.nullable(z.string()).optional(), }); -/** @internal */ -export type ValidationItem$Outbound = { - itemId?: string | null | undefined; - message?: string | null | undefined; - validatorName?: string | null | undefined; -}; - -/** @internal */ -export const ValidationItem$outboundSchema: z.ZodType< - ValidationItem$Outbound, - z.ZodTypeDef, - ValidationItem -> = z.object({ - itemId: z.nullable(z.string()).optional(), - message: z.nullable(z.string()).optional(), - validatorName: z.nullable(z.string()).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ValidationItem$ { - /** @deprecated use `ValidationItem$inboundSchema` instead. */ - export const inboundSchema = ValidationItem$inboundSchema; - /** @deprecated use `ValidationItem$outboundSchema` instead. */ - export const outboundSchema = ValidationItem$outboundSchema; - /** @deprecated use `ValidationItem$Outbound` instead. */ - export type Outbound = ValidationItem$Outbound; -} - -export function validationItemToJSON(validationItem: ValidationItem): string { - return JSON.stringify(ValidationItem$outboundSchema.parse(validationItem)); -} - export function validationItemFromJSON( jsonString: string, ): SafeParseResult { diff --git a/sync-for-expenses/src/sdk/models/shared/validfor.ts b/sync-for-expenses/src/sdk/models/shared/validfor.ts index 51248bf94..cc19074ad 100644 --- a/sync-for-expenses/src/sdk/models/shared/validfor.ts +++ b/sync-for-expenses/src/sdk/models/shared/validfor.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; export const ValidFor = { @@ -19,18 +19,3 @@ export type ValidFor = ClosedEnum; /** @internal */ export const ValidFor$inboundSchema: z.ZodNativeEnum = z .nativeEnum(ValidFor); - -/** @internal */ -export const ValidFor$outboundSchema: z.ZodNativeEnum = - ValidFor$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ValidFor$ { - /** @deprecated use `ValidFor$inboundSchema` instead. */ - export const inboundSchema = ValidFor$inboundSchema; - /** @deprecated use `ValidFor$outboundSchema` instead. */ - export const outboundSchema = ValidFor$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/models/shared/validtransactiontypes.ts b/sync-for-expenses/src/sdk/models/shared/validtransactiontypes.ts index c67aa1c2f..d113dc779 100644 --- a/sync-for-expenses/src/sdk/models/shared/validtransactiontypes.ts +++ b/sync-for-expenses/src/sdk/models/shared/validtransactiontypes.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; import { ClosedEnum } from "../../types/enums.js"; export const ValidTransactionTypes = { @@ -17,19 +17,3 @@ export type ValidTransactionTypes = ClosedEnum; export const ValidTransactionTypes$inboundSchema: z.ZodNativeEnum< typeof ValidTransactionTypes > = z.nativeEnum(ValidTransactionTypes); - -/** @internal */ -export const ValidTransactionTypes$outboundSchema: z.ZodNativeEnum< - typeof ValidTransactionTypes -> = ValidTransactionTypes$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ValidTransactionTypes$ { - /** @deprecated use `ValidTransactionTypes$inboundSchema` instead. */ - export const inboundSchema = ValidTransactionTypes$inboundSchema; - /** @deprecated use `ValidTransactionTypes$outboundSchema` instead. */ - export const outboundSchema = ValidTransactionTypes$outboundSchema; -} diff --git a/sync-for-expenses/src/sdk/reimbursements.ts b/sync-for-expenses/src/sdk/reimbursements.ts index 4c1823fc3..01a1a07e3 100644 --- a/sync-for-expenses/src/sdk/reimbursements.ts +++ b/sync-for-expenses/src/sdk/reimbursements.ts @@ -25,6 +25,8 @@ export class Reimbursements extends ClientSDK { * | QuickBooks Desktop | Yes | * | QuickBooks Online | Yes | * | Oracle NetSuite | Yes | + * | Zoho Books | Yes | + * | Sage Intacct | Yes | */ async create( request: operations.CreateReimbursableExpenseTransactionRequest, @@ -51,6 +53,8 @@ export class Reimbursements extends ClientSDK { * | FreeAgent | Yes | * | QuickBooks Online | Yes | * | Oracle NetSuite | Yes | + * | Sage Intacct | Yes | + * | Zoho Books | Yes | */ async update( request: operations.UpdateReimbursableExpenseTransactionRequest, diff --git a/sync-for-expenses/src/sdk/sdk.ts b/sync-for-expenses/src/sdk/sdk.ts index efb97338c..e63b02426 100644 --- a/sync-for-expenses/src/sdk/sdk.ts +++ b/sync-for-expenses/src/sdk/sdk.ts @@ -2,6 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import { validateWebhook } from "../funcs/validateWebhook.js"; import { ClientSDK } from "../lib/sdks.js"; import { Accounts } from "./accounts.js"; import { Adjustments } from "./adjustments.js"; @@ -15,12 +16,14 @@ import { Customers } from "./customers.js"; import { Expenses } from "./expenses.js"; import { ManageData } from "./managedata.js"; import { MappingOptions } from "./mappingoptions.js"; +import * as shared from "./models/shared/index.js"; import { PushOperations } from "./pushoperations.js"; import { Reimbursements } from "./reimbursements.js"; import { Suppliers } from "./suppliers.js"; import { Sync } from "./sync.js"; import { TransactionStatus } from "./transactionstatus.js"; import { Transfers } from "./transfers.js"; +import { unwrapAsync } from "./types/fp.js"; export class CodatSyncExpenses extends ClientSDK { private _companies?: Companies; @@ -112,4 +115,22 @@ export class CodatSyncExpenses extends ClientSDK { get suppliers(): Suppliers { return (this._suppliers ??= new Suppliers(this._options)); } + + async validateWebhook({ + request, + }: { + request: { + body: string; + headers: Record | Headers; + url: string; + method: string; + } | Request; + }): Promise< + shared.ExpensesSyncWebhook | undefined | shared.ClientRateLimitWebhook + > { + return unwrapAsync(validateWebhook( + this, + { request }, + )); + } } diff --git a/sync-for-expenses/src/sdk/suppliers.ts b/sync-for-expenses/src/sdk/suppliers.ts index c69528cde..f0e3efff3 100644 --- a/sync-for-expenses/src/sdk/suppliers.ts +++ b/sync-for-expenses/src/sdk/suppliers.ts @@ -20,7 +20,20 @@ export class Suppliers extends ClientSDK { * * [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-all-data-types). + * + * ### Supported Integrations + * + * | Integration | Supported | + * |-------------------------------|-----------| + * | Dynamics 365 Business Central | Yes | + * | FreeAgent | Yes | + * | Oracle NetSuite | Yes | + * | QuickBooks Desktop | Yes | + * | QuickBooks Online | Yes | + * | Sage Intacct | Yes | + * | Xero | Yes | + * | Zoho Books | Yes | */ async list( request: operations.ListSuppliersRequest, @@ -41,7 +54,20 @@ export class Suppliers extends ClientSDK { * * [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. * - * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-company-data). + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-expenses-api#/operations/refresh-all-data-types). + * + * ### Supported Integrations + * + * | Integration | Supported | + * |-------------------------------|-----------| + * | Dynamics 365 Business Central | Yes | + * | FreeAgent | Yes | + * | Oracle NetSuite | Yes | + * | QuickBooks Desktop | Yes | + * | QuickBooks Online | Yes | + * | Sage Intacct | Yes | + * | Xero | Yes | + * | Zoho Books | Yes | */ async get( request: operations.GetSupplierRequest, @@ -62,9 +88,22 @@ export class Suppliers extends ClientSDK { * * [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-suppliers-model). + * + * ### Supported Integrations + * + * | Integration | Supported | + * |-------------------------------|-----------| + * | Dynamics 365 Business Central | Yes | + * | FreeAgent | Yes | + * | Oracle NetSuite | Yes | + * | QuickBooks Desktop | Yes | + * | QuickBooks Online | Yes | + * | Sage Intacct | Yes | + * | Xero | Yes | + * | Zoho Books | Yes | */ async create( request: operations.CreateSupplierRequest, @@ -85,9 +124,17 @@ export class Suppliers extends ClientSDK { * * [Suppliers](https://docs.codat.io/sync-for-expenses-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. * - * **Integration-specific behaviour** + * **Integration-specific behavior** * * Required data may vary by integration. To see what data to post, first call [Get create/update supplier model](https://docs.codat.io/sync-for-expenses-api#/operations/get-create-update-suppliers-model). + * + * ### Supported Integrations + * + * | Integration | Supported | + * |-------------------|-----------| + * | FreeAgent | Yes | + * | QuickBooks Online | Yes | + * | Xero | Yes | */ async update( request: operations.UpdateSupplierRequest, diff --git a/sync-for-expenses/src/sdk/transfers.ts b/sync-for-expenses/src/sdk/transfers.ts index 29343ece6..d225138ea 100644 --- a/sync-for-expenses/src/sdk/transfers.ts +++ b/sync-for-expenses/src/sdk/transfers.ts @@ -20,12 +20,16 @@ export class Transfers extends ClientSDK { * The `from.amount` and `to.amount` fields are in the native currency of the account. * * ### Supported Integrations - * | Integration | Supported | - * |-----------------------|-----------| - * | FreeAgent | Yes | - * | QuickBooks Desktop | Yes | - * | QuickBooks Online | Yes | - * | Xero | Yes | + * | Integration | Create transfer | Update transfer | + * |-----------------------|------------------|------------------| + * | Dynamics | No | No | + * | FreeAgent | Yes | Yes | + * | NetSuite | No | No | + * | QuickBooks Desktop | Yes | No | + * | QuickBooks Online | Yes | Yes | + * | Sage Intacct | No | No | + * | Xero | Yes | No | + * | Zoho Books | No | No | */ async create( request: operations.CreateTransferTransactionRequest, diff --git a/sync-for-expenses/src/sdk/types/async.ts b/sync-for-expenses/src/sdk/types/async.ts new file mode 100644 index 000000000..689dba5de --- /dev/null +++ b/sync-for-expenses/src/sdk/types/async.ts @@ -0,0 +1,68 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export type APICall = + | { + status: "complete"; + request: Request; + response: Response; + } + | { + status: "request-error"; + request: Request; + response?: undefined; + } + | { + status: "invalid"; + request?: undefined; + response?: undefined; + }; + +export class APIPromise implements Promise { + readonly #promise: Promise<[T, APICall]>; + readonly #unwrapped: Promise; + + readonly [Symbol.toStringTag] = "APIPromise"; + + constructor(p: [T, APICall] | Promise<[T, APICall]>) { + this.#promise = p instanceof Promise ? p : Promise.resolve(p); + this.#unwrapped = + p instanceof Promise + ? this.#promise.then(([value]) => value) + : Promise.resolve(p[0]); + } + + then( + onfulfilled?: + | ((value: T) => TResult1 | PromiseLike) + | null + | undefined, + onrejected?: + | ((reason: any) => TResult2 | PromiseLike) + | null + | undefined, + ): Promise { + return this.#promise.then( + onfulfilled ? ([value]) => onfulfilled(value) : void 0, + onrejected, + ); + } + + catch( + onrejected?: + | ((reason: any) => TResult | PromiseLike) + | null + | undefined, + ): Promise { + return this.#unwrapped.catch(onrejected); + } + + finally(onfinally?: (() => void) | null | undefined): Promise { + return this.#unwrapped.finally(onfinally); + } + + $inspect(): Promise<[T, APICall]> { + return this.#promise; + } +} diff --git a/sync-for-expenses/src/sdk/types/blobs.ts b/sync-for-expenses/src/sdk/types/blobs.ts index 4ce846023..cce2892d4 100644 --- a/sync-for-expenses/src/sdk/types/blobs.ts +++ b/sync-for-expenses/src/sdk/types/blobs.ts @@ -2,13 +2,14 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; -export const blobLikeSchema: z.ZodType = - z.custom(isBlobLike, { - message: "expected a Blob, File or Blob-like object", - fatal: true, - }); +export const blobLikeSchema: z.ZodType = z.custom< + Blob +>(isBlobLike, { + message: "expected a Blob, File or Blob-like object", + fatal: true, +}); export function isBlobLike(val: unknown): val is Blob { if (val instanceof Blob) { diff --git a/sync-for-expenses/src/sdk/types/constdatetime.ts b/sync-for-expenses/src/sdk/types/constdatetime.ts index c0a4409c7..fe62144ea 100644 --- a/sync-for-expenses/src/sdk/types/constdatetime.ts +++ b/sync-for-expenses/src/sdk/types/constdatetime.ts @@ -2,7 +2,7 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as z from "zod"; +import * as z from "zod/v3"; export function constDateTime( val: string, @@ -11,5 +11,5 @@ export function constDateTime( return ( typeof v === "string" && new Date(v).getTime() === new Date(val).getTime() ); - }, `Value must be equivelant to ${val}`); + }, `Value must be equivalent to ${val}`); } diff --git a/sync-for-expenses/src/sdk/types/enums.ts b/sync-for-expenses/src/sdk/types/enums.ts index 6fb6d9109..aba0ffd2a 100644 --- a/sync-for-expenses/src/sdk/types/enums.ts +++ b/sync-for-expenses/src/sdk/types/enums.ts @@ -2,15 +2,44 @@ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -declare const __brand: unique symbol; -export type Unrecognized = T & { [__brand]: "unrecognized" }; +import * as z from "zod/v3"; +import { Unrecognized, unrecognized } from "./unrecognized.js"; -export function catchUnrecognizedEnum(value: T): Unrecognized { - return value as Unrecognized; +export type ClosedEnum>> = + T[keyof T]; +export type OpenEnum>> = + | T[keyof T] + | Unrecognized; + +export function inboundSchema>( + enumObj: T, +): z.ZodType, z.ZodTypeDef, unknown> { + const options = Object.values(enumObj); + return z.union([ + ...options.map(x => z.literal(x)), + z.string().transform(x => unrecognized(x)), + ] as any); } -type Prettify = { [K in keyof T]: T[K] } & {}; -export type ClosedEnum = T[keyof T]; -export type OpenEnum = - | Prettify - | Unrecognized; +export function inboundSchemaInt>( + enumObj: T, +): z.ZodType, z.ZodTypeDef, unknown> { + // For numeric enums, Object.values returns both numbers and string keys + const options = Object.values(enumObj).filter(v => typeof v === "number"); + return z.union([ + ...options.map(x => z.literal(x)), + z.number().int().transform(x => unrecognized(x)), + ] as any); +} + +export function outboundSchema>( + _: T, +): z.ZodType> { + return z.string() as any; +} + +export function outboundSchemaInt>( + _: T, +): z.ZodType> { + return z.number().int() as any; +} diff --git a/sync-for-expenses/src/sdk/types/index.ts b/sync-for-expenses/src/sdk/types/index.ts index 1af7eaa25..19a7bd013 100644 --- a/sync-for-expenses/src/sdk/types/index.ts +++ b/sync-for-expenses/src/sdk/types/index.ts @@ -4,9 +4,10 @@ export { blobLikeSchema, isBlobLike } from "./blobs.js"; export { Decimal } from "./decimal.js"; -export { catchUnrecognizedEnum } from "./enums.js"; -export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js"; +export type { ClosedEnum, OpenEnum } from "./enums.js"; export type { Result } from "./fp.js"; export type { PageIterator, Paginator } from "./operations.js"; export { createPageIterator } from "./operations.js"; export { RFCDate } from "./rfcdate.js"; +export * from "./unrecognized.js"; +export type { WebhookRecipient } from "./webhooks.js"; diff --git a/sync-for-expenses/src/sdk/types/unrecognized.ts b/sync-for-expenses/src/sdk/types/unrecognized.ts new file mode 100644 index 000000000..b7a2a13f3 --- /dev/null +++ b/sync-for-expenses/src/sdk/types/unrecognized.ts @@ -0,0 +1,35 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +declare const __brand: unique symbol; +export type Unrecognized = T & { [__brand]: "unrecognized" }; + +function unrecognized(value: T): Unrecognized { + globalCount++; + return value as Unrecognized; +} + +let globalCount = 0; +let refCount = 0; +export function startCountingUnrecognized() { + refCount++; + const start = globalCount; + return { + /** + * Ends counting and returns the delta. + * @param delta - If provided, only this amount is added to the parent counter + * (used for nested unions where we only want to record the winning option's count). + * If not provided, records all counts since start(). + */ + end: (delta?: number) => { + const count = globalCount - start; + // Reset globalCount back to start, then add only the specified delta + globalCount = start + (delta ?? count); + if (--refCount === 0) globalCount = 0; + return count; + }, + }; +} + +export { unrecognized }; diff --git a/sync-for-expenses/src/sdk/types/webhooks.ts b/sync-for-expenses/src/sdk/types/webhooks.ts new file mode 100644 index 000000000..9510d20c0 --- /dev/null +++ b/sync-for-expenses/src/sdk/types/webhooks.ts @@ -0,0 +1,7 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export type WebhookRecipient = { + url: string; +}; diff --git a/sync-for-expenses/tsconfig.json b/sync-for-expenses/tsconfig.json index f9d286a74..76110f883 100644 --- a/sync-for-expenses/tsconfig.json +++ b/sync-for-expenses/tsconfig.json @@ -1,8 +1,7 @@ { "compilerOptions": { - "incremental": true, - "tsBuildInfoFile": ".tsbuildinfo", - "target": "ES2018", + "incremental": false, + "target": "ES2020", "lib": ["ES2022", "DOM", "DOM.Iterable"], "jsx": "react-jsx", @@ -14,6 +13,7 @@ "declaration": true, "declarationMap": true, "sourceMap": true, + "rootDir": "src", "outDir": ".", @@ -37,5 +37,5 @@ "forceConsistentCasingInFileNames": true }, "include": ["src"], - "exclude": ["node_modules"] + "exclude": ["node_modules", "src/__tests__"] }