From cefd5c159777064f3543b07a3d5b67de4d12dde7 Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Fri, 13 Sep 2024 15:54:08 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.396.7 --- .speakeasy/workflow.lock | 14 + .speakeasy/workflow.yaml | 2 + .../sync-for-payables-version-1/.eslintrc.cjs | 28 + .../sync-for-payables-version-1/.eslintrc.yml | 17 - .../sync-for-payables-version-1/.gitignore | 17 + .../sync-for-payables-version-1/.npmignore | 10 + .../.speakeasy/gen.lock | 4997 +++++++- .../.speakeasy/gen.yaml | 26 +- .../CONTRIBUTING.md | 26 + .../sync-for-payables-version-1/FUNCTIONS.md | 109 + .../sync-for-payables-version-1/README.md | 702 +- .../sync-for-payables-version-1/RELEASES.md | 12 +- .../sync-for-payables-version-1/RUNTIMES.md | 22 + .../sync-for-payables-version-1/USAGE.md | 32 +- .../docs/internal/utils/retryconfig.md | 24 - .../docs/lib/utils/retryconfig.md | 24 + .../models/{shared => errors}/errormessage.md | 21 +- .../models/operations/createaccountrequest.md | 34 + .../operations/createbankaccountrequest.md | 25 + .../operations/createbillcreditnoterequest.md | 61 + .../operations/createbillpaymentrequest.md | 64 + .../models/operations/createbillrequest.md | 45 + .../operations/createconnectionrequest.md | 16 +- .../operations/createconnectionrequestbody.md | 9 + .../operations/createjournalentryrequest.md | 44 + .../models/operations/createjournalrequest.md | 24 + .../operations/createsupplierrequest.md | 59 + .../operations/deletebillattachmentrequest.md | 23 + .../operations/deletebillpaymentrequest.md | 21 + .../models/operations/deletebillrequest.md | 21 + .../models/operations/deletecompanyrequest.md | 9 + .../operations/deletecompanyresponse.md | 11 - .../operations/deleteconnectionrequest.md | 10 + .../operations/deleteconnectionresponse.md | 11 - .../downloadbillattachmentrequest.md | 23 + .../operations/getaccountingprofilerequest.md | 17 + .../models/operations/getaccountrequest.md | 19 + .../operations/getbillattachmentrequest.md | 23 + .../operations/getbillcreditnoterequest.md | 19 + .../operations/getbillpaymentsrequest.md | 19 + .../sdk/models/operations/getbillrequest.md | 19 + .../models/operations/getcompanyrequest.md | 9 + .../models/operations/getconnectionrequest.md | 10 + .../getcreateaccountmodelrequest.md | 19 + .../getcreatebankaccountsmodelrequest.md | 19 + .../getcreatebillpaymentmodelrequest.md | 19 + .../getcreatejournalentrymodelrequest.md | 19 + .../getcreatejournalmodelrequest.md | 19 + ...tcreateupdatebillcreditnotemodelrequest.md | 19 + .../getcreateupdatebillmodelrequest.md | 19 + .../getcreateupdatesuppliermodelrequest.md | 19 + .../operations/getdatastatusdatastatuses.md | 361 + .../models/operations/getdatastatusrequest.md | 17 + .../models/operations/getjournalrequest.md | 19 + .../operations/getpaymentmethodrequest.md | 19 + .../operations/getpulloperationrequest.md | 19 + .../operations/getpushoperationrequest.md | 19 + .../models/operations/getsupplierrequest.md | 19 + .../models/operations/gettaxraterequest.md | 19 + .../operations/gettrackingcategoryrequest.md | 19 + .../models/operations/listaccountsrequest.md | 25 + .../operations/listbillattachmentsrequest.md | 21 + .../operations/listbillcreditnotesrequest.md | 25 + .../operations/listbillpaymentsrequest.md | 25 + .../sdk/models/operations/listbillsrequest.md | 18 +- .../models/operations/listbillsresponse.md | 12 - .../models/operations/listcompaniesrequest.md | 16 +- .../operations/listcompaniesresponse.md | 12 - .../operations/listconnectionsrequest.md | 17 +- .../operations/listconnectionsresponse.md | 12 - .../models/operations/listjournalsrequest.md | 25 + .../operations/listpaymentmethodsrequest.md | 25 + .../operations/listpulloperationsrequest.md | 25 + .../operations/listpushoperationsrequest.md | 25 + .../models/operations/listsuppliersrequest.md | 25 + .../models/operations/listtaxratesrequest.md | 25 + .../listtrackingcategoriesrequest.md | 25 + .../operations/refreshalldatatypesrequest.md | 17 + .../operations/refreshdatatyperequest.md | 20 + .../operations/unlinkconnectionrequest.md | 14 +- .../unlinkconnectionupdateconnection.md | 7 + .../operations/updatebillcreditnoterequest.md | 64 + ...ectionresponse.md => updatebillrequest.md} | 52 +- .../models/operations/updatecompanyrequest.md | 22 +- .../operations/updatesupplierrequest.md | 62 + .../operations/uploadbillattachmentrequest.md | 18 + .../docs/sdk/models/shared/account.md | 74 + .../sdk/models/shared/accountingaccount.md | 76 + .../models/shared/accountingaddresstype.md | 17 + .../models/shared/accountingbankaccount.md | 55 + .../docs/sdk/models/shared/accountingbill.md | 80 + .../models/shared/accountingbillcreditnote.md | 95 + .../models/shared/accountingbillpayment.md | 214 + .../sdk/models/shared/accountingjournal.md | 55 + .../models/shared/accountingjournalentry.md | 73 + .../shared/accountingpaymentallocation.md | 25 + .../shared/accountingprojectreference.md | 18 + .../sdk/models/shared/accountingsupplier.md | 73 + .../sdk/models/shared/accountprototype.md | 38 + .../accountprototypevaliddatatypelinks.md | 57 + .../{accountreference.md => accountref.md} | 11 +- .../docs/sdk/models/shared/accounts.md | 49 + .../docs/sdk/models/shared/accountstatus.md | 17 + .../docs/sdk/models/shared/accounttype.md | 17 + .../docs/sdk/models/shared/address.md | 23 + .../docs/sdk/models/shared/allocation.md | 21 + .../docs/sdk/models/shared/attachment.md | 46 + .../docs/sdk/models/shared/attachments.md | 23 + .../sdk/models/shared/attachmentupload.md | 15 + .../shared/bankaccountcreateresponse.md | 44 + ...ankaccountcreateresponsebankaccounttype.md | 19 + .../bankaccountprototype.md} | 33 +- .../sdk/models/shared/bankaccountstatus.md | 17 + .../docs/sdk/models/shared/bankaccounttype.md | 19 + .../docs/sdk/models/shared/bill.md | 86 +- .../docs/sdk/models/shared/billallocation.md | 21 + .../docs/sdk/models/shared/billcreditnote.md | 93 + .../billcreditnotelineitem.md} | 37 +- ...tnotelineitemaccountingprojectreference.md | 18 + .../billcreditnotelineitemcustomerref.md | 18 + .../shared/billcreditnotelineitemtracking.md | 29 + .../docs/sdk/models/shared/billcreditnotes.md | 32 + .../sdk/models/shared/billcreditnotestatus.md | 17 + .../docs/sdk/models/shared/billedtotype.md | 17 + .../sdk/models/shared/billeventpayload.md | 11 - .../sdk/models/shared/billeventwebhook.md | 11 - .../docs/sdk/models/shared/billlineitem.md | 39 +- .../sdk/models/shared/billlineitemdatatype.md | 17 + .../docs/sdk/models/shared/billpayment.md | 212 + .../docs/sdk/models/shared/billpaymentline.md | 21 + .../sdk/models/shared/billpaymentlinelink.md | 20 + .../models/shared/billpaymentlinelinktype.md | 17 + .../docs/sdk/models/shared/billpayments.md | 510 + .../docs/sdk/models/shared/bills.md | 34 +- .../docs/sdk/models/shared/billstatus.md | 18 +- .../shared/clientratelimitreachedwebhook.md | 37 +- .../clientratelimitreachedwebhookdata.md | 9 + .../shared/clientratelimitresetwebhook.md | 39 +- .../shared/clientratelimitresetwebhookdata.md | 15 +- .../clientratelimitwebhook.md} | 31 +- .../clientratelimitwebhookpayload.md} | 23 +- .../docs/sdk/models/shared/codatfile.md | 16 + .../docs/sdk/models/shared/companies.md | 67 +- .../docs/sdk/models/shared/company.md | 53 +- .../docs/sdk/models/shared/companyinfo.md | 82 + .../sdk/models/shared/companyrequestbody.md | 19 +- .../docs/sdk/models/shared/connection.md | 41 +- .../docs/sdk/models/shared/connections.md | 54 +- .../sdk/models/shared/contactreference.md | 18 + .../models/shared/createaccountresponse.md | 44 + ...createaccountresponsevaliddatatypelinks.md | 57 + .../shared/createbillcreditnoteresponse.md | 44 + ...tebillcreditnoteresponserecordreference.md | 22 + .../shared/createbillpaymentresponse.md | 44 + .../sdk/models/shared/createbillresponse.md | 44 + ...billresponseaccountingpaymentallocation.md | 25 + .../shared/createbillresponseallocation.md | 21 + ...reatebillresponsepurchaseorderreference.md | 16 + .../createbillresponsewithholdingtax.md | 20 + .../shared/createjournalentryresponse.md | 44 + .../models/shared/createjournalresponse.md | 44 + .../models/shared/createsupplierresponse.md | 44 + .../docs/sdk/models/shared/customerref.md | 18 + .../sdk/models/shared/dataconnectionerror.md | 18 +- .../sdk/models/shared/dataconnectionstatus.md | 16 +- .../docs/sdk/models/shared/datasetstatus.md | 17 + .../datastatus.md} | 31 +- .../docs/sdk/models/shared/datatype.md | 17 + .../docs/sdk/models/shared/datatypes.md | 17 + .../sdk/models/shared/definitionstatus.md | 17 + .../docs/sdk/models/shared/errorstatus.md | 17 + .../docs/sdk/models/shared/errorvalidation.md | 7 + .../sdk/models/shared/errorvalidationitem.md | 7 + .../docs/sdk/models/shared/groupreference.md | 9 + .../docs/sdk/models/shared/halref.md | 7 + .../docs/sdk/models/shared/itemref.md | 20 + .../docs/sdk/models/shared/itemreference.md | 20 + .../docs/sdk/models/shared/items.md | 18 +- .../docs/sdk/models/shared/journal.md | 53 + .../docs/sdk/models/shared/journalentry.md | 71 + .../models/shared/journalentryrecordref.md | 20 + .../shared/journalentryrecordrefdatatype.md | 17 + .../docs/sdk/models/shared/journalline.md | 30 + .../sdk/models/shared/journallinedatatype.md | 17 + .../sdk/models/shared/journallinetracking.md | 23 + .../sdk/models/shared/journalprototype.md | 23 + .../docs/sdk/models/shared/journalref.md | 20 + .../docs/sdk/models/shared/journals.md | 38 + .../docs/sdk/models/shared/journalstatus.md | 17 + .../docs/sdk/models/shared/links.md | 18 +- .../docs/sdk/models/shared/metadata.md | 15 + .../models/shared/paymentallocationitems.md | 25 + .../models/shared/paymentallocationpayment.md | 25 + .../docs/sdk/models/shared/paymentmethod.md | 30 + .../sdk/models/shared/paymentmethodref.md | 21 + .../docs/sdk/models/shared/paymentmethods.md | 37 + .../sdk/models/shared/paymentmethodstatus.md | 17 + .../sdk/models/shared/paymentmethodtype.md | 17 + .../docs/sdk/models/shared/phonenumber.md | 19 + .../docs/sdk/models/shared/phonenumbertype.md | 17 + .../sdk/models/shared/propertiedatatype.md | 17 + .../docs/sdk/models/shared/pulloperation.md | 41 + .../docs/sdk/models/shared/pulloperations.md | 46 + .../models/shared/purchaseorderreference.md | 16 + .../docs/sdk/models/shared/pushchangetype.md | 17 + .../sdk/models/shared/pushfieldvalidation.md | 19 + .../docs/sdk/models/shared/pushoperation.md | 43 + .../sdk/models/shared/pushoperationchange.md | 21 + .../sdk/models/shared/pushoperationref.md | 18 + .../docs/sdk/models/shared/pushoperations.md | 32 + .../sdk/models/shared/pushoperationstatus.md | 17 + .../docs/sdk/models/shared/pushoption.md | 25 + .../sdk/models/shared/pushoptionchoice.md | 19 + .../sdk/models/shared/pushoptionproperty.md | 26 + .../docs/sdk/models/shared/pushoptiontype.md | 17 + .../sdk/models/shared/pushvalidationinfo.md | 16 + .../sdk/models/shared/recordlinereference.md | 19 + .../docs/sdk/models/shared/recordreference.md | 22 + .../docs/sdk/models/shared/security.md | 9 + .../docs/sdk/models/shared/sourcetype.md | 19 +- .../docs/sdk/models/shared/status.md | 17 + .../sdk/models/shared/supplementaldata.md | 19 + .../docs/sdk/models/shared/supplier.md | 71 + .../docs/sdk/models/shared/supplierref.md | 9 + .../docs/sdk/models/shared/suppliers.md | 71 + .../docs/sdk/models/shared/supplierstatus.md | 17 + .../docs/sdk/models/shared/tags.md | 16 + .../docs/sdk/models/shared/taxrate.md | 50 + .../sdk/models/shared/taxratecomponent.md | 21 + .../{taxratereference.md => taxrateref.md} | 26 +- .../docs/sdk/models/shared/taxrates.md | 37 + .../docs/sdk/models/shared/taxratestatus.md | 20 + .../docs/sdk/models/shared/tracking.md | 29 + .../sdk/models/shared/trackingcategories.md | 42 + .../sdk/models/shared/trackingcategory.md | 159 + .../sdk/models/shared/trackingcategoryref.md | 22 + .../sdk/models/shared/trackingcategorytree.md | 29 + .../sdk/models/shared/trackingrecordref.md | 20 + .../shared/trackingrecordrefdatatype.md | 17 + .../docs/sdk/models/shared/type.md | 17 + .../shared/updatebillcreditnoteresponse.md | 44 + ...ditnoteresponseaccountingbillcreditnote.md | 95 + ...tebillcreditnoteresponserecordreference.md | 22 + .../sdk/models/shared/updatebillresponse.md | 44 + .../updatebillresponseaccountingbill.md | 80 + ...billresponseaccountingpaymentallocation.md | 25 + .../shared/updatebillresponseallocation.md | 21 + ...pdatebillresponsepurchaseorderreference.md | 16 + .../updatebillresponsewithholdingtax.md | 20 + .../models/shared/updatesupplierresponse.md | 44 + ...pdatesupplierresponseaccountingsupplier.md | 73 + .../docs/sdk/models/shared/validation.md | 18 + .../docs/sdk/models/shared/validationitem.md | 17 + .../models/shared/validdatatypelinkitems.md | 57 + .../sdk/models/shared/validdatatypelinks.md | 57 + .../docs/sdk/models/shared/weblink.md | 21 + .../docs/sdk/models/shared/withholdingtax.md | 20 + .../docs/sdk/models/shared/zero.md | 21 + .../docs/sdk/models/shared/zerodatatype.md | 17 + .../clientratelimitreachedresponse.md | 10 - .../webhooks/clientratelimitresetresponse.md | 10 - .../webhooks/payablesbillcreatedresponse.md | 10 - .../webhooks/payablesbilldeletedresponse.md | 10 - .../webhooks/payablesbillupdatedresponse.md | 10 - .../docs/sdks/accounts/README.md | 391 + .../docs/sdks/bankaccounts/README.md | 195 + .../docs/sdks/billcreditnotes/README.md | 642 + .../docs/sdks/billpayments/README.md | 562 + .../docs/sdks/bills/README.md | 1155 +- .../docs/sdks/codatsyncpayables/README.md | 42 +- .../docs/sdks/companies/README.md | 426 +- .../docs/sdks/companyinfo/README.md | 87 + .../docs/sdks/connections/README.md | 388 +- .../docs/sdks/journalentries/README.md | 298 + .../docs/sdks/journals/README.md | 374 + .../docs/sdks/managedata/README.md | 417 + .../docs/sdks/paymentmethods/README.md | 188 + .../docs/sdks/pushoperations/README.md | 176 + .../docs/sdks/suppliers/README.md | 551 + .../docs/sdks/taxrates/README.md | 188 + .../docs/sdks/trackingcategories/README.md | 188 + .../jest.config.js | 8 - .../sync-for-payables-version-1/jsr.json | 27 + .../package-lock.json | 10241 ++++------------ .../sync-for-payables-version-1/package.json | 52 +- .../sync-for-payables-version-1/src/core.ts | 13 + .../src/funcs/accountsCreate.ts | 183 + .../src/funcs/accountsGet.ts | 169 + .../src/funcs/accountsGetCreateModel.ts | 161 + .../src/funcs/accountsList.ts | 173 + .../src/funcs/bankAccountsCreate.ts | 184 + .../src/funcs/bankAccountsGetCreateModel.ts | 161 + .../src/funcs/billCreditNotesCreate.ts | 182 + .../src/funcs/billCreditNotesGet.ts | 171 + .../billCreditNotesGetCreateUpdateModel.ts | 163 + .../src/funcs/billCreditNotesList.ts | 176 + .../src/funcs/billCreditNotesUpdate.ts | 188 + .../src/funcs/billPaymentsCreate.ts | 182 + .../src/funcs/billPaymentsDelete.ts | 186 + .../src/funcs/billPaymentsGet.ts | 169 + .../src/funcs/billPaymentsGetCreateModel.ts | 161 + .../src/funcs/billPaymentsList.ts | 175 + .../src/funcs/billsCreate.ts | 181 + .../src/funcs/billsDelete.ts | 186 + .../src/funcs/billsDeleteAttachment.ts | 181 + .../src/funcs/billsDownloadAttachment.ts | 165 + .../src/funcs/billsGet.ts | 169 + .../src/funcs/billsGetAttachment.ts | 165 + .../src/funcs/billsGetCreateUpdateModel.ts | 161 + .../src/funcs/billsList.ts | 171 + .../src/funcs/billsListAttachments.ts | 170 + .../src/funcs/billsUpdate.ts | 186 + .../src/funcs/billsUploadAttachment.ts | 198 + .../src/funcs/companiesCreate.ts | 147 + .../src/funcs/companiesDelete.ts | 149 + .../src/funcs/companiesGet.ts | 149 + .../src/funcs/companiesList.ts | 161 + .../src/funcs/companiesUpdate.ts | 156 + .../funcs/companyInfoGetAccountingProfile.ts | 158 + .../src/funcs/connectionsCreate.ts | 152 + .../src/funcs/connectionsDelete.ts | 153 + .../src/funcs/connectionsGet.ts | 152 + .../src/funcs/connectionsList.ts | 168 + .../src/funcs/connectionsUnlink.ts | 156 + .../src/funcs/journalEntriesCreate.ts | 182 + .../src/funcs/journalEntriesGetCreateModel.ts | 161 + .../src/funcs/journalsCreate.ts | 183 + .../src/funcs/journalsGet.ts | 169 + .../src/funcs/journalsGetCreateModel.ts | 161 + .../src/funcs/journalsList.ts | 173 + .../src/funcs/manageDataGet.ts | 145 + .../src/funcs/manageDataGetPullOperation.ts | 152 + .../src/funcs/manageDataListPullOperations.ts | 169 + .../funcs/manageDataRefreshAllDataTypes.ts | 151 + .../src/funcs/manageDataRefreshDataType.ts | 162 + .../src/funcs/paymentMethodsGet.ts | 170 + .../src/funcs/paymentMethodsList.ts | 176 + .../src/funcs/pushOperationsGet.ts | 153 + .../src/funcs/pushOperationsList.ts | 169 + .../src/funcs/suppliersCreate.ts | 181 + .../src/funcs/suppliersGet.ts | 169 + .../funcs/suppliersGetCreateUpdateModel.ts | 163 + .../src/funcs/suppliersList.ts | 173 + .../src/funcs/suppliersUpdate.ts | 186 + .../src/funcs/taxRatesGet.ts | 169 + .../src/funcs/taxRatesList.ts | 173 + .../src/funcs/trackingCategoriesGet.ts | 171 + .../src/funcs/trackingCategoriesList.ts | 176 + .../src/hooks/hooks.ts | 112 + .../src/hooks/index.ts | 6 + .../src/hooks/registration.ts | 14 + .../src/hooks/types.ts | 98 + .../sync-for-payables-version-1/src/index.ts | 6 +- .../src/internal/utils/contenttype.ts | 33 - .../src/internal/utils/headers.ts | 138 - .../src/internal/utils/index.ts | 12 - .../src/internal/utils/pathparams.ts | 79 - .../src/internal/utils/queryparams.ts | 248 - .../src/internal/utils/requestbody.ts | 357 - .../src/internal/utils/retries.ts | 182 - .../src/internal/utils/security.ts | 259 - .../src/internal/utils/utils.ts | 367 - .../src/lib/base64.ts | 37 + .../src/lib/config.ts | 64 + .../src/lib/dlv.ts | 53 + .../src/lib/encodings.ts | 449 + .../src/lib/files.ts | 40 + .../src/lib/http.ts | 323 + .../src/lib/is-plain-object.ts | 43 + .../src/lib/logger.ts | 9 + .../src/lib/matchers.ts | 322 + .../src/lib/primitives.ts | 40 + .../src/lib/retries.ts | 187 + .../src/lib/schemas.ts | 86 + .../src/lib/sdks.ts | 384 + .../src/lib/security.ts | 217 + .../src/lib/url.ts | 33 + .../src/sdk/accounts.ts | 108 + .../src/sdk/bankaccounts.ts | 62 + .../src/sdk/billcreditnotes.ts | 134 + .../src/sdk/billpayments.ts | 155 + .../src/sdk/bills.ts | 413 +- .../src/sdk/companies.ts | 692 +- .../src/sdk/companyinfo.ts | 28 + .../src/sdk/connections.ts | 679 +- .../src/sdk/index.ts | 4 +- .../src/sdk/journalentries.ts | 62 + .../src/sdk/journals.ts | 108 + .../src/sdk/managedata.ts | 106 + .../src/sdk/models/errors/errormessage.ts | 156 + .../src/sdk/models/errors/httpclienterrors.ts | 62 + .../src/sdk/models/errors/index.ts | 7 +- .../src/sdk/models/errors/sdkerror.ts | 30 +- .../sdk/models/errors/sdkvalidationerror.ts | 97 + .../sdk/models/operations/createaccount.ts | 67 + .../models/operations/createbankaccount.ts | 67 + .../src/sdk/models/operations/createbill.ts | 76 + .../models/operations/createbillcreditnote.ts | 76 + .../models/operations/createbillpayment.ts | 76 + .../sdk/models/operations/createcompany.ts | 39 - .../sdk/models/operations/createconnection.ts | 150 +- .../sdk/models/operations/createjournal.ts | 67 + .../models/operations/createjournalentry.ts | 76 + .../sdk/models/operations/createsupplier.ts | 76 + .../src/sdk/models/operations/deletebill.ts | 62 + .../models/operations/deletebillattachment.ts | 69 + .../models/operations/deletebillpayment.ts | 62 + .../sdk/models/operations/deletecompany.ts | 71 +- .../sdk/models/operations/deleteconnection.ts | 84 +- .../operations/downloadbillattachment.ts | 69 + .../src/sdk/models/operations/getaccount.ts | 55 + .../models/operations/getaccountingprofile.ts | 48 + .../src/sdk/models/operations/getbill.ts | 55 + .../models/operations/getbillattachment.ts | 69 + .../models/operations/getbillcreditnote.ts | 55 + .../sdk/models/operations/getbillpayments.ts | 55 + .../src/sdk/models/operations/getcompany.ts | 77 +- .../sdk/models/operations/getconnection.ts | 100 +- .../operations/getcreateaccountmodel.ts | 55 + .../operations/getcreatebankaccountsmodel.ts | 56 + .../operations/getcreatebillpaymentmodel.ts | 55 + .../operations/getcreatejournalentrymodel.ts | 56 + .../operations/getcreatejournalmodel.ts | 55 + .../getcreateupdatebillcreditnotemodel.ts | 58 + .../operations/getcreateupdatebillmodel.ts | 55 + .../getcreateupdatesuppliermodel.ts | 57 + .../sdk/models/operations/getdatastatus.ts | 426 + .../src/sdk/models/operations/getjournal.ts | 55 + .../sdk/models/operations/getpaymentmethod.ts | 55 + .../sdk/models/operations/getpulloperation.ts | 55 + .../sdk/models/operations/getpushoperation.ts | 55 + .../src/sdk/models/operations/getsupplier.ts | 55 + .../src/sdk/models/operations/gettaxrate.ts | 55 + .../models/operations/gettrackingcategory.ts | 55 + .../src/sdk/models/operations/index.ts | 74 +- .../src/sdk/models/operations/listaccounts.ts | 76 + .../models/operations/listbillattachments.ts | 62 + .../models/operations/listbillcreditnotes.ts | 76 + .../sdk/models/operations/listbillpayments.ts | 76 + .../src/sdk/models/operations/listbills.ts | 135 +- .../sdk/models/operations/listcompanies.ts | 116 +- .../sdk/models/operations/listconnections.ts | 129 +- .../src/sdk/models/operations/listjournals.ts | 76 + .../models/operations/listpaymentmethods.ts | 76 + .../models/operations/listpulloperations.ts | 76 + .../models/operations/listpushoperations.ts | 76 + .../sdk/models/operations/listsuppliers.ts | 76 + .../src/sdk/models/operations/listtaxrates.ts | 76 + .../operations/listtrackingcategories.ts | 76 + .../models/operations/refreshalldatatypes.ts | 48 + .../sdk/models/operations/refreshdatatype.ts | 63 + .../sdk/models/operations/unlinkconnection.ts | 154 +- .../src/sdk/models/operations/updatebill.ts | 90 + .../models/operations/updatebillcreditnote.ts | 90 + .../sdk/models/operations/updatecompany.ts | 104 +- .../sdk/models/operations/updatesupplier.ts | 90 + .../models/operations/uploadbillattachment.ts | 76 + .../src/sdk/models/shared/account.ts | 318 + .../models/shared/accountingaddresstype.ts | 40 + .../src/sdk/models/shared/accountprototype.ts | 271 + .../src/sdk/models/shared/accountref.ts | 58 + .../src/sdk/models/shared/accounts.ts | 91 + .../src/sdk/models/shared/accountstatus.ts | 41 + .../src/sdk/models/shared/accounttype.ts | 41 + .../src/sdk/models/shared/address.ts | 92 + .../src/sdk/models/shared/attachment.ts | 135 + .../src/sdk/models/shared/attachments.ts | 51 + .../src/sdk/models/shared/attachmentupload.ts | 55 + .../shared/bankaccountcreateresponse.ts | 480 + .../sdk/models/shared/bankaccountprototype.ts | 217 + .../sdk/models/shared/bankaccountstatus.ts | 41 + .../src/sdk/models/shared/bill.ts | 648 +- .../src/sdk/models/shared/billcreditnote.ts | 417 + .../models/shared/billcreditnotelineitem.ts | 456 + .../src/sdk/models/shared/billcreditnotes.ts | 91 + .../sdk/models/shared/billcreditnotestatus.ts | 43 + .../src/sdk/models/shared/billedtotype.ts | 39 + .../src/sdk/models/shared/billeventpayload.ts | 38 - .../src/sdk/models/shared/billeventwebhook.ts | 35 - .../src/sdk/models/shared/billlineitem.ts | 392 +- .../src/sdk/models/shared/billpayment.ts | 359 + .../src/sdk/models/shared/billpaymentline.ts | 86 + .../sdk/models/shared/billpaymentlinelink.ts | 121 + .../models/shared/billpaymentlinelinktype.ts | 49 + .../src/sdk/models/shared/billpayments.ts | 91 + .../src/sdk/models/shared/bills.ts | 111 +- .../src/sdk/models/shared/billstatus.ts | 42 +- .../shared/clientratelimitreachedwebhook.ts | 154 +- .../clientratelimitreachedwebhookdata.ts | 115 +- .../shared/clientratelimitresetwebhook.ts | 154 +- .../shared/clientratelimitresetwebhookdata.ts | 142 +- .../models/shared/clientratelimitwebhook.ts | 90 + .../shared/clientratelimitwebhookpayload.ts | 80 + .../src/sdk/models/shared/codatfile.ts | 59 + .../src/sdk/models/shared/companies.ts | 114 +- .../src/sdk/models/shared/company.ts | 270 +- .../src/sdk/models/shared/companyinfo.ts | 236 + .../sdk/models/shared/companyrequestbody.ts | 128 +- .../src/sdk/models/shared/connection.ts | 321 +- .../src/sdk/models/shared/connections.ts | 114 +- .../models/shared/createaccountresponse.ts | 526 + .../shared/createbillcreditnoteresponse.ts | 626 + .../shared/createbillpaymentresponse.ts | 554 + .../sdk/models/shared/createbillresponse.ts | 794 ++ .../shared/createjournalentryresponse.ts | 425 + .../models/shared/createjournalresponse.ts | 363 + .../models/shared/createsupplierresponse.ts | 359 + .../sdk/models/shared/dataconnectionerror.ts | 199 +- .../sdk/models/shared/dataconnectionstatus.ts | 40 +- .../src/sdk/models/shared/datastatus.ts | 175 + .../src/sdk/models/shared/datatype.ts | 78 + .../src/sdk/models/shared/definitionstatus.ts | 40 + .../src/sdk/models/shared/errormessage.ts | 59 - .../src/sdk/models/shared/errorvalidation.ts | 62 +- .../sdk/models/shared/errorvalidationitem.ts | 77 +- .../src/sdk/models/shared/halref.ts | 50 +- .../src/sdk/models/shared/index.ts | 144 +- .../src/sdk/models/shared/itemref.ts | 55 + .../src/sdk/models/shared/items.ts | 60 +- .../src/sdk/models/shared/journal.ts | 167 + .../src/sdk/models/shared/journalentry.ts | 230 + .../models/shared/journalentryrecordref.ts | 103 + .../src/sdk/models/shared/journalline.ts | 222 + .../src/sdk/models/shared/journalprototype.ts | 119 + .../src/sdk/models/shared/journalref.ts | 58 + .../src/sdk/models/shared/journals.ts | 91 + .../src/sdk/models/shared/journalstatus.ts | 40 + .../src/sdk/models/shared/links.ts | 73 +- .../src/sdk/models/shared/metadata.ts | 48 + .../models/shared/paymentallocationitems.ts | 185 + .../models/shared/paymentallocationpayment.ts | 169 + .../src/sdk/models/shared/paymentmethod.ts | 136 + .../src/sdk/models/shared/paymentmethodref.ts | 58 + .../src/sdk/models/shared/paymentmethods.ts | 91 + .../sdk/models/shared/paymentmethodtype.ts | 44 + .../src/sdk/models/shared/phonenumber.ts | 60 + .../src/sdk/models/shared/phonenumbertype.ts | 42 + .../sdk/models/shared/propertiedatatype.ts | 80 + .../src/sdk/models/shared/pulloperation.ts | 220 + .../src/sdk/models/shared/pulloperations.ts | 91 + .../src/sdk/models/shared/pushchangetype.ts | 42 + .../sdk/models/shared/pushfieldvalidation.ts | 62 + .../src/sdk/models/shared/pushoperation.ts | 192 + .../sdk/models/shared/pushoperationchange.ts | 70 + .../src/sdk/models/shared/pushoperationref.ts | 60 + .../src/sdk/models/shared/pushoperations.ts | 91 + .../sdk/models/shared/pushoperationstatus.ts | 41 + .../src/sdk/models/shared/pushoption.ts | 105 + .../src/sdk/models/shared/pushoptionchoice.ts | 81 + .../sdk/models/shared/pushoptionproperty.ts | 102 + .../src/sdk/models/shared/pushoptiontype.ts | 45 + .../sdk/models/shared/pushvalidationinfo.ts | 57 + .../src/sdk/models/shared/security.ts | 56 +- .../src/sdk/models/shared/status.ts | 56 + .../src/sdk/models/shared/supplementaldata.ts | 52 + .../src/sdk/models/shared/supplier.ts | 166 + .../src/sdk/models/shared/supplierref.ts | 65 +- .../src/sdk/models/shared/suppliers.ts | 91 + .../src/sdk/models/shared/supplierstatus.ts | 40 + .../src/sdk/models/shared/taxrate.ts | 186 + .../src/sdk/models/shared/taxratecomponent.ts | 70 + .../src/sdk/models/shared/taxrateref.ts | 79 + .../src/sdk/models/shared/taxrates.ts | 91 + .../src/sdk/models/shared/taxratestatus.ts | 50 + .../src/sdk/models/shared/tracking.ts | 182 + .../sdk/models/shared/trackingcategories.ts | 91 + .../src/sdk/models/shared/trackingcategory.ts | 231 + .../sdk/models/shared/trackingcategoryref.ts | 60 + .../sdk/models/shared/trackingcategorytree.ts | 113 + .../sdk/models/shared/trackingrecordref.ts | 95 + .../shared/updatebillcreditnoteresponse.ts | 645 + .../sdk/models/shared/updatebillresponse.ts | 797 ++ .../models/shared/updatesupplierresponse.ts | 365 + .../src/sdk/models/shared/validation.ts | 58 + .../src/sdk/models/shared/validationitem.ts | 62 + .../models/shared/validdatatypelinkitems.ts | 97 + .../src/sdk/models/shared/weblink.ts | 89 + .../src/sdk/models/shared/zero.ts | 95 + .../models/webhooks/clientratelimitreached.ts | 26 - .../models/webhooks/clientratelimitreset.ts | 26 - .../src/sdk/models/webhooks/index.ts | 9 - .../models/webhooks/payablesbillcreated.ts | 26 - .../models/webhooks/payablesbilldeleted.ts | 26 - .../models/webhooks/payablesbillupdated.ts | 26 - .../src/sdk/paymentmethods.ts | 56 + .../src/sdk/pushoperations.ts | 46 + .../src/sdk/sdk.ts | 226 +- .../src/sdk/suppliers.ts | 132 + .../src/sdk/taxrates.ts | 56 + .../src/sdk/trackingcategories.ts | 56 + .../src/sdk/types/blobs.ts | 31 + .../src/sdk/types/constdatetime.ts | 15 + .../src/sdk/types/decimal.ts | 5 + .../src/sdk/types/enums.ts | 16 + .../src/sdk/types/fp.ts | 50 + .../src/sdk/types/index.ts | 11 +- .../src/sdk/types/operations.ts | 99 + .../src/sdk/types/rfcdate.ts | 68 +- .../src/sdk/types/streams.ts | 21 + .../sync-for-payables-version-1/tsconfig.json | 51 +- 600 files changed, 59641 insertions(+), 13757 deletions(-) create mode 100644 previous-versions/sync-for-payables-version-1/.eslintrc.cjs delete mode 100644 previous-versions/sync-for-payables-version-1/.eslintrc.yml create mode 100644 previous-versions/sync-for-payables-version-1/.npmignore create mode 100644 previous-versions/sync-for-payables-version-1/CONTRIBUTING.md create mode 100644 previous-versions/sync-for-payables-version-1/FUNCTIONS.md create mode 100644 previous-versions/sync-for-payables-version-1/RUNTIMES.md delete mode 100644 previous-versions/sync-for-payables-version-1/docs/internal/utils/retryconfig.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/lib/utils/retryconfig.md rename previous-versions/sync-for-payables-version-1/docs/sdk/models/{shared => errors}/errormessage.md (94%) create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createaccountrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createbankaccountrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createbillcreditnoterequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createbillpaymentrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createbillrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createjournalentryrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createjournalrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createsupplierrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletebillattachmentrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletebillpaymentrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletebillrequest.md delete mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletecompanyresponse.md delete mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deleteconnectionresponse.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/downloadbillattachmentrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getaccountingprofilerequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getaccountrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getbillattachmentrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getbillcreditnoterequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getbillpaymentsrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getbillrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreateaccountmodelrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreatebankaccountsmodelrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreatebillpaymentmodelrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreatejournalentrymodelrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreatejournalmodelrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreateupdatebillcreditnotemodelrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreateupdatebillmodelrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreateupdatesuppliermodelrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getdatastatusdatastatuses.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getdatastatusrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getjournalrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getpaymentmethodrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getpulloperationrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getpushoperationrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getsupplierrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/gettaxraterequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/gettrackingcategoryrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listaccountsrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillattachmentsrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillcreditnotesrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillpaymentsrequest.md delete mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillsresponse.md delete mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listcompaniesresponse.md delete mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listconnectionsresponse.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listjournalsrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listpaymentmethodsrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listpulloperationsrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listpushoperationsrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listsuppliersrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listtaxratesrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listtrackingcategoriesrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/refreshalldatatypesrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/refreshdatatyperequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatebillcreditnoterequest.md rename previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/{unlinkconnectionresponse.md => updatebillrequest.md} (60%) create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatesupplierrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/uploadbillattachmentrequest.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/account.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingaccount.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingaddresstype.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingbankaccount.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingbill.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingbillcreditnote.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingbillpayment.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingjournal.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingjournalentry.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingpaymentallocation.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingprojectreference.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingsupplier.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountprototype.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountprototypevaliddatatypelinks.md rename previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/{accountreference.md => accountref.md} (66%) create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accounts.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountstatus.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accounttype.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/address.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/allocation.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/attachment.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/attachments.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/attachmentupload.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccountcreateresponse.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccountcreateresponsebankaccounttype.md rename previous-versions/sync-for-payables-version-1/docs/sdk/models/{operations/updatecompanyresponse.md => shared/bankaccountprototype.md} (74%) create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccountstatus.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccounttype.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billallocation.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnote.md rename previous-versions/sync-for-payables-version-1/docs/sdk/models/{operations/getconnectionresponse.md => shared/billcreditnotelineitem.md} (62%) create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotelineitemaccountingprojectreference.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotelineitemcustomerref.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotelineitemtracking.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotes.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotestatus.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billedtotype.md delete mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billeventpayload.md delete mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billeventwebhook.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billlineitemdatatype.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpayment.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpaymentline.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpaymentlinelink.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpaymentlinelinktype.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpayments.md rename previous-versions/sync-for-payables-version-1/docs/sdk/models/{operations/getcompanyresponse.md => shared/clientratelimitwebhook.md} (75%) rename previous-versions/sync-for-payables-version-1/docs/sdk/models/{operations/createconnectionresponse.md => shared/clientratelimitwebhookpayload.md} (62%) create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/codatfile.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/companyinfo.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/contactreference.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createaccountresponse.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createaccountresponsevaliddatatypelinks.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillcreditnoteresponse.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillcreditnoteresponserecordreference.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillpaymentresponse.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponse.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponseaccountingpaymentallocation.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponseallocation.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponsepurchaseorderreference.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponsewithholdingtax.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createjournalentryresponse.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createjournalresponse.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createsupplierresponse.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/customerref.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/datasetstatus.md rename previous-versions/sync-for-payables-version-1/docs/sdk/models/{operations/createcompanyresponse.md => shared/datastatus.md} (83%) create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/datatype.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/datatypes.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/definitionstatus.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/errorstatus.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/itemref.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/itemreference.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journal.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalentry.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalentryrecordref.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalentryrecordrefdatatype.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalline.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journallinedatatype.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journallinetracking.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalprototype.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalref.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journals.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalstatus.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/metadata.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentallocationitems.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentallocationpayment.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethod.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethodref.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethods.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethodstatus.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethodtype.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/phonenumber.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/phonenumbertype.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/propertiedatatype.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pulloperation.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pulloperations.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/purchaseorderreference.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushchangetype.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushfieldvalidation.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperation.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperationchange.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperationref.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperations.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperationstatus.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoption.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoptionchoice.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoptionproperty.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoptiontype.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushvalidationinfo.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/recordlinereference.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/recordreference.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/status.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/supplementaldata.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/supplier.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/suppliers.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/supplierstatus.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/tags.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxrate.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxratecomponent.md rename previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/{taxratereference.md => taxrateref.md} (63%) create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxrates.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxratestatus.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/tracking.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingcategories.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingcategory.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingcategoryref.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingcategorytree.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingrecordref.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingrecordrefdatatype.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/type.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillcreditnoteresponse.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillcreditnoteresponseaccountingbillcreditnote.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillcreditnoteresponserecordreference.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponse.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponseaccountingbill.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponseaccountingpaymentallocation.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponseallocation.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponsepurchaseorderreference.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponsewithholdingtax.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatesupplierresponse.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatesupplierresponseaccountingsupplier.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/validation.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/validationitem.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/validdatatypelinkitems.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/validdatatypelinks.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/weblink.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/withholdingtax.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/zero.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/zerodatatype.md delete mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/clientratelimitreachedresponse.md delete mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/clientratelimitresetresponse.md delete mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/payablesbillcreatedresponse.md delete mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/payablesbilldeletedresponse.md delete mode 100644 previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/payablesbillupdatedresponse.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdks/accounts/README.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdks/bankaccounts/README.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdks/billcreditnotes/README.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdks/billpayments/README.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdks/companyinfo/README.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdks/journalentries/README.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdks/journals/README.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdks/managedata/README.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdks/paymentmethods/README.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdks/pushoperations/README.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdks/suppliers/README.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdks/taxrates/README.md create mode 100644 previous-versions/sync-for-payables-version-1/docs/sdks/trackingcategories/README.md delete mode 100644 previous-versions/sync-for-payables-version-1/jest.config.js create mode 100644 previous-versions/sync-for-payables-version-1/jsr.json create mode 100644 previous-versions/sync-for-payables-version-1/src/core.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/accountsCreate.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/accountsGet.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/accountsGetCreateModel.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/accountsList.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/bankAccountsCreate.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/bankAccountsGetCreateModel.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesCreate.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesGet.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesGetCreateUpdateModel.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesList.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesUpdate.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsCreate.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsDelete.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsGet.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsGetCreateModel.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsList.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billsCreate.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billsDelete.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billsDeleteAttachment.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billsDownloadAttachment.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billsGet.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billsGetAttachment.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billsGetCreateUpdateModel.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billsList.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billsListAttachments.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billsUpdate.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/billsUploadAttachment.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/companiesCreate.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/companiesDelete.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/companiesGet.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/companiesList.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/companiesUpdate.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/companyInfoGetAccountingProfile.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/connectionsCreate.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/connectionsDelete.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/connectionsGet.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/connectionsList.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/connectionsUnlink.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/journalEntriesCreate.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/journalEntriesGetCreateModel.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/journalsCreate.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/journalsGet.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/journalsGetCreateModel.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/journalsList.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/manageDataGet.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/manageDataGetPullOperation.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/manageDataListPullOperations.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/manageDataRefreshAllDataTypes.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/manageDataRefreshDataType.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/paymentMethodsGet.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/paymentMethodsList.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/pushOperationsGet.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/pushOperationsList.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/suppliersCreate.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/suppliersGet.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/suppliersGetCreateUpdateModel.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/suppliersList.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/suppliersUpdate.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/taxRatesGet.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/taxRatesList.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/trackingCategoriesGet.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/funcs/trackingCategoriesList.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/hooks/hooks.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/hooks/index.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/hooks/registration.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/hooks/types.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/internal/utils/contenttype.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/internal/utils/headers.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/internal/utils/index.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/internal/utils/pathparams.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/internal/utils/queryparams.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/internal/utils/requestbody.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/internal/utils/retries.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/internal/utils/security.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/internal/utils/utils.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/lib/base64.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/lib/config.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/lib/dlv.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/lib/encodings.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/lib/files.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/lib/http.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/lib/is-plain-object.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/lib/logger.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/lib/matchers.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/lib/primitives.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/lib/retries.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/lib/schemas.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/lib/sdks.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/lib/security.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/lib/url.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/accounts.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/bankaccounts.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/billcreditnotes.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/billpayments.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/companyinfo.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/journalentries.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/journals.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/managedata.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/errors/errormessage.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/errors/httpclienterrors.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/errors/sdkvalidationerror.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createaccount.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createbankaccount.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createbill.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createbillcreditnote.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createbillpayment.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createcompany.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createjournal.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createjournalentry.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createsupplier.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deletebill.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deletebillattachment.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deletebillpayment.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/downloadbillattachment.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getaccount.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getaccountingprofile.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getbill.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getbillattachment.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getbillcreditnote.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getbillpayments.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreateaccountmodel.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreatebankaccountsmodel.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreatebillpaymentmodel.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreatejournalentrymodel.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreatejournalmodel.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreateupdatebillcreditnotemodel.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreateupdatebillmodel.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreateupdatesuppliermodel.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getdatastatus.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getjournal.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getpaymentmethod.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getpulloperation.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getpushoperation.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getsupplier.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/gettaxrate.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/gettrackingcategory.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listaccounts.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listbillattachments.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listbillcreditnotes.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listbillpayments.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listjournals.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listpaymentmethods.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listpulloperations.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listpushoperations.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listsuppliers.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listtaxrates.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listtrackingcategories.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/refreshalldatatypes.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/refreshdatatype.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/updatebill.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/updatebillcreditnote.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/updatesupplier.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/operations/uploadbillattachment.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/account.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accountingaddresstype.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accountprototype.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accountref.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accounts.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accountstatus.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accounttype.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/address.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/attachment.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/attachments.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/attachmentupload.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bankaccountcreateresponse.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bankaccountprototype.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bankaccountstatus.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billcreditnote.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billcreditnotelineitem.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billcreditnotes.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billcreditnotestatus.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billedtotype.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billeventpayload.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billeventwebhook.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpayment.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpaymentline.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpaymentlinelink.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpaymentlinelinktype.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpayments.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitwebhook.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitwebhookpayload.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/codatfile.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/companyinfo.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createaccountresponse.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createbillcreditnoteresponse.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createbillpaymentresponse.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createbillresponse.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createjournalentryresponse.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createjournalresponse.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createsupplierresponse.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/datastatus.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/datatype.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/definitionstatus.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/errormessage.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/itemref.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journal.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalentry.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalentryrecordref.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalline.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalprototype.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalref.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journals.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalstatus.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/metadata.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentallocationitems.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentallocationpayment.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentmethod.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentmethodref.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentmethods.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentmethodtype.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/phonenumber.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/phonenumbertype.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/propertiedatatype.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pulloperation.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pulloperations.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushchangetype.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushfieldvalidation.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperation.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperationchange.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperationref.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperations.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperationstatus.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoption.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoptionchoice.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoptionproperty.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoptiontype.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushvalidationinfo.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/status.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/supplementaldata.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/supplier.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/suppliers.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/supplierstatus.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxrate.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxratecomponent.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxrateref.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxrates.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxratestatus.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/tracking.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingcategories.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingcategory.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingcategoryref.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingcategorytree.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingrecordref.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/updatebillcreditnoteresponse.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/updatebillresponse.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/updatesupplierresponse.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/validation.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/validationitem.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/validdatatypelinkitems.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/weblink.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/shared/zero.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/clientratelimitreached.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/clientratelimitreset.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/index.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/payablesbillcreated.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/payablesbilldeleted.ts delete mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/payablesbillupdated.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/paymentmethods.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/pushoperations.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/suppliers.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/taxrates.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/trackingcategories.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/types/blobs.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/types/constdatetime.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/types/decimal.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/types/enums.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/types/fp.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/types/operations.ts create mode 100644 previous-versions/sync-for-payables-version-1/src/sdk/types/streams.ts diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 206c27e54..a0e457096 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -35,6 +35,13 @@ sources: tags: - latest - main + sync-for-payables-version-1-source: + sourceNamespace: sync-for-payables-version-1-source + sourceRevisionDigest: sha256:d91d7da27f07044c21e155a8787ef998eab1eb641136347c1287053f8e8087fb + sourceBlobDigest: sha256:e1fb1fe0af40cf137b8b320fd75e913c83e54e0a2bb2e80a5af69e0bce409e71 + tags: + - latest + - main sync-for-payroll-source: sourceNamespace: sync-for-payroll-source sourceRevisionDigest: sha256:95fbbd9d479c192baabe63b6b95494bf55876fb9007df3657fa51660a8c73431 @@ -68,6 +75,11 @@ targets: sourceNamespace: sync-for-payables-source sourceRevisionDigest: sha256:daca0e08a3d44b87bb2242380dfc8be94f2cb83b1ea0a252af7f31f9b0c2c247 sourceBlobDigest: sha256:6ed96ad8ecab289621839d0df446a473e3dc8ea83765e3316020a6670b44da0b + sync-for-payables-version-1-library: + source: sync-for-payables-version-1-source + sourceNamespace: sync-for-payables-version-1-source + sourceRevisionDigest: sha256:d91d7da27f07044c21e155a8787ef998eab1eb641136347c1287053f8e8087fb + sourceBlobDigest: sha256:e1fb1fe0af40cf137b8b320fd75e913c83e54e0a2bb2e80a5af69e0bce409e71 sync-for-payroll-library: source: sync-for-payroll-source sourceNamespace: sync-for-payroll-source @@ -132,6 +144,8 @@ workflow: sync-for-payables-version-1-source: inputs: - location: https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Sync-Payables-v1.yaml + registry: + location: registry.speakeasyapi.dev/codat/codat/sync-for-payables-version-1-source sync-for-payroll-source: inputs: - location: https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Sync-Payroll.yaml diff --git a/.speakeasy/workflow.yaml b/.speakeasy/workflow.yaml index 2800b2a3d..5ca36c73e 100644 --- a/.speakeasy/workflow.yaml +++ b/.speakeasy/workflow.yaml @@ -56,6 +56,8 @@ sources: sync-for-payables-version-1-source: inputs: - location: https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Sync-Payables-v1.yaml + registry: + location: registry.speakeasyapi.dev/codat/codat/sync-for-payables-version-1-source sync-for-payroll-source: inputs: - location: https://raw.githubusercontent.com/codatio/oas/main/yaml/Codat-Sync-Payroll.yaml diff --git a/previous-versions/sync-for-payables-version-1/.eslintrc.cjs b/previous-versions/sync-for-payables-version-1/.eslintrc.cjs new file mode 100644 index 000000000..4d160bd21 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/.eslintrc.cjs @@ -0,0 +1,28 @@ +/* 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/previous-versions/sync-for-payables-version-1/.eslintrc.yml b/previous-versions/sync-for-payables-version-1/.eslintrc.yml deleted file mode 100644 index 565e62401..000000000 --- a/previous-versions/sync-for-payables-version-1/.eslintrc.yml +++ /dev/null @@ -1,17 +0,0 @@ -env: - browser: true - es2021: true - node: true -extends: - - eslint:recommended - - plugin:@typescript-eslint/recommended -overrides: [] -parser: "@typescript-eslint/parser" -parserOptions: - ecmaVersion: latest - sourceType: module -plugins: - - "@typescript-eslint" -rules: - "@typescript-eslint/no-explicit-any": "off" - "no-prototype-builtins": "off" diff --git a/previous-versions/sync-for-payables-version-1/.gitignore b/previous-versions/sync-for-payables-version-1/.gitignore index 1eae0cf67..5c4525812 100755 --- a/previous-versions/sync-for-payables-version-1/.gitignore +++ b/previous-versions/sync-for-payables-version-1/.gitignore @@ -1,2 +1,19 @@ +/models +/sdk/models/errors +/sdk/types +/node_modules +/lib +/sdk +/funcs +/hooks +/index.* +/core.* +/cjs +/esm +/dist +/.tsbuildinfo +/.tshy +/.tshy-* +/__tests__ dist/ node_modules/ diff --git a/previous-versions/sync-for-payables-version-1/.npmignore b/previous-versions/sync-for-payables-version-1/.npmignore new file mode 100644 index 000000000..06cd8abf3 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/.npmignore @@ -0,0 +1,10 @@ +**/* +!/**/*.ts +!/**/*.js +!/**/*.map + +/.eslintrc.js +/cjs +/.tshy +/.tshy-* +/__tests__ diff --git a/previous-versions/sync-for-payables-version-1/.speakeasy/gen.lock b/previous-versions/sync-for-payables-version-1/.speakeasy/gen.lock index 9a5e36e7c..251ce9435 100755 --- a/previous-versions/sync-for-payables-version-1/.speakeasy/gen.lock +++ b/previous-versions/sync-for-payables-version-1/.speakeasy/gen.lock @@ -1,156 +1,4893 @@ lockVersion: 2.0.0 id: cfbd6780-603a-4791-82d1-1923fbb6bef3 management: - docChecksum: 681f585653736aeb9009765e989c7e73 + docChecksum: aab54cde14db23059c114a1c3bcbf7ff docVersion: 3.0.0 - speakeasyVersion: internal - generationVersion: 2.253.0 - releaseVersion: 2.2.0 - configChecksum: 4658936a7f14a33ca4370a709ff787dc + speakeasyVersion: 1.396.7 + generationVersion: 2.415.6 + releaseVersion: 2.3.0 + configChecksum: 528dea2cdc414926e529e0fc161f9ae9 repoURL: https://github.com/codatio/client-sdk-typescript.git - repoSubDirectory: sync-for-payables - installationURL: https://gitpkg.now.sh/codatio/client-sdk-typescript/sync-for-payables + repoSubDirectory: previous-versions/sync-for-payables-version-1 + installationURL: https://gitpkg.now.sh/codatio/client-sdk-typescript/previous-versions/sync-for-payables-version-1 published: true features: typescript: - core: 3.4.6 + additionalDependencies: 0.1.0 + constsAndDefaults: 0.1.11 + core: 3.17.2 + decimal: 0.1.2 + defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 - examples: 2.81.3 - globalSecurity: 2.82.2 - globalServerURLs: 2.82.1 - ignores: 2.81.1 - nameOverrides: 2.81.1 - retries: 2.82.1 + downloadStreams: 0.1.1 + enumUnions: 0.1.0 + envVarSecurityUsage: 0.1.1 + examples: 2.81.4 + globalSecurity: 2.82.11 + globalSecurityCallbacks: 0.1.0 + globalSecurityFlattening: 0.1.0 + globalServerURLs: 2.82.4 + nameOverrides: 2.81.2 + nullables: 0.1.0 + responseFormat: 0.2.3 + retries: 2.83.0 + sdkHooks: 0.1.0 + serverEventsSentinels: 0.1.0 + uploadStreams: 0.1.0 + webhooks: 1.0.0 generatedFiles: - - src/sdk/companies.ts - - src/sdk/bills.ts - - src/sdk/connections.ts - - src/sdk/sdk.ts - - .eslintrc.yml - - jest.config.js - - package-lock.json + - .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/createbankaccountrequest.md + - docs/sdk/models/operations/createbillcreditnoterequest.md + - docs/sdk/models/operations/createbillpaymentrequest.md + - docs/sdk/models/operations/createbillrequest.md + - docs/sdk/models/operations/createconnectionrequest.md + - docs/sdk/models/operations/createconnectionrequestbody.md + - docs/sdk/models/operations/createjournalentryrequest.md + - docs/sdk/models/operations/createjournalrequest.md + - docs/sdk/models/operations/createsupplierrequest.md + - docs/sdk/models/operations/deletebillattachmentrequest.md + - docs/sdk/models/operations/deletebillpaymentrequest.md + - docs/sdk/models/operations/deletebillrequest.md + - docs/sdk/models/operations/deletecompanyrequest.md + - docs/sdk/models/operations/deleteconnectionrequest.md + - docs/sdk/models/operations/downloadbillattachmentrequest.md + - docs/sdk/models/operations/getaccountingprofilerequest.md + - docs/sdk/models/operations/getaccountrequest.md + - docs/sdk/models/operations/getbillattachmentrequest.md + - docs/sdk/models/operations/getbillcreditnoterequest.md + - docs/sdk/models/operations/getbillpaymentsrequest.md + - docs/sdk/models/operations/getbillrequest.md + - docs/sdk/models/operations/getcompanyrequest.md + - docs/sdk/models/operations/getconnectionrequest.md + - docs/sdk/models/operations/getcreateaccountmodelrequest.md + - docs/sdk/models/operations/getcreatebankaccountsmodelrequest.md + - docs/sdk/models/operations/getcreatebillpaymentmodelrequest.md + - docs/sdk/models/operations/getcreatejournalentrymodelrequest.md + - docs/sdk/models/operations/getcreatejournalmodelrequest.md + - docs/sdk/models/operations/getcreateupdatebillcreditnotemodelrequest.md + - docs/sdk/models/operations/getcreateupdatebillmodelrequest.md + - docs/sdk/models/operations/getcreateupdatesuppliermodelrequest.md + - docs/sdk/models/operations/getdatastatusdatastatuses.md + - docs/sdk/models/operations/getdatastatusrequest.md + - docs/sdk/models/operations/getjournalrequest.md + - docs/sdk/models/operations/getpaymentmethodrequest.md + - docs/sdk/models/operations/getpulloperationrequest.md + - docs/sdk/models/operations/getpushoperationrequest.md + - docs/sdk/models/operations/getsupplierrequest.md + - docs/sdk/models/operations/gettaxraterequest.md + - docs/sdk/models/operations/gettrackingcategoryrequest.md + - docs/sdk/models/operations/listaccountsrequest.md + - docs/sdk/models/operations/listbillattachmentsrequest.md + - docs/sdk/models/operations/listbillcreditnotesrequest.md + - docs/sdk/models/operations/listbillpaymentsrequest.md + - docs/sdk/models/operations/listbillsrequest.md + - docs/sdk/models/operations/listcompaniesrequest.md + - docs/sdk/models/operations/listconnectionsrequest.md + - docs/sdk/models/operations/listjournalsrequest.md + - docs/sdk/models/operations/listpaymentmethodsrequest.md + - docs/sdk/models/operations/listpulloperationsrequest.md + - docs/sdk/models/operations/listpushoperationsrequest.md + - docs/sdk/models/operations/listsuppliersrequest.md + - docs/sdk/models/operations/listtaxratesrequest.md + - docs/sdk/models/operations/listtrackingcategoriesrequest.md + - docs/sdk/models/operations/refreshalldatatypesrequest.md + - docs/sdk/models/operations/refreshdatatyperequest.md + - docs/sdk/models/operations/unlinkconnectionrequest.md + - docs/sdk/models/operations/unlinkconnectionupdateconnection.md + - docs/sdk/models/operations/updatebillcreditnoterequest.md + - docs/sdk/models/operations/updatebillrequest.md + - docs/sdk/models/operations/updatecompanyrequest.md + - docs/sdk/models/operations/updatesupplierrequest.md + - docs/sdk/models/operations/uploadbillattachmentrequest.md + - docs/sdk/models/shared/account.md + - docs/sdk/models/shared/accountingaccount.md + - docs/sdk/models/shared/accountingaddresstype.md + - docs/sdk/models/shared/accountingbankaccount.md + - docs/sdk/models/shared/accountingbill.md + - docs/sdk/models/shared/accountingbillcreditnote.md + - docs/sdk/models/shared/accountingbillpayment.md + - docs/sdk/models/shared/accountingjournal.md + - docs/sdk/models/shared/accountingjournalentry.md + - docs/sdk/models/shared/accountingpaymentallocation.md + - docs/sdk/models/shared/accountingprojectreference.md + - docs/sdk/models/shared/accountingsupplier.md + - docs/sdk/models/shared/accountprototype.md + - docs/sdk/models/shared/accountprototypevaliddatatypelinks.md + - docs/sdk/models/shared/accountref.md + - docs/sdk/models/shared/accounts.md + - docs/sdk/models/shared/accountstatus.md + - docs/sdk/models/shared/accounttype.md + - docs/sdk/models/shared/address.md + - docs/sdk/models/shared/allocation.md + - docs/sdk/models/shared/attachment.md + - docs/sdk/models/shared/attachments.md + - docs/sdk/models/shared/attachmentupload.md + - docs/sdk/models/shared/bankaccountcreateresponse.md + - docs/sdk/models/shared/bankaccountcreateresponsebankaccounttype.md + - docs/sdk/models/shared/bankaccountprototype.md + - docs/sdk/models/shared/bankaccountstatus.md + - docs/sdk/models/shared/bankaccounttype.md + - docs/sdk/models/shared/bill.md + - docs/sdk/models/shared/billallocation.md + - docs/sdk/models/shared/billcreditnote.md + - docs/sdk/models/shared/billcreditnotelineitem.md + - docs/sdk/models/shared/billcreditnotelineitemaccountingprojectreference.md + - docs/sdk/models/shared/billcreditnotelineitemcustomerref.md + - docs/sdk/models/shared/billcreditnotelineitemtracking.md + - docs/sdk/models/shared/billcreditnotes.md + - docs/sdk/models/shared/billcreditnotestatus.md + - docs/sdk/models/shared/billedtotype.md + - docs/sdk/models/shared/billlineitem.md + - docs/sdk/models/shared/billlineitemdatatype.md + - docs/sdk/models/shared/billpayment.md + - docs/sdk/models/shared/billpaymentline.md + - docs/sdk/models/shared/billpaymentlinelink.md + - docs/sdk/models/shared/billpaymentlinelinktype.md + - docs/sdk/models/shared/billpayments.md + - docs/sdk/models/shared/bills.md + - docs/sdk/models/shared/billstatus.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/companyinfo.md + - docs/sdk/models/shared/companyrequestbody.md + - docs/sdk/models/shared/connection.md + - docs/sdk/models/shared/connections.md + - docs/sdk/models/shared/contactreference.md + - docs/sdk/models/shared/createaccountresponse.md + - docs/sdk/models/shared/createaccountresponsevaliddatatypelinks.md + - docs/sdk/models/shared/createbillcreditnoteresponse.md + - docs/sdk/models/shared/createbillcreditnoteresponserecordreference.md + - docs/sdk/models/shared/createbillpaymentresponse.md + - docs/sdk/models/shared/createbillresponse.md + - docs/sdk/models/shared/createbillresponseaccountingpaymentallocation.md + - docs/sdk/models/shared/createbillresponseallocation.md + - docs/sdk/models/shared/createbillresponsepurchaseorderreference.md + - docs/sdk/models/shared/createbillresponsewithholdingtax.md + - docs/sdk/models/shared/createjournalentryresponse.md + - docs/sdk/models/shared/createjournalresponse.md + - docs/sdk/models/shared/createsupplierresponse.md + - docs/sdk/models/shared/customerref.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/definitionstatus.md + - docs/sdk/models/shared/errorstatus.md + - docs/sdk/models/shared/errorvalidation.md + - docs/sdk/models/shared/errorvalidationitem.md + - docs/sdk/models/shared/groupreference.md + - docs/sdk/models/shared/halref.md + - docs/sdk/models/shared/itemref.md + - docs/sdk/models/shared/itemreference.md + - docs/sdk/models/shared/items.md + - docs/sdk/models/shared/journal.md + - docs/sdk/models/shared/journalentry.md + - docs/sdk/models/shared/journalentryrecordref.md + - docs/sdk/models/shared/journalentryrecordrefdatatype.md + - docs/sdk/models/shared/journalline.md + - docs/sdk/models/shared/journallinedatatype.md + - docs/sdk/models/shared/journallinetracking.md + - docs/sdk/models/shared/journalprototype.md + - docs/sdk/models/shared/journalref.md + - docs/sdk/models/shared/journals.md + - docs/sdk/models/shared/journalstatus.md + - docs/sdk/models/shared/links.md + - docs/sdk/models/shared/metadata.md + - docs/sdk/models/shared/paymentallocationitems.md + - docs/sdk/models/shared/paymentallocationpayment.md + - docs/sdk/models/shared/paymentmethod.md + - docs/sdk/models/shared/paymentmethodref.md + - docs/sdk/models/shared/paymentmethods.md + - docs/sdk/models/shared/paymentmethodstatus.md + - docs/sdk/models/shared/paymentmethodtype.md + - docs/sdk/models/shared/phonenumber.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/purchaseorderreference.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/recordlinereference.md + - docs/sdk/models/shared/recordreference.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/supplierref.md + - docs/sdk/models/shared/suppliers.md + - docs/sdk/models/shared/supplierstatus.md + - docs/sdk/models/shared/tags.md + - docs/sdk/models/shared/taxrate.md + - docs/sdk/models/shared/taxratecomponent.md + - docs/sdk/models/shared/taxrateref.md + - docs/sdk/models/shared/taxrates.md + - docs/sdk/models/shared/taxratestatus.md + - docs/sdk/models/shared/tracking.md + - docs/sdk/models/shared/trackingcategories.md + - docs/sdk/models/shared/trackingcategory.md + - docs/sdk/models/shared/trackingcategoryref.md + - docs/sdk/models/shared/trackingcategorytree.md + - docs/sdk/models/shared/trackingrecordref.md + - docs/sdk/models/shared/trackingrecordrefdatatype.md + - docs/sdk/models/shared/type.md + - docs/sdk/models/shared/updatebillcreditnoteresponse.md + - docs/sdk/models/shared/updatebillcreditnoteresponseaccountingbillcreditnote.md + - docs/sdk/models/shared/updatebillcreditnoteresponserecordreference.md + - docs/sdk/models/shared/updatebillresponse.md + - docs/sdk/models/shared/updatebillresponseaccountingbill.md + - docs/sdk/models/shared/updatebillresponseaccountingpaymentallocation.md + - docs/sdk/models/shared/updatebillresponseallocation.md + - docs/sdk/models/shared/updatebillresponsepurchaseorderreference.md + - docs/sdk/models/shared/updatebillresponsewithholdingtax.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/validdatatypelinkitems.md + - docs/sdk/models/shared/validdatatypelinks.md + - docs/sdk/models/shared/weblink.md + - docs/sdk/models/shared/withholdingtax.md + - docs/sdk/models/shared/zero.md + - docs/sdk/models/shared/zerodatatype.md + - docs/sdks/accounts/README.md + - docs/sdks/bankaccounts/README.md + - docs/sdks/billcreditnotes/README.md + - docs/sdks/billpayments/README.md + - docs/sdks/bills/README.md + - docs/sdks/codatsyncpayables/README.md + - docs/sdks/companies/README.md + - docs/sdks/companyinfo/README.md + - docs/sdks/connections/README.md + - docs/sdks/journalentries/README.md + - docs/sdks/journals/README.md + - docs/sdks/managedata/README.md + - docs/sdks/paymentmethods/README.md + - docs/sdks/pushoperations/README.md + - docs/sdks/suppliers/README.md + - docs/sdks/taxrates/README.md + - docs/sdks/trackingcategories/README.md + - jsr.json - package.json + - src/core.ts + - src/funcs/accountsCreate.ts + - src/funcs/accountsGet.ts + - src/funcs/accountsGetCreateModel.ts + - src/funcs/accountsList.ts + - src/funcs/bankAccountsCreate.ts + - src/funcs/bankAccountsGetCreateModel.ts + - src/funcs/billCreditNotesCreate.ts + - src/funcs/billCreditNotesGet.ts + - src/funcs/billCreditNotesGetCreateUpdateModel.ts + - src/funcs/billCreditNotesList.ts + - src/funcs/billCreditNotesUpdate.ts + - src/funcs/billPaymentsCreate.ts + - src/funcs/billPaymentsDelete.ts + - src/funcs/billPaymentsGet.ts + - src/funcs/billPaymentsGetCreateModel.ts + - src/funcs/billPaymentsList.ts + - src/funcs/billsCreate.ts + - src/funcs/billsDelete.ts + - src/funcs/billsDeleteAttachment.ts + - src/funcs/billsDownloadAttachment.ts + - src/funcs/billsGet.ts + - src/funcs/billsGetAttachment.ts + - src/funcs/billsGetCreateUpdateModel.ts + - src/funcs/billsList.ts + - src/funcs/billsListAttachments.ts + - src/funcs/billsUpdate.ts + - src/funcs/billsUploadAttachment.ts + - src/funcs/companiesCreate.ts + - src/funcs/companiesDelete.ts + - src/funcs/companiesGet.ts + - src/funcs/companiesList.ts + - src/funcs/companiesUpdate.ts + - src/funcs/companyInfoGetAccountingProfile.ts + - src/funcs/connectionsCreate.ts + - src/funcs/connectionsDelete.ts + - src/funcs/connectionsGet.ts + - src/funcs/connectionsList.ts + - src/funcs/connectionsUnlink.ts + - src/funcs/journalEntriesCreate.ts + - src/funcs/journalEntriesGetCreateModel.ts + - src/funcs/journalsCreate.ts + - src/funcs/journalsGet.ts + - src/funcs/journalsGetCreateModel.ts + - src/funcs/journalsList.ts + - src/funcs/manageDataGet.ts + - src/funcs/manageDataGetPullOperation.ts + - src/funcs/manageDataListPullOperations.ts + - src/funcs/manageDataRefreshAllDataTypes.ts + - src/funcs/manageDataRefreshDataType.ts + - src/funcs/paymentMethodsGet.ts + - src/funcs/paymentMethodsList.ts + - src/funcs/pushOperationsGet.ts + - src/funcs/pushOperationsList.ts + - src/funcs/suppliersCreate.ts + - src/funcs/suppliersGet.ts + - src/funcs/suppliersGetCreateUpdateModel.ts + - src/funcs/suppliersList.ts + - src/funcs/suppliersUpdate.ts + - src/funcs/taxRatesGet.ts + - src/funcs/taxRatesList.ts + - src/funcs/trackingCategoriesGet.ts + - src/funcs/trackingCategoriesList.ts + - src/hooks/hooks.ts + - src/hooks/index.ts + - src/hooks/types.ts - src/index.ts - - src/internal/utils/contenttype.ts - - src/internal/utils/headers.ts - - src/internal/utils/index.ts - - src/internal/utils/pathparams.ts - - src/internal/utils/queryparams.ts - - src/internal/utils/requestbody.ts - - src/internal/utils/retries.ts - - src/internal/utils/security.ts - - src/internal/utils/utils.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/bankaccounts.ts + - src/sdk/billcreditnotes.ts + - src/sdk/billpayments.ts + - src/sdk/bills.ts + - src/sdk/companies.ts + - src/sdk/companyinfo.ts + - src/sdk/connections.ts - src/sdk/index.ts + - src/sdk/journalentries.ts + - src/sdk/journals.ts + - src/sdk/managedata.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/types/index.ts - - src/sdk/types/rfcdate.ts - - tsconfig.json - - src/sdk/models/operations/createcompany.ts - - src/sdk/models/operations/deletecompany.ts - - src/sdk/models/operations/getcompany.ts - - src/sdk/models/operations/listcompanies.ts - - src/sdk/models/operations/updatecompany.ts - - src/sdk/models/operations/listbills.ts + - src/sdk/models/errors/sdkvalidationerror.ts + - src/sdk/models/operations/createaccount.ts + - src/sdk/models/operations/createbankaccount.ts + - src/sdk/models/operations/createbill.ts + - src/sdk/models/operations/createbillcreditnote.ts + - src/sdk/models/operations/createbillpayment.ts - src/sdk/models/operations/createconnection.ts + - src/sdk/models/operations/createjournal.ts + - src/sdk/models/operations/createjournalentry.ts + - src/sdk/models/operations/createsupplier.ts + - src/sdk/models/operations/deletebill.ts + - src/sdk/models/operations/deletebillattachment.ts + - src/sdk/models/operations/deletebillpayment.ts + - src/sdk/models/operations/deletecompany.ts - src/sdk/models/operations/deleteconnection.ts + - src/sdk/models/operations/downloadbillattachment.ts + - src/sdk/models/operations/getaccount.ts + - src/sdk/models/operations/getaccountingprofile.ts + - src/sdk/models/operations/getbill.ts + - src/sdk/models/operations/getbillattachment.ts + - src/sdk/models/operations/getbillcreditnote.ts + - src/sdk/models/operations/getbillpayments.ts + - src/sdk/models/operations/getcompany.ts - src/sdk/models/operations/getconnection.ts + - src/sdk/models/operations/getcreateaccountmodel.ts + - src/sdk/models/operations/getcreatebankaccountsmodel.ts + - src/sdk/models/operations/getcreatebillpaymentmodel.ts + - src/sdk/models/operations/getcreatejournalentrymodel.ts + - src/sdk/models/operations/getcreatejournalmodel.ts + - src/sdk/models/operations/getcreateupdatebillcreditnotemodel.ts + - src/sdk/models/operations/getcreateupdatebillmodel.ts + - src/sdk/models/operations/getcreateupdatesuppliermodel.ts + - src/sdk/models/operations/getdatastatus.ts + - src/sdk/models/operations/getjournal.ts + - src/sdk/models/operations/getpaymentmethod.ts + - src/sdk/models/operations/getpulloperation.ts + - src/sdk/models/operations/getpushoperation.ts + - src/sdk/models/operations/getsupplier.ts + - src/sdk/models/operations/gettaxrate.ts + - src/sdk/models/operations/gettrackingcategory.ts + - src/sdk/models/operations/index.ts + - src/sdk/models/operations/listaccounts.ts + - src/sdk/models/operations/listbillattachments.ts + - src/sdk/models/operations/listbillcreditnotes.ts + - src/sdk/models/operations/listbillpayments.ts + - src/sdk/models/operations/listbills.ts + - src/sdk/models/operations/listcompanies.ts - src/sdk/models/operations/listconnections.ts + - src/sdk/models/operations/listjournals.ts + - src/sdk/models/operations/listpaymentmethods.ts + - src/sdk/models/operations/listpulloperations.ts + - src/sdk/models/operations/listpushoperations.ts + - src/sdk/models/operations/listsuppliers.ts + - src/sdk/models/operations/listtaxrates.ts + - src/sdk/models/operations/listtrackingcategories.ts + - src/sdk/models/operations/refreshalldatatypes.ts + - src/sdk/models/operations/refreshdatatype.ts - src/sdk/models/operations/unlinkconnection.ts - - src/sdk/models/shared/errormessage.ts - - src/sdk/models/shared/errorvalidation.ts - - src/sdk/models/shared/errorvalidationitem.ts - - src/sdk/models/shared/company.ts - - src/sdk/models/shared/connection.ts - - src/sdk/models/shared/dataconnectionstatus.ts - - src/sdk/models/shared/dataconnectionerror.ts - - src/sdk/models/shared/companyrequestbody.ts - - src/sdk/models/shared/items.ts - - src/sdk/models/shared/companies.ts - - src/sdk/models/shared/links.ts - - src/sdk/models/shared/halref.ts - - src/sdk/models/shared/bills.ts + - src/sdk/models/operations/updatebill.ts + - src/sdk/models/operations/updatebillcreditnote.ts + - src/sdk/models/operations/updatecompany.ts + - src/sdk/models/operations/updatesupplier.ts + - src/sdk/models/operations/uploadbillattachment.ts + - src/sdk/models/shared/account.ts + - src/sdk/models/shared/accountingaddresstype.ts + - src/sdk/models/shared/accountprototype.ts + - src/sdk/models/shared/accountref.ts + - src/sdk/models/shared/accounts.ts + - src/sdk/models/shared/accountstatus.ts + - src/sdk/models/shared/accounttype.ts + - src/sdk/models/shared/address.ts + - src/sdk/models/shared/attachment.ts + - src/sdk/models/shared/attachments.ts + - src/sdk/models/shared/attachmentupload.ts + - src/sdk/models/shared/bankaccountcreateresponse.ts + - src/sdk/models/shared/bankaccountprototype.ts + - src/sdk/models/shared/bankaccountstatus.ts - src/sdk/models/shared/bill.ts - - src/sdk/models/shared/supplierref.ts - - src/sdk/models/shared/billstatus.ts + - src/sdk/models/shared/billcreditnote.ts + - src/sdk/models/shared/billcreditnotelineitem.ts + - src/sdk/models/shared/billcreditnotes.ts + - src/sdk/models/shared/billcreditnotestatus.ts + - src/sdk/models/shared/billedtotype.ts - src/sdk/models/shared/billlineitem.ts - - src/sdk/models/shared/connections.ts - - src/sdk/models/shared/security.ts + - src/sdk/models/shared/billpayment.ts + - src/sdk/models/shared/billpaymentline.ts + - src/sdk/models/shared/billpaymentlinelink.ts + - src/sdk/models/shared/billpaymentlinelinktype.ts + - src/sdk/models/shared/billpayments.ts + - src/sdk/models/shared/bills.ts + - src/sdk/models/shared/billstatus.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/billeventwebhook.ts - - src/sdk/models/shared/billeventpayload.ts - - src/sdk/models/webhooks/clientratelimitreached.ts - - src/sdk/models/webhooks/clientratelimitreset.ts - - src/sdk/models/webhooks/payablesbillcreated.ts - - src/sdk/models/webhooks/payablesbilldeleted.ts - - src/sdk/models/webhooks/payablesbillupdated.ts - - src/sdk/models/errors/index.ts - - src/sdk/models/operations/index.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/companyinfo.ts + - src/sdk/models/shared/companyrequestbody.ts + - src/sdk/models/shared/connection.ts + - src/sdk/models/shared/connections.ts + - src/sdk/models/shared/createaccountresponse.ts + - src/sdk/models/shared/createbillcreditnoteresponse.ts + - src/sdk/models/shared/createbillpaymentresponse.ts + - src/sdk/models/shared/createbillresponse.ts + - src/sdk/models/shared/createjournalentryresponse.ts + - src/sdk/models/shared/createjournalresponse.ts + - src/sdk/models/shared/createsupplierresponse.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/definitionstatus.ts + - src/sdk/models/shared/errorvalidation.ts + - src/sdk/models/shared/errorvalidationitem.ts + - src/sdk/models/shared/halref.ts - src/sdk/models/shared/index.ts - - src/sdk/models/webhooks/index.ts - - docs/sdk/models/operations/createcompanyresponse.md - - docs/sdk/models/operations/deletecompanyrequest.md - - docs/sdk/models/operations/deletecompanyresponse.md - - docs/sdk/models/operations/getcompanyrequest.md - - docs/sdk/models/operations/getcompanyresponse.md - - docs/sdk/models/operations/listcompaniesrequest.md - - docs/sdk/models/operations/listcompaniesresponse.md - - docs/sdk/models/operations/updatecompanyrequest.md - - docs/sdk/models/operations/updatecompanyresponse.md - - docs/sdk/models/operations/listbillsrequest.md - - docs/sdk/models/operations/listbillsresponse.md - - docs/sdk/models/operations/createconnectionrequestbody.md - - docs/sdk/models/operations/createconnectionrequest.md - - docs/sdk/models/operations/createconnectionresponse.md - - docs/sdk/models/operations/deleteconnectionrequest.md - - docs/sdk/models/operations/deleteconnectionresponse.md - - docs/sdk/models/operations/getconnectionrequest.md - - docs/sdk/models/operations/getconnectionresponse.md - - docs/sdk/models/operations/listconnectionsrequest.md - - docs/sdk/models/operations/listconnectionsresponse.md - - docs/sdk/models/operations/unlinkconnectionupdateconnection.md - - docs/sdk/models/operations/unlinkconnectionrequest.md - - docs/sdk/models/operations/unlinkconnectionresponse.md - - docs/sdk/models/shared/errormessage.md - - docs/sdk/models/shared/errorvalidation.md - - docs/sdk/models/shared/errorvalidationitem.md - - docs/sdk/models/shared/groupreference.md - - docs/sdk/models/shared/company.md - - docs/sdk/models/shared/sourcetype.md - - docs/sdk/models/shared/connection.md - - docs/sdk/models/shared/dataconnectionstatus.md - - docs/sdk/models/shared/dataconnectionerror.md - - docs/sdk/models/shared/companyrequestbody.md - - docs/sdk/models/shared/items.md - - docs/sdk/models/shared/companies.md - - docs/sdk/models/shared/links.md - - docs/sdk/models/shared/halref.md - - docs/sdk/models/shared/bills.md - - docs/sdk/models/shared/bill.md - - docs/sdk/models/shared/supplierref.md - - docs/sdk/models/shared/billstatus.md - - docs/sdk/models/shared/accountreference.md - - docs/sdk/models/shared/taxratereference.md - - docs/sdk/models/shared/billlineitem.md - - docs/sdk/models/shared/connections.md - - docs/sdk/models/shared/security.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/billeventwebhook.md - - docs/sdk/models/shared/billeventpayload.md - - docs/sdk/models/webhooks/clientratelimitreachedresponse.md - - docs/sdk/models/webhooks/clientratelimitresetresponse.md - - docs/sdk/models/webhooks/payablesbillcreatedresponse.md - - docs/sdk/models/webhooks/payablesbilldeletedresponse.md - - docs/sdk/models/webhooks/payablesbillupdatedresponse.md - - docs/sdks/codatsyncpayables/README.md - - docs/internal/utils/retryconfig.md - - docs/sdks/companies/README.md - - docs/sdks/bills/README.md - - docs/sdks/connections/README.md - - USAGE.md - - .gitattributes + - src/sdk/models/shared/itemref.ts + - src/sdk/models/shared/items.ts + - src/sdk/models/shared/journal.ts + - src/sdk/models/shared/journalentry.ts + - src/sdk/models/shared/journalentryrecordref.ts + - src/sdk/models/shared/journalline.ts + - src/sdk/models/shared/journalprototype.ts + - src/sdk/models/shared/journalref.ts + - src/sdk/models/shared/journals.ts + - src/sdk/models/shared/journalstatus.ts + - src/sdk/models/shared/links.ts + - src/sdk/models/shared/metadata.ts + - src/sdk/models/shared/paymentallocationitems.ts + - src/sdk/models/shared/paymentallocationpayment.ts + - src/sdk/models/shared/paymentmethod.ts + - src/sdk/models/shared/paymentmethodref.ts + - src/sdk/models/shared/paymentmethods.ts + - src/sdk/models/shared/paymentmethodtype.ts + - src/sdk/models/shared/phonenumber.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/security.ts + - src/sdk/models/shared/status.ts + - src/sdk/models/shared/supplementaldata.ts + - src/sdk/models/shared/supplier.ts + - src/sdk/models/shared/supplierref.ts + - src/sdk/models/shared/suppliers.ts + - src/sdk/models/shared/supplierstatus.ts + - src/sdk/models/shared/taxrate.ts + - src/sdk/models/shared/taxratecomponent.ts + - src/sdk/models/shared/taxrateref.ts + - src/sdk/models/shared/taxrates.ts + - src/sdk/models/shared/taxratestatus.ts + - src/sdk/models/shared/tracking.ts + - src/sdk/models/shared/trackingcategories.ts + - src/sdk/models/shared/trackingcategory.ts + - src/sdk/models/shared/trackingcategoryref.ts + - src/sdk/models/shared/trackingcategorytree.ts + - src/sdk/models/shared/trackingrecordref.ts + - src/sdk/models/shared/updatebillcreditnoteresponse.ts + - src/sdk/models/shared/updatebillresponse.ts + - src/sdk/models/shared/updatesupplierresponse.ts + - src/sdk/models/shared/validation.ts + - src/sdk/models/shared/validationitem.ts + - src/sdk/models/shared/validdatatypelinkitems.ts + - src/sdk/models/shared/weblink.ts + - src/sdk/models/shared/zero.ts + - src/sdk/paymentmethods.ts + - src/sdk/pushoperations.ts + - src/sdk/sdk.ts + - src/sdk/suppliers.ts + - src/sdk/taxrates.ts + - src/sdk/trackingcategories.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 +examples: + list-companies: + "": + parameters: + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "string", "description": "Requested early access to the new financing scheme.", "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", "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", "dataConnectionErrors": []}]}], "pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} + "400": {} + One company: + parameters: + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + 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", "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", "dataConnectionErrors": []}]}], "pageNumber": 1, "pageSize": 100, "totalResults": 1, "_links": {"self": {"href": "/companies"}, "current": {"href": "/companies?page=1&pageSize=100"}}} + List of Companies: + parameters: + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + 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", "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", "dataConnectionErrors": []}]}, {"id": "096db70b-78de-4ff0-aa98-299cb5fe17a0", "name": "Godata", "description": "A new digital agency with a passion for creating amazing digital experiences", "redirect": "https://link.codat.io/company/096db70b-78de-4ff0-aa98-299cb5fe17a0", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z", "createdByUserName": "Mike Smith", "dataConnections": [{"id": "a70bc148-dc21-46b2-a257-d9c58ac15cbb", "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/096db70b-78de-4ff0-aa98-299cb5fe17a0/connections/a70bc148-dc21-46b2-a257-d9c58ac15cbb/start", "status": "Linked", "lastSync": "2022-01-01T12:30:00.000Z", "created": "2022-01-01T11:30:00Z", "dataConnectionErrors": []}]}], "pageNumber": 1, "pageSize": 100, "totalResults": 2, "_links": {"self": {"href": "/companies"}, "current": {"href": "/companies?page=1&pageSize=100"}}} + Malformed query: + parameters: + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "400": + application/json: {"statusCode": 400, "service": "ClientsApi", "error": "Error parsing query - Malformed query.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + Unresolved property: + parameters: + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + 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} + create-company: + With no description: + requestBody: + application/json: {"name": "Technicalium", "description": "Requested early access to the new financing scheme.", "groups": []} + responses: + "200": + application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Technicalium", "description": "", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "lastSync": "2022-10-23T00:00:00Z", "created": "2022-11-10T10:45:18.1950523Z", "createdByUserName": "Dan Tzabar", "dataConnections": []} + "400": {} + With a description: + requestBody: + application/json: {"name": "Technicalium", "description": "Technology services, including web and app design and development", "groups": []} + 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", "lastSync": "2022-10-23T00:00:00Z", "created": "2022-11-10T10:45:18.1950523Z", "createdByUserName": "Dan Tzabar", "dataConnections": []} + "400": {} + With a group: + requestBody: + application/json: {"name": "Technicalium", "description": "Requested early access to the new financing scheme.", "groups": [{"id": "d7a6c4b4-dc87-45f6-b803-62f466398680"}]} + responses: + "200": + application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "Technicalium", "description": "", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "lastSync": "2022-10-23T00:00:00Z", "created": "2022-11-10T10:45:18.1950523Z", "createdByUserName": "Dan Tzabar", "dataConnections": []} + "400": {} + Malformed query: + requestBody: + application/json: {"name": "Bank of Dave", "description": "Requested early access to the new financing scheme.", "groups": []} + responses: + "400": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + update-company: + Update name: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + requestBody: + application/json: {"name": "New Name", "description": "Requested early access to the new financing scheme.", "groups": []} + responses: + "200": + application/json: {"id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "string", "description": "Requested early access to the new financing scheme.", "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", "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", "dataConnectionErrors": []}]} + "401": {} + Update description: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + requestBody: + application/json: {"name": "Same name", "description": "Additional documents required", "groups": []} + responses: + "200": + application/json: {"id": "0498e921-9b53-4396-a412-4f2f5983b0a2", "name": "string", "description": "Requested early access to the new financing scheme.", "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", "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", "dataConnectionErrors": []}]} + "401": {} + 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.", "groups": []} + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + delete-company: + 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} + get-company: + Simple company: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + responses: + "200": + application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "My First Company", "description": "", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "lastSync": "2022-10-23T00:00:00Z", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "dataConnections": []} + With groups: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + responses: + "200": + application/json: {"id": "ab12c58d-a678-4ebf-a159-ae99e1807bd0", "name": "My First Company", "description": "", "redirect": "https://link.codat.io/company/ab12c58d-a678-4ebf-a159-ae99e1807bd0", "lastSync": "2022-10-23T00:00:00Z", "created": "2022-11-10T10:45:18Z", "createdByUserName": "Dan Tzabar", "dataConnections": []} + 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} + list-connections: + "": + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"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", "dataConnectionErrors": []}], "pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} + "400": {} + Connections: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"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", "dataConnectionErrors": []}], "pageNumber": 0, "pageSize": 0, "totalResults": 0, "_links": {"self": {"href": "string"}, "current": {"href": "string"}, "next": {"href": "string"}, "previous": {"href": "string"}}} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "400": + 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" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + 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} + create-connection: + Connection: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + requestBody: + application/json: {"platformKey": "gbol"} + 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", "dataConnectionErrors": []} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + requestBody: + application/json: {"platformKey": "gbol"} + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + get-connection: + 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", "dataConnectionErrors": []} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + delete-connection: + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + unlink-connection: + Example: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + requestBody: + application/json: {"status": "Unlinked"} + 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", "dataConnectionErrors": []} + "401": {} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + refresh-all-data-types: + 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} + get-data-status: + Example: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + responses: + "200": + application/json: {"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", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "billPayments": {"dataType": "billPayments", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "bills": {"dataType": "bills", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "cashFlowStatement": {"dataType": "cashFlowStatement", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "chartOfAccounts": {"dataType": "chartOfAccounts", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "company": {"dataType": "company", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "creditNotes": {"dataType": "creditNotes", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "customers": {"dataType": "customers", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "directCosts": {"dataType": "directCosts", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "directIncomes": {"dataType": "directIncomes", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "invoices": {"dataType": "invoices", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "itemReceipts": {"dataType": "itemReceipts", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "items": {"dataType": "items", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "journalEntries": {"dataType": "journalEntries", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "journals": {"dataType": "journals", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "paymentMethods": {"dataType": "paymentMethods", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "payments": {"dataType": "payments", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "profitAndLoss": {"dataType": "profitAndLoss", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "purchaseOrders": {"dataType": "purchaseOrders", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "salesOrders": {"dataType": "salesOrders", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "suppliers": {"dataType": "suppliers", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "taxRates": {"dataType": "taxRates", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "trackingCategories": {"dataType": "trackingCategories", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "transfers": {"dataType": "transfers", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "banking-accountBalances": {"dataType": "banking-accountBalances", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "banking-accounts": {"dataType": "banking-accounts", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "banking-transactionCategories": {"dataType": "banking-transactionCategories", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "banking-transactions": {"dataType": "banking-transactions", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-companyInfo": {"dataType": "commerce-companyInfo", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-customers": {"dataType": "commerce-customers", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-disputes": {"dataType": "commerce-disputes", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-locations": {"dataType": "commerce-locations", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-orders": {"dataType": "commerce-orders", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-paymentMethods": {"dataType": "commerce-paymentMethods", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-payments": {"dataType": "commerce-payments", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-productCategories": {"dataType": "commerce-productCategories", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-products": {"dataType": "commerce-products", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-taxComponents": {"dataType": "commerce-taxComponents", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}, "commerce-transactions": {"dataType": "commerce-transactions", "lastSuccessfulSync": "2022-01-01T00:00:00.000Z", "currentStatus": "Complete", "latestSyncId": "d03b6979-eb3b-447a-a27a-13cf457a9f48", "latestSuccessfulSyncId": "6883bba8-514d-423f-ba7f-c38285a80b7f"}} + 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} + refresh-data-type: + Unauthorized: + 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} + list-pull-operations: + "": + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"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", "completed": "2022-10-23T00:00:00Z", "progress": 10, "isCompleted": false, "isErrored": false}], "pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} + "400": {} + Example: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"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", "completed": "2022-10-23T00:00:00Z", "progress": 10, "isCompleted": false, "isErrored": false}], "pageNumber": 0, "pageSize": 0, "totalResults": 0, "_links": {"self": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history"}, "current": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history?page=1&pageSize=2"}, "next": {"href": "/companies/17129e41-5389-4f10-ac06-e0a37e47d177/data/history?page=2&pageSize=2"}}} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "400": + 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" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + 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} + get-pull-operation: + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + datasetId: "7911a54a-c808-4f4b-b87e-b195f52b4da5" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + list-push-operations: + "": + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [], "pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} + "400": {} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "400": + 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" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + 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} + get-push-operation: + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + pushOperationKey: "b18d8d81-fd7b-4764-a31e-475cb1f36591" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + list-accounts: + "": + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [], "pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} + "400": {} + Clear Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:15Z", "sourceModifiedDate": "2022-12-10T16:39:00", "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": "Asset.Current.Accounts Receivable", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:15Z", "sourceModifiedDate": "2022-10-19T05:49:00", "id": "76d5f23b-9623-4e3b-89cd-da57228764d3", "nominalCode": "611", "name": "Accounts Receivable", "description": "A provision anticipating that a portion of accounts receivable will never be collected.", "fullyQualifiedCategory": "Asset.Current", "fullyQualifiedName": "Asset.Current.Accounts Receivable", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 98, "_links": {"self": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/accounts"}, "current": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/accounts?page=2&pageSize=2"}}} + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:18Z", "sourceModifiedDate": "2022-03-09T16:31:54Z", "id": "8eaed16d-c69f-ec11-80f1-0022481b4546", "nominalCode": "45422026-68CA-4EF2-9", "name": "", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": " .", "fullyQualifiedName": "..", "currency": "GBP", "currentBalance": 0, "type": "Unknown", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["DirectCost.LineItems.AccountRef.Id"]}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:18Z", "sourceModifiedDate": "2022-09-13T14:45:01Z", "id": "c0861a65-c69f-ec11-80f1-0022481b4546", "nominalCode": "10", "name": "Account no cat Balance Sheet", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": " .", "fullyQualifiedName": "..Account no cat Balance Sheet", "currency": "GBP", "currentBalance": 27.34, "type": "Unknown", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["DirectCost.LineItems.AccountRef.Id"]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 122, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/accounts"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/accounts?page=2&pageSize=2"}}} + Exact (Netherlands): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-26T13:36:17Z", "sourceModifiedDate": "2020-01-08T09:42:54Z", "id": "ef2fde36-4416-4bc5-b239-315b2929348c", "nominalCode": "1300", "name": "Debiteuren", "description": "Debiteuren", "fullyQualifiedCategory": "Asset.Assets.AccountsReceivable", "fullyQualifiedName": "Asset.Assets.AccountsReceivable.Debiteuren.PaymentsEnabled", "currency": "EUR", "currentBalance": 864435.44, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["Transfer.To.AccountRef.Id", "Transfer.From.AccountRef.Id", "Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]}, {"modifiedDate": "2022-10-26T13:36:17Z", "sourceModifiedDate": "2021-06-10T11:00:20Z", "id": "2052b65b-20e9-4da1-85d8-fd5ca0ea3d38", "nominalCode": "888777888", "name": "One more AR account", "description": "One more AR account", "fullyQualifiedCategory": "Asset.Assets.AccountsReceivable", "fullyQualifiedName": "Asset.Assets.AccountsReceivable.One more AR account.PaymentsEnabled", "currency": "EUR", "currentBalance": 2174.82, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["Transfer.To.AccountRef.Id", "Transfer.From.AccountRef.Id", "Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 230, "_links": {"self": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/accounts"}, "current": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/accounts?page=2&pageSize=2"}}} + Exact (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-26T13:35:15Z", "sourceModifiedDate": "2017-08-01T17:31:12Z", "id": "ca2b96b7-cc45-4e35-9fa3-82a2ba1eec40", "nominalCode": "THING", "name": "Some thing account", "description": "Some thing account", "fullyQualifiedCategory": "Asset.Assets.AccountsReceivable", "fullyQualifiedName": "Asset.Assets.AccountsReceivable.Some thing account.PaymentsEnabled", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["Transfer.To.AccountRef.Id", "Transfer.From.AccountRef.Id", "Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]}, {"modifiedDate": "2022-10-26T13:35:15Z", "sourceModifiedDate": "2020-01-08T13:48:38Z", "id": "cf9572e7-8afa-4339-9113-af32a66d9df9", "nominalCode": "15400", "name": "Trade Debtors", "description": "Trade Debtors", "fullyQualifiedCategory": "Asset.Assets.AccountsReceivable", "fullyQualifiedName": "Asset.Assets.AccountsReceivable.Trade Debtors.PaymentsEnabled", "currency": "GBP", "currentBalance": 4484655.39, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["Transfer.To.AccountRef.Id", "Transfer.From.AccountRef.Id", "Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 121, "_links": {"self": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/accounts"}, "current": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/accounts?page=2&pageSize=2"}}} + FreeAgent: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-25T14:19:12Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "601", "nominalCode": "601", "name": "Capital Asset Brought Forward", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Capital", "fullyQualifiedName": "Asset.Capital.Capital Asset Brought Forward", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:19:12Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "605", "nominalCode": "605", "name": "Capital Asset Depreciation Brought Forward", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Capital", "fullyQualifiedName": "Asset.Capital.Capital Asset Depreciation Brought Forward", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 292, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/accounts"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/accounts?page=2&pageSize=2"}}} + FreshBooks: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-24T16:07:24Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "67357", "nominalCode": "1200", "name": "Accounts Receivable", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset", "fullyQualifiedName": "Asset.Accounts Receivable", "currency": "GBP", "currentBalance": 51445.53, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-24T16:07:24Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "128611", "nominalCode": "1200-1", "name": "Accounts Receivable", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Accounts Receivable", "fullyQualifiedName": "Asset.Accounts Receivable.Accounts Receivable", "currency": "GBP", "currentBalance": 51445.53, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 96, "_links": {"self": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/accounts"}, "current": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/accounts?page=2&pageSize=2"}}} + KashFlow: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-09-30T10:29:16Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "27840056", "nominalCode": "70700", "name": "16th Account", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.BankAccount", "fullyQualifiedName": "Asset.BankAccount.16th Account", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": []}, {"modifiedDate": "2022-09-30T10:29:16Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "27840049", "nominalCode": "70600", "name": "1a1a", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.BankAccount", "fullyQualifiedName": "Asset.BankAccount.1a1a", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 157, "_links": {"self": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/accounts"}, "current": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/accounts?page=2&pageSize=2"}}} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-01-30T14:48:33Z", "sourceModifiedDate": "2021-08-11T12:51:21", "id": "111", "nominalCode": "610", "name": "Accounts Payable", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "AcctPay.AcctPay", "fullyQualifiedName": "AcctPay.AcctPay.Accounts Payable", "currency": "GBP", "currentBalance": -635.55, "type": "Liability", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []}, {"modifiedDate": "2023-01-30T14:48:33Z", "sourceModifiedDate": "2021-09-08T15:23:31", "id": "119", "nominalCode": "610", "name": "Accounts Receivable", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "AcctRec.AcctRec", "fullyQualifiedName": "AcctRec.AcctRec.Accounts Receivable", "currency": "USD", "currentBalance": -565, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 44, "_links": {"self": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/accounts"}, "current": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/accounts?page=2&pageSize=2"}}} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T09:06:23Z", "sourceModifiedDate": "2023-12-16T05:06:45", "id": "40000-933270541", "nominalCode": "11000", "name": "Accounts Receivable", "description": "Accounts Receivable", "fullyQualifiedCategory": "Asset.CurrentAsset.AccountsReceivable", "fullyQualifiedName": "Asset.CurrentAsset.AccountsReceivable.Accounts Receivable", "currency": "GBP", "currentBalance": 93007.93, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:06:23Z", "sourceModifiedDate": "2023-12-16T05:06:45", "id": "20000-933270541", "nominalCode": "10100", "name": "Checking", "description": "Cash", "fullyQualifiedCategory": "Asset.CurrentAsset.Bank", "fullyQualifiedName": "Asset.CurrentAsset.Bank.Checking", "currency": "GBP", "currentBalance": 46954.1, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": [{"property": "Id", "links": ["BillLineItem.AccountRef.Id", "BillPayment.AccountRef.Id"]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 116, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/accounts"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/accounts?page=2&pageSize=2"}}} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-01-18T11:02:34Z", "sourceModifiedDate": "2022-12-08T15:42:59Z", "id": "62", "nominalCode": "246", "name": "Debtors", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Accounts Receivable.AccountsReceivable", "fullyQualifiedName": "Asset.Accounts Receivable.AccountsReceivable.Debtors", "currency": "GBP", "currentBalance": 41289.37, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []}, {"modifiedDate": "2023-01-18T11:02:34Z", "sourceModifiedDate": "2021-02-19T14:04:45Z", "id": "92", "nominalCode": "247", "name": "Debtors - AED", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Accounts Receivable.AccountsReceivable", "fullyQualifiedName": "Asset.Accounts Receivable.AccountsReceivable.Debtors - AED", "currency": "AED", "currentBalance": -1533.44, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 234, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/accounts"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/accounts?page=2&pageSize=2"}}} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T09:35:55Z", "sourceModifiedDate": "2023-04-26T01:18:15Z", "id": "70", "nominalCode": "610", "name": "Debtors", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Accounts Receivable.AccountsReceivable", "fullyQualifiedName": "Asset.Accounts Receivable.AccountsReceivable.Debtors", "currency": "GBP", "currentBalance": 3041173.77, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:35:55Z", "sourceModifiedDate": "2023-04-12T15:10:38Z", "id": "80", "nominalCode": "610", "name": "Debtors - USD", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Accounts Receivable.AccountsReceivable", "fullyQualifiedName": "Asset.Accounts Receivable.AccountsReceivable.Debtors - USD", "currency": "USD", "currentBalance": 54822.37, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 186, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/accounts"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/accounts?page=2&pageSize=2"}}} + Sage 200cloud: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-14T09:35:52Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "2864", "nominalCode": "1200", "name": "Bank Account", "description": "Bank Account", "fullyQualifiedCategory": "Asset.Bank Account", "fullyQualifiedName": "Asset.Bank Account.Bank Account", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Archived", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": true}}, {"modifiedDate": "2022-10-14T09:35:52Z", "sourceModifiedDate": "2020-09-11T13:53:12Z", "id": "2368", "nominalCode": "1200", "name": "Bank Current Account", "description": "Bank Current Account", "fullyQualifiedCategory": "Asset.Bank Account", "fullyQualifiedName": "Asset.Bank Account.Bank Current Account", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 344, "_links": {"self": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/accounts"}, "current": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/accounts?page=2&pageSize=2"}}} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1100", "nominalCode": "1100", "name": "Debtors Control Account", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.CurrentAssets.Debtors", "fullyQualifiedName": "Asset.CurrentAssets.Debtors.Debtors Control Account", "currency": "GBP", "currentBalance": 90640.61, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1102", "nominalCode": "1102", "name": "Other Debtors", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.CurrentAssets.Debtors", "fullyQualifiedName": "Asset.CurrentAssets.Debtors.Other Debtors", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 155, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/accounts"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/accounts?page=2&pageSize=2"}}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-24T14:52:53Z", "sourceModifiedDate": "2020-01-27T10:53:26Z", "id": "e5889b459f544926ac5b8e6756df2ad4", "nominalCode": "1560", "name": "Abdi Internet Bank", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Bank", "fullyQualifiedName": "Asset.Bank.Abdi Internet Bank", "currency": "GBP", "currentBalance": 49.61, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": [{"property": "Id", "links": ["Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]}, {"modifiedDate": "2022-10-24T14:52:53Z", "sourceModifiedDate": "2020-01-28T14:00:20Z", "id": "b17083bc9b2748b4ab321b024e260eda", "nominalCode": "147852", "name": "Abdi Live Test", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Bank", "fullyQualifiedName": "Asset.Bank.Abdi Live Test", "currency": "GBP", "currentBalance": 225830.75, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": [{"property": "Id", "links": ["Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 283, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/accounts"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/accounts?page=2&pageSize=2"}}} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-04T16:31:51Z", "sourceModifiedDate": "2020-01-29T01:42:43", "id": "2", "nominalCode": "12100", "name": "Accounts Receivable", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable", "fullyQualifiedName": "Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable.Accounts Receivable", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-04T16:31:51Z", "sourceModifiedDate": "2020-10-15T15:33:15", "id": "155", "nominalCode": "12710", "name": "AR - Retainage", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable", "fullyQualifiedName": "Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable.AR - Retainage", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 181, "_links": {"self": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/accounts"}, "current": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/accounts?page=2&pageSize=2"}}} + Wave: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-11-16T18:15:17Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "QWNjb3VudDo5MjIzNDE3NjkzMzk3NjA2MzM7QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2", "nominalCode": "610", "name": "Abdi Bank", "description": "Test Balance Sheet", "fullyQualifiedCategory": "Asset.CashAndBank", "fullyQualifiedName": "Asset.CashAndBank.Abdi Bank", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": []}, {"modifiedDate": "2022-11-16T18:15:17Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "QWNjb3VudDo3OTE3NTA1OTcwOTQxNzQ3MTU7QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2", "nominalCode": "610", "name": "Cash on Hand", "description": "Cash you haven�t deposited in the bank. Add your bank and credit card accounts to accurately categorize transactions that aren't cash.", "fullyQualifiedCategory": "Asset.CashAndBank", "fullyQualifiedName": "Asset.CashAndBank.Cash on Hand", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 85, "_links": {"self": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/accounts"}, "current": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/accounts?page=2&pageSize=2"}}} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-15T20:35:08Z", "sourceModifiedDate": "2023-02-17T11:10:49", "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "nominalCode": "A090", "name": "Business Bank Account", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Bank", "fullyQualifiedName": "Asset.Bank.Business Bank Account", "currency": "GBP", "currentBalance": 924.25, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": [{"property": "Id", "links": ["Payment.AccountRef.Id", "BillPayment.AccountRef.Id", "DirectIncome.LineItems.AccountRef.Id", "DirectCost.LineItems.AccountRef.Id"]}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:35:08Z", "sourceModifiedDate": "2023-02-17T11:10:49", "id": "a8d6fb1a-8c5d-4683-90ce-bf9d28fc62ba", "nominalCode": "A091", "name": "Business Savings Account", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Bank", "fullyQualifiedName": "Asset.Bank.Business Savings Account", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": [{"property": "Id", "links": ["Payment.AccountRef.Id", "BillPayment.AccountRef.Id", "DirectIncome.LineItems.AccountRef.Id", "DirectCost.LineItems.AccountRef.Id"]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 90, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/accounts"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/accounts?page=2&pageSize=2"}}} + Zoho Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-03T08:40:43Z", "sourceModifiedDate": "2020-02-05T14:58:44", "id": "104957000000000352", "nominalCode": "", "name": "Accounts Receivable", "description": "The money that customers owe you becomes the accounts receivable. A good example of this is a payment expected from an invoice sent to your customer.", "fullyQualifiedCategory": "Asset.accounts_receivable", "fullyQualifiedName": "Asset.accounts_receivable.Accounts Receivable", "currency": "GBP", "currentBalance": -959.64, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []}, {"modifiedDate": "2022-10-03T08:40:43Z", "sourceModifiedDate": "2020-02-17T12:19:47", "id": "104957000000060010", "nominalCode": "", "name": "Abdi Test", "description": "", "fullyQualifiedCategory": "Asset.bank", "fullyQualifiedName": "Asset.bank.Abdi Test", "currency": "GBP", "currentBalance": 69858.44, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 68, "_links": {"self": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/accounts"}, "current": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/accounts?page=1&pageSize=2"}, "next": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/accounts?page=2&pageSize=2"}}} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "400": + 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" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + 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} + get-account: + Clear Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T12:38:15Z", "sourceModifiedDate": "2022-12-10T16:39:00", "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": "Asset.Current.Accounts Receivable", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-27T14:21:18Z", "sourceModifiedDate": "2022-03-09T16:31:54Z", "id": "8eaed16d-c69f-ec11-80f1-0022481b4546", "nominalCode": "45422026-68CA-4EF2-9", "name": "", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": " .", "fullyQualifiedName": "..", "currency": "GBP", "currentBalance": 0, "type": "Unknown", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["DirectCost.LineItems.AccountRef.Id"]}]} + Exact (Netherlands): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-26T13:36:17Z", "sourceModifiedDate": "2020-01-08T09:42:54Z", "id": "ef2fde36-4416-4bc5-b239-315b2929348c", "nominalCode": "1300", "name": "Debiteuren", "description": "Debiteuren", "fullyQualifiedCategory": "Asset.Assets.AccountsReceivable", "fullyQualifiedName": "Asset.Assets.AccountsReceivable.Debiteuren.PaymentsEnabled", "currency": "EUR", "currentBalance": 864435.44, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["Transfer.To.AccountRef.Id", "Transfer.From.AccountRef.Id", "Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]} + Exact (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-26T13:35:15Z", "sourceModifiedDate": "2017-08-01T17:31:12Z", "id": "ca2b96b7-cc45-4e35-9fa3-82a2ba1eec40", "nominalCode": "THING", "name": "Some thing account", "description": "Some thing account", "fullyQualifiedCategory": "Asset.Assets.AccountsReceivable", "fullyQualifiedName": "Asset.Assets.AccountsReceivable.Some thing account.PaymentsEnabled", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": [{"property": "Id", "links": ["Transfer.To.AccountRef.Id", "Transfer.From.AccountRef.Id", "Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]} + FreeAgent: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-25T14:19:12Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "601", "nominalCode": "601", "name": "Capital Asset Brought Forward", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Capital", "fullyQualifiedName": "Asset.Capital.Capital Asset Brought Forward", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} + FreshBooks: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-24T16:07:24Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "67357", "nominalCode": "1200", "name": "Accounts Receivable", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset", "fullyQualifiedName": "Asset.Accounts Receivable", "currency": "GBP", "currentBalance": 51445.53, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} + KashFlow: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-09-30T10:29:16Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "27840056", "nominalCode": "70700", "name": "16th Account", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.BankAccount", "fullyQualifiedName": "Asset.BankAccount.16th Account", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": []} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-01-30T14:48:33Z", "sourceModifiedDate": "2021-08-11T12:51:21", "id": "111", "nominalCode": "610", "name": "Accounts Payable", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "AcctPay.AcctPay", "fullyQualifiedName": "AcctPay.AcctPay.Accounts Payable", "currency": "EUR", "currentBalance": -635.55, "type": "Liability", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T09:06:23Z", "sourceModifiedDate": "2023-12-16T05:06:45", "id": "40000-933270541", "nominalCode": "11000", "name": "Accounts Receivable", "description": "Accounts Receivable", "fullyQualifiedCategory": "Asset.CurrentAsset.AccountsReceivable", "fullyQualifiedName": "Asset.CurrentAsset.AccountsReceivable.Accounts Receivable", "currency": "GBP", "currentBalance": 93007.93, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-01-18T11:02:34Z", "sourceModifiedDate": "2022-12-08T15:42:59Z", "id": "62", "nominalCode": "246", "name": "Debtors", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Accounts Receivable.AccountsReceivable", "fullyQualifiedName": "Asset.Accounts Receivable.AccountsReceivable.Debtors", "currency": "GBP", "currentBalance": 41289.37, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T09:35:55Z", "sourceModifiedDate": "2023-04-26T01:18:15Z", "id": "70", "nominalCode": "610", "name": "Debtors", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Accounts Receivable.AccountsReceivable", "fullyQualifiedName": "Asset.Accounts Receivable.AccountsReceivable.Debtors", "currency": "GBP", "currentBalance": 3041173.77, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} + Sage 200cloud: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-14T09:35:52Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "2864", "nominalCode": "1200", "name": "Bank Account", "description": "Bank Account", "fullyQualifiedCategory": "Asset.Bank Account", "fullyQualifiedName": "Asset.Bank Account.Bank Account", "currency": "EUR", "currentBalance": 0, "type": "Asset", "status": "Archived", "isBankAccount": false, "validDatatypeLinks": []} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "1100", "nominalCode": "1100", "name": "Debtors Control Account", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.CurrentAssets.Debtors", "fullyQualifiedName": "Asset.CurrentAssets.Debtors.Debtors Control Account", "currency": "GBP", "currentBalance": 90640.61, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-24T14:52:53Z", "sourceModifiedDate": "2020-01-27T10:53:26Z", "id": "e5889b459f544926ac5b8e6756df2ad4", "nominalCode": "1560", "name": "Abdi Internet Bank", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Bank", "fullyQualifiedName": "Asset.Bank.Abdi Internet Bank", "currency": "GBP", "currentBalance": 49.61, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": [{"property": "Id", "links": ["Payment.AccountRef.Id", "BillPayment.AccountRef.Id"]}]} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-04T16:31:51Z", "sourceModifiedDate": "2020-01-29T01:42:43", "id": "2", "nominalCode": "12100", "name": "Accounts Receivable", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable", "fullyQualifiedName": "Assets.Current Assets.Account Receivable, Net of Allowance.Accounts Receivable.Accounts Receivable.Accounts Receivable", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} + Wave: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-11-16T18:15:17Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "QWNjb3VudDo5MjIzNDE3NjkzMzk3NjA2MzM7QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2", "nominalCode": "610", "name": "Abdi Bank", "description": "Test Balance Sheet", "fullyQualifiedCategory": "Asset.CashAndBank", "fullyQualifiedName": "Asset.CashAndBank.Abdi Bank", "currency": "GBP", "currentBalance": 0, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": []} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-15T20:35:08Z", "sourceModifiedDate": "2023-02-17T11:10:49", "id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "nominalCode": "A090", "name": "Business Bank Account", "description": "Invoices the business has issued but has not yet collected payment on.", "fullyQualifiedCategory": "Asset.Bank", "fullyQualifiedName": "Asset.Bank.Business Bank Account", "currency": "GBP", "currentBalance": 924.25, "type": "Asset", "status": "Active", "isBankAccount": true, "validDatatypeLinks": [{"property": "Id", "links": ["Payment.AccountRef.Id", "BillPayment.AccountRef.Id", "DirectIncome.LineItems.AccountRef.Id", "DirectCost.LineItems.AccountRef.Id"]}]} + Zoho Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-03T08:40:43Z", "sourceModifiedDate": "2020-02-05T14:58:44", "id": "104957000000000352", "nominalCode": "", "name": "Accounts Receivable", "description": "The money that customers owe you becomes the accounts receivable. A good example of this is a payment expected from an invoice sent to your customer.", "fullyQualifiedCategory": "Asset.accounts_receivable", "fullyQualifiedName": "Asset.accounts_receivable.Accounts Receivable", "currency": "GBP", "currentBalance": -959.64, "type": "Asset", "status": "Active", "isBankAccount": false, "validDatatypeLinks": []} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + accountId: "" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + get-create-account-model: + Exact (Netherlands): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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": [], "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", "required": true, "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}], "validation": {"warnings": [], "information": [{"field": "FullyQualifiedCategory", "details": "Must be provided."}]}}, "status": {"type": "String", "displayName": "Account Status", "description": "The status of the account", "required": true, "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}], "validation": {"warnings": [], "information": [{"field": "Status", "details": "Must be provided."}]}}}} + Exact (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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": [], "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", "required": true, "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}], "validation": {"warnings": [], "information": [{"field": "FullyQualifiedCategory", "details": "Must be provided."}]}}, "status": {"type": "String", "displayName": "Account Status", "description": "The status of the account", "required": true, "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}], "validation": {"warnings": [], "information": [{"field": "Status", "details": "Must be provided."}]}}}} + MYOB AccountRight and Essentials: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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": "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", "required": true, "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}]}, "status": {"type": "String", "displayName": "Account Status", "description": "The status of the account", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Archived", "type": "String", "displayName": "Archived", "required": false}]}}} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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}}} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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": 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", "required": true, "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}]}}} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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": 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", "required": true, "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}]}}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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": {"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", "required": true, "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}]}}} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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": "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", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Archived", "type": "String", "displayName": "Archived", "required": false}]}, "type": {"type": "String", "displayName": "Account Type", "description": "The type, or base category, of the account", "required": true, "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}]}, "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."}]}}}} + Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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}}} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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": "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.", "required": true, "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}]}}} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + create-account: + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + 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"} + responses: + "400": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + get-create-bankAccounts-model: + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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, "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"}]}}}} + Exact (Netherlands): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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}, "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}}} + Exact (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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}, "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}}} + FreeAgent: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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}, "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", "required": true, "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}]}, "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}}} + KashFlow: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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": "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}}} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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}}} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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": "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}}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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, "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."}]}}}} + Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + 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}}} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + create-bank-account: + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"currency": "USD", "status": "Active"} + responses: + "400": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + list-bill-credit-notes: + "": + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "6a0e9dfb-87b0-47d3-aaaf-9753ae9e757d", "billCreditNoteNumber": "14763237", "supplierRef": {"id": "67C6A7A1-5E84-4AC4-B950-24A114E379D0", "supplierName": "Chin's Gas and Oil"}, "totalAmount": 693, "totalDiscount": 0, "subTotal": 805.78, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 693, "status": "Submitted", "issueDate": "2019-02-18T16:03:07.268Z", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "USD", "lineItems": [{"description": "AcmeMagnet", "unitAmount": 25, "quantity": 4, "discountAmount": 0, "subTotal": 100, "taxAmount": 10, "totalAmount": 110, "accountRef": {"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"}, "itemRef": {"id": "3"}, "trackingCategoryRefs": [{"id": "department_1", "name": "ACMERockets"}, {"id": "costcode_2", "name": "ACM2-ACMESigns"}]}, {"description": "ACMEDisintegratingPistol", "unitAmount": 25, "quantity": 3, "discountAmount": 0, "subTotal": 75, "taxAmount": 7.5, "totalAmount": 82.5, "accountRef": {"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"}, "itemRef": {"id": "3abf0883-03f7-44c6-bc15-1372522d25e1"}}, {"description": "ACMEWhippedCreamDispenser", "unitAmount": 52, "quantity": 6, "discountAmount": 0, "subTotal": 312, "taxAmount": 31.2, "totalAmount": 343.2, "accountRef": {"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"}, "itemRef": {"id": "3691f3d9-0ff7-4358-8a93-bed31c1b4b03"}}, {"description": "ACMEJetPropelledPogoStick", "unitAmount": 130, "quantity": 1, "discountAmount": 0, "subTotal": 130, "taxAmount": 27.3, "totalAmount": 157.3, "accountRef": {"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"}, "taxRateRef": {"id": "d606732b-db18-44d7-823b-7f15f42c32ea"}, "itemRef": {"id": "075410d4-7edc-4936-ba52-9e1e43cbe300"}}], "paymentAllocations": [], "createdFromRefs": [], "note": "Track separately"}], "pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} + "400": {} + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:26Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "0deaed0a-9f51-eb11-89f9-00224800af18", "billCreditNoteNumber": "109001", "supplierRef": {"id": "be1217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "Fabrikam, Inc."}, "withholdingTax": [], "totalAmount": 8, "totalDiscount": 0, "subTotal": 8, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 8, "status": "Submitted", "issueDate": "2020-12-21T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "lineItems": [{"description": "Abdi Item No VAT", "unitAmount": 8, "quantity": 1, "discountAmount": 0, "subTotal": 8, "taxAmount": 0, "totalAmount": 8, "accountRef": {"id": "6a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Inventory"}, "discountPercentage": 0, "taxRateRef": {"id": "6bbc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for EXPORT / ZERO", "effectiveTaxRate": 0}, "itemRef": {"id": "ITEM-dbc37b18-4209-eb11-bbf6-0022481ad2e8-EXPORT-EXPORT", "name": "Abdi Item No VAT / General Business Posting Group: 'EXPORT' / VAT Business Posting Group: 'EXPORT'"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "createdFromRefs": [], "note": "BCN001", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:26Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "157c025f-a19e-eb11-8ce6-0022481a7bed", "billCreditNoteNumber": "109002", "supplierRef": {"id": "be1217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "Fabrikam, Inc."}, "withholdingTax": [], "totalAmount": 20, "totalDiscount": 0, "subTotal": 20, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 10, "status": "PartiallyPaid", "issueDate": "2021-01-26T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "lineItems": [{"description": "Abdi Item No VAT", "unitAmount": 20, "quantity": 1, "discountAmount": 0, "subTotal": 20, "taxAmount": 0, "totalAmount": 20, "accountRef": {"id": "6a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Inventory"}, "discountPercentage": 0, "taxRateRef": {"id": "6bbc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for EXPORT / ZERO", "effectiveTaxRate": 0}, "itemRef": {"id": "ITEM-dbc37b18-4209-eb11-bbf6-0022481ad2e8-EXPORT-EXPORT", "name": "Abdi Item No VAT / General Business Posting Group: 'EXPORT' / VAT Business Posting Group: 'EXPORT'"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "257c025f-a19e-eb11-8ce6-0022481a7bed", "note": "Credit Memo 1002", "reference": "109002", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-01-26T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2021-04-16T00:00:00", "totalAmount": 10}}], "createdFromRefs": [], "note": "16042021", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 224, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/billCreditNotes"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/billCreditNotes?page=2&pageSize=2"}}} + Exact (Netherlands): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-26T13:32:18Z", "sourceModifiedDate": "2020-01-03T15:06:19Z", "id": "443bd109-e1ed-4de2-b1ab-3b13e980d288", "billCreditNoteNumber": "19600007", "supplierRef": {"id": "5e6f49b9-6489-4b82-83e7-291d308919bb", "supplierName": "Mickey Mouse"}, "withholdingTax": [], "totalAmount": 12.1, "totalDiscount": 0, "subTotal": 10, "totalTaxAmount": 2.1, "discountPercentage": 0, "remainingCredit": 12.1, "status": "Submitted", "issueDate": "2019-12-16T00:00:00Z", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "EUR", "currencyRate": 1, "lineItems": [{"description": "Cheesecake", "unitAmount": 10, "quantity": 1, "discountAmount": 0, "subTotal": 10, "taxAmount": 2.1, "totalAmount": 12.1, "accountRef": {"id": "5f139759-b554-4314-862e-b9d88e5b2e1b", "name": "Af te dragen loonheffing"}, "taxRateRef": {"id": "84277189-ad16-456c-b501-ca31f0a483cc", "name": "BTW prive gebruik", "effectiveTaxRate": 21}, "trackingCategoryRefs": []}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"}, {"modifiedDate": "2022-10-26T13:32:18Z", "sourceModifiedDate": "2020-01-20T19:38:37Z", "id": "6643f559-d7e9-4cfe-802f-60beddbc4ed9", "billCreditNoteNumber": "20600003", "supplierRef": {"id": "f87070e2-bbd7-4383-a7c9-824748c1d70e", "supplierName": "Exact Software Nederland B.V."}, "withholdingTax": [], "totalAmount": 13.57, "totalDiscount": 0, "subTotal": 13.57, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 13.57, "status": "Submitted", "issueDate": "2020-01-20T00:00:00Z", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "EUR", "currencyRate": 1, "lineItems": [{"description": "1 transactions of type CARD_PAYMENT_FEE_REFUND", "unitAmount": 13.57, "quantity": 1, "discountAmount": 0, "subTotal": 13.57, "totalAmount": 13.57, "accountRef": {"id": "f6c251f5-21d0-4164-9b8f-17789fd2fee9", "name": "Kosten werkgeverslasten vakantiegeld"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"}], "pageNumber": 1, "pageSize": 2, "totalResults": 42, "_links": {"self": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/billCreditNotes"}, "current": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/billCreditNotes?page=2&pageSize=2"}}} + Exact (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-26T13:33:23Z", "sourceModifiedDate": "2019-10-30T13:12:56Z", "id": "f9083d38-40c7-4b5f-a693-f4670e3d85bc", "billCreditNoteNumber": "19600008", "supplierRef": {"id": "1c703cce-967c-4476-a86a-32e35341a8f5", "supplierName": "Customer Bill Supplier"}, "withholdingTax": [], "totalAmount": 99999, "totalDiscount": 0, "subTotal": 99999, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 99999, "status": "Submitted", "issueDate": "2019-10-30T00:00:00Z", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Oil Change", "unitAmount": -150, "quantity": 1000.5, "discountAmount": 0, "subTotal": -150075, "totalAmount": -150075, "accountRef": {"id": "885ff551-664d-451b-995b-cb114c9877d0", "name": "Unallocated Cash"}, "itemRef": {"id": "3001"}, "trackingCategoryRefs": []}, {"description": "description", "unitAmount": 250074, "quantity": 1, "discountAmount": 0, "subTotal": 250074, "totalAmount": 250074, "accountRef": {"id": "885ff551-664d-451b-995b-cb114c9877d0", "name": "Unallocated Cash"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"}, {"modifiedDate": "2022-10-26T13:33:23Z", "sourceModifiedDate": "2019-11-01T15:07:18Z", "id": "05023688-5bd5-4034-ae4c-5e3e5099bbfb", "billCreditNoteNumber": "19600009", "supplierRef": {"id": "1c703cce-967c-4476-a86a-32e35341a8f5", "supplierName": "Customer Bill Supplier"}, "withholdingTax": [], "totalAmount": 10, "totalDiscount": 0, "subTotal": 10, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 10, "status": "Submitted", "issueDate": "2019-11-01T00:00:00Z", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Credit note line item #5", "unitAmount": 10, "quantity": 1, "discountAmount": 0, "subTotal": 10, "totalAmount": 10, "accountRef": {"id": "62be6536-f4ea-49b8-9797-1adc23982334", "name": "Depreciation"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"}], "pageNumber": 1, "pageSize": 2, "totalResults": 40, "_links": {"self": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/billCreditNotes"}, "current": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/billCreditNotes?page=2&pageSize=2"}}} + FreeAgent: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-25T14:19:10Z", "sourceModifiedDate": "2018-08-22T13:22:08Z", "id": "10665024", "billCreditNoteNumber": "Bill Credit", "supplierRef": {"id": "6161941", "supplierName": "A & J Fabtech Ltd"}, "withholdingTax": [], "totalAmount": 1500, "totalDiscount": 0, "subTotal": 1250, "totalTaxAmount": 250, "discountPercentage": 0, "remainingCredit": 1500, "status": "Submitted", "issueDate": "2018-08-22T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "lineItems": [{"description": "A & J Fabtech Ltd - Bill Credit Note Bill Credit", "unitAmount": 1250, "quantity": 1, "taxAmount": 250, "totalAmount": 1500, "accountRef": {"id": "285", "name": "Accommodation and Meals"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:19:10Z", "sourceModifiedDate": "2018-10-17T12:56:54Z", "id": "11007024", "billCreditNoteNumber": "Draft test", "supplierRef": {"id": "6161963", "supplierName": "ABB Ltd"}, "withholdingTax": [], "totalAmount": 10, "totalDiscount": 0, "subTotal": 8.33, "totalTaxAmount": 1.67, "discountPercentage": 0, "remainingCredit": 10, "status": "Submitted", "issueDate": "2018-10-17T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "lineItems": [{"description": "ABB Ltd - Bill Credit Note Draft test", "unitAmount": 8.33, "quantity": 1, "taxAmount": 1.67, "totalAmount": 10, "accountRef": {"id": "285", "name": "Accommodation and Meals"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 45, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/billCreditNotes"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/billCreditNotes?page=2&pageSize=2"}}} + KashFlow: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-09-30T10:29:16Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "91339087", "billCreditNoteNumber": "5", "supplierRef": {"id": "6202387", "supplierName": "Dell"}, "withholdingTax": [], "totalAmount": 10, "totalDiscount": 0, "subTotal": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2020-02-25T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Oil refund", "unitAmount": 10, "quantity": 1, "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "accountRef": {"id": "21481832", "name": "Oil"}, "itemRef": {"id": "114817740"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"}, {"modifiedDate": "2022-09-30T10:29:16Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "91341939", "billCreditNoteNumber": "6", "supplierRef": {"id": "6202387", "supplierName": "Dell"}, "withholdingTax": [], "totalAmount": 240, "totalDiscount": 0, "subTotal": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2020-02-25T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "", "unitAmount": -200, "quantity": -1, "subTotal": 200, "taxAmount": -40, "totalAmount": 240, "accountRef": {"id": "21481820", "name": "Materials purchased"}, "itemRef": {"id": "114821376"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"}], "pageNumber": 1, "pageSize": 2, "totalResults": 8, "_links": {"self": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/billCreditNotes"}, "current": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/billCreditNotes?page=2&pageSize=2"}}} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-09-20T08:16:22Z", "sourceModifiedDate": "2021-11-02T19:58:58", "id": "1781", "billCreditNoteNumber": "VENDCRED1", "supplierRef": {"id": "749", "supplierName": "Jo's Cheese"}, "withholdingTax": [], "totalAmount": 174.6, "totalDiscount": 0, "subTotal": 145.5, "totalTaxAmount": 29.1, "discountPercentage": 0, "remainingCredit": 174.6, "status": "Submitted", "issueDate": "2021-11-02T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "billcredit_test", "unitAmount": 145.5, "quantity": 1, "unitOfMeasurement": "pack", "subTotal": 145.5, "totalAmount": 145.5, "accountRef": {"id": "713", "name": "Inventory Asset"}, "trackingCategoryRefs": [{"id": "department-1"}, {"id": "location-1"}], "tracking": {"categoryRefs": [{"id": "department-1"}, {"id": "location-1"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "createdFromRefs": [], "note": "Codat1"}, {"modifiedDate": "2022-09-20T08:16:22Z", "sourceModifiedDate": "2021-11-03T18:27:14", "id": "1782", "billCreditNoteNumber": "VENDCRED2", "supplierRef": {"id": "749", "supplierName": "Jo's Cheese"}, "withholdingTax": [], "totalAmount": 642.3, "totalDiscount": 0, "subTotal": 535.25, "totalTaxAmount": 107.05, "discountPercentage": 0, "remainingCredit": 342.3, "status": "PartiallyPaid", "issueDate": "2021-11-02T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Cheese", "unitAmount": 400, "quantity": 1, "unitOfMeasurement": "pack", "subTotal": 400, "totalAmount": 400, "accountRef": {"id": "714", "name": "Cost of Goods Sold"}, "createdFromLineRef": {"id": "7462", "dataType": "bills", "lineNumber": "1"}, "trackingCategoryRefs": [{"id": "location-1"}], "tracking": {"categoryRefs": [{"id": "location-1"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}, {"description": "double cream", "unitAmount": 100, "quantity": 1, "subTotal": 100, "totalAmount": 100, "accountRef": {"id": "714", "name": "Cost of Goods Sold"}, "trackingCategoryRefs": [{"id": "location-1"}], "tracking": {"categoryRefs": [{"id": "location-1"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}, {"description": "", "unitAmount": 35.25, "quantity": 1, "subTotal": 35.25, "totalAmount": 35.25, "accountRef": {"id": "54", "name": "Sales"}, "itemRef": {"id": "128", "name": "Test Item"}, "trackingCategoryRefs": [{"id": "location-1"}], "tracking": {"categoryRefs": [{"id": "location-1"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [{"payment": {"id": "1782", "note": "Codat1", "reference": "Bill Credit 02/11/2021", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-11-02T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": 300}}], "createdFromRefs": [{"id": "7462", "dataType": "bills"}], "note": "Codat1"}], "pageNumber": 1, "pageSize": 2, "totalResults": 16, "_links": {"self": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/data/billCreditNotes"}, "current": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/973341cc-ca0a-4a88-88de-e5954157818b/data/billCreditNotes?page=2&pageSize=2"}}} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T09:12:30Z", "sourceModifiedDate": "2023-12-16T05:06:19", "id": "6D2C-1197698059", "billCreditNoteNumber": "Return", "supplierRef": {"id": "E0000-933272656", "supplierName": "Timberloft Lumber"}, "withholdingTax": [], "totalAmount": 475, "totalDiscount": 0, "subTotal": 475, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 475, "status": "Submitted", "issueDate": "2024-10-30T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Lumber:Rough - Rough lumber", "unitAmount": 475, "quantity": 0, "discountAmount": 0, "subTotal": 475, "taxAmount": 0, "totalAmount": 475, "discountPercentage": 0, "itemRef": {"id": "1C0000-933272656", "name": "Lumber:Rough"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [{"payment": {"id": "6D2C-1197698059", "reference": "Return", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2024-10-30T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": 475}}], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:12:30Z", "sourceModifiedDate": "2023-12-16T05:05:03", "id": "F3A-933787869", "billCreditNoteNumber": "CR-1098", "supplierRef": {"id": "80000-933272656", "supplierName": "Sloan Roofing"}, "withholdingTax": [], "totalAmount": 850, "totalDiscount": 0, "subTotal": 850, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 850, "status": "Submitted", "issueDate": "2024-12-12T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Subs:Roofing - Roofing", "unitAmount": 850, "quantity": 0, "discountAmount": 0, "subTotal": 850, "taxAmount": 0, "totalAmount": 850, "discountPercentage": 0, "itemRef": {"id": "D0000-933272656", "name": "Subs:Roofing"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [{"payment": {"id": "F3A-933787869", "reference": "CR-1098", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2024-12-12T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": 850}}], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 3, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/billCreditNotes"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/billCreditNotes?page=2&pageSize=2"}}} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-01-18T11:02:37Z", "sourceModifiedDate": "2019-05-13T13:14:06Z", "id": "19", "billCreditNoteNumber": "19", "supplierRef": {"id": "4", "supplierName": "BILLy elliot"}, "withholdingTax": [], "totalAmount": 5, "totalDiscount": 0, "subTotal": 5, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2019-05-13T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "", "unitAmount": 5, "quantity": 1, "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "accountRef": {"id": "16", "name": "Advertising"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}}], "paymentAllocations": [{"payment": {"id": "20", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-05-13T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": 5}}], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"}, {"modifiedDate": "2023-01-18T11:02:37Z", "sourceModifiedDate": "2020-03-23T10:44:06Z", "id": "677", "billCreditNoteNumber": "677", "supplierRef": {"id": "4", "supplierName": "BILLy elliot"}, "withholdingTax": [], "totalAmount": 5, "totalDiscount": 0, "subTotal": 5, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2020-03-20T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "", "unitAmount": 5, "quantity": 1, "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "accountRef": {"id": "16", "name": "Advertising"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}}], "paymentAllocations": [{"payment": {"id": "678", "note": "payment note test", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-03-23T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": 5}}], "createdFromRefs": [], "note": "Codat Note field"}], "pageNumber": 1, "pageSize": 2, "totalResults": 11, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/billCreditNotes"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/billCreditNotes?page=2&pageSize=2"}}} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T09:35:58Z", "sourceModifiedDate": "2019-06-20T15:48:50Z", "id": "424", "billCreditNoteNumber": "424", "supplierRef": {"id": "24", "supplierName": "Brijesh Jain"}, "withholdingTax": [], "totalAmount": 69, "totalDiscount": 0, "subTotal": 69, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 69, "status": "Submitted", "issueDate": "2019-06-20T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Refund of iZettle Fees", "unitAmount": 69, "quantity": 1, "subTotal": 69, "taxAmount": 0, "totalAmount": 69, "accountRef": {"id": "30", "name": "Janitorial Expense"}, "taxRateRef": {"id": "20_Bills", "name": "5.0% RC CIS Bills", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:35:58Z", "sourceModifiedDate": "2019-07-16T09:49:14Z", "id": "455", "billCreditNoteNumber": "455", "supplierRef": {"id": "53", "supplierName": "Bank of AnyCity"}, "withholdingTax": [], "totalAmount": 10, "totalDiscount": 0, "subTotal": 10, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2019-06-26T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "a", "unitAmount": 10, "quantity": 1, "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "accountRef": {"id": "11", "name": "Ask My Accountant"}, "taxRateRef": {"id": "20_Bills", "name": "5.0% RC CIS Bills", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}}], "paymentAllocations": [{"payment": {"id": "530", "reference": "4", "accountRef": {"id": "100", "name": "Savings2"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-07-16T00:00:00", "totalAmount": 170}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": 10}}], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 26, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/billCreditNotes"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/billCreditNotes?page=2&pageSize=2"}}} + Sage 200cloud: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-14T09:35:52Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45391", "billCreditNoteNumber": "Return 1", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "withholdingTax": [], "totalAmount": 120, "totalDiscount": 2.5, "subTotal": 100, "totalTaxAmount": 20, "discountPercentage": 2.5, "remainingCredit": 109.5, "status": "Submitted", "issueDate": "2020-07-22T00:00:00Z", "allocatedOnDate": "2020-01-20T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Tax Rate 1", "unitAmount": 0, "quantity": 0, "discountAmount": 0.5, "subTotal": 0, "taxAmount": 20, "totalAmount": 20, "taxRateRef": {"id": "1729", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": []}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 2.5, "subTotal": 100, "taxAmount": 0, "totalAmount": 100, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "45391", "note": "ret1", "reference": "Return 1", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-20T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -10.5}}], "createdFromRefs": [], "note": "ret1"}, {"modifiedDate": "2022-10-14T09:35:52Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45421", "billCreditNoteNumber": "Return 2", "supplierRef": {"id": "QUA001", "supplierName": "Quality Motors"}, "withholdingTax": [], "totalAmount": 60, "totalDiscount": 1.25, "subTotal": 50, "totalTaxAmount": 10, "discountPercentage": 2.5, "remainingCredit": 60, "status": "Submitted", "issueDate": "2020-07-22T00:00:00Z", "allocatedOnDate": "2020-02-03T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Tax Rate 1", "unitAmount": 0, "quantity": 0, "discountAmount": 0.25, "subTotal": 0, "taxAmount": 10, "totalAmount": 10, "taxRateRef": {"id": "1729", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": []}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 1.25, "subTotal": 50, "taxAmount": 0, "totalAmount": 50, "trackingCategoryRefs": []}], "paymentAllocations": [], "createdFromRefs": [], "note": "ret2"}], "pageNumber": 1, "pageSize": 2, "totalResults": 21, "_links": {"self": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/billCreditNotes"}, "current": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/billCreditNotes?page=2&pageSize=2"}}} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "20", "billCreditNoteNumber": "O/BAL", "supplierRef": {"id": "NEW001", "supplierName": "Newtown Builders Ltd"}, "withholdingTax": [], "totalAmount": 0.01, "totalDiscount": 0, "subTotal": 0.01, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0.01, "status": "Submitted", "issueDate": "2021-12-31T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Opening Balance", "unitAmount": 0.01, "quantity": 1, "subTotal": 0.01, "taxAmount": 0, "totalAmount": 0.01, "accountRef": {"id": "9998", "name": "Suspense Account"}, "taxRateRef": {"id": "9", "name": "Non-Vatable Tax Code", "effectiveTaxRate": 0}, "trackingCategoryRefs": [{"id": "department_0", "name": "Default"}], "tracking": {"categoryRefs": [{"id": "department_0", "name": "Default"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "createdFromRefs": [], "note": "Opening Balance", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "323", "billCreditNoteNumber": "Return", "supplierRef": {"id": "UNI001", "supplierName": "Unique Systems"}, "withholdingTax": [], "totalAmount": 103.4, "totalDiscount": 0, "subTotal": 88, "totalTaxAmount": 15.4, "discountPercentage": 0, "remainingCredit": 103.4, "status": "Submitted", "issueDate": "2022-02-28T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Returned Goods, damaged", "unitAmount": 103.4, "quantity": 1, "subTotal": 88, "taxAmount": 15.4, "totalAmount": 103.4, "accountRef": {"id": "5000", "name": "Materials Purchased"}, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_0", "name": "Default"}], "tracking": {"categoryRefs": [{"id": "department_0", "name": "Default"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "createdFromRefs": [], "note": "Returned Goods, damaged", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 12, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/billCreditNotes"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/billCreditNotes?page=2&pageSize=2"}}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-24T14:53:32Z", "sourceModifiedDate": "2019-11-19T14:17:32Z", "id": "b6c6fce9866849b0b44cac99ab7dc579", "billCreditNoteNumber": "Supplier credit note", "supplierRef": {"id": "ec716559789111e8aaa5027d54329956", "supplierName": "Bagels Limited"}, "withholdingTax": [], "totalAmount": 10, "totalDiscount": 0, "subTotal": 10, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2018-11-23T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "USD", "currencyRate": 0.776970973, "lineItems": [{"description": "Consulting services", "unitAmount": 10, "quantity": 1, "discountAmount": 0, "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "accountRef": {"id": "9a995955267a11e797950a57719b2edb", "name": "Cost of sales - goods"}, "discountPercentage": 0, "taxRateRef": {"id": "GB_ZERO", "name": "Zero Rated 0.00%", "effectiveTaxRate": 0}, "itemRef": {"id": "a87b922b33de11e797950a57719b2edb", "name": "Consulting services"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "bf6496aaf0294883b27c423ce8266113", "note": "Supplier refund using credit/debit card", "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "currency": "USD", "currencyRate": 0.771449236, "paidOnDate": "2019-11-19T00:00:00", "totalAmount": -10}, "allocation": {"currency": "USD", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": 10}}], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"}, {"modifiedDate": "2022-10-24T14:53:32Z", "sourceModifiedDate": "2020-07-16T15:00:36Z", "id": "23d866f6367d4f11956a36a71e47bc37", "billCreditNoteNumber": "91fe2a83-e161-4c21-929d-c5c10c4b07e5", "supplierRef": {"id": "ca430e0d156011e8b45c025132dab352", "supplierName": "Test Supplier"}, "withholdingTax": [], "totalAmount": 60, "totalDiscount": 0, "subTotal": 50, "totalTaxAmount": 10, "discountPercentage": 0, "remainingCredit": 60, "status": "Submitted", "issueDate": "2019-01-29T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Consulting services", "unitAmount": 10, "quantity": 5, "discountAmount": 0, "subTotal": 50, "taxAmount": 10, "totalAmount": 60, "accountRef": {"id": "9a995955267a11e797950a57719b2edb", "name": "Cost of sales - goods"}, "discountPercentage": 0, "taxRateRef": {"id": "GB_STANDARD", "name": "Standard 20.00%", "effectiveTaxRate": 20}, "itemRef": {"id": "a87b922b33de11e797950a57719b2edb", "name": "Consulting services"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"}], "pageNumber": 1, "pageSize": 2, "totalResults": 747, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/billCreditNotes"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/billCreditNotes?page=2&pageSize=2"}}} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-28T11:10:22Z", "sourceModifiedDate": "2021-09-20T13:50:16", "id": "3359", "billCreditNoteNumber": "APADJ0001", "supplierRef": {"id": "3", "supplierName": "ADP"}, "withholdingTax": [], "totalAmount": 12, "totalDiscount": 0, "subTotal": 10, "totalTaxAmount": 2, "discountPercentage": 0, "remainingCredit": 12, "status": "Submitted", "issueDate": "2021-09-20T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "USD", "currencyRate": 0.7283, "lineItems": [{"description": "No Description Provided", "unitAmount": 5, "quantity": 1, "subTotal": 5, "taxAmount": 1, "totalAmount": 6, "accountRef": {"id": "197", "name": "Software and Licenses"}, "taxRateRef": {"id": "47", "name": "EC Purchase Goods Standard Rate Input", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "tracking": {"categoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}, {"description": "No Description Provided", "unitAmount": 5, "quantity": 1, "subTotal": 5, "taxAmount": 1, "totalAmount": 6, "accountRef": {"id": "197", "name": "Software and Licenses"}, "taxRateRef": {"id": "47", "name": "EC Purchase Goods Standard Rate Input", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "tracking": {"categoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "createdFromRefs": [], "note": ""}, {"modifiedDate": "2022-10-28T11:10:22Z", "sourceModifiedDate": "2021-09-29T13:34:47", "id": "3399", "billCreditNoteNumber": "APADJ0002", "supplierRef": {"id": "3", "supplierName": "ADP"}, "withholdingTax": [], "totalAmount": 360, "totalDiscount": 0, "subTotal": 300, "totalTaxAmount": 60, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2021-09-24T00:00:00", "allocatedOnDate": "2021-09-29T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "No Description Provided", "unitAmount": 300, "quantity": 1, "subTotal": 300, "taxAmount": 60, "totalAmount": 360, "accountRef": {"id": "197", "name": "Software and Licenses"}, "taxRateRef": {"id": "81", "name": "UK Purchase Goods Standard Rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "tracking": {"categoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "createdFromRefs": [], "note": ""}], "pageNumber": 1, "pageSize": 2, "totalResults": 82, "_links": {"self": {"href": "/companies/71ca2b28-8e86-41e7-8c55-f681042b11a0/data/billCreditNotes"}, "current": {"href": "/companies/71ca2b28-8e86-41e7-8c55-f681042b11a0/data/billCreditNotes?page=1&pageSize=2"}, "next": {"href": "/companies/71ca2b28-8e86-41e7-8c55-f681042b11a0/data/billCreditNotes?page=2&pageSize=2"}}} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2011-04-07T07:26:30", "id": "ee8bec08-2be8-40ba-acd0-d53d5df11235", "billCreditNoteNumber": "RPT429-1", "supplierRef": {"id": "3a0d40a2-2698-4cf5-b7b2-30133c632ab6", "supplierName": "Swanston Security"}, "withholdingTax": [], "totalAmount": 25.44, "totalDiscount": 0, "subTotal": 25.44, "totalTaxAmount": 4.24, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2022-12-12T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Refund as agreed due to window break when guard absent", "unitAmount": 21.2, "quantity": 1, "discountAmount": 0, "subTotal": 21.2, "taxAmount": 4.24, "totalAmount": 25.44, "accountRef": {"id": "f96c9458-d724-47bf-8f74-a9d5726465ce", "name": "General Expenses"}, "discountPercentage": 0, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "ee8bec08-2be8-40ba-acd0-d53d5df11235", "reference": "", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-12-12T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-12-12T00:00:00", "totalAmount": 25.44}}], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2011-04-06T21:00:33", "id": "7d1f4e11-e909-43b0-901c-2c824dff1e82", "billCreditNoteNumber": "720-2", "supplierRef": {"id": "cf8fa320-a527-496c-823e-22dd069d29e6", "supplierName": "PC Complete"}, "withholdingTax": [], "totalAmount": 270.36, "totalDiscount": 0, "subTotal": 270.36, "totalTaxAmount": 45.06, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2022-12-16T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Unable to supply DVD writer for laptop", "unitAmount": 225.3, "quantity": 1, "discountAmount": 0, "subTotal": 225.3, "taxAmount": 45.06, "totalAmount": 270.36, "accountRef": {"id": "f96c9458-d724-47bf-8f74-a9d5726465ce", "name": "General Expenses"}, "discountPercentage": 0, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "7d1f4e11-e909-43b0-901c-2c824dff1e82", "reference": "", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-12-16T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-12-16T00:00:00", "totalAmount": 270.36}}], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 2, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/billCreditNotes"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/billCreditNotes?page=1&pageSize=2"}}} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "400": + 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" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + 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} + get-bill-credit-note: + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billCreditNoteId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-27T14:21:26Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "0deaed0a-9f51-eb11-89f9-00224800af18", "billCreditNoteNumber": "109001", "supplierRef": {"id": "be1217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "Fabrikam, Inc."}, "withholdingTax": [], "totalAmount": 8, "totalDiscount": 0, "subTotal": 8, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 8, "status": "Submitted", "issueDate": "2020-12-21T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "lineItems": [{"description": "Abdi Item No VAT", "unitAmount": 8, "quantity": 1, "discountAmount": 0, "subTotal": 8, "taxAmount": 0, "totalAmount": 8, "accountRef": {"id": "6a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Inventory"}, "discountPercentage": 0, "taxRateRef": {"id": "6bbc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for EXPORT / ZERO", "effectiveTaxRate": 0}, "itemRef": {"id": "ITEM-dbc37b18-4209-eb11-bbf6-0022481ad2e8-EXPORT-EXPORT", "name": "Abdi Item No VAT / General Business Posting Group: 'EXPORT' / VAT Business Posting Group: 'EXPORT'"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "createdFromRefs": [], "note": "BCN001", "metadata": {"isDeleted": false}} + Exact (Netherlands): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billCreditNoteId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-26T13:32:18Z", "sourceModifiedDate": "2020-01-03T15:06:19Z", "id": "443bd109-e1ed-4de2-b1ab-3b13e980d288", "billCreditNoteNumber": "19600007", "supplierRef": {"id": "5e6f49b9-6489-4b82-83e7-291d308919bb", "supplierName": "Mickey Mouse"}, "withholdingTax": [], "totalAmount": 12.1, "totalDiscount": 0, "subTotal": 10, "totalTaxAmount": 2.1, "discountPercentage": 0, "remainingCredit": 12.1, "status": "Submitted", "issueDate": "2019-12-16T00:00:00Z", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "EUR", "currencyRate": 1, "lineItems": [{"description": "Cheesecake", "unitAmount": 10, "quantity": 1, "discountAmount": 0, "subTotal": 10, "taxAmount": 2.1, "totalAmount": 12.1, "accountRef": {"id": "5f139759-b554-4314-862e-b9d88e5b2e1b", "name": "Af te dragen loonheffing"}, "taxRateRef": {"id": "84277189-ad16-456c-b501-ca31f0a483cc", "name": "BTW prive gebruik", "effectiveTaxRate": 21}, "trackingCategoryRefs": []}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"} + Exact (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billCreditNoteId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-26T13:33:23Z", "sourceModifiedDate": "2019-10-30T13:12:56Z", "id": "f9083d38-40c7-4b5f-a693-f4670e3d85bc", "billCreditNoteNumber": "19600008", "supplierRef": {"id": "1c703cce-967c-4476-a86a-32e35341a8f5", "supplierName": "Customer Bill Supplier"}, "withholdingTax": [], "totalAmount": 99999, "totalDiscount": 0, "subTotal": 99999, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 99999, "status": "Submitted", "issueDate": "2019-10-30T00:00:00Z", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Oil Change", "unitAmount": -150, "quantity": 1000.5, "discountAmount": 0, "subTotal": -150075, "totalAmount": -150075, "accountRef": {"id": "885ff551-664d-451b-995b-cb114c9877d0", "name": "Unallocated Cash"}, "itemRef": {"id": "3001"}, "trackingCategoryRefs": []}, {"description": "description", "unitAmount": 250074, "quantity": 1, "discountAmount": 0, "subTotal": 250074, "totalAmount": 250074, "accountRef": {"id": "885ff551-664d-451b-995b-cb114c9877d0", "name": "Unallocated Cash"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"} + FreeAgent: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billCreditNoteId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-25T14:19:10Z", "sourceModifiedDate": "2018-08-22T13:22:08Z", "id": "10665024", "billCreditNoteNumber": "Bill Credit", "supplierRef": {"id": "6161941", "supplierName": "A & J Fabtech Ltd"}, "withholdingTax": [], "totalAmount": 1500, "totalDiscount": 0, "subTotal": 1250, "totalTaxAmount": 250, "discountPercentage": 0, "remainingCredit": 1500, "status": "Submitted", "issueDate": "2018-08-22T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "lineItems": [{"description": "A & J Fabtech Ltd - Bill Credit Note Bill Credit", "unitAmount": 1250, "quantity": 1, "taxAmount": 250, "totalAmount": 1500, "accountRef": {"id": "285", "name": "Accommodation and Meals"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78", "metadata": {"isDeleted": false}} + KashFlow: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billCreditNoteId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-09-30T10:29:16Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "91339087", "billCreditNoteNumber": "5", "supplierRef": {"id": "6202387", "supplierName": "Dell"}, "withholdingTax": [], "totalAmount": 10, "totalDiscount": 0, "subTotal": 0, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2020-02-25T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Oil refund", "unitAmount": 10, "quantity": 1, "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "accountRef": {"id": "21481832", "name": "Oil"}, "itemRef": {"id": "114817740"}, "trackingCategoryRefs": []}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billCreditNoteId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-09-20T08:16:22Z", "sourceModifiedDate": "2021-11-02T19:58:58", "id": "1781", "billCreditNoteNumber": "VENDCRED1", "supplierRef": {"id": "749", "supplierName": "Jo's Cheese"}, "withholdingTax": [], "totalAmount": 174.6, "totalDiscount": 0, "subTotal": 145.5, "totalTaxAmount": 29.1, "discountPercentage": 0, "remainingCredit": 174.6, "status": "Submitted", "issueDate": "2021-11-02T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "billcredit_test", "unitAmount": 145.5, "quantity": 1, "unitOfMeasurement": "pack", "subTotal": 145.5, "totalAmount": 145.5, "accountRef": {"id": "713", "name": "Inventory Asset"}, "createdFromLineRef": {"id": "1432", "dataType": "bills", "lineNumber": "1"}, "trackingCategoryRefs": [{"id": "department-1"}, {"id": "location-1"}], "tracking": {"categoryRefs": [{"id": "department-1"}, {"id": "location-1"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "createdFromRefs": [{"id": "1432", "dataType": "bills"}], "note": "Codat1"} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billCreditNoteId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T09:12:30Z", "sourceModifiedDate": "2023-12-16T05:06:19", "id": "6D2C-1197698059", "billCreditNoteNumber": "Return", "supplierRef": {"id": "E0000-933272656", "supplierName": "Timberloft Lumber"}, "withholdingTax": [], "totalAmount": 475, "totalDiscount": 0, "subTotal": 475, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 475, "status": "Submitted", "issueDate": "2024-10-30T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Lumber:Rough - Rough lumber", "unitAmount": 475, "quantity": 0, "discountAmount": 0, "subTotal": 475, "taxAmount": 0, "totalAmount": 475, "discountPercentage": 0, "itemRef": {"id": "1C0000-933272656", "name": "Lumber:Rough"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [{"payment": {"id": "6D2C-1197698059", "reference": "Return", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2024-10-30T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": 475}}], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78", "metadata": {"isDeleted": false}} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billCreditNoteId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-01-18T11:02:37Z", "sourceModifiedDate": "2019-05-13T13:14:06Z", "id": "19", "billCreditNoteNumber": "19", "supplierRef": {"id": "4", "supplierName": "BILLy elliot"}, "withholdingTax": [], "totalAmount": 5, "totalDiscount": 0, "subTotal": 5, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2019-05-13T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "", "unitAmount": 5, "quantity": 1, "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "accountRef": {"id": "16", "name": "Advertising"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}}], "paymentAllocations": [{"payment": {"id": "20", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-05-13T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": 5}}], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billCreditNoteId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T09:35:58Z", "sourceModifiedDate": "2019-06-20T15:48:50Z", "id": "424", "billCreditNoteNumber": "424", "supplierRef": {"id": "24", "supplierName": "Brijesh Jain"}, "withholdingTax": [], "totalAmount": 69, "totalDiscount": 0, "subTotal": 69, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 69, "status": "Submitted", "issueDate": "2019-06-20T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Refund of iZettle Fees", "unitAmount": 69, "quantity": 1, "subTotal": 69, "taxAmount": 0, "totalAmount": 69, "accountRef": {"id": "30", "name": "Janitorial Expense"}, "taxRateRef": {"id": "20_Bills", "name": "5.0% RC CIS Bills", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78", "metadata": {"isDeleted": false}} + Sage 200cloud: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billCreditNoteId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-14T09:35:52Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45391", "billCreditNoteNumber": "Return 1", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "withholdingTax": [], "totalAmount": 120, "totalDiscount": 2.5, "subTotal": 100, "totalTaxAmount": 20, "discountPercentage": 2.5, "remainingCredit": 109.5, "status": "Submitted", "issueDate": "2020-07-22T00:00:00Z", "allocatedOnDate": "2020-01-20T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Tax Rate 1", "unitAmount": 0, "quantity": 0, "discountAmount": 0.5, "subTotal": 0, "taxAmount": 20, "totalAmount": 20, "taxRateRef": {"id": "1729", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": []}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 2.5, "subTotal": 100, "taxAmount": 0, "totalAmount": 100, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "45391", "note": "ret1", "reference": "Return 1", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-20T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -10.5}}], "createdFromRefs": [], "note": "ret1"} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billCreditNoteId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "20", "billCreditNoteNumber": "O/BAL", "supplierRef": {"id": "NEW001", "supplierName": "Newtown Builders Ltd"}, "withholdingTax": [], "totalAmount": 0.01, "totalDiscount": 0, "subTotal": 0.01, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0.01, "status": "Submitted", "issueDate": "2021-12-31T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Opening Balance", "unitAmount": 0.01, "quantity": 1, "subTotal": 0.01, "taxAmount": 0, "totalAmount": 0.01, "accountRef": {"id": "9998", "name": "Suspense Account"}, "taxRateRef": {"id": "9", "name": "Non-Vatable Tax Code", "effectiveTaxRate": 0}, "trackingCategoryRefs": [{"id": "department_0", "name": "Default"}], "tracking": {"categoryRefs": [{"id": "department_0", "name": "Default"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "createdFromRefs": [], "note": "Opening Balance", "metadata": {"isDeleted": false}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billCreditNoteId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-24T14:53:32Z", "sourceModifiedDate": "2019-11-19T14:17:32Z", "id": "b6c6fce9866849b0b44cac99ab7dc579", "billCreditNoteNumber": "Supplier credit note", "supplierRef": {"id": "ec716559789111e8aaa5027d54329956", "supplierName": "Bagels Limited"}, "withholdingTax": [], "totalAmount": 10, "totalDiscount": 0, "subTotal": 10, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2018-11-23T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "USD", "currencyRate": 0.776970973, "lineItems": [{"description": "Consulting services", "unitAmount": 10, "quantity": 1, "discountAmount": 0, "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "accountRef": {"id": "9a995955267a11e797950a57719b2edb", "name": "Cost of sales - goods"}, "discountPercentage": 0, "taxRateRef": {"id": "GB_ZERO", "name": "Zero Rated 0.00%", "effectiveTaxRate": 0}, "itemRef": {"id": "a87b922b33de11e797950a57719b2edb", "name": "Consulting services"}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "bf6496aaf0294883b27c423ce8266113", "note": "Supplier refund using credit/debit card", "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "currency": "USD", "currencyRate": 0.771449236, "paidOnDate": "2019-11-19T00:00:00", "totalAmount": -10}, "allocation": {"currency": "USD", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": 10}}], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billCreditNoteId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-28T11:10:22Z", "sourceModifiedDate": "2021-09-20T13:50:16", "id": "3359", "billCreditNoteNumber": "APADJ0001", "supplierRef": {"id": "3", "supplierName": "ADP"}, "withholdingTax": [], "totalAmount": 12, "totalDiscount": 0, "subTotal": 10, "totalTaxAmount": 2, "discountPercentage": 0, "remainingCredit": 12, "status": "Submitted", "issueDate": "2021-09-20T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "USD", "currencyRate": 0.7283, "lineItems": [{"description": "No Description Provided", "unitAmount": 5, "quantity": 1, "subTotal": 5, "taxAmount": 1, "totalAmount": 6, "accountRef": {"id": "197", "name": "Software and Licenses"}, "taxRateRef": {"id": "47", "name": "EC Purchase Goods Standard Rate Input", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "tracking": {"categoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}, {"description": "No Description Provided", "unitAmount": 5, "quantity": 1, "subTotal": 5, "taxAmount": 1, "totalAmount": 6, "accountRef": {"id": "197", "name": "Software and Licenses"}, "taxRateRef": {"id": "47", "name": "EC Purchase Goods Standard Rate Input", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "tracking": {"categoryRefs": [{"id": "LOCATION-8", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "createdFromRefs": [], "note": ""} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billCreditNoteId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2011-04-07T07:26:30", "id": "ee8bec08-2be8-40ba-acd0-d53d5df11235", "billCreditNoteNumber": "RPT429-1", "supplierRef": {"id": "3a0d40a2-2698-4cf5-b7b2-30133c632ab6", "supplierName": "Swanston Security"}, "withholdingTax": [], "totalAmount": 25.44, "totalDiscount": 0, "subTotal": 25.44, "totalTaxAmount": 4.24, "discountPercentage": 0, "remainingCredit": 0, "status": "Paid", "issueDate": "2022-12-12T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Refund as agreed due to window break when guard absent", "unitAmount": 21.2, "quantity": 1, "discountAmount": 0, "subTotal": 21.2, "taxAmount": 4.24, "totalAmount": 25.44, "accountRef": {"id": "f96c9458-d724-47bf-8f74-a9d5726465ce", "name": "General Expenses"}, "discountPercentage": 0, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "trackingCategoryRefs": []}], "paymentAllocations": [{"payment": {"id": "ee8bec08-2be8-40ba-acd0-d53d5df11235", "reference": "", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-12-12T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-12-12T00:00:00", "totalAmount": 25.44}}], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78", "metadata": {"isDeleted": false}} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billCreditNoteId: "" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + get-create-update-billCreditNote-model: + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Accounts Payable Credit Note", "description": "A bill credit note can be thought of as a voucher issued by a supplier. It can be applied against one or multiple bills to reduce their balance.", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the credit note has been issued by", "required": true}, "status": {"type": "String", "displayName": "Credit Note Status", "description": "The current state of a credit note", "required": true, "options": [{"value": "Draft", "type": "Array", "displayName": "Draft", "required": false}, {"value": "Submitted", "type": "Array", "displayName": "Submitted", "required": false}, {"value": "Void", "type": "Array", "displayName": "Void", "required": false}]}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the credit note was issued", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the credit note", "required": true, "validation": {"warnings": [{"field": "Currency", "details": "Must be a valid currency code"}], "information": []}}, "note": {"type": "String", "displayName": "Note", "description": "Note about the credit note", "required": true, "validation": {"warnings": [{"field": "Note", "details": "Vendor Credit Memo Number must be specified in this field"}], "information": []}}, "lineItems": {"type": "Array", "displayName": "Line items", "description": "A collection of lines that detail items related to the credit note", "required": true, "validation": {"warnings": [{"field": "LineItems", "details": "Must be positive"}], "information": []}}}} + FreeAgent: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Accounts Payable Credit Note", "description": "A bill credit note can be thought of as a voucher issued by a supplier. It can be applied against one or multiple bills to reduce their balance.", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the credit note has been issued by", "required": true}, "billCreditNoteNumber": {"type": "String", "displayName": "Credit Note Number", "description": "User friendly reference for the credit note", "required": true}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the credit note was issued", "required": true}, "allocatedOnDate": {"type": "DateTime", "displayName": "Allocated On Date", "description": "The date the credit note was allocated", "required": true}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the credit note, inclusive of discounts and tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Must be greater than 0 and must be equal to the sum of the line item total amounts."}], "information": []}}, "totalTaxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The amount of tax for the credit note", "required": true, "validation": {"warnings": [{"field": "TotalTaxAmount", "details": "Must be greater than 0 and must be equal to the sum of the line item tax amounts."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the credit note", "required": false, "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}], "validation": {"warnings": [], "information": [{"field": "Currency", "details": "If not specified, defaults to the company's native currency"}]}}, "lineItems": {"type": "Array", "displayName": "Line items", "description": "A collection of lines that detail items related to the credit note", "required": true, "validation": {"warnings": [{"field": "LineItems", "details": "Up to a maximum of 40 line items may be specified"}], "information": []}}}} + MYOB AccountRight and Essentials: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Accounts Payable Credit Note", "description": "A bill credit note can be thought of as a voucher issued by a supplier. It can be applied against one or multiple bills to reduce their balance.", "required": true, "properties": {"totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the credit note, inclusive of discounts and tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Precision must be maximum of two decimal places."}, {"field": "TotalAmount", "details": "Must be greater than zero."}], "information": [{"field": "TotalAmount", "details": "Must be provided."}]}}, "totalDiscount": {"type": "Number", "displayName": "Discount Amount", "description": "The value, in the given credit note currency, of any discounts applied", "required": false, "validation": {"warnings": [{"field": "TotalDiscount", "details": "Precision must be maximum of two decimal places."}], "information": []}}, "subTotal": {"type": "Number", "displayName": "Sub Total Amount", "description": "The amount of the credit note, inclusive of discounts but exclusive of tax", "required": false, "validation": {"warnings": [{"field": "SubTotal", "details": "Precision must be maximum of two decimal places."}], "information": []}}, "totalTaxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The amount of tax for the credit note", "required": false, "validation": {"warnings": [{"field": "TotalTaxAmount", "details": "Precision must be maximum of two decimal places."}], "information": []}}, "remainingCredit": {"type": "Number", "displayName": "Remaining Credit", "description": "Unused balance of total amount originally raised", "required": false, "validation": {"warnings": [{"field": "RemainingCredit", "details": "Precision must be maximum of two decimal places."}], "information": []}}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the credit note was issued", "required": true, "validation": {"warnings": [], "information": [{"field": "IssueDate", "details": "Must be provided."}]}}, "supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the credit note has been issued by", "required": true, "validation": {"warnings": [], "information": [{"field": "SupplierRef", "details": "Must be provided."}]}}, "lineItems": {"type": "Array", "displayName": "Line items", "description": "A collection of lines that detail items related to the credit note", "required": true, "validation": {"warnings": [], "information": [{"field": "LineItems", "details": "Must be provided."}]}}}} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Accounts Payable Credit Note", "description": "A bill credit note can be thought of as a voucher issued by a supplier. It can be applied against one or multiple bills to reduce their balance.", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the credit note has been issued by", "required": true}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the credit note was issued", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the credit note", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "Note about the credit note", "required": false}, "status": {"type": "String", "displayName": "Credit Note Status", "description": "The current state of a credit note", "required": true, "options": [{"value": "Submitted", "type": "String", "displayName": "Submitted", "required": false}]}, "lineItems": {"type": "Array", "displayName": "Line items", "description": "A collection of lines that detail items related to the credit note", "required": true}}} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Accounts Payable Credit Note", "description": "A bill credit note can be thought of as a voucher issued by a supplier. It can be applied against one or multiple bills to reduce their balance.", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the credit note has been issued by", "required": true}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the credit note was issued", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the credit note", "required": false, "validation": {"warnings": [{"field": "Currency", "details": "Must be a three letter ISO code that matches the currency of the supplier."}, {"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 default currency of the supplier."}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the credit note and the base currency of the company", "required": false, "validation": {"warnings": [], "information": [{"field": "CurrencyRate", "details": "If not set, will default to the rate set within QuickBooks Desktop, if no rate is set in QuickBooks Desktop, it will default to 1."}, {"field": "CurrencyRate", "details": "Can only be set if the Quickbooks Desktop company has Multicurrency enabled."}]}}, "totalTaxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The amount of tax for the credit note", "required": true, "validation": {"warnings": [{"field": "TotalTaxAmount", "details": "Cannot be mapped directly into QuickBooks Desktop and will only be used for validation purposes"}, {"field": "TotalTaxAmount", "details": "Must match sum of total of tax from the line items"}], "information": []}}, "subTotal": {"type": "Number", "displayName": "Sub Total Amount", "description": "The amount of the credit note, inclusive of discounts but exclusive of tax", "required": true, "validation": {"warnings": [{"field": "SubTotal", "details": "Must match the totalAmount - taxAmount"}], "information": []}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the credit note, inclusive of discounts and tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Must match the sum of line items ((quantity * unit price) - discount + tax)"}], "information": [{"field": "TotalAmount", "details": "If a bill credit note is pushed with a total amount of 0, it will automatically be marked as paid in QuickBooks Desktop"}]}}, "note": {"type": "String", "displayName": "Note", "description": "Note about the credit note", "required": false, "validation": {"warnings": [{"field": "Note", "details": "Max length of 4000 characters."}], "information": []}}, "status": {"type": "String", "displayName": "Credit Note Status", "description": "The current state of a credit note", "required": true, "options": [{"value": "Submitted", "type": "String", "displayName": "Submitted", "required": false}, {"value": "Paid", "type": "String", "displayName": "Paid", "required": false}, {"value": "Void", "type": "String", "displayName": "Void", "required": false}], "validation": {"warnings": [{"field": "Status", "details": "If a bill credit note is pushed with a total amount of 0, then the status must be Paid or Void"}], "information": [{"field": "Status", "details": "If a bill credit note is pushed with a status of void, then all the amounts in the bill credit note must be 0"}, {"field": "Status", "details": "If a bill credit note is pushed without payment allocations, then the status must be Submitted, if pushed with payment allocations, then the status must be paid"}]}}, "lineItems": {"type": "Array", "displayName": "Line items", "description": "A collection of lines that detail items related to the credit note", "required": true}, "paymentAllocations": {"type": "Array", "displayName": "Payment Allocations", "description": "A collection of payments that are allocated to (i.e. spend) the credit note", "required": false, "validation": {"warnings": [{"field": "PaymentAllocations", "details": "A maximum of one payment allocation may be provided per bill credit note"}], "information": [{"field": "PaymentAllocations", "details": "If a payment allocation is provided, a credit card credit will created in QuickBooksDesktop, if left as null or empty, a {topLevelItem} will be created"}]}}}} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Accounts Payable Credit Note", "description": "A bill credit note can be thought of as a voucher issued by a supplier. It can be applied against one or multiple bills to reduce their balance.", "required": true, "properties": {"billCreditNoteNumber": {"type": "String", "displayName": "Credit Note Number", "description": "User friendly reference for the credit note", "required": false}, "supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the credit note has been issued by", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the credit note", "required": false, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Required if multi-currency is enabled for the company."}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the credit note and the base currency of the company", "required": false, "validation": {"warnings": [], "information": [{"field": "CurrencyRate", "details": "Required if Currency is not the base currency."}]}}, "note": {"type": "String", "displayName": "Note", "description": "Note about the credit note", "required": false}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the credit note was issued", "required": false, "validation": {"warnings": [], "information": [{"field": "IssueDate", "details": "If the issue date is not supplied, the current date on the server is used"}]}}, "status": {"type": "String", "displayName": "Credit Note Status", "description": "The current state of a credit note", "required": true, "options": [{"value": "Submitted", "type": "String", "displayName": "Submitted", "required": false}, {"value": "Paid", "type": "String", "displayName": "Paid", "required": false}]}, "lineItems": {"type": "Array", "displayName": "Line items", "description": "A collection of lines that detail items related to the credit note", "required": true}, "paymentAllocations": {"type": "Array", "displayName": "Payment Allocations", "description": "A collection of payments that are allocated to (i.e. spend) the credit note", "required": false, "validation": {"warnings": [{"field": "PaymentAllocations", "details": "Payment Allocations are no longer valid for BillCreditNotes and must not be provided, use the DirectCost data type to push credit card credits."}], "information": []}}}} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Accounts Payable Credit Note", "description": "A bill credit note can be thought of as a voucher issued by a supplier. It can be applied against one or multiple bills to reduce their balance.", "required": true, "properties": {"billCreditNoteNumber": {"type": "String", "displayName": "Credit Note Number", "description": "User friendly reference for the credit note", "required": false}, "supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the credit note has been issued by", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the credit note", "required": false, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Required if multi-currency is enabled for the company."}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the credit note and the base currency of the company", "required": false, "validation": {"warnings": [], "information": [{"field": "CurrencyRate", "details": "Required if Currency is not the base currency."}]}}, "note": {"type": "String", "displayName": "Note", "description": "Note about the credit note", "required": false}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the credit note was issued", "required": false, "validation": {"warnings": [], "information": [{"field": "IssueDate", "details": "If the issue date is not supplied, the current date on the server is used"}]}}, "status": {"type": "String", "displayName": "Credit Note Status", "description": "The current state of a credit note", "required": true, "options": [{"value": "Submitted", "type": "String", "displayName": "Submitted", "required": false}, {"value": "Paid", "type": "String", "displayName": "Paid", "required": false}]}, "lineItems": {"type": "Array", "displayName": "Line items", "description": "A collection of lines that detail items related to the credit note", "required": true}, "paymentAllocations": {"type": "Array", "displayName": "Payment Allocations", "description": "A collection of payments that are allocated to (i.e. spend) the credit note", "required": false, "validation": {"warnings": [{"field": "PaymentAllocations", "details": "Payment Allocations are no longer valid for BillCreditNotes and must not be provided, use the DirectCost data type to push credit card credits."}], "information": []}}}} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Accounts Payable Credit Note", "description": "A bill credit note can be thought of as a voucher issued by a supplier. It can be applied against one or multiple bills to reduce their balance.", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier", "description": "Supplier providing the bill credit note.", "required": true}, "issueDate": {"type": "DateTime", "displayName": "Date", "description": "Date when the bill credit note was issued.", "required": true}, "billCreditNoteNumber": {"type": "String", "displayName": "Bill Credit Note Number", "description": "The reference number for this bill credit note", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency in which the bill credit note is issued.", "required": true, "validation": {"warnings": [{"field": "currency", "details": "This must match the supplier's default currency."}], "information": []}}, "status": {"type": "String", "displayName": "Status", "description": "The status of the bill credit note", "required": true, "options": [{"value": "Submitted", "type": "String", "displayName": "Submitted", "required": false}]}, "note": {"type": "String", "displayName": "Note", "description": "To be used for any additional information associated with the bill credit note line item.", "required": false, "validation": {"warnings": [{"field": "note", "details": "Maximum 60 characters"}], "information": []}}, "lineItems": {"type": "Array", "displayName": "Line Items", "description": "Line items of the bill credit note.", "required": true}}, "validation": {"warnings": [], "information": [{"details": "Pushing to Sage 50 2015 (v21) or below is not supported. To enable push, please upgrade to at least Sage 50 2016 (v22) and re-sync the company."}]}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Accounts Payable Credit Note", "description": "A bill credit note can be thought of as a voucher issued by a supplier. It can be applied against one or multiple bills to reduce their balance.", "required": true, "properties": {"issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the credit note was issued", "required": true, "validation": {"warnings": [], "information": [{"field": "IssueDate", "details": "Must be provided."}]}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the credit note", "required": false, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "If supplied, must match the currency of the supplier."}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the credit note and the base currency of the company", "required": false}, "supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the credit note has been issued by", "required": true}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the credit note, inclusive of discounts and tax", "required": false, "validation": {"warnings": [], "information": [{"field": "TotalAmount", "details": "If supplied, must match the sum of all line item total amounts."}]}}, "billCreditNoteNumber": {"type": "String", "displayName": "Credit Note Number", "description": "User friendly reference for the credit note", "required": false, "validation": {"warnings": [], "information": [{"field": "BillCreditNoteNumber", "details": "Should not be longer than 25 characters."}]}}, "lineItems": {"type": "Array", "displayName": "Line items", "description": "A collection of lines that detail items related to the credit note", "required": true, "validation": {"warnings": [], "information": [{"field": "LineItems", "details": "Must be provided."}]}}}} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Accounts Payable Credit Note", "description": "A bill credit note can be thought of as a voucher issued by a supplier. It can be applied against one or multiple bills to reduce their balance.", "required": true, "properties": {"status": {"type": "String", "displayName": "Credit Note Status", "description": "The current state of a credit note", "required": false, "options": [{"value": "Draft", "type": "String", "displayName": "Draft", "required": false}, {"value": "Submitted", "type": "String", "displayName": "Submitted", "required": false}], "validation": {"warnings": [], "information": [{"field": "Status", "details": "If not specified will default to Submitted."}]}}, "supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the credit note has been issued by", "required": true}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the credit note was issued", "required": true}, "allocatedOnDate": {"type": "DateTime", "displayName": "Allocated On Date", "description": "The date the credit note was allocated", "required": false}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the credit note", "required": false, "options": [{"value": "AUD", "type": "String", "displayName": "Australian Dollar", "required": false}, {"value": "CAD", "type": "String", "displayName": "Canadian Dollar", "required": false}, {"value": "GBP", "type": "String", "displayName": "Pound Sterling", "required": false}, {"value": "USD", "type": "String", "displayName": "US Dollar", "required": false}, {"value": "ZAR", "type": "String", "displayName": "Rand", "required": false}], "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Must be provided if CurrencyRate is set."}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the credit note and the base currency of the company", "required": false}, "note": {"type": "String", "displayName": "Note", "description": "Note about the credit note", "required": false, "validation": {"warnings": [], "information": [{"field": "Note", "details": "Must contain no more than 1000 characters."}]}}, "lineItems": {"type": "Array", "displayName": "Line items", "description": "A collection of lines that detail items related to the credit note", "required": true, "validation": {"warnings": [], "information": [{"field": "LineItems", "details": "Must contain at least one line item."}]}}}} + Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Accounts Payable Credit Note", "description": "A bill credit note can be thought of as a voucher issued by a supplier. It can be applied against one or multiple bills to reduce their balance.", "required": true, "properties": {"billCreditNoteNumber": {"type": "String", "displayName": "Credit Note Number", "description": "User friendly reference for the credit note", "required": true}, "supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the credit note has been issued by", "required": true}, "withholdingTax": {"type": "Array", "displayName": "Withholding Tax", "description": "A collection of tax deductions", "required": true}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the credit note, inclusive of discounts and tax", "required": true}, "totalDiscount": {"type": "Number", "displayName": "Discount Amount", "description": "The value, in the given credit note currency, of any discounts applied", "required": true}, "subTotal": {"type": "Number", "displayName": "Sub Total Amount", "description": "The amount of the credit note, inclusive of discounts but exclusive of tax", "required": true}, "totalTaxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The amount of tax for the credit note", "required": true}, "discountPercentage": {"type": "Number", "displayName": "Discount Percentage", "description": "The percentage rate of any discount that has been applied", "required": true}, "remainingCredit": {"type": "Number", "displayName": "Remaining Credit", "description": "Unused balance of total amount originally raised", "required": true}, "status": {"type": "String", "displayName": "Credit Note Status", "description": "The current state of a credit note", "required": true}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the credit note was issued", "required": true}, "allocatedOnDate": {"type": "DateTime", "displayName": "Allocated On Date", "description": "The date the credit note was allocated", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the credit note", "required": true}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the credit note and the base currency of the company", "required": true}, "lineItems": {"type": "Array", "displayName": "Line items", "description": "A collection of lines that detail items related to the credit note", "required": true}, "paymentAllocations": {"type": "Array", "displayName": "Payment Allocations", "description": "A collection of payments that are allocated to (i.e. spend) the credit note", "required": true}, "metadata": {"type": "Object", "displayName": "Metadata", "description": "Miscellaneous data about the item", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "Note about the credit note", "required": true}}} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Accounts Payable Credit Note", "description": "A bill credit note can be thought of as a voucher issued by a supplier. It can be applied against one or multiple bills to reduce their balance.", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the credit note has been issued by", "required": true, "validation": {"warnings": [], "information": [{"field": "SupplierRef", "details": "Must be provided."}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the credit note, inclusive of discounts and tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Must be greater than zero."}], "information": [{"field": "TotalAmount", "details": "Must be provided and must equal the sum of the link items amount."}]}}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date the credit note was issued", "required": true, "validation": {"warnings": [], "information": [{"field": "IssueDate", "details": "Must be provided."}]}}, "billCreditNoteNumber": {"type": "String", "displayName": "Credit Note Number", "description": "User friendly reference for the credit note", "required": false, "validation": {"warnings": [], "information": [{"field": "BillCreditNoteNumber", "details": "Must not be longer than 225 characters long."}]}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the credit note", "required": false}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the credit note and the base currency of the company", "required": false}, "status": {"type": "String", "displayName": "Credit Note Status", "description": "The current state of a credit note", "required": true, "options": [{"value": "Draft", "type": "String", "displayName": "Draft", "required": false}, {"value": "Submitted", "type": "String", "displayName": "Submitted", "required": false}, {"value": "Paid", "type": "String", "displayName": "Paid", "required": false}], "validation": {"warnings": [], "information": [{"field": "Status", "details": "Must be provided."}]}}, "lineItems": {"type": "Array", "displayName": "Line items", "description": "A collection of lines that detail items related to the credit note", "required": true, "validation": {"warnings": [], "information": [{"field": "LineItems", "details": "Must be provided."}]}}}} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + create-bill-credit-note: + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "1509398f-98e2-436d-8a5d-c042e0c74ffc", "billCreditNoteNumber": "309", "supplierRef": {"id": "87", "supplierName": "Ankunding Inc"}, "withholdingTax": [], "totalAmount": 100, "totalDiscount": 0, "subTotal": 100, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 100, "status": "Submitted", "issueDate": "2023-04-20T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1.242097, "lineItems": [{"description": "", "unitAmount": 100, "quantity": 1, "subTotal": 100, "taxAmount": 0, "totalAmount": 100, "accountRef": {"id": "7"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"} + responses: + "200": + application/json: {"changes": [], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "1bcdd89d-c7fa-4504-a083-33b1d5e26191", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Pending", "statusCode": 339236} + "400": {} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "1509398f-98e2-436d-8a5d-c042e0c74ffc", "billCreditNoteNumber": "1234567", "supplierRef": {"id": "3a0d40a2-2698-4cf5-b7b2-30133c632ab6"}, "withholdingTax": [], "totalAmount": 25.44, "totalDiscount": 0, "subTotal": 25.44, "totalTaxAmount": 4.24, "discountPercentage": 0, "remainingCredit": 0, "status": "Submitted", "issueDate": "2023-02-09T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Refund as agreed due to window break when guard absent", "unitAmount": 21.2, "quantity": 1, "discountAmount": 0, "subTotal": 21.2, "taxAmount": 4.24, "totalAmount": 25.44, "accountRef": {"id": "f96c9458-d724-47bf-8f74-a9d5726465ce"}, "discountPercentage": 0, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "trackingCategoryRefs": []}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"} + responses: + "200": + application/json: {"changes": [], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "d0d9ea13-20e8-4504-aa8c-e67b7c49cf24", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "TimedOut", "statusCode": 738711} + "400": {} + NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "1509398f-98e2-436d-8a5d-c042e0c74ffc", "billCreditNoteNumber": "VENDCRED1987", "supplierRef": {"id": "727"}, "withholdingTax": [], "totalAmount": 10, "totalDiscount": 0, "subTotal": 10, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 0, "status": "Submitted", "issueDate": "2023-04-20T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "", "unitAmount": 10, "quantity": 1, "subTotal": 10, "totalAmount": 10, "accountRef": {"id": "714"}, "trackingCategoryRefs": [{"id": "department-4", "name": "DP Department - incl children"}], "tracking": {"categoryRefs": [{"id": "department-4", "name": "DP Department - incl children"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"} + responses: + "200": + application/json: {"changes": [], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "cfc23e7d-6f94-4157-8725-1ef092548958", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "TimedOut", "statusCode": 407833} + "400": {} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "1509398f-98e2-436d-8a5d-c042e0c74ffc", "billCreditNoteNumber": "91fe2a83-e161-4c21-929d-c5c10c4b07e5", "supplierRef": {"id": "3"}, "withholdingTax": [], "totalAmount": 360, "totalDiscount": 0, "subTotal": 300, "totalTaxAmount": 60, "discountPercentage": 0, "remainingCredit": 0, "status": "Submitted", "issueDate": "2021-09-24T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "No Description Provided", "unitAmount": 300, "quantity": 1, "subTotal": 300, "taxAmount": 60, "totalAmount": 360, "accountRef": {"id": "197", "name": "Software and Licenses"}, "taxRateRef": {"id": "81", "name": "UK Purchase Goods Standard Rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "LOCATION-15", "name": "United Kingdom"}, {"id": "SUPPLIER-3", "name": "ADP"}], "tracking": {"categoryRefs": [{"id": "LOCATION-15"}, {"id": "SUPPLIER-3", "name": "ADP"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"} + responses: + "200": + application/json: {"changes": [], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "b1b39d7e-a0de-4fed-8d06-3eda5a61a411", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "TimedOut", "statusCode": 855346} + "400": {} + MYOB: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "1509398f-98e2-436d-8a5d-c042e0c74ffc", "billCreditNoteNumber": "XYZ0012", "supplierRef": {"id": "5c0664ca-6eb1-4085-9da4-37ef748bc65e", "supplierName": "Metropolitan Electricity"}, "withholdingTax": [], "totalAmount": 900, "totalDiscount": 0, "subTotal": 1000, "totalTaxAmount": 100, "discountPercentage": 0, "remainingCredit": 0, "status": "Submitted", "issueDate": "2023-04-20T00:00:00", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "AUD", "lineItems": [{"description": "Credit note for incorrect bill", "unitAmount": 900, "quantity": 1, "subTotal": 900, "taxAmount": 100, "totalAmount": 900, "accountRef": {"id": "f04d046b-0137-4d95-8af7-ed9fef1a4ba3"}, "taxRateRef": {"id": "ff083e95-de4e-4c56-87dd-32ad9cdac172", "name": "Capital Acquisitions", "effectiveTaxRate": 10}}], "paymentAllocations": [], "createdFromRefs": [], "note": "Bill Credit Note with 1 line items, totaling 805.78"} + responses: + "200": + application/json: {"changes": [], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "9e403c67-bcfa-4d73-9944-d9843739487b", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Success", "statusCode": 117747} + "400": {} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "6a0e9dfb-87b0-47d3-aaaf-9753ae9e757d", "billCreditNoteNumber": "14763237", "supplierRef": {"id": "67C6A7A1-5E84-4AC4-B950-24A114E379D0", "supplierName": "Chin's Gas and Oil"}, "totalAmount": 693, "totalDiscount": 0, "subTotal": 805.78, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 693, "status": "Submitted", "issueDate": "2019-02-18T16:03:07.268Z", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "USD", "lineItems": [{"description": "AcmeMagnet", "unitAmount": 25, "quantity": 4, "discountAmount": 0, "subTotal": 100, "taxAmount": 10, "totalAmount": 110, "accountRef": {"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"}, "itemRef": {"id": "3"}, "trackingCategoryRefs": [{"id": "department_1", "name": "ACMERockets"}, {"id": "costcode_2", "name": "ACM2-ACMESigns"}]}, {"description": "ACMEDisintegratingPistol", "unitAmount": 25, "quantity": 3, "discountAmount": 0, "subTotal": 75, "taxAmount": 7.5, "totalAmount": 82.5, "accountRef": {"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"}, "itemRef": {"id": "3abf0883-03f7-44c6-bc15-1372522d25e1"}}, {"description": "ACMEWhippedCreamDispenser", "unitAmount": 52, "quantity": 6, "discountAmount": 0, "subTotal": 312, "taxAmount": 31.2, "totalAmount": 343.2, "accountRef": {"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"}, "itemRef": {"id": "3691f3d9-0ff7-4358-8a93-bed31c1b4b03"}}, {"description": "ACMEJetPropelledPogoStick", "unitAmount": 130, "quantity": 1, "discountAmount": 0, "subTotal": 130, "taxAmount": 27.3, "totalAmount": 157.3, "accountRef": {"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"}, "taxRateRef": {"id": "d606732b-db18-44d7-823b-7f15f42c32ea"}, "itemRef": {"id": "075410d4-7edc-4936-ba52-9e1e43cbe300"}}], "paymentAllocations": [], "createdFromRefs": [], "note": "Track separately"} + responses: + "400": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + update-bill-credit-note: + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + billCreditNoteId: "" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "6a0e9dfb-87b0-47d3-aaaf-9753ae9e757d", "billCreditNoteNumber": "14763237", "supplierRef": {"id": "67C6A7A1-5E84-4AC4-B950-24A114E379D0", "supplierName": "Chin's Gas and Oil"}, "totalAmount": 693, "totalDiscount": 0, "subTotal": 805.78, "totalTaxAmount": 0, "discountPercentage": 0, "remainingCredit": 693, "status": "Submitted", "issueDate": "2019-02-18T16:03:07.268Z", "allocatedOnDate": "2022-10-23T00:00:00Z", "currency": "USD", "lineItems": [{"description": "AcmeMagnet", "unitAmount": 25, "quantity": 4, "discountAmount": 0, "subTotal": 100, "taxAmount": 10, "totalAmount": 110, "accountRef": {"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"}, "itemRef": {"id": "3"}, "trackingCategoryRefs": [{"id": "department_1", "name": "ACMERockets"}, {"id": "costcode_2", "name": "ACM2-ACMESigns"}]}, {"description": "ACMEDisintegratingPistol", "unitAmount": 25, "quantity": 3, "discountAmount": 0, "subTotal": 75, "taxAmount": 7.5, "totalAmount": 82.5, "accountRef": {"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"}, "itemRef": {"id": "3abf0883-03f7-44c6-bc15-1372522d25e1"}}, {"description": "ACMEWhippedCreamDispenser", "unitAmount": 52, "quantity": 6, "discountAmount": 0, "subTotal": 312, "taxAmount": 31.2, "totalAmount": 343.2, "accountRef": {"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"}, "itemRef": {"id": "3691f3d9-0ff7-4358-8a93-bed31c1b4b03"}}, {"description": "ACMEJetPropelledPogoStick", "unitAmount": 130, "quantity": 1, "discountAmount": 0, "subTotal": 130, "taxAmount": 27.3, "totalAmount": 157.3, "accountRef": {"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"}, "taxRateRef": {"id": "d606732b-db18-44d7-823b-7f15f42c32ea"}, "itemRef": {"id": "075410d4-7edc-4936-ba52-9e1e43cbe300"}}], "paymentAllocations": [], "createdFromRefs": [], "note": "Track separately"} + responses: + "400": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + list-bill-payments: + "": + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "3d5a8e00-d108-4045-8823-7f342676cffa", "totalAmount": 1000, "currency": "USD", "date": "2022-10-23T00:00:00Z", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 1000, "links": [{"type": "Bill", "id": "x", "amount": -1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]}, {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "3d5a8e00-d108-4045-8823-7f342676cffa", "totalAmount": 0, "currency": "USD", "date": "2022-10-23T00:00:00Z", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 0, "links": [{"type": "Bill", "id": "x", "amount": -1000}, {"type": "CreditNote", "id": "y", "amount": 1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]}, {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "3d5a8e00-d108-4045-8823-7f342676cffa", "totalAmount": 2000, "currency": "USD", "date": "2022-10-23T00:00:00Z", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 1000, "links": [{"type": "Bill", "id": "x", "amount": -1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 1000, "links": [{"type": "PaymentOnAccount", "id": "y", "amount": -1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]}, {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "3d5a8e00-d108-4045-8823-7f342676cffa", "totalAmount": -1000, "currency": "EUR", "date": "2022-10-23T00:00:00Z", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": -1000, "links": [{"type": "CreditNote", "id": "y", "amount": 1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]}, {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "3d5a8e00-d108-4045-8823-7f342676cffa", "totalAmount": -1000, "currency": "USD", "date": "2022-10-23T00:00:00Z", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": -1000, "links": [{"type": "PaymentOnAccount", "id": "y", "amount": 1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]}, {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "3d5a8e00-d108-4045-8823-7f342676cffa", "totalAmount": 250, "currency": "USD", "date": "2022-10-23T00:00:00Z", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 0, "links": [{"type": "Bill", "id": "x", "amount": -750}, {"type": "CreditNote", "id": "y", "amount": 750}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 250, "links": [{"type": "Bill", "id": "x", "amount": -250}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]}, {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "3d5a8e00-d108-4045-8823-7f342676cffa", "totalAmount": 1000, "currency": "GBP", "date": "2022-10-23T00:00:00Z", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 1000, "links": [{"type": "Bill", "id": "x", "amount": -1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]}, {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "3d5a8e00-d108-4045-8823-7f342676cffa", "totalAmount": 2000, "currency": "GBP", "date": "2022-10-23T00:00:00Z", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 0, "links": [{"type": "Bill", "id": "x", "amount": -1000}, {"type": "CreditNote", "id": "y", "amount": 1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 0, "links": [{"type": "Bill", "id": "x", "amount": -1000}, {"type": "CreditNote", "id": "z", "amount": 1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 1000, "links": [{"type": "Bill", "id": "x", "amount": -1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 1000, "links": [{"type": "PaymentOnAccount", "id": "customer-001", "amount": -1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]}, {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "3d5a8e00-d108-4045-8823-7f342676cffa", "totalAmount": 0, "currency": "GBP", "date": "2022-10-23T00:00:00Z", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 0, "links": [{"type": "Bill", "id": "w", "amount": -1000}, {"type": "Bill", "id": "x", "amount": -1000}, {"type": "CreditNote", "id": "y", "amount": 1000}, {"type": "CreditNote", "id": "z", "amount": 1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]}, {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "3d5a8e00-d108-4045-8823-7f342676cffa", "totalAmount": 1000, "currency": "GBP", "date": "2022-10-23T00:00:00Z", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 1000, "links": [{"type": "Bill", "id": "x", "amount": -1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]}, {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "001", "totalAmount": 5000, "currency": "GBP", "date": "1901-01-01", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 1000, "links": [{"type": "Bill", "id": "x", "amount": -1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 4000, "links": [{"type": "PaymentOnAccount", "id": "y", "amount": -4000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]}, {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "001", "totalAmount": 5000, "currency": "USD", "date": "1901-01-01", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 1000, "links": [{"type": "Bill", "id": "x", "amount": -1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 1000, "links": [{"type": "Bill", "id": "y", "amount": -1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 3000, "links": [{"type": "PaymentOnAccount", "id": "y", "amount": -3000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]}, {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "3d5a8e00-d108-4045-8823-7f342676cffa", "totalAmount": 500, "currency": "GBP", "date": "2022-10-23T00:00:00Z", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 500, "links": [{"type": "Bill", "id": "a", "amount": -1000}, {"type": "Bill", "id": "b", "amount": -1000}, {"type": "CreditNote", "id": "y", "amount": 750}, {"type": "CreditNote", "id": "z", "amount": 750}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]}], "pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} + "400": {} + Clear Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "2022-05-06T00:00:00", "id": "dcb18480-8b69-44d8-aa26-268b6a80d170", "supplierRef": {"id": "8GeHBdBZiZ", "supplierName": "DuBuque, Goyette and Franecki"}, "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "totalAmount": 71351.42, "currency": "GBP", "currencyRate": 1, "date": "2022-05-06T00:00:00", "note": "Bill Payment against bill 81539597-e681-40c9-a4dd-ec2fffcde572", "paymentMethodRef": {"id": "cb4a5647-aa86-40ab-bb4f-158acaa99c12", "name": "Check payments-u4p"}, "lines": [{"amount": 71351.42, "links": [{"type": "Bill", "id": "81539597-e681-40c9-a4dd-ec2fffcde572", "amount": -71351.42, "currencyRate": 1}], "allocatedOnDate": "2022-05-06T00:00:00"}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "2022-05-14T13:12:00", "id": "ca0976d0-036d-4187-ab66-7169286b007d", "supplierRef": {"id": "9efd64dc-4b31-425d-9eb2-7c7773593713", "supplierName": "Jacobson, Konopelski and Heidenreich"}, "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "totalAmount": 16221.64, "currency": "GBP", "currencyRate": 1, "date": "2022-05-14T13:12:00", "note": "Bill Payment against bill 3f44d2be-d4c2-4cc3-8216-8add5265eb13", "paymentMethodRef": {"id": "fc87fba8-812e-4a54-b633-29ef2abf4c12", "name": "CreditCard payments-u4p"}, "lines": [{"amount": 16221.64, "links": [{"type": "Bill", "id": "3f44d2be-d4c2-4cc3-8216-8add5265eb13", "amount": -16221.64, "currencyRate": 1}], "allocatedOnDate": "2022-05-14T13:12:00"}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 232, "_links": {"self": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/billPayments"}, "current": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/billPayments?page=2&pageSize=2"}}} + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "19387f05-8ad1-ea11-bbaa-000d3a2b9185", "supplierRef": {"id": "c41217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "Wide World Importers"}, "accountRef": {"id": "621217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Petty Cash"}, "totalAmount": 234, "currency": "GBP", "currencyRate": 1, "date": "2019-01-01T00:00:00", "note": "Invoice 107006", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 234, "links": [{"type": "Bill", "id": "c8cb06bf-89d1-ea11-bbaa-000d3a2b9185-108006", "amount": -234, "currencyRate": 1}], "allocatedOnDate": "2019-01-01T00:00:00"}], "reference": "108006", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "3d387f05-8ad1-ea11-bbaa-000d3a2b9185", "supplierRef": {"id": "be1217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "Fabrikam, Inc."}, "accountRef": {"id": "621217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Petty Cash"}, "totalAmount": 390, "currency": "GBP", "currencyRate": 1, "date": "2019-01-01T00:00:00", "note": "Invoice 107007", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 390, "links": [{"type": "Bill", "id": "cbcb06bf-89d1-ea11-bbaa-000d3a2b9185-108007", "amount": -390, "currencyRate": 1}], "allocatedOnDate": "2019-01-01T00:00:00"}], "reference": "108007", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 236, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/billPayments"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/billPayments?page=2&pageSize=2"}}} + Exact (Netherlands): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-26T13:35:13Z", "sourceModifiedDate": "2019-11-05T14:26:22Z", "id": "da7e456f-76f7-42ac-8dad-d90a040f3afb", "supplierRef": {"id": "63fadca8-4905-475a-b32a-b4341293bcf4", "supplierName": "Kelly's Industrial Supplies"}, "accountRef": {"id": "d79d65bd-1d7d-4f55-95d3-76b3a7b7b823", "name": "Bank 1"}, "totalAmount": -5, "currency": "EUR", "currencyRate": 1, "date": "2019-11-05T00:00:00Z", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": -5, "links": [{"type": "PaymentOnAccount", "id": "63fadca8-4905-475a-b32a-b4341293bcf4", "amount": 5, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "19200008"}, {"modifiedDate": "2022-10-26T13:35:14Z", "sourceModifiedDate": "2021-11-17T12:08:10Z", "id": "002b8462-f3a3-4019-84fe-6a2af1f30c5a", "supplierRef": {"id": "5811b467-53eb-4491-8ca1-bc9b7889811b", "supplierName": "Ann's test supplier 2"}, "accountRef": {"id": "1879b322-7758-4e20-8f3f-701df27f2340", "name": "Kas"}, "totalAmount": 0.13, "currency": "EUR", "currencyRate": 1, "date": "2019-11-07T00:00:00Z", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": -0.12, "links": [{"type": "CreditNote", "id": "33f3016c-2ecf-4d17-911e-b385537e7341", "amount": 0.12, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 0.12, "links": [{"type": "Bill", "id": "de6b3634-faf2-4688-b06b-72ed3ca6cf4e", "amount": -0.12, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 0.13, "links": [{"type": "Bill", "id": "de6b3634-faf2-4688-b06b-72ed3ca6cf4e", "amount": -0.13, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "19100002"}], "pageNumber": 1, "pageSize": 2, "totalResults": 1173, "_links": {"self": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/billPayments"}, "current": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/billPayments?page=2&pageSize=2"}}} + Exact (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-26T13:33:17Z", "sourceModifiedDate": "2017-10-11T10:12:29Z", "id": "7a5f621b-739f-4ed8-b738-2aae3ef886ac", "supplierRef": {"id": "a7cad20d-44db-442b-ac1f-90475802d6fb", "supplierName": "Pencils Pencils Pencils"}, "accountRef": {"id": "4a4e34b5-7f62-4b64-a44a-073398b14b41", "name": "Bank"}, "totalAmount": 123, "currency": "GBP", "currencyRate": 1, "date": "2017-10-11T00:00:00Z", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 123, "links": [{"type": "Bill", "id": "e7a45898-2db3-424c-acb9-a51647740f26", "amount": -123, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "17200006"}, {"modifiedDate": "2022-10-26T13:33:17Z", "sourceModifiedDate": "2019-02-14T17:56:54Z", "id": "b358df76-3930-42ad-8f38-78edcc60172d", "supplierRef": {"id": "41302634-76b5-4442-b800-0bb63780e77c", "supplierName": "Some Supplier"}, "accountRef": {"id": "4a4e34b5-7f62-4b64-a44a-073398b14b41", "name": "Bank"}, "totalAmount": 55000, "currency": "GBP", "currencyRate": 1, "date": "2017-10-31T00:00:00Z", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 55000, "links": [{"type": "PaymentOnAccount", "id": "41302634-76b5-4442-b800-0bb63780e77c", "amount": -55000, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "17200001"}], "pageNumber": 1, "pageSize": 2, "totalResults": 39, "_links": {"self": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/billPayments"}, "current": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/billPayments?page=2&pageSize=2"}}} + FreeAgent: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-25T14:21:36Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "135234103", "supplierRef": {"id": "7169654", "supplierName": "The Eagle"}, "totalAmount": 14.3, "currency": "GBP", "date": "2017-11-23T00:00:00", "note": "ATOMIC SOFTWARE LIMITE WELLINGTON,NZL OTHER �14.30 - Bill payment against Pints1 (The Eagle)", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 14.3, "links": [{"type": "Bill", "id": "10659723", "amount": -14.3, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:21:36Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "168350314", "supplierRef": {"id": "6161941", "supplierName": "A & J Fabtech Ltd"}, "totalAmount": 30, "currency": "GBP", "date": "2019-01-03T00:00:00", "note": "�30.00 - Bill payment against Test123 (A & J Fabtech Ltd)", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 30, "links": [{"type": "Bill", "id": "11224800", "amount": -30, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 89, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/billPayments"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/billPayments?page=2&pageSize=2"}}} + FreshBooks: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "16", "supplierRef": {"id": "29"}, "accountRef": {"id": "167679", "name": "Cash"}, "totalAmount": 10, "currency": "GBP", "date": "2021-08-18T00:00:00", "note": "Bill payment", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 10, "links": [{"type": "Bill", "id": "16", "amount": -10, "currencyRate": 1}], "allocatedOnDate": "2021-08-18T00:00:00"}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "18", "supplierRef": {"id": "39"}, "accountRef": {"id": "167679", "name": "Cash"}, "totalAmount": 15, "currency": "USD", "date": "2021-08-18T00:00:00", "note": "Bill payment Ikea", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 15, "links": [{"type": "Bill", "id": "18", "amount": -15, "currencyRate": 1}], "allocatedOnDate": "2021-08-18T00:00:00"}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 26, "_links": {"self": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/billPayments"}, "current": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/billPayments?page=2&pageSize=2"}}} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-01-30T14:48:40Z", "sourceModifiedDate": "2021-03-26T10:31:06", "id": "112", "supplierRef": {"id": "724", "supplierName": "Vendor A.A.A"}, "accountRef": {"id": "825", "name": "Codat Europe Bank"}, "totalAmount": 120, "currency": "GBP", "currencyRate": 1, "date": "2021-03-26T00:00:00", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 120, "links": [{"type": "Bill", "id": "7", "amount": -120, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "Bill Payment #1"}, {"modifiedDate": "2023-01-30T14:48:40Z", "sourceModifiedDate": "2022-07-11T09:41:02", "id": "159623-724", "supplierRef": {"id": "724", "supplierName": "Vendor A.A.A"}, "accountRef": {"id": "825", "name": "Codat Europe Bank"}, "totalAmount": -555.55, "currency": "GBP", "currencyRate": 1, "date": "2022-07-11T00:00:00", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": -555.55, "links": [{"type": "PaymentOnAccount", "id": "724", "amount": 555.55, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "Deposit #DEP25"}], "pageNumber": 1, "pageSize": 2, "totalResults": 3, "_links": {"self": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/billPayments"}, "current": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/billPayments?page=2&pageSize=2"}}} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T09:09:20Z", "sourceModifiedDate": "2023-12-16T05:04:58", "id": "3A09-1071529982", "supplierRef": {"id": "720000-1071512482", "supplierName": "Bayshore Auto Mall"}, "accountRef": {"id": "20000-933270541", "name": "Checking"}, "totalAmount": 532.97, "currency": "GBP", "currencyRate": 1, "date": "2023-01-11T00:00:00", "note": "Monthly Truck Payment", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 532.97, "links": [{"type": "Bill", "id": "38AA-1071513625", "amount": -532.97, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "101", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:09:20Z", "sourceModifiedDate": "2023-12-16T05:06:15", "id": "84C2-1197705262", "supplierRef": {"id": "B0000-933272656", "supplierName": "Patton Hardware Supplies"}, "accountRef": {"id": "8000007E-1197732180", "name": "CalOil Credit Card"}, "totalAmount": 4050.98, "currency": "GBP", "currencyRate": 1, "date": "2023-01-15T00:00:00", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 4050.98, "links": [{"type": "Bill", "id": "84C2-1197705262", "amount": -4050.98, "currencyRate": 1}], "allocatedOnDate": "2023-01-15T00:00:00"}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 214, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/billPayments"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/billPayments?page=2&pageSize=2"}}} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-01-18T11:02:47Z", "sourceModifiedDate": "2019-05-13T13:14:26Z", "id": "20", "supplierRef": {"id": "4", "supplierName": "BILLy elliot"}, "totalAmount": 0, "currency": "GBP", "currencyRate": 1, "date": "2019-05-13T00:00:00", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 0, "links": [{"type": "Bill", "id": "18", "amount": -5, "currencyRate": 1}, {"type": "CreditNote", "id": "19", "amount": 5, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]}, {"modifiedDate": "2023-01-18T11:02:47Z", "sourceModifiedDate": "2019-05-31T12:55:10Z", "id": "25", "supplierRef": {"id": "5", "supplierName": "Callum McGinley"}, "accountRef": {"id": "63", "name": "Business Bank Account"}, "totalAmount": 5999.99, "currency": "GBP", "currencyRate": 1, "date": "2019-05-31T00:00:00", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 5999.99, "links": [{"type": "Bill", "id": "24", "amount": -5999.99, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 126, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/billPayments"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/billPayments?page=2&pageSize=2"}}} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T09:36:42Z", "sourceModifiedDate": "2016-09-13T21:19:36Z", "id": "158", "supplierRef": {"id": "57", "supplierName": "Hall's Promo Items"}, "accountRef": {"id": "81", "name": "Current"}, "totalAmount": 7940.6, "currency": "HKD", "currencyRate": 0.078807, "date": "2016-01-23T00:00:00", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 7940.6, "links": [{"type": "Bill", "id": "157", "amount": -7940.6, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "1067", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:36:42Z", "sourceModifiedDate": "2016-09-13T21:19:49Z", "id": "159", "supplierRef": {"id": "57", "supplierName": "Hall's Promo Items"}, "accountRef": {"id": "81", "name": "Current"}, "totalAmount": 742.5, "currency": "HKD", "currencyRate": 0.078807, "date": "2016-01-23T00:00:00", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 742.5, "links": [{"type": "Bill", "id": "28", "amount": -742.5, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "1068", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 191, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/billPayments"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/billPayments?page=2&pageSize=2"}}} + Sage 200cloud: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-14T09:35:54Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45462", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "totalAmount": 27, "currency": "GBP", "currencyRate": 1, "date": "2020-01-05T00:00:00Z", "note": "", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 27, "links": [{"type": "PaymentOnAccount", "id": "CON001", "amount": -27, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "Payment invoice 1"}, {"modifiedDate": "2022-10-14T09:35:54Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45502", "supplierRef": {"id": "SDE001", "supplierName": "S D Enterprises"}, "totalAmount": 59, "currency": "GBP", "currencyRate": 1, "date": "2020-01-17T00:00:00Z", "note": "pay3", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 59, "links": [{"type": "PaymentOnAccount", "id": "SDE001", "amount": -59, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "payment inv3"}], "pageNumber": 1, "pageSize": 2, "totalResults": 64, "_links": {"self": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/billPayments"}, "current": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/billPayments?page=2&pageSize=2"}}} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "255", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "totalAmount": 370.71, "currency": "GBP", "currencyRate": 1, "date": "2022-01-29T00:00:00", "note": "Purchase payment 255 linked to, purchase invoice 86, purchase invoice 87, purchase invoice 250, purchase invoice 251, purchase invoice 252.", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 117.5, "links": [{"type": "Bill", "id": "86", "amount": -117.5, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 64.63, "links": [{"type": "Bill", "id": "87", "amount": -64.63, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 50.57, "links": [{"type": "Bill", "id": "250", "amount": -50.57, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 36.87, "links": [{"type": "Bill", "id": "251", "amount": -36.87, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 101.14, "links": [{"type": "Bill", "id": "252", "amount": -101.14, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "256", "supplierRef": {"id": "QUA001", "supplierName": "Quality Motors"}, "totalAmount": 256.36, "currency": "GBP", "currencyRate": 1, "date": "2022-01-29T00:00:00", "note": "Purchase payment 256 linked to, purchase invoice 17.", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 256.36, "links": [{"type": "Bill", "id": "17", "amount": -256.36, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 27, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/billPayments"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/billPayments?page=2&pageSize=2"}}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-24T14:54:04Z", "sourceModifiedDate": "2019-11-20T09:30:03Z", "id": "d953b45e156011e8b45c025132dab352", "supplierRef": {"id": "ca430e0d156011e8b45c025132dab352", "supplierName": "Test Supplier"}, "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "totalAmount": 52.02, "currency": "GBP", "currencyRate": 1, "date": "2018-02-15T00:00:00", "note": "Supplier payment using credit/debit card - Cool stuff", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 52.02, "links": [{"type": "PaymentOnAccount", "id": "ca430e0d156011e8b45c025132dab352", "amount": -52.02, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]}, {"modifiedDate": "2022-10-24T14:54:04Z", "sourceModifiedDate": "2018-03-06T17:13:17Z", "id": "a99b9aae216111e8b45c025132dab352", "supplierRef": {"id": "ca430e0d156011e8b45c025132dab352", "supplierName": "Test Supplier"}, "accountRef": {"id": "9a3e4bc6267a11e797950a57719b2edb", "name": "Cash"}, "totalAmount": 52.02, "currency": "GBP", "currencyRate": 1, "date": "2018-03-06T00:00:00", "note": "Supplier payment using cash", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 52.02, "links": [{"type": "PaymentOnAccount", "id": "ca430e0d156011e8b45c025132dab352", "amount": -52.02, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 2225, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/billPayments"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/billPayments?page=2&pageSize=2"}}} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-04T16:32:13Z", "sourceModifiedDate": "2022-02-23T12:03:30", "id": "4471", "supplierRef": {"id": "3", "supplierName": "ADP"}, "accountRef": {"id": "353", "name": "Current Account"}, "totalAmount": 20, "currency": "GBP", "date": "2022-01-06T00:00:00", "note": "", "paymentMethodRef": {"id": "6", "name": "Cash"}, "lines": [{"amount": 20, "links": [{"type": "Bill", "id": "4470", "amount": -20, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-04T16:32:13Z", "sourceModifiedDate": "2022-02-23T12:06:58", "id": "4472", "supplierRef": {"id": "3", "supplierName": "ADP"}, "accountRef": {"id": "353", "name": "Current Account"}, "totalAmount": 5, "currency": "GBP", "date": "2022-01-06T00:00:00", "note": "", "paymentMethodRef": {"id": "6", "name": "Cash"}, "lines": [{"amount": 5, "links": [{"type": "Bill", "id": "4470", "amount": -5, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 2, "_links": {"self": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/billPayments"}, "current": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/billPayments?page=1&pageSize=2"}}} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-15T20:37:10Z", "sourceModifiedDate": "2021-01-02T22:51:40", "id": "74004690-82a1-4810-aaca-6ce575af94b4", "supplierRef": {"id": "1262c350-fe0f-40ec-aeff-41c95b4a45af", "supplierName": "DIISR - Small Business Services"}, "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "totalAmount": 7267.2, "currency": "GBP", "currencyRate": 1, "date": "2021-12-20T00:00:00", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 7267.2, "links": [{"type": "Bill", "id": "3945273c-cc04-479f-a4b5-1e3dc7a55ed1", "amount": -7267.2, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:37:10Z", "sourceModifiedDate": "2021-01-02T22:51:38", "id": "f2062172-b444-4c8b-b797-9f4c7a4244c7", "supplierRef": {"id": "1262c350-fe0f-40ec-aeff-41c95b4a45af", "supplierName": "DIISR - Small Business Services"}, "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "totalAmount": 7267.2, "currency": "GBP", "currencyRate": 1, "date": "2022-02-17T00:00:00", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 7267.2, "links": [{"type": "Bill", "id": "09aa506f-cb81-4cd3-a1ea-6a0b91804d5a", "amount": -7267.2, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 30, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/billPayments"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/billPayments?page=1&pageSize=2"}, "next": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/billPayments?page=2&pageSize=2"}}} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "400": + 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" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + 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} + get-bill-payments: + Clear Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billPaymentId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "2022-05-06T00:00:00", "id": "dcb18480-8b69-44d8-aa26-268b6a80d170", "supplierRef": {"id": "8GeHBdBZiZ", "supplierName": "DuBuque, Goyette and Franecki"}, "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "totalAmount": 71351.42, "currency": "GBP", "currencyRate": 1, "date": "2022-05-06T00:00:00", "note": "Bill Payment against bill 81539597-e681-40c9-a4dd-ec2fffcde572", "paymentMethodRef": {"id": "cb4a5647-aa86-40ab-bb4f-158acaa99c12", "name": "Check payments-u4p"}, "lines": [{"amount": 71351.42, "links": [{"type": "Bill", "id": "81539597-e681-40c9-a4dd-ec2fffcde572", "amount": -71351.42, "currencyRate": 1}], "allocatedOnDate": "2022-05-06T00:00:00"}], "metadata": {"isDeleted": false}} + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billPaymentId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "19387f05-8ad1-ea11-bbaa-000d3a2b9185", "supplierRef": {"id": "c41217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "Wide World Importers"}, "accountRef": {"id": "621217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Petty Cash"}, "totalAmount": 234, "currency": "GBP", "currencyRate": 1, "date": "2019-01-01T00:00:00", "note": "Invoice 107006", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 234, "links": [{"type": "Bill", "id": "c8cb06bf-89d1-ea11-bbaa-000d3a2b9185-108006", "amount": -234, "currencyRate": 1}], "allocatedOnDate": "2019-01-01T00:00:00"}], "reference": "108006", "metadata": {"isDeleted": false}} + Exact (Netherlands): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billPaymentId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-26T13:35:13Z", "sourceModifiedDate": "2019-11-05T14:26:22Z", "id": "da7e456f-76f7-42ac-8dad-d90a040f3afb", "supplierRef": {"id": "63fadca8-4905-475a-b32a-b4341293bcf4", "supplierName": "Kelly's Industrial Supplies"}, "accountRef": {"id": "d79d65bd-1d7d-4f55-95d3-76b3a7b7b823", "name": "Bank 1"}, "totalAmount": -5, "currency": "EUR", "currencyRate": 1, "date": "2019-11-05T00:00:00Z", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": -5, "links": [{"type": "PaymentOnAccount", "id": "63fadca8-4905-475a-b32a-b4341293bcf4", "amount": 5, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "19200008"} + Exact (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billPaymentId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-26T13:33:17Z", "sourceModifiedDate": "2017-10-11T10:12:29Z", "id": "7a5f621b-739f-4ed8-b738-2aae3ef886ac", "supplierRef": {"id": "a7cad20d-44db-442b-ac1f-90475802d6fb", "supplierName": "Pencils Pencils Pencils"}, "accountRef": {"id": "4a4e34b5-7f62-4b64-a44a-073398b14b41", "name": "Bank"}, "totalAmount": 123, "currency": "GBP", "currencyRate": 1, "date": "2017-10-11T00:00:00Z", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 123, "links": [{"type": "Bill", "id": "e7a45898-2db3-424c-acb9-a51647740f26", "amount": -123, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "17200006"} + FreeAgent: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billPaymentId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-25T14:21:36Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "135234103", "supplierRef": {"id": "7169654", "supplierName": "The Eagle"}, "totalAmount": 14.3, "currency": "GBP", "date": "2017-11-23T00:00:00", "note": "ATOMIC SOFTWARE LIMITE WELLINGTON,NZL OTHER �14.30 - Bill payment against Pints1 (The Eagle)", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 14.3, "links": [{"type": "Bill", "id": "10659723", "amount": -14.3, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "metadata": {"isDeleted": false}} + FreshBooks: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billPaymentId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "16", "supplierRef": {"id": "29"}, "accountRef": {"id": "167679", "name": "Cash"}, "totalAmount": 10, "currency": "GBP", "date": "2021-08-18T00:00:00", "note": "Bill payment", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 10, "links": [{"type": "Bill", "id": "16", "amount": -10, "currencyRate": 1}], "allocatedOnDate": "2021-08-18T00:00:00"}], "metadata": {"isDeleted": false}} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billPaymentId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-01-30T14:48:40Z", "sourceModifiedDate": "2021-03-26T10:31:06", "id": "112", "supplierRef": {"id": "724", "supplierName": "Vendor A.A.A"}, "accountRef": {"id": "825", "name": "Codat Europe Bank"}, "totalAmount": 120, "currency": "GBP", "currencyRate": 1, "date": "2021-03-26T00:00:00", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 120, "links": [{"type": "Bill", "id": "7", "amount": -120, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "Bill Payment #1"} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billPaymentId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T09:09:20Z", "sourceModifiedDate": "2023-12-16T05:04:58", "id": "3A09-1071529982", "supplierRef": {"id": "720000-1071512482", "supplierName": "Bayshore Auto Mall"}, "accountRef": {"id": "20000-933270541", "name": "Checking"}, "totalAmount": 532.97, "currency": "GBP", "currencyRate": 1, "date": "2023-01-11T00:00:00", "note": "Monthly Truck Payment", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 532.97, "links": [{"type": "Bill", "id": "38AA-1071513625", "amount": -532.97, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "101", "metadata": {"isDeleted": false}} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billPaymentId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-01-18T11:02:47Z", "sourceModifiedDate": "2019-05-13T13:14:26Z", "id": "20", "supplierRef": {"id": "4", "supplierName": "BILLy elliot"}, "totalAmount": 0, "currency": "GBP", "currencyRate": 1, "date": "2019-05-13T00:00:00", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 0, "links": [{"type": "Bill", "id": "18", "amount": -5, "currencyRate": 1}, {"type": "CreditNote", "id": "19", "amount": 5, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billPaymentId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T09:36:42Z", "sourceModifiedDate": "2016-09-13T21:19:36Z", "id": "158", "supplierRef": {"id": "57", "supplierName": "Hall's Promo Items"}, "accountRef": {"id": "81", "name": "Current"}, "totalAmount": 7940.6, "currency": "HKD", "currencyRate": 0.078807, "date": "2016-01-23T00:00:00", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 7940.6, "links": [{"type": "Bill", "id": "157", "amount": -7940.6, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "1067", "metadata": {"isDeleted": false}} + Sage 200cloud: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billPaymentId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-14T09:35:54Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45462", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "totalAmount": 27, "currency": "GBP", "currencyRate": 1, "date": "2020-01-05T00:00:00Z", "note": "", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 27, "links": [{"type": "PaymentOnAccount", "id": "CON001", "amount": -27, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "Payment invoice 1"} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billPaymentId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "255", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "totalAmount": 370.71, "currency": "GBP", "currencyRate": 1, "date": "2022-01-29T00:00:00", "note": "Purchase payment 255 linked to, purchase invoice 86, purchase invoice 87, purchase invoice 250, purchase invoice 251, purchase invoice 252.", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 117.5, "links": [{"type": "Bill", "id": "86", "amount": -117.5, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 64.63, "links": [{"type": "Bill", "id": "87", "amount": -64.63, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 50.57, "links": [{"type": "Bill", "id": "250", "amount": -50.57, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 36.87, "links": [{"type": "Bill", "id": "251", "amount": -36.87, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 101.14, "links": [{"type": "Bill", "id": "252", "amount": -101.14, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "metadata": {"isDeleted": false}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billPaymentId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-24T14:54:04Z", "sourceModifiedDate": "2019-11-20T09:30:03Z", "id": "d953b45e156011e8b45c025132dab352", "supplierRef": {"id": "ca430e0d156011e8b45c025132dab352", "supplierName": "Test Supplier"}, "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "totalAmount": 52.02, "currency": "GBP", "currencyRate": 1, "date": "2018-02-15T00:00:00", "note": "Supplier payment using credit/debit card - Cool stuff", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 52.02, "links": [{"type": "PaymentOnAccount", "id": "ca430e0d156011e8b45c025132dab352", "amount": -52.02, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billPaymentId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-04T16:32:13Z", "sourceModifiedDate": "2022-02-23T12:03:30", "id": "4471", "supplierRef": {"id": "3", "supplierName": "ADP"}, "accountRef": {"id": "353", "name": "Current Account"}, "totalAmount": 20, "currency": "GBP", "date": "2022-01-06T00:00:00", "note": "", "paymentMethodRef": {"id": "6", "name": "Cash"}, "lines": [{"amount": 20, "links": [{"type": "Bill", "id": "4470", "amount": -20, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "metadata": {"isDeleted": false}} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billPaymentId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-15T20:37:10Z", "sourceModifiedDate": "2021-01-02T22:51:40", "id": "74004690-82a1-4810-aaca-6ce575af94b4", "supplierRef": {"id": "1262c350-fe0f-40ec-aeff-41c95b4a45af", "supplierName": "DIISR - Small Business Services"}, "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "totalAmount": 7267.2, "currency": "GBP", "currencyRate": 1, "date": "2021-12-20T00:00:00", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 7267.2, "links": [{"type": "Bill", "id": "3945273c-cc04-479f-a4b5-1e3dc7a55ed1", "amount": -7267.2, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "metadata": {"isDeleted": false}} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billPaymentId: "" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + delete-billPayment: + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + billPaymentId: "" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + get-create-billPayment-model: + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "BillPayment", "description": "A bill payment represents an allocation of transactions across an 'accounts payable' account (supplier)", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the payment has been sent to", "required": true}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": false}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": true, "validation": {"warnings": [{"field": "Currency", "details": "Must be a valid currency code"}], "information": []}}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": false}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true}}} + FreeAgent: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "BillPayment", "description": "A bill payment represents an allocation of transactions across an 'accounts payable' account (supplier)", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": true}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Must match the sum of the line amounts."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": true}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the payment and the base currency of the company", "required": true}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true, "validation": {"warnings": [{"field": "Lines", "details": "Only one line may be specified"}], "information": []}}}} + MYOB AccountRight and Essentials: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "BillPayment", "description": "A bill payment represents an allocation of transactions across an 'accounts payable' account (supplier)", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the payment has been sent to", "required": true, "validation": {"warnings": [], "information": [{"field": "SupplierRef", "details": "Must be provided."}]}}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": true, "validation": {"warnings": [], "information": [{"field": "AccountRef", "details": "Must be provided."}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Precision must be maximum of two decimal places."}, {"field": "TotalAmount", "details": "Must be greater than zero."}], "information": [{"field": "TotalAmount", "details": "Must be provided and must equal the sum of the link items amount."}]}}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true, "validation": {"warnings": [], "information": [{"field": "Date", "details": "Must be provided."}]}}, "reference": {"type": "String", "displayName": "Reference", "description": "A user friendly reference for the payment", "required": false, "validation": {"warnings": [], "information": [{"field": "Reference", "details": "Must not be greater than 8 characters long."}]}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": true, "options": [{"value": "AUD", "type": "String", "displayName": "Australian Dollar", "required": false}], "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Must be provided."}]}}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true, "validation": {"warnings": [], "information": [{"field": "Lines", "details": "Must be provided."}]}}}} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "BillPayment", "description": "A bill payment represents an allocation of transactions across an 'accounts payable' account (supplier)", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the payment has been sent to", "required": true}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": true}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": true, "validation": {"warnings": [{"field": "Currency", "details": "If the currency is set make sure it's the same as the 'Bill' and/or 'VendorCredit' currency"}], "information": []}}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": false}, "reference": {"type": "String", "displayName": "Reference", "description": "A user friendly reference for the payment", "required": false, "validation": {"warnings": [{"field": "Reference", "details": "The id format should be 'location-'"}], "information": [{"field": "Reference", "details": "This field can be used to provide a tracking category id (Location only)"}]}}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true}}} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "BillPayment", "description": "A bill payment represents an allocation of transactions across an 'accounts payable' account (supplier)", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the payment has been sent to", "required": true}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": true}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": false}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": false, "validation": {"warnings": [{"field": "Currency", "details": "Must be a three letter ISO code that matches the currency of the supplier"}, {"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 default currency of the supplier"}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the payment and the base currency of the company", "required": false, "validation": {"warnings": [], "information": [{"field": "CurrencyRate", "details": "If not set, will default to the rate set within QuickBooks Desktop, if no rate is set in QuickBooks Desktop, it will default to 1."}, {"field": "CurrencyRate", "details": "Can only be set if the Quickbooks Desktop company has Multicurrency enabled."}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Must match the sum of amounts in the lines"}], "information": []}}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true}}} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "BillPayment", "description": "A bill payment represents an allocation of transactions across an 'accounts payable' account (supplier)", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the payment has been sent to", "required": true, "validation": {"warnings": [], "information": [{"field": "SupplierRef", "details": "Must be the ID of the Supplier associated with the Bill or Credit Note."}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": false, "validation": {"warnings": [], "information": [{"field": "AccountRef", "details": "Required if TotalAmount is greater than zero."}]}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": false, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Required if multi-currency is enabled for the company."}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the payment and the base currency of the company", "required": false, "validation": {"warnings": [], "information": [{"field": "CurrencyRate", "details": "Required if Currency is not the base currency."}]}}, "paymentMethodRef": {"type": "Object", "displayName": "Payment Method Reference", "description": "The method of payment", "required": false, "validation": {"warnings": [{"field": "PaymentMethodRef", "details": "If provided it will be ignored."}], "information": []}}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": false}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true}}} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "BillPayment", "description": "A bill payment represents an allocation of transactions across an 'accounts payable' account (supplier)", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the payment has been sent to", "required": true, "validation": {"warnings": [], "information": [{"field": "SupplierRef", "details": "Must be the ID of the Supplier associated with the Bill or Credit Note."}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": false, "validation": {"warnings": [], "information": [{"field": "AccountRef", "details": "Required if TotalAmount is greater than zero."}]}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": false, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Required if multi-currency is enabled for the company."}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the payment and the base currency of the company", "required": false, "validation": {"warnings": [], "information": [{"field": "CurrencyRate", "details": "Required if Currency is not the base currency."}]}}, "paymentMethodRef": {"type": "Object", "displayName": "Payment Method Reference", "description": "The method of payment", "required": false, "validation": {"warnings": [{"field": "PaymentMethodRef", "details": "If provided it will be ignored."}], "information": []}}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": false}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true}}} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "BillPayment", "description": "A bill payment represents an allocation of transactions across an 'accounts payable' account (supplier)", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Bank Account", "description": "The bank account to pay this bill from.", "required": true}, "supplierRef": {"type": "Object", "displayName": "Supplier", "description": "Supplier to be paid.", "required": true}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount being paid to the supplier.", "required": true, "validation": {"warnings": [], "information": [{"details": "This must equal the sum of the line amounts"}]}}, "reference": {"type": "Number", "displayName": "Reference", "description": "The user reference for this bill payment.", "required": false}, "date": {"type": "Number", "displayName": "Issue Date", "description": "The date this payment was issued.", "required": true}, "note": {"type": "Number", "displayName": "Note", "description": "A description of the payment.", "required": false}, "lines": {"type": "Array", "displayName": "Line Items", "description": "Line items of the payment.", "required": true, "validation": {"warnings": [], "information": [{"details": "Sage 50 only supports one line item per bill payment so all lines will be merged together in the response."}]}}}, "validation": {"warnings": [], "information": [{"details": "Pushing to Sage 50 2015 (v21) or below is not supported. To enable push, please upgrade to at least Sage 50 2016 (v22) and re-sync the company."}]}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "BillPayment", "description": "A bill payment represents an allocation of transactions across an 'accounts payable' account (supplier)", "required": true, "properties": {"accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": false, "validation": {"warnings": [{"field": "AccountRef", "details": "Required unless the BillPayment is only allocating a Credit Note."}], "information": []}}, "supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the payment has been sent to", "required": true}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true, "validation": {"warnings": [], "information": [{"field": "Date", "details": "Must be provided."}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Must be zero when allocating against Bills using a Credit Note only."}, {"field": "TotalAmount", "details": "Must equal the sum of the link items amount."}], "information": [{"field": "TotalAmount", "details": "Must be provided."}]}}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": false, "validation": {"warnings": [], "information": [{"field": "Note", "details": "Should not be longer than 25 characters."}]}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": true, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "If supplied, must match the currency of the supplier."}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the payment and the base currency of the company", "required": false}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true}}} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "BillPayment", "description": "A bill payment represents an allocation of transactions across an 'accounts payable' account (supplier)", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the payment has been sent to", "required": true}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": true}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Must be a positive amount"}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": false, "options": [{"value": "AUD", "type": "String", "displayName": "Australian Dollar", "required": false}, {"value": "CAD", "type": "String", "displayName": "Canadian Dollar", "required": false}, {"value": "GBP", "type": "String", "displayName": "Pound Sterling", "required": false}, {"value": "USD", "type": "String", "displayName": "US Dollar", "required": false}, {"value": "ZAR", "type": "String", "displayName": "Rand", "required": false}]}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": false, "validation": {"warnings": [{"field": "Note", "details": "Must be no greater than 1000 characters"}], "information": []}}, "paymentMethodRef": {"type": "Object", "displayName": "Payment Method Reference", "description": "The method of payment", "required": true}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true}}} + Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "BillPayment", "description": "A bill payment represents an allocation of transactions across an 'accounts payable' account (supplier)", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the payment has been sent to", "required": true}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": true}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": true}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the payment and the base currency of the company", "required": true}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": true}, "paymentMethodRef": {"type": "Object", "displayName": "Payment Method Reference", "description": "The method of payment", "required": true}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true}, "reference": {"type": "String", "displayName": "Reference", "description": "A user friendly reference for the payment", "required": true}, "metadata": {"type": "Object", "displayName": "Metadata", "description": "Miscellaneous data about the item", "required": true}}} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "BillPayment", "description": "A bill payment represents an allocation of transactions across an 'accounts payable' account (supplier)", "required": true, "properties": {"date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true, "validation": {"warnings": [], "information": [{"field": "Date", "details": "Must be provided."}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The total amount of the payment, inclusive of discounts and tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Must match the sum of line amounts."}], "information": [{"field": "TotalAmount", "details": "Must be provided."}]}}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": false}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": true, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Must be the company's base currency when pushing a batch payment."}]}}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": false, "validation": {"warnings": [], "information": [{"field": "AccountRef", "details": "Must be provided if paying a bill from a Bank Account."}]}}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true, "validation": {"warnings": [], "information": [{"field": "Lines", "details": "When more than one line is provided, a batch payment will be created."}]}}}} + Zoho Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "BillPayment", "description": "A bill payment represents an allocation of transactions across an 'accounts payable' account (supplier)", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the payment has been sent to", "required": true}, "accountRef": {"type": "Object", "displayName": "Nominal Account Reference", "description": "Reference to the nominal account the payment is linked to", "required": false, "validation": {"warnings": [{"field": "AccountRef", "details": "Must be provided when making a payment to an invoice and/or a payment on account"}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the payment", "required": true, "validation": {"warnings": [{"field": "Currency", "details": "Must match supplier's currency"}], "information": []}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the payment and the base currency of the company", "required": false, "validation": {"warnings": [{"field": "CurrencyRate", "details": "Must be greater or equal to 0"}], "information": []}}, "date": {"type": "DateTime", "displayName": "Date", "description": "The date the payment was recorded", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "Any additional text based information associated with the payment", "required": false}, "lines": {"type": "Array", "displayName": "Lines", "description": "A collection of payment lines", "required": true, "validation": {"warnings": [{"field": "Lines", "details": "Must contain 1 bill payment line"}], "information": []}}}} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + create-bill-payment: + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2023-01-05T12:33:25.339Z", "sourceModifiedDate": "2023-01-05T12:33:25.339Z", "id": "3d5a8e00-d108-4045-8823-7f342676cffa", "supplierRef": {"id": "SUPP1", "supplierName": "string"}, "accountRef": {"id": "1200", "name": "string"}, "totalAmount": 15.38, "currency": "GBP", "currencyRate": 1, "date": "2023-01-05T12:33:25.339Z", "note": "note - billpayment on 20230220 of 15.38", "paymentMethodRef": {"id": "string", "name": "string"}, "lines": [{"amount": 15.38, "links": [{"type": "Bill", "id": "3", "amount": -15.38, "currencyRate": 1}], "allocatedOnDate": "2023-01-05T12:33:25.339Z"}], "reference": "reference 20230220 15.38", "metadata": {"isDeleted": true}} + responses: + "200": + application/json: {"changes": [], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "cdd89dc7-fa50-44e0-8333-b1d5e261915a", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "TimedOut", "statusCode": 36521} + "400": {} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "3d5a8e00-d108-4045-8823-7f342676cffa", "supplierRef": {"id": "77", "supplierName": "AtoB"}, "accountRef": {"id": "122"}, "totalAmount": 2500, "currency": "USD", "currencyRate": 1, "date": "2023-04-17T00:00:00", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 2500, "links": [{"type": "Bill", "id": "302", "amount": -1200, "currencyRate": 1}, {"type": "Bill", "id": "303", "amount": -1300, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}], "reference": "1"} + responses: + "200": + application/json: {"changes": [], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "d9ea1320-e850-44aa-8ce6-7b7c49cf24bd", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "TimedOut", "statusCode": 961205} + "400": {} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "3d5a8e00-d108-4045-8823-7f342676cffa", "supplierRef": {"id": "dec56ceb-65e9-43b3-ac98-7fe09eb37e31"}, "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4"}, "totalAmount": 244.45, "currency": "GBP", "currencyRate": 1, "date": "2023-04-17T00:00:00", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 135.85, "links": [{"type": "Bill", "id": "59978bef-af2f-4a7e-9728-4997597c0980", "amount": -135.85, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 108.6, "links": [{"type": "Bill", "id": "2175c381-d323-4e20-8c94-7680ea7f85d3", "amount": -108.6, "currencyRate": 1}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]} + responses: + "200": + application/json: {"changes": [], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "c23e7d6f-9415-4747-a51e-f09254895835", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Success", "statusCode": 101251} + "400": {} + NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "3d5a8e00-d108-4045-8823-7f342676cffa", "supplierRef": {"id": "727"}, "accountRef": {"id": "854"}, "totalAmount": 110, "currency": "GBP", "date": "2023-05-09T00:00:00", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 110, "links": [{"type": "Bill", "id": "8", "amount": -120}, {"type": "CreditNote", "id": "462792", "amount": 10}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]} + responses: + "200": + application/json: {"changes": [], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "b39d7ea0-defe-4d8d-863e-da5a61a411d6", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Success", "statusCode": 895210} + "400": {} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "3d5a8e00-d108-4045-8823-7f342676cffa", "supplierRef": {"id": "3"}, "accountRef": {"id": "360"}, "totalAmount": 45, "currency": "USD", "date": "2023-04-25T00:00:00", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "6", "name": "Cash"}, "lines": [{"amount": 45, "links": [{"type": "Bill", "id": "26572", "amount": -405}, {"type": "CreditNote", "id": "26573", "amount": 360}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]} + responses: + "200": + application/json: {"changes": [], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "403c67bc-fad7-4319-84d9-843739487bfc", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Failed", "statusCode": 589813} + "400": {} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "001", "totalAmount": 5000, "currency": "GBP", "date": "1901-01-01", "note": "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", "paymentMethodRef": {"id": "EILBDVJVNUAGVKRQ", "name": "AliPay"}, "lines": [{"amount": 1000, "links": [{"type": "Bill", "id": "x", "amount": -1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 1000, "links": [{"type": "Bill", "id": "y", "amount": -1000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}, {"amount": 3000, "links": [{"type": "PaymentOnAccount", "id": "y", "amount": -3000}], "allocatedOnDate": "2022-10-23T00:00:00Z"}]} + responses: + "400": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + list-bills: + "": + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [], "pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} + "400": {} + Clear Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:16Z", "sourceModifiedDate": "2023-02-14T17:09:02", "id": "81539597-e681-40c9-a4dd-ec2fffcde572", "reference": "b465a2c9-3212-4620-889b-6328ba148215", "supplierRef": {"id": "8GeHBdBZiZ", "supplierName": "DuBuque, Goyette and Franecki"}, "purchaseOrderRefs": [], "issueDate": "2022-04-29T00:00:00", "dueDate": "2022-05-06T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Grease Trap", "unitAmount": 2781.94, "quantity": 5, "discountAmount": 0, "subTotal": 13909.7, "taxAmount": 1390.97, "totalAmount": 15300.67, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "22aee6bd-4767-48c4-8a13-fdf85b91fc80", "name": "600 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1371.39, "quantity": 5, "discountAmount": 0, "subTotal": 6856.95, "taxAmount": 685.7, "totalAmount": 7542.65, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "9409d23d-1011-432e-98a4-591fcd8d5404", "name": "300 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1371.39, "quantity": 6, "discountAmount": 0, "subTotal": 8228.34, "taxAmount": 822.83, "totalAmount": 9051.17, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "9409d23d-1011-432e-98a4-591fcd8d5404", "name": "300 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 2781.94, "quantity": 3, "discountAmount": 0, "subTotal": 8345.82, "taxAmount": 834.58, "totalAmount": 9180.4, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "22aee6bd-4767-48c4-8a13-fdf85b91fc80", "name": "600 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Underground - Trapped Road Gully 450mm x 450mm", "unitAmount": 402.89, "quantity": 8, "discountAmount": 0, "subTotal": 3223.12, "taxAmount": 322.31, "totalAmount": 3545.43, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "3abf0883-03f7-44c6-bc15-1372522d25e1", "name": "Heavy Duty Hinged Gully Grating"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Underground - Drain Bottle Gullies 90 degree Rectangular", "unitAmount": 95.08, "quantity": 7, "discountAmount": 0, "subTotal": 665.56, "taxAmount": 66.56, "totalAmount": 732.12, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "6", "name": "Back Inlet Roddable Gully 90� Outlet Rectangular Grid"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Underground - Drain Bottle Gullies 90 degree Rectangular", "unitAmount": 95.08, "quantity": 1, "discountAmount": 0, "subTotal": 95.08, "taxAmount": 9.51, "totalAmount": 104.59, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "6", "name": "Back Inlet Roddable Gully 90� Outlet Rectangular Grid"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1371.39, "quantity": 2, "discountAmount": 0, "subTotal": 2742.78, "taxAmount": 274.28, "totalAmount": 3017.06, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "9409d23d-1011-432e-98a4-591fcd8d5404", "name": "300 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 2781.94, "quantity": 1, "discountAmount": 0, "subTotal": 2781.94, "taxAmount": 278.19, "totalAmount": 3060.13, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "22aee6bd-4767-48c4-8a13-fdf85b91fc80", "name": "600 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Underground - Drain Bottle Gullies 90 degree Rectangular", "unitAmount": 95.08, "quantity": 7, "discountAmount": 0, "subTotal": 665.56, "taxAmount": 66.56, "totalAmount": 732.12, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "6", "name": "Back Inlet Roddable Gully 90� Outlet Rectangular Grid"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1251.89, "quantity": 4, "discountAmount": 0, "subTotal": 5007.56, "taxAmount": 500.76, "totalAmount": 5508.32, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "51077072-d5c3-463b-9cb4-7da2e11886f9", "name": "150 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1371.39, "quantity": 9, "discountAmount": 0, "subTotal": 12342.51, "taxAmount": 1234.25, "totalAmount": 13576.76, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "9409d23d-1011-432e-98a4-591fcd8d5404", "name": "300 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 64864.92, "taxAmount": 6486.5, "totalAmount": 71351.42, "amountDue": 0, "note": "Bill with 12 line items, totaling 71351.42", "paymentAllocations": [{"payment": {"id": "dcb18480-8b69-44d8-aa26-268b6a80d170", "note": "Bill Payment against bill 81539597-e681-40c9-a4dd-ec2fffcde572", "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-05-06T00:00:00", "totalAmount": 71351.42}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-05-06T00:00:00", "totalAmount": -71351.42}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:16Z", "sourceModifiedDate": "2023-04-14T01:56:02", "id": "acc1dc9d-a21a-41b8-953e-73da4afab6e6", "reference": "d88e83b8-a5cc-4578-815d-afa263df4beb", "supplierRef": {"id": "7GObELDcsE", "supplierName": "Lakin, Schmeler and Kihn"}, "purchaseOrderRefs": [{"id": "7f07b584-bebe-450f-aa9e-1d7aed630b66", "purchaseOrderNumber": "ee9b8e00-49a2-4d83-bc33-e2eee59a1c36"}], "issueDate": "2022-04-30T00:00:00", "dueDate": "2022-05-15T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Underground - Drain Bottle Gullies 90 degree Rectangular", "unitAmount": 95.08, "quantity": 4, "discountAmount": 0, "subTotal": 380.32, "taxAmount": 38.03, "totalAmount": 418.35, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "6", "name": "Back Inlet Roddable Gully 90� Outlet Rectangular Grid"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 380.32, "taxAmount": 38.03, "totalAmount": 418.35, "amountDue": 0, "note": "Bill for purchase order ee9b8e00-49a2-4d83-bc33-e2eee59a1c36", "paymentAllocations": [{"payment": {"id": "a4fa017a-3911-4eb0-aaf9-b002c446c8c3", "note": "Bill Payment against bill acc1dc9d-a21a-41b8-953e-73da4afab6e6", "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-05-15T00:00:00", "totalAmount": 418.35}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-05-15T00:00:00", "totalAmount": -418.35}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 183, "_links": {"self": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/bills"}, "current": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/bills?page=2&pageSize=2"}}} + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2022-11-02T17:02:48Z", "id": "4019ee2b-d05a-ed11-8c34-000d3a0d28a2-108276", "reference": "108276", "supplierRef": {"id": "c01217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "First Up Consultants"}, "purchaseOrderRefs": [], "issueDate": "2019-01-01T00:00:00", "dueDate": "2019-01-01T00:00:00", "currency": "GBP", "lineItems": [{"description": "ATHENS Desk", "unitAmount": 506.6, "quantity": 4, "discountAmount": 202.64, "subTotal": 1823.76, "taxAmount": 364.75, "totalAmount": 2188.51, "discountPercentage": 10, "accountRef": {"id": "6a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Inventory"}, "taxRateRef": {"id": "63bc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for DOMESTIC / STANDARD", "effectiveTaxRate": 10}, "itemRef": {"id": "ITEM-c81217b3-89d1-ea11-bbaa-000d3a2b9185-DOMESTIC-DOMESTIC", "name": "ATHENS Desk / General Business Posting Group: 'DOMESTIC' / VAT Business Posting Group: 'DOMESTIC'"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 1823.76, "taxAmount": 364.75, "totalAmount": 2188.51, "amountDue": 2188.51, "note": "129148", "paymentAllocations": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2022-05-17T16:29:02Z", "id": "b9cb06bf-89d1-ea11-bbaa-000d3a2b9185-108001", "reference": "108001", "supplierRef": {"id": "c01217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "First Up Consultants"}, "purchaseOrderRefs": [], "issueDate": "2019-01-01T00:00:00", "dueDate": "2019-01-01T00:00:00", "currency": "GBP", "lineItems": [{"description": "ATHENS Desk", "unitAmount": 506.6, "quantity": 4, "discountAmount": 0, "subTotal": 2026.4, "taxAmount": 405.28, "totalAmount": 2431.68, "discountPercentage": 0, "accountRef": {"id": "6a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Inventory"}, "taxRateRef": {"id": "63bc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for DOMESTIC / STANDARD", "effectiveTaxRate": 10}, "itemRef": {"id": "ITEM-c81217b3-89d1-ea11-bbaa-000d3a2b9185-DOMESTIC-DOMESTIC", "name": "ATHENS Desk / General Business Posting Group: 'DOMESTIC' / VAT Business Posting Group: 'DOMESTIC'"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 2026.4, "taxAmount": 405.28, "totalAmount": 2431.68, "amountDue": 0, "note": "107001", "paymentAllocations": [{"payment": {"id": "57377f05-8ad1-ea11-bbaa-000d3a2b9185", "note": "Invoice 107001", "reference": "108001", "accountRef": {"id": "621217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Petty Cash"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-01-01T00:00:00", "totalAmount": 2431.68}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2019-01-01T00:00:00", "totalAmount": -2431.68}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 294, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/bills"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/bills?page=2&pageSize=2"}}} + Exact (Netherlands): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-26T13:32:18Z", "sourceModifiedDate": "2020-01-03T15:06:02Z", "id": "1c55118b-793e-4437-9c13-4f554b9ca989", "reference": "19600006", "supplierRef": {"id": "5e6f49b9-6489-4b82-83e7-291d308919bb", "supplierName": "Mickey Mouse"}, "purchaseOrderRefs": [], "issueDate": "2019-12-16T00:00:00Z", "dueDate": "2019-11-09T00:00:00Z", "currency": "EUR", "currencyRate": 1, "lineItems": [{"description": "Cheesecake", "unitAmount": 10, "quantity": 1, "discountAmount": 0, "subTotal": 10, "taxAmount": 2.1, "totalAmount": 12.1, "accountRef": {"id": "5f139759-b554-4314-862e-b9d88e5b2e1b", "name": "Af te dragen loonheffing"}, "taxRateRef": {"id": "84277189-ad16-456c-b501-ca31f0a483cc", "name": "BTW prive gebruik", "effectiveTaxRate": 21}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 10, "taxAmount": 2.1, "totalAmount": 12.1, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "d9a2980b-2a43-46f2-9c7f-413d925b3cdd", "reference": "20200032", "accountRef": {"id": "d79d65bd-1d7d-4f55-95d3-76b3a7b7b823", "name": "Bank 1"}, "currency": "EUR", "currencyRate": 1, "paidOnDate": "2021-03-22T00:00:00", "totalAmount": 12.1}, "allocation": {"currency": "EUR", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -12.1}}]}, {"modifiedDate": "2022-10-26T13:32:18Z", "sourceModifiedDate": "2020-01-03T15:06:39Z", "id": "ec0c61a1-deb6-4496-b9ee-feb29b16019c", "reference": "19600008", "supplierRef": {"id": "fc189bfa-f083-438c-bf09-379a0631d4a1", "supplierName": "Mickey Mouse"}, "purchaseOrderRefs": [], "issueDate": "2019-12-16T00:00:00Z", "dueDate": "2019-11-09T00:00:00Z", "currency": "EUR", "currencyRate": 1, "lineItems": [{"description": "Cheesecake", "unitAmount": 10, "quantity": 1, "discountAmount": 0, "subTotal": 10, "taxAmount": 2.1, "totalAmount": 12.1, "accountRef": {"id": "5f139759-b554-4314-862e-b9d88e5b2e1b", "name": "Af te dragen loonheffing"}, "taxRateRef": {"id": "84277189-ad16-456c-b501-ca31f0a483cc", "name": "BTW prive gebruik", "effectiveTaxRate": 21}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 10, "taxAmount": 2.1, "totalAmount": 12.1, "amountDue": 12.1, "paymentAllocations": [{"payment": {"id": "ef5d140b-16da-4fd2-a0c8-d5bfb89a13ee", "reference": "19900056", "accountRef": {"id": "a2d51b6f-677d-4bbf-ad0c-b45fd6231546", "name": "Activa herwaarderingen"}, "currency": "EUR", "currencyRate": 1, "paidOnDate": "2019-11-07T00:00:00", "totalAmount": 0.21}, "allocation": {"currency": "EUR", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -0.21}}, {"payment": {"id": "b69e7ad4-2b90-4a5f-a8a0-67418ac95531", "reference": "19900053", "accountRef": {"id": "a2d51b6f-677d-4bbf-ad0c-b45fd6231546", "name": "Activa herwaarderingen"}, "currency": "EUR", "currencyRate": 1, "paidOnDate": "2019-11-07T00:00:00", "totalAmount": 0.2}, "allocation": {"currency": "EUR", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -0.2}}, {"payment": {"id": "6ccd1256-6073-4bfc-8d88-700417685e72", "reference": "21200028", "accountRef": {"id": "d79d65bd-1d7d-4f55-95d3-76b3a7b7b823", "name": "Bank 1"}, "currency": "EUR", "currencyRate": 1, "paidOnDate": "2021-10-05T00:00:00", "totalAmount": 12.1}, "allocation": {"currency": "EUR", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -12.1}}, {"payment": {"id": "69a8533b-3e59-4d2d-9bca-bc37bc0f7984", "reference": "19900055", "accountRef": {"id": "a2d51b6f-677d-4bbf-ad0c-b45fd6231546", "name": "Activa herwaarderingen"}, "currency": "EUR", "currencyRate": 1, "paidOnDate": "2019-11-07T00:00:00", "totalAmount": 0.21}, "allocation": {"currency": "EUR", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -0.21}}, {"payment": {"id": "2dae3548-ff11-4ad8-886c-eb5cb7965024", "reference": "19900054", "accountRef": {"id": "a2d51b6f-677d-4bbf-ad0c-b45fd6231546", "name": "Activa herwaarderingen"}, "currency": "EUR", "currencyRate": 1, "paidOnDate": "2019-11-07T00:00:00", "totalAmount": 0.21}, "allocation": {"currency": "EUR", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -0.21}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 80, "_links": {"self": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/bills"}, "current": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/bills?page=2&pageSize=2"}}} + Exact (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-26T13:33:20Z", "sourceModifiedDate": "2019-01-11T14:18:17Z", "id": "e7a45898-2db3-424c-acb9-a51647740f26", "reference": "17600002", "supplierRef": {"id": "a7cad20d-44db-442b-ac1f-90475802d6fb", "supplierName": "Pencils Pencils Pencils"}, "purchaseOrderRefs": [], "issueDate": "2017-09-26T00:00:00Z", "dueDate": "2017-10-26T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Stationery", "unitAmount": 400, "quantity": 2, "discountAmount": 0, "subTotal": 800, "taxAmount": 160, "totalAmount": 960, "accountRef": {"id": "e5e9e994-0f14-4614-b162-7b5593b21276", "name": "Finished Goods Stock"}, "taxRateRef": {"id": "63cd143a-66ab-4320-8a6d-ab6be85ed048", "name": "UK purchases standard rate � Excluding", "effectiveTaxRate": 20}, "itemRef": {"id": "001"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 800, "taxAmount": 160, "totalAmount": 960, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "7a5f621b-739f-4ed8-b738-2aae3ef886ac", "reference": "17200006", "accountRef": {"id": "4a4e34b5-7f62-4b64-a44a-073398b14b41", "name": "Bank"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2017-10-11T00:00:00", "totalAmount": 123}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -123}}]}, {"modifiedDate": "2022-10-26T13:33:20Z", "sourceModifiedDate": "2019-01-11T12:03:31Z", "id": "064fbab9-9b4d-4e83-b2df-0f4ce12bc2bf", "reference": "19600001", "supplierRef": {"id": "a4d5d739-c979-4819-b0ce-666db1ec3a7d", "supplierName": "Exact Software (UK) Ltd � Exact Online"}, "purchaseOrderRefs": [], "issueDate": "2019-01-11T00:00:00Z", "dueDate": "2019-02-10T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Basket balls", "unitAmount": 20, "quantity": 1, "discountAmount": 0, "subTotal": 20, "taxAmount": 0, "totalAmount": 20, "accountRef": {"id": "885ff551-664d-451b-995b-cb114c9877d0", "name": "Unallocated Cash"}, "itemRef": {"id": "23"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 20, "taxAmount": 0, "totalAmount": 20, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "d871f677-c2df-4069-bda0-c6804a46b71b", "reference": "19200001", "accountRef": {"id": "4a4e34b5-7f62-4b64-a44a-073398b14b41", "name": "Bank"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-02-10T00:00:00", "totalAmount": 20}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -20}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 83, "_links": {"self": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/bills"}, "current": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/bills?page=2&pageSize=2"}}} + FreeAgent: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-25T14:19:10Z", "sourceModifiedDate": "2020-11-11T12:48:55Z", "id": "16609552", "reference": "MATT - U", "supplierRef": {"id": "7169654", "supplierName": "The Eagle"}, "purchaseOrderRefs": [], "issueDate": "2014-08-21T00:00:00", "dueDate": "2018-09-20T00:00:00", "currency": "GBP", "lineItems": [{"unitAmount": 125, "quantity": 1, "taxAmount": 25, "totalAmount": 150, "accountRef": {"id": "285", "name": "Accommodation and Meals"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 125, "taxAmount": 25, "totalAmount": 150, "amountDue": 150, "paymentAllocations": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:19:10Z", "sourceModifiedDate": "2020-11-11T12:50:41Z", "id": "16609589", "reference": "MATT - U", "supplierRef": {"id": "7169654", "supplierName": "The Eagle"}, "purchaseOrderRefs": [], "issueDate": "2014-08-21T00:00:00", "dueDate": "2018-09-20T00:00:00", "currency": "GBP", "lineItems": [{"unitAmount": 125, "quantity": 1, "taxAmount": 25, "totalAmount": 150, "accountRef": {"id": "285", "name": "Accommodation and Meals"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 125, "taxAmount": 25, "totalAmount": 150, "amountDue": 150, "paymentAllocations": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 137, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/bills"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/bills?page=2&pageSize=2"}}} + FreshBooks: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2021-04-26T19:34:22", "id": "27", "supplierRef": {"id": "87"}, "purchaseOrderRefs": [], "issueDate": "2021-04-26T00:00:00", "dueDate": "2021-05-26T00:00:00", "currency": "USD", "lineItems": [{"description": "Grocery", "unitAmount": 50, "quantity": 1, "subTotal": 50, "taxAmount": 0, "totalAmount": 50, "accountRef": {"id": "3384197", "name": "Advertising"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 50, "taxAmount": 0, "totalAmount": 50, "amountDue": 50, "paymentAllocations": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2021-08-18T13:52:33", "id": "29", "supplierRef": {"id": "89"}, "purchaseOrderRefs": [], "issueDate": "2021-04-28T00:00:00", "dueDate": "2021-05-28T00:00:00", "currency": "GBP", "lineItems": [{"description": "Advertising refund", "unitAmount": 10, "quantity": 1, "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "accountRef": {"id": "3384197", "name": "Advertising"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "amountDue": 0, "paymentAllocations": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 16, "_links": {"self": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/bills"}, "current": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/bills?page=2&pageSize=2"}}} + KashFlow: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-09-30T10:29:15Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "97615244", "reference": "25", "supplierRef": {"id": "9272052", "supplierName": "Supplier man"}, "purchaseOrderRefs": [], "issueDate": "2000-01-01T00:00:00", "dueDate": "2000-01-01T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "", "unitAmount": 8.33, "quantity": 1, "subTotal": 8.33, "taxAmount": 1.67, "totalAmount": 10, "accountRef": {"id": "21481884", "name": "Computer equipment cost"}, "itemRef": {"id": "122990246"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 8.33, "taxAmount": 1.67, "totalAmount": 10, "amountDue": 0, "paymentAllocations": []}, {"modifiedDate": "2022-09-30T10:29:15Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "76144089", "reference": "1", "supplierRef": {"id": "6202387", "supplierName": "Dell"}, "purchaseOrderRefs": [], "issueDate": "2019-01-28T00:00:00", "dueDate": "2019-02-27T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "", "unitAmount": 120, "quantity": 5, "subTotal": 600, "taxAmount": 0, "totalAmount": 600, "accountRef": {"id": "21481820", "name": "Materials purchased"}, "itemRef": {"id": "95293985"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 600, "taxAmount": 0, "totalAmount": 600, "amountDue": 0, "paymentAllocations": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 19, "_links": {"self": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/bills"}, "current": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/bills?page=2&pageSize=2"}}} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-01-30T14:47:34Z", "sourceModifiedDate": "2022-07-05T13:38:10", "id": "7", "supplierRef": {"id": "724", "supplierName": "Vendor A.A.A"}, "purchaseOrderRefs": [], "issueDate": "2021-03-26T00:00:00", "dueDate": "2021-03-26T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 120, "quantity": 1, "unitOfMeasurement": "litre", "subTotal": 120, "totalAmount": 120, "accountRef": {"id": "716", "name": "Inventory In Transit"}, "trackingCategoryRefs": [{"id": "location-4", "name": "Europe"}], "tracking": {"categoryRefs": [{"id": "location-4", "name": "Europe"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "PartiallyPaid", "subTotal": 120, "taxAmount": 24, "totalAmount": 144, "amountDue": 24, "paymentAllocations": [{"payment": {"id": "112", "reference": "Bill Payment #1", "accountRef": {"id": "825", "name": "Codat Europe Bank"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-03-26T00:00:00", "totalAmount": 120}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -120}}]}, {"modifiedDate": "2023-01-30T14:47:34Z", "sourceModifiedDate": "2022-07-15T11:35:47", "id": "165372", "supplierRef": {"id": "724", "supplierName": "Vendor A.A.A"}, "purchaseOrderRefs": [], "issueDate": "2022-07-15T00:00:00", "dueDate": "2022-07-15T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 555.78, "quantity": 1, "subTotal": 555.78, "totalAmount": 555.78, "accountRef": {"id": "844", "name": "Asset account test 2"}, "trackingCategoryRefs": [{"id": "location-4", "name": "Europe"}], "tracking": {"categoryRefs": [{"id": "location-4", "name": "Europe"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "PartiallyPaid", "subTotal": 555.78, "taxAmount": 0, "totalAmount": 555.78, "amountDue": 500, "paymentAllocations": [{"payment": {"id": "165373", "reference": "Bill Payment #2", "accountRef": {"id": "825", "name": "Codat Europe Bank"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-07-15T00:00:00", "totalAmount": 555.78}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -55.78}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 3, "_links": {"self": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/bills"}, "current": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/bills?page=2&pageSize=2"}}} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T09:06:42Z", "sourceModifiedDate": "2023-12-16T05:06:30", "id": "3691-1071520776", "reference": "3847498", "supplierRef": {"id": "B0000-933272656", "supplierName": "Patton Hardware Supplies"}, "purchaseOrderRefs": [{"id": "3684-1071520443", "purchaseOrderNumber": "6225"}], "issueDate": "2022-12-02T00:00:00", "dueDate": "2024-01-01T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Cabinets:Light Pine - Light pine kitchen cabinet wall unit \n#CLD- 1235-p", "unitAmount": 1500, "quantity": 5, "discountAmount": 0, "subTotal": 7500, "taxAmount": 0, "totalAmount": 7500, "discountPercentage": 0, "accountRef": {"id": "C0000-933270541", "name": "Accounts Payable"}, "itemRef": {"id": "110000-933272656", "name": "Cabinets:Light Pine"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}, {"description": "Hardware:Doorknobs Std - Doorknobs Part # DK 3704", "unitAmount": 27, "quantity": 100, "discountAmount": 0, "subTotal": 2700, "taxAmount": 0, "totalAmount": 2700, "discountPercentage": 0, "accountRef": {"id": "C0000-933270541", "name": "Accounts Payable"}, "itemRef": {"id": "130000-933272656", "name": "Hardware:Doorknobs Std"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}, {"description": "Hardware:Lk Doorknobs - Locking interior doorknobs Part # DK415", "unitAmount": 34.95, "quantity": 100, "discountAmount": 0, "subTotal": 3495, "taxAmount": 0, "totalAmount": 3495, "discountPercentage": 0, "accountRef": {"id": "C0000-933270541", "name": "Accounts Payable"}, "itemRef": {"id": "140000-933272656", "name": "Hardware:Lk Doorknobs"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 13695, "taxAmount": 0, "totalAmount": 13695, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "9E4C-1182131999", "reference": "115", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2023-01-31T00:00:00", "totalAmount": 13759}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -8695}}, {"payment": {"id": "36AD-1071520917", "note": "RC 93", "reference": "484", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2024-12-05T00:00:00", "totalAmount": 5325}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5000}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:06:42Z", "sourceModifiedDate": "2023-12-16T05:06:30", "id": "5CAB-1197713763", "reference": "8374892", "supplierRef": {"id": "30000-933272656", "supplierName": "C. U. Electric"}, "purchaseOrderRefs": [], "issueDate": "2022-12-15T00:00:00", "dueDate": "2024-01-14T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 532, "quantity": 1, "discountAmount": 0, "subTotal": 532, "taxAmount": 0, "totalAmount": 532, "discountPercentage": 0, "accountRef": {"id": "490000-933270542", "name": "Gas and Electric"}, "trackingCategoryRefs": [{"id": "80000007-1197713802", "name": "Overhead"}], "tracking": {"categoryRefs": [{"id": "80000007-1197713802", "name": "Overhead"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 532, "taxAmount": 0, "totalAmount": 532, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "9E42-1182131999", "reference": "113", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2023-01-31T00:00:00", "totalAmount": 532}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -532}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 239, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/bills"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/bills?page=2&pageSize=2"}}} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-01-18T11:02:41Z", "sourceModifiedDate": "2022-05-26T10:34:10Z", "id": "18", "reference": "12", "supplierRef": {"id": "4", "supplierName": "BILLy elliot"}, "purchaseOrderRefs": [], "issueDate": "2019-05-13T00:00:00", "dueDate": "2019-05-13T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 5, "quantity": 1, "discountAmount": 0, "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "accountRef": {"id": "16", "name": "Advertising"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "20", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-05-13T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5}}]}, {"modifiedDate": "2023-01-18T11:02:41Z", "sourceModifiedDate": "2020-03-23T10:44:06Z", "id": "22", "reference": "12", "supplierRef": {"id": "4", "supplierName": "BILLy elliot"}, "purchaseOrderRefs": [], "issueDate": "2019-05-13T00:00:00", "dueDate": "2019-05-13T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 5, "quantity": 1, "discountAmount": 0, "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "accountRef": {"id": "16", "name": "Advertising"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "678", "note": "payment note test", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-03-23T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 147, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/bills"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/bills?page=2&pageSize=2"}}} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T09:35:58Z", "sourceModifiedDate": "2023-01-26T11:20:45Z", "id": "157", "supplierRef": {"id": "57", "supplierName": "Hall's Promo Items"}, "purchaseOrderRefs": [], "issueDate": "2016-01-06T00:00:00", "dueDate": "2016-01-16T00:00:00", "currency": "HKD", "currencyRate": 0.081142, "lineItems": [{"description": "Water bottles -- generic", "unitAmount": 66.1717023, "quantity": 100, "discountAmount": 0, "subTotal": 6617.17, "taxAmount": 1323.43, "totalAmount": 7940.6, "taxRateRef": {"id": "3_Bills", "name": "20.0% S Bills", "effectiveTaxRate": 20}, "itemRef": {"id": "19", "name": "Water Bottles"}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "customerRef": {"id": "55", "companyName": "Oxon Insurance - Holiday Party"}, "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 6617.17, "taxAmount": 1323.43, "totalAmount": 7940.6, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "158", "reference": "1067", "accountRef": {"id": "81", "name": "Current"}, "currency": "HKD", "currencyRate": 0.078807, "paidOnDate": "2016-01-23T00:00:00", "totalAmount": 7940.6}, "allocation": {"currency": "HKD", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -7940.6}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:35:58Z", "sourceModifiedDate": "2016-09-13T21:19:49Z", "id": "28", "supplierRef": {"id": "57", "supplierName": "Hall's Promo Items"}, "purchaseOrderRefs": [], "issueDate": "2016-01-06T00:00:00", "dueDate": "2016-01-06T00:00:00", "currency": "HKD", "currencyRate": 0.081142, "lineItems": [{"description": "promotional items -- misc engraved items", "unitAmount": 8.25, "quantity": 75, "discountAmount": 0, "subTotal": 618.75, "taxAmount": 123.75, "totalAmount": 742.5, "taxRateRef": {"id": "3_Bills", "name": "20.0% S Bills", "effectiveTaxRate": 20}, "itemRef": {"id": "12", "name": "Misc"}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "customerRef": {"id": "59", "companyName": "Ecker Holiday event"}, "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 618.75, "taxAmount": 123.75, "totalAmount": 742.5, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "159", "reference": "1068", "accountRef": {"id": "81", "name": "Current"}, "currency": "HKD", "currencyRate": 0.078807, "paidOnDate": "2016-01-23T00:00:00", "totalAmount": 742.5}, "allocation": {"currency": "HKD", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -742.5}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 711, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/bills"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/bills?page=2&pageSize=2"}}} + Sage 200cloud: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-14T09:36:01Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45121", "reference": "Order no 1", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "purchaseOrderRefs": [], "issueDate": "2020-07-22T00:00:00Z", "dueDate": "2020-02-15T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Tax Rate 1", "unitAmount": 0, "quantity": 0, "discountAmount": 0.5, "subTotal": 0, "taxAmount": 20, "totalAmount": 20, "taxRateRef": {"id": "1729", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 2.5, "subTotal": 100, "taxAmount": 0, "totalAmount": 100, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 100, "taxAmount": 20, "totalAmount": 120, "amountDue": 120, "note": "No1", "paymentAllocations": []}, {"modifiedDate": "2022-10-14T09:36:01Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45131", "reference": "Order 2", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "purchaseOrderRefs": [], "issueDate": "2020-07-22T00:00:00Z", "dueDate": "2020-03-01T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Tax Rate 1", "unitAmount": 0, "quantity": 0, "discountAmount": 0, "subTotal": 0, "taxAmount": 31.6, "totalAmount": 31.6, "taxRateRef": {"id": "1729", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 0, "subTotal": 158, "taxAmount": 0, "totalAmount": 158, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "PartiallyPaid", "subTotal": 158, "taxAmount": 31.6, "totalAmount": 189.6, "amountDue": 179.1, "note": "No2", "paymentAllocations": [{"payment": {"id": "45391", "note": "ret1", "reference": "Return 1", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-01-20T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": 10.5}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 162, "_links": {"self": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/bills"}, "current": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/bills?page=2&pageSize=2"}}} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "92", "reference": "2569", "supplierRef": {"id": "THO001", "supplierName": "Thompsons Electricals"}, "purchaseOrderRefs": [], "issueDate": "2021-01-01T00:00:00", "dueDate": "2022-01-31T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Goods", "unitAmount": 5875, "quantity": 1, "subTotal": 5000, "taxAmount": 875, "totalAmount": 5875, "accountRef": {"id": "5000", "name": "Materials Purchased"}, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_7", "name": "Workshop"}], "tracking": {"categoryRefs": [{"id": "department_7", "name": "Workshop"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 5000, "taxAmount": 875, "totalAmount": 5875, "amountDue": 0, "note": "Goods", "paymentAllocations": [{"payment": {"id": "260", "note": "Purchase payment 260 linked to, purchase invoice 11, purchase invoice 18, purchase invoice 92, purchase invoice 93.", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 7141.98}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5875}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "93", "reference": "2570", "supplierRef": {"id": "THO001", "supplierName": "Thompsons Electricals"}, "purchaseOrderRefs": [], "issueDate": "2021-01-15T00:00:00", "dueDate": "2022-02-14T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Goods", "unitAmount": 1175, "quantity": 1, "subTotal": 1000, "taxAmount": 175, "totalAmount": 1175, "accountRef": {"id": "5000", "name": "Materials Purchased"}, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_7", "name": "Workshop"}], "tracking": {"categoryRefs": [{"id": "department_7", "name": "Workshop"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 1000, "taxAmount": 175, "totalAmount": 1175, "amountDue": 0, "note": "Goods", "paymentAllocations": [{"payment": {"id": "260", "note": "Purchase payment 260 linked to, purchase invoice 11, purchase invoice 18, purchase invoice 92, purchase invoice 93.", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 7141.98}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -1175}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 95, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/bills"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/bills?page=2&pageSize=2"}}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-24T14:56:08Z", "sourceModifiedDate": "2020-02-05T15:19:28Z", "id": "15a7a15773b011e8aaa5027d54329956", "reference": "19/06/2018 - 435.60", "supplierRef": {"id": "ca430e0d156011e8b45c025132dab352", "supplierName": "Test Supplier"}, "purchaseOrderRefs": [], "issueDate": "2018-06-19T00:00:00", "dueDate": "2018-07-19T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Consulting services", "unitAmount": 11, "quantity": 33, "subTotal": 363, "taxAmount": 72.6, "totalAmount": 435.6, "accountRef": {"id": "9a995955267a11e797950a57719b2edb", "name": "Cost of sales - goods"}, "taxRateRef": {"id": "GB_STANDARD", "name": "Standard 20.00%", "effectiveTaxRate": 20}, "itemRef": {"id": "a87b922b33de11e797950a57719b2edb", "name": "Consulting services"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "PartiallyPaid", "subTotal": 363, "taxAmount": 72.6, "totalAmount": 435.6, "amountDue": 405.6, "paymentAllocations": [{"payment": {"id": "f11134e299cb4456be096265136a7770", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5}}, {"payment": {"id": "e3e35dcda09642ca8880fc603b0a98e9", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5}}, {"payment": {"id": "d9b643b9d6e149f4b443cbc6f22fe1dd", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5}}, {"payment": {"id": "cbff2fed2f1641b7bee59f5dd68d29a1", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5}}, {"payment": {"id": "3c3ed62353cf4d148352a14027738dbe", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5}}, {"payment": {"id": "332e402b9d4b4614af82594d186f5f29", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5}}]}, {"modifiedDate": "2022-10-24T14:56:08Z", "sourceModifiedDate": "2022-02-22T13:48:56Z", "id": "09034445789211e8aaa5027d54329956", "reference": "25/06/2018 - 1,000.00", "supplierRef": {"id": "ec716559789111e8aaa5027d54329956", "supplierName": "Bagels Limited"}, "purchaseOrderRefs": [], "issueDate": "2018-06-25T00:00:00", "dueDate": "2018-07-25T00:00:00", "currency": "USD", "currencyRate": 0.752601305, "lineItems": [{"description": "Bagels", "unitAmount": 1000, "quantity": 1, "subTotal": 1000, "taxAmount": 0, "totalAmount": 1000, "accountRef": {"id": "9a995955267a11e797950a57719b2edb", "name": "Cost of sales - goods"}, "taxRateRef": {"id": "GB_ZERO", "name": "Zero Rated 0.00%", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 1000, "taxAmount": 0, "totalAmount": 1000, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "66d010243e3441ba89a793446eb9c74b", "note": "Supplier payment using credit/debit card - Test note", "accountRef": {"id": "9a25937b267a11e797950a57719b2edb", "name": "Current"}, "currency": "USD", "currencyRate": 0.734679838, "paidOnDate": "2022-02-16T00:00:00", "totalAmount": 1000}, "allocation": {"currency": "USD", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -1000}}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 4658, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/bills"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/bills?page=2&pageSize=2"}}} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-04T16:31:37Z", "sourceModifiedDate": "2022-02-23T12:06:58", "id": "4470", "reference": "test", "supplierRef": {"id": "3", "supplierName": "ADP"}, "purchaseOrderRefs": [], "issueDate": "2021-10-19T00:00:00", "dueDate": "2021-10-29T00:00:00", "currency": "GBP", "lineItems": [{"unitAmount": 25, "quantity": 1, "subTotal": 25, "taxAmount": 0, "totalAmount": 25, "accountRef": {"id": "3", "name": "Accounts Payable"}, "taxRateRef": {"id": "82", "name": "UK Purchase Goods Zero Rate", "effectiveTaxRate": 0}, "trackingCategoryRefs": [{"id": "DEPARTMENT-3", "name": "Admin"}, {"id": "LOCATION-11", "name": "Codat Test Entity"}], "tracking": {"categoryRefs": [{"id": "DEPARTMENT-3", "name": "Admin"}, {"id": "LOCATION-11", "name": "Codat Test Entity"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 25, "taxAmount": 0, "totalAmount": 25, "amountDue": 0, "note": "", "paymentAllocations": [{"payment": {"id": "4471", "note": "", "accountRef": {"id": "353", "name": "Current Account"}, "currency": "GBP", "paidOnDate": "2022-01-06T00:00:00", "totalAmount": 20}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -20}}, {"payment": {"id": "4472", "note": "", "accountRef": {"id": "353", "name": "Current Account"}, "currency": "GBP", "paidOnDate": "2022-01-06T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-04T16:31:37Z", "sourceModifiedDate": "2022-04-22T12:24:59", "id": "4705", "reference": "JohnAndRob", "supplierRef": {"id": "8", "supplierName": "Worldwide Commercial"}, "purchaseOrderRefs": [], "issueDate": "2022-02-04T00:00:00", "dueDate": "2022-02-19T00:00:00", "currency": "USD", "currencyRate": 14, "lineItems": [{"description": "Some text for a description", "unitAmount": 10, "quantity": 1, "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "accountRef": {"id": "3", "name": "Accounts Payable"}, "taxRateRef": {"id": "49", "name": "EC Purchase Goods Zero Rate", "effectiveTaxRate": 0}, "trackingCategoryRefs": [{"id": "DEPARTMENT-3", "name": "Admin"}, {"id": "LOCATION-11", "name": "Codat Test Entity"}], "tracking": {"categoryRefs": [{"id": "DEPARTMENT-3", "name": "Admin"}, {"id": "LOCATION-11", "name": "Codat Test Entity"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 10, "taxAmount": 0, "totalAmount": 10, "amountDue": 10, "note": "Some note on my bill", "paymentAllocations": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 17, "_links": {"self": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/bills"}, "current": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/bills?page=2&pageSize=2"}}} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2021-01-02T21:07:23", "id": "3945273c-cc04-479f-a4b5-1e3dc7a55ed1", "reference": "", "supplierRef": {"id": "1262c350-fe0f-40ec-aeff-41c95b4a45af", "supplierName": "DIISR - Small Business Services"}, "purchaseOrderRefs": [], "issueDate": "2021-11-19T00:00:00", "dueDate": "2021-12-20T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Half day training - Microsoft Office", "unitAmount": 1800, "quantity": 1, "discountAmount": 0, "subTotal": 1800, "taxAmount": 360, "totalAmount": 2160, "discountPercentage": 0, "accountRef": {"id": "46f9461e-788b-4906-8b74-d1ea17f6dc10", "name": "Consulting"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "itemRef": {"id": "489558f5-27b7-4f37-ad9f-d84611c2e2ab", "name": "Half day training - Microsoft Office"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Desktop/network support via email & phone.Per month fixed fee for minimum 20 hours/month.", "unitAmount": 4000, "quantity": 1, "discountAmount": 0, "subTotal": 4000, "taxAmount": 800, "totalAmount": 4800, "discountPercentage": 0, "accountRef": {"id": "f96c9458-d724-47bf-8f74-a9d5726465ce", "name": "General Expenses"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "itemRef": {"id": "f8fb7e00-5e5d-466c-aef0-15861f73d04f", "name": "Desktop/network support via email & phone"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Stationery charges", "unitAmount": 32, "quantity": 8, "discountAmount": 0, "subTotal": 256, "taxAmount": 51.2, "totalAmount": 307.2, "discountPercentage": 0, "accountRef": {"id": "cba6527d-f102-4538-b421-e483233e9d5a", "name": "Printing & Stationery"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 6056, "taxAmount": 1211.2, "totalAmount": 7267.2, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "74004690-82a1-4810-aaca-6ce575af94b4", "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-12-20T00:00:00", "totalAmount": 7267.2}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -7267.2}}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2021-01-02T21:06:22", "id": "09aa506f-cb81-4cd3-a1ea-6a0b91804d5a", "reference": "", "supplierRef": {"id": "1262c350-fe0f-40ec-aeff-41c95b4a45af", "supplierName": "DIISR - Small Business Services"}, "purchaseOrderRefs": [], "issueDate": "2022-01-17T00:00:00", "dueDate": "2022-02-17T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Half day training - Microsoft Office", "unitAmount": 1800, "quantity": 1, "discountAmount": 0, "subTotal": 1800, "taxAmount": 360, "totalAmount": 2160, "discountPercentage": 0, "accountRef": {"id": "46f9461e-788b-4906-8b74-d1ea17f6dc10", "name": "Consulting"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "itemRef": {"id": "489558f5-27b7-4f37-ad9f-d84611c2e2ab", "name": "Half day training - Microsoft Office"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Desktop/network support via email & phone.Per month fixed fee for minimum 20 hours/month.", "unitAmount": 4000, "quantity": 1, "discountAmount": 0, "subTotal": 4000, "taxAmount": 800, "totalAmount": 4800, "discountPercentage": 0, "accountRef": {"id": "f96c9458-d724-47bf-8f74-a9d5726465ce", "name": "General Expenses"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "itemRef": {"id": "f8fb7e00-5e5d-466c-aef0-15861f73d04f", "name": "Desktop/network support via email & phone"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Stationery charges", "unitAmount": 32, "quantity": 8, "discountAmount": 0, "subTotal": 256, "taxAmount": 51.2, "totalAmount": 307.2, "discountPercentage": 0, "accountRef": {"id": "cba6527d-f102-4538-b421-e483233e9d5a", "name": "Printing & Stationery"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 6056, "taxAmount": 1211.2, "totalAmount": 7267.2, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "f2062172-b444-4c8b-b797-9f4c7a4244c7", "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-02-17T00:00:00", "totalAmount": 7267.2}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -7267.2}}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 44, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/bills"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/bills?page=2&pageSize=2"}}} + Zoho Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2020-06-23T13:47:17", "id": "104957000000152027", "reference": "1", "supplierRef": {"id": "104957000000152001", "supplierName": "Mr. P N"}, "purchaseOrderRefs": [], "issueDate": "2020-06-23T00:00:00", "dueDate": "2020-06-23T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [], "withholdingTax": [], "status": "Paid", "subTotal": 0, "taxAmount": 0, "totalAmount": 10, "amountDue": 0, "paymentAllocations": []}, {"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2020-11-04T13:07:23", "id": "104957000000152067", "reference": "2", "supplierRef": {"id": "104957000000152001", "supplierName": "Mr. P N"}, "purchaseOrderRefs": [], "issueDate": "2020-06-23T00:00:00", "dueDate": "2020-06-23T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [], "withholdingTax": [], "status": "Paid", "subTotal": 0, "taxAmount": 0, "totalAmount": 12, "amountDue": 0, "paymentAllocations": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 36, "_links": {"self": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/bills"}, "current": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/bills?page=1&pageSize=2"}, "next": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/bills?page=2&pageSize=2"}}} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "400": + 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" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + 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} + get-bill: + Clear Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "7110701885" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T12:38:16Z", "sourceModifiedDate": "2023-02-14T17:09:02", "id": "81539597-e681-40c9-a4dd-ec2fffcde572", "reference": "b465a2c9-3212-4620-889b-6328ba148215", "supplierRef": {"id": "8GeHBdBZiZ", "supplierName": "DuBuque, Goyette and Franecki"}, "purchaseOrderRefs": [], "issueDate": "2022-04-29T00:00:00", "dueDate": "2022-05-06T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Grease Trap", "unitAmount": 2781.94, "quantity": 5, "discountAmount": 0, "subTotal": 13909.7, "taxAmount": 1390.97, "totalAmount": 15300.67, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "22aee6bd-4767-48c4-8a13-fdf85b91fc80", "name": "600 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1371.39, "quantity": 5, "discountAmount": 0, "subTotal": 6856.95, "taxAmount": 685.7, "totalAmount": 7542.65, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "9409d23d-1011-432e-98a4-591fcd8d5404", "name": "300 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1371.39, "quantity": 6, "discountAmount": 0, "subTotal": 8228.34, "taxAmount": 822.83, "totalAmount": 9051.17, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "9409d23d-1011-432e-98a4-591fcd8d5404", "name": "300 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 2781.94, "quantity": 3, "discountAmount": 0, "subTotal": 8345.82, "taxAmount": 834.58, "totalAmount": 9180.4, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "22aee6bd-4767-48c4-8a13-fdf85b91fc80", "name": "600 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Underground - Trapped Road Gully 450mm x 450mm", "unitAmount": 402.89, "quantity": 8, "discountAmount": 0, "subTotal": 3223.12, "taxAmount": 322.31, "totalAmount": 3545.43, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "3abf0883-03f7-44c6-bc15-1372522d25e1", "name": "Heavy Duty Hinged Gully Grating"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Underground - Drain Bottle Gullies 90 degree Rectangular", "unitAmount": 95.08, "quantity": 7, "discountAmount": 0, "subTotal": 665.56, "taxAmount": 66.56, "totalAmount": 732.12, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "6", "name": "Back Inlet Roddable Gully 90� Outlet Rectangular Grid"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Underground - Drain Bottle Gullies 90 degree Rectangular", "unitAmount": 95.08, "quantity": 1, "discountAmount": 0, "subTotal": 95.08, "taxAmount": 9.51, "totalAmount": 104.59, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "6", "name": "Back Inlet Roddable Gully 90� Outlet Rectangular Grid"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1371.39, "quantity": 2, "discountAmount": 0, "subTotal": 2742.78, "taxAmount": 274.28, "totalAmount": 3017.06, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "9409d23d-1011-432e-98a4-591fcd8d5404", "name": "300 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 2781.94, "quantity": 1, "discountAmount": 0, "subTotal": 2781.94, "taxAmount": 278.19, "totalAmount": 3060.13, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "22aee6bd-4767-48c4-8a13-fdf85b91fc80", "name": "600 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Underground - Drain Bottle Gullies 90 degree Rectangular", "unitAmount": 95.08, "quantity": 7, "discountAmount": 0, "subTotal": 665.56, "taxAmount": 66.56, "totalAmount": 732.12, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "6", "name": "Back Inlet Roddable Gully 90� Outlet Rectangular Grid"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1251.89, "quantity": 4, "discountAmount": 0, "subTotal": 5007.56, "taxAmount": 500.76, "totalAmount": 5508.32, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "51077072-d5c3-463b-9cb4-7da2e11886f9", "name": "150 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Grease Trap", "unitAmount": 1371.39, "quantity": 9, "discountAmount": 0, "subTotal": 12342.51, "taxAmount": 1234.25, "totalAmount": 13576.76, "discountPercentage": 0, "accountRef": {"id": "72df89d2-512b-4455-af51-a6b563733842", "name": "Sales"}, "taxRateRef": {"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "effectiveTaxRate": 10}, "itemRef": {"id": "9409d23d-1011-432e-98a4-591fcd8d5404", "name": "300 Litre Grease Trap"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 64864.92, "taxAmount": 6486.5, "totalAmount": 71351.42, "amountDue": 0, "note": "Bill with 12 line items, totaling 71351.42", "paymentAllocations": [{"payment": {"id": "dcb18480-8b69-44d8-aa26-268b6a80d170", "note": "Bill Payment against bill 81539597-e681-40c9-a4dd-ec2fffcde572", "accountRef": {"id": "dbcaf288-2b39-4b95-8ab3-42202ab15918", "name": "Business Current Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-05-06T00:00:00", "totalAmount": 71351.42}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-05-06T00:00:00", "totalAmount": -71351.42}}], "metadata": {"isDeleted": false}} + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" + responses: + "200": + application/json: {"modifiedDate": "2023-03-27T14:21:25Z", "sourceModifiedDate": "2022-11-02T17:02:48Z", "id": "4019ee2b-d05a-ed11-8c34-000d3a0d28a2-108276", "reference": "108276", "supplierRef": {"id": "c01217b3-89d1-ea11-bbaa-000d3a2b9185", "supplierName": "First Up Consultants"}, "purchaseOrderRefs": [], "issueDate": "2019-01-01T00:00:00", "dueDate": "2019-01-01T00:00:00", "currency": "GBP", "lineItems": [{"description": "ATHENS Desk", "unitAmount": 506.6, "quantity": 4, "discountAmount": 202.64, "subTotal": 1823.76, "taxAmount": 364.75, "totalAmount": 2188.51, "discountPercentage": 10, "accountRef": {"id": "6a1217b3-89d1-ea11-bbaa-000d3a2b9185", "name": "Inventory"}, "taxRateRef": {"id": "63bc0fb9-89d1-ea11-bbaa-000d3a2b9185", "name": "Setup for DOMESTIC / STANDARD", "effectiveTaxRate": 10}, "itemRef": {"id": "ITEM-c81217b3-89d1-ea11-bbaa-000d3a2b9185-DOMESTIC-DOMESTIC", "name": "ATHENS Desk / General Business Posting Group: 'DOMESTIC' / VAT Business Posting Group: 'DOMESTIC'"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 1823.76, "taxAmount": 364.75, "totalAmount": 2188.51, "amountDue": 2188.51, "note": "129148", "paymentAllocations": [], "metadata": {"isDeleted": false}} + Exact (Netherlands): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "7110701885" + responses: + "200": + application/json: {"modifiedDate": "2022-10-26T13:32:18Z", "sourceModifiedDate": "2020-01-03T15:06:02Z", "id": "1c55118b-793e-4437-9c13-4f554b9ca989", "reference": "19600006", "supplierRef": {"id": "5e6f49b9-6489-4b82-83e7-291d308919bb", "supplierName": "Mickey Mouse"}, "purchaseOrderRefs": [], "issueDate": "2019-12-16T00:00:00Z", "dueDate": "2019-11-09T00:00:00Z", "currency": "EUR", "currencyRate": 1, "lineItems": [{"description": "Cheesecake", "unitAmount": 10, "quantity": 1, "discountAmount": 0, "subTotal": 10, "taxAmount": 2.1, "totalAmount": 12.1, "accountRef": {"id": "5f139759-b554-4314-862e-b9d88e5b2e1b", "name": "Af te dragen loonheffing"}, "taxRateRef": {"id": "84277189-ad16-456c-b501-ca31f0a483cc", "name": "BTW prive gebruik", "effectiveTaxRate": 21}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 10, "taxAmount": 2.1, "totalAmount": 12.1, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "d9a2980b-2a43-46f2-9c7f-413d925b3cdd", "reference": "20200032", "accountRef": {"id": "d79d65bd-1d7d-4f55-95d3-76b3a7b7b823", "name": "Bank 1"}, "currency": "EUR", "currencyRate": 1, "paidOnDate": "2021-03-22T00:00:00", "totalAmount": 12.1}, "allocation": {"currency": "EUR", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -12.1}}]} + Exact (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "EILBDVJVNUAGVKRQ" + responses: + "200": + application/json: {"modifiedDate": "2022-10-26T13:33:20Z", "sourceModifiedDate": "2019-01-11T14:18:17Z", "id": "e7a45898-2db3-424c-acb9-a51647740f26", "reference": "17600002", "supplierRef": {"id": "a7cad20d-44db-442b-ac1f-90475802d6fb", "supplierName": "Pencils Pencils Pencils"}, "purchaseOrderRefs": [], "issueDate": "2017-09-26T00:00:00Z", "dueDate": "2017-10-26T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Stationery", "unitAmount": 400, "quantity": 2, "discountAmount": 0, "subTotal": 800, "taxAmount": 160, "totalAmount": 960, "accountRef": {"id": "e5e9e994-0f14-4614-b162-7b5593b21276", "name": "Finished Goods Stock"}, "taxRateRef": {"id": "63cd143a-66ab-4320-8a6d-ab6be85ed048", "name": "UK purchases standard rate � Excluding", "effectiveTaxRate": 20}, "itemRef": {"id": "001"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 800, "taxAmount": 160, "totalAmount": 960, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "7a5f621b-739f-4ed8-b738-2aae3ef886ac", "reference": "17200006", "accountRef": {"id": "4a4e34b5-7f62-4b64-a44a-073398b14b41", "name": "Bank"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2017-10-11T00:00:00", "totalAmount": 123}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -123}}]} + FreeAgent: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "7110701885" + responses: + "200": + application/json: {"modifiedDate": "2023-04-25T14:19:10Z", "sourceModifiedDate": "2020-11-11T12:48:55Z", "id": "16609552", "reference": "MATT - U", "supplierRef": {"id": "7169654", "supplierName": "The Eagle"}, "purchaseOrderRefs": [], "issueDate": "2014-08-21T00:00:00", "dueDate": "2018-09-20T00:00:00", "currency": "GBP", "lineItems": [{"unitAmount": 125, "quantity": 1, "taxAmount": 25, "totalAmount": 150, "accountRef": {"id": "285", "name": "Accommodation and Meals"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 125, "taxAmount": 25, "totalAmount": 150, "amountDue": 150, "paymentAllocations": [], "metadata": {"isDeleted": false}} + FreshBooks: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "EILBDVJVNUAGVKRQ" + responses: + "200": + application/json: {"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2021-04-26T19:34:22", "id": "27", "supplierRef": {"id": "87"}, "purchaseOrderRefs": [], "issueDate": "2021-04-26T00:00:00", "dueDate": "2021-05-26T00:00:00", "currency": "USD", "lineItems": [{"description": "Grocery", "unitAmount": 50, "quantity": 1, "subTotal": 50, "taxAmount": 0, "totalAmount": 50, "accountRef": {"id": "3384197", "name": "Advertising"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 50, "taxAmount": 0, "totalAmount": 50, "amountDue": 50, "paymentAllocations": [], "metadata": {"isDeleted": false}} + KashFlow: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "7110701885" + responses: + "200": + application/json: {"modifiedDate": "2022-09-30T10:29:15Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "97615244", "reference": "25", "supplierRef": {"id": "9272052", "supplierName": "Supplier man"}, "purchaseOrderRefs": [], "issueDate": "2000-01-01T00:00:00", "dueDate": "2000-01-01T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "", "unitAmount": 8.33, "quantity": 1, "subTotal": 8.33, "taxAmount": 1.67, "totalAmount": 10, "accountRef": {"id": "21481884", "name": "Computer equipment cost"}, "itemRef": {"id": "122990246"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 8.33, "taxAmount": 1.67, "totalAmount": 10, "amountDue": 0, "paymentAllocations": []} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" + responses: + "200": + application/json: {"modifiedDate": "2023-01-30T14:47:34Z", "sourceModifiedDate": "2022-07-05T13:38:10", "id": "7", "supplierRef": {"id": "724", "supplierName": "Vendor A.A.A"}, "purchaseOrderRefs": [], "issueDate": "2021-03-26T00:00:00", "dueDate": "2021-03-26T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 120, "quantity": 1, "unitOfMeasurement": "litre", "subTotal": 120, "totalAmount": 120, "accountRef": {"id": "716", "name": "Inventory In Transit"}, "trackingCategoryRefs": [{"id": "location-4", "name": "Europe"}], "tracking": {"categoryRefs": [{"id": "location-4", "name": "Europe"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "PartiallyPaid", "subTotal": 120, "taxAmount": 24, "totalAmount": 144, "amountDue": 24, "paymentAllocations": [{"payment": {"id": "112", "reference": "Bill Payment #1", "accountRef": {"id": "825", "name": "Codat Europe Bank"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-03-26T00:00:00", "totalAmount": 120}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -120}}]} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "EILBDVJVNUAGVKRQ" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T09:06:42Z", "sourceModifiedDate": "2023-12-16T05:06:30", "id": "3691-1071520776", "reference": "3847498", "supplierRef": {"id": "B0000-933272656", "supplierName": "Patton Hardware Supplies"}, "purchaseOrderRefs": [{"id": "3684-1071520443", "purchaseOrderNumber": "6225"}], "issueDate": "2022-12-02T00:00:00", "dueDate": "2024-01-01T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Cabinets:Light Pine - Light pine kitchen cabinet wall unit \n#CLD- 1235-p", "unitAmount": 1500, "quantity": 5, "discountAmount": 0, "subTotal": 7500, "taxAmount": 0, "totalAmount": 7500, "discountPercentage": 0, "accountRef": {"id": "C0000-933270541", "name": "Accounts Payable"}, "itemRef": {"id": "110000-933272656", "name": "Cabinets:Light Pine"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}, {"description": "Hardware:Doorknobs Std - Doorknobs Part # DK 3704", "unitAmount": 27, "quantity": 100, "discountAmount": 0, "subTotal": 2700, "taxAmount": 0, "totalAmount": 2700, "discountPercentage": 0, "accountRef": {"id": "C0000-933270541", "name": "Accounts Payable"}, "itemRef": {"id": "130000-933272656", "name": "Hardware:Doorknobs Std"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}, {"description": "Hardware:Lk Doorknobs - Locking interior doorknobs Part # DK415", "unitAmount": 34.95, "quantity": 100, "discountAmount": 0, "subTotal": 3495, "taxAmount": 0, "totalAmount": 3495, "discountPercentage": 0, "accountRef": {"id": "C0000-933270541", "name": "Accounts Payable"}, "itemRef": {"id": "140000-933272656", "name": "Hardware:Lk Doorknobs"}, "trackingCategoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "tracking": {"categoryRefs": [{"id": "10000-933272658", "name": "New Construction"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 13695, "taxAmount": 0, "totalAmount": 13695, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "36AD-1071520917", "note": "RC 93", "reference": "484", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2024-12-05T00:00:00", "totalAmount": 5325}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5000}}, {"payment": {"id": "9E4C-1182131999", "reference": "115", "accountRef": {"id": "20000-933270541", "name": "Checking"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2023-01-31T00:00:00", "totalAmount": 13759}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -8695}}], "metadata": {"isDeleted": false}} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "EILBDVJVNUAGVKRQ" + responses: + "200": + application/json: {"modifiedDate": "2023-01-18T11:02:41Z", "sourceModifiedDate": "2022-05-26T10:34:10Z", "id": "18", "reference": "12", "supplierRef": {"id": "4", "supplierName": "BILLy elliot"}, "purchaseOrderRefs": [], "issueDate": "2019-05-13T00:00:00", "dueDate": "2019-05-13T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"unitAmount": 5, "quantity": 1, "discountAmount": 0, "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "accountRef": {"id": "16", "name": "Advertising"}, "taxRateRef": {"id": "NON", "name": "NON", "effectiveTaxRate": 0}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 5, "taxAmount": 0, "totalAmount": 5, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "20", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2019-05-13T00:00:00", "totalAmount": 0}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5}}]} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T09:35:58Z", "sourceModifiedDate": "2023-01-26T11:20:45Z", "id": "157", "supplierRef": {"id": "57", "supplierName": "Hall's Promo Items"}, "purchaseOrderRefs": [], "issueDate": "2016-01-06T00:00:00", "dueDate": "2016-01-16T00:00:00", "currency": "HKD", "currencyRate": 0.081142, "lineItems": [{"description": "Water bottles -- generic", "unitAmount": 66.1717023, "quantity": 100, "discountAmount": 0, "subTotal": 6617.17, "taxAmount": 1323.43, "totalAmount": 7940.6, "taxRateRef": {"id": "3_Bills", "name": "20.0% S Bills", "effectiveTaxRate": 20}, "itemRef": {"id": "19", "name": "Water Bottles"}, "trackingCategoryRefs": [], "tracking": {"categoryRefs": [], "customerRef": {"id": "55", "companyName": "Oxon Insurance - Holiday Party"}, "isBilledTo": "Unknown", "isRebilledTo": "NotApplicable"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 6617.17, "taxAmount": 1323.43, "totalAmount": 7940.6, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "158", "reference": "1067", "accountRef": {"id": "81", "name": "Current"}, "currency": "HKD", "currencyRate": 0.078807, "paidOnDate": "2016-01-23T00:00:00", "totalAmount": 7940.6}, "allocation": {"currency": "HKD", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -7940.6}}], "metadata": {"isDeleted": false}} + Sage 200cloud: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "7110701885" + responses: + "200": + application/json: {"modifiedDate": "2022-10-14T09:36:01Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "45121", "reference": "Order no 1", "supplierRef": {"id": "CON001", "supplierName": "Concept Stationery Supplies"}, "purchaseOrderRefs": [], "issueDate": "2020-07-22T00:00:00Z", "dueDate": "2020-02-15T00:00:00Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Tax Summary - Tax Rate 1", "unitAmount": 0, "quantity": 0, "discountAmount": 0.5, "subTotal": 0, "taxAmount": 20, "totalAmount": 20, "taxRateRef": {"id": "1729", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Goods Summary", "unitAmount": 0, "quantity": 0, "discountAmount": 2.5, "subTotal": 100, "taxAmount": 0, "totalAmount": 100, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 100, "taxAmount": 20, "totalAmount": 120, "amountDue": 120, "note": "No1", "paymentAllocations": []} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2" + responses: + "200": + application/json: {"modifiedDate": "2023-03-30T14:42:44Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "92", "reference": "2569", "supplierRef": {"id": "THO001", "supplierName": "Thompsons Electricals"}, "purchaseOrderRefs": [], "issueDate": "2021-01-01T00:00:00", "dueDate": "2022-01-31T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Goods", "unitAmount": 5875, "quantity": 1, "subTotal": 5000, "taxAmount": 875, "totalAmount": 5875, "accountRef": {"id": "5000", "name": "Materials Purchased"}, "taxRateRef": {"id": "1", "name": "Standard rate", "effectiveTaxRate": 20}, "trackingCategoryRefs": [{"id": "department_7", "name": "Workshop"}], "tracking": {"categoryRefs": [{"id": "department_7", "name": "Workshop"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 5000, "taxAmount": 875, "totalAmount": 5875, "amountDue": 0, "note": "Goods", "paymentAllocations": [{"payment": {"id": "260", "note": "Purchase payment 260 linked to, purchase invoice 11, purchase invoice 18, purchase invoice 92, purchase invoice 93.", "currency": "GBP", "currencyRate": 1, "paidOnDate": "2022-01-29T00:00:00", "totalAmount": 7141.98}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5875}}], "metadata": {"isDeleted": false}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2" + responses: + "200": + application/json: {"modifiedDate": "2022-10-24T14:56:08Z", "sourceModifiedDate": "2020-02-05T15:19:28Z", "id": "15a7a15773b011e8aaa5027d54329956", "reference": "19/06/2018 - 435.60", "supplierRef": {"id": "ca430e0d156011e8b45c025132dab352", "supplierName": "Test Supplier"}, "purchaseOrderRefs": [], "issueDate": "2018-06-19T00:00:00", "dueDate": "2018-07-19T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Consulting services", "unitAmount": 11, "quantity": 33, "subTotal": 363, "taxAmount": 72.6, "totalAmount": 435.6, "accountRef": {"id": "9a995955267a11e797950a57719b2edb", "name": "Cost of sales - goods"}, "taxRateRef": {"id": "GB_STANDARD", "name": "Standard 20.00%", "effectiveTaxRate": 20}, "itemRef": {"id": "a87b922b33de11e797950a57719b2edb", "name": "Consulting services"}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "PartiallyPaid", "subTotal": 363, "taxAmount": 72.6, "totalAmount": 435.6, "amountDue": 405.6, "paymentAllocations": [{"payment": {"id": "332e402b9d4b4614af82594d186f5f29", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5}}, {"payment": {"id": "3c3ed62353cf4d148352a14027738dbe", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5}}, {"payment": {"id": "cbff2fed2f1641b7bee59f5dd68d29a1", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5}}, {"payment": {"id": "d9b643b9d6e149f4b443cbc6f22fe1dd", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5}}, {"payment": {"id": "e3e35dcda09642ca8880fc603b0a98e9", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5}}, {"payment": {"id": "f11134e299cb4456be096265136a7770", "note": "Supplier payment using credit/debit card - string", "accountRef": {"id": "92b80ba619d34cafbedd0eb2e69a82f7", "name": "ozzbtdynvoblhytjolxaiohrtrhtpvndiqncpjtcjzwcddpvzl"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2020-02-05T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5}}]} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2" + responses: + "200": + application/json: {"modifiedDate": "2023-04-04T16:31:37Z", "sourceModifiedDate": "2022-02-23T12:06:58", "id": "4470", "reference": "test", "supplierRef": {"id": "3", "supplierName": "ADP"}, "purchaseOrderRefs": [], "issueDate": "2021-10-19T00:00:00", "dueDate": "2021-10-29T00:00:00", "currency": "GBP", "lineItems": [{"unitAmount": 25, "quantity": 1, "subTotal": 25, "taxAmount": 0, "totalAmount": 25, "accountRef": {"id": "3", "name": "Accounts Payable"}, "taxRateRef": {"id": "82", "name": "UK Purchase Goods Zero Rate", "effectiveTaxRate": 0}, "trackingCategoryRefs": [{"id": "DEPARTMENT-3", "name": "Admin"}, {"id": "LOCATION-11", "name": "Codat Test Entity"}], "tracking": {"categoryRefs": [{"id": "DEPARTMENT-3", "name": "Admin"}, {"id": "LOCATION-11", "name": "Codat Test Entity"}], "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 25, "taxAmount": 0, "totalAmount": 25, "amountDue": 0, "note": "", "paymentAllocations": [{"payment": {"id": "4472", "note": "", "accountRef": {"id": "353", "name": "Current Account"}, "currency": "GBP", "paidOnDate": "2022-01-06T00:00:00", "totalAmount": 5}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -5}}, {"payment": {"id": "4471", "note": "", "accountRef": {"id": "353", "name": "Current Account"}, "currency": "GBP", "paidOnDate": "2022-01-06T00:00:00", "totalAmount": 20}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -20}}], "metadata": {"isDeleted": false}} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "EILBDVJVNUAGVKRQ" + responses: + "200": + application/json: {"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2021-01-02T21:07:23", "id": "3945273c-cc04-479f-a4b5-1e3dc7a55ed1", "reference": "", "supplierRef": {"id": "1262c350-fe0f-40ec-aeff-41c95b4a45af", "supplierName": "DIISR - Small Business Services"}, "purchaseOrderRefs": [], "issueDate": "2021-11-19T00:00:00", "dueDate": "2021-12-20T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Half day training - Microsoft Office", "unitAmount": 1800, "quantity": 1, "discountAmount": 0, "subTotal": 1800, "taxAmount": 360, "totalAmount": 2160, "discountPercentage": 0, "accountRef": {"id": "46f9461e-788b-4906-8b74-d1ea17f6dc10", "name": "Consulting"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "itemRef": {"id": "489558f5-27b7-4f37-ad9f-d84611c2e2ab", "name": "Half day training - Microsoft Office"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Desktop/network support via email & phone.Per month fixed fee for minimum 20 hours/month.", "unitAmount": 4000, "quantity": 1, "discountAmount": 0, "subTotal": 4000, "taxAmount": 800, "totalAmount": 4800, "discountPercentage": 0, "accountRef": {"id": "f96c9458-d724-47bf-8f74-a9d5726465ce", "name": "General Expenses"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "itemRef": {"id": "f8fb7e00-5e5d-466c-aef0-15861f73d04f", "name": "Desktop/network support via email & phone"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Stationery charges", "unitAmount": 32, "quantity": 8, "discountAmount": 0, "subTotal": 256, "taxAmount": 51.2, "totalAmount": 307.2, "discountPercentage": 0, "accountRef": {"id": "cba6527d-f102-4538-b421-e483233e9d5a", "name": "Printing & Stationery"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Paid", "subTotal": 6056, "taxAmount": 1211.2, "totalAmount": 7267.2, "amountDue": 0, "paymentAllocations": [{"payment": {"id": "74004690-82a1-4810-aaca-6ce575af94b4", "accountRef": {"id": "bd9e85e0-0478-433d-ae9f-0b3c4f04bfe4", "name": "Business Bank Account"}, "currency": "GBP", "currencyRate": 1, "paidOnDate": "2021-12-20T00:00:00", "totalAmount": 7267.2}, "allocation": {"currency": "GBP", "currencyRate": 1, "allocatedOnDate": "2022-10-23T00:00:00Z", "totalAmount": -7267.2}}], "metadata": {"isDeleted": false}} + Zoho Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" + responses: + "200": + application/json: {"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2020-06-23T13:47:17", "id": "104957000000152027", "reference": "1", "supplierRef": {"id": "104957000000152001", "supplierName": "Mr. P N"}, "purchaseOrderRefs": [], "issueDate": "2020-06-23T00:00:00", "dueDate": "2020-06-23T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [], "withholdingTax": [], "status": "Paid", "subTotal": 0, "taxAmount": 0, "totalAmount": 10, "amountDue": 0, "paymentAllocations": []} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + billId: "13d946f0-c5d5-42bc-b092-97ece17923ab" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + get-create-update-bill-model: + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Bill", "description": "A bill is an itemised record of goods purchased from or services provided by a supplier", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the bill has been received from", "required": true}, "status": {"type": "String", "displayName": "Bill Status", "description": "The current state of the bill", "required": true, "options": [{"value": "Draft", "type": "Array", "displayName": "Draft", "required": false}, {"value": "Void", "type": "Array", "displayName": "Void", "required": false}, {"value": "Open", "type": "Array", "displayName": "Open", "required": false}]}, "dueDate": {"type": "DateTime", "displayName": "Due Date", "description": "The date the bill is due to be paid by", "required": true}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date of the bill as recorded in the originating system.", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "Note about the bill", "required": true, "validation": {"warnings": [{"field": "Note", "details": "Supplier Invoice Number must be specified in this field"}], "information": []}}, "lineItems": {"type": "Array", "displayName": "Line Items", "description": "A collection of lines that detail items related to the bill", "required": true}}} + FreeAgent: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Bill", "description": "A bill is an itemised record of goods purchased from or services provided by a supplier", "required": true, "properties": {"reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the bill", "required": true}, "supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the bill has been received from", "required": true}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The amount of the bill, inclusive of tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Must be greater than or equal to 0 and must be equal to the total value of the bill item total amounts."}], "information": []}}, "lineItems": {"type": "Array", "displayName": "Line Items", "description": "A collection of lines that detail items related to the bill", "required": true, "validation": {"warnings": [{"field": "LineItems", "details": "Must contain at least one line item and up to a maximum of 40 line items allowed."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the bill", "required": false, "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}], "validation": {"warnings": [], "information": [{"field": "Currency", "details": "If not specified, defaults to the company's native currency"}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the bill and the base currency of the company", "required": false}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The total amount of tax on the bill", "required": true, "validation": {"warnings": [{"field": "TaxAmount", "details": "Must be greater than or equal to 0, less than or equal to the Bill.TotalAmount and equal to the total value of the bill item tax amounts."}], "information": []}}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date of the bill as recorded in the originating system.", "required": true}, "dueDate": {"type": "DateTime", "displayName": "Due Date", "description": "The date the bill is due to be paid by", "required": true}}} + MYOB AccountRight and Essentials: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Bill", "description": "A bill is an itemised record of goods purchased from or services provided by a supplier", "required": true, "properties": {"totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The amount of the bill, inclusive of tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Precision must be maximum of two decimal places."}, {"field": "TotalAmount", "details": "Must be greater than zero."}], "information": [{"field": "TotalAmount", "details": "Must be provided."}]}}, "reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the bill", "required": false, "validation": {"warnings": [], "information": [{"field": "Reference", "details": "Must not be greater than 8 characters long."}]}}, "subTotal": {"type": "Number", "displayName": "Sub Total Amount", "description": "The total amount of the bill excluding any taxes", "required": false, "validation": {"warnings": [{"field": "SubTotal", "details": "Precision must be maximum of two decimal places."}], "information": []}}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The total amount of tax on the bill", "required": false, "validation": {"warnings": [{"field": "TaxAmount", "details": "Precision must be maximum of two decimal places."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the bill", "required": true, "options": [{"value": "AUD", "type": "String", "displayName": "Australian Dollar", "required": false}], "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Must be provided."}]}}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date of the bill as recorded in the originating system.", "required": true, "validation": {"warnings": [], "information": [{"field": "IssueDate", "details": "Must not be before the due date."}]}}, "dueDate": {"type": "DateTime", "displayName": "Due Date", "description": "The date the bill is due to be paid by", "required": true, "validation": {"warnings": [], "information": [{"field": "DueDate", "details": "Must be provided."}]}}, "supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the bill has been received from", "required": true, "validation": {"warnings": [], "information": [{"field": "SupplierRef", "details": "Must be provided."}]}}, "amountDue": {"type": "Number", "displayName": "Amount Due", "description": "The amount outstanding on the bill", "required": false, "validation": {"warnings": [{"field": "AmountDue", "details": "Precision must be maximum of two decimal places."}], "information": [{"field": "AmountDue", "details": "Must be at least zero and no more than that the total amount."}]}}, "lineItems": {"type": "Array", "displayName": "Line Items", "description": "A collection of lines that detail items related to the bill", "required": true, "validation": {"warnings": [], "information": [{"field": "LineItems", "details": "Must be provided."}]}}}} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Bill", "description": "A bill is an itemised record of goods purchased from or services provided by a supplier", "required": true, "properties": {"reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the bill", "required": false}, "supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the bill has been received from", "required": true}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date of the bill as recorded in the originating system.", "required": false}, "dueDate": {"type": "DateTime", "displayName": "Due Date", "description": "The date the bill is due to be paid by", "required": false}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the bill", "required": true}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the bill and the base currency of the company", "required": true}, "status": {"type": "String", "displayName": "Bill Status", "description": "The current state of the bill", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "Note about the bill", "required": false}, "lineItems": {"type": "Array", "displayName": "Line Items", "description": "A collection of lines that detail items related to the bill", "required": true}}, "options": [{"value": "Open", "type": "String", "displayName": "Open", "required": false}]} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Bill", "description": "A bill is an itemised record of goods purchased from or services provided by a supplier", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the bill has been received from", "required": true}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date of the bill as recorded in the originating system.", "required": true}, "dueDate": {"type": "DateTime", "displayName": "Due Date", "description": "The date the bill is due to be paid by", "required": false}, "reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the bill", "required": false, "validation": {"warnings": [{"field": "Reference", "details": "Max length of 20 characters."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the bill", "required": false, "validation": {"warnings": [{"field": "Currency", "details": "Must be a three letter ISO code that matches the currency of the supplier"}, {"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 default currency of the supplier"}]}}, "note": {"type": "String", "displayName": "Note", "description": "Note about the bill", "required": false, "validation": {"warnings": [{"field": "Note", "details": "Max length of 4000 characters."}], "information": []}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the bill and the base currency of the company", "required": false, "validation": {"warnings": [], "information": [{"field": "CurrencyRate", "details": "If not set, will default to the rate set within QuickBooks Desktop, if no rate is set in QuickBooks Desktop, it will default to 1."}, {"field": "CurrencyRate", "details": "Can only be set if the Quickbooks Desktop company has Multicurrency enabled."}]}}, "status": {"type": "String", "displayName": "Bill Status", "description": "The current state of the bill", "required": true, "options": [{"value": "Open", "type": "String", "displayName": "Open", "required": false}, {"value": "Paid", "type": "String", "displayName": "Paid", "required": false}, {"value": "Void", "type": "String", "displayName": "Void", "required": false}], "validation": {"warnings": [{"field": "Status", "details": "If a bill is pushed with a total amount of 0, then the status must be Paid or Void"}], "information": [{"field": "Status", "details": "If a bill is pushed with a status of void, then all the amounts in the bill must be 0"}, {"field": "Status", "details": "If a bill is pushed without payment allocations, then the status must be Open, if pushed with payment allocations, then the status must be paid"}]}}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The total amount of tax on the bill", "required": true, "validation": {"warnings": [{"field": "TaxAmount", "details": "Cannot be mapped directly into QuickBooks Desktop and will only be used for validation purposes"}, {"field": "TaxAmount", "details": "Must match sum of total of tax from the line items"}], "information": []}}, "subTotal": {"type": "Number", "displayName": "Sub Total Amount", "description": "The total amount of the bill excluding any taxes", "required": true, "validation": {"warnings": [{"field": "SubTotal", "details": "Must match the totalAmount - taxAmount"}], "information": []}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The amount of the bill, inclusive of tax", "required": true, "validation": {"warnings": [{"field": "TotalAmount", "details": "Must match the sum of line items ((quantity * unit price) - discount + tax)"}], "information": [{"field": "TotalAmount", "details": "If a bill is pushed with a total amount of 0, it will automatically be marked as paid in QuickBooks Desktop"}]}}, "lineItems": {"type": "Array", "displayName": "Line Items", "description": "A collection of lines that detail items related to the bill", "required": true}, "paymentAllocations": {"type": "Array", "displayName": "Payment Allocations", "description": "A collection of payments allocated to the bill", "required": false, "validation": {"warnings": [{"field": "PaymentAllocations", "details": "A maximum of one payment allocation may be provided per bill"}], "information": [{"field": "PaymentAllocations", "details": "If a payment allocation is provided, a credit card charge will created in QuickBooksDesktop, if left as null or empty, a {topLevelItem} will be created"}]}}}} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Bill", "description": "A bill is an itemised record of goods purchased from or services provided by a supplier", "required": true, "properties": {"dueDate": {"type": "DateTime", "displayName": "Due Date", "description": "The date the bill is due to be paid by", "required": true}, "reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the bill", "required": false, "validation": {"warnings": [], "information": [{"field": "Reference", "details": "Should be unique if WarnDuplicateBillNumber setting is On."}, {"field": "Reference", "details": "Should not be longer than 21 characters."}]}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the bill", "required": true, "options": [{"value": "USD", "type": "String", "displayName": "USD", "required": false}], "validation": {"warnings": [], "information": [{"field": "Currency", "details": "Required if multi-currency is enabled for the company."}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the bill and the base currency of the company", "required": false, "validation": {"warnings": [], "information": [{"field": "CurrencyRate", "details": "Required if Currency is not the base currency."}]}}, "supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the bill has been received from", "required": true}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date of the bill as recorded in the originating system.", "required": false, "validation": {"warnings": [], "information": [{"field": "IssueDate", "details": "If the issue date is not supplied, the current date on the server is used."}]}}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The amount of the bill, inclusive of tax", "required": false}, "subTotal": {"type": "Number", "displayName": "Sub Total Amount", "description": "The total amount of the bill excluding any taxes", "required": false}, "paymentAllocations": {"type": "Array", "displayName": "Payment Allocations", "description": "A collection of payments allocated to the bill", "required": false, "validation": {"warnings": [{"field": "PaymentAllocations", "details": "Payment Allocations are no longer valid for Bills and must not be provided, use the DirectCost data type to push Expenses."}], "information": []}}, "note": {"type": "String", "displayName": "Note", "description": "Note about the bill", "required": false}, "lineItems": {"type": "Array", "displayName": "Line Items", "description": "A collection of lines that detail items related to the bill", "required": true}}} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Bill", "description": "A bill is an itemised record of goods purchased from or services provided by a supplier", "required": true, "properties": {"issueDate": {"type": "DateTime", "displayName": "Date", "description": "Date when the bill was issued.", "required": true}, "dueDate": {"type": "DateTime", "displayName": "Due Date", "description": "Date when the bill is due.", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "The currency in which the bill is issued in.", "required": true, "validation": {"warnings": [{"field": "currency", "details": "This must match the supplier's default currency."}], "information": []}}, "status": {"type": "String", "displayName": "Status", "description": "The status of the bill", "required": false, "options": [{"value": "Open", "type": "String", "displayName": "Open", "required": false}], "validation": {"warnings": [], "information": [{"field": "status", "details": "If this is not set, it will default to 'Open'."}]}}, "supplierRef": {"type": "Object", "displayName": "Supplier", "description": "Supplier on the bill.", "required": true}, "reference": {"type": "String", "displayName": "Bill Reference", "description": "The reference to the bill.", "required": false, "validation": {"warnings": [{"field": "reference", "details": "Max length of 30 characters."}], "information": []}}, "note": {"type": "String", "displayName": "Note", "description": "To be used for any additional information associated with the Bill line item.", "required": false, "validation": {"warnings": [{"field": "note", "details": "Maximum 60 characters"}], "information": []}}, "lineItems": {"type": "Array", "displayName": "Line Items", "description": "Line items of the bill.", "required": true}}, "validation": {"warnings": [], "information": [{"details": "Pushing to Sage 50 2015 (v21) or below is not supported. To enable push, please upgrade to at least Sage 50 2016 (v22) and re-sync the company."}]}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Bill", "description": "A bill is an itemised record of goods purchased from or services provided by a supplier", "required": true, "properties": {"issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date of the bill as recorded in the originating system.", "required": true, "validation": {"warnings": [], "information": [{"field": "IssueDate", "details": "Must be provided."}]}}, "dueDate": {"type": "DateTime", "displayName": "Due Date", "description": "The date the bill is due to be paid by", "required": true, "validation": {"warnings": [], "information": [{"field": "DueDate", "details": "Must be provided."}]}}, "supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the bill has been received from", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the bill", "required": false, "validation": {"warnings": [], "information": [{"field": "Currency", "details": "If supplied, must match the currency of the supplier."}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the bill and the base currency of the company", "required": false}, "reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the bill", "required": false, "validation": {"warnings": [{"field": "Reference", "details": "Should not be longer than 25 characters."}], "information": []}}, "note": {"type": "String", "displayName": "Note", "description": "Note about the bill", "required": false, "validation": {"warnings": [{"field": "Note", "details": "Should not be longer than 2000 characters."}], "information": []}}, "lineItems": {"type": "Array", "displayName": "Line Items", "description": "A collection of lines that detail items related to the bill", "required": true}}} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Bill", "description": "A bill is an itemised record of goods purchased from or services provided by a supplier", "required": true, "properties": {"id": {"type": "String", "displayName": "Identifier", "description": "The identifier for the bill, unique for the company", "required": false, "validation": {"warnings": [{"field": "Id", "details": "Not supported for account based line items. Required for item based line items. A unique number for the bill will be appended to the value supplied, to ensure the ID is unique."}], "information": []}}, "reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the bill", "required": true, "validation": {"warnings": [{"field": "Reference", "details": "For account based line items, must be between 1 and 100 characters. For item based line items, must be between 1 and 45 characters."}], "information": []}}, "supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the bill has been received from", "required": true}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date of the bill as recorded in the originating system.", "required": true}, "dueDate": {"type": "DateTime", "displayName": "Due Date", "description": "The date the bill is due to be paid by", "required": false, "validation": {"warnings": [{"field": "DueDate", "details": "For item based line items, must be provided and must not be earlier than IssueDate."}], "information": []}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the bill", "required": false, "options": [{"value": "AUD", "type": "String", "displayName": "Australian Dollar", "required": false}, {"value": "CAD", "type": "String", "displayName": "Canadian Dollar", "required": false}, {"value": "GBP", "type": "String", "displayName": "Pound Sterling", "required": false}, {"value": "USD", "type": "String", "displayName": "US Dollar", "required": false}, {"value": "ZAR", "type": "String", "displayName": "Rand", "required": false}], "validation": {"warnings": [{"field": "Currency", "details": "Must be provided if CurrencyRate is set."}], "information": []}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the bill and the base currency of the company", "required": false, "validation": {"warnings": [{"field": "CurrencyRate", "details": "Must be greater than 0."}], "information": []}}, "note": {"type": "String", "displayName": "Note", "description": "Note about the bill", "required": false, "validation": {"warnings": [{"field": "Note", "details": "Is not supported for item based line items."}], "information": []}}, "status": {"type": "String", "displayName": "Bill Status", "description": "The current state of the bill", "required": false, "validation": {"warnings": [{"field": "Status", "details": "Must be provided for item based line items."}], "information": []}}, "lineItems": {"type": "Array", "displayName": "Line Items", "description": "A collection of lines that detail items related to the bill", "required": true, "validation": {"warnings": [{"field": "LineItems", "details": "Must either all be account based or all be item based."}], "information": []}}}} + Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Bill", "description": "A bill is an itemised record of goods purchased from or services provided by a supplier", "required": true, "properties": {"reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the bill", "required": true}, "supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the bill has been received from", "required": true}, "purchaseOrderRefs": {"type": "Array", "displayName": "Purchase Order References", "description": "List of References to the purchase order the bill was created from.", "required": true}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date of the bill as recorded in the originating system.", "required": true}, "dueDate": {"type": "DateTime", "displayName": "Due Date", "description": "The date the bill is due to be paid by", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the bill", "required": true}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the bill and the base currency of the company", "required": true}, "lineItems": {"type": "Array", "displayName": "Line Items", "description": "A collection of lines that detail items related to the bill", "required": true}, "withholdingTax": {"type": "Array", "displayName": "Withholding Tax", "description": "A collection of tax deductions", "required": true}, "status": {"type": "String", "displayName": "Bill Status", "description": "The current state of the bill", "required": true}, "subTotal": {"type": "Number", "displayName": "Sub Total Amount", "description": "The total amount of the bill excluding any taxes", "required": true}, "taxAmount": {"type": "Number", "displayName": "Tax Amount", "description": "The total amount of tax on the bill", "required": true}, "totalAmount": {"type": "Number", "displayName": "Total Amount", "description": "The amount of the bill, inclusive of tax", "required": true}, "amountDue": {"type": "Number", "displayName": "Amount Due", "description": "The amount outstanding on the bill", "required": true}, "note": {"type": "String", "displayName": "Note", "description": "Note about the bill", "required": true}, "paymentAllocations": {"type": "Array", "displayName": "Payment Allocations", "description": "A collection of payments allocated to the bill", "required": true}, "metadata": {"type": "Object", "displayName": "Metadata", "description": "Miscellaneous data about the item", "required": true}}} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Bill", "description": "A bill is an itemised record of goods purchased from or services provided by a supplier", "required": true, "properties": {"issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date of the bill as recorded in the originating system.", "required": true, "validation": {"warnings": [], "information": [{"field": "IssueDate", "details": "Must be provided."}]}}, "dueDate": {"type": "DateTime", "displayName": "Due Date", "description": "The date the bill is due to be paid by", "required": true, "validation": {"warnings": [], "information": [{"field": "DueDate", "details": "Must be provided."}]}}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the bill", "required": false}, "reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the bill", "required": false, "validation": {"warnings": [], "information": [{"field": "Reference", "details": "Must not exceed 255 charaters long."}]}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the bill and the base currency of the company", "required": false, "validation": {"warnings": [], "information": [{"field": "CurrencyRate", "details": "If no rate is specified, the Xero day rate will be applied.", "ref": "https://central.xero.com/s/#CurrencySettings$Rates"}]}}, "supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the bill has been received from", "required": true, "validation": {"warnings": [], "information": [{"field": "SupplierRef", "details": "Must be provided."}]}}, "status": {"type": "String", "displayName": "Bill Status", "description": "The current state of the bill", "required": true, "options": [{"value": "Open", "type": "String", "displayName": "Open", "required": false}, {"value": "Draft", "type": "String", "displayName": "Draft", "required": false}], "validation": {"warnings": [], "information": [{"field": "Status", "details": "Must be provided."}]}}, "lineItems": {"type": "Array", "displayName": "Line Items", "description": "A collection of lines that detail items related to the bill", "required": true, "validation": {"warnings": [], "information": [{"field": "LineItems", "details": "Must be provided."}]}}}} + Zoho Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Bill", "description": "A bill is an itemised record of goods purchased from or services provided by a supplier", "required": true, "properties": {"supplierRef": {"type": "Object", "displayName": "Supplier Reference", "description": "Reference to the supplier the bill has been received from", "required": true}, "reference": {"type": "String", "displayName": "Reference", "description": "User friendly reference for the bill", "required": true}, "issueDate": {"type": "DateTime", "displayName": "Issue Date", "description": "The date of the bill as recorded in the originating system.", "required": true}, "dueDate": {"type": "DateTime", "displayName": "Due Date", "description": "The date the bill is due to be paid by", "required": true}, "currency": {"type": "String", "displayName": "Currency", "description": "Currency of the bill", "required": true, "validation": {"warnings": [{"field": "Currency", "details": "Must match the supplier's currency"}], "information": []}}, "currencyRate": {"type": "Number", "displayName": "Currency Exchange Rate", "description": "The exchange rate between the currency of the bill and the base currency of the company", "required": false, "validation": {"warnings": [{"field": "CurrencyRate", "details": "Must be greater than or equal to 0"}], "information": []}}, "note": {"type": "String", "displayName": "Note", "description": "Note about the bill", "required": false}, "lineItems": {"type": "Array", "displayName": "Line Items", "description": "A collection of lines that detail items related to the bill", "required": true, "validation": {"warnings": [{"field": "LineItems", "details": "The sum of subtotals over all the line items must be greater than or equal to 0"}, {"field": "LineItems", "details": "Must not be empty"}], "information": []}}, "status": {"type": "String", "displayName": "Bill Status", "description": "The current state of the bill", "required": true, "options": [{"value": "Open", "type": "String", "displayName": "Open", "required": false}, {"value": "Void", "type": "String", "displayName": "Void", "required": false}]}}} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + create-bill: + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "reference": "20230308 15.16", "supplierRef": {"id": "80000001-1671793885", "supplierName": "string"}, "purchaseOrderRefs": [{"id": "string", "purchaseOrderNumber": "string"}], "issueDate": "2023-03-08T09:21:18.558Z", "dueDate": "2023-03-14T09:21:18.558Z", "currency": "USD", "currencyRate": 1, "lineItems": [{"description": "line 1 description", "unitAmount": 1.625, "quantity": 2, "discountAmount": 0, "subTotal": 3.25, "taxAmount": 0, "totalAmount": 3.25, "discountPercentage": 0, "itemRef": {"id": "80000001-1674566705", "name": "string"}, "trackingCategoryRefs": [{"id": "80000003-1674553958", "name": "Class 2"}], "tracking": {"categoryRefs": [{"id": "80000001-1674553252", "name": "Class 1"}], "customerRef": {"id": "80000002-1674552702", "companyName": "string"}, "projectRef": {"id": "string", "name": "string"}, "isBilledTo": "Unknown", "isRebilledTo": "Customer"}, "isDirectCost": true}], "withholdingTax": [{"name": "string", "amount": 0}], "status": "Open", "subTotal": 3.25, "taxAmount": 0, "totalAmount": 3.25, "amountDue": 115.899999984, "note": "note", "paymentAllocations": []} + responses: + "200": + application/json: {"changes": [], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "41bcdd89-dc7f-4a50-8e08-333b1d5e2619", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Success", "statusCode": 132585} + "400": {} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "reference": "20230314 11.38", "supplierRef": {"id": "SUPP1", "supplierName": "string"}, "purchaseOrderRefs": [{"id": "string", "purchaseOrderNumber": "string"}], "issueDate": "2023-03-14T10:44:56.884Z", "dueDate": "2023-05-05T10:44:56.884Z", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "SWRAILWAYSELFSERVE; 17068; General ; V. Shone; Transport fo", "unitAmount": 15, "quantity": 2, "discountAmount": 0, "subTotal": 30, "taxAmount": 6, "totalAmount": 36, "discountPercentage": 0, "accountRef": {"id": "7401", "name": "string"}, "taxRateRef": {"id": "1", "name": "string", "effectiveTaxRate": 0}, "itemRef": {"id": "string", "name": "string"}, "trackingCategoryRefs": [{"id": "department_1", "name": "string"}], "tracking": {"categoryRefs": [{"id": "string", "name": "string"}], "customerRef": {"id": "string", "companyName": "string"}, "projectRef": {"id": "string", "name": "string"}, "isBilledTo": "Unknown", "isRebilledTo": "Unknown"}, "isDirectCost": true}], "withholdingTax": [{"name": "string", "amount": 0}], "status": "Open", "subTotal": 0, "taxAmount": 0, "totalAmount": 0, "amountDue": 0, "note": "SWRAILWAYSELFSERVE; 17068; General ; V. Shone; Transport fo", "paymentAllocations": [{"payment": {"id": "12", "accountRef": {"id": "A545"}, "currency": "USD", "paidOnDate": "2023-01-05T10:44:56.884Z", "totalAmount": 0}, "allocation": {"currency": "GBP", "allocatedOnDate": "2023-01-05T10:44:56.884Z", "totalAmount": 0}}]} + responses: + "200": + application/json: {"changes": [], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "5d0d9ea1-320e-4850-8aa8-ce67b7c49cf2", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "TimedOut", "statusCode": 920994} + "400": {} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "reference": "", "supplierRef": {"id": "1262c350-fe0f-40ec-aeff-41c95b4a45af", "supplierName": "DIISR - Small Business Services"}, "purchaseOrderRefs": [], "issueDate": "2023-04-23T00:00:00", "dueDate": "2023-04-23T00:00:00", "currency": "GBP", "currencyRate": 1, "lineItems": [{"description": "Half day training - Microsoft Office", "unitAmount": 1800, "quantity": 1, "subTotal": 1800, "taxAmount": 360, "totalAmount": 2160, "accountRef": {"id": "46f9461e-788b-4906-8b74-d1ea17f6dc10"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "itemRef": {"id": "489558f5-27b7-4f37-ad9f-d84611c2e2ab"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Desktop/network support via email & phone.Per month fixed fee for minimum 20 hours/month.", "unitAmount": 4000, "quantity": 1, "subTotal": 4000, "taxAmount": 800, "totalAmount": 4800, "accountRef": {"id": "f96c9458-d724-47bf-8f74-a9d5726465ce"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "itemRef": {"id": "f8fb7e00-5e5d-466c-aef0-15861f73d04f"}, "trackingCategoryRefs": [], "isDirectCost": false}, {"description": "Stationery charges", "unitAmount": 32, "quantity": 8, "subTotal": 256, "taxAmount": 51.2, "totalAmount": 307.2, "accountRef": {"id": "cba6527d-f102-4538-b421-e483233e9d5a"}, "taxRateRef": {"id": "INPUT2", "name": "20% (VAT on Expenses)", "effectiveTaxRate": 20}, "trackingCategoryRefs": [], "isDirectCost": false}], "withholdingTax": [], "status": "Open", "subTotal": 6056, "taxAmount": 1211.2, "totalAmount": 7267.2, "amountDue": 7267.2, "paymentAllocations": []} + responses: + "200": + application/json: {"changes": [], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "bcfc23e7-d6f9-4415-b472-51ef09254895", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Failed", "statusCode": 818320} + "400": {} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "issueDate": "2022-10-23T00:00:00Z", "dueDate": "2022-10-23T00:00:00Z", "currency": "EUR", "status": "Draft", "subTotal": "0.86", "taxAmount": "4552.22", "totalAmount": "1697.27", "paymentAllocations": []} + responses: + "400": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + update-bill: + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + billId: "7110701885" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "issueDate": "2022-10-23T00:00:00Z", "dueDate": "2022-10-23T00:00:00Z", "currency": "USD", "status": "Void", "subTotal": "9914.64", "taxAmount": "2703.24", "totalAmount": "6276.9", "paymentAllocations": []} + responses: + "400": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + delete-bill: + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + billId: "7110701885" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + list-bill-attachments: + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + billId: "EILBDVJVNUAGVKRQ" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + get-bill-attachment: + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + billId: "EILBDVJVNUAGVKRQ" + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + delete-bill-attachment: + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + billId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2" + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + download-bill-attachment: + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + billId: "EILBDVJVNUAGVKRQ" + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + upload-bill-attachment: + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + billId: "EILBDVJVNUAGVKRQ" + responses: + "400": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + get-create-journalEntry-model: + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "JournalEntry", "required": true, "properties": {"journalRef": {"type": "Object", "displayName": "Journal Reference", "description": "Reference to the journal in which this journal entry was created", "required": true, "validation": {"warnings": [], "information": [{"field": "JournalRef", "details": "Only General type Journals are allowed"}]}}, "postedOn": {"type": "DateTime", "displayName": "Posted On", "description": "The date the entry was posted in the originating system", "required": true}, "description": {"type": "String", "displayName": "Description", "description": "An optional top level description for the journal entry", "required": false}, "journalLines": {"type": "Array", "displayName": "Journal Lines", "description": "A collection of detail lines that represent the transactions associated in this entry", "required": true, "validation": {"warnings": [{"field": "JournalLines", "details": "Must contain 2 journal lines"}], "information": []}}}} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "JournalEntry", "required": true, "properties": {"description": {"type": "String", "displayName": "Description", "description": "An optional top level description for the journal entry", "required": false}, "postedOn": {"type": "DateTime", "displayName": "Posted On", "description": "The date the entry was posted in the originating system", "required": false, "validation": {"warnings": [], "information": [{"field": "PostedOn", "details": "Defaults to today's date if not specified"}]}}, "journalLines": {"type": "Array", "displayName": "Journal Lines", "description": "A collection of detail lines that represent the transactions associated in this entry", "required": true}}} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "JournalEntry", "required": true, "properties": {"postedOn": {"type": "DateTime", "displayName": "Posted On", "description": "The date the entry was posted in the originating system", "required": false}, "journalLines": {"type": "Array", "displayName": "Journal Lines", "description": "A collection of detail lines that represent the transactions associated in this entry", "required": true}}} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "JournalEntry", "required": true, "properties": {"postedOn": {"type": "DateTime", "displayName": "Posted On", "description": "The date the entry was posted in the originating system", "required": true}, "journalLines": {"type": "Array", "displayName": "Journal Lines", "description": "A collection of detail lines that represent the transactions associated in this entry", "required": true, "validation": {"warnings": [], "information": [{"field": "JournalLines", "details": "There must be at least two lines"}]}}}, "validation": {"warnings": [{"details": "To push a JournalEntry to a French Company in QuickBooks Online, an active JournalCode with type 'Others' or 'Autres' must exist inside the Company"}], "information": []}} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "JournalEntry", "required": true, "properties": {"postedOn": {"type": "DateTime", "displayName": "Posted On", "description": "The date the entry was posted in the originating system", "required": true}, "journalLines": {"type": "Array", "displayName": "Journal Lines", "description": "A collection of detail lines that represent the transactions associated in this entry", "required": true, "validation": {"warnings": [], "information": [{"field": "JournalLines", "details": "There must be at least two lines"}]}}}, "validation": {"warnings": [{"details": "To push a JournalEntry to a French Company in QuickBooks Online, an active JournalCode with type 'Others' or 'Autres' must exist inside the Company"}], "information": []}} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "JournalEntry", "required": true, "properties": {"createdOn": {"type": "DateTime", "displayName": "Created On", "description": "Date on which the journal was created in Sage50.", "required": false, "validation": {"warnings": [], "information": [{"field": "createdOn", "details": "if empty then Sage 50 will auto generate a created on date"}]}}, "updatedOn": {"type": "DateTime", "displayName": "Updated On", "description": "Date on which the journal was last updated in Sage50.", "required": true, "validation": {"warnings": [{"field": "updatedOn", "details": "Is not supported and therefore will be ignored"}], "information": []}}, "description": {"type": "String", "displayName": "Description", "description": "Optional description of the journal entry.", "required": false, "validation": {"warnings": [{"field": "description", "details": "Is not supported and therefore will be ignored"}], "information": []}}, "modifiedDate": {"type": "DateTime", "displayName": "Source Modified Date", "description": "Date on which the record was last updated via pushes.", "required": true, "validation": {"warnings": [{"field": "modifiedDate", "details": "Is not supported and therefore will be ignored"}], "information": []}}, "sourceModifiedDate": {"type": "DateTime", "displayName": "Source Modified Date", "description": "Date on which the record was last changed in Sage50.", "required": true, "validation": {"warnings": [{"field": "sourceModifiedDate", "details": "Is not supported and therefore will be ignored"}], "information": []}}, "recordRef": {"type": "Object", "displayName": "Record Reference", "description": "Links a journal entry to the underlying record that created it.", "required": false}, "dataType": {"type": "String", "displayName": "Data Type", "description": "Data type of the underlying record that created the journal entry.", "required": false, "validation": {"warnings": [{"field": "dataType", "details": "Is not supported and therefore will be ignored"}], "information": []}}, "journalRef": {"type": "Object", "displayName": "Journal Reference", "description": "Links journal entries to the relevant journal", "required": false}, "id": {"type": "String", "displayName": "Id", "description": "The reference journal id", "required": false, "validation": {"warnings": [{"field": "id", "details": "Is not supported and therefore will be ignored"}], "information": []}}, "name": {"type": "String", "displayName": "Name", "description": "The reference journal name", "required": false, "validation": {"warnings": [{"field": "name", "details": "Is not supported and therefore will be ignored"}], "information": []}}, "journalLines": {"type": "Array", "displayName": "Journal Lines", "description": "Journal line items of the journal entry.", "required": true}}, "validation": {"warnings": [], "information": [{"details": "Pushing to Sage 50 2015 (v21) or below is not supported. To enable push, please upgrade to at least Sage 50 2016 (v22) and re-sync the company."}]}} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "JournalEntry", "required": true, "properties": {"postedOn": {"type": "DateTime", "displayName": "Posted On", "description": "The date the entry was posted in the originating system", "required": true}, "journalRef": {"type": "Object", "displayName": "Journal Reference", "description": "Reference to the journal in which this journal entry was created", "required": true}, "description": {"type": "String", "displayName": "Description", "description": "An optional top level description for the journal entry", "required": true, "validation": {"warnings": [{"field": "Description", "details": "Must be no greater than 512 characters"}], "information": []}}, "journalLines": {"type": "Array", "displayName": "Journal Lines", "description": "A collection of detail lines that represent the transactions associated in this entry", "required": true, "validation": {"warnings": [{"field": "JournalLines", "details": "There must be at least two lines"}], "information": []}}}} + Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "JournalEntry", "required": true, "properties": {"description": {"type": "String", "displayName": "Description", "description": "An optional top level description for the journal entry", "required": true}, "postedOn": {"type": "DateTime", "displayName": "Posted On", "description": "The date the entry was posted in the originating system", "required": true}, "createdOn": {"type": "DateTime", "displayName": "Created On", "description": "The date the entry was created in the originating system", "required": true}, "updatedOn": {"type": "DateTime", "displayName": "Updated On", "description": "The date in which the journal was last updated in the originating system", "required": true}, "journalRef": {"type": "Object", "displayName": "Journal Reference", "description": "Reference to the journal in which this journal entry was created", "required": true}, "journalLines": {"type": "Array", "displayName": "Journal Lines", "description": "A collection of detail lines that represent the transactions associated in this entry", "required": true}, "recordRef": {"type": "Object", "displayName": "Record Reference", "description": "Reference to the record for which this journal entry was created", "required": true}, "metadata": {"type": "Object", "displayName": "Metadata", "description": "Miscellaneous data about the item", "required": true}}} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "JournalEntry", "required": true, "properties": {"postedOn": {"type": "DateTime", "displayName": "Posted On", "description": "The date the entry was posted in the originating system", "required": true, "validation": {"warnings": [], "information": [{"field": "PostedOn", "details": "If no date is specified, it will default to today's date."}]}}, "journalLines": {"type": "Array", "displayName": "Journal Lines", "description": "A collection of detail lines that represent the transactions associated in this entry", "required": true, "validation": {"warnings": [], "information": [{"field": "JournalLines", "details": "At least 2 must be provided."}]}}}} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + create-journal-entry: + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "description": "record level description", "postedOn": "2023-02-23T19:49:16.052Z", "createdOn": "2023-02-22T19:49:16.052Z", "updatedOn": "2023-02-21T19:49:16.052Z", "journalRef": {"id": "12"}, "journalLines": [{"description": "journalLines.description debit", "netAmount": 23.02, "currency": "USD", "accountRef": {"id": "80000019-1671793811", "name": "Office Supplies"}, "tracking": {"recordRefs": [{"id": "80000001-1674553252", "dataType": "customers"}]}}, {"description": "journalLines.description credit", "netAmount": -23.02, "currency": "USD", "accountRef": {"id": "8000001E-1671793811", "name": "Utilities"}, "tracking": {"recordRefs": [{"id": "80000002-1674553271", "dataType": "trackingCategories"}]}}], "recordRef": {"id": "80000002-6722155312", "dataType": "bills"}, "metadata": {"isDeleted": true}} + responses: + "200": + application/json: {"changes": [], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "6fe07241-bcdd-489d-87fa-504e08333b1d", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Pending", "statusCode": 415714} + "400": {} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "description": "test", "postedOn": "2023-03-29T00:00:00Z", "createdOn": "2022-10-23T00:00:00Z", "updatedOn": "2022-10-23T00:00:00Z", "journalRef": {"id": "207"}, "journalLines": [{"description": "line desc 1", "netAmount": 9, "currency": "GBP", "accountRef": {"id": "151"}, "tracking": {"recordRefs": []}}, {"description": "line desc 2", "netAmount": -9, "currency": "GBP", "accountRef": {"id": "154"}, "tracking": {"recordRefs": []}}], "recordRef": {"dataType": "transfers"}} + responses: + "200": + application/json: {"data": {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "description": "test", "postedOn": "2023-03-29T00:00:00Z", "createdOn": "2022-10-23T00:00:00Z", "updatedOn": "2022-10-23T00:00:00Z", "journalRef": {"id": "207"}, "journalLines": [{"description": "line desc 1", "netAmount": 9, "currency": "GBP", "accountRef": {"id": "151"}, "tracking": {"recordRefs": []}}, {"description": "line desc 2", "netAmount": -9, "currency": "GBP", "accountRef": {"id": "154"}, "tracking": {"recordRefs": []}}], "recordRef": {"dataType": "transfers"}}, "changes": [{"type": "Created", "recordRef": {"dataType": "journalEntries"}}], "dataType": "journalEntries", "companyId": "d7f743a9-1804-4116-8c8a-e606f7e2f66c", "pushOperationKey": "b9c1381a-8742-4a45-9dc5-528101dbd0e3", "dataConnectionKey": "fa139396-523a-4a58-bf2b-8da82c8a673f", "requestedOnUtc": "2023-03-31T14:53:44.6401039Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Pending", "statusCode": 202} + "400": {} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "postedOn": "2022-10-23T00:00:00Z", "createdOn": "2022-10-23T00:00:00Z", "updatedOn": "2022-10-23T00:00:00Z", "journalLines": [], "recordRef": {"dataType": "transfers"}} + responses: + "400": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + list-journals: + "": + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [], "pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} + "400": {} + Clear Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:18Z", "sourceModifiedDate": "2022-07-15T20:19:02", "id": "90bb7784-083b-4bcb-a534-b30756cee65d", "journalCode": "GJ", "name": "General Journal", "type": "General Journal", "hasChildren": true, "createdOn": "2021-12-11T13:04:02", "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:18Z", "sourceModifiedDate": "2022-07-24T14:17:02", "id": "07b94827-c0a5-4cc7-ba58-3f9efec3b4b3", "journalCode": "PAY", "name": "Payroll Journal", "type": "Payroll Journal", "parentId": "90bb7784-083b-4bcb-a534-b30756cee65d", "hasChildren": false, "createdOn": "2021-12-11T13:04:02", "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 4, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=2&pageSize=2"}}} + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:10Z", "sourceModifiedDate": "2023-02-02T10:26:25Z", "id": "211317b3-89d1-ea11-bbaa-000d3a2b9185", "journalCode": "ASSETS", "name": "ASSETS", "type": "Assets", "hasChildren": true, "createdOn": "2022-10-23T00:00:00Z", "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:10Z", "sourceModifiedDate": "2022-06-15T22:45:30Z", "id": "9a94ef78-92ec-ec11-82f9-000d3a8746a9", "journalCode": "BNKDEPOSIT-BNKD", "name": "BNKD", "type": "Bank Deposits", "parentId": "af7d7e6b-e5c8-ec11-8e7e-000d3a86e04a", "hasChildren": false, "createdOn": "2022-06-15T10:03:59", "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 46, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=2&pageSize=2"}}} + Exact (Netherlands): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-26T13:31:58Z", "sourceModifiedDate": "2020-01-24T11:41:25Z", "id": "aae31284-e23d-456b-9957-fbf4bcef6c19", "journalCode": "21", "name": "12345678", "type": "Bank", "hasChildren": false, "createdOn": "2019-11-05T14:44:51", "status": "Active"}, {"modifiedDate": "2022-10-26T13:31:58Z", "sourceModifiedDate": "2019-11-22T13:35:57Z", "id": "74677165-1bd3-49b4-87d0-32d974674f86", "journalCode": "23", "name": "Abraham's Billion Dollar stuff", "type": "Bank", "hasChildren": false, "createdOn": "2019-11-22T13:35:57", "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 47, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=2&pageSize=2"}}} + Exact (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-26T13:33:08Z", "sourceModifiedDate": "2021-04-26T16:44:47Z", "id": "05b9febe-34b3-4836-8277-002294b233a9", "journalCode": "25", "name": "annaBankAccount1", "type": "Bank", "hasChildren": false, "createdOn": "2021-04-26T16:44:47", "status": "Active"}, {"modifiedDate": "2022-10-26T13:33:08Z", "sourceModifiedDate": "2021-05-18T10:24:18Z", "id": "b9c3d6a6-4ce2-4714-9ff6-fb15892300f7", "journalCode": "31", "name": "annaBankAccount10", "type": "Bank", "hasChildren": false, "createdOn": "2021-05-18T10:24:18", "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 21, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=2&pageSize=2"}}} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-04T16:31:30Z", "sourceModifiedDate": "2022-01-17T10:44:23", "id": "207", "journalCode": "AJPT", "name": "A Journal Push Test", "type": "", "hasChildren": false, "createdOn": "2022-01-17T10:44:23", "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-04T16:31:30Z", "sourceModifiedDate": "2022-01-18T15:39:07", "id": "223", "journalCode": "AJPT2", "name": "A Journal Push Test 2", "type": "", "hasChildren": false, "createdOn": "2022-01-18T15:39:07", "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 1211, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/journals?page=2&pageSize=2"}}} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "400": + 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" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + 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} + get-journal: + Clear Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + journalId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T12:38:18Z", "sourceModifiedDate": "2022-07-15T20:19:02", "id": "90bb7784-083b-4bcb-a534-b30756cee65d", "journalCode": "GJ", "name": "General Journal", "type": "General Journal", "hasChildren": true, "createdOn": "2021-12-11T13:04:02", "status": "Active", "metadata": {"isDeleted": false}} + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + journalId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-27T14:21:10Z", "sourceModifiedDate": "2023-02-02T10:26:25Z", "id": "211317b3-89d1-ea11-bbaa-000d3a2b9185", "journalCode": "ASSETS", "name": "ASSETS", "type": "Assets", "hasChildren": true, "createdOn": "2022-10-23T00:00:00Z", "status": "Active", "metadata": {"isDeleted": false}} + Exact (Netherlands): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + journalId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-26T13:31:58Z", "sourceModifiedDate": "2020-01-24T11:41:25Z", "id": "aae31284-e23d-456b-9957-fbf4bcef6c19", "journalCode": "21", "name": "12345678", "type": "Bank", "hasChildren": false, "createdOn": "2019-11-05T14:44:51", "status": "Active"} + Exact (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + journalId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-26T13:33:08Z", "sourceModifiedDate": "2021-04-26T16:44:47Z", "id": "05b9febe-34b3-4836-8277-002294b233a9", "journalCode": "25", "name": "annaBankAccount1", "type": "Bank", "hasChildren": false, "createdOn": "2021-04-26T16:44:47", "status": "Active"} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + journalId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-04T16:31:30Z", "sourceModifiedDate": "2022-01-17T10:44:23", "id": "207", "journalCode": "AJPT", "name": "A Journal Push Test", "type": "", "hasChildren": false, "createdOn": "2022-01-17T10:44:23", "status": "Active", "metadata": {"isDeleted": false}} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + journalId: "" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + get-create-journal-model: + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Journal", "required": true, "properties": {"name": {"type": "String", "displayName": "Name", "description": "The name of the journal", "required": true, "validation": {"warnings": [{"field": "Name", "details": "Must be no greater than 40 characters"}], "information": []}}, "journalCode": {"type": "String", "displayName": "Journal Number", "description": "The number or code for the journal", "required": true, "validation": {"warnings": [{"field": "JournalCode", "details": "Must be no greater than 16 characters"}], "information": []}}, "status": {"type": "String", "displayName": "Status", "description": "The status of the journal", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Archived", "type": "String", "displayName": "Archived", "required": false}]}}} + Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Journal", "required": true, "properties": {"journalCode": {"type": "String", "displayName": "Journal Number", "description": "The number or code for the journal", "required": true}, "name": {"type": "String", "displayName": "Name", "description": "The name of the journal", "required": true}, "type": {"type": "String", "displayName": "Type", "description": "The type of journal", "required": true}, "parentId": {"type": "String", "displayName": "Parent Id", "description": "Identifier for the parent journal - empty if journal is the parent", "required": true}, "hasChildren": {"type": "Boolean", "displayName": "Has Children", "description": "If a journal has children, the journal is parent of those children journals", "required": true}, "createdOn": {"type": "DateTime", "displayName": "Created On", "description": "The date the journal was created in the originating system", "required": true}, "status": {"type": "String", "displayName": "Status", "description": "The status of the journal", "required": true}, "metadata": {"type": "Object", "displayName": "Metadata", "description": "Miscellaneous data about the item", "required": true}}} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + create-journal: + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + requestBody: + application/json: {"createdOn": "2022-10-23T00:00:00Z"} + responses: + "400": + application/json: {"statusCode": 400, "service": "PublicApi", "error": "Error processing request - not valid.", "correlationId": "bc997528a9d7abb9161ef45f05d38599", "canBeRetried": "Unknown", "detailedErrorCode": 0} + list-payment-methods: + "": + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [], "pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} + "400": {} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-01-18T11:02:37Z", "sourceModifiedDate": "2017-11-24T16:53:08Z", "id": "3", "name": "Card", "type": "Unknown", "status": "Active"}, {"modifiedDate": "2023-01-18T11:02:37Z", "sourceModifiedDate": "2017-11-24T16:53:08Z", "id": "1", "name": "Cash", "type": "Unknown", "status": "Active"}], "pageNumber": 1, "pageSize": 2, "totalResults": 4, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/paymentMethods"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/paymentMethods?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/paymentMethods?page=2&pageSize=2"}}} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T09:35:57Z", "sourceModifiedDate": "2022-03-07T15:53:27Z", "id": "3", "name": "Card", "type": "Unknown", "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:35:57Z", "sourceModifiedDate": "2016-08-30T09:26:13Z", "id": "1", "name": "Cash", "type": "Unknown", "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 4, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/paymentMethods"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/paymentMethods?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/paymentMethods?page=2&pageSize=2"}}} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-04T16:31:24Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "12", "name": "ACH", "type": "Other", "status": "Unknown", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-04T16:31:24Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "6", "name": "Cash", "type": "Cash", "status": "Unknown", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 6, "_links": {"self": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/paymentMethods"}, "current": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/paymentMethods?page=1&pageSize=2"}, "next": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/paymentMethods?page=2&pageSize=2"}}} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "400": + 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" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + 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} + get-payment-method: + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + paymentMethodId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-01-18T11:02:37Z", "sourceModifiedDate": "2017-11-24T16:53:08Z", "id": "3", "name": "Card", "type": "Unknown", "status": "Active"} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + paymentMethodId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T09:35:57Z", "sourceModifiedDate": "2022-03-07T15:53:27Z", "id": "3", "name": "Card", "type": "Unknown", "status": "Active", "metadata": {"isDeleted": false}} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + paymentMethodId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-04T16:31:24Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "12", "name": "ACH", "type": "Other", "status": "Unknown", "metadata": {"isDeleted": false}} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + paymentMethodId: "" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + list-suppliers: + "": + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"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": ""}}}}], "pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} + "400": {} + Clear Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"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}}, {"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "0177-04-27T11:56:00", "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", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 100, "_links": {"self": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers"}, "current": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/suppliers?page=2&pageSize=2"}}} + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"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}}, {"modifiedDate": "2023-03-27T14:21:12Z", "sourceModifiedDate": "2022-10-25T13:17:36Z", "id": "be49ec62-6754-ed11-946f-0022481b67d1", "supplierName": "", "contactName": "", "emailAddress": "", "phone": "", "addresses": [{"type": "Billing", "line1": "", "line2": "", "city": "", "region": "", "country": "GB", "postalCode": ""}], "taxNumber": "", "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 31, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/suppliers?page=2&pageSize=2"}}} + Exact (Netherlands): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"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"}, {"modifiedDate": "2022-10-26T13:32:05Z", "sourceModifiedDate": "2021-06-09T12:04:08Z", "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", "defaultCurrency": "USD"}], "pageNumber": 1, "pageSize": 2, "totalResults": 73, "_links": {"self": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers"}, "current": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/suppliers?page=2&pageSize=2"}}} + Exact (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-26T13:33:13Z", "sourceModifiedDate": "2017-08-02T10:58:54Z", "id": "0185fea2-0298-445b-909a-0db685118a9e", "supplierName": "a", "phone": "01224 658 999", "addresses": [{"type": "Billing", "country": "GB"}], "status": "Active", "defaultCurrency": "GBP"}, {"modifiedDate": "2022-10-26T13:33:13Z", "sourceModifiedDate": "2020-05-01T14:05:46Z", "id": "64ae712f-4155-48bb-9fce-98232c51d979", "supplierName": "aa", "phone": "+44 25691 154789", "addresses": [{"type": "Billing", "country": "GB"}], "status": "Active", "defaultCurrency": "GBP"}], "pageNumber": 1, "pageSize": 2, "totalResults": 118, "_links": {"self": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers"}, "current": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/suppliers?page=2&pageSize=2"}}} + FreeAgent: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-25T14:19:08Z", "sourceModifiedDate": "2023-04-17T06:02:46", "id": "11526230", "supplierName": "-", "contactName": "Test 1", "phone": "(877) 492-8687", "addresses": [{"type": "Billing", "line1": "1 Place House", "line2": "", "city": "London", "country": "United Kingdom", "postalCode": "WC1X 1AH"}], "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:19:08Z", "sourceModifiedDate": "2023-04-24T06:19:23", "id": "9677150", "supplierName": "-", "contactName": "Test 1", "phone": "+44 25691 154789", "addresses": [{"type": "Billing", "line1": "1 Place House", "line2": "", "city": "London", "country": "United Kingdom", "postalCode": "WC1X 1AH"}], "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 159, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/suppliers?page=2&pageSize=2"}}} + FreshBooks: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-24T16:07:25Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "api vendor", "supplierName": "api vendor", "phone": "+44 25691 154789", "addresses": [], "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-24T16:07:25Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "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", "phone": "(877) 492-8687", "addresses": [], "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 7, "_links": {"self": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers"}, "current": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/suppliers?page=2&pageSize=2"}}} + KashFlow: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-09-30T10:29:15Z", "sourceModifiedDate": "2017-05-09T00:00:00", "id": "6202387", "supplierName": "Dell", "contactName": "", "emailAddress": "", "phone": "", "addresses": [], "taxNumber": "", "status": "Unknown"}, {"modifiedDate": "2022-09-30T10:29:15Z", "sourceModifiedDate": "1990-01-01T00:00:00", "id": "9338173", "supplierName": "Home", "contactName": "", "emailAddress": "", "phone": "", "addresses": [], "taxNumber": "", "status": "Unknown"}], "pageNumber": 1, "pageSize": 2, "totalResults": 7, "_links": {"self": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers"}, "current": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/3a707a99-89da-4b16-a5d6-595333a16352/data/suppliers?page=2&pageSize=2"}}} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"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"}, {"modifiedDate": "2023-01-30T14:47:02Z", "sourceModifiedDate": "2021-03-26T09:53:15", "id": "726", "supplierName": "Vendor -.A", "contactName": "Vendor -.A", "emailAddress": "", "phone": "", "addresses": [], "status": "Active", "defaultCurrency": "GBP"}], "pageNumber": 1, "pageSize": 2, "totalResults": 6, "_links": {"self": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers"}, "current": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/suppliers?page=2&pageSize=2"}}} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T09:09:03Z", "sourceModifiedDate": "2023-12-16T05:06:44", "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", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:09:03Z", "sourceModifiedDate": "2023-12-16T05:06:44", "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", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 54, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/suppliers?page=2&pageSize=2"}}} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-01-18T11:02:36Z", "sourceModifiedDate": "2022-12-07T10:48:18Z", "id": "41", "supplierName": "AI Support", "contactName": "AI Support", "phone": "+44 25691 154789", "addresses": [{"type": "Billing", "line1": "test", "region": "string", "country": "Djibouti"}], "status": "Active", "defaultCurrency": "GBP"}, {"modifiedDate": "2023-01-18T11:02:36Z", "sourceModifiedDate": "2021-08-31T08:45:02Z", "id": "42", "supplierName": "AI Support 2", "contactName": "AI Support 2", "phone": "+44 25691 154789", "addresses": [{"type": "Billing", "line1": "test", "region": "string", "country": "DJ"}], "status": "Active", "defaultCurrency": "GBP"}], "pageNumber": 1, "pageSize": 2, "totalResults": 23, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/suppliers?page=2&pageSize=2"}}} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"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}}, {"modifiedDate": "2023-04-26T09:35:55Z", "sourceModifiedDate": "2022-07-06T15:55:28Z", "id": "88", "supplierName": "Andrew Haberbosch", "phone": "+44 25691 154789", "addresses": [], "status": "Active", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 64, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/suppliers?page=2&pageSize=2"}}} + Sage 200cloud: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-14T09:35:58Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "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}}, {"modifiedDate": "2022-10-14T09:35:58Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "914", "supplierName": "Aaren", "contactName": "", "emailAddress": "", "phone": "", "addresses": [{"type": "Unknown", "line1": "", "line2": "", "city": "", "region": "", "country": "Great Britain", "postalCode": ""}], "taxNumber": "", "status": "Archived", "defaultCurrency": "GBP", "metadata": {"isDeleted": true}}], "pageNumber": 1, "pageSize": 2, "totalResults": 943, "_links": {"self": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers"}, "current": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/suppliers?page=2&pageSize=2"}}} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:38Z", "sourceModifiedDate": "2022-11-25T09:43:54Z", "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", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:38Z", "sourceModifiedDate": "2022-12-05T13:37:26Z", "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", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 15, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/suppliers?page=2&pageSize=2"}}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-24T14:52:54Z", "sourceModifiedDate": "2020-02-25T17:23:33Z", "id": "65179671e9ef424caff8b9006cd111c8", "supplierName": "5555 Abdul's Test Name", "contactName": "Main Contact", "phone": "01224 658 999", "addresses": [{"type": "Billing", "country": "United Kingdom (GB)"}], "status": "Active", "defaultCurrency": "GBP"}, {"modifiedDate": "2022-10-24T14:52:54Z", "sourceModifiedDate": "2020-02-13T10:38:19Z", "id": "cf7f44d693904944a6a7cf3de0887964", "supplierName": "Abdi Supplier", "contactName": "Abdi", "emailAddress": "abdisupplier@company.com", "phone": "(877) 492-8687", "addresses": [{"type": "Billing", "line1": "1 Place House", "city": "London", "country": "United Kingdom (GB)", "postalCode": "WC1X 1AH"}], "status": "Active", "defaultCurrency": "GBP"}], "pageNumber": 1, "pageSize": 2, "totalResults": 64, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/suppliers?page=2&pageSize=2"}}} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"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}}, {"modifiedDate": "2023-04-04T16:32:20Z", "sourceModifiedDate": "2022-06-15T11:38:29", "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", "defaultCurrency": "CAD", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 77, "_links": {"self": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers"}, "current": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/suppliers?page=2&pageSize=2"}}} + Wave: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-11-16T18:15:24Z", "sourceModifiedDate": "2020-04-07T13:28:02Z", "id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0Nzk0", "supplierName": "Computer Shop", "contactName": "", "emailAddress": "", "phone": "+44 25691 154789", "addresses": [], "status": "Active", "defaultCurrency": "GBP"}, {"modifiedDate": "2022-11-16T18:15:24Z", "sourceModifiedDate": "2020-04-07T13:12:40Z", "id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0NzQx", "supplierName": "Flour Mill", "contactName": "", "emailAddress": "", "phone": "+44 25691 154789", "addresses": [], "status": "Active", "defaultCurrency": "GBP"}], "pageNumber": 1, "pageSize": 2, "totalResults": 9, "_links": {"self": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers"}, "current": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/suppliers?page=2&pageSize=2"}}} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2023-02-17T18:03:42", "id": "e4c9d0e2-c285-4e85-b579-6d28b180c730", "supplierName": "24 Locks", "emailAddress": "", "phone": "01224 658 999", "addresses": [], "status": "Active", "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:36:09Z", "sourceModifiedDate": "2023-02-17T18:03:42", "id": "bab779bc-c5fb-42cb-a888-953e8309711c", "supplierName": "7-Eleven", "emailAddress": "", "phone": "01224 658 999", "addresses": [], "status": "Active", "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 48, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/suppliers?page=2&pageSize=2"}}} + Zoho Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2022-09-16T13:09:56", "id": "104957000001494001", "supplierName": "Acme Corporation", "emailAddress": "", "phone": "01224 658 999", "addresses": [], "status": "Active", "defaultCurrency": "GBP"}, {"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2022-06-10T09:07:16", "id": "104957000000648001", "supplierName": "Cool company", "contactName": "Dre", "emailAddress": "", "phone": "+44 25691 154789", "addresses": [], "status": "Active", "defaultCurrency": "CAD"}], "pageNumber": 1, "pageSize": 2, "totalResults": 6, "_links": {"self": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers"}, "current": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers?page=1&pageSize=2"}, "next": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/suppliers?page=2&pageSize=2"}}} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "400": + 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" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + 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} + get-supplier: + Clear Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + 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}} + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + 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}} + Exact (Netherlands): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + 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"} + Exact (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-26T13:33:13Z", "sourceModifiedDate": "2017-08-02T10:58:54Z", "id": "0185fea2-0298-445b-909a-0db685118a9e", "supplierName": "a", "phone": "01224 658 999", "addresses": [{"type": "Billing", "country": "GB"}], "status": "Active", "defaultCurrency": "GBP"} + FreeAgent: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-25T14:19:08Z", "sourceModifiedDate": "2023-04-17T06:02:46", "id": "11526230", "supplierName": "-", "contactName": "Test 1", "phone": "+44 25691 154789", "addresses": [{"type": "Billing", "line1": "1 Place House", "line2": "", "city": "London", "country": "United Kingdom", "postalCode": "WC1X 1AH"}], "status": "Active", "metadata": {"isDeleted": false}} + FreshBooks: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-24T16:07:25Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "api vendor", "supplierName": "api vendor", "phone": "01224 658 999", "addresses": [], "status": "Active", "metadata": {"isDeleted": false}} + KashFlow: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + 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"} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + 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"} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T09:09:03Z", "sourceModifiedDate": "2023-12-16T05:06:44", "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", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-01-18T11:02:36Z", "sourceModifiedDate": "2022-12-07T10:48:18Z", "id": "41", "supplierName": "AI Support", "contactName": "AI Support", "phone": "(877) 492-8687", "addresses": [{"type": "Billing", "line1": "test", "region": "string", "country": "Djibouti"}], "status": "Active", "defaultCurrency": "GBP"} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + 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}} + Sage 200cloud: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-14T09:35:58Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "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}} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-30T14:42:38Z", "sourceModifiedDate": "2022-11-25T09:43:54Z", "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", "defaultCurrency": "GBP", "metadata": {"isDeleted": false}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-24T14:52:54Z", "sourceModifiedDate": "2020-02-25T17:23:33Z", "id": "65179671e9ef424caff8b9006cd111c8", "supplierName": "5555 Abdul's Test Name", "contactName": "Main Contact", "phone": "(877) 492-8687", "addresses": [{"type": "Billing", "country": "United Kingdom (GB)"}], "status": "Active", "defaultCurrency": "GBP"} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + 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}} + Wave: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-11-16T18:15:24Z", "sourceModifiedDate": "2020-04-07T13:28:02Z", "id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1ZlbmRvcjo2NjA0Nzk0", "supplierName": "Computer Shop", "contactName": "", "emailAddress": "", "phone": "+44 25691 154789", "addresses": [], "status": "Active", "defaultCurrency": "GBP"} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + 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": "", "phone": "01224 658 999", "addresses": [], "status": "Active", "metadata": {"isDeleted": false}} + Zoho Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2022-09-16T13:09:56", "id": "104957000001494001", "supplierName": "Acme Corporation", "emailAddress": "", "phone": "01224 658 999", "addresses": [], "status": "Active", "defaultCurrency": "GBP"} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + supplierId: "" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + get-create-update-supplier-model: + Exact (Netherlands): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "The default currency for transactions recorded against the supplier", "required": false}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "The supplier's registration number", "required": false, "validation": {"warnings": [{"field": "RegistrationNumber", "details": "Only for Exact Netherlands, if provided, must be exactly 20 characters in length"}], "information": []}}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false}, "contactName": {"type": "String", "displayName": "Contact Name", "description": "The name of the main contact for the supplier", "required": false}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false, "validation": {"warnings": [], "information": [{"field": "Addresses", "details": "Only the first address provided will be considered, all other entries will be not be recorded"}]}}}} + Exact (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "The default currency for transactions recorded against the supplier", "required": false}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "The supplier's registration number", "required": false, "validation": {"warnings": [{"field": "RegistrationNumber", "details": "Only for Exact Netherlands, if provided, must be exactly 20 characters in length"}], "information": []}}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false}, "contactName": {"type": "String", "displayName": "Contact Name", "description": "The name of the main contact for the supplier", "required": false}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false, "validation": {"warnings": [], "information": [{"field": "Addresses", "details": "Only the first address provided will be considered, all other entries will be not be recorded"}]}}}} + FreeAgent: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true}, "status": {"type": "String", "displayName": "Supplier Status", "description": "The current state of the supplier", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Archived", "type": "String", "displayName": "Archived", "required": false}]}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false, "validation": {"warnings": [], "information": [{"field": "Addresses", "details": "Only one address may be specified"}]}}, "contactName": {"type": "String", "displayName": "Contact Name", "description": "The name of the main contact for the supplier", "required": false}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false}}} + MYOB AccountRight and Essentials: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true, "validation": {"warnings": [{"field": "SupplierName", "details": "Must not have the part after the first name longer than 30 characters."}, {"field": "SupplierName", "details": "Must not have its first part (i.e. the first name) longer than 20 characters."}], "information": [{"field": "SupplierName", "details": "Must be provided and must contain a First and Last name separated by a ' '(space)."}]}}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false, "validation": {"warnings": [], "information": [{"field": "EmailAddress", "details": "Must not be longer than 255 characters."}]}}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false, "validation": {"warnings": [], "information": [{"field": "Phone", "details": "Must not be longer than 21 characters."}]}}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false, "validation": {"warnings": [], "information": [{"field": "TaxNumber", "details": "Must not be longer than 19 characters."}]}}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "The supplier's registration number", "required": false, "validation": {"warnings": [], "information": [{"field": "RegistrationNumber", "details": "Must not be longer than 14 characters."}]}}, "status": {"type": "String", "displayName": "Supplier Status", "description": "The current state of the supplier", "required": true, "options": [{"value": "Active", "type": "String", "required": false}, {"value": "Unknown", "type": "String", "required": false}], "validation": {"warnings": [], "information": [{"field": "Status", "details": "Must be provided."}]}}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": true, "validation": {"warnings": [{"field": "Addresses", "details": "Must only have 5 address entries at most."}], "information": [{"field": "Addresses", "details": "Must be provided."}]}}}} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "The default currency for transactions recorded against the supplier", "required": false}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false}, "status": {"type": "String", "displayName": "Supplier Status", "description": "The current state of the supplier", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Archived", "type": "String", "displayName": "Archived", "required": false}]}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false, "validation": {"warnings": [{"field": "Addresses", "details": "Only one each of Billing and Delivery addresses can be provided"}], "information": [{"field": "Addresses", "details": "Multiple addresses of Unknown type may be provided"}]}}}} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true, "validation": {"warnings": [{"field": "SupplierName", "details": "Max length of 41 characters."}], "information": []}}, "contactName": {"type": "String", "displayName": "Contact Name", "description": "The name of the main contact for the supplier", "required": false, "validation": {"warnings": [{"field": "ContactName", "details": "Max length of 25 characters for first and last names"}], "information": []}}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "The supplier's registration number", "required": false}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false, "validation": {"warnings": [{"field": "TaxNumber", "details": "Max length of 30 characters."}], "information": []}}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "The default currency for transactions recorded against the supplier", "required": false, "validation": {"warnings": [{"field": "DefaultCurrency", "details": "Must be a three letter ISO code that matches an existing, active currency in the QuickBooks Desktop company"}, {"field": "DefaultCurrency", "details": "Can only be set if Multicurrency is enabled within the QuickBooks Desktop company"}], "information": [{"field": "DefaultCurrency", "details": "If not set, will default to the base currency of the QuickBooks Desktop company"}]}}, "status": {"type": "String", "displayName": "Supplier Status", "description": "The current state of the supplier", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Archived", "type": "String", "displayName": "Archived", "required": false}]}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false}}} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false, "validation": {"warnings": [{"field": "Phone", "details": "Country, area, and number are space separated"}], "information": []}}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "The supplier's registration number", "required": false}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false}, "status": {"type": "String", "displayName": "Supplier Status", "description": "The current state of the supplier", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Archived", "type": "String", "displayName": "Archived", "required": false}]}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "The default currency for transactions recorded against the supplier", "required": false}}} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false, "validation": {"warnings": [{"field": "Phone", "details": "Country, area, and number are space separated"}], "information": []}}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "The supplier's registration number", "required": false}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false}, "status": {"type": "String", "displayName": "Supplier Status", "description": "The current state of the supplier", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Archived", "type": "String", "displayName": "Archived", "required": false}]}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "The default currency for transactions recorded against the supplier", "required": false}}} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"id": {"type": "String", "displayName": "Id", "description": "ID of the supplier.", "required": true, "validation": {"warnings": [{"field": "id", "details": "The supplier ID must be unique, contain no spaces and have a maximum of 8 characters."}], "information": [{"field": "id", "details": "The supplier ID must be all Uppercase, if it is not, it will be converted to Uppercase before pushing."}]}}, "supplierName": {"type": "String", "displayName": "Name", "description": "Name of the supplier.", "required": true, "validation": {"warnings": [{"field": "supplierName", "details": "The supplier name can have a maximum of 60 characters"}], "information": []}}, "contactName": {"type": "String", "displayName": "Contact Name", "description": "The name of the main contact for the supplier.", "required": false, "validation": {"warnings": [{"field": "contactName", "details": "The contact name can have a maximum of 30 characters"}], "information": []}}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The email address that the supplier may be contacted on.", "required": false}, "phone": {"type": "String", "displayName": "Telephone", "description": "The telephone number that the supplier may be contacted on.", "required": false}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "If not provided, the currency will default to the company's base currency.", "required": false}, "status": {"type": "String", "displayName": "Status", "description": "The status of the supplier.", "required": false, "options": [{"value": "Active", "type": "String", "displayName": "Active Status", "required": false}]}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "Contact addresses for the supplier.", "required": false, "validation": {"warnings": [{"field": "addresses", "details": "Only one address can be included in the Addresses array."}], "information": []}}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "Legal company registration identifier.", "required": false}}, "validation": {"warnings": [], "information": [{"details": "Pushing to Sage 50 2015 (v21) or below is not supported. To enable push, please upgrade to at least Sage 50 2016 (v22) and re-sync the company."}]}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true}, "contactName": {"type": "String", "displayName": "Contact Name", "description": "The name of the main contact for the supplier", "required": false}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false, "validation": {"warnings": [], "information": [{"field": "Addresses", "details": "Can contain a maximum of one address"}]}}}} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true, "validation": {"warnings": [{"field": "SupplierName", "details": "Must be between 1 and 100 characters"}], "information": []}}, "contactName": {"type": "String", "displayName": "Contact Name", "description": "The name of the main contact for the supplier", "required": true, "validation": {"warnings": [{"field": "ContactName", "details": "Must be between 1 and 200 characters"}], "information": []}}, "status": {"type": "String", "displayName": "Supplier Status", "description": "The current state of the supplier", "required": true, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "Archived", "type": "String", "displayName": "Archived", "required": false}]}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": false, "validation": {"warnings": [{"field": "Phone", "details": "Must be no greater than 30 characters"}], "information": []}}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": false, "validation": {"warnings": [{"field": "EmailAddress", "details": "Must be no greater than 200 characters"}], "information": []}}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": false, "validation": {"warnings": [{"field": "TaxNumber", "details": "Must be no greater than 20 characters"}], "information": []}}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "The supplier's registration number", "required": false, "validation": {"warnings": [{"field": "RegistrationNumber", "details": "Must be no greater than 100 characters"}], "information": []}}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "The default currency for transactions recorded against the supplier", "required": false, "options": [{"value": "AUD", "type": "String", "displayName": "Australian Dollar", "required": false}, {"value": "CAD", "type": "String", "displayName": "Canadian Dollar", "required": false}, {"value": "GBP", "type": "String", "displayName": "Pound Sterling", "required": false}, {"value": "USD", "type": "String", "displayName": "US Dollar", "required": false}, {"value": "ZAR", "type": "String", "displayName": "Rand", "required": false}]}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": false, "validation": {"warnings": [{"field": "Addresses", "details": "If supplied, must contain only 1 address"}, {"field": "Addresses", "details": "If TaxNumber is supplied, an Address with a Country is required"}], "information": []}}}} + Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Supplier", "description": "A Supplier is a person or organisation that provides a product or service", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Supplier Name", "description": "The name for the supplier, typically a company name", "required": true}, "contactName": {"type": "String", "displayName": "Contact Name", "description": "The name of the main contact for the supplier", "required": true}, "emailAddress": {"type": "String", "displayName": "Email Address", "description": "The preferred email address the supplier should be contacted on", "required": true}, "phone": {"type": "String", "displayName": "Phone", "description": "The preferred phone number the supplier should be contacted on", "required": true}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "A collection of addresses associated to the supplier", "required": true}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "The supplier's registration number", "required": true}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "The supplier's tax number", "required": true}, "status": {"type": "String", "displayName": "Supplier Status", "description": "The current state of the supplier", "required": true}, "defaultCurrency": {"type": "String", "displayName": "Default Currency", "description": "The default currency for transactions recorded against the supplier", "required": true}, "metadata": {"type": "Object", "displayName": "Metadata", "description": "Miscellaneous data about the item", "required": true}}} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "200": + application/json: {"type": "Object", "displayName": "Suppliers", "description": "An accounts payable contact that supplies good or services, also referred to as a vendor.", "required": true, "properties": {"supplierName": {"type": "String", "displayName": "Name", "description": "Name of the supplier.", "required": true}, "phone": {"type": "String", "displayName": "Phone", "description": "Main contact phone number for the supplier.", "required": false, "validation": {"warnings": [{"field": "phone", "details": "Country, area, and number are space separated"}], "information": []}}, "emailAddress": {"type": "String", "displayName": "Email", "description": "Main contact email for the supplier.", "required": false}, "registrationNumber": {"type": "String", "displayName": "Registration Number", "description": "Legal company registration identifier.", "required": false, "validation": {"warnings": [{"field": "registrationNumber", "details": "Max length of 50 characters"}], "information": []}}, "taxNumber": {"type": "String", "displayName": "Tax Number", "description": "Legal tax registration identifier.", "required": false}, "status": {"type": "String", "displayName": "Status", "description": "Status of the supplier account.", "required": false, "options": [{"value": "Active", "type": "String", "displayName": "Active", "required": false}, {"value": "InActive", "type": "String", "displayName": "Inactive", "required": false}]}, "addresses": {"type": "Array", "displayName": "Addresses", "description": "Contact addresses for the supplier.", "required": false}}} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + responses: + "401": + 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: {} + requestBody: + application/json: {"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "73593", "supplierName": "test 20230420 1004", "contactName": "Joe Bloggs", "phone": "(877) 492-8687", "status": "Active"} + responses: + "200": + application/json: {"changes": [], "dataType": "invoices", "companyId": "8a210b68-6988-11ed-a1eb-0242ac120002", "pushOperationKey": "d642c1fc-6fe0-4724-9bcd-d89dc7fa504e", "dataConnectionKey": "2e9d2c44-f675-40ba-8049-353bfcb5e171", "requestedOnUtc": "2022-10-23T00:00:00Z", "completedOnUtc": "2022-10-23T00:00:00Z", "status": "Pending", "statusCode": 207565} + "400": {} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + query: {} + 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: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171" + supplierId: "" + query: {} + 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} + list-tax-rates: + "": + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [], "pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} + "400": {} + Clear Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "2023-10-06T13:04:00", "id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "code": "110", "status": "Active", "effectiveTaxRate": 10, "totalTaxRate": 10, "components": [{"name": "10%", "rate": 10, "isCompound": false}], "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "2024-01-20T13:04:00", "id": "31f5f7a5-cf8e-4452-9979-c8b43997a6f2", "name": "Sales Tax 15%", "code": "115", "status": "Active", "effectiveTaxRate": 15, "totalTaxRate": 15, "components": [{"name": "15%", "rate": 15, "isCompound": false}], "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 5, "_links": {"self": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/taxRates"}, "current": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/taxRates?page=1&pageSize=2"}, "next": {"href": "/companies/354a121b-855f-4d25-90ad-0905b498c1c0/data/taxRates?page=2&pageSize=2"}}} + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:18Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "cc81fea8-2917-ed11-90eb-002248009df3", "name": "", "code": " - ", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "-", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["DirectIncome.LineItems.TaxRateRef.Id"]}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-27T14:21:18Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "1170560b-5519-ed11-90eb-00224800a11d", "name": "", "code": " - DOMESTIC", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "- DOMESTIC", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["DirectIncome.LineItems.TaxRateRef.Id"]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 21, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/taxRates"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/taxRates?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/taxRates?page=2&pageSize=2"}}} + Exact (Netherlands): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-26T13:31:58Z", "sourceModifiedDate": "2019-10-22T14:09:25Z", "id": "9b131726-71cc-432c-b7eb-8dd9f6a6c2b3", "name": "Geen BTW", "code": "0", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "0", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Invoice.LineItems.TaxRateRef.Id", "CreditNote.LineItems.TaxRateRef.Id", "Bill.LineItems.TaxRateRef.Id", "BillCreditNote.LineItems.TaxRateRef.Id"]}]}, {"modifiedDate": "2022-10-26T13:31:58Z", "sourceModifiedDate": "2022-07-21T09:54:15Z", "id": "146106e9-85f7-46bc-bc90-4210cde500b9", "name": "Geen BTW", "code": "0-1", "status": "Active", "effectiveTaxRate": 15, "totalTaxRate": 15, "components": [{"name": "0-1", "rate": 15, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Invoice.LineItems.TaxRateRef.Id", "CreditNote.LineItems.TaxRateRef.Id", "Bill.LineItems.TaxRateRef.Id", "BillCreditNote.LineItems.TaxRateRef.Id"]}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 32, "_links": {"self": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/taxRates"}, "current": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/taxRates?page=1&pageSize=2"}, "next": {"href": "/companies/b83b1923-4db6-45a8-a779-b4e320c15979/data/taxRates?page=2&pageSize=2"}}} + Exact (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-26T13:33:07Z", "sourceModifiedDate": "2017-07-12T02:28:23Z", "id": "3b9b05b2-2a70-4750-88e8-5d35009175e5", "name": "UK sales VAT 0%", "code": "00", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "00", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Invoice.LineItems.TaxRateRef.Id", "CreditNote.LineItems.TaxRateRef.Id"]}]}, {"modifiedDate": "2022-10-26T13:33:07Z", "sourceModifiedDate": "2017-07-12T02:28:23Z", "id": "92c01056-0b5e-44f8-81df-83b6f2a41dbd", "name": "UK sales standard rate", "code": "01", "status": "Active", "effectiveTaxRate": 20, "totalTaxRate": 20, "components": [{"name": "01", "rate": 20, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Invoice.LineItems.TaxRateRef.Id", "CreditNote.LineItems.TaxRateRef.Id"]}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 22, "_links": {"self": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/taxRates"}, "current": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/taxRates?page=1&pageSize=2"}, "next": {"href": "/companies/d95030cd-22b2-482b-9c7b-2980dcc2b1ce/data/taxRates?page=2&pageSize=2"}}} + FreeAgent: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-25T14:19:11Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "1", "name": "VAT (20%)", "code": "1", "status": "Active", "effectiveTaxRate": 20, "totalTaxRate": 20, "components": [{"name": "VAT (20%)", "rate": 20, "isCompound": false}], "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-25T14:19:11Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "2", "name": "VAT (5%)", "code": "2", "status": "Active", "effectiveTaxRate": 5, "totalTaxRate": 5, "components": [{"name": "VAT (5%)", "rate": 5, "isCompound": false}], "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 3, "_links": {"self": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/taxRates"}, "current": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/taxRates?page=1&pageSize=2"}, "next": {"href": "/companies/071ad738-68f3-4561-afd0-69bab9df0803/data/taxRates?page=2&pageSize=2"}}} + FreshBooks: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2021-02-11T09:05:45", "id": "19255", "name": "helloabdul", "code": "111", "status": "Active", "effectiveTaxRate": 32, "totalTaxRate": 32, "components": [{"name": "helloabdul", "rate": 32, "isCompound": false}], "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2021-02-25T07:27:36", "id": "19255-19257", "name": "helloabdul and hello2", "code": "111", "status": "Active", "effectiveTaxRate": 131, "totalTaxRate": 131, "components": [{"name": "helloabdul", "rate": 32, "isCompound": false}, {"name": "hello2", "rate": 99, "isCompound": false}], "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 105, "_links": {"self": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/taxRates"}, "current": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/taxRates?page=1&pageSize=2"}, "next": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/taxRates?page=2&pageSize=2"}}} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-01-30T14:47:01Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "209", "name": "<Not Used>", "code": ".", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "GST CA_E", "rate": 0, "isCompound": false}, {"name": "PST_CA_E", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Invoice.LineItems.TaxRateRef.Id", "CreditNote.LineItems.TaxRateRef.Id", "Bill.LineItems.TaxRateRef.Id", "BillCreditNote.LineItems.TaxRateRef.Id"]}]}, {"modifiedDate": "2023-01-30T14:47:01Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "208", "name": "CA-E", "code": "CA-E", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "GST CA_E", "rate": 0, "isCompound": false}, {"name": "PST_CA_E", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Invoice.LineItems.TaxRateRef.Id", "CreditNote.LineItems.TaxRateRef.Id", "Bill.LineItems.TaxRateRef.Id", "BillCreditNote.LineItems.TaxRateRef.Id"]}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 48, "_links": {"self": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/taxRates"}, "current": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/taxRates?page=1&pageSize=2"}, "next": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/taxRates?page=2&pageSize=2"}}} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T09:12:08Z", "sourceModifiedDate": "2001-08-28T19:11:26", "id": "20000-999022286", "name": "Non-Taxable Sales", "code": "Non", "status": "Active", "components": [], "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:12:08Z", "sourceModifiedDate": "2001-08-28T19:11:26", "id": "10000-999022286", "name": "Taxable Sales", "code": "Tax", "status": "Active", "components": [], "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 2, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/taxRates"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/taxRates?page=1&pageSize=2"}}} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-01-18T11:02:40Z", "sourceModifiedDate": "2019-05-18T10:17:57Z", "id": "5_Bills", "name": "0.0% ECG Bills", "code": "0.0% ECG", "status": "Archived", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "ECPGZR", "rate": 0, "isCompound": false}, {"name": "ECZP", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Bill.LineItems.TaxRateRef.Id", "BillCreditNote.LineItems.TaxRateRef.Id"]}]}, {"modifiedDate": "2023-01-18T11:02:40Z", "sourceModifiedDate": "2019-05-18T10:17:57Z", "id": "5_Invoices", "name": "0.0% ECG Invoices", "code": "0.0% ECG", "status": "Archived", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "EGS-ECGS", "rate": 0, "isCompound": false}, {"name": "EGS-ECSS", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Invoice.LineItems.TaxRateRef.Id"]}]}], "pageNumber": 1, "pageSize": 2, "totalResults": 87, "_links": {"self": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/taxRates"}, "current": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/taxRates?page=1&pageSize=2"}, "next": {"href": "/companies/10818b5e-6e6a-4ed4-a1c5-3e3efe626e87/data/taxRates?page=2&pageSize=2"}}} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T09:35:58Z", "sourceModifiedDate": "2016-09-08T21:12:44Z", "id": "5_Bills", "name": "0.0% ECG Bills", "code": "0.0% ECG", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "ECZP", "rate": 0, "isCompound": false}, {"name": "ECPGZR", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Bill.LineItems.TaxRateRef.Id", "BillCreditNote.LineItems.TaxRateRef.Id"]}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-26T09:35:58Z", "sourceModifiedDate": "2016-09-08T21:12:44Z", "id": "5_Invoices", "name": "0.0% ECG Invoices", "code": "0.0% ECG", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "EGS-ECGS", "rate": 0, "isCompound": false}, {"name": "EGS-ECSS", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Invoice.LineItems.TaxRateRef.Id"]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 35, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/taxRates"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/taxRates?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/taxRates?page=2&pageSize=2"}}} + Sage 200cloud: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-14T09:35:51Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "1728", "name": "Zero rated", "code": "0", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "Zero rated", "rate": 0, "isCompound": false}], "validDatatypeLinks": []}, {"modifiedDate": "2022-10-14T09:35:51Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "1729", "name": "Standard rate", "code": "1", "status": "Active", "effectiveTaxRate": 20, "totalTaxRate": 20, "components": [{"name": "Standard rate", "rate": 20, "isCompound": false}], "validDatatypeLinks": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 19, "_links": {"self": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/taxRates"}, "current": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/taxRates?page=1&pageSize=2"}, "next": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/taxRates?page=2&pageSize=2"}}} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "0", "name": "Zero rated", "code": "T0", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "T0", "rate": 0, "isCompound": false}], "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "1", "name": "Standard rate", "code": "T1", "status": "Active", "effectiveTaxRate": 20, "totalTaxRate": 20, "components": [{"name": "T1", "rate": 20, "isCompound": false}], "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 21, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/taxRates"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/taxRates?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/taxRates?page=2&pageSize=2"}}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-24T14:52:49Z", "sourceModifiedDate": "2021-07-01T16:49:32Z", "id": "GB_EXEMPT", "name": "Exempt 0.00%", "code": "EXEMPT", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "Exempt 0.00%", "rate": 0, "isCompound": false}], "validDatatypeLinks": []}, {"modifiedDate": "2022-10-24T14:52:49Z", "sourceModifiedDate": "2021-07-01T16:49:32Z", "id": "GB_LOWER", "name": "Lower Rate 5.00%", "code": "LOWER", "status": "Active", "effectiveTaxRate": 5, "totalTaxRate": 5, "components": [{"name": "Lower Rate 5.00%", "rate": 5, "isCompound": false}], "validDatatypeLinks": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 5, "_links": {"self": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/taxRates"}, "current": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/taxRates?page=1&pageSize=2"}, "next": {"href": "/companies/390083e2-351b-407c-a3be-55081c36c182/data/taxRates?page=2&pageSize=2"}}} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-04T16:31:30Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "109", "name": "Devbox test tax detail", "code": "DevboxTax", "status": "Active", "effectiveTaxRate": 5, "totalTaxRate": 5, "components": [{"name": "Devbox test tax detail", "rate": 5, "isCompound": false}], "validDatatypeLinks": [], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-04-04T16:31:30Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "44", "name": "EC Purchase Goods Exempt Rate", "code": "EC Purchase Goods Exempt Rate", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [], "validDatatypeLinks": [], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 66, "_links": {"self": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/taxRates"}, "current": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/taxRates?page=1&pageSize=2"}, "next": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/taxRates?page=2&pageSize=2"}}} + Wave: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-11-16T18:15:25Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1NhbGVzVGF4OjE2NjUyNTc5ODU=", "name": "Abdul's new Tax", "code": "ANT", "status": "Active", "effectiveTaxRate": 11, "totalTaxRate": 11, "components": [{"name": "Abdul's new Tax", "rate": 11, "isCompound": true}], "validDatatypeLinks": []}, {"modifiedDate": "2022-11-16T18:15:25Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1NhbGVzVGF4OjE1NDA5NjM0Mzg=", "name": "FederalABC", "code": "FederalABC", "status": "Active", "effectiveTaxRate": 5, "totalTaxRate": 5, "components": [{"name": "FederalABC", "rate": 5, "isCompound": false}], "validDatatypeLinks": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 4, "_links": {"self": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/taxRates"}, "current": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/taxRates?page=1&pageSize=2"}, "next": {"href": "/companies/0b22b59d-b4e5-4c35-b03f-88bbbcb41256/data/taxRates?page=2&pageSize=2"}}} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-15T20:35:09Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "ECACQUISITIONS", "name": "EC Acquisitions (20%)", "code": "ECACQUISITIONS", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "VAT", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Invoice.LineItems.TaxRateRef.Id", "CreditNote.LineItems.TaxRateRef.Id", "Bill.LineItems.TaxRateRef.Id", "BillCreditNote.LineItems.TaxRateRef.Id"]}], "metadata": {"isDeleted": false}}, {"modifiedDate": "2023-03-15T20:35:09Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "ECZRACQUISITIONS", "name": "EC Acquisitions (Zero Rated)", "code": "ECZRACQUISITIONS", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "VAT", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Invoice.LineItems.TaxRateRef.Id", "CreditNote.LineItems.TaxRateRef.Id", "Bill.LineItems.TaxRateRef.Id", "BillCreditNote.LineItems.TaxRateRef.Id"]}], "metadata": {"isDeleted": false}}], "pageNumber": 1, "pageSize": 2, "totalResults": 17, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/taxRates"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/taxRates?page=1&pageSize=2"}, "next": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/taxRates?page=2&pageSize=2"}}} + Zoho Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "104957000000033027", "name": "Standard Rate", "code": "104957000000033027", "status": "Active", "effectiveTaxRate": 20, "totalTaxRate": 20, "components": [{"name": "Standard Rate", "rate": 20, "isCompound": false}], "validDatatypeLinks": []}, {"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "104957000000033031", "name": "Reduced Rate", "code": "104957000000033031", "status": "Active", "effectiveTaxRate": 5, "totalTaxRate": 5, "components": [{"name": "Reduced Rate", "rate": 5, "isCompound": false}], "validDatatypeLinks": []}], "pageNumber": 1, "pageSize": 2, "totalResults": 6, "_links": {"self": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/taxRates"}, "current": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/taxRates?page=1&pageSize=2"}, "next": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/taxRates?page=2&pageSize=2"}}} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "400": + 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" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + 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} + get-tax-rate: + Clear Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T12:38:17Z", "sourceModifiedDate": "2023-10-06T13:04:00", "id": "6c88aff3-7cb9-4980-a3d3-443e72e02498", "name": "Sales Tax (10%)", "code": "110", "status": "Active", "effectiveTaxRate": 10, "totalTaxRate": 10, "components": [{"name": "10%", "rate": 10, "isCompound": false}], "validDatatypeLinks": [], "metadata": {"isDeleted": false}} + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-27T14:21:18Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "cc81fea8-2917-ed11-90eb-002248009df3", "name": "", "code": " - ", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "-", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["DirectIncome.LineItems.TaxRateRef.Id"]}], "metadata": {"isDeleted": false}} + Exact (Netherlands): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-26T13:31:58Z", "sourceModifiedDate": "2019-10-22T14:09:25Z", "id": "9b131726-71cc-432c-b7eb-8dd9f6a6c2b3", "name": "Geen BTW", "code": "0", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "0", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Invoice.LineItems.TaxRateRef.Id", "CreditNote.LineItems.TaxRateRef.Id", "Bill.LineItems.TaxRateRef.Id", "BillCreditNote.LineItems.TaxRateRef.Id"]}]} + Exact (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-26T13:33:07Z", "sourceModifiedDate": "2017-07-12T02:28:23Z", "id": "3b9b05b2-2a70-4750-88e8-5d35009175e5", "name": "UK sales VAT 0%", "code": "00", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "00", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Invoice.LineItems.TaxRateRef.Id", "CreditNote.LineItems.TaxRateRef.Id"]}]} + FreeAgent: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-25T14:19:11Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "1", "name": "VAT (20%)", "code": "1", "status": "Active", "effectiveTaxRate": 20, "totalTaxRate": 20, "components": [{"name": "VAT (20%)", "rate": 20, "isCompound": false}], "validDatatypeLinks": [], "metadata": {"isDeleted": false}} + FreshBooks: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-24T16:07:23Z", "sourceModifiedDate": "2021-02-11T09:05:45", "id": "19255", "name": "helloabdul", "code": "111", "status": "Active", "effectiveTaxRate": 32, "totalTaxRate": 32, "components": [{"name": "helloabdul", "rate": 32, "isCompound": false}], "validDatatypeLinks": [], "metadata": {"isDeleted": false}} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-01-30T14:47:01Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "209", "name": "<Not Used>", "code": ".", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "GST CA_E", "rate": 0, "isCompound": false}, {"name": "PST_CA_E", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Invoice.LineItems.TaxRateRef.Id", "CreditNote.LineItems.TaxRateRef.Id", "Bill.LineItems.TaxRateRef.Id", "BillCreditNote.LineItems.TaxRateRef.Id"]}]} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T09:12:08Z", "sourceModifiedDate": "2001-08-28T19:11:26", "id": "20000-999022286", "name": "Non-Taxable Sales", "code": "Non", "status": "Active", "components": [], "validDatatypeLinks": [], "metadata": {"isDeleted": false}} + QuickBooks Online: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-01-18T11:02:40Z", "sourceModifiedDate": "2019-05-18T10:17:57Z", "id": "5_Bills", "name": "0.0% ECG Bills", "code": "0.0% ECG", "status": "Archived", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "ECPGZR", "rate": 0, "isCompound": false}, {"name": "ECZP", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Bill.LineItems.TaxRateRef.Id", "BillCreditNote.LineItems.TaxRateRef.Id"]}]} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T09:35:58Z", "sourceModifiedDate": "2016-09-08T21:12:44Z", "id": "5_Bills", "name": "0.0% ECG Bills", "code": "0.0% ECG", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "ECZP", "rate": 0, "isCompound": false}, {"name": "ECPGZR", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Bill.LineItems.TaxRateRef.Id", "BillCreditNote.LineItems.TaxRateRef.Id"]}], "metadata": {"isDeleted": false}} + Sage 200cloud: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-14T09:35:51Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "1728", "name": "Zero rated", "code": "0", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "Zero rated", "rate": 0, "isCompound": false}], "validDatatypeLinks": []} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "0", "name": "Zero rated", "code": "T0", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "T0", "rate": 0, "isCompound": false}], "validDatatypeLinks": [], "metadata": {"isDeleted": false}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-24T14:52:49Z", "sourceModifiedDate": "2021-07-01T16:49:32Z", "id": "GB_EXEMPT", "name": "Exempt 0.00%", "code": "EXEMPT", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "Exempt 0.00%", "rate": 0, "isCompound": false}], "validDatatypeLinks": []} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-04T16:31:30Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "109", "name": "Devbox test tax detail", "code": "DevboxTax", "status": "Active", "effectiveTaxRate": 5, "totalTaxRate": 5, "components": [{"name": "Devbox test tax detail", "rate": 5, "isCompound": false}], "validDatatypeLinks": [], "metadata": {"isDeleted": false}} + Wave: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-11-16T18:15:25Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "QnVzaW5lc3M6ZTI0OGQyZDctMWE5Ni00YTk4LWFkOTEtMDdlMGYyMmNhNmE2O1NhbGVzVGF4OjE2NjUyNTc5ODU=", "name": "Abdul's new Tax", "code": "ANT", "status": "Active", "effectiveTaxRate": 11, "totalTaxRate": 11, "components": [{"name": "Abdul's new Tax", "rate": 11, "isCompound": true}], "validDatatypeLinks": []} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-15T20:35:09Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "ECACQUISITIONS", "name": "EC Acquisitions (20%)", "code": "ECACQUISITIONS", "status": "Active", "effectiveTaxRate": 0, "totalTaxRate": 0, "components": [{"name": "VAT", "rate": 0, "isCompound": false}], "validDatatypeLinks": [{"property": "Id", "links": ["Invoice.LineItems.TaxRateRef.Id", "CreditNote.LineItems.TaxRateRef.Id", "Bill.LineItems.TaxRateRef.Id", "BillCreditNote.LineItems.TaxRateRef.Id"]}], "metadata": {"isDeleted": false}} + Zoho Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-03T08:40:37Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "104957000000033027", "name": "Standard Rate", "code": "104957000000033027", "status": "Active", "effectiveTaxRate": 20, "totalTaxRate": 20, "components": [{"name": "Standard Rate", "rate": 20, "isCompound": false}], "validDatatypeLinks": []} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + taxRateId: "" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + list-tracking-categories: + "": + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-23T00:00:00Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "string", "name": "string", "status": "Unknown", "parentId": "string", "hasChildren": true}], "pageNumber": 1, "pageSize": 10, "totalResults": 1, "_links": {"self": {"href": "/companies/{id}/data/{dataType}"}, "current": {"href": "/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} + "400": {} + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-27T14:21:18Z", "sourceModifiedDate": "2022-09-14T11:19:28Z", "id": "9e1dea89-1e34-ed11-97e8-000d3a872db9", "name": "A-000-A-Hundreds", "status": "Active", "parentId": "d1391864-77cf-eb11-9f0a-0022481b404b", "hasChildren": false}, {"modifiedDate": "2023-03-27T14:21:18Z", "sourceModifiedDate": "2021-06-17T14:25:28Z", "id": "ffc4c780-77cf-eb11-9f0a-0022481b404b", "name": "A-100-A-100 Name", "status": "Active", "parentId": "d1391864-77cf-eb11-9f0a-0022481b404b", "hasChildren": false}], "pageNumber": 1, "pageSize": 2, "totalResults": 36, "_links": {"self": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/trackingCategories"}, "current": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/trackingCategories?page=1&pageSize=2"}, "next": {"href": "/companies/d6849caf-c146-41be-8335-b73346e3bd84/data/trackingCategories?page=2&pageSize=2"}}} + FreshBooks: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-24T16:07:24Z", "sourceModifiedDate": "2021-05-19T11:09:40", "id": "5389667", "name": "ABCustomCategory", "status": "Active", "parentId": "4370491", "hasChildren": false}, {"modifiedDate": "2023-03-24T16:07:24Z", "sourceModifiedDate": "2021-07-26T09:42:18", "id": "4370499", "name": "Accident Insurance", "status": "Active", "parentId": "4370496", "hasChildren": false}], "pageNumber": 1, "pageSize": 2, "totalResults": 82, "_links": {"self": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/trackingCategories"}, "current": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/trackingCategories?page=1&pageSize=2"}, "next": {"href": "/companies/3691c49e-0db4-4172-b3ab-e4084c365013/data/trackingCategories?page=2&pageSize=2"}}} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-01-30T14:46:52Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "CostEstimateType-AVGCOST", "name": "Average Cost", "status": "Active", "hasChildren": false}, {"modifiedDate": "2023-01-30T14:46:52Z", "sourceModifiedDate": "2022-11-17T11:47:34", "id": "classification-1", "name": "Class 1", "status": "Active", "hasChildren": false}], "pageNumber": 1, "pageSize": 2, "totalResults": 18, "_links": {"self": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/trackingCategories"}, "current": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/trackingCategories?page=1&pageSize=2"}, "next": {"href": "/companies/d5074b08-6a34-4b06-a742-236edf5dc4f1/data/trackingCategories?page=2&pageSize=2"}}} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T09:12:46Z", "sourceModifiedDate": "2024-12-15T16:03:14", "id": "80000008-1734278594", "name": "ClassWithSub", "status": "Active", "hasChildren": true}, {"modifiedDate": "2023-04-26T09:12:46Z", "sourceModifiedDate": "2024-12-15T16:09:02", "id": "8000000A-1734278615", "name": "Incative", "status": "Active", "hasChildren": false}], "pageNumber": 1, "pageSize": 2, "totalResults": 6, "_links": {"self": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/trackingCategories"}, "current": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/trackingCategories?page=1&pageSize=2"}, "next": {"href": "/companies/fc72ba08-af13-4474-b28a-01dcfa6cfb51/data/trackingCategories?page=2&pageSize=2"}}} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-26T09:35:57Z", "sourceModifiedDate": "2022-03-07T08:28:32Z", "id": "CLASS_5100000000000014491", "name": "A", "status": "Active", "parentId": "CLASSES", "hasChildren": false}, {"modifiedDate": "2023-04-26T09:35:57Z", "sourceModifiedDate": "2016-11-04T09:28:00Z", "id": "CLASS_200200000000000009374", "name": "Australia (deleted)", "status": "Archived", "parentId": "CLASSES", "hasChildren": false}], "pageNumber": 1, "pageSize": 2, "totalResults": 23, "_links": {"self": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/trackingCategories"}, "current": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/trackingCategories?page=1&pageSize=2"}, "next": {"href": "/companies/5a7f3597-36e1-4216-86fe-289ad36088a6/data/trackingCategories?page=2&pageSize=2"}}} + Sage 200cloud: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-14T09:35:52Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "__DEPARTMENTS/3", "name": "Accounts", "status": "Active", "parentId": "__DEPARTMENTS", "hasChildren": false}, {"modifiedDate": "2022-10-14T09:35:52Z", "sourceModifiedDate": "2020-02-28T14:23:46Z", "id": "__DEPARTMENTS/4", "name": "Admin", "status": "Active", "parentId": "__DEPARTMENTS", "hasChildren": false}], "pageNumber": 1, "pageSize": 2, "totalResults": 24, "_links": {"self": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/trackingCategories"}, "current": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/trackingCategories?page=1&pageSize=2"}, "next": {"href": "/companies/93c21e2d-049c-4d24-b41b-57e61c30b69e/data/trackingCategories?page=2&pageSize=2"}}} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "department_10", "name": "", "status": "Active", "parentId": "DEPARTMENTS", "hasChildren": false}, {"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "department_100", "name": "", "status": "Active", "parentId": "DEPARTMENTS", "hasChildren": false}], "pageNumber": 1, "pageSize": 2, "totalResults": 1022, "_links": {"self": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/trackingCategories"}, "current": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/trackingCategories?page=1&pageSize=2"}, "next": {"href": "/companies/cf5f2a47-2990-4221-bae6-0c19c86ac304/data/trackingCategories?page=2&pageSize=2"}}} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-07-27T17:41:22Z", "sourceModifiedDate": "2022-03-22T15:33:21", "id": "department_0", "name": "BallparkContracting", "status": "Active", "hasChildren": false}, {"modifiedDate": "2022-07-27T17:41:22Z", "sourceModifiedDate": "2021-06-23T15:33:21", "id": "department_1", "name": "BaseMountainConstruction", "status": "Active", "hasChildren": true}], "pageNumber": 1, "pageSize": 2, "totalResults": 15, "_links": {"self": {"href": "/companies/f4aae110-ca17-4cd4-8aaa-a3136b1cf0b1/data/trackingCategories"}, "current": {"href": "/companies/f4aae110-ca17-4cd4-8aaa-a3136b1cf0b1/data/trackingCategories?page=1&pageSize=2"}, "next": {"href": "/companies/f4aae110-ca17-4cd4-8aaa-a3136b1cf0b1/data/trackingCategories?page=2&pageSize=2"}}} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-04-04T16:32:02Z", "sourceModifiedDate": "2020-04-26T05:26:46", "id": "WAREHOUSE-2", "name": "200", "status": "Active", "parentId": "WAREHOUSE", "hasChildren": false}, {"modifiedDate": "2023-04-04T16:32:02Z", "sourceModifiedDate": "2021-08-10T13:41:01", "id": "WAREHOUSE-3", "name": "300", "status": "Active", "parentId": "WAREHOUSE", "hasChildren": false}], "pageNumber": 1, "pageSize": 2, "totalResults": 757, "_links": {"self": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/trackingCategories"}, "current": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/trackingCategories?page=1&pageSize=2"}, "next": {"href": "/companies/df02b289-cb16-4964-ac4d-9fd60b04538e/data/trackingCategories?page=2&pageSize=2"}}} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2023-03-15T20:37:11Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "dba3d4da-f9ed-4eee-8e0b-452d11fdb1fa", "name": "Eastside", "status": "Active", "parentId": "9d8ad8f6-0d0f-41e0-8851-ef47e8b54ae6", "hasChildren": false}, {"modifiedDate": "2023-03-15T20:37:11Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "34b9b859-07a9-451a-b4d3-effc9946634a", "name": "North", "status": "Active", "parentId": "9d8ad8f6-0d0f-41e0-8851-ef47e8b54ae6", "hasChildren": false}], "pageNumber": 1, "pageSize": 2, "totalResults": 5, "_links": {"self": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/trackingCategories"}, "current": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/trackingCategories?page=1&pageSize=2"}, "next": {"href": "/companies/5ced9667-a310-443a-a711-958d36377141/data/trackingCategories?page=2&pageSize=2"}}} + Zoho Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "200": + application/json: {"results": [{"modifiedDate": "2022-10-03T08:40:39Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "104957000000000323-104957000001510028", "name": "Down", "status": "Active", "parentId": "104957000000000323", "hasChildren": false}, {"modifiedDate": "2022-10-03T08:40:39Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "104957000000000323-104957000001510024", "name": "East", "status": "Active", "parentId": "104957000000000323", "hasChildren": false}], "pageNumber": 1, "pageSize": 2, "totalResults": 11, "_links": {"self": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/trackingCategories"}, "current": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/trackingCategories?page=1&pageSize=2"}, "next": {"href": "/companies/d0b68840-db50-4bc3-b88c-96e225333fea/data/trackingCategories?page=2&pageSize=2"}}} + Malformed query: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + responses: + "400": + 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" + query: + page: 1 + pageSize: 100 + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee" + orderBy: "-modifiedDate" + 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} + get-tracking-category: + Dynamics 365 Business Central: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + trackingCategoryId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-27T14:21:18Z", "sourceModifiedDate": "2022-09-14T11:19:28Z", "id": "9e1dea89-1e34-ed11-97e8-000d3a872db9", "name": "A-000-A-Hundreds", "status": "Active", "parentId": "d1391864-77cf-eb11-9f0a-0022481b404b", "hasChildren": false, "subCategories": []} + FreshBooks: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + trackingCategoryId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-24T16:07:24Z", "sourceModifiedDate": "2021-05-19T11:09:40", "id": "5389667", "name": "ABCustomCategory", "status": "Active", "parentId": "4370491", "hasChildren": false, "subCategories": []} + Oracle NetSuite: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + trackingCategoryId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-01-30T14:46:52Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "CostEstimateType-AVGCOST", "name": "Average Cost", "status": "Active", "hasChildren": false, "subCategories": []} + QuickBooks Desktop: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + trackingCategoryId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T09:12:46Z", "sourceModifiedDate": "2024-12-15T16:03:14", "id": "80000008-1734278594", "name": "ClassWithSub", "status": "Active", "hasChildren": true} + QuickBooks Online Sandbox: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + trackingCategoryId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-26T09:35:57Z", "sourceModifiedDate": "2022-03-07T08:28:32Z", "id": "CLASS_5100000000000014491", "name": "A", "status": "Active", "parentId": "CLASSES", "hasChildren": false, "subCategories": []} + Sage 50 (UK): + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + trackingCategoryId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-30T14:42:37Z", "sourceModifiedDate": "2022-11-25T09:43:54", "id": "department_10", "name": "", "status": "Active", "parentId": "DEPARTMENTS", "hasChildren": false, "subCategories": []} + Sage Business Cloud Accounting: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + trackingCategoryId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-07-27T17:41:22Z", "sourceModifiedDate": "2022-03-22T15:33:21", "id": "department_0", "name": "BallparkContracting", "status": "Active", "hasChildren": false, "subCategories": []} + Sage Intacct: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + trackingCategoryId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-04-04T16:32:02Z", "sourceModifiedDate": "2020-04-26T05:26:46", "id": "WAREHOUSE-2", "name": "200", "status": "Active", "parentId": "WAREHOUSE", "hasChildren": false, "subCategories": []} + Xero: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + trackingCategoryId: "" + responses: + "200": + application/json: {"modifiedDate": "2023-03-15T20:37:11Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "dba3d4da-f9ed-4eee-8e0b-452d11fdb1fa", "name": "Eastside", "status": "Active", "parentId": "9d8ad8f6-0d0f-41e0-8851-ef47e8b54ae6", "hasChildren": false, "subCategories": []} + Zoho Books: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + trackingCategoryId: "" + responses: + "200": + application/json: {"modifiedDate": "2022-10-03T08:40:39Z", "sourceModifiedDate": "2022-10-23T00:00:00Z", "id": "104957000000000323-104957000001510028", "name": "Down", "status": "Active", "parentId": "104957000000000323", "hasChildren": false, "subCategories": []} + Unauthorized: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + trackingCategoryId: "" + responses: + "401": + application/json: {"statusCode": 401, "service": "PublicApi", "error": "Unauthorized", "correlationId": "7eb40d6b415d7bcd99ce658268284056", "canBeRetried": "Unknown", "detailedErrorCode": 0} + get-accounting-profile: + Example 1: + parameters: + path: + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002" + responses: + "200": + application/json: {"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/"}], "ledgerLockDate": "2022-10-23T00:00:00Z", "registrationNumber": "5590111724", "taxNumber": "74111622555799035846", "financialYearStartDate": "2023-04-01T00:00:00", "baseCurrency": "GBP", "sourceUrls": {"Api": "https://api.codat.io"}, "createdDate": "2020-03-09T15:19:26"} + 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} diff --git a/previous-versions/sync-for-payables-version-1/.speakeasy/gen.yaml b/previous-versions/sync-for-payables-version-1/.speakeasy/gen.yaml index 06aa2c5e4..162ef60be 100644 --- a/previous-versions/sync-for-payables-version-1/.speakeasy/gen.yaml +++ b/previous-versions/sync-for-payables-version-1/.speakeasy/gen.yaml @@ -1,22 +1,28 @@ configVersion: 2.0.0 generation: sdkClassName: CodatSyncPayables + maintainOpenAPIOrder: true usageSnippets: optionalPropertyRendering: withExample + useClassNamesForArrayFields: true fixes: nameResolutionDec2023: true parameterOrderingFeb2024: true requestResponseComponentNamesFeb2024: true - telemetryEnabled: true - maintainOpenAPIOrder: true - useClassNamesForArrayFields: true auth: oAuth2ClientCredentialsEnabled: false + telemetryEnabled: true typescript: - version: 2.2.0 + version: 2.3.0 + additionalDependencies: + dependencies: {} + devDependencies: {} + peerDependencies: {} + additionalPackageJSON: {} author: Codat clientServerStatusCodesAsErrors: true description: Push expenses to accounting platforms. + enumFormat: union flattenGlobalSecurity: true imports: option: openapi @@ -28,16 +34,10 @@ typescript: webhooks: sdk/models/webhooks inputModelSuffix: input maxMethodParams: 0 - outputModelSuffix: output - packageName: '@codat/sync-for-payables-version-1' - templateVersion: v2 - additionalDependencies: - dependencies: {} - devDependencies: {} - peerDependencies: {} - additionalPackageJSON: {} - enumFormat: union methodArguments: infer-optional-args moduleFormat: commonjs + outputModelSuffix: output + packageName: '@codat/sync-for-payables-version-1' responseFormat: flat + templateVersion: v2 useIndexModules: true diff --git a/previous-versions/sync-for-payables-version-1/CONTRIBUTING.md b/previous-versions/sync-for-payables-version-1/CONTRIBUTING.md new file mode 100644 index 000000000..d585717fc --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# Contributing to This Repository + +Thank you for your interest in contributing to this repository. Please note that this repository contains generated code. As such, we do not accept direct changes or pull requests. Instead, we encourage you to follow the guidelines below to report issues and suggest improvements. + +## How to Report Issues + +If you encounter any bugs or have suggestions for improvements, please open an issue on GitHub. When reporting an issue, please provide as much detail as possible to help us reproduce the problem. This includes: + +- A clear and descriptive title +- Steps to reproduce the issue +- Expected and actual behavior +- Any relevant logs, screenshots, or error messages +- Information about your environment (e.g., operating system, software versions) + - For example can be collected using the `npx envinfo` command from your terminal if you have Node.js installed + +## Issue Triage and Upstream Fixes + +We will review and triage issues as quickly as possible. Our goal is to address bugs and incorporate improvements in the upstream source code. Fixes will be included in the next generation of the generated code. + +## Contact + +If you have any questions or need further assistance, please feel free to reach out by opening an issue. + +Thank you for your understanding and cooperation! + +The Maintainers diff --git a/previous-versions/sync-for-payables-version-1/FUNCTIONS.md b/previous-versions/sync-for-payables-version-1/FUNCTIONS.md new file mode 100644 index 000000000..7c2af3bfc --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/FUNCTIONS.md @@ -0,0 +1,109 @@ +# Standalone Functions + +> [!NOTE] +> This section is useful if you are using a bundler and targetting browsers and +> runtimes where the size of an application affects performance and load times. + +Every method in this SDK is also available as a standalone function. This +alternative API is suitable when targetting the browser or serverless runtimes +and using a bundler to build your application since all unused functionality +will be tree-shaken away. This includes code for unused methods, Zod schemas, +encoding helpers and response handlers. The result is dramatically smaller +impact on the application's final bundle size which grows very slowly as you use +more and more functionality from this SDK. + +Calling methods through the main SDK class remains a valid and generally more +more ergonomic option. Standalone functions represent an optimisation for a +specific category of applications. + +## Example + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { companiesList } from "@codat/sync-for-payables-version-1/funcs/companiesList.js"; +import { SDKValidationError } from "@codat/sync-for-payables-version-1/sdk/models/errors/sdkvalidationerror.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesList(codatSyncPayables, { + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + 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); + } + + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +## Result types + +Standalone functions differ from SDK methods in that they return a +`Result` type to capture _known errors_ and document them using +the type system. By avoiding throwing errors, application code maintains clear +control flow and error-handling become part of the regular flow of application +code. + +> We use the term "known errors" because standalone functions, and JavaScript +> code in general, can still throw unexpected errors such as `TypeError`s, +> `RangeError`s and `DOMException`s. Exhaustively catching all errors may be +> something this SDK addresses in the future. Nevertheless, there is still a lot +> of benefit from capturing most errors and turning them into values. + +The second reason for this style of programming is because these functions will +typically be used in front-end applications where exception throwing is +sometimes discouraged or considered unidiomatic. React and similar ecosystems +and libraries tend to promote this style of programming so that components +render useful content under all states (loading, success, error and so on). + +The general pattern when calling standalone functions looks like this: + +```typescript +import { Core } from ""; +import { fetchSomething } from "/funcs/fetchSomething.js"; + +const client = new Core(); + +async function run() { + const result = await fetchSomething(client, { id: "123" }); + if (!result.ok) { + // You can throw the error or handle it. It's your choice now. + throw result.error; + } + + console.log(result.value); +} + +run(); +``` + +Notably, `result.error` above will have an explicit type compared to a try-catch +variation where the error in the catch block can only be of type `unknown` (or +`any` depending on your TypeScript settings). \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/README.md b/previous-versions/sync-for-payables-version-1/README.md index 8801b186c..bc4cea313 100644 --- a/previous-versions/sync-for-payables-version-1/README.md +++ b/previous-versions/sync-for-payables-version-1/README.md @@ -4,51 +4,119 @@ Streamline your customers' accounts payable workflow. + +## Summary + +Sync for Payables: The API for Sync for Payables. + +Sync for Payables is an API and a set of supporting tools built to help integrate with your customers' accounting software, and keep their supplier information, invoices, and payments in sync. + +[Explore product](https://docs.codat.io/payables/overview) | [See OpenAPI spec](https://github.com/codatio/oas) + +--- + +## Endpoints + +| Endpoints | Description | +| :- |:- | +| Companies | Create and manage your SMB users' companies. | +| Connections | Create new and manage existing data connections for a company. | +| Accounts | Get, create, and update Accounts. | +| Bank accounts | Get, create, and update Bank accounts. | +| Bills | Get, create, and update Bills. | +| Bill credit notes | Get, create, and update Bill credit notes. | +| Bill payments | Get, create, and update Bill payments. | +| Journals | Get, create, and update Journals. | +| Journal entries | Get, create, and update Journal entries. | +| Payment methods | Get, create, and update Payment methods. | +| Suppliers | Get, create, and update Suppliers. | +| Tax rates | Get, create, and update Tax rates. | +| Tracking categories | Get, create, and update Tracking categories. | +| Company info | View company profile from the source platform. | +| Push operations | View historic push operations. | +| Manage data | Control how data is retrieved from an integration. | + + + + +## Table of Contents + +* [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) + + ## SDK Installation +The SDK can be installed with either [npm](https://www.npmjs.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/) or [yarn](https://classic.yarnpkg.com/en/) package managers. + ### NPM ```bash -npm add @codat/sync-for-payables +npm add @codat/sync-for-payables-version-1 +``` + +### PNPM + +```bash +pnpm add @codat/sync-for-payables-version-1 +``` + +### Bun + +```bash +bun add @codat/sync-for-payables-version-1 ``` ### Yarn ```bash -yarn add @codat/sync-for-payables +yarn add @codat/sync-for-payables-version-1 zod + +# Note that Yarn does not install peer dependencies automatically. You will need +# to install zod as shown above. ``` ## Example Usage + +## Requirements + +For supported JavaScript runtimes, please consult [RUNTIMES.md](RUNTIMES.md). + + ## SDK Example Usage ### Example ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; -async function run() { - const sdk = new CodatSyncPayables({ - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", - }, - }); +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); - const res = await sdk.companies.create({ - description: "Requested early access to the new financing scheme.", - groups: [ - { - id: "60d2fa12-8a04-11ee-b9d1-0242ac120002", - }, - ], - name: "Bank of Dave", - }); - - if (res.statusCode == 200) { - // handle response - } +async function run() { + const result = await codatSyncPayables.companies.list({ + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + // Handle the result + console.log(result); } run(); @@ -59,31 +127,243 @@ run(); ## Available Resources and Operations +
+Available methods + +### [accounts](docs/sdks/accounts/README.md) + +* [list](docs/sdks/accounts/README.md#list) - List accounts +* [get](docs/sdks/accounts/README.md#get) - Get account +* [getCreateModel](docs/sdks/accounts/README.md#getcreatemodel) - Get create account model +* [create](docs/sdks/accounts/README.md#create) - Create account + +### [bankAccounts](docs/sdks/bankaccounts/README.md) + +* [getCreateModel](docs/sdks/bankaccounts/README.md#getcreatemodel) - Get create/update bank account model +* [create](docs/sdks/bankaccounts/README.md#create) - Create bank account + +### [billCreditNotes](docs/sdks/billcreditnotes/README.md) + +* [list](docs/sdks/billcreditnotes/README.md#list) - List bill credit notes +* [get](docs/sdks/billcreditnotes/README.md#get) - Get bill credit note +* [getCreateUpdateModel](docs/sdks/billcreditnotes/README.md#getcreateupdatemodel) - Get create/update bill credit note model +* [create](docs/sdks/billcreditnotes/README.md#create) - Create bill credit note +* [update](docs/sdks/billcreditnotes/README.md#update) - Update bill credit note + +### [billPayments](docs/sdks/billpayments/README.md) + +* [list](docs/sdks/billpayments/README.md#list) - List bill payments +* [get](docs/sdks/billpayments/README.md#get) - Get bill payment +* [delete](docs/sdks/billpayments/README.md#delete) - Delete bill payment +* [getCreateModel](docs/sdks/billpayments/README.md#getcreatemodel) - Get create bill payment model +* [create](docs/sdks/billpayments/README.md#create) - Create bill payments + +### [bills](docs/sdks/bills/README.md) + +* [list](docs/sdks/bills/README.md#list) - List bills +* [get](docs/sdks/bills/README.md#get) - Get bill +* [getCreateUpdateModel](docs/sdks/bills/README.md#getcreateupdatemodel) - Get create/update bill model +* [create](docs/sdks/bills/README.md#create) - Create bill +* [update](docs/sdks/bills/README.md#update) - Update bill +* [delete](docs/sdks/bills/README.md#delete) - Delete bill +* [listAttachments](docs/sdks/bills/README.md#listattachments) - List bill attachments +* [getAttachment](docs/sdks/bills/README.md#getattachment) - Get bill attachment +* [deleteAttachment](docs/sdks/bills/README.md#deleteattachment) - Delete bill attachment +* [downloadAttachment](docs/sdks/bills/README.md#downloadattachment) - Download bill attachment +* [uploadAttachment](docs/sdks/bills/README.md#uploadattachment) - Upload bill attachment + + ### [companies](docs/sdks/companies/README.md) +* [list](docs/sdks/companies/README.md#list) - List companies * [create](docs/sdks/companies/README.md#create) - Create 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 -* [list](docs/sdks/companies/README.md#list) - List companies -* [update](docs/sdks/companies/README.md#update) - Update company -### [bills](docs/sdks/bills/README.md) +### [companyInfo](docs/sdks/companyinfo/README.md) -* [list](docs/sdks/bills/README.md#list) - List bills +* [getAccountingProfile](docs/sdks/companyinfo/README.md#getaccountingprofile) - Get company accounting profile ### [connections](docs/sdks/connections/README.md) +* [list](docs/sdks/connections/README.md#list) - List connections * [create](docs/sdks/connections/README.md#create) - Create connection -* [delete](docs/sdks/connections/README.md#delete) - Delete connection * [get](docs/sdks/connections/README.md#get) - Get connection -* [list](docs/sdks/connections/README.md#list) - List connections +* [delete](docs/sdks/connections/README.md#delete) - Delete connection * [unlink](docs/sdks/connections/README.md#unlink) - Unlink connection + +### [journalEntries](docs/sdks/journalentries/README.md) + +* [getCreateModel](docs/sdks/journalentries/README.md#getcreatemodel) - Get create journal entry model +* [create](docs/sdks/journalentries/README.md#create) - Create journal entry + +### [journals](docs/sdks/journals/README.md) + +* [list](docs/sdks/journals/README.md#list) - List journals +* [get](docs/sdks/journals/README.md#get) - Get journal +* [getCreateModel](docs/sdks/journals/README.md#getcreatemodel) - Get create journal model +* [create](docs/sdks/journals/README.md#create) - Create journal + +### [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 +* [refreshDataType](docs/sdks/managedata/README.md#refreshdatatype) - Refresh data type +* [listPullOperations](docs/sdks/managedata/README.md#listpulloperations) - List pull operations +* [getPullOperation](docs/sdks/managedata/README.md#getpulloperation) - Get pull operation + +### [paymentMethods](docs/sdks/paymentmethods/README.md) + +* [list](docs/sdks/paymentmethods/README.md#list) - List payment methods +* [get](docs/sdks/paymentmethods/README.md#get) - Get payment method + +### [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 + +### [suppliers](docs/sdks/suppliers/README.md) + +* [list](docs/sdks/suppliers/README.md#list) - List suppliers +* [get](docs/sdks/suppliers/README.md#get) - Get supplier +* [getCreateUpdateModel](docs/sdks/suppliers/README.md#getcreateupdatemodel) - Get create/update supplier model +* [create](docs/sdks/suppliers/README.md#create) - Create supplier +* [update](docs/sdks/suppliers/README.md#update) - Update supplier + +### [taxRates](docs/sdks/taxrates/README.md) + +* [list](docs/sdks/taxrates/README.md#list) - List all tax rates +* [get](docs/sdks/taxrates/README.md#get) - Get tax rate + +### [trackingCategories](docs/sdks/trackingcategories/README.md) + +* [list](docs/sdks/trackingcategories/README.md#list) - List tracking categories +* [get](docs/sdks/trackingcategories/README.md#get) - Get tracking categories + +
+ +## Standalone functions + +All the methods listed above are available as standalone functions. These +functions are ideal for use in applications running in the browser, serverless +runtimes or other environments where application bundle size is a primary +concern. When using a bundler to build your application, all unused +functionality will be either excluded from the final bundle or tree-shaken away. + +To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md). + +
+ +Available standalone functions + +- [accountsCreate](docs/sdks/accounts/README.md#create) +- [accountsGetCreateModel](docs/sdks/accounts/README.md#getcreatemodel) +- [accountsGet](docs/sdks/accounts/README.md#get) +- [accountsList](docs/sdks/accounts/README.md#list) +- [bankAccountsCreate](docs/sdks/bankaccounts/README.md#create) +- [bankAccountsGetCreateModel](docs/sdks/bankaccounts/README.md#getcreatemodel) +- [billCreditNotesCreate](docs/sdks/billcreditnotes/README.md#create) +- [billCreditNotesGetCreateUpdateModel](docs/sdks/billcreditnotes/README.md#getcreateupdatemodel) +- [billCreditNotesGet](docs/sdks/billcreditnotes/README.md#get) +- [billCreditNotesList](docs/sdks/billcreditnotes/README.md#list) +- [billCreditNotesUpdate](docs/sdks/billcreditnotes/README.md#update) +- [billPaymentsCreate](docs/sdks/billpayments/README.md#create) +- [billPaymentsDelete](docs/sdks/billpayments/README.md#delete) +- [billPaymentsGetCreateModel](docs/sdks/billpayments/README.md#getcreatemodel) +- [billPaymentsGet](docs/sdks/billpayments/README.md#get) +- [billPaymentsList](docs/sdks/billpayments/README.md#list) +- [billsCreate](docs/sdks/bills/README.md#create) +- [billsDeleteAttachment](docs/sdks/bills/README.md#deleteattachment) +- [billsDelete](docs/sdks/bills/README.md#delete) +- [billsDownloadAttachment](docs/sdks/bills/README.md#downloadattachment) +- [billsGetAttachment](docs/sdks/bills/README.md#getattachment) +- [billsGetCreateUpdateModel](docs/sdks/bills/README.md#getcreateupdatemodel) +- [billsGet](docs/sdks/bills/README.md#get) +- [billsListAttachments](docs/sdks/bills/README.md#listattachments) +- [billsList](docs/sdks/bills/README.md#list) +- [billsUpdate](docs/sdks/bills/README.md#update) +- [billsUploadAttachment](docs/sdks/bills/README.md#uploadattachment) +- [companiesCreate](docs/sdks/companies/README.md#create) +- [companiesDelete](docs/sdks/companies/README.md#delete) +- [companiesGet](docs/sdks/companies/README.md#get) +- [companiesList](docs/sdks/companies/README.md#list) +- [companiesUpdate](docs/sdks/companies/README.md#update) +- [companyInfoGetAccountingProfile](docs/sdks/companyinfo/README.md#getaccountingprofile) +- [connectionsCreate](docs/sdks/connections/README.md#create) +- [connectionsDelete](docs/sdks/connections/README.md#delete) +- [connectionsGet](docs/sdks/connections/README.md#get) +- [connectionsList](docs/sdks/connections/README.md#list) +- [connectionsUnlink](docs/sdks/connections/README.md#unlink) +- [journalEntriesCreate](docs/sdks/journalentries/README.md#create) +- [journalEntriesGetCreateModel](docs/sdks/journalentries/README.md#getcreatemodel) +- [journalsCreate](docs/sdks/journals/README.md#create) +- [journalsGetCreateModel](docs/sdks/journals/README.md#getcreatemodel) +- [journalsGet](docs/sdks/journals/README.md#get) +- [journalsList](docs/sdks/journals/README.md#list) +- [manageDataGetPullOperation](docs/sdks/managedata/README.md#getpulloperation) +- [manageDataGet](docs/sdks/managedata/README.md#get) +- [manageDataListPullOperations](docs/sdks/managedata/README.md#listpulloperations) +- [manageDataRefreshAllDataTypes](docs/sdks/managedata/README.md#refreshalldatatypes) +- [manageDataRefreshDataType](docs/sdks/managedata/README.md#refreshdatatype) +- [paymentMethodsGet](docs/sdks/paymentmethods/README.md#get) +- [paymentMethodsList](docs/sdks/paymentmethods/README.md#list) +- [pushOperationsGet](docs/sdks/pushoperations/README.md#get) +- [pushOperationsList](docs/sdks/pushoperations/README.md#list) +- [suppliersCreate](docs/sdks/suppliers/README.md#create) +- [suppliersGetCreateUpdateModel](docs/sdks/suppliers/README.md#getcreateupdatemodel) +- [suppliersGet](docs/sdks/suppliers/README.md#get) +- [suppliersList](docs/sdks/suppliers/README.md#list) +- [suppliersUpdate](docs/sdks/suppliers/README.md#update) +- [taxRatesGet](docs/sdks/taxrates/README.md#get) +- [taxRatesList](docs/sdks/taxrates/README.md#list) +- [trackingCategoriesGet](docs/sdks/trackingcategories/README.md#get) +- [trackingCategoriesList](docs/sdks/trackingcategories/README.md#list) + + +
+ + + +## File uploads + +Certain SDK methods accept files as part of a multi-part request. It is possible and typically recommended to upload files as a stream rather than reading the entire contents into memory. This avoids excessive memory consumption and potentially crashing with out-of-memory errors when working with very large files. The following example demonstrates how to attach a file stream to a request. + +> [!TIP] +> +> Depending on your JavaScript runtime, there are convenient utilities that return a handle to a file without reading the entire contents into memory: +> +> - **Node.js v20+:** Since v20, Node.js comes with a native `openAsBlob` function in [`node:fs`](https://nodejs.org/docs/latest-v20.x/api/fs.html#fsopenasblobpath-options). +> - **Bun:** The native [`Bun.file`](https://bun.sh/docs/api/file-io#reading-files-bun-file) function produces a file handle that can be used for streaming file uploads. +> - **Browsers:** All supported browsers return an instance to a [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) when reading the value from an `` element. +> - **Node.js v18:** A file stream can be created using the `fileFrom` helper from [`fetch-blob/from.js`](https://www.npmjs.com/package/fetch-blob). + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + await codatSyncPayables.bills.uploadAttachment({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "EILBDVJVNUAGVKRQ", + }); +} + +run(); + +``` + + ## Retries @@ -91,40 +371,33 @@ Some of the endpoints in this SDK support retries. If you use the SDK without a To change the default retry strategy for a single API call, simply provide a retryConfig object to the call: ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; -async function run() { - const sdk = new CodatSyncPayables({ - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", - }, - }); +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); - const res = await sdk.companies.create( - { - description: "Requested early access to the new financing scheme.", - groups: [ - { - id: "60d2fa12-8a04-11ee-b9d1-0242ac120002", - }, - ], - name: "Bank of Dave", - }, - { - strategy: "backoff", - backoff: { - initialInterval: 1, - maxInterval: 50, - exponent: 1.1, - maxElapsedTime: 100, - }, - retryConnectionErrors: false, - } - ); - - if (res.statusCode == 200) { - // handle response - } +async function run() { + const result = await codatSyncPayables.companies.list({ + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }, { + retries: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, + }, + retryConnectionErrors: false, + }, + }); + + // Handle the result + console.log(result); } run(); @@ -133,38 +406,32 @@ run(); If you'd like to override the default retry strategy for all operations that support retries, you can provide a retryConfig at SDK initialization: ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + retryConfig: { + strategy: "backoff", + backoff: { + initialInterval: 1, + maxInterval: 50, + exponent: 1.1, + maxElapsedTime: 100, + }, + retryConnectionErrors: false, + }, + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); async function run() { - const sdk = new CodatSyncPayables({ - retry_config: { - strategy: "backoff", - backoff: { - initialInterval: 1, - maxInterval: 50, - exponent: 1.1, - maxElapsedTime: 100, - }, - retryConnectionErrors: false, - }, - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", - }, - }); - - const res = await sdk.companies.create({ - description: "Requested early access to the new financing scheme.", - groups: [ - { - id: "60d2fa12-8a04-11ee-b9d1-0242ac120002", - }, - ], - name: "Bank of Dave", - }); - - if (res.statusCode == 200) { - // handle response - } + const result = await codatSyncPayables.companies.list({ + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + // Handle the result + console.log(result); } run(); @@ -175,45 +442,58 @@ run(); ## Error Handling -Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type. +All SDK methods return a response object or throw an error. If Error objects are specified in your OpenAPI Spec, the SDK will throw the appropriate Error type. -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + +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. -Example ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; +import { + ErrorMessage, + SDKValidationError, +} from "@codat/sync-for-payables-version-1/sdk/models/errors"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); async function run() { - const sdk = new CodatSyncPayables({ - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", - }, + let result; + try { + result = await codatSyncPayables.companies.list({ + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", }); - let res; - try { - res = await sdk.companies.create({ - description: "Requested early access to the new financing scheme.", - groups: [ - { - id: "60d2fa12-8a04-11ee-b9d1-0242ac120002", - }, - ], - name: "Bank of Dave", - }); - } catch (err) { - if (err instanceof errors.SDKError) { - console.error(err); // handle exception - throw err; - } - } - - if (res.statusCode == 200) { - // handle response + // 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; + } } + } } run(); @@ -226,38 +506,30 @@ run(); ### Select Server by Index -You can override the default server globally by passing a server index to the `serverIdx: number` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: +You can override the default server globally by passing a server index to the `serverIdx` optional parameter when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the indexes associated with the available servers: | # | Server | Variables | | - | ------ | --------- | | 0 | `https://api.codat.io` | None | -#### Example - ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; -async function run() { - const sdk = new CodatSyncPayables({ - serverIdx: 0, - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", - }, - }); +const codatSyncPayables = new CodatSyncPayables({ + serverIdx: 0, + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); - const res = await sdk.companies.create({ - description: "Requested early access to the new financing scheme.", - groups: [ - { - id: "60d2fa12-8a04-11ee-b9d1-0242ac120002", - }, - ], - name: "Bank of Dave", - }); - - if (res.statusCode == 200) { - // handle response - } +async function run() { + const result = await codatSyncPayables.companies.list({ + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + // Handle the result + console.log(result); } run(); @@ -267,31 +539,26 @@ run(); ### Override Server URL Per-Client -The default server can also be overridden globally by passing a URL to the `serverURL: str` optional parameter when initializing the SDK client instance. For example: -```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; +The default server can also be overridden globally by passing a URL to the `serverURL` optional parameter when initializing the SDK client instance. For example: -async function run() { - const sdk = new CodatSyncPayables({ - serverURL: "https://api.codat.io", - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", - }, - }); +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; - const res = await sdk.companies.create({ - description: "Requested early access to the new financing scheme.", - groups: [ - { - id: "60d2fa12-8a04-11ee-b9d1-0242ac120002", - }, - ], - name: "Bank of Dave", - }); +const codatSyncPayables = new CodatSyncPayables({ + serverURL: "https://api.codat.io", + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); - if (res.statusCode == 200) { - // handle response - } +async function run() { + const result = await codatSyncPayables.companies.list({ + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + // Handle the result + console.log(result); } run(); @@ -302,19 +569,49 @@ run(); ## Custom HTTP Client -The Typescript SDK makes API calls using the [axios](https://axios-http.com/docs/intro) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `AxiosInstance` object. +The TypeScript SDK makes API calls using an `HTTPClient` that wraps the native +[Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). This +client is a thin wrapper around `fetch` and provides the ability to attach hooks +around the request lifecycle that can be used to modify the request or handle +errors and response. -For example, you could specify a header for every request that your sdk makes as follows: +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. -```typescript -import { @codat/sync-for-payables } from "CodatSyncPayables"; -import axios from "axios"; - -const httpClient = axios.create({ - headers: {'x-custom-header': 'someValue'} -}) +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: -const sdk = new CodatSyncPayables({defaultClient: httpClient}); +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; +import { HTTPClient } from "@codat/sync-for-payables-version-1/lib/http"; + +const httpClient = new HTTPClient({ + // fetcher takes a function that has the same signature as native `fetch`. + fetcher: (request) => { + return fetch(request); + } +}); + +httpClient.addHook("beforeRequest", (request) => { + const nextRequest = new Request(request, { + signal: request.signal || AbortSignal.timeout(5000) + }); + + nextRequest.headers.set("x-custom-header", "custom value"); + + return nextRequest; +}); + +httpClient.addHook("requestError", (error, request) => { + console.group("Request Error"); + console.log("Reason:", `${error}`); + console.log("Endpoint:", `${request.method} ${request.url}`); + console.groupEnd(); +}); + +const sdk = new CodatSyncPayables({ httpClient }); ``` @@ -329,30 +626,24 @@ This SDK supports the following security scheme globally: | ------------ | ------------ | ------------ | | `authHeader` | apiKey | API key | -You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. For example: +To authenticate with the API the `authHeader` parameter must be set when initializing the SDK client instance. For example: ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; -async function run() { - const sdk = new CodatSyncPayables({ - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", - }, - }); - - const res = await sdk.companies.create({ - description: "Requested early access to the new financing scheme.", - groups: [ - { - id: "60d2fa12-8a04-11ee-b9d1-0242ac120002", - }, - ], - name: "Bank of Dave", - }); +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); - if (res.statusCode == 200) { - // handle response - } +async function run() { + const result = await codatSyncPayables.companies.list({ + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); + + // Handle the result + console.log(result); } run(); @@ -360,6 +651,23 @@ run(); ``` + +## Debugging + +You can setup your SDK to emit debug logs for SDK requests and responses. + +You can pass a logger that matches `console`'s interface as an SDK option. + +> [!WARNING] +> Beware that debug logging will reveal secrets, like API tokens in headers, in log messages printed to a console or files. It's recommended to use this feature only during local development and not in production. + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const sdk = new CodatSyncPayables({ debugLogger: console }); +``` + + diff --git a/previous-versions/sync-for-payables-version-1/RELEASES.md b/previous-versions/sync-for-payables-version-1/RELEASES.md index b12419a24..99bfaeae6 100644 --- a/previous-versions/sync-for-payables-version-1/RELEASES.md +++ b/previous-versions/sync-for-payables-version-1/RELEASES.md @@ -88,4 +88,14 @@ Based on: ### Generated - [typescript v2.2.0] sync-for-payables ### Releases -- [NPM v2.2.0] https://www.npmjs.com/package/@codat/sync-for-payables/v/2.2.0 - sync-for-payables \ No newline at end of file +- [NPM v2.2.0] https://www.npmjs.com/package/@codat/sync-for-payables/v/2.2.0 - sync-for-payables + +## 2024-09-13 15:51:13 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.396.7 (2.415.6) https://github.com/speakeasy-api/speakeasy +### Generated +- [typescript v2.3.0] previous-versions/sync-for-payables-version-1 +### Releases +- [NPM v2.3.0] https://www.npmjs.com/package/@codat/sync-for-payables-version-1/v/2.3.0 - previous-versions/sync-for-payables-version-1 \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/RUNTIMES.md b/previous-versions/sync-for-payables-version-1/RUNTIMES.md new file mode 100644 index 000000000..d08a0c075 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/RUNTIMES.md @@ -0,0 +1,22 @@ +# Supported JavaScript runtimes + +This SDK is intended to be used in JavaScript runtimes that support 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]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API +[web-streams]: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API +[async-iter]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_async_iterator_and_async_iterable_protocols + +Runtime environments that are explicitly supported are: + +- Evergreen browsers which include: Chrome, Safari, Edge, Firefox +- Node.js active and maintenance LTS releases + - Currently, this is v18 and v20 +- Bun v1 and above +- Deno v1.39 + - 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 diff --git a/previous-versions/sync-for-payables-version-1/USAGE.md b/previous-versions/sync-for-payables-version-1/USAGE.md index c079fa862..2fddf4037 100644 --- a/previous-versions/sync-for-payables-version-1/USAGE.md +++ b/previous-versions/sync-for-payables-version-1/USAGE.md @@ -1,27 +1,21 @@ ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; -async function run() { - const sdk = new CodatSyncPayables({ - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", - }, - }); +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); - const res = await sdk.companies.create({ - description: "Requested early access to the new financing scheme.", - groups: [ - { - id: "60d2fa12-8a04-11ee-b9d1-0242ac120002", - }, - ], - name: "Bank of Dave", - }); +async function run() { + const result = await codatSyncPayables.companies.list({ + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", + }); - if (res.statusCode == 200) { - // handle response - } + // Handle the result + console.log(result); } run(); diff --git a/previous-versions/sync-for-payables-version-1/docs/internal/utils/retryconfig.md b/previous-versions/sync-for-payables-version-1/docs/internal/utils/retryconfig.md deleted file mode 100644 index c0936d80c..000000000 --- a/previous-versions/sync-for-payables-version-1/docs/internal/utils/retryconfig.md +++ /dev/null @@ -1,24 +0,0 @@ -# RetryConfig - -Allows customizing the default retry configuration. Only usable with methods that mention they support retries. - -## Fields - -| Name | Type | Description | Example | -| ------------------------- | ----------------------------------- | --------------------------------------- | --------- | -| `strategy` | `*string*` | The retry strategy to use. | `backoff` | -| `backoff` | [BackoffStrategy](#backoffstrategy) | Configuration for the backoff strategy. | | -| `retryConnectionErrors` | `*boolean*` | Whether to retry on connection errors. | `true` | - -## BackoffStrategy - -The backoff strategy allows retrying a request with an exponential backoff between each retry. - -### Fields - -| Name | Type | Description | Example | -| ------------------ | --------- | ----------------------------------------- | -------- | -| `initialInterval` | `*number*` | The initial interval in milliseconds. | `500` | -| `maxInterval` | `*number*` | The maximum interval in milliseconds. | `60000` | -| `exponent` | `*number*` | The exponent to use for the backoff. | `1.5` | -| `maxElapsedTime` | `*number*` | The maximum elapsed time in milliseconds. | `300000` | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/lib/utils/retryconfig.md b/previous-versions/sync-for-payables-version-1/docs/lib/utils/retryconfig.md new file mode 100644 index 000000000..08f95f455 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/lib/utils/retryconfig.md @@ -0,0 +1,24 @@ +# RetryConfig + +Allows customizing the default retry configuration. It is only permitted in methods that accept retry policies. + +## Fields + +| Name | Type | Description | Example | +| ------------------------- | ----------------------------------- | ------------------------------------------------------------------------------------------ | ----------- | +| `strategy` | `"backoff" | "none"` | The retry strategy to use. | `"backoff"` | +| `backoff` | [BackoffStrategy](#backoffstrategy) | When strategy is "backoff", this configurates for the backoff parameters. | | +| `retryConnectionErrors` | `*boolean*` | When strategy is "backoff", this determines whether or not to retry on connection errors. | `true` | + +## BackoffStrategy + +The backoff strategy allows retrying a request with an exponential backoff between each retry. + +### Fields + +| Name | Type | Description | Example | +| ------------------ | ------------ | ----------------------------------------- | -------- | +| `initialInterval` | `*number*` | The initial interval in milliseconds. | `500` | +| `maxInterval` | `*number*` | The maximum interval in milliseconds. | `60000` | +| `exponent` | `*number*` | The exponent to use for the backoff. | `1.5` | +| `maxElapsedTime` | `*number*` | The maximum elapsed time in milliseconds. | `300000` | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/errormessage.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/errors/errormessage.md similarity index 94% rename from previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/errormessage.md rename to previous-versions/sync-for-payables-version-1/docs/sdk/models/errors/errormessage.md index 4d3abac98..7470e1530 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/errormessage.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/errors/errormessage.md @@ -1,14 +1,23 @@ # ErrorMessage +The request made is not valid. + +## Example Usage + +```typescript +import { ErrorMessage } from "@codat/sync-for-payables-version-1/sdk/models/errors"; + +// No examples available for this model +``` ## Fields | Field | Type | Required | Description | | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `canBeRetried` | *string* | :heavy_minus_sign: | `True` if the error occurred transiently and can be retried. | -| `correlationId` | *string* | :heavy_minus_sign: | Unique identifier used to propagate to all downstream services and determine the source of the error. | -| `detailedErrorCode` | *number* | :heavy_minus_sign: | Machine readable error code used to automate processes based on the code returned. | -| `error` | *string* | :heavy_minus_sign: | A brief description of the error. | -| `service` | *string* | :heavy_minus_sign: | Codat's service the returned the error. | | `statusCode` | *number* | :heavy_minus_sign: | The HTTP status code returned by the error. | -| `validation` | [shared.ErrorValidation](../../../sdk/models/shared/errorvalidation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. | \ No newline at end of file +| `service` | *string* | :heavy_minus_sign: | Codat's service the returned the error. | +| `error` | *string* | :heavy_minus_sign: | A brief description of the error. | +| `correlationId` | *string* | :heavy_minus_sign: | Unique identifier used to propagate to all downstream services and determine the source of the error. | +| `validation` | [shared.ErrorValidation](../../../sdk/models/shared/errorvalidation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. | +| `canBeRetried` | *string* | :heavy_minus_sign: | `True` if the error occurred transiently and can be retried. | +| `detailedErrorCode` | *number* | :heavy_minus_sign: | Machine readable error code used to automate processes based on the code returned. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createaccountrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createaccountrequest.md new file mode 100644 index 000000000..00d905cfa --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createaccountrequest.md @@ -0,0 +1,34 @@ +# CreateAccountRequest + +## Example Usage + +```typescript +import { CreateAccountRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; +import { Decimal } from "@codat/sync-for-payables-version-1/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", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `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 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `accountPrototype` | [shared.AccountPrototype](../../../sdk/models/shared/accountprototype.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createbankaccountrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createbankaccountrequest.md new file mode 100644 index 000000000..a0bcf9020 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createbankaccountrequest.md @@ -0,0 +1,25 @@ +# CreateBankAccountRequest + +## Example Usage + +```typescript +import { CreateBankAccountRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: CreateBankAccountRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + bankAccountPrototype: { + currency: "EUR", + status: "Active", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `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 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `bankAccountPrototype` | [shared.BankAccountPrototype](../../../sdk/models/shared/bankaccountprototype.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createbillcreditnoterequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createbillcreditnoterequest.md new file mode 100644 index 000000000..901070ccc --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createbillcreditnoterequest.md @@ -0,0 +1,61 @@ +# CreateBillCreditNoteRequest + +## Example Usage + +```typescript +import { CreateBillCreditNoteRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: CreateBillCreditNoteRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billCreditNote: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "6a0e9dfb-87b0-47d3-aaaf-9753ae9e757d", + billCreditNoteNumber: "14763237", + supplierRef: { + id: "67C6A7A1-5E84-4AC4-B950-24A114E379D0", + supplierName: "Chin's Gas and Oil", + }, + totalAmount: new Decimal("693"), + totalDiscount: new Decimal("0"), + subTotal: new Decimal("805.78"), + totalTaxAmount: new Decimal("0"), + discountPercentage: new Decimal("0"), + remainingCredit: new Decimal("693"), + status: "Submitted", + issueDate: "2019-02-18T16:03:07.268Z", + allocatedOnDate: "2022-10-23T00:00:00Z", + currency: "USD", + lineItems: [], + paymentAllocations: [ + { + payment: { + currency: "EUR", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "GBP", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], + createdFromRefs: [ + { + dataType: "invoice", + }, + ], + note: "Track separately", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `billCreditNote` | [shared.BillCreditNote](../../../sdk/models/shared/billcreditnote.md) | :heavy_minus_sign: | N/A | {
"id": "6a0e9dfb-87b0-47d3-aaaf-9753ae9e757d",
"billCreditNoteNumber": "14763237",
"totalAmount": 693,
"remainingCredit": 693,
"status": "Submitted",
"issueDate": "2019-02-18T16:03:07.268Z",
"note": "Track separately",
"currency": "USD",
"lineItems": [
{
"description": "AcmeMagnet",
"unitAmount": 25,
"discountAmount": 0,
"quantity": 4,
"subTotal": 100,
"taxAmount": 10,
"totalAmount": 110,
"itemRef": {
"id": "3"
},
"taxRateRef": {
"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"
},
"accountRef": {
"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"
},
"trackingCategoryRefs": [
{
"id": "department_1",
"name": "ACMERockets"
},
{
"id": "costcode_2",
"name": "ACM2-ACMESigns"
}
],
"createdFromLineRef": [
{
"id": "8462",
"dataType": "bill",
"lineNumber": 1
}
]
},
{
"description": "ACMEDisintegratingPistol",
"unitAmount": 25,
"discountAmount": 0,
"quantity": 3,
"subTotal": 75,
"taxAmount": 7.5,
"totalAmount": 82.5,
"itemRef": {
"id": "3abf0883-03f7-44c6-bc15-1372522d25e1"
},
"taxRateRef": {
"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"
},
"accountRef": {
"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"
}
},
{
"description": "ACMEWhippedCreamDispenser",
"unitAmount": 52,
"discountAmount": 0,
"quantity": 6,
"subTotal": 312,
"taxAmount": 31.2,
"totalAmount": 343.2,
"itemRef": {
"id": "3691f3d9-0ff7-4358-8a93-bed31c1b4b03"
},
"taxRateRef": {
"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"
},
"accountRef": {
"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"
}
},
{
"description": "ACMEJetPropelledPogoStick",
"unitAmount": 130,
"discountAmount": 0,
"quantity": 1,
"subTotal": 130,
"taxAmount": 27.3,
"totalAmount": 157.3,
"itemRef": {
"id": "075410d4-7edc-4936-ba52-9e1e43cbe300"
},
"taxRateRef": {
"id": "d606732b-db18-44d7-823b-7f15f42c32ea"
},
"accountRef": {
"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"
}
}
],
"supplierRef": {
"id": "67C6A7A1-5E84-4AC4-B950-24A114E379D0",
"supplierName": "Chin's Gas and Oil"
},
"createdFromLineRef": {
"id": "8462",
"dataType": "bills",
"line": 1
}
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createbillpaymentrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createbillpaymentrequest.md new file mode 100644 index 000000000..f41fbc972 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createbillpaymentrequest.md @@ -0,0 +1,64 @@ +# CreateBillPaymentRequest + +## Example Usage + +```typescript +import { CreateBillPaymentRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: CreateBillPaymentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billPayment: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "3d5a8e00-d108-4045-8823-7f342676cffa", + totalAmount: new Decimal("250"), + currency: "GBP", + date: "2022-10-23T00:00:00Z", + note: "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + lines: [ + { + amount: new Decimal("0"), + links: [ + { + type: "Bill", + id: "x", + amount: new Decimal("-750"), + }, + { + type: "CreditNote", + id: "y", + amount: new Decimal("750"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + { + amount: new Decimal("250"), + links: [ + { + type: "Bill", + id: "x", + amount: new Decimal("-250"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `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 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `billPayment` | [shared.BillPayment](../../../sdk/models/shared/billpayment.md) | :heavy_minus_sign: | N/A | {
"totalAmount": 1000,
"lines": [
{
"amount": 1000,
"links": [
{
"type": "Bill",
"id": "x",
"amount": -1000
}
]
}
]
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createbillrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createbillrequest.md new file mode 100644 index 000000000..72b9da383 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createbillrequest.md @@ -0,0 +1,45 @@ +# CreateBillRequest + +## Example Usage + +```typescript +import { CreateBillRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: CreateBillRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + bill: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + issueDate: "2022-10-23T00:00:00Z", + dueDate: "2022-10-23T00:00:00Z", + currency: "GBP", + status: "Open", + subTotal: new Decimal("9979.63"), + taxAmount: new Decimal("30.99"), + totalAmount: new Decimal("3621.89"), + paymentAllocations: [ + { + payment: { + currency: "USD", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "EUR", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `bill` | [shared.Bill](../../../sdk/models/shared/bill.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createconnectionrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createconnectionrequest.md index 646c487b2..5adebeab9 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createconnectionrequest.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createconnectionrequest.md @@ -1,9 +1,21 @@ # CreateConnectionRequest +## Example Usage + +```typescript +import { CreateConnectionRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: CreateConnectionRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: { + platformKey: "gbol", + }, +}; +``` ## Fields | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `requestBody` | [operations.CreateConnectionRequestBody](../../../sdk/models/operations/createconnectionrequestbody.md) | :heavy_minus_sign: | N/A | | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `requestBody` | [operations.CreateConnectionRequestBody](../../../sdk/models/operations/createconnectionrequestbody.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createconnectionrequestbody.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createconnectionrequestbody.md index 509321abe..f3c0141d6 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createconnectionrequestbody.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createconnectionrequestbody.md @@ -1,5 +1,14 @@ # CreateConnectionRequestBody +## Example Usage + +```typescript +import { CreateConnectionRequestBody } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: CreateConnectionRequestBody = { + platformKey: "gbol", +}; +``` ## Fields diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createjournalentryrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createjournalentryrequest.md new file mode 100644 index 000000000..5cfd48ba9 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createjournalentryrequest.md @@ -0,0 +1,44 @@ +# CreateJournalEntryRequest + +## Example Usage + +```typescript +import { CreateJournalEntryRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: CreateJournalEntryRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + journalEntry: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + postedOn: "2022-10-23T00:00:00Z", + createdOn: "2022-10-23T00:00:00Z", + updatedOn: "2022-10-23T00:00:00Z", + journalLines: [ + { + netAmount: new Decimal("6720.41"), + tracking: { + recordRefs: [ + { + dataType: "trackingCategories", + }, + ], + }, + }, + ], + recordRef: { + dataType: "transfers", + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `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 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `journalEntry` | [shared.JournalEntry](../../../sdk/models/shared/journalentry.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createjournalrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createjournalrequest.md new file mode 100644 index 000000000..311d1c7c1 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createjournalrequest.md @@ -0,0 +1,24 @@ +# CreateJournalRequest + +## Example Usage + +```typescript +import { CreateJournalRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: CreateJournalRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + journalPrototype: { + createdOn: "2022-10-23T00:00:00Z", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `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 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `journalPrototype` | [shared.JournalPrototype](../../../sdk/models/shared/journalprototype.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createsupplierrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createsupplierrequest.md new file mode 100644 index 000000000..1dfeea26e --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createsupplierrequest.md @@ -0,0 +1,59 @@ +# CreateSupplierRequest + +## Example Usage + +```typescript +import { CreateSupplierRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +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, + }, + }, + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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 | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `supplier` | [shared.Supplier](../../../sdk/models/shared/supplier.md) | :heavy_minus_sign: | N/A | {
"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"
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletebillattachmentrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletebillattachmentrequest.md new file mode 100644 index 000000000..fc97ad2c8 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletebillattachmentrequest.md @@ -0,0 +1,23 @@ +# DeleteBillAttachmentRequest + +## Example Usage + +```typescript +import { DeleteBillAttachmentRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: DeleteBillAttachmentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "7110701885", + attachmentId: "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 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `billId` | *string* | :heavy_check_mark: | Unique identifier for a bill. | 13d946f0-c5d5-42bc-b092-97ece17923ab | +| `attachmentId` | *string* | :heavy_check_mark: | Unique identifier for an attachment. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletebillpaymentrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletebillpaymentrequest.md new file mode 100644 index 000000000..4955485de --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletebillpaymentrequest.md @@ -0,0 +1,21 @@ +# DeleteBillPaymentRequest + +## Example Usage + +```typescript +import { DeleteBillPaymentRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: DeleteBillPaymentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billPaymentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `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 | +| `billPaymentId` | *string* | :heavy_check_mark: | Unique identifier for a bill payment. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletebillrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletebillrequest.md new file mode 100644 index 000000000..7f22f31ae --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletebillrequest.md @@ -0,0 +1,21 @@ +# DeleteBillRequest + +## Example Usage + +```typescript +import { DeleteBillRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: DeleteBillRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "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 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `billId` | *string* | :heavy_check_mark: | Unique identifier for a bill. | 13d946f0-c5d5-42bc-b092-97ece17923ab | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletecompanyrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletecompanyrequest.md index 98229acfd..6dee6a951 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletecompanyrequest.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletecompanyrequest.md @@ -1,5 +1,14 @@ # DeleteCompanyRequest +## Example Usage + +```typescript +import { DeleteCompanyRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: DeleteCompanyRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` ## Fields diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletecompanyresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletecompanyresponse.md deleted file mode 100644 index 25b7d383b..000000000 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deletecompanyresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteCompanyResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deleteconnectionrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deleteconnectionrequest.md index d0c939061..6e9e326c9 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deleteconnectionrequest.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deleteconnectionrequest.md @@ -1,5 +1,15 @@ # DeleteConnectionRequest +## Example Usage + +```typescript +import { DeleteConnectionRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: DeleteConnectionRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` ## Fields diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deleteconnectionresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deleteconnectionresponse.md deleted file mode 100644 index 63d8ae3ca..000000000 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/deleteconnectionresponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteConnectionResponse - - -## Fields - -| Field | Type | Required | Description | -| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | -| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/downloadbillattachmentrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/downloadbillattachmentrequest.md new file mode 100644 index 000000000..c31348c2b --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/downloadbillattachmentrequest.md @@ -0,0 +1,23 @@ +# DownloadBillAttachmentRequest + +## Example Usage + +```typescript +import { DownloadBillAttachmentRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: DownloadBillAttachmentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "7110701885", + attachmentId: "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 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `billId` | *string* | :heavy_check_mark: | Unique identifier for a bill. | 13d946f0-c5d5-42bc-b092-97ece17923ab | +| `attachmentId` | *string* | :heavy_check_mark: | Unique identifier for an attachment. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getaccountingprofilerequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getaccountingprofilerequest.md new file mode 100644 index 000000000..56df67498 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getaccountingprofilerequest.md @@ -0,0 +1,17 @@ +# GetAccountingProfileRequest + +## Example Usage + +```typescript +import { GetAccountingProfileRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetAccountingProfileRequest = { + 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 | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getaccountrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getaccountrequest.md new file mode 100644 index 000000000..ec3ffdcc3 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getaccountrequest.md @@ -0,0 +1,19 @@ +# GetAccountRequest + +## Example Usage + +```typescript +import { GetAccountRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetAccountRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `accountId` | *string* | :heavy_check_mark: | Unique identifier for an account. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getbillattachmentrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getbillattachmentrequest.md new file mode 100644 index 000000000..a3ebc977a --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getbillattachmentrequest.md @@ -0,0 +1,23 @@ +# GetBillAttachmentRequest + +## Example Usage + +```typescript +import { GetBillAttachmentRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetBillAttachmentRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2", + attachmentId: "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 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `billId` | *string* | :heavy_check_mark: | Unique identifier for a bill. | 13d946f0-c5d5-42bc-b092-97ece17923ab | +| `attachmentId` | *string* | :heavy_check_mark: | Unique identifier for an attachment. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getbillcreditnoterequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getbillcreditnoterequest.md new file mode 100644 index 000000000..fb0c850cd --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getbillcreditnoterequest.md @@ -0,0 +1,19 @@ +# GetBillCreditNoteRequest + +## Example Usage + +```typescript +import { GetBillCreditNoteRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetBillCreditNoteRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | ----------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `billCreditNoteId` | *string* | :heavy_check_mark: | Unique identifier for a bill credit note. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getbillpaymentsrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getbillpaymentsrequest.md new file mode 100644 index 000000000..c0e74ad7a --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getbillpaymentsrequest.md @@ -0,0 +1,19 @@ +# GetBillPaymentsRequest + +## Example Usage + +```typescript +import { GetBillPaymentsRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetBillPaymentsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `billPaymentId` | *string* | :heavy_check_mark: | Unique identifier for a bill payment. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getbillrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getbillrequest.md new file mode 100644 index 000000000..3a11fa3b1 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getbillrequest.md @@ -0,0 +1,19 @@ +# GetBillRequest + +## Example Usage + +```typescript +import { GetBillRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetBillRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "EILBDVJVNUAGVKRQ", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `billId` | *string* | :heavy_check_mark: | Unique identifier for a bill. | 13d946f0-c5d5-42bc-b092-97ece17923ab | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcompanyrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcompanyrequest.md index 7f66ad0c6..503771ad7 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcompanyrequest.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcompanyrequest.md @@ -1,5 +1,14 @@ # GetCompanyRequest +## Example Usage + +```typescript +import { GetCompanyRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetCompanyRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +}; +``` ## Fields diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getconnectionrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getconnectionrequest.md index 332a3226e..1b26fc8cb 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getconnectionrequest.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getconnectionrequest.md @@ -1,5 +1,15 @@ # GetConnectionRequest +## Example Usage + +```typescript +import { GetConnectionRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetConnectionRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` ## Fields diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreateaccountmodelrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreateaccountmodelrequest.md new file mode 100644 index 000000000..766d31684 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreateaccountmodelrequest.md @@ -0,0 +1,19 @@ +# GetCreateAccountModelRequest + +## Example Usage + +```typescript +import { GetCreateAccountModelRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetCreateAccountModelRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `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 | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreatebankaccountsmodelrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreatebankaccountsmodelrequest.md new file mode 100644 index 000000000..aa69e49d4 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreatebankaccountsmodelrequest.md @@ -0,0 +1,19 @@ +# GetCreateBankAccountsModelRequest + +## Example Usage + +```typescript +import { GetCreateBankAccountsModelRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetCreateBankAccountsModelRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `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 | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreatebillpaymentmodelrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreatebillpaymentmodelrequest.md new file mode 100644 index 000000000..d1c4dd994 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreatebillpaymentmodelrequest.md @@ -0,0 +1,19 @@ +# GetCreateBillPaymentModelRequest + +## Example Usage + +```typescript +import { GetCreateBillPaymentModelRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetCreateBillPaymentModelRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `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 | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreatejournalentrymodelrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreatejournalentrymodelrequest.md new file mode 100644 index 000000000..c37cbf5dc --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreatejournalentrymodelrequest.md @@ -0,0 +1,19 @@ +# GetCreateJournalEntryModelRequest + +## Example Usage + +```typescript +import { GetCreateJournalEntryModelRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetCreateJournalEntryModelRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `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 | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreatejournalmodelrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreatejournalmodelrequest.md new file mode 100644 index 000000000..dbf178af3 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreatejournalmodelrequest.md @@ -0,0 +1,19 @@ +# GetCreateJournalModelRequest + +## Example Usage + +```typescript +import { GetCreateJournalModelRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetCreateJournalModelRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `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 | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreateupdatebillcreditnotemodelrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreateupdatebillcreditnotemodelrequest.md new file mode 100644 index 000000000..5fedef6e4 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreateupdatebillcreditnotemodelrequest.md @@ -0,0 +1,19 @@ +# GetCreateUpdateBillCreditNoteModelRequest + +## Example Usage + +```typescript +import { GetCreateUpdateBillCreditNoteModelRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetCreateUpdateBillCreditNoteModelRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `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 | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreateupdatebillmodelrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreateupdatebillmodelrequest.md new file mode 100644 index 000000000..3ee78af40 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreateupdatebillmodelrequest.md @@ -0,0 +1,19 @@ +# GetCreateUpdateBillModelRequest + +## Example Usage + +```typescript +import { GetCreateUpdateBillModelRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetCreateUpdateBillModelRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `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 | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreateupdatesuppliermodelrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreateupdatesuppliermodelrequest.md new file mode 100644 index 000000000..db9105684 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcreateupdatesuppliermodelrequest.md @@ -0,0 +1,19 @@ +# GetCreateUpdateSupplierModelRequest + +## Example Usage + +```typescript +import { GetCreateUpdateSupplierModelRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetCreateUpdateSupplierModelRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `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 | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getdatastatusdatastatuses.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getdatastatusdatastatuses.md new file mode 100644 index 000000000..219c0ed98 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getdatastatusdatastatuses.md @@ -0,0 +1,361 @@ +# GetDataStatusDataStatuses + +OK + +## Example Usage + +```typescript +import { GetDataStatusDataStatuses } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetDataStatusDataStatuses = { + accountTransactions: { + dataType: "accountTransactions", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "ProcessingError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + balanceSheet: { + dataType: "commerce-transactions", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "Complete", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + bankAccounts: { + dataType: "bills", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "ValidationQueued", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + bankTransactions: { + dataType: "customers", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "RateLimitError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + billCreditNotes: { + dataType: "company", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "InternalError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + billPayments: { + dataType: "suppliers", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "ProcessingError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + bills: { + dataType: "commerce-taxComponents", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "Complete", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + cashFlowStatement: { + dataType: "customers", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "ProcessingQueued", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + chartOfAccounts: { + dataType: "commerce-taxComponents", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "InternalError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + company: { + dataType: "balanceSheet", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "Complete", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + creditNotes: { + dataType: "commerce-payments", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "Processing", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + customers: { + dataType: "banking-transactionCategories", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "FetchError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + directCosts: { + dataType: "customers", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "MapError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + directIncomes: { + dataType: "commerce-payments", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "ProcessingError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + invoices: { + dataType: "balanceSheet", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "AuthError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + itemReceipts: { + dataType: "trackingCategories", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "MapError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + items: { + dataType: "invoices", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "PermissionsError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + journalEntries: { + dataType: "commerce-taxComponents", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "RateLimitError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + journals: { + dataType: "cashFlowStatement", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "Queued", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + paymentMethods: { + dataType: "commerce-payments", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "Complete", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + payments: { + dataType: "invoices", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "ProcessingQueued", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + profitAndLoss: { + dataType: "commerce-payments", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "Fetching", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + purchaseOrders: { + dataType: "purchaseOrders", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "MapError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + salesOrders: { + dataType: "profitAndLoss", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "AuthError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + suppliers: { + dataType: "items", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "ValidationError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + taxRates: { + dataType: "purchaseOrders", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "Validating", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + trackingCategories: { + dataType: "commerce-products", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "ValidationError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + transfers: { + dataType: "commerce-payments", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "Mapping", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + bankingAccountBalances: { + dataType: "banking-accounts", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "MapError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + bankingAccounts: { + dataType: "transfers", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "ValidationError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + bankingTransactionCategories: { + dataType: "salesOrders", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "RateLimitError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + bankingTransactions: { + dataType: "customers", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "ProcessingError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + commerceCompanyInfo: { + dataType: "bills", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "Complete", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + commerceCustomers: { + dataType: "commerce-orders", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "Initial", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + commerceDisputes: { + dataType: "transfers", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "ValidationError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + commerceLocations: { + dataType: "directCosts", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "Initial", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + commerceOrders: { + dataType: "paymentMethods", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "MapError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + commercePaymentMethods: { + dataType: "balanceSheet", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "ProcessingError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + commercePayments: { + dataType: "salesOrders", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "PermissionsError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + commerceProductCategories: { + dataType: "itemReceipts", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "Queued", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + commerceProducts: { + dataType: "profitAndLoss", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "InternalError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + commerceTaxComponents: { + dataType: "bills", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "Initial", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, + commerceTransactions: { + dataType: "journals", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "MapError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `accountTransactions` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `balanceSheet` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `bankAccounts` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `bankTransactions` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `billCreditNotes` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `billPayments` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `bills` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `cashFlowStatement` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `chartOfAccounts` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `company` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `creditNotes` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `customers` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `directCosts` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `directIncomes` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `invoices` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `itemReceipts` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `items` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `journalEntries` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `journals` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `paymentMethods` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `payments` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `profitAndLoss` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `purchaseOrders` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `salesOrders` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `suppliers` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `taxRates` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `trackingCategories` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `transfers` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `bankingAccountBalances` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `bankingAccounts` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `bankingTransactionCategories` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `bankingTransactions` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `commerceCompanyInfo` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `commerceCustomers` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `commerceDisputes` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `commerceLocations` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `commerceOrders` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `commercePaymentMethods` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `commercePayments` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `commerceProductCategories` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `commerceProducts` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `commerceTaxComponents` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | +| `commerceTransactions` | [shared.DataStatus](../../../sdk/models/shared/datastatus.md) | :heavy_minus_sign: | Describes the state of data in the Codat cache for a company and data type | {
"dataType": "string",
"lastSuccessfulSync": "2022-01-01T13:00:00.000Z",
"currentStatus": "string",
"latestSyncId": "ad474a37-2003-478e-baee-9af9f1ec2fe3",
"latestSuccessfulSyncId": "8220fc90-55b6-47bc-9417-48ac6ea93101"
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getdatastatusrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getdatastatusrequest.md new file mode 100644 index 000000000..51159c278 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getdatastatusrequest.md @@ -0,0 +1,17 @@ +# GetDataStatusRequest + +## Example Usage + +```typescript +import { GetDataStatusRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetDataStatusRequest = { + 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 | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getjournalrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getjournalrequest.md new file mode 100644 index 000000000..516256580 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getjournalrequest.md @@ -0,0 +1,19 @@ +# GetJournalRequest + +## Example Usage + +```typescript +import { GetJournalRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetJournalRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `journalId` | *string* | :heavy_check_mark: | Unique identifier for a journal. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getpaymentmethodrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getpaymentmethodrequest.md new file mode 100644 index 000000000..38d8e4de0 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getpaymentmethodrequest.md @@ -0,0 +1,19 @@ +# GetPaymentMethodRequest + +## Example Usage + +```typescript +import { GetPaymentMethodRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetPaymentMethodRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentMethodId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | --------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `paymentMethodId` | *string* | :heavy_check_mark: | Unique identifier for a payment method. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getpulloperationrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getpulloperationrequest.md new file mode 100644 index 000000000..ff6f52fd3 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getpulloperationrequest.md @@ -0,0 +1,19 @@ +# GetPullOperationRequest + +## Example Usage + +```typescript +import { GetPullOperationRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetPullOperationRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + datasetId: "e904f3b1-194b-48ab-b603-a79f9dfe0ab7", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `datasetId` | *string* | :heavy_check_mark: | Unique identifier for the dataset that completed its sync. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getpushoperationrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getpushoperationrequest.md new file mode 100644 index 000000000..e691cd195 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getpushoperationrequest.md @@ -0,0 +1,19 @@ +# GetPushOperationRequest + +## Example Usage + +```typescript +import { GetPushOperationRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetPushOperationRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "da8a50ce-187f-486b-8173-d689eee9526f", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `pushOperationKey` | *string* | :heavy_check_mark: | Push operation key. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getsupplierrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getsupplierrequest.md new file mode 100644 index 000000000..3daa9b589 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getsupplierrequest.md @@ -0,0 +1,19 @@ +# GetSupplierRequest + +## Example Usage + +```typescript +import { GetSupplierRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetSupplierRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "", +}; +``` + +## 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. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/gettaxraterequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/gettaxraterequest.md new file mode 100644 index 000000000..72cf9585c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/gettaxraterequest.md @@ -0,0 +1,19 @@ +# GetTaxRateRequest + +## Example Usage + +```typescript +import { GetTaxRateRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetTaxRateRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + taxRateId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `taxRateId` | *string* | :heavy_check_mark: | Unique identifier for a tax rate. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/gettrackingcategoryrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/gettrackingcategoryrequest.md new file mode 100644 index 000000000..8129ef0c8 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/gettrackingcategoryrequest.md @@ -0,0 +1,19 @@ +# GetTrackingCategoryRequest + +## Example Usage + +```typescript +import { GetTrackingCategoryRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: GetTrackingCategoryRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + trackingCategoryId: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `trackingCategoryId` | *string* | :heavy_check_mark: | Unique identifier for a tracking category. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listaccountsrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listaccountsrequest.md new file mode 100644 index 000000000..8842e860c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listaccountsrequest.md @@ -0,0 +1,25 @@ +# ListAccountsRequest + +## Example Usage + +```typescript +import { ListAccountsRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: ListAccountsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `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 diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillattachmentsrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillattachmentsrequest.md new file mode 100644 index 000000000..64f5e5a85 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillattachmentsrequest.md @@ -0,0 +1,21 @@ +# ListBillAttachmentsRequest + +## Example Usage + +```typescript +import { ListBillAttachmentsRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: ListBillAttachmentsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "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 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `billId` | *string* | :heavy_check_mark: | Unique identifier for a bill. | 13d946f0-c5d5-42bc-b092-97ece17923ab | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillcreditnotesrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillcreditnotesrequest.md new file mode 100644 index 000000000..09c7692fc --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillcreditnotesrequest.md @@ -0,0 +1,25 @@ +# ListBillCreditNotesRequest + +## Example Usage + +```typescript +import { ListBillCreditNotesRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: ListBillCreditNotesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `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 diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillpaymentsrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillpaymentsrequest.md new file mode 100644 index 000000000..0c4d15b86 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillpaymentsrequest.md @@ -0,0 +1,25 @@ +# ListBillPaymentsRequest + +## Example Usage + +```typescript +import { ListBillPaymentsRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: ListBillPaymentsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `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 diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillsrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillsrequest.md index 8ebec3867..c5fab662f 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillsrequest.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillsrequest.md @@ -1,13 +1,25 @@ # ListBillsRequest +## Example Usage + +```typescript +import { ListBillsRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: ListBillsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | `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 | | `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 | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | Filter bills by `sourceModifiedDate` to return bills that have changed after a specified date. | 2022-10-23 00:00:00 +0000 UTC | -| `status` | [shared.BillStatus](../../../sdk/models/shared/billstatus.md)[] | :heavy_minus_sign: | Filter bills by `status`. | | \ No newline at end of file +| `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 diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillsresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillsresponse.md deleted file mode 100644 index b4c2ac7ee..000000000 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listbillsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListBillsResponse - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | -| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | | -| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | -| `bills` | [shared.Bills](../../../sdk/models/shared/bills.md) | :heavy_minus_sign: | Success | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listcompaniesrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listcompaniesrequest.md index fe345adb9..e2b830200 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listcompaniesrequest.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listcompaniesrequest.md @@ -1,11 +1,23 @@ # ListCompaniesRequest +## Example Usage + +```typescript +import { ListCompaniesRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: ListCompaniesRequest = { + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | -| `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | | `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). | | \ No newline at end of file +| `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 diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listcompaniesresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listcompaniesresponse.md deleted file mode 100644 index 1f8935f35..000000000 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listcompaniesresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListCompaniesResponse - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `companies` | [shared.Companies](../../../sdk/models/shared/companies.md) | :heavy_minus_sign: | OK | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | -| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | | -| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listconnectionsrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listconnectionsrequest.md index c2548d5bf..30a6c2684 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listconnectionsrequest.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listconnectionsrequest.md @@ -1,12 +1,25 @@ # ListConnectionsRequest +## Example Usage + +```typescript +import { ListConnectionsRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: ListConnectionsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `orderBy` | *string* | :heavy_minus_sign: | Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). | -modifiedDate | | `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). | | \ No newline at end of file +| `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 diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listconnectionsresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listconnectionsresponse.md deleted file mode 100644 index 981f327ec..000000000 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listconnectionsresponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListConnectionsResponse - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `connections` | [shared.Connections](../../../sdk/models/shared/connections.md) | :heavy_minus_sign: | OK | {"_links":{"pageNumber":1,"pageSize":10,"totalResults":1,"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}}} | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your `query` parameter was not correctly formed | | -| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | | -| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listjournalsrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listjournalsrequest.md new file mode 100644 index 000000000..0cedc9df1 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listjournalsrequest.md @@ -0,0 +1,25 @@ +# ListJournalsRequest + +## Example Usage + +```typescript +import { ListJournalsRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: ListJournalsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `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 diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listpaymentmethodsrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listpaymentmethodsrequest.md new file mode 100644 index 000000000..cc45d88df --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listpaymentmethodsrequest.md @@ -0,0 +1,25 @@ +# ListPaymentMethodsRequest + +## Example Usage + +```typescript +import { ListPaymentMethodsRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: ListPaymentMethodsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `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 diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listpulloperationsrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listpulloperationsrequest.md new file mode 100644 index 000000000..b1b69accf --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listpulloperationsrequest.md @@ -0,0 +1,25 @@ +# ListPullOperationsRequest + +## Example Usage + +```typescript +import { ListPullOperationsRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: ListPullOperationsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `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 diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listpushoperationsrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listpushoperationsrequest.md new file mode 100644 index 000000000..04385a7d1 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listpushoperationsrequest.md @@ -0,0 +1,25 @@ +# ListPushOperationsRequest + +## Example Usage + +```typescript +import { ListPushOperationsRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: ListPushOperationsRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `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 diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listsuppliersrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listsuppliersrequest.md new file mode 100644 index 000000000..6ff65b1b9 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listsuppliersrequest.md @@ -0,0 +1,25 @@ +# ListSuppliersRequest + +## Example Usage + +```typescript +import { ListSuppliersRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: ListSuppliersRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `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 diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listtaxratesrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listtaxratesrequest.md new file mode 100644 index 000000000..3d45dc5e7 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listtaxratesrequest.md @@ -0,0 +1,25 @@ +# ListTaxRatesRequest + +## Example Usage + +```typescript +import { ListTaxRatesRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: ListTaxRatesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `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 diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listtrackingcategoriesrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listtrackingcategoriesrequest.md new file mode 100644 index 000000000..5058ee672 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/listtrackingcategoriesrequest.md @@ -0,0 +1,25 @@ +# ListTrackingCategoriesRequest + +## Example Usage + +```typescript +import { ListTrackingCategoriesRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: ListTrackingCategoriesRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `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 diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/refreshalldatatypesrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/refreshalldatatypesrequest.md new file mode 100644 index 000000000..48aefac19 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/refreshalldatatypesrequest.md @@ -0,0 +1,17 @@ +# RefreshAllDataTypesRequest + +## Example Usage + +```typescript +import { RefreshAllDataTypesRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: RefreshAllDataTypesRequest = { + 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 | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/refreshdatatyperequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/refreshdatatyperequest.md new file mode 100644 index 000000000..e83715a81 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/refreshdatatyperequest.md @@ -0,0 +1,20 @@ +# RefreshDataTypeRequest + +## Example Usage + +```typescript +import { RefreshDataTypeRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: RefreshDataTypeRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + dataType: "invoices", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | +| `dataType` | [shared.DataType](../../../sdk/models/shared/datatype.md) | :heavy_check_mark: | The key of a Codat data type | invoices | +| `connectionId` | *string* | :heavy_minus_sign: | Optionally, provide a data connection id to only queue pull operations on that connection. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/unlinkconnectionrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/unlinkconnectionrequest.md index 821ac0408..25bc5a372 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/unlinkconnectionrequest.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/unlinkconnectionrequest.md @@ -1,10 +1,20 @@ # UnlinkConnectionRequest +## Example Usage + +```typescript +import { UnlinkConnectionRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: UnlinkConnectionRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", +}; +``` ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| `requestBody` | [operations.UnlinkConnectionUpdateConnection](../../../sdk/models/operations/unlinkconnectionupdateconnection.md) | :heavy_minus_sign: | N/A | | | `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 | \ No newline at end of file +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `requestBody` | [operations.UnlinkConnectionUpdateConnection](../../../sdk/models/operations/unlinkconnectionupdateconnection.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/unlinkconnectionupdateconnection.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/unlinkconnectionupdateconnection.md index 16a315e32..8413cb35b 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/unlinkconnectionupdateconnection.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/unlinkconnectionupdateconnection.md @@ -1,5 +1,12 @@ # UnlinkConnectionUpdateConnection +## Example Usage + +```typescript +import { UnlinkConnectionUpdateConnection } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: UnlinkConnectionUpdateConnection = {}; +``` ## Fields diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatebillcreditnoterequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatebillcreditnoterequest.md new file mode 100644 index 000000000..6ed6da63c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatebillcreditnoterequest.md @@ -0,0 +1,64 @@ +# UpdateBillCreditNoteRequest + +## Example Usage + +```typescript +import { UpdateBillCreditNoteRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: UpdateBillCreditNoteRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billCreditNoteId: "", + billCreditNote: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "6a0e9dfb-87b0-47d3-aaaf-9753ae9e757d", + billCreditNoteNumber: "14763237", + supplierRef: { + id: "67C6A7A1-5E84-4AC4-B950-24A114E379D0", + supplierName: "Chin's Gas and Oil", + }, + totalAmount: new Decimal("693"), + totalDiscount: new Decimal("0"), + subTotal: new Decimal("805.78"), + totalTaxAmount: new Decimal("0"), + discountPercentage: new Decimal("0"), + remainingCredit: new Decimal("693"), + status: "Submitted", + issueDate: "2019-02-18T16:03:07.268Z", + allocatedOnDate: "2022-10-23T00:00:00Z", + currency: "USD", + lineItems: [], + paymentAllocations: [ + { + payment: { + currency: "EUR", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "EUR", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], + createdFromRefs: [ + { + dataType: "accountTransaction", + }, + ], + note: "Track separately", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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 | +| `billCreditNoteId` | *string* | :heavy_check_mark: | Unique identifier for a bill credit note. | | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `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. | | +| `billCreditNote` | [shared.BillCreditNote](../../../sdk/models/shared/billcreditnote.md) | :heavy_minus_sign: | N/A | {
"id": "6a0e9dfb-87b0-47d3-aaaf-9753ae9e757d",
"billCreditNoteNumber": "14763237",
"totalAmount": 693,
"remainingCredit": 693,
"status": "Submitted",
"issueDate": "2019-02-18T16:03:07.268Z",
"note": "Track separately",
"currency": "USD",
"lineItems": [
{
"description": "AcmeMagnet",
"unitAmount": 25,
"discountAmount": 0,
"quantity": 4,
"subTotal": 100,
"taxAmount": 10,
"totalAmount": 110,
"itemRef": {
"id": "3"
},
"taxRateRef": {
"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"
},
"accountRef": {
"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"
},
"trackingCategoryRefs": [
{
"id": "department_1",
"name": "ACMERockets"
},
{
"id": "costcode_2",
"name": "ACM2-ACMESigns"
}
],
"createdFromLineRef": [
{
"id": "8462",
"dataType": "bill",
"lineNumber": 1
}
]
},
{
"description": "ACMEDisintegratingPistol",
"unitAmount": 25,
"discountAmount": 0,
"quantity": 3,
"subTotal": 75,
"taxAmount": 7.5,
"totalAmount": 82.5,
"itemRef": {
"id": "3abf0883-03f7-44c6-bc15-1372522d25e1"
},
"taxRateRef": {
"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"
},
"accountRef": {
"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"
}
},
{
"description": "ACMEWhippedCreamDispenser",
"unitAmount": 52,
"discountAmount": 0,
"quantity": 6,
"subTotal": 312,
"taxAmount": 31.2,
"totalAmount": 343.2,
"itemRef": {
"id": "3691f3d9-0ff7-4358-8a93-bed31c1b4b03"
},
"taxRateRef": {
"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"
},
"accountRef": {
"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"
}
},
{
"description": "ACMEJetPropelledPogoStick",
"unitAmount": 130,
"discountAmount": 0,
"quantity": 1,
"subTotal": 130,
"taxAmount": 27.3,
"totalAmount": 157.3,
"itemRef": {
"id": "075410d4-7edc-4936-ba52-9e1e43cbe300"
},
"taxRateRef": {
"id": "d606732b-db18-44d7-823b-7f15f42c32ea"
},
"accountRef": {
"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"
}
}
],
"supplierRef": {
"id": "67C6A7A1-5E84-4AC4-B950-24A114E379D0",
"supplierName": "Chin's Gas and Oil"
},
"createdFromLineRef": {
"id": "8462",
"dataType": "bills",
"line": 1
}
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/unlinkconnectionresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatebillrequest.md similarity index 60% rename from previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/unlinkconnectionresponse.md rename to previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatebillrequest.md index 18dfe7573..647fd74ef 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/unlinkconnectionresponse.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatebillrequest.md @@ -1,12 +1,48 @@ -# UnlinkConnectionResponse +# UpdateBillRequest +## Example Usage + +```typescript +import { UpdateBillRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: UpdateBillRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2", + bill: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + issueDate: "2022-10-23T00:00:00Z", + dueDate: "2022-10-23T00:00:00Z", + currency: "GBP", + status: "Paid", + subTotal: new Decimal("2384.13"), + taxAmount: new Decimal("8906.53"), + totalAmount: new Decimal("5145.13"), + paymentAllocations: [ + { + payment: { + currency: "USD", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "USD", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], + }, +}; +``` ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `connection` | [shared.Connection](../../../sdk/models/shared/connection.md) | :heavy_minus_sign: | OK | {"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"} | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | -| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | | -| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ 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 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier for a connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | +| `billId` | *string* | :heavy_check_mark: | Unique identifier for a bill. | 13d946f0-c5d5-42bc-b092-97ece17923ab | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `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. | | +| `bill` | [shared.Bill](../../../sdk/models/shared/bill.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatecompanyrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatecompanyrequest.md index 50f541a35..0c828e26f 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatecompanyrequest.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatecompanyrequest.md @@ -1,9 +1,27 @@ # UpdateCompanyRequest +## Example Usage + +```typescript +import { UpdateCompanyRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: UpdateCompanyRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyRequestBody: { + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + groups: [ + { + id: "60d2fa12-8a04-11ee-b9d1-0242ac120002", + }, + ], + }, +}; +``` ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `companyRequestBody` | [shared.CompanyRequestBody](../../../sdk/models/shared/companyrequestbody.md) | :heavy_minus_sign: | N/A | | -| `companyId` | *string* | :heavy_check_mark: | Unique identifier for a company. | 8a210b68-6988-11ed-a1eb-0242ac120002 | \ No newline at end of file +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatesupplierrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatesupplierrequest.md new file mode 100644 index 000000000..1ab25be26 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatesupplierrequest.md @@ -0,0 +1,62 @@ +# UpdateSupplierRequest + +## Example Usage + +```typescript +import { UpdateSupplierRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +let value: UpdateSupplierRequest = { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + supplierId: "", + 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, + }, + }, + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `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. | | +| `timeoutInMinutes` | *number* | :heavy_minus_sign: | Time limit for the push operation to complete before it is timed out. | | +| `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. | | +| `supplier` | [shared.Supplier](../../../sdk/models/shared/supplier.md) | :heavy_minus_sign: | N/A | {
"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"
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/uploadbillattachmentrequest.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/uploadbillattachmentrequest.md new file mode 100644 index 000000000..c3a0aa3c9 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/uploadbillattachmentrequest.md @@ -0,0 +1,18 @@ +# UploadBillAttachmentRequest + +## Example Usage + +```typescript +import { UploadBillAttachmentRequest } from "@codat/sync-for-payables-version-1/sdk/models/operations"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `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 | +| `billId` | *string* | :heavy_check_mark: | Unique identifier for a bill. | 13d946f0-c5d5-42bc-b092-97ece17923ab | +| `attachmentUpload` | [shared.AttachmentUpload](../../../sdk/models/shared/attachmentupload.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/account.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/account.md new file mode 100644 index 000000000..89edd55ff --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/account.md @@ -0,0 +1,74 @@ +# Account + +> **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**. + +View the coverage for accounts in the Data coverage explorer. + +## Overview + +Accounts 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. + +The categories for an account include: +* Asset +* Expense +* Income +* Liability +* Equity. + +The 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. + +At 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. + +To determine the list of allowed categories for a specific integration, you can: +- 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-payables-api#/operations/get-create-chartOfAccounts-model). +- Refer to the integration's own documentation. + +> **Accounts with no category** +> +> 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`. +> +> 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. + +## Example Usage + +```typescript +import { Account } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: Account = { + 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: "Fixed Asset", + currency: "GBP", + currentBalance: new Decimal("0"), + type: "Asset", + status: "Active", +}; +``` + +## Fields + +| 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 | +| `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 | +| `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 | +| `isBankAccount` | *boolean* | :heavy_minus_sign: | Confirms whether the account is a bank account or not. | | +| `validDatatypeLinks` | [shared.ValidDataTypeLinks](../../../sdk/models/shared/validdatatypelinks.md)[] | :heavy_minus_sign: | 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-payables-api#/schemas/ValidDataTypeLinks). | | +| `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. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingaccount.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingaccount.md new file mode 100644 index 000000000..2d031552b --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingaccount.md @@ -0,0 +1,76 @@ +# ~~AccountingAccount~~ + +> **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**. + +View the coverage for accounts in the Data coverage explorer. + +## Overview + +Accounts 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. + +The categories for an account include: +* Asset +* Expense +* Income +* Liability +* Equity. + +The 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. + +At 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. + +To determine the list of allowed categories for a specific integration, you can: +- 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-payables-api#/operations/get-create-chartOfAccounts-model). +- Refer to the integration's own documentation. + +> **Accounts with no category** +> +> 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`. +> +> 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. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +## Example Usage + +```typescript +import { AccountingAccount } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: AccountingAccount = { + 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", +}; +``` + +## Fields + +| 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 | +| `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 | +| `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 | +| `isBankAccount` | *boolean* | :heavy_minus_sign: | Confirms whether the account is a bank account or not. | | +| `validDatatypeLinks` | [shared.CreateAccountResponseValidDataTypeLinks](../../../sdk/models/shared/createaccountresponsevaliddatatypelinks.md)[] | :heavy_minus_sign: | 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-payables-api#/schemas/ValidDataTypeLinks). | | +| `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. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingaddresstype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingaddresstype.md new file mode 100644 index 000000000..1fca880b7 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingaddresstype.md @@ -0,0 +1,17 @@ +# AccountingAddressType + +The type of the address + +## Example Usage + +```typescript +import { AccountingAddressType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: AccountingAddressType = "Delivery"; +``` + +## Values + +```typescript +"Unknown" | "Billing" | "Delivery" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingbankaccount.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingbankaccount.md new file mode 100644 index 000000000..512861e95 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingbankaccount.md @@ -0,0 +1,55 @@ +# ~~AccountingBankAccount~~ + +> **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 datatype [here](https://docs.codat.io/sync-for-payables-api#/schemas/Account) + +> View the coverage for bank accounts in the Data coverage explorer. + +## 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. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +## Example Usage + +```typescript +import { AccountingBankAccount } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: AccountingBankAccount = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + currency: "GBP", + status: "Active", +}; +``` + +## Fields + +| 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 | +| `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.BankAccountCreateResponseBankAccountType](../../../sdk/models/shared/bankaccountcreateresponsebankaccounttype.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. | | +| `nominalCode` | *string* | :heavy_minus_sign: | Code used to identify each nominal account for a business. | | +| `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 | +| `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. | | +| `overdraftLimit` | *Decimal* | :heavy_minus_sign: | 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` | [shared.BankAccountStatus](../../../sdk/models/shared/bankaccountstatus.md) | :heavy_minus_sign: | Status of the bank account. | Active | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingbill.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingbill.md new file mode 100644 index 000000000..4d3e84525 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingbill.md @@ -0,0 +1,80 @@ +# ~~AccountingBill~~ + +> **Invoices or bills?** +> +> We distinguish between invoices where the company *owes money* vs. *is owed money*. If the company has received an invoice, and owes money to someone else (accounts payable) we call this a Bill. +> +> See [Invoices](https://docs.codat.io/sync-for-payables-api#/schemas/Invoice) for the accounts receivable equivalent of bills. + +View the coverage for bills in the Data coverage explorer. + +## Overview + +In Codat, a bill contains details of: +* When the bill was recorded in the accounting system. +* How much the bill is for and the currency of the amount. +* Who the bill was received from — the *supplier*. +* What the bill is for — the *line items*. + +Some accounting software give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's *expenses*. + +You can find these types of transactions in our [Direct costs](https://docs.codat.io/sync-for-payables-api#/schemas/DirectCost) data model. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +## Example Usage + +```typescript +import { AccountingBill } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: AccountingBill = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + issueDate: "2022-10-23T00:00:00Z", + dueDate: "2022-10-23T00:00:00Z", + currency: "GBP", + status: "Draft", + subTotal: new Decimal("1324.87"), + taxAmount: new Decimal("3253.1"), + totalAmount: new Decimal("534.27"), + paymentAllocations: [ + { + payment: { + currency: "EUR", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "EUR", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], +}; +``` + +## Fields + +| 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 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the bill, unique for the company in the accounting software. | | +| `reference` | *string* | :heavy_minus_sign: | User-friendly reference for the bill. | | +| `supplierRef` | [shared.SupplierRef](../../../sdk/models/shared/supplierref.md) | :heavy_minus_sign: | Reference to the supplier the record relates to. | | +| `purchaseOrderRefs` | [shared.CreateBillResponsePurchaseOrderReference](../../../sdk/models/shared/createbillresponsepurchaseorderreference.md)[] | :heavy_minus_sign: | N/A | | +| `issueDate` | *string* | :heavy_check_mark: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `dueDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `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 | +| `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. \| | | +| `lineItems` | [shared.BillLineItem](../../../sdk/models/shared/billlineitem.md)[] | :heavy_minus_sign: | Array of Bill line items. | | +| `withholdingTax` | [shared.CreateBillResponseWithholdingTax](../../../sdk/models/shared/createbillresponsewithholdingtax.md)[] | :heavy_minus_sign: | N/A | | +| `status` | [shared.BillStatus](../../../sdk/models/shared/billstatus.md) | :heavy_check_mark: | Current state of the bill. | | +| `subTotal` | *Decimal* | :heavy_check_mark: | Total amount of the bill, excluding any taxes. | | +| `taxAmount` | *Decimal* | :heavy_check_mark: | Amount of tax on the bill. | | +| `totalAmount` | *Decimal* | :heavy_check_mark: | Amount of the bill, including tax. | | +| `amountDue` | *Decimal* | :heavy_minus_sign: | Amount outstanding on the bill. | | +| `note` | *string* | :heavy_minus_sign: | Any private, company notes about the bill, such as payment information. | | +| `paymentAllocations` | [shared.CreateBillResponseAccountingPaymentAllocation](../../../sdk/models/shared/createbillresponseaccountingpaymentallocation.md)[] | :heavy_minus_sign: | An array of payment allocations. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingbillcreditnote.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingbillcreditnote.md new file mode 100644 index 000000000..1a01d0e51 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingbillcreditnote.md @@ -0,0 +1,95 @@ +# ~~AccountingBillCreditNote~~ + +> **Bill credit notes or credit notes?** +> +> In Codat, bill credit notes represent accounts payable only. For accounts receivable, see [Credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/CreditNote). + +View the coverage for bill credit notes in the Data coverage explorer. + +## Overview + +A bill credit note is issued by a supplier for the purpose of recording credit. For example, if a supplier was unable to fulfil an order that was placed by a business, or delivered damaged goods, they would issue a bill credit note. A bill credit note reduces the amount a business owes to the supplier. It can be refunded to the business or used to pay off future bills. + +In the Codat API, a bill credit note is an accounts payable record issued by a [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier). + +A bill credit note includes details of: +* The original and remaining credit. +* Any allocations of the credit against other records, such as [bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill). +* The supplier that issued the bill credit note. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +## Example Usage + +```typescript +import { AccountingBillCreditNote } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: AccountingBillCreditNote = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "6a0e9dfb-87b0-47d3-aaaf-9753ae9e757d", + billCreditNoteNumber: "14763237", + supplierRef: { + id: "67C6A7A1-5E84-4AC4-B950-24A114E379D0", + supplierName: "Chin's Gas and Oil", + }, + totalAmount: new Decimal("693"), + totalDiscount: new Decimal("0"), + subTotal: new Decimal("805.78"), + totalTaxAmount: new Decimal("0"), + discountPercentage: new Decimal("0"), + remainingCredit: new Decimal("693"), + status: "Submitted", + issueDate: "2019-02-18T16:03:07.268Z", + allocatedOnDate: "2022-10-23T00:00:00Z", + currency: "USD", + lineItems: [], + paymentAllocations: [ + { + payment: { + currency: "USD", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "USD", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], + createdFromRefs: [ + { + dataType: "invoice", + }, + ], + note: "Track separately", +}; +``` + +## Fields + +| 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 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the bill credit note that is unique to a company in the accounting software. | 1509398f-98e2-436d-8a5d-c042e0c74ffc | +| `billCreditNoteNumber` | *string* | :heavy_minus_sign: | Friendly reference for the bill credit note. | 91fe2a83-e161-4c21-929d-c5c10c4b07e5 | +| `supplierRef` | [shared.SupplierRef](../../../sdk/models/shared/supplierref.md) | :heavy_minus_sign: | Reference to the supplier the record relates to. | | +| `withholdingTax` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | N/A | | +| `totalAmount` | *Decimal* | :heavy_check_mark: | Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. | 805.78 | +| `totalDiscount` | *Decimal* | :heavy_check_mark: | Total value of any discounts applied. | 0 | +| `subTotal` | *Decimal* | :heavy_check_mark: | Total amount of the bill credit note, including discounts but excluding tax. | 805.78 | +| `totalTaxAmount` | *Decimal* | :heavy_check_mark: | Amount of tax included in the bill credit note. | 0 | +| `discountPercentage` | *Decimal* | :heavy_check_mark: | Percentage rate of any discount applied to the bill credit note. | 0 | +| `remainingCredit` | *Decimal* | :heavy_minus_sign: | Amount of the bill credit note that is still outstanding. | 0 | +| `status` | [shared.BillCreditNoteStatus](../../../sdk/models/shared/billcreditnotestatus.md) | :heavy_check_mark: | Current state of the bill credit note | Paid | +| `issueDate` | *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 | +| `allocatedOnDate` | *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 | +| `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 | +| `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. \| | | +| `lineItems` | [shared.BillCreditNoteLineItem](../../../sdk/models/shared/billcreditnotelineitem.md)[] | :heavy_minus_sign: | An array of line | | +| `paymentAllocations` | [shared.PaymentAllocationItems](../../../sdk/models/shared/paymentallocationitems.md)[] | :heavy_minus_sign: | An array of payment allocations. | | +| `createdFromRefs` | [shared.CreateBillCreditNoteResponseRecordReference](../../../sdk/models/shared/createbillcreditnoteresponserecordreference.md)[] | :heavy_minus_sign: | An array of records the credit note was created from. | | +| `note` | *string* | :heavy_minus_sign: | Any additional information about the bill credit note. | Bill Credit Note with 1 line items, totaling 805.78 | +| `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. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingbillpayment.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingbillpayment.md new file mode 100644 index 000000000..e7f61e9f4 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingbillpayment.md @@ -0,0 +1,214 @@ +# ~~AccountingBillPayment~~ + +> **Bill payments or payments?** +> +> We distinguish between transactions where the company received money vs. paid money. If the transaction represents a company spending money (accounts payable) we call this a Bill payment. +> +> See [payments](https://docs.codat.io/sync-for-payables-api#/schemas/Payment) for the accounts receivable equivalent of Bill payments, which covers [invoices](https://docs.codat.io/sync-for-payables-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/CreditNote). + +> View the coverage for bill payments in the Data coverage explorer. + +## Overview + +Bill payments include all accounts payable transaction data ([bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) and [credit notes against bills](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote)). + +A bill payment in Codat usually represents an allocation of money within any customer accounts payable account. This includes, but is not strictly limited to: + +- A payment made against a bill — for example, a credit card payment, cheque payment, or cash payment. +- An allocation of a supplier's credit note to a bill or perhaps a refund. +- A bill payment made directly to an accounts payable account. This could be an overpayment or a prepayment, or a refund of a payment made directly to an accounts payable account. + +Depending on the bill payments which are allowed by the underlying accounting software, some of these types may be combined. Please see the example data section for samples of what these cases look like. + +In Codat, a bill payment contains details of: + +- When the bill payment was recorded in the accounting system. +- How much it is for and in the currency. +- Who the payment has been paid to, the _supplier_. +- The types of bill payments, the _line items_. + +Some accounting software give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's _expenses_. You can find these types of transactions in our [Direct costs](https://docs.codat.io/sync-for-payables-api#/schemas/DirectCost) data model. + +Bill payments is a child data type of [account transactions](https://docs.codat.io/sync-for-payables-api#/schemas/AccountTransaction). + +--- + +## Bill payment types + +### Payment of a bill + +A payment paying a single bill should have the following properties: + +- A `totalAmount` indicating the amount of the bill that was paid. This is always positive. +- A `lines` array containing one element with the following properties: + - An `amount` equal to the `totalAmount` above. + - A `links` array containing one element with the following properties: + - A `type` indicating the type of link, in this case a `Bill`. + - An `id` containing the ID of the bill that was paid. + - An amount of `-totalAmount` (negative `totalAmount`), indicating that the entirety of the paid amount is allocated to the bill. + +### Payment of multiple bills + +It is possible for one payment to pay multiple bills. This can be represented using two possible formats, depending on how the supplier keeps their books: + +1. The payment has multiple entries in its **lines** array, one for each bill that is paid. Each line will follow the above example for paying a bill, and the rules detailed in the data model. +2. The payment has a line with multiple links to each bill. This occurs when the proportion of the original payment allocated to each bill is not available. + +Each line is the same as those described above, with the **amount** indicating how much of the payment is allocated to the bill. The **amount** on the lines sum to the **totalAmount** on the payment. + +> Pushing batch payments to Xero +> +> When pushing a single bill payment to Xero to pay multiple bills, only the first format is supported—multiple entries in the payment **lines** array. + +### Payments and refunds on account + +A payment on account, that is a payment that doesn’t pay a specific bill, has one entry in its lines array. + +The line has the following properties: + +- A **totalAmount** indicating the amount paid by a supplier or refunded to them by a company. A payment to the supplier is always negative. A refund is always positive. +- A **links** array containing one element with the following properties: + - A **type** indicating the type of link. For a payment this is `PaymentOnAccount`. For a refund this is `Refund`. + - The **id** containing the ID of the supplier. + - An amount for the link is `0` **totalAmount** or the amount of the payment or refund. + +It is possible to have a payment that is part on account and part allocated to a bill. Each line should follow the examples above. + +### Using a credit note to pay a bill + +The payment of a bill using a credit note has one entry in its `lines` array. This **line** has the following properties: + +- An **amount** indicating the amount of money moved, which in this case is `0`, as the credit note and bill allocation must balance each other. +- A **links** array containing two elements: + - The first link has: + - A **type** indicating the type of link, in this case a `Bill`. + - An **id** containing the ID of the bill that was paid. + - The second link has: + - A **type** indicating the type of link, in this case a `CreditNote`. + - An **id** containing the ID of the credit note used by this payment. + +The **amount** field on the **line** equals the **totalAmount** on the payment. + +### Refunding a credit note + +A bill payment refunding a credit note has one entry in its **lines** array. This line has the following properties: + +- An **amount** indicating the amount of the credit note that was refunded. This is always negative, indicating that it is a refund. +- A **links** array containing one element with the following properties: + - A **type** indicating the type of `link`, in this case a `CreditNote`. + - An **id** containing the ID of the credit note that was refunded. + +The **totalAmount** field on the payment equals the line's **amount** field. These are both negative, as this is money leaving accounts payable. + +### Refunding a payment + +If a payment is refunded, for example, when a company overpaid a bill and the overpayment is returned, there are two payment records: + +- One for the incoming overpayment. +- Another for the outgoing refund. + +The payment issuing the refund is identified by the fact that the **totalAmount** is negative. This payment has one entry in its lines array that have the following properties: + +- An **amount** indicating the amount that was refunded. This is always negative. +- A **links** array containing one element with the following properties: + - A **type** indicating the type of a the link, in this case a `BillPayment`. + - An **id** containing the ID of the payment that was refunded. + +The **amount** field on the line equals the **totalAmount** on the payment and is negative as this is money leaving accounts payable. + +The payment that was refunded can be identified as it has a line where the `amount` on its `line` is positive and the type of the link is `Refund`. This payment may have several entries in its **lines** array if it was partly used to pay an bill. For example, a £1,050 payment paying a £1,000 bill with a refund of £50 has two lines: + +- One for £1,000 linked to the bill that was paid +- Another for £50 linked to the payment that refunded the over payment. This link is of type `Refund` but the ID corresponds to a bill payment. + +The line linked to the bill payment has the following properties: + +- An **amount** indicating the amount that was refunded. This is positive as its money that was added to accounts payable, but is balanced out by the negative amount of the refund. +- A **links** array containing one element with the following properties: + - A **type** indicating the type of the link, in this case a `Refund`. + - An **id** containing the ID of the payment that refunded this line. + +> Linked payments +> +> Not all accounting software support linked payments in this way. In these platforms you may see a payment on account and a refund on account. + +## Foreign currencies + +There are two types of currency rate that are detailed in the bill payments data type: + +Payment currency rate: + +- Base currency of the accounts payable account. +- Foreign currency of the bill payment. + +Payment line link currency rate: + +- Base currency of the item that the link represents. +- Foreign currency of the payment. + +These two rates allow the calculation of currency loss or gain for any of the transactions affected by the payment lines. The second rate is used when a bill payment is applied to an item in a currency that does not match either: + +- The base currency for the accounts payable account. +- The currency of the item. + + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +## Example Usage + +```typescript +import { AccountingBillPayment } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: AccountingBillPayment = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "3d5a8e00-d108-4045-8823-7f342676cffa", + totalAmount: new Decimal("0"), + currency: "EUR", + date: "2022-10-23T00:00:00Z", + note: "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + lines: [ + { + amount: new Decimal("0"), + links: [ + { + type: "Bill", + id: "x", + amount: new Decimal("-1000"), + }, + { + type: "CreditNote", + id: "y", + amount: new Decimal("1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], +}; +``` + +## Fields + +| 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 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the bill payment, unique for the company in the accounting software. | 3d5a8e00-d108-4045-8823-7f342676cffa | +| `supplierRef` | [shared.SupplierRef](../../../sdk/models/shared/supplierref.md) | :heavy_minus_sign: | N/A | | +| `accountRef` | [shared.AccountRef](../../../sdk/models/shared/accountref.md) | :heavy_minus_sign: | 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. | | +| `totalAmount` | *Decimal* | :heavy_minus_sign: | Amount of the payment in the payment currency. This value never changes and represents the amount of money that is paid into the supplier's account. | 1329.54 | +| `currency` | *string* | :heavy_minus_sign: | N/A | 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. \| | | +| `date` | *string* | :heavy_check_mark: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `note` | *string* | :heavy_minus_sign: | Additional information associated with the payment. | Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44 | +| `paymentMethodRef` | [shared.PaymentMethodRef](../../../sdk/models/shared/paymentmethodref.md) | :heavy_minus_sign: | N/A | {
"id": "EILBDVJVNUAGVKRQ",
"name": "AliPay"
} | +| `lines` | [shared.BillPaymentLine](../../../sdk/models/shared/billpaymentline.md)[] | :heavy_minus_sign: | An array of bill payment lines. | | +| `reference` | *string* | :heavy_minus_sign: | Additional information associated with the payment. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingjournal.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingjournal.md new file mode 100644 index 000000000..1865a874b --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingjournal.md @@ -0,0 +1,55 @@ +# ~~AccountingJournal~~ + +> **Language tip:** For line items, or individual transactions, of a company's financial documents, refer to the [Journal entries](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry) data type + +> View the coverage for journals in the Data coverage explorer. + +## Overview + +In accounting software, journals are used to record all the financial transactions of a company. Each transaction in a journal is represented by a separate [journal entry](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry). These entries are used to create the general ledger, which is then used to create the financial statements of a business. + +When a company records all their transactions in a single journal, it can become large and difficult to maintain and track. This is why large companies often use multiple journals (also known as subjournals) to categorize and manage journal entries. + +Such journals can be divided into two categories: + +- Special journals: journals used to record specific types of transactions; for example, a purchases journal, a sales journal, or a cash management journal. +- General journals: journals used to record transactions that fall outside the scope of the special journals. + +Multiple journals or subjournals are used in the following Codat integrations: + +- [Sage Intacct](https://docs.codat.io/integrations/accounting/sage-intacct/accounting-sage-intacct) (mandatory) +- [Exact Online](https://docs.codat.io/integrations/accounting/exact-online/accounting-exact-online) (mandatory) +- [Oracle NetSuite](https://docs.codat.io/integrations/accounting/netsuite/accounting-netsuite) (optional) + +> When pushing journal entries to an accounting software that doesn’t support multiple journals (multi-book accounting), the entries will be linked to the platform-generic journal. The Journals data type will only include one object. + + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +## Example Usage + +```typescript +import { AccountingJournal } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: AccountingJournal = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + createdOn: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| 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 | +| `id` | *string* | :heavy_minus_sign: | Journal ID. | | +| `journalCode` | *string* | :heavy_minus_sign: | Native journal number or code. | | +| `name` | *string* | :heavy_minus_sign: | Journal name.
The maximum length for a journal name is 256 characters. All characters above that number will be truncated. | | +| `type` | *string* | :heavy_minus_sign: | The type of the journal. | | +| `parentId` | *string* | :heavy_minus_sign: | Parent journal ID.
If the journal is a parent journal, this value is not present. | | +| `hasChildren` | *boolean* | :heavy_minus_sign: | If the journal has child journals, this value is true. If it doesn’t, it is false. | | +| `createdOn` | *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 | +| `status` | [shared.JournalStatus](../../../sdk/models/shared/journalstatus.md) | :heavy_minus_sign: | Current journal status. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingjournalentry.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingjournalentry.md new file mode 100644 index 000000000..a6d1dfbec --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingjournalentry.md @@ -0,0 +1,73 @@ +# ~~AccountingJournalEntry~~ + +> **Language tip:** For the top-level record of a company's financial transactions, refer to the [Journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) data type + +> View the coverage for journal entries in the Data coverage explorer. + +## Overview + +A journal entry report shows the entries made in a company's general ledger, or [accounts](https://docs.codat.io/sync-for-payables-api#/schemas/Account), when transactions are approved. The journal line items for each journal entry should balance. + +A journal entry line item is a single transaction line on the journal entry. For example: + +- When a journal entry is recording a receipt of cash, the credit to accounts receivable and the debit to cash are separate line items. +- When a company needs to recognise revenue from an annual contract on a monthly basis, on receipt of cash for month one, they make a debit to deferred income and a credit to revenue. + +In Codat a journal entry contains details of: + +- The date on which the entry was created and posted. +- Itemised lines, including amounts and currency. +- A reference to the associated accounts. +- A reference to the underlying record. For example, the invoice, bill, or other data type that triggered the posting of the journal entry to the general ledger. + +> **Pushing journal entries** +> Codat only supports journal entries in the base currency of the company that are pushed into accounts denominated in the same base currency. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +## Example Usage + +```typescript +import { AccountingJournalEntry } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: AccountingJournalEntry = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + postedOn: "2022-10-23T00:00:00Z", + createdOn: "2022-10-23T00:00:00Z", + updatedOn: "2022-10-23T00:00:00Z", + journalLines: [ + { + netAmount: new Decimal("9591.67"), + tracking: { + recordRefs: [ + { + dataType: "trackingCategories", + }, + ], + }, + }, + ], + recordRef: { + dataType: "transfers", + }, +}; +``` + +## Fields + +| 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 | +| `id` | *string* | :heavy_minus_sign: | Unique identifier of the journal entry for the company in the accounting software. | | +| `description` | *string* | :heavy_minus_sign: | Optional description of the journal entry. | | +| `postedOn` | *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 | +| `createdOn` | *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 | +| `updatedOn` | *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 | +| `journalRef` | [shared.JournalRef](../../../sdk/models/shared/journalref.md) | :heavy_minus_sign: | Links journal entries to the relevant journal in accounting integrations that use multi-book accounting (multiple journals). | | +| `journalLines` | [shared.JournalLine](../../../sdk/models/shared/journalline.md)[] | :heavy_minus_sign: | An array of journal lines. | | +| `recordRef` | [shared.JournalEntryRecordRef](../../../sdk/models/shared/journalentryrecordref.md) | :heavy_minus_sign: | Links a journal entry to the underlying record that created it. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingpaymentallocation.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingpaymentallocation.md new file mode 100644 index 000000000..0e23950b4 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingpaymentallocation.md @@ -0,0 +1,25 @@ +# AccountingPaymentAllocation + +## Example Usage + +```typescript +import { AccountingPaymentAllocation } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: AccountingPaymentAllocation = { + payment: { + currency: "EUR", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "EUR", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `payment` | [shared.PaymentAllocationPayment](../../../sdk/models/shared/paymentallocationpayment.md) | :heavy_check_mark: | N/A | +| `allocation` | [shared.BillAllocation](../../../sdk/models/shared/billallocation.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingprojectreference.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingprojectreference.md new file mode 100644 index 000000000..6e77785f1 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingprojectreference.md @@ -0,0 +1,18 @@ +# AccountingProjectReference + +## Example Usage + +```typescript +import { AccountingProjectReference } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: AccountingProjectReference = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique identifier to the project reference. | +| `name` | *string* | :heavy_minus_sign: | The project's name. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingsupplier.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingsupplier.md new file mode 100644 index 000000000..227faee88 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountingsupplier.md @@ -0,0 +1,73 @@ +# ~~AccountingSupplier~~ + +> View the coverage for suppliers in the Data coverage explorer. + +## Overview + +From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/sync-for-payables-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill). + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +## Example Usage + +```typescript +import { AccountingSupplier } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: AccountingSupplier = { + 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, + }, + }, + }, +}; +``` + +## Fields + +| 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 | +| `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 | +| `addresses` | [shared.Address](../../../sdk/models/shared/address.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. | | +| `status` | [shared.SupplierStatus](../../../sdk/models/shared/supplierstatus.md) | :heavy_check_mark: | Status of the supplier. | | +| `defaultCurrency` | *string* | :heavy_minus_sign: | Default currency the supplier's transactional data is recorded in. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountprototype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountprototype.md new file mode 100644 index 000000000..e108ea0ca --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountprototype.md @@ -0,0 +1,38 @@ +# AccountPrototype + +## Example Usage + +```typescript +import { AccountPrototype } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: AccountPrototype = { + 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", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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 | +| `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 | +| `isBankAccount` | *boolean* | :heavy_minus_sign: | Confirms whether the account is a bank account or not. | | +| `validDatatypeLinks` | [shared.AccountPrototypeValidDataTypeLinks](../../../sdk/models/shared/accountprototypevaliddatatypelinks.md)[] | :heavy_minus_sign: | 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-payables-api#/schemas/ValidDataTypeLinks). | | +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountprototypevaliddatatypelinks.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountprototypevaliddatatypelinks.md new file mode 100644 index 000000000..48d3133b3 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountprototypevaliddatatypelinks.md @@ -0,0 +1,57 @@ +# AccountPrototypeValidDataTypeLinks + +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. + +## Example Usage + +```typescript +import { AccountPrototypeValidDataTypeLinks } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: AccountPrototypeValidDataTypeLinks = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `property` | *string* | :heavy_minus_sign: | The property from the account that can be linked. | +| `links` | *string*[] | :heavy_minus_sign: | Supported `dataTypes` that the record can be linked to. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountreference.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountref.md similarity index 66% rename from previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountreference.md rename to previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountref.md index 05e726c82..f7571b9ac 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountreference.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountref.md @@ -1,7 +1,14 @@ -# AccountReference +# AccountRef -Reference to the account to which the line item is linked. +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. +## Example Usage + +```typescript +import { AccountRef } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: AccountRef = {}; +``` ## Fields diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accounts.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accounts.md new file mode 100644 index 000000000..f323a48e3 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accounts.md @@ -0,0 +1,49 @@ +# Accounts + +## Example Usage + +```typescript +import { Accounts } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: Accounts = { + results: [ + { + 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: "EUR", + currentBalance: new Decimal("0"), + type: "Asset", + status: "Active", + }, + ], + pageNumber: 1, + pageSize: 10, + totalResults: 1, + links: { + self: { + href: "/companies/{id}/data/{dataType}", + }, + current: { + href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `results` | [shared.Account](../../../sdk/models/shared/account.md)[] | :heavy_minus_sign: | N/A | | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountstatus.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountstatus.md new file mode 100644 index 000000000..47a1d6838 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accountstatus.md @@ -0,0 +1,17 @@ +# AccountStatus + +Status of the account + +## Example Usage + +```typescript +import { AccountStatus } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: AccountStatus = "Active"; +``` + +## Values + +```typescript +"Unknown" | "Active" | "Archived" | "Pending" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accounttype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accounttype.md new file mode 100644 index 000000000..b4617e9c6 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/accounttype.md @@ -0,0 +1,17 @@ +# AccountType + +Type of account + +## Example Usage + +```typescript +import { AccountType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: AccountType = "Asset"; +``` + +## Values + +```typescript +"Unknown" | "Asset" | "Expense" | "Income" | "Liability" | "Equity" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/address.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/address.md new file mode 100644 index 000000000..e1da14d15 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/address.md @@ -0,0 +1,23 @@ +# Address + +## Example Usage + +```typescript +import { Address } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Address = { + type: "Unknown", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `type` | [shared.AccountingAddressType](../../../sdk/models/shared/accountingaddresstype.md) | :heavy_check_mark: | The type of the address | +| `line1` | *string* | :heavy_minus_sign: | Line 1 of the customer address. | +| `line2` | *string* | :heavy_minus_sign: | Line 2 of the customer address. | +| `city` | *string* | :heavy_minus_sign: | City of the customer address. | +| `region` | *string* | :heavy_minus_sign: | Region of the customer address. | +| `country` | *string* | :heavy_minus_sign: | Country of the customer address. | +| `postalCode` | *string* | :heavy_minus_sign: | Postal code or zip code. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/allocation.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/allocation.md new file mode 100644 index 000000000..ac7a236b1 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/allocation.md @@ -0,0 +1,21 @@ +# Allocation + +## Example Usage + +```typescript +import { Allocation } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Allocation = { + currency: "GBP", + allocatedOnDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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 | +| `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. \| | | +| `allocatedOnDate` | *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 | +| `totalAmount` | *Decimal* | :heavy_minus_sign: | The total amount that has been allocated. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/attachment.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/attachment.md new file mode 100644 index 000000000..4132e2ad8 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/attachment.md @@ -0,0 +1,46 @@ +# Attachment + +The Codat API supports pulling and pushing of file attachments for invoices, bills, direct costs, and direct incomes. + +> **Retrieving attachments** +> +> If a company is authorized, you can query the Codat API to read, download, and upload attachments without requiring a fresh sync of data. + +Unlike other data types, Codat doesn't support [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings) for attachments. + +Note that different integrations have different requirements to file size and extension of attachments. + +| Integration | File size | File extension | +|-------------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------| +| Xero | 4 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 | +| QuickBooks Online | 100 MB | AI, CSV, DOC, DOCX, EPS, GIF, JPEG, JPG, ODS, PAGES, PDF, PNG, RTF, TIF, TXT, XLS, XLSX, XML | +| NetSuite | 100 MB | BMP, CSV, XLS, XLSX, JSON, PDF, PJPG, PJPEG, PNG, TXT, SVG, TIF, TIFF, DOC, DOCX, ZIP | +| Dynamics 365 Business Central | 350 MB | Dynamics do not explicitly outline which file types are supported but they do state here that "You can attach any type of file, such as text, image, or video files". | + +View the coverage for each integration in the Data coverage explorer. + + +## Example Usage + +```typescript +import { Attachment } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Attachment = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + dateCreated: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| 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 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the attachment, unique for the company in the accounting software. | | +| `name` | *string* | :heavy_minus_sign: | Name of the attachment file. | | +| `contentType` | *string* | :heavy_minus_sign: | File type of the attachment. This is represented by appending the file type to the [IETF standard file naming requirements](https://tools.ietf.org/html/rfc6838). For example, for a jpeg file the output is **image/jpeg**.

Supported file types vary per platform. | | +| `dateCreated` | *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 | +| `fileSize` | *number* | :heavy_minus_sign: | File size in bytes. For example, if this reads **46153**, then the file size is 46kb. | | +| `includeWhenSent` | *boolean* | :heavy_minus_sign: | If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/attachments.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/attachments.md new file mode 100644 index 000000000..5d89ef6f1 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/attachments.md @@ -0,0 +1,23 @@ +# Attachments + +## Example Usage + +```typescript +import { Attachments } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Attachments = { + attachments: [ + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + dateCreated: "2022-10-23T00:00:00Z", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `attachments` | [shared.Attachment](../../../sdk/models/shared/attachment.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/attachmentupload.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/attachmentupload.md new file mode 100644 index 000000000..ef4462186 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/attachmentupload.md @@ -0,0 +1,15 @@ +# AttachmentUpload + +## Example Usage + +```typescript +import { AttachmentUpload } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `file` | [File](https://developer.mozilla.org/en-US/docs/Web/API/File) \| [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) \| [shared.CodatFile](../../../sdk/models/shared/codatfile.md) | :heavy_check_mark: | The file to be uploaded as an attachment. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccountcreateresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccountcreateresponse.md new file mode 100644 index 000000000..c6fb4fd8b --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccountcreateresponse.md @@ -0,0 +1,44 @@ +# BankAccountCreateResponse + +## Example Usage + +```typescript +import { BankAccountCreateResponse } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: BankAccountCreateResponse = { + changes: [ + { + recordRef: { + dataType: "invoices", + }, + }, + ], + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "71b5e6e1-3b99-4d48-8e1e-91e450ad2abd", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "Success", + statusCode: 552822, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [shared.AccountingBankAccount](../../../sdk/models/shared/accountingbankaccount.md) | :heavy_minus_sign: | N/A | | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `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 | +| `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. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccountcreateresponsebankaccounttype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccountcreateresponsebankaccounttype.md new file mode 100644 index 000000000..0e1ba9c08 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccountcreateresponsebankaccounttype.md @@ -0,0 +1,19 @@ +# BankAccountCreateResponseBankAccountType + +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. + +## Example Usage + +```typescript +import { BankAccountCreateResponseBankAccountType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: BankAccountCreateResponseBankAccountType = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Credit" | "Debit" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatecompanyresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccountprototype.md similarity index 74% rename from previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatecompanyresponse.md rename to previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccountprototype.md index 99599457d..813ea809f 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/updatecompanyresponse.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccountprototype.md @@ -1,12 +1,29 @@ -# UpdateCompanyResponse +# BankAccountPrototype +## Example Usage + +```typescript +import { BankAccountPrototype } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: BankAccountPrototype = { + currency: "EUR", + status: "Active", +}; +``` ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company` | [shared.Company](../../../sdk/models/shared/company.md) | :heavy_minus_sign: | OK | {"id":"0498e921-9b53-4396-a412-4f2f5983b0a2","name":"string","platform":"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","dataConnections":[{"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"}],"groups":[{"id":"d7a6c4b4-dc87-45f6-b803-62f466398680"}]} | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | -| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | | -| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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. | | +| `nominalCode` | *string* | :heavy_minus_sign: | Code used to identify each nominal account for a business. | | +| `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 | +| `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. | | +| `overdraftLimit` | *Decimal* | :heavy_minus_sign: | 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` | [shared.BankAccountStatus](../../../sdk/models/shared/bankaccountstatus.md) | :heavy_minus_sign: | Status of the bank account. | Active | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccountstatus.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccountstatus.md new file mode 100644 index 000000000..8739fad39 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccountstatus.md @@ -0,0 +1,17 @@ +# BankAccountStatus + +Status of the bank account. + +## Example Usage + +```typescript +import { BankAccountStatus } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: BankAccountStatus = "Active"; +``` + +## Values + +```typescript +"Unknown" | "Active" | "Archived" | "Pending" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccounttype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccounttype.md new file mode 100644 index 000000000..ae3586d17 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bankaccounttype.md @@ -0,0 +1,19 @@ +# BankAccountType + +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. + +## Example Usage + +```typescript +import { BankAccountType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: BankAccountType = "Unknown"; +``` + +## Values + +```typescript +"Unknown" | "Credit" | "Debit" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bill.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bill.md index 83ca285ef..98941fb98 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bill.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bill.md @@ -1,20 +1,78 @@ # Bill -Bills are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. +> **Invoices or bills?** +> +> We distinguish between invoices where the company *owes money* vs. *is owed money*. If the company has received an invoice, and owes money to someone else (accounts payable) we call this a Bill. +> +> See [Invoices](https://docs.codat.io/sync-for-payables-api#/schemas/Invoice) for the accounts receivable equivalent of bills. +View the coverage for bills in the Data coverage explorer. + +## Overview + +In Codat, a bill contains details of: +* When the bill was recorded in the accounting system. +* How much the bill is for and the currency of the amount. +* Who the bill was received from — the *supplier*. +* What the bill is for — the *line items*. + +Some accounting software give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's *expenses*. + +You can find these types of transactions in our [Direct costs](https://docs.codat.io/sync-for-payables-api#/schemas/DirectCost) data model. + +## Example Usage + +```typescript +import { Bill } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: Bill = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + issueDate: "2022-10-23T00:00:00Z", + dueDate: "2022-10-23T00:00:00Z", + currency: "EUR", + status: "Unknown", + subTotal: new Decimal("7804.27"), + taxAmount: new Decimal("9818.3"), + totalAmount: new Decimal("9850.33"), + paymentAllocations: [ + { + payment: { + currency: "EUR", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "GBP", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], +}; +``` ## Fields -| Field | Type | Required | Description | Example | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `amountDue` | *number* | :heavy_minus_sign: | Amount outstanding on the bill. | | -| `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 | -| `dueDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | -| `id` | *string* | :heavy_minus_sign: | Identifier for the bill, unique for the company in the accounting platform. | | -| `issueDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | -| `lineItems` | [shared.BillLineItem](../../../sdk/models/shared/billlineitem.md)[] | :heavy_minus_sign: | Array of Bill line items. | | -| `reference` | *string* | :heavy_minus_sign: | User-friendly reference for the bill. | | -| `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | -| `status` | [shared.BillStatus](../../../sdk/models/shared/billstatus.md) | :heavy_minus_sign: | Current state of the bill. | Open | -| `supplierRef` | [shared.SupplierRef](../../../sdk/models/shared/supplierref.md) | :heavy_minus_sign: | Reference to the supplier the record relates to. | | -| `totalAmount` | *number* | :heavy_minus_sign: | Amount of the bill, including tax. | | \ No newline at end of file +| 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 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the bill, unique for the company in the accounting software. | | +| `reference` | *string* | :heavy_minus_sign: | User-friendly reference for the bill. | | +| `supplierRef` | [shared.SupplierRef](../../../sdk/models/shared/supplierref.md) | :heavy_minus_sign: | Reference to the supplier the record relates to. | | +| `purchaseOrderRefs` | [shared.PurchaseOrderReference](../../../sdk/models/shared/purchaseorderreference.md)[] | :heavy_minus_sign: | N/A | | +| `issueDate` | *string* | :heavy_check_mark: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `dueDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `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 | +| `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. \| | | +| `lineItems` | [shared.BillLineItem](../../../sdk/models/shared/billlineitem.md)[] | :heavy_minus_sign: | Array of Bill line items. | | +| `withholdingTax` | [shared.WithholdingTax](../../../sdk/models/shared/withholdingtax.md)[] | :heavy_minus_sign: | N/A | | +| `status` | [shared.BillStatus](../../../sdk/models/shared/billstatus.md) | :heavy_check_mark: | Current state of the bill. | | +| `subTotal` | *Decimal* | :heavy_check_mark: | Total amount of the bill, excluding any taxes. | | +| `taxAmount` | *Decimal* | :heavy_check_mark: | Amount of tax on the bill. | | +| `totalAmount` | *Decimal* | :heavy_check_mark: | Amount of the bill, including tax. | | +| `amountDue` | *Decimal* | :heavy_minus_sign: | Amount outstanding on the bill. | | +| `note` | *string* | :heavy_minus_sign: | Any private, company notes about the bill, such as payment information. | | +| `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_minus_sign: | An array of payment allocations. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billallocation.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billallocation.md new file mode 100644 index 000000000..28d7afa26 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billallocation.md @@ -0,0 +1,21 @@ +# BillAllocation + +## Example Usage + +```typescript +import { BillAllocation } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: BillAllocation = { + currency: "EUR", + allocatedOnDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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 | +| `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. \| | | +| `allocatedOnDate` | *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 | +| `totalAmount` | *Decimal* | :heavy_minus_sign: | The total amount that has been allocated. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnote.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnote.md new file mode 100644 index 000000000..f17e58640 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnote.md @@ -0,0 +1,93 @@ +# BillCreditNote + +> **Bill credit notes or credit notes?** +> +> In Codat, bill credit notes represent accounts payable only. For accounts receivable, see [Credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/CreditNote). + +View the coverage for bill credit notes in the Data coverage explorer. + +## Overview + +A bill credit note is issued by a supplier for the purpose of recording credit. For example, if a supplier was unable to fulfil an order that was placed by a business, or delivered damaged goods, they would issue a bill credit note. A bill credit note reduces the amount a business owes to the supplier. It can be refunded to the business or used to pay off future bills. + +In the Codat API, a bill credit note is an accounts payable record issued by a [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier). + +A bill credit note includes details of: +* The original and remaining credit. +* Any allocations of the credit against other records, such as [bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill). +* The supplier that issued the bill credit note. + +## Example Usage + +```typescript +import { BillCreditNote } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: BillCreditNote = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "6a0e9dfb-87b0-47d3-aaaf-9753ae9e757d", + billCreditNoteNumber: "14763237", + supplierRef: { + id: "67C6A7A1-5E84-4AC4-B950-24A114E379D0", + supplierName: "Chin's Gas and Oil", + }, + totalAmount: new Decimal("693"), + totalDiscount: new Decimal("0"), + subTotal: new Decimal("805.78"), + totalTaxAmount: new Decimal("0"), + discountPercentage: new Decimal("0"), + remainingCredit: new Decimal("693"), + status: "Submitted", + issueDate: "2019-02-18T16:03:07.268Z", + allocatedOnDate: "2022-10-23T00:00:00Z", + currency: "USD", + lineItems: [], + paymentAllocations: [ + { + payment: { + currency: "EUR", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "USD", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], + createdFromRefs: [ + { + dataType: "accountTransaction", + }, + ], + note: "Track separately", +}; +``` + +## Fields + +| 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 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the bill credit note that is unique to a company in the accounting software. | 1509398f-98e2-436d-8a5d-c042e0c74ffc | +| `billCreditNoteNumber` | *string* | :heavy_minus_sign: | Friendly reference for the bill credit note. | 91fe2a83-e161-4c21-929d-c5c10c4b07e5 | +| `supplierRef` | [shared.SupplierRef](../../../sdk/models/shared/supplierref.md) | :heavy_minus_sign: | Reference to the supplier the record relates to. | | +| `withholdingTax` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | N/A | | +| `totalAmount` | *Decimal* | :heavy_check_mark: | Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. | 805.78 | +| `totalDiscount` | *Decimal* | :heavy_check_mark: | Total value of any discounts applied. | 0 | +| `subTotal` | *Decimal* | :heavy_check_mark: | Total amount of the bill credit note, including discounts but excluding tax. | 805.78 | +| `totalTaxAmount` | *Decimal* | :heavy_check_mark: | Amount of tax included in the bill credit note. | 0 | +| `discountPercentage` | *Decimal* | :heavy_check_mark: | Percentage rate of any discount applied to the bill credit note. | 0 | +| `remainingCredit` | *Decimal* | :heavy_minus_sign: | Amount of the bill credit note that is still outstanding. | 0 | +| `status` | [shared.BillCreditNoteStatus](../../../sdk/models/shared/billcreditnotestatus.md) | :heavy_check_mark: | Current state of the bill credit note | Paid | +| `issueDate` | *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 | +| `allocatedOnDate` | *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 | +| `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 | +| `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. \| | | +| `lineItems` | [shared.BillCreditNoteLineItem](../../../sdk/models/shared/billcreditnotelineitem.md)[] | :heavy_minus_sign: | An array of line | | +| `paymentAllocations` | [shared.PaymentAllocationItems](../../../sdk/models/shared/paymentallocationitems.md)[] | :heavy_minus_sign: | An array of payment allocations. | | +| `createdFromRefs` | [shared.RecordReference](../../../sdk/models/shared/recordreference.md)[] | :heavy_minus_sign: | An array of records the credit note was created from. | | +| `note` | *string* | :heavy_minus_sign: | Any additional information about the bill credit note. | Bill Credit Note with 1 line items, totaling 805.78 | +| `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. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getconnectionresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotelineitem.md similarity index 62% rename from previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getconnectionresponse.md rename to previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotelineitem.md index bc0e111af..d0cce9ee1 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getconnectionresponse.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotelineitem.md @@ -1,12 +1,33 @@ -# GetConnectionResponse +# BillCreditNoteLineItem +## Example Usage + +```typescript +import { BillCreditNoteLineItem } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: BillCreditNoteLineItem = { + unitAmount: new Decimal("2497.96"), + quantity: new Decimal("5812.73"), +}; +``` ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `connection` | [shared.Connection](../../../sdk/models/shared/connection.md) | :heavy_minus_sign: | OK | {"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"} | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | -| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | | -| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `description` | *string* | :heavy_minus_sign: | Friendly name of each line item. For example, the goods or service for which credit has been received. | +| `unitAmount` | *Decimal* | :heavy_check_mark: | Unit price of the goods or service. | +| `quantity` | *Decimal* | :heavy_check_mark: | Number of units of the goods or service for which credit has been received. | +| `unitOfMeasurement` | *string* | :heavy_minus_sign: | The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). | +| `discountAmount` | *Decimal* | :heavy_minus_sign: | Value of any discounts applied. | +| `subTotal` | *Decimal* | :heavy_minus_sign: | Amount of credit associated with the line item, including discounts but excluding tax. | +| `taxAmount` | *Decimal* | :heavy_minus_sign: | Amount of tax associated with the line item. | +| `totalAmount` | *Decimal* | :heavy_minus_sign: | Total amount of the line item, including discounts and tax. | +| `accountRef` | [shared.AccountRef](../../../sdk/models/shared/accountref.md) | :heavy_minus_sign: | 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. | +| `discountPercentage` | *Decimal* | :heavy_minus_sign: | Percentage rate of any discount applied to the line item. | +| `taxRateRef` | [shared.TaxRateRef](../../../sdk/models/shared/taxrateref.md) | :heavy_minus_sign: | Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate.

Found on:

- Bill line items
- Bill Credit Note line items
- Credit Note line items
- Direct incomes line items
- Invoice line items
- Items | +| `itemRef` | [shared.ItemReference](../../../sdk/models/shared/itemreference.md) | :heavy_minus_sign: | Reference to the item the line is linked to. | +| `createdFromLineRef` | [shared.Zero](../../../sdk/models/shared/zero.md) | :heavy_minus_sign: | Links the current record line to the underlying record line that created it.

For example, if a bill is generated from a purchase order, this property allows you to connect the bill line item to the purchase order line item in our data model. | +| ~~`trackingCategoryRefs`~~ | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

Reference to the tracking categories to which the line item is linked. | +| `tracking` | [shared.BillCreditNoteLineItemTracking](../../../sdk/models/shared/billcreditnotelineitemtracking.md) | :heavy_minus_sign: | Categories, and a project and customer, against which the item is tracked. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotelineitemaccountingprojectreference.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotelineitemaccountingprojectreference.md new file mode 100644 index 000000000..0825b8de0 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotelineitemaccountingprojectreference.md @@ -0,0 +1,18 @@ +# BillCreditNoteLineItemAccountingProjectReference + +## Example Usage + +```typescript +import { BillCreditNoteLineItemAccountingProjectReference } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: BillCreditNoteLineItemAccountingProjectReference = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique identifier to the project reference. | +| `name` | *string* | :heavy_minus_sign: | The project's name. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotelineitemcustomerref.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotelineitemcustomerref.md new file mode 100644 index 000000000..ba150202f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotelineitemcustomerref.md @@ -0,0 +1,18 @@ +# BillCreditNoteLineItemCustomerRef + +## Example Usage + +```typescript +import { BillCreditNoteLineItemCustomerRef } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: BillCreditNoteLineItemCustomerRef = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | `id` from the Customers data type | +| `companyName` | *string* | :heavy_minus_sign: | `customerName` from the Customer data type | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotelineitemtracking.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotelineitemtracking.md new file mode 100644 index 000000000..c971263c1 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotelineitemtracking.md @@ -0,0 +1,29 @@ +# BillCreditNoteLineItemTracking + +Categories, and a project and customer, against which the item is tracked. + +## Example Usage + +```typescript +import { BillCreditNoteLineItemTracking } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: BillCreditNoteLineItemTracking = { + categoryRefs: [ + { + id: "", + }, + ], + isBilledTo: "Customer", + isRebilledTo: "Project", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| `categoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_check_mark: | N/A | +| `customerRef` | [shared.BillCreditNoteLineItemCustomerRef](../../../sdk/models/shared/billcreditnotelineitemcustomerref.md) | :heavy_minus_sign: | N/A | +| `projectRef` | [shared.BillCreditNoteLineItemAccountingProjectReference](../../../sdk/models/shared/billcreditnotelineitemaccountingprojectreference.md) | :heavy_minus_sign: | N/A | +| `isBilledTo` | [shared.BilledToType](../../../sdk/models/shared/billedtotype.md) | :heavy_check_mark: | Defines if the invoice or credit note is billed/rebilled to a project or customer. | +| `isRebilledTo` | [shared.BilledToType](../../../sdk/models/shared/billedtotype.md) | :heavy_check_mark: | Defines if the invoice or credit note is billed/rebilled to a project or customer. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotes.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotes.md new file mode 100644 index 000000000..9d9ee5080 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotes.md @@ -0,0 +1,32 @@ +# BillCreditNotes + +## Example Usage + +```typescript +import { BillCreditNotes } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: BillCreditNotes = { + results: [], + pageNumber: 1, + pageSize: 10, + totalResults: 1, + links: { + self: { + href: "/companies/{id}/data/{dataType}", + }, + current: { + href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `results` | [shared.BillCreditNote](../../../sdk/models/shared/billcreditnote.md)[] | :heavy_minus_sign: | N/A | | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotestatus.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotestatus.md new file mode 100644 index 000000000..c25202175 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billcreditnotestatus.md @@ -0,0 +1,17 @@ +# BillCreditNoteStatus + +Current state of the bill credit note + +## Example Usage + +```typescript +import { BillCreditNoteStatus } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: BillCreditNoteStatus = "Paid"; +``` + +## Values + +```typescript +"Unknown" | "Draft" | "Submitted" | "Paid" | "Void" | "PartiallyPaid" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billedtotype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billedtotype.md new file mode 100644 index 000000000..67771ed0f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billedtotype.md @@ -0,0 +1,17 @@ +# BilledToType + +Defines if the invoice or credit note is billed/rebilled to a project or customer. + +## Example Usage + +```typescript +import { BilledToType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: BilledToType = "NotApplicable"; +``` + +## Values + +```typescript +"Unknown" | "NotApplicable" | "Customer" | "Project" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billeventpayload.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billeventpayload.md deleted file mode 100644 index 9c10cca8b..000000000 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billeventpayload.md +++ /dev/null @@ -1,11 +0,0 @@ -# BillEventPayload - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | -| `bill` | [shared.Bill](../../../sdk/models/shared/bill.md) | :heavy_minus_sign: | Bills are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. | | -| `companyId` | *string* | :heavy_minus_sign: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `connectionId` | *string* | :heavy_minus_sign: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | -| `pushOperationKey` | *string* | :heavy_minus_sign: | Unique identifier for the push operation. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billeventwebhook.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billeventwebhook.md deleted file mode 100644 index 1ad4d7d75..000000000 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billeventwebhook.md +++ /dev/null @@ -1,11 +0,0 @@ -# BillEventWebhook - - -## Fields - -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `createdDate` | *string* | :heavy_minus_sign: | The datetime in UTC of when the webhook event was produced by Codat. | 2022-10-23 11:03:35 +0000 UTC | -| `id` | *string* | :heavy_minus_sign: | Unique identifier of the bill event. | | -| `payload` | [shared.BillEventPayload](../../../sdk/models/shared/billeventpayload.md) | :heavy_minus_sign: | N/A | | -| `type` | *string* | :heavy_minus_sign: | Type of webhook event. | payables.bill.created | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billlineitem.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billlineitem.md index 18a3bb350..949cea0e5 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billlineitem.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billlineitem.md @@ -1,14 +1,35 @@ # BillLineItem +## Example Usage + +```typescript +import { BillLineItem } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: BillLineItem = { + unitAmount: new Decimal("8221.18"), + quantity: new Decimal("2978.42"), +}; +``` ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| `accountRef` | [shared.AccountReference](../../../sdk/models/shared/accountreference.md) | :heavy_minus_sign: | Reference to the account to which the line item is linked. | -| `description` | *string* | :heavy_minus_sign: | Friendly name of the goods or services received. | -| `quantity` | *number* | :heavy_check_mark: | Number of units of goods or services received. | -| `taxAmount` | *number* | :heavy_minus_sign: | Amount of tax applied to the line item. | -| `taxRateRef` | [shared.TaxRateReference](../../../sdk/models/shared/taxratereference.md) | :heavy_minus_sign: | Reference to the tax rate to which the line item is linked. | -| `totalAmount` | *number* | :heavy_minus_sign: | Total amount of the line, including tax. | -| `unitAmount` | *number* | :heavy_minus_sign: | Unit price of the goods or service. | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `lineNumber` | *string* | :heavy_minus_sign: | The bill line's number. | +| `description` | *string* | :heavy_minus_sign: | Friendly name of the goods or services received. | +| `unitAmount` | *Decimal* | :heavy_check_mark: | Price of each unit of goods or services. | +| `quantity` | *Decimal* | :heavy_check_mark: | Number of units of goods or services received. | +| `unitOfMeasurement` | *string* | :heavy_minus_sign: | The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). | +| `discountAmount` | *Decimal* | :heavy_minus_sign: | Numerical value of any discounts applied.

Do not use to apply discounts in Oracle NetSuite—see Oracle NetSuite integration reference. | +| `subTotal` | *Decimal* | :heavy_minus_sign: | Amount of the line, inclusive of discounts but exclusive of tax. | +| `taxAmount` | *Decimal* | :heavy_minus_sign: | Amount of tax for the line. | +| `totalAmount` | *Decimal* | :heavy_minus_sign: | Total amount of the line, including tax. | +| `discountPercentage` | *Decimal* | :heavy_minus_sign: | Percentage rate of any discount applied to the bill. | +| `accountRef` | [shared.AccountRef](../../../sdk/models/shared/accountref.md) | :heavy_minus_sign: | 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. | +| `taxRateRef` | [shared.TaxRateRef](../../../sdk/models/shared/taxrateref.md) | :heavy_minus_sign: | Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate.

Found on:

- Bill line items
- Bill Credit Note line items
- Credit Note line items
- Direct incomes line items
- Invoice line items
- Items | +| `itemRef` | [shared.ItemRef](../../../sdk/models/shared/itemref.md) | :heavy_minus_sign: | Reference to the item the line is linked to. | +| `purchaseOrderLineRef` | [shared.RecordLineReference](../../../sdk/models/shared/recordlinereference.md) | :heavy_minus_sign: | N/A | +| `trackingCategoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_minus_sign: | Collection of categories against which this item is tracked. | +| `tracking` | [shared.Tracking](../../../sdk/models/shared/tracking.md) | :heavy_minus_sign: | Categories, and a project and customer, against which the item is tracked. | +| `isDirectCost` | *boolean* | :heavy_minus_sign: | The bill is a direct cost if `True`. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billlineitemdatatype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billlineitemdatatype.md new file mode 100644 index 000000000..b719a344d --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billlineitemdatatype.md @@ -0,0 +1,17 @@ +# BillLineItemDataType + +Allowed name of the 'dataType'. + +## Example Usage + +```typescript +import { BillLineItemDataType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: BillLineItemDataType = "purchaseOrders"; +``` + +## Values + +```typescript +"purchaseOrders" | "bills" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpayment.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpayment.md new file mode 100644 index 000000000..003368556 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpayment.md @@ -0,0 +1,212 @@ +# BillPayment + +> **Bill payments or payments?** +> +> We distinguish between transactions where the company received money vs. paid money. If the transaction represents a company spending money (accounts payable) we call this a Bill payment. +> +> See [payments](https://docs.codat.io/sync-for-payables-api#/schemas/Payment) for the accounts receivable equivalent of Bill payments, which covers [invoices](https://docs.codat.io/sync-for-payables-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/CreditNote). + +> View the coverage for bill payments in the Data coverage explorer. + +## Overview + +Bill payments include all accounts payable transaction data ([bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) and [credit notes against bills](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote)). + +A bill payment in Codat usually represents an allocation of money within any customer accounts payable account. This includes, but is not strictly limited to: + +- A payment made against a bill — for example, a credit card payment, cheque payment, or cash payment. +- An allocation of a supplier's credit note to a bill or perhaps a refund. +- A bill payment made directly to an accounts payable account. This could be an overpayment or a prepayment, or a refund of a payment made directly to an accounts payable account. + +Depending on the bill payments which are allowed by the underlying accounting software, some of these types may be combined. Please see the example data section for samples of what these cases look like. + +In Codat, a bill payment contains details of: + +- When the bill payment was recorded in the accounting system. +- How much it is for and in the currency. +- Who the payment has been paid to, the _supplier_. +- The types of bill payments, the _line items_. + +Some accounting software give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's _expenses_. You can find these types of transactions in our [Direct costs](https://docs.codat.io/sync-for-payables-api#/schemas/DirectCost) data model. + +Bill payments is a child data type of [account transactions](https://docs.codat.io/sync-for-payables-api#/schemas/AccountTransaction). + +--- + +## Bill payment types + +### Payment of a bill + +A payment paying a single bill should have the following properties: + +- A `totalAmount` indicating the amount of the bill that was paid. This is always positive. +- A `lines` array containing one element with the following properties: + - An `amount` equal to the `totalAmount` above. + - A `links` array containing one element with the following properties: + - A `type` indicating the type of link, in this case a `Bill`. + - An `id` containing the ID of the bill that was paid. + - An amount of `-totalAmount` (negative `totalAmount`), indicating that the entirety of the paid amount is allocated to the bill. + +### Payment of multiple bills + +It is possible for one payment to pay multiple bills. This can be represented using two possible formats, depending on how the supplier keeps their books: + +1. The payment has multiple entries in its **lines** array, one for each bill that is paid. Each line will follow the above example for paying a bill, and the rules detailed in the data model. +2. The payment has a line with multiple links to each bill. This occurs when the proportion of the original payment allocated to each bill is not available. + +Each line is the same as those described above, with the **amount** indicating how much of the payment is allocated to the bill. The **amount** on the lines sum to the **totalAmount** on the payment. + +> Pushing batch payments to Xero +> +> When pushing a single bill payment to Xero to pay multiple bills, only the first format is supported—multiple entries in the payment **lines** array. + +### Payments and refunds on account + +A payment on account, that is a payment that doesn’t pay a specific bill, has one entry in its lines array. + +The line has the following properties: + +- A **totalAmount** indicating the amount paid by a supplier or refunded to them by a company. A payment to the supplier is always negative. A refund is always positive. +- A **links** array containing one element with the following properties: + - A **type** indicating the type of link. For a payment this is `PaymentOnAccount`. For a refund this is `Refund`. + - The **id** containing the ID of the supplier. + - An amount for the link is `0` **totalAmount** or the amount of the payment or refund. + +It is possible to have a payment that is part on account and part allocated to a bill. Each line should follow the examples above. + +### Using a credit note to pay a bill + +The payment of a bill using a credit note has one entry in its `lines` array. This **line** has the following properties: + +- An **amount** indicating the amount of money moved, which in this case is `0`, as the credit note and bill allocation must balance each other. +- A **links** array containing two elements: + - The first link has: + - A **type** indicating the type of link, in this case a `Bill`. + - An **id** containing the ID of the bill that was paid. + - The second link has: + - A **type** indicating the type of link, in this case a `CreditNote`. + - An **id** containing the ID of the credit note used by this payment. + +The **amount** field on the **line** equals the **totalAmount** on the payment. + +### Refunding a credit note + +A bill payment refunding a credit note has one entry in its **lines** array. This line has the following properties: + +- An **amount** indicating the amount of the credit note that was refunded. This is always negative, indicating that it is a refund. +- A **links** array containing one element with the following properties: + - A **type** indicating the type of `link`, in this case a `CreditNote`. + - An **id** containing the ID of the credit note that was refunded. + +The **totalAmount** field on the payment equals the line's **amount** field. These are both negative, as this is money leaving accounts payable. + +### Refunding a payment + +If a payment is refunded, for example, when a company overpaid a bill and the overpayment is returned, there are two payment records: + +- One for the incoming overpayment. +- Another for the outgoing refund. + +The payment issuing the refund is identified by the fact that the **totalAmount** is negative. This payment has one entry in its lines array that have the following properties: + +- An **amount** indicating the amount that was refunded. This is always negative. +- A **links** array containing one element with the following properties: + - A **type** indicating the type of a the link, in this case a `BillPayment`. + - An **id** containing the ID of the payment that was refunded. + +The **amount** field on the line equals the **totalAmount** on the payment and is negative as this is money leaving accounts payable. + +The payment that was refunded can be identified as it has a line where the `amount` on its `line` is positive and the type of the link is `Refund`. This payment may have several entries in its **lines** array if it was partly used to pay an bill. For example, a £1,050 payment paying a £1,000 bill with a refund of £50 has two lines: + +- One for £1,000 linked to the bill that was paid +- Another for £50 linked to the payment that refunded the over payment. This link is of type `Refund` but the ID corresponds to a bill payment. + +The line linked to the bill payment has the following properties: + +- An **amount** indicating the amount that was refunded. This is positive as its money that was added to accounts payable, but is balanced out by the negative amount of the refund. +- A **links** array containing one element with the following properties: + - A **type** indicating the type of the link, in this case a `Refund`. + - An **id** containing the ID of the payment that refunded this line. + +> Linked payments +> +> Not all accounting software support linked payments in this way. In these platforms you may see a payment on account and a refund on account. + +## Foreign currencies + +There are two types of currency rate that are detailed in the bill payments data type: + +Payment currency rate: + +- Base currency of the accounts payable account. +- Foreign currency of the bill payment. + +Payment line link currency rate: + +- Base currency of the item that the link represents. +- Foreign currency of the payment. + +These two rates allow the calculation of currency loss or gain for any of the transactions affected by the payment lines. The second rate is used when a bill payment is applied to an item in a currency that does not match either: + +- The base currency for the accounts payable account. +- The currency of the item. + + +## Example Usage + +```typescript +import { BillPayment } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: BillPayment = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "3d5a8e00-d108-4045-8823-7f342676cffa", + totalAmount: new Decimal("0"), + currency: "EUR", + date: "2022-10-23T00:00:00Z", + note: "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + lines: [ + { + amount: new Decimal("0"), + links: [ + { + type: "Bill", + id: "x", + amount: new Decimal("-1000"), + }, + { + type: "CreditNote", + id: "y", + amount: new Decimal("1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], +}; +``` + +## Fields + +| 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 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the bill payment, unique for the company in the accounting software. | 3d5a8e00-d108-4045-8823-7f342676cffa | +| `supplierRef` | [shared.SupplierRef](../../../sdk/models/shared/supplierref.md) | :heavy_minus_sign: | N/A | | +| `accountRef` | [shared.AccountRef](../../../sdk/models/shared/accountref.md) | :heavy_minus_sign: | 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. | | +| `totalAmount` | *Decimal* | :heavy_minus_sign: | Amount of the payment in the payment currency. This value never changes and represents the amount of money that is paid into the supplier's account. | 1329.54 | +| `currency` | *string* | :heavy_minus_sign: | N/A | 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. \| | | +| `date` | *string* | :heavy_check_mark: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `note` | *string* | :heavy_minus_sign: | Additional information associated with the payment. | Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44 | +| `paymentMethodRef` | [shared.PaymentMethodRef](../../../sdk/models/shared/paymentmethodref.md) | :heavy_minus_sign: | N/A | {
"id": "EILBDVJVNUAGVKRQ",
"name": "AliPay"
} | +| `lines` | [shared.BillPaymentLine](../../../sdk/models/shared/billpaymentline.md)[] | :heavy_minus_sign: | An array of bill payment lines. | | +| `reference` | *string* | :heavy_minus_sign: | Additional information associated with the payment. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpaymentline.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpaymentline.md new file mode 100644 index 000000000..3a6a6f01c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpaymentline.md @@ -0,0 +1,21 @@ +# BillPaymentLine + +## Example Usage + +```typescript +import { BillPaymentLine } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: BillPaymentLine = { + amount: new Decimal("8404.29"), + allocatedOnDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `amount` | *Decimal* | :heavy_check_mark: | Amount in the bill payment currency. | | +| `links` | [shared.BillPaymentLineLink](../../../sdk/models/shared/billpaymentlinelink.md)[] | :heavy_minus_sign: | N/A | | +| `allocatedOnDate` | *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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpaymentlinelink.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpaymentlinelink.md new file mode 100644 index 000000000..6238eb5bc --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpaymentlinelink.md @@ -0,0 +1,20 @@ +# BillPaymentLineLink + +## Example Usage + +```typescript +import { BillPaymentLineLink } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: BillPaymentLineLink = { + type: "Unlinked", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | [shared.BillPaymentLineLinkType](../../../sdk/models/shared/billpaymentlinelinktype.md) | :heavy_check_mark: | Types of links to bill payment lines. | +| `id` | *string* | :heavy_minus_sign: | Unique identifier of the transaction represented by the link. | +| `amount` | *Decimal* | :heavy_minus_sign: | Amount by which the balance of the linked entity is altered, in the currency of the linked entity.

- A negative link amount reduces the outstanding amount on the accounts payable account.
- A positive link amount increases the outstanding amount on the accounts payable account. | +| `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. \| | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpaymentlinelinktype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpaymentlinelinktype.md new file mode 100644 index 000000000..83f35a8d4 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpaymentlinelinktype.md @@ -0,0 +1,17 @@ +# BillPaymentLineLinkType + +Types of links to bill payment lines. + +## Example Usage + +```typescript +import { BillPaymentLineLinkType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: BillPaymentLineLinkType = "Unlinked"; +``` + +## Values + +```typescript +"Unknown" | "Unlinked" | "Bill" | "Other" | "CreditNote" | "BillPayment" | "PaymentOnAccount" | "Refund" | "ManualJournal" | "Discount" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpayments.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpayments.md new file mode 100644 index 000000000..27baaa8e3 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billpayments.md @@ -0,0 +1,510 @@ +# BillPayments + +## Example Usage + +```typescript +import { BillPayments } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: BillPayments = { + results: [ + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "3d5a8e00-d108-4045-8823-7f342676cffa", + totalAmount: new Decimal("1000"), + currency: "USD", + date: "2022-10-23T00:00:00Z", + note: "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + lines: [ + { + amount: new Decimal("1000"), + links: [ + { + type: "Bill", + id: "x", + amount: new Decimal("-1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], + }, + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "3d5a8e00-d108-4045-8823-7f342676cffa", + totalAmount: new Decimal("0"), + currency: "USD", + date: "2022-10-23T00:00:00Z", + note: "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + lines: [ + { + amount: new Decimal("0"), + links: [ + { + type: "Bill", + id: "x", + amount: new Decimal("-1000"), + }, + { + type: "CreditNote", + id: "y", + amount: new Decimal("1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], + }, + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "3d5a8e00-d108-4045-8823-7f342676cffa", + totalAmount: new Decimal("2000"), + currency: "USD", + date: "2022-10-23T00:00:00Z", + note: "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + lines: [ + { + amount: new Decimal("1000"), + links: [ + { + type: "Bill", + id: "x", + amount: new Decimal("-1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + { + amount: new Decimal("1000"), + links: [ + { + type: "PaymentOnAccount", + id: "y", + amount: new Decimal("-1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], + }, + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "3d5a8e00-d108-4045-8823-7f342676cffa", + totalAmount: new Decimal("-1000"), + currency: "GBP", + date: "2022-10-23T00:00:00Z", + note: "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + lines: [ + { + amount: new Decimal("-1000"), + links: [ + { + type: "CreditNote", + id: "y", + amount: new Decimal("1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], + }, + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "3d5a8e00-d108-4045-8823-7f342676cffa", + totalAmount: new Decimal("-1000"), + currency: "GBP", + date: "2022-10-23T00:00:00Z", + note: "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + lines: [ + { + amount: new Decimal("-1000"), + links: [ + { + type: "PaymentOnAccount", + id: "y", + amount: new Decimal("1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], + }, + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "3d5a8e00-d108-4045-8823-7f342676cffa", + totalAmount: new Decimal("250"), + currency: "USD", + date: "2022-10-23T00:00:00Z", + note: "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + lines: [ + { + amount: new Decimal("0"), + links: [ + { + type: "Bill", + id: "x", + amount: new Decimal("-750"), + }, + { + type: "CreditNote", + id: "y", + amount: new Decimal("750"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + { + amount: new Decimal("250"), + links: [ + { + type: "Bill", + id: "x", + amount: new Decimal("-250"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], + }, + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "3d5a8e00-d108-4045-8823-7f342676cffa", + totalAmount: new Decimal("1000"), + currency: "EUR", + date: "2022-10-23T00:00:00Z", + note: "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + lines: [ + { + amount: new Decimal("1000"), + links: [ + { + type: "Bill", + id: "x", + amount: new Decimal("-1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], + }, + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "3d5a8e00-d108-4045-8823-7f342676cffa", + totalAmount: new Decimal("2000"), + currency: "GBP", + date: "2022-10-23T00:00:00Z", + note: "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + lines: [ + { + amount: new Decimal("0"), + links: [ + { + type: "Bill", + id: "x", + amount: new Decimal("-1000"), + }, + { + type: "CreditNote", + id: "y", + amount: new Decimal("1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + { + amount: new Decimal("0"), + links: [ + { + type: "Bill", + id: "x", + amount: new Decimal("-1000"), + }, + { + type: "CreditNote", + id: "z", + amount: new Decimal("1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + { + amount: new Decimal("1000"), + links: [ + { + type: "Bill", + id: "x", + amount: new Decimal("-1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + { + amount: new Decimal("1000"), + links: [ + { + type: "PaymentOnAccount", + id: "customer-001", + amount: new Decimal("-1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], + }, + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "3d5a8e00-d108-4045-8823-7f342676cffa", + totalAmount: new Decimal("0"), + currency: "EUR", + date: "2022-10-23T00:00:00Z", + note: "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + lines: [ + { + amount: new Decimal("0"), + links: [ + { + type: "Bill", + id: "w", + amount: new Decimal("-1000"), + }, + { + type: "Bill", + id: "x", + amount: new Decimal("-1000"), + }, + { + type: "CreditNote", + id: "y", + amount: new Decimal("1000"), + }, + { + type: "CreditNote", + id: "z", + amount: new Decimal("1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], + }, + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "3d5a8e00-d108-4045-8823-7f342676cffa", + totalAmount: new Decimal("1000"), + currency: "GBP", + date: "2022-10-23T00:00:00Z", + note: "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + lines: [ + { + amount: new Decimal("1000"), + links: [ + { + type: "Bill", + id: "x", + amount: new Decimal("-1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], + }, + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "001", + totalAmount: new Decimal("5000"), + currency: "GBP", + date: "1901-01-01", + note: "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + lines: [ + { + amount: new Decimal("1000"), + links: [ + { + type: "Bill", + id: "x", + amount: new Decimal("-1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + { + amount: new Decimal("4000"), + links: [ + { + type: "PaymentOnAccount", + id: "y", + amount: new Decimal("-4000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], + }, + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "001", + totalAmount: new Decimal("5000"), + currency: "USD", + date: "1901-01-01", + note: "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + lines: [ + { + amount: new Decimal("1000"), + links: [ + { + type: "Bill", + id: "x", + amount: new Decimal("-1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + { + amount: new Decimal("1000"), + links: [ + { + type: "Bill", + id: "y", + amount: new Decimal("-1000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + { + amount: new Decimal("3000"), + links: [ + { + type: "PaymentOnAccount", + id: "y", + amount: new Decimal("-3000"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], + }, + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "3d5a8e00-d108-4045-8823-7f342676cffa", + totalAmount: new Decimal("500"), + currency: "GBP", + date: "2022-10-23T00:00:00Z", + note: "Bill Payment against bill c13e37b6-dfaa-4894-b3be-9fe97bda9f44", + paymentMethodRef: { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", + }, + lines: [ + { + amount: new Decimal("500"), + links: [ + { + type: "Bill", + id: "a", + amount: new Decimal("-1000"), + }, + { + type: "Bill", + id: "b", + amount: new Decimal("-1000"), + }, + { + type: "CreditNote", + id: "y", + amount: new Decimal("750"), + }, + { + type: "CreditNote", + id: "z", + amount: new Decimal("750"), + }, + ], + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + ], + }, + ], + pageNumber: 1, + pageSize: 10, + totalResults: 1, + links: { + self: { + href: "/companies/{id}/data/{dataType}", + }, + current: { + href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `results` | [shared.BillPayment](../../../sdk/models/shared/billpayment.md)[] | :heavy_minus_sign: | N/A | | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bills.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bills.md index e4c219539..0edc75bfc 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bills.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/bills.md @@ -1,12 +1,32 @@ # Bills +## Example Usage + +```typescript +import { Bills } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Bills = { + results: [], + pageNumber: 1, + pageSize: 10, + totalResults: 1, + links: { + self: { + href: "/companies/{id}/data/{dataType}", + }, + current: { + href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", + }, + }, +}; +``` ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `results` | [shared.Bill](../../../sdk/models/shared/bill.md)[] | :heavy_minus_sign: | N/A | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `results` | [shared.Bill](../../../sdk/models/shared/bill.md)[] | :heavy_minus_sign: | N/A | | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billstatus.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billstatus.md index 6b630d7ae..415d8ed29 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billstatus.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/billstatus.md @@ -2,14 +2,16 @@ Current state of the bill. +## Example Usage + +```typescript +import { BillStatus } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: BillStatus = "Unknown"; +``` ## Values -| Name | Value | -| --------------- | --------------- | -| `Unknown` | Unknown | -| `Open` | Open | -| `PartiallyPaid` | PartiallyPaid | -| `Paid` | Paid | -| `Void` | Void | -| `Draft` | Draft | \ No newline at end of file +```typescript +"Unknown" | "Open" | "PartiallyPaid" | "Paid" | "Void" | "Draft" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitreachedwebhook.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitreachedwebhook.md index ea7c8d1d7..a75af2c77 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitreachedwebhook.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitreachedwebhook.md @@ -2,15 +2,34 @@ Webhook request body for a client that has reached their rate limit. +## Example Usage + +```typescript +import { ClientRateLimitReachedWebhook } from "@codat/sync-for-payables-version-1/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 | -| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | -| `alertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | -| `clientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | -| `clientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | -| `data` | [shared.ClientRateLimitReachedWebhookData](../../../sdk/models/shared/clientratelimitreachedwebhookdata.md) | :heavy_minus_sign: | N/A | -| `message` | *string* | :heavy_minus_sign: | A human readable message about the webhook. | -| `ruleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | -| `ruleType` | *string* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file +| 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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitreachedwebhookdata.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitreachedwebhookdata.md index 8cf946c1e..301df3809 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitreachedwebhookdata.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitreachedwebhookdata.md @@ -1,5 +1,14 @@ # ClientRateLimitReachedWebhookData +## Example Usage + +```typescript +import { ClientRateLimitReachedWebhookData } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: ClientRateLimitReachedWebhookData = { + expiresUtc: "2022-10-23T00:00:00Z", +}; +``` ## Fields diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitresetwebhook.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitresetwebhook.md index fe4fd5dc6..f2e9ebc69 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitresetwebhook.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitresetwebhook.md @@ -2,15 +2,36 @@ Webhook request body for a client that has had their rate limit reset. +## Example Usage + +```typescript +import { ClientRateLimitResetWebhook } from "@codat/sync-for-payables-version-1/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 | -| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | -| `alertId` | *string* | :heavy_minus_sign: | Unique identifier of the webhook event. | -| `clientId` | *string* | :heavy_minus_sign: | Unique identifier for your client in Codat. | -| `clientName` | *string* | :heavy_minus_sign: | Name of your client in Codat. | -| `data` | [shared.ClientRateLimitResetWebhookData](../../../sdk/models/shared/clientratelimitresetwebhookdata.md) | :heavy_minus_sign: | N/A | -| `message` | *string* | :heavy_minus_sign: | A human readable message about the webhook. | -| `ruleId` | *string* | :heavy_minus_sign: | Unique identifier for the rule. | -| `ruleType` | *string* | :heavy_minus_sign: | The type of rule. | \ No newline at end of file +| 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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitresetwebhookdata.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitresetwebhookdata.md index 2d3cc1aa8..e70da131b 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitresetwebhookdata.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitresetwebhookdata.md @@ -1,11 +1,20 @@ # ClientRateLimitResetWebhookData +## Example Usage + +```typescript +import { ClientRateLimitResetWebhookData } from "@codat/sync-for-payables-version-1/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 | -| `quotaRemaining` | *number* | :heavy_minus_sign: | Total number of request remaining for your client. | | -| `resetReason` | *string* | :heavy_minus_sign: | The reason for your rate limit quota being reset. | | \ No newline at end of file +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcompanyresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitwebhook.md similarity index 75% rename from previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcompanyresponse.md rename to previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitwebhook.md index d56a7ca86..4844a28a8 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/getcompanyresponse.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitwebhook.md @@ -1,12 +1,27 @@ -# GetCompanyResponse +# ClientRateLimitWebhook +## Example Usage + +```typescript +import { ClientRateLimitWebhook } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: ClientRateLimitWebhook = { + id: "743ec94a-8aa4-44bb-8bd4-e1855ee0e74b", + eventType: "client.rateLimit.reached", + generatedDate: "2024-09-01T00:00:00Z", + payload: { + dailyQuota: 12000, + quotaRemaining: 0, + expiryDate: "2024-09-01T12:14:14Z", + }, +}; +``` ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company` | [shared.Company](../../../sdk/models/shared/company.md) | :heavy_minus_sign: | OK | {"id":"0498e921-9b53-4396-a412-4f2f5983b0a2","name":"string","platform":"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","dataConnections":[{"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"}],"groups":[{"id":"d7a6c4b4-dc87-45f6-b803-62f466398680"}]} | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | -| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | | -| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| 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 | +| `payload` | [shared.ClientRateLimitWebhookPayload](../../../sdk/models/shared/clientratelimitwebhookpayload.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createconnectionresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitwebhookpayload.md similarity index 62% rename from previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createconnectionresponse.md rename to previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitwebhookpayload.md index 878e9f0dc..f69428f06 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createconnectionresponse.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/clientratelimitwebhookpayload.md @@ -1,12 +1,19 @@ -# CreateConnectionResponse +# ClientRateLimitWebhookPayload +## Example Usage + +```typescript +import { ClientRateLimitWebhookPayload } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: ClientRateLimitWebhookPayload = { + expiryDate: "2022-10-23T00:00:00Z", +}; +``` ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `connection` | [shared.Connection](../../../sdk/models/shared/connection.md) | :heavy_minus_sign: | OK | {"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"} | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | Your API request was not properly authorized. | | -| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | | -| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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 diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/codatfile.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/codatfile.md new file mode 100644 index 000000000..56e8f2583 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/codatfile.md @@ -0,0 +1,16 @@ +# CodatFile + +## Example Usage + +```typescript +import { CodatFile } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +// No examples available for this model +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `fileName` | *string* | :heavy_check_mark: | N/A | +| `content` | *ReadableStream* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/companies.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/companies.md index ba6760b30..318fc8436 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/companies.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/companies.md @@ -1,12 +1,65 @@ # Companies +## Example Usage + +```typescript +import { Companies } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Companies = { + results: [ + { + id: "0498e921-9b53-4396-a412-4f2f5983b0a2", + name: "string", + description: "Requested early access to the new financing scheme.", + 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: {}, + 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", + dataConnectionErrors: [ + { + erroredOnUtc: "2022-10-23T00:00:00Z", + resolvedOnUtc: "2022-10-23T00:00:00Z", + }, + ], + }, + ], + }, + ], + pageNumber: 1, + pageSize: 10, + totalResults: 1, + links: { + self: { + href: "/companies/{id}/data/{dataType}", + }, + current: { + href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", + }, + }, +}; +``` ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `results` | [shared.Company](../../../sdk/models/shared/company.md)[] | :heavy_minus_sign: | N/A | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `results` | [shared.Company](../../../sdk/models/shared/company.md)[] | :heavy_minus_sign: | N/A | | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/company.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/company.md index 68e17fb40..fc0b7851a 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/company.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/company.md @@ -6,18 +6,55 @@ Typically each company is one of your customers. When 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. +## Example Usage + +```typescript +import { Company } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Company = { + id: "0498e921-9b53-4396-a412-4f2f5983b0a2", + name: "string", + description: "Requested early access to the new financing scheme.", + 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: {}, + 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", + dataConnectionErrors: [ + { + erroredOnUtc: "2022-10-23T00:00:00Z", + resolvedOnUtc: "2022-10-23T00:00:00Z", + }, + ], + }, + ], +}; +``` ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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 | -| `createdByUserName` | *string* | :heavy_minus_sign: | Name of user that created the company in Codat. | | -| `dataConnections` | [shared.Connection](../../../sdk/models/shared/connection.md)[] | :heavy_minus_sign: | N/A | | -| `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. | -| `groups` | [shared.GroupReference](../../../sdk/models/shared/groupreference.md)[] | :heavy_minus_sign: | An array of groups the company has been assigned to. | | | `id` | *string* | :heavy_check_mark: | Unique identifier for your SMB in Codat. | 8a210b68-6988-11ed-a1eb-0242ac120002 | -| `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 | | `name` | *string* | :heavy_check_mark: | The name of the company | Codat Ltd. | -| ~~`platform`~~ | *string* | :heavy_minus_sign: | : warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible.

`platformKeys` name used when creating the company. | Xero | -| `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 | \ No newline at end of file +| `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 | +| `createdByUserName` | *string* | :heavy_minus_sign: | Name of user that created the company in Codat. | | +| `tags` | [shared.Tags](../../../sdk/models/shared/tags.md) | :heavy_minus_sign: | A collection of user-defined key-value pairs that store custom metadata against the company. | | +| `dataConnections` | [shared.Connection](../../../sdk/models/shared/connection.md)[] | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/companyinfo.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/companyinfo.md new file mode 100644 index 000000000..cd6dfbefc --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/companyinfo.md @@ -0,0 +1,82 @@ +# CompanyInfo + +> View the coverage for company profile in the Data coverage explorer. + +Company info provides standard details about a linked company such as their address, phone number, and company registration. + +> **Company information or companies?** +> +> Company profile 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. + +## Example Usage + +```typescript +import { CompanyInfo } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: CompanyInfo = { + 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", + }, + { + 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", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `companyName` | *string* | :heavy_minus_sign: | Name of the linked company. | | +| `accountingPlatformRef` | *string* | :heavy_minus_sign: | Identifier or reference for the company in the accounting software. | | +| `companyLegalName` | *string* | :heavy_minus_sign: | Registered legal name of the linked company. | | +| `addresses` | [shared.Address](../../../sdk/models/shared/address.md)[] | :heavy_minus_sign: | An array of Addresses. | | +| `phoneNumbers` | [shared.PhoneNumber](../../../sdk/models/shared/phonenumber.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 | +| `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 | +| `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 | +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/companyrequestbody.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/companyrequestbody.md index 379b08c01..515dff90a 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/companyrequestbody.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/companyrequestbody.md @@ -1,10 +1,25 @@ # CompanyRequestBody +## Example Usage + +```typescript +import { CompanyRequestBody } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: CompanyRequestBody = { + name: "Bank of Dave", + description: "Requested early access to the new financing scheme.", + groups: [ + { + id: "60d2fa12-8a04-11ee-b9d1-0242ac120002", + }, + ], +}; +``` ## Fields | Field | Type | Required | Description | Example | | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_check_mark: | 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. | -| `groups` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | Reference to the groups that the company is assigned to. | | -| `name` | *string* | :heavy_check_mark: | Name of company being connected. | Bank of Dave | \ No newline at end of file +| `groups` | [shared.GroupReference](../../../sdk/models/shared/groupreference.md)[] | :heavy_minus_sign: | Reference to the groups that the company is assigned to. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/connection.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/connection.md index 62d78bdeb..cb4415b8a 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/connection.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/connection.md @@ -11,21 +11,46 @@ Any combination of accounting, banking, and commerce data connections is allowed Before 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). +## Example Usage + +```typescript +import { Connection } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Connection = { + 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", + dataConnectionErrors: [ + { + erroredOnUtc: "2022-10-23T00:00:00Z", + resolvedOnUtc: "2022-10-23T00:00:00Z", + }, + ], +}; +``` ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `additionalProperties` | *any* | :heavy_minus_sign: | N/A | | -| `connectionInfo` | Record | :heavy_minus_sign: | N/A | | -| `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 | -| `dataConnectionErrors` | [shared.DataConnectionError](../../../sdk/models/shared/dataconnectionerror.md)[] | :heavy_minus_sign: | N/A | | | `id` | *string* | :heavy_check_mark: | Unique identifier for a company's data connection. | 2e9d2c44-f675-40ba-8049-353bfcb5e171 | | `integrationId` | *string* | :heavy_check_mark: | A Codat ID representing the integration. | fd321cb6-7963-4506-b873-e99593a45e30 | | `integrationKey` | *string* | :heavy_check_mark: | 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. | | -| `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 | -| `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 | -| `platformName` | *string* | :heavy_check_mark: | Name of integration connected to company. | | | `sourceId` | *string* | :heavy_check_mark: | 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`. | 35b92968-9851-4095-ad60-395c95cbcba4 | | `sourceType` | [shared.SourceType](../../../sdk/models/shared/sourcetype.md) | :heavy_check_mark: | The type of platform of the connection. | Accounting | -| `status` | [shared.DataConnectionStatus](../../../sdk/models/shared/dataconnectionstatus.md) | :heavy_check_mark: | The current authorization status of the data connection. | | \ No newline at end of file +| `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 | +| `dataConnectionErrors` | [shared.DataConnectionError](../../../sdk/models/shared/dataconnectionerror.md)[] | :heavy_minus_sign: | N/A | | +| `connectionInfo` | Record | :heavy_minus_sign: | N/A | | +| `additionalProperties` | *any* | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/connections.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/connections.md index 21f6d795a..2d99dd5ac 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/connections.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/connections.md @@ -1,12 +1,52 @@ # Connections +## Example Usage + +```typescript +import { Connections } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Connections = { + results: [ + { + 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", + dataConnectionErrors: [ + { + erroredOnUtc: "2022-10-23T00:00:00Z", + resolvedOnUtc: "2022-10-23T00:00:00Z", + }, + ], + }, + ], + pageNumber: 1, + pageSize: 10, + totalResults: 1, + links: { + self: { + href: "/companies/{id}/data/{dataType}", + }, + current: { + href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", + }, + }, +}; +``` ## Fields -| Field | Type | Required | Description | Example | -| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {"self":{"href":"/companies/{id}/data/{dataType}"},"current":{"href":"/companies/{id}/data/{dataType}?page=1&pageSize=10"}} | -| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | -| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | -| `results` | [shared.Connection](../../../sdk/models/shared/connection.md)[] | :heavy_minus_sign: | N/A | | -| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `results` | [shared.Connection](../../../sdk/models/shared/connection.md)[] | :heavy_minus_sign: | N/A | | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/contactreference.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/contactreference.md new file mode 100644 index 000000000..72f35a23e --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/contactreference.md @@ -0,0 +1,18 @@ +# ContactReference + +## Example Usage + +```typescript +import { ContactReference } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: ContactReference = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique identifier for a customer or supplier. | +| `dataType` | [shared.JournalLineDataType](../../../sdk/models/shared/journallinedatatype.md) | :heavy_minus_sign: | Allowed name of the 'dataType'. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createaccountresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createaccountresponse.md new file mode 100644 index 000000000..e77cd343d --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createaccountresponse.md @@ -0,0 +1,44 @@ +# CreateAccountResponse + +## Example Usage + +```typescript +import { CreateAccountResponse } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: CreateAccountResponse = { + changes: [ + { + recordRef: { + dataType: "invoices", + }, + }, + ], + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "a2fa9467-7392-451a-a52c-3f5ad019da1f", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "TimedOut", + statusCode: 55714, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [shared.AccountingAccount](../../../sdk/models/shared/accountingaccount.md) | :heavy_minus_sign: | N/A | | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `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 | +| `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. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createaccountresponsevaliddatatypelinks.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createaccountresponsevaliddatatypelinks.md new file mode 100644 index 000000000..a35849080 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createaccountresponsevaliddatatypelinks.md @@ -0,0 +1,57 @@ +# CreateAccountResponseValidDataTypeLinks + +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. + +## Example Usage + +```typescript +import { CreateAccountResponseValidDataTypeLinks } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: CreateAccountResponseValidDataTypeLinks = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `property` | *string* | :heavy_minus_sign: | The property from the account that can be linked. | +| `links` | *string*[] | :heavy_minus_sign: | Supported `dataTypes` that the record can be linked to. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillcreditnoteresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillcreditnoteresponse.md new file mode 100644 index 000000000..48170996a --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillcreditnoteresponse.md @@ -0,0 +1,44 @@ +# CreateBillCreditNoteResponse + +## Example Usage + +```typescript +import { CreateBillCreditNoteResponse } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: CreateBillCreditNoteResponse = { + changes: [ + { + recordRef: { + dataType: "invoices", + }, + }, + ], + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "ba4469b6-e214-4195-9890-afa563e2516f", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "Success", + statusCode: 447926, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [shared.AccountingBillCreditNote](../../../sdk/models/shared/accountingbillcreditnote.md) | :heavy_minus_sign: | N/A | {
"id": "6a0e9dfb-87b0-47d3-aaaf-9753ae9e757d",
"billCreditNoteNumber": "14763237",
"totalAmount": 693,
"remainingCredit": 693,
"status": "Submitted",
"issueDate": "2019-02-18T16:03:07.268Z",
"note": "Track separately",
"currency": "USD",
"lineItems": [
{
"description": "AcmeMagnet",
"unitAmount": 25,
"discountAmount": 0,
"quantity": 4,
"subTotal": 100,
"taxAmount": 10,
"totalAmount": 110,
"itemRef": {
"id": "3"
},
"taxRateRef": {
"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"
},
"accountRef": {
"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"
},
"trackingCategoryRefs": [
{
"id": "department_1",
"name": "ACMERockets"
},
{
"id": "costcode_2",
"name": "ACM2-ACMESigns"
}
],
"createdFromLineRef": [
{
"id": "8462",
"dataType": "bill",
"lineNumber": 1
}
]
},
{
"description": "ACMEDisintegratingPistol",
"unitAmount": 25,
"discountAmount": 0,
"quantity": 3,
"subTotal": 75,
"taxAmount": 7.5,
"totalAmount": 82.5,
"itemRef": {
"id": "3abf0883-03f7-44c6-bc15-1372522d25e1"
},
"taxRateRef": {
"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"
},
"accountRef": {
"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"
}
},
{
"description": "ACMEWhippedCreamDispenser",
"unitAmount": 52,
"discountAmount": 0,
"quantity": 6,
"subTotal": 312,
"taxAmount": 31.2,
"totalAmount": 343.2,
"itemRef": {
"id": "3691f3d9-0ff7-4358-8a93-bed31c1b4b03"
},
"taxRateRef": {
"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"
},
"accountRef": {
"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"
}
},
{
"description": "ACMEJetPropelledPogoStick",
"unitAmount": 130,
"discountAmount": 0,
"quantity": 1,
"subTotal": 130,
"taxAmount": 27.3,
"totalAmount": 157.3,
"itemRef": {
"id": "075410d4-7edc-4936-ba52-9e1e43cbe300"
},
"taxRateRef": {
"id": "d606732b-db18-44d7-823b-7f15f42c32ea"
},
"accountRef": {
"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"
}
}
],
"supplierRef": {
"id": "67C6A7A1-5E84-4AC4-B950-24A114E379D0",
"supplierName": "Chin's Gas and Oil"
},
"createdFromLineRef": {
"id": "8462",
"dataType": "bills",
"line": 1
}
} | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `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 | +| `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. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillcreditnoteresponserecordreference.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillcreditnoteresponserecordreference.md new file mode 100644 index 000000000..111c2e71e --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillcreditnoteresponserecordreference.md @@ -0,0 +1,22 @@ +# CreateBillCreditNoteResponseRecordReference + +Links the current record to the underlying record or data type that created it. + +For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. + +## Example Usage + +```typescript +import { CreateBillCreditNoteResponseRecordReference } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: CreateBillCreditNoteResponseRecordReference = { + dataType: "accountTransaction", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record or data type. | | +| `dataType` | *string* | :heavy_minus_sign: | Allowed name of the 'dataType'. | journalEntry | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillpaymentresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillpaymentresponse.md new file mode 100644 index 000000000..3c6449d5b --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillpaymentresponse.md @@ -0,0 +1,44 @@ +# CreateBillPaymentResponse + +## Example Usage + +```typescript +import { CreateBillPaymentResponse } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: CreateBillPaymentResponse = { + changes: [ + { + recordRef: { + dataType: "invoices", + }, + }, + ], + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "1b8b90f3-443a-4110-8e0a-dcf4b921879f", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "Pending", + statusCode: 961571, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [shared.AccountingBillPayment](../../../sdk/models/shared/accountingbillpayment.md) | :heavy_minus_sign: | N/A | {
"totalAmount": 1000,
"lines": [
{
"amount": 1000,
"links": [
{
"type": "Bill",
"id": "x",
"amount": -1000
}
]
}
]
} | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `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 | +| `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. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponse.md new file mode 100644 index 000000000..fb7930bc0 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponse.md @@ -0,0 +1,44 @@ +# CreateBillResponse + +## Example Usage + +```typescript +import { CreateBillResponse } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: CreateBillResponse = { + changes: [ + { + recordRef: { + dataType: "invoices", + }, + }, + ], + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "e141aac3-66c8-4dd6-b144-2907474778a7", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "Failed", + statusCode: 826871, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [shared.AccountingBill](../../../sdk/models/shared/accountingbill.md) | :heavy_minus_sign: | N/A | | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `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 | +| `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. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponseaccountingpaymentallocation.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponseaccountingpaymentallocation.md new file mode 100644 index 000000000..d30663603 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponseaccountingpaymentallocation.md @@ -0,0 +1,25 @@ +# CreateBillResponseAccountingPaymentAllocation + +## Example Usage + +```typescript +import { CreateBillResponseAccountingPaymentAllocation } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: CreateBillResponseAccountingPaymentAllocation = { + payment: { + currency: "EUR", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "EUR", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `payment` | [shared.PaymentAllocationPayment](../../../sdk/models/shared/paymentallocationpayment.md) | :heavy_check_mark: | N/A | +| `allocation` | [shared.CreateBillResponseAllocation](../../../sdk/models/shared/createbillresponseallocation.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponseallocation.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponseallocation.md new file mode 100644 index 000000000..b8c7f79db --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponseallocation.md @@ -0,0 +1,21 @@ +# CreateBillResponseAllocation + +## Example Usage + +```typescript +import { CreateBillResponseAllocation } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: CreateBillResponseAllocation = { + currency: "GBP", + allocatedOnDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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 | +| `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. \| | | +| `allocatedOnDate` | *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 | +| `totalAmount` | *Decimal* | :heavy_minus_sign: | The total amount that has been allocated. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponsepurchaseorderreference.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponsepurchaseorderreference.md new file mode 100644 index 000000000..d5a1a479c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponsepurchaseorderreference.md @@ -0,0 +1,16 @@ +# CreateBillResponsePurchaseOrderReference + +## Example Usage + +```typescript +import { CreateBillResponsePurchaseOrderReference } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: CreateBillResponsePurchaseOrderReference = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Identifier for the purchase order, unique for the company in the accounting software. | +| `purchaseOrderNumber` | *string* | :heavy_minus_sign: | Friendly reference for the purchase order, commonly generated by the accounting software. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponsewithholdingtax.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponsewithholdingtax.md new file mode 100644 index 000000000..d749a89ba --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createbillresponsewithholdingtax.md @@ -0,0 +1,20 @@ +# CreateBillResponseWithholdingTax + +## Example Usage + +```typescript +import { CreateBillResponseWithholdingTax } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: CreateBillResponseWithholdingTax = { + name: "", + amount: new Decimal("5113.19"), +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `name` | *string* | :heavy_check_mark: | Name assigned to withheld tax. | +| `amount` | *Decimal* | :heavy_check_mark: | Amount of tax withheld. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createjournalentryresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createjournalentryresponse.md new file mode 100644 index 000000000..c5fbcd2d1 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createjournalentryresponse.md @@ -0,0 +1,44 @@ +# CreateJournalEntryResponse + +## Example Usage + +```typescript +import { CreateJournalEntryResponse } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: CreateJournalEntryResponse = { + changes: [ + { + recordRef: { + dataType: "invoices", + }, + }, + ], + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "3789fd87-1f99-4dd2-afd1-21aa6f1e674b", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "TimedOut", + statusCode: 119771, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [shared.AccountingJournalEntry](../../../sdk/models/shared/accountingjournalentry.md) | :heavy_minus_sign: | N/A | | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `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 | +| `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. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createjournalresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createjournalresponse.md new file mode 100644 index 000000000..98e0b019f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createjournalresponse.md @@ -0,0 +1,44 @@ +# CreateJournalResponse + +## Example Usage + +```typescript +import { CreateJournalResponse } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: CreateJournalResponse = { + changes: [ + { + recordRef: { + dataType: "invoices", + }, + }, + ], + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "1840394c-2607-41f9-bf5f-0642dac7af51", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "Pending", + statusCode: 241418, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [shared.AccountingJournal](../../../sdk/models/shared/accountingjournal.md) | :heavy_minus_sign: | N/A | | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `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 | +| `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. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createsupplierresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createsupplierresponse.md new file mode 100644 index 000000000..79fa1a17a --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/createsupplierresponse.md @@ -0,0 +1,44 @@ +# CreateSupplierResponse + +## Example Usage + +```typescript +import { CreateSupplierResponse } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: CreateSupplierResponse = { + changes: [ + { + recordRef: { + dataType: "invoices", + }, + }, + ], + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "bb675fd5-e60b-4375-ad4f-6fbee41f3331", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "Failed", + statusCode: 689768, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [shared.AccountingSupplier](../../../sdk/models/shared/accountingsupplier.md) | :heavy_minus_sign: | N/A | {
"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"
} | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `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 | +| `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. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/customerref.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/customerref.md new file mode 100644 index 000000000..2712e8723 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/customerref.md @@ -0,0 +1,18 @@ +# CustomerRef + +## Example Usage + +```typescript +import { CustomerRef } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: CustomerRef = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | +| `id` | *string* | :heavy_check_mark: | `id` from the Customers data type | +| `companyName` | *string* | :heavy_minus_sign: | `customerName` from the Customer data type | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/dataconnectionerror.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/dataconnectionerror.md index 729a5d52b..167060939 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/dataconnectionerror.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/dataconnectionerror.md @@ -1,11 +1,23 @@ # DataConnectionError +## Example Usage + +```typescript +import { DataConnectionError } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: DataConnectionError = { + erroredOnUtc: "2022-10-23T00:00:00Z", + resolvedOnUtc: "2022-10-23T00:00:00Z", +}; +``` ## Fields | Field | Type | Required | Description | Example | | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `errorMessage` | *string* | :heavy_minus_sign: | A brief message about the error. | | +| `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 | -| `statusCode` | *string* | :heavy_minus_sign: | The HTTP status code returned by the error. | | -| `statusText` | *string* | :heavy_minus_sign: | A non-numeric status code/text. | | \ No newline at end of file +| `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 diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/dataconnectionstatus.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/dataconnectionstatus.md index 5d13bea51..8832361e5 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/dataconnectionstatus.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/dataconnectionstatus.md @@ -2,12 +2,16 @@ The current authorization status of the data connection. +## Example Usage + +```typescript +import { DataConnectionStatus } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: DataConnectionStatus = "Linked"; +``` ## Values -| Name | Value | -| -------------- | -------------- | -| `PendingAuth` | PendingAuth | -| `Linked` | Linked | -| `Unlinked` | Unlinked | -| `Deauthorized` | Deauthorized | \ No newline at end of file +```typescript +"PendingAuth" | "Linked" | "Unlinked" | "Deauthorized" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/datasetstatus.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/datasetstatus.md new file mode 100644 index 000000000..4ab18837e --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/datasetstatus.md @@ -0,0 +1,17 @@ +# DatasetStatus + +The current status of the dataset. + +## Example Usage + +```typescript +import { DatasetStatus } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: DatasetStatus = "PermissionsError"; +``` + +## Values + +```typescript +"Initial" | "Queued" | "Fetching" | "MapQueued" | "Mapping" | "Complete" | "FetchError" | "MapError" | "InternalError" | "ProcessingQueued" | "Processing" | "ProcessingError" | "ValidationQueued" | "Validating" | "ValidationError" | "AuthError" | "Cancelled" | "NotSupported" | "RateLimitError" | "PermissionsError" | "PrerequisiteNotMet" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createcompanyresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/datastatus.md similarity index 83% rename from previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createcompanyresponse.md rename to previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/datastatus.md index 8fc61ffa1..ffdb0f273 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/operations/createcompanyresponse.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/datastatus.md @@ -1,12 +1,27 @@ -# CreateCompanyResponse +# DataStatus +Describes the state of data in the Codat cache for a company and data type + +## Example Usage + +```typescript +import { DataStatus } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: DataStatus = { + dataType: "payments", + lastSuccessfulSync: "2022-01-01T13:00:00.000Z", + currentStatus: "ProcessingError", + latestSyncId: "ad474a37-2003-478e-baee-9af9f1ec2fe3", + latestSuccessfulSyncId: "8220fc90-55b6-47bc-9417-48ac6ea93101", +}; +``` ## Fields -| Field | Type | Required | Description | Example | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `company` | [shared.Company](../../../sdk/models/shared/company.md) | :heavy_minus_sign: | OK | {"id":"0498e921-9b53-4396-a412-4f2f5983b0a2","name":"string","platform":"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","dataConnections":[{"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"}],"groups":[{"id":"d7a6c4b4-dc87-45f6-b803-62f466398680"}]} | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | | -| `errorMessage` | [shared.ErrorMessage](../../../sdk/models/shared/errormessage.md) | :heavy_minus_sign: | The request made is not valid. | | -| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | | -| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | | \ No newline at end of file +| 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 | +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/datatype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/datatype.md new file mode 100644 index 000000000..1080e5430 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/datatype.md @@ -0,0 +1,17 @@ +# DataType + +Available data types + +## Example Usage + +```typescript +import { DataType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: DataType = "invoices"; +``` + +## Values + +```typescript +"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" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/datatypes.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/datatypes.md new file mode 100644 index 000000000..e3fcb2a4c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/datatypes.md @@ -0,0 +1,17 @@ +# DataTypes + +Available data types + +## Example Usage + +```typescript +import { DataTypes } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: DataTypes = "invoices"; +``` + +## Values + +```typescript +"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" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/definitionstatus.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/definitionstatus.md new file mode 100644 index 000000000..06436c7df --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/definitionstatus.md @@ -0,0 +1,17 @@ +# DefinitionStatus + +Current state of the tracking category. + +## Example Usage + +```typescript +import { DefinitionStatus } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: DefinitionStatus = "Archived"; +``` + +## Values + +```typescript +"Unknown" | "Active" | "Archived" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/errorstatus.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/errorstatus.md new file mode 100644 index 000000000..d8444b39c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/errorstatus.md @@ -0,0 +1,17 @@ +# ErrorStatus + +The current status of a transient error. Null statuses indicate that the error is not transient. + +## Example Usage + +```typescript +import { ErrorStatus } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: ErrorStatus = "Active"; +``` + +## Values + +```typescript +"Active" | "Resolved" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/errorvalidation.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/errorvalidation.md index 232c51fd9..e8d9c6ebb 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/errorvalidation.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/errorvalidation.md @@ -2,6 +2,13 @@ A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. +## Example Usage + +```typescript +import { ErrorValidation } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: ErrorValidation = {}; +``` ## Fields diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/errorvalidationitem.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/errorvalidationitem.md index 257d78187..4862bd517 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/errorvalidationitem.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/errorvalidationitem.md @@ -1,5 +1,12 @@ # ErrorValidationItem +## Example Usage + +```typescript +import { ErrorValidationItem } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: ErrorValidationItem = {}; +``` ## Fields diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/groupreference.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/groupreference.md index 8cf39ba1a..08c342da7 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/groupreference.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/groupreference.md @@ -1,5 +1,14 @@ # GroupReference +## Example Usage + +```typescript +import { GroupReference } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: GroupReference = { + id: "60d2fa12-8a04-11ee-b9d1-0242ac120002", +}; +``` ## Fields diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/halref.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/halref.md index a19023707..1aa1aabf2 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/halref.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/halref.md @@ -1,5 +1,12 @@ # HalRef +## Example Usage + +```typescript +import { HalRef } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: HalRef = {}; +``` ## Fields diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/itemref.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/itemref.md new file mode 100644 index 000000000..ba143a1bd --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/itemref.md @@ -0,0 +1,20 @@ +# ItemRef + +Reference to the item the line is linked to. + +## Example Usage + +```typescript +import { ItemRef } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: ItemRef = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique identifier for the item in the accounting software. | +| `name` | *string* | :heavy_minus_sign: | Name of the item in the accounting software. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/itemreference.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/itemreference.md new file mode 100644 index 000000000..131772292 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/itemreference.md @@ -0,0 +1,20 @@ +# ItemReference + +Reference to the item the line is linked to. + +## Example Usage + +```typescript +import { ItemReference } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: ItemReference = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique identifier for the item in the accounting software. | +| `name` | *string* | :heavy_minus_sign: | Name of the item in the accounting software. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/items.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/items.md index 0998d9854..6fd90dd72 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/items.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/items.md @@ -1,8 +1,20 @@ # Items +## Example Usage + +```typescript +import { Items } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: Items = { + name: "", + amount: new Decimal("8817.36"), +}; +``` ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | ------------------------------------ | -| `id` | *string* | :heavy_minus_sign: | Unique identifier for the group. | 60d2fa12-8a04-11ee-b9d1-0242ac120002 | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `name` | *string* | :heavy_check_mark: | Name assigned to withheld tax. | +| `amount` | *Decimal* | :heavy_check_mark: | Amount of tax withheld. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journal.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journal.md new file mode 100644 index 000000000..cf3411cde --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journal.md @@ -0,0 +1,53 @@ +# Journal + +> **Language tip:** For line items, or individual transactions, of a company's financial documents, refer to the [Journal entries](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry) data type + +> View the coverage for journals in the Data coverage explorer. + +## Overview + +In accounting software, journals are used to record all the financial transactions of a company. Each transaction in a journal is represented by a separate [journal entry](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry). These entries are used to create the general ledger, which is then used to create the financial statements of a business. + +When a company records all their transactions in a single journal, it can become large and difficult to maintain and track. This is why large companies often use multiple journals (also known as subjournals) to categorize and manage journal entries. + +Such journals can be divided into two categories: + +- Special journals: journals used to record specific types of transactions; for example, a purchases journal, a sales journal, or a cash management journal. +- General journals: journals used to record transactions that fall outside the scope of the special journals. + +Multiple journals or subjournals are used in the following Codat integrations: + +- [Sage Intacct](https://docs.codat.io/integrations/accounting/sage-intacct/accounting-sage-intacct) (mandatory) +- [Exact Online](https://docs.codat.io/integrations/accounting/exact-online/accounting-exact-online) (mandatory) +- [Oracle NetSuite](https://docs.codat.io/integrations/accounting/netsuite/accounting-netsuite) (optional) + +> When pushing journal entries to an accounting software that doesn’t support multiple journals (multi-book accounting), the entries will be linked to the platform-generic journal. The Journals data type will only include one object. + + +## Example Usage + +```typescript +import { Journal } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Journal = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + createdOn: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| 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 | +| `id` | *string* | :heavy_minus_sign: | Journal ID. | | +| `journalCode` | *string* | :heavy_minus_sign: | Native journal number or code. | | +| `name` | *string* | :heavy_minus_sign: | Journal name.
The maximum length for a journal name is 256 characters. All characters above that number will be truncated. | | +| `type` | *string* | :heavy_minus_sign: | The type of the journal. | | +| `parentId` | *string* | :heavy_minus_sign: | Parent journal ID.
If the journal is a parent journal, this value is not present. | | +| `hasChildren` | *boolean* | :heavy_minus_sign: | If the journal has child journals, this value is true. If it doesn’t, it is false. | | +| `createdOn` | *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 | +| `status` | [shared.JournalStatus](../../../sdk/models/shared/journalstatus.md) | :heavy_minus_sign: | Current journal status. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalentry.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalentry.md new file mode 100644 index 000000000..03e88b3c5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalentry.md @@ -0,0 +1,71 @@ +# JournalEntry + +> **Language tip:** For the top-level record of a company's financial transactions, refer to the [Journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) data type + +> View the coverage for journal entries in the Data coverage explorer. + +## Overview + +A journal entry report shows the entries made in a company's general ledger, or [accounts](https://docs.codat.io/sync-for-payables-api#/schemas/Account), when transactions are approved. The journal line items for each journal entry should balance. + +A journal entry line item is a single transaction line on the journal entry. For example: + +- When a journal entry is recording a receipt of cash, the credit to accounts receivable and the debit to cash are separate line items. +- When a company needs to recognise revenue from an annual contract on a monthly basis, on receipt of cash for month one, they make a debit to deferred income and a credit to revenue. + +In Codat a journal entry contains details of: + +- The date on which the entry was created and posted. +- Itemised lines, including amounts and currency. +- A reference to the associated accounts. +- A reference to the underlying record. For example, the invoice, bill, or other data type that triggered the posting of the journal entry to the general ledger. + +> **Pushing journal entries** +> Codat only supports journal entries in the base currency of the company that are pushed into accounts denominated in the same base currency. + +## Example Usage + +```typescript +import { JournalEntry } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: JournalEntry = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + postedOn: "2022-10-23T00:00:00Z", + createdOn: "2022-10-23T00:00:00Z", + updatedOn: "2022-10-23T00:00:00Z", + journalLines: [ + { + netAmount: new Decimal("996.15"), + tracking: { + recordRefs: [ + { + dataType: "trackingCategories", + }, + ], + }, + }, + ], + recordRef: { + dataType: "transfers", + }, +}; +``` + +## Fields + +| 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 | +| `id` | *string* | :heavy_minus_sign: | Unique identifier of the journal entry for the company in the accounting software. | | +| `description` | *string* | :heavy_minus_sign: | Optional description of the journal entry. | | +| `postedOn` | *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 | +| `createdOn` | *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 | +| `updatedOn` | *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 | +| `journalRef` | [shared.JournalRef](../../../sdk/models/shared/journalref.md) | :heavy_minus_sign: | Links journal entries to the relevant journal in accounting integrations that use multi-book accounting (multiple journals). | | +| `journalLines` | [shared.JournalLine](../../../sdk/models/shared/journalline.md)[] | :heavy_minus_sign: | An array of journal lines. | | +| `recordRef` | [shared.JournalEntryRecordRef](../../../sdk/models/shared/journalentryrecordref.md) | :heavy_minus_sign: | Links a journal entry to the underlying record that created it. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalentryrecordref.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalentryrecordref.md new file mode 100644 index 000000000..336732413 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalentryrecordref.md @@ -0,0 +1,20 @@ +# JournalEntryRecordRef + +Links a journal entry to the underlying record that created it. + +## Example Usage + +```typescript +import { JournalEntryRecordRef } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: JournalEntryRecordRef = { + dataType: "transfers", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record or data type. | | +| `dataType` | [shared.JournalEntryRecordRefDataType](../../../sdk/models/shared/journalentryrecordrefdatatype.md) | :heavy_minus_sign: | Name of underlying data type. | transfers | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalentryrecordrefdatatype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalentryrecordrefdatatype.md new file mode 100644 index 000000000..f27309228 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalentryrecordrefdatatype.md @@ -0,0 +1,17 @@ +# JournalEntryRecordRefDataType + +Name of underlying data type. + +## Example Usage + +```typescript +import { JournalEntryRecordRefDataType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: JournalEntryRecordRefDataType = "transfers"; +``` + +## Values + +```typescript +"bankTransactions" | "billCreditNotes" | "billPayments" | "bills" | "creditNotes" | "directCosts" | "directIncomes" | "invoices" | "journalEntries" | "payments" | "transfers" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalline.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalline.md new file mode 100644 index 000000000..772909580 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalline.md @@ -0,0 +1,30 @@ +# JournalLine + +## Example Usage + +```typescript +import { JournalLine } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: JournalLine = { + netAmount: new Decimal("4438.79"), + tracking: { + recordRefs: [ + { + dataType: "trackingCategories", + }, + ], + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| `description` | *string* | :heavy_minus_sign: | Description of the journal line item. | +| `netAmount` | *Decimal* | :heavy_check_mark: | Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative. | +| `currency` | *string* | :heavy_minus_sign: | Currency for the journal line item. | +| `accountRef` | [shared.AccountRef](../../../sdk/models/shared/accountref.md) | :heavy_minus_sign: | 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. | +| `tracking` | [shared.JournalLineTracking](../../../sdk/models/shared/journallinetracking.md) | :heavy_minus_sign: | List of record refs associated with the tracking information for the line (eg to a Tracking Category, or customer etc.) | +| `contactRef` | [shared.ContactReference](../../../sdk/models/shared/contactreference.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journallinedatatype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journallinedatatype.md new file mode 100644 index 000000000..f5f75377d --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journallinedatatype.md @@ -0,0 +1,17 @@ +# JournalLineDataType + +Allowed name of the 'dataType'. + +## Example Usage + +```typescript +import { JournalLineDataType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: JournalLineDataType = "customers"; +``` + +## Values + +```typescript +"customers" | "suppliers" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journallinetracking.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journallinetracking.md new file mode 100644 index 000000000..f32055406 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journallinetracking.md @@ -0,0 +1,23 @@ +# JournalLineTracking + +List of record refs associated with the tracking information for the line (eg to a Tracking Category, or customer etc.) + +## Example Usage + +```typescript +import { JournalLineTracking } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: JournalLineTracking = { + recordRefs: [ + { + dataType: "trackingCategories", + }, + ], +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `recordRefs` | [shared.TrackingRecordRef](../../../sdk/models/shared/trackingrecordref.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalprototype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalprototype.md new file mode 100644 index 000000000..0b0429316 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalprototype.md @@ -0,0 +1,23 @@ +# JournalPrototype + +## Example Usage + +```typescript +import { JournalPrototype } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: JournalPrototype = { + createdOn: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `journalCode` | *string* | :heavy_minus_sign: | Native journal number or code. | | +| `name` | *string* | :heavy_minus_sign: | Journal name.
The maximum length for a journal name is 256 characters. All characters above that number will be truncated. | | +| `type` | *string* | :heavy_minus_sign: | The type of the journal. | | +| `parentId` | *string* | :heavy_minus_sign: | Parent journal ID.
If the journal is a parent journal, this value is not present. | | +| `hasChildren` | *boolean* | :heavy_minus_sign: | If the journal has child journals, this value is true. If it doesn’t, it is false. | | +| `createdOn` | *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 | +| `status` | [shared.JournalStatus](../../../sdk/models/shared/journalstatus.md) | :heavy_minus_sign: | Current journal status. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalref.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalref.md new file mode 100644 index 000000000..9e23049aa --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalref.md @@ -0,0 +1,20 @@ +# JournalRef + +Links journal entries to the relevant journal in accounting integrations that use multi-book accounting (multiple journals). + +## Example Usage + +```typescript +import { JournalRef } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: JournalRef = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------- | ------------------------------- | ------------------------------- | ------------------------------- | +| `id` | *string* | :heavy_check_mark: | GUID of the underlying journal. | +| `name` | *string* | :heavy_minus_sign: | Name of journal | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journals.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journals.md new file mode 100644 index 000000000..df197c39a --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journals.md @@ -0,0 +1,38 @@ +# Journals + +## Example Usage + +```typescript +import { Journals } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Journals = { + results: [ + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + createdOn: "2022-10-23T00:00:00Z", + }, + ], + pageNumber: 1, + pageSize: 10, + totalResults: 1, + links: { + self: { + href: "/companies/{id}/data/{dataType}", + }, + current: { + href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `results` | [shared.Journal](../../../sdk/models/shared/journal.md)[] | :heavy_minus_sign: | N/A | | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalstatus.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalstatus.md new file mode 100644 index 000000000..c758d2825 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/journalstatus.md @@ -0,0 +1,17 @@ +# JournalStatus + +Current journal status. + +## Example Usage + +```typescript +import { JournalStatus } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: JournalStatus = "Archived"; +``` + +## Values + +```typescript +"Unknown" | "Active" | "Archived" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/links.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/links.md index 37df2ee73..99eb5d05e 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/links.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/links.md @@ -1,11 +1,25 @@ # Links +## Example Usage + +```typescript +import { Links } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Links = { + self: { + href: "/companies", + }, + current: { + href: "/companies?page=1&pageSize=10", + }, +}; +``` ## Fields | Field | Type | Required | Description | | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `self` | [shared.HalRef](../../../sdk/models/shared/halref.md) | :heavy_check_mark: | N/A | | `current` | [shared.HalRef](../../../sdk/models/shared/halref.md) | :heavy_check_mark: | N/A | | `next` | [shared.HalRef](../../../sdk/models/shared/halref.md) | :heavy_minus_sign: | N/A | -| `previous` | [shared.HalRef](../../../sdk/models/shared/halref.md) | :heavy_minus_sign: | N/A | -| `self` | [shared.HalRef](../../../sdk/models/shared/halref.md) | :heavy_check_mark: | N/A | \ No newline at end of file +| `previous` | [shared.HalRef](../../../sdk/models/shared/halref.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/metadata.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/metadata.md new file mode 100644 index 000000000..ad16ca6ad --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/metadata.md @@ -0,0 +1,15 @@ +# Metadata + +## Example Usage + +```typescript +import { Metadata } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Metadata = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | +| `isDeleted` | *boolean* | :heavy_minus_sign: | Indicates whether the record has been deleted in the third-party system this record originated from. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentallocationitems.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentallocationitems.md new file mode 100644 index 000000000..2adddd372 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentallocationitems.md @@ -0,0 +1,25 @@ +# PaymentAllocationItems + +## Example Usage + +```typescript +import { PaymentAllocationItems } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PaymentAllocationItems = { + payment: { + currency: "USD", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "EUR", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `payment` | [shared.PaymentAllocationPayment](../../../sdk/models/shared/paymentallocationpayment.md) | :heavy_check_mark: | N/A | +| `allocation` | [shared.Allocation](../../../sdk/models/shared/allocation.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentallocationpayment.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentallocationpayment.md new file mode 100644 index 000000000..544f08770 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentallocationpayment.md @@ -0,0 +1,25 @@ +# PaymentAllocationPayment + +## Example Usage + +```typescript +import { PaymentAllocationPayment } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PaymentAllocationPayment = { + currency: "EUR", + paidOnDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Identifier of the allocated payment. | | +| `note` | *string* | :heavy_minus_sign: | Notes attached to the allocated payment. | | +| `reference` | *string* | :heavy_minus_sign: | Reference to the allocated payment. | | +| `accountRef` | [shared.AccountRef](../../../sdk/models/shared/accountref.md) | :heavy_minus_sign: | 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. | | +| `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 | +| `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. \| | | +| `paidOnDate` | *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 | +| `totalAmount` | *Decimal* | :heavy_minus_sign: | Total amount that was paid. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethod.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethod.md new file mode 100644 index 000000000..6e51af7f7 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethod.md @@ -0,0 +1,30 @@ +# PaymentMethod + +> View the coverage for payment methods in the Data coverage explorer. + +## Overview + +A Payment Method represents the payment method(s) used to pay a Bill. Payment Methods are referenced on [Bill Payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) and [Payments](https://docs.codat.io/sync-for-payables-api#/schemas/Payment). + +## Example Usage + +```typescript +import { PaymentMethod } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PaymentMethod = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| 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 | +| `id` | *string* | :heavy_minus_sign: | Unique identifier for the payment method. | | +| `name` | *string* | :heavy_minus_sign: | Name of the payment method. | | +| `type` | [shared.PaymentMethodType](../../../sdk/models/shared/paymentmethodtype.md) | :heavy_minus_sign: | Method of payment. | | +| `status` | [shared.PaymentMethodStatus](../../../sdk/models/shared/paymentmethodstatus.md) | :heavy_minus_sign: | Status of the Payment Method. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethodref.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethodref.md new file mode 100644 index 000000000..e0e092cbe --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethodref.md @@ -0,0 +1,21 @@ +# PaymentMethodRef + +The Payment Method to which the payment is linked in the accounting software. + +## Example Usage + +```typescript +import { PaymentMethodRef } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PaymentMethodRef = { + id: "EILBDVJVNUAGVKRQ", + name: "AliPay", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | The unique identifier of the location being referenced. | +| `name` | *string* | :heavy_minus_sign: | Name of the location being referenced. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethods.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethods.md new file mode 100644 index 000000000..4358cfb77 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethods.md @@ -0,0 +1,37 @@ +# PaymentMethods + +## Example Usage + +```typescript +import { PaymentMethods } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PaymentMethods = { + results: [ + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + }, + ], + pageNumber: 1, + pageSize: 10, + totalResults: 1, + links: { + self: { + href: "/companies/{id}/data/{dataType}", + }, + current: { + href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `results` | [shared.PaymentMethod](../../../sdk/models/shared/paymentmethod.md)[] | :heavy_minus_sign: | N/A | | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethodstatus.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethodstatus.md new file mode 100644 index 000000000..5c350977d --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethodstatus.md @@ -0,0 +1,17 @@ +# PaymentMethodStatus + +Status of the Payment Method. + +## Example Usage + +```typescript +import { PaymentMethodStatus } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PaymentMethodStatus = "Archived"; +``` + +## Values + +```typescript +"Unknown" | "Active" | "Archived" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethodtype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethodtype.md new file mode 100644 index 000000000..c5ce707c4 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/paymentmethodtype.md @@ -0,0 +1,17 @@ +# PaymentMethodType + +Method of payment. + +## Example Usage + +```typescript +import { PaymentMethodType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PaymentMethodType = "CreditCard"; +``` + +## Values + +```typescript +"Unknown" | "Cash" | "Check" | "CreditCard" | "DebitCard" | "BankTransfer" | "Other" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/phonenumber.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/phonenumber.md new file mode 100644 index 000000000..d7a8c1d7b --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/phonenumber.md @@ -0,0 +1,19 @@ +# PhoneNumber + +## Example Usage + +```typescript +import { PhoneNumber } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PhoneNumber = { + number: "(877) 492-8687", + type: "Fax", +}; +``` + +## 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 diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/phonenumbertype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/phonenumbertype.md new file mode 100644 index 000000000..cdc376d63 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/phonenumbertype.md @@ -0,0 +1,17 @@ +# PhoneNumberType + +The type of phone number + +## Example Usage + +```typescript +import { PhoneNumberType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PhoneNumberType = "Primary"; +``` + +## Values + +```typescript +"Primary" | "Landline" | "Mobile" | "Fax" | "Unknown" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/propertiedatatype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/propertiedatatype.md new file mode 100644 index 000000000..0e69cd1e5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/propertiedatatype.md @@ -0,0 +1,17 @@ +# PropertieDataType + +Available data types + +## Example Usage + +```typescript +import { PropertieDataType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PropertieDataType = "invoices"; +``` + +## Values + +```typescript +"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" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pulloperation.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pulloperation.md new file mode 100644 index 000000000..2e7982b16 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pulloperation.md @@ -0,0 +1,41 @@ +# PullOperation + +Information about a queued, in progress or completed pull operation. +*Formally called `dataset`* + +## Example Usage + +```typescript +import { PullOperation } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PullOperation = { + 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", + completed: "2022-10-23T00:00:00Z", + progress: 10, + isCompleted: false, + isErrored: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique identifier of the pull operation. | 943accd0-4247-42d8-865b-363c8629e1da | +| `companyId` | *string* | :heavy_check_mark: | Unique identifier of the company associated to this pull operation. | 22ece347-e5f6-4896-95e0-35a4c7f17023 | +| `connectionId` | *string* | :heavy_check_mark: | Unique identifier of the connection associated to this pull operation. | 50830828-7d39-4367-b0eb-5ddb2de5faa5 | +| `dataType` | *string* | :heavy_check_mark: | The data type you are requesting in a pull operation. | | +| `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 | +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pulloperations.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pulloperations.md new file mode 100644 index 000000000..f8463ff74 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pulloperations.md @@ -0,0 +1,46 @@ +# PullOperations + +## Example Usage + +```typescript +import { PullOperations } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PullOperations = { + results: [ + { + 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", + completed: "2022-10-23T00:00:00Z", + progress: 10, + isCompleted: false, + isErrored: false, + }, + ], + pageNumber: 1, + pageSize: 10, + totalResults: 1, + links: { + self: { + href: "/companies/{id}/data/{dataType}", + }, + current: { + href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `results` | [shared.PullOperation](../../../sdk/models/shared/pulloperation.md)[] | :heavy_minus_sign: | N/A | | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/purchaseorderreference.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/purchaseorderreference.md new file mode 100644 index 000000000..c9c2e68af --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/purchaseorderreference.md @@ -0,0 +1,16 @@ +# PurchaseOrderReference + +## Example Usage + +```typescript +import { PurchaseOrderReference } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PurchaseOrderReference = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Identifier for the purchase order, unique for the company in the accounting software. | +| `purchaseOrderNumber` | *string* | :heavy_minus_sign: | Friendly reference for the purchase order, commonly generated by the accounting software. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushchangetype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushchangetype.md new file mode 100644 index 000000000..18b4f5a1b --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushchangetype.md @@ -0,0 +1,17 @@ +# PushChangeType + +Type of change being applied to record in third party platform. + +## Example Usage + +```typescript +import { PushChangeType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PushChangeType = "Created"; +``` + +## Values + +```typescript +"Unknown" | "Created" | "Modified" | "Deleted" | "AttachmentUploaded" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushfieldvalidation.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushfieldvalidation.md new file mode 100644 index 000000000..b9b98ead4 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushfieldvalidation.md @@ -0,0 +1,19 @@ +# PushFieldValidation + +## Example Usage + +```typescript +import { PushFieldValidation } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PushFieldValidation = { + details: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | +| `field` | *string* | :heavy_minus_sign: | Field name that resulted in the validation issue. | +| `details` | *string* | :heavy_check_mark: | Details on the validation issue. | +| `ref` | *string* | :heavy_minus_sign: | Unique reference identifier for the validation issue. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperation.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperation.md new file mode 100644 index 000000000..beac15071 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperation.md @@ -0,0 +1,43 @@ +# PushOperation + +## Example Usage + +```typescript +import { PushOperation } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PushOperation = { + changes: [ + { + recordRef: { + dataType: "invoices", + }, + }, + ], + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "a05dfc2d-df7c-4c78-8a1b-a928fc816742", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "Success", + statusCode: 135218, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `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 | +| `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. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperationchange.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperationchange.md new file mode 100644 index 000000000..9353dab51 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperationchange.md @@ -0,0 +1,21 @@ +# PushOperationChange + +## Example Usage + +```typescript +import { PushOperationChange } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PushOperationChange = { + recordRef: { + dataType: "invoices", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `type` | [shared.PushChangeType](../../../sdk/models/shared/pushchangetype.md) | :heavy_minus_sign: | Type of change being applied to record in third party platform. | +| `recordRef` | [shared.PushOperationRef](../../../sdk/models/shared/pushoperationref.md) | :heavy_minus_sign: | N/A | +| `attachmentId` | *string* | :heavy_minus_sign: | Unique identifier for the attachment created otherwise null. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperationref.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperationref.md new file mode 100644 index 000000000..4a6f16dda --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperationref.md @@ -0,0 +1,18 @@ +# PushOperationRef + +## Example Usage + +```typescript +import { PushOperationRef } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PushOperationRef = { + dataType: "invoices", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Unique identifier for a push operation. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperations.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperations.md new file mode 100644 index 000000000..616724ef7 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperations.md @@ -0,0 +1,32 @@ +# PushOperations + +## Example Usage + +```typescript +import { PushOperations } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PushOperations = { + results: [], + pageNumber: 1, + pageSize: 10, + totalResults: 1, + links: { + self: { + href: "/companies/{id}/data/{dataType}", + }, + current: { + href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `results` | [shared.PushOperation](../../../sdk/models/shared/pushoperation.md)[] | :heavy_minus_sign: | N/A | | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperationstatus.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperationstatus.md new file mode 100644 index 000000000..f200f8aad --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoperationstatus.md @@ -0,0 +1,17 @@ +# PushOperationStatus + +The current status of the push operation. + +## Example Usage + +```typescript +import { PushOperationStatus } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PushOperationStatus = "Pending"; +``` + +## Values + +```typescript +"Pending" | "Failed" | "Success" | "TimedOut" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoption.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoption.md new file mode 100644 index 000000000..3642d3d16 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoption.md @@ -0,0 +1,25 @@ +# PushOption + +## Example Usage + +```typescript +import { PushOption } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PushOption = { + type: "Array", + displayName: "Waino_Orn", + required: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `type` | [shared.PushOptionType](../../../sdk/models/shared/pushoptiontype.md) | :heavy_check_mark: | The option type. | +| `displayName` | *string* | :heavy_check_mark: | The property's display name. | +| `description` | *string* | :heavy_minus_sign: | A description of the property. | +| `required` | *boolean* | :heavy_check_mark: | The property is required if `True`. | +| `properties` | Record | :heavy_minus_sign: | N/A | +| `options` | [shared.PushOptionChoice](../../../sdk/models/shared/pushoptionchoice.md)[] | :heavy_minus_sign: | N/A | +| `validation` | [shared.PushValidationInfo](../../../sdk/models/shared/pushvalidationinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoptionchoice.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoptionchoice.md new file mode 100644 index 000000000..09c88eeb0 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoptionchoice.md @@ -0,0 +1,19 @@ +# PushOptionChoice + +## Example Usage + +```typescript +import { PushOptionChoice } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PushOptionChoice = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `value` | *string* | :heavy_minus_sign: | Allowed value for field. | +| `type` | [shared.PushOptionType](../../../sdk/models/shared/pushoptiontype.md) | :heavy_minus_sign: | The option type. | +| `displayName` | *string* | :heavy_minus_sign: | The property's display name. | +| `description` | *string* | :heavy_minus_sign: | A description of the property. | +| `required` | *boolean* | :heavy_minus_sign: | The property is required if `True`. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoptionproperty.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoptionproperty.md new file mode 100644 index 000000000..07c3faa9a --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoptionproperty.md @@ -0,0 +1,26 @@ +# PushOptionProperty + +## Example Usage + +```typescript +import { PushOptionProperty } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PushOptionProperty = { + type: "Object", + displayName: "Florian.Champlin60", + description: "Horizontal eco-centric local area network", + required: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `type` | [shared.PushOptionType](../../../sdk/models/shared/pushoptiontype.md) | :heavy_check_mark: | The option type. | +| `displayName` | *string* | :heavy_check_mark: | The property's display name. | +| `description` | *string* | :heavy_check_mark: | A description of the property. | +| `required` | *boolean* | :heavy_check_mark: | The property is required if `True`. | +| `properties` | Record | :heavy_minus_sign: | N/A | +| `options` | [shared.PushOptionChoice](../../../sdk/models/shared/pushoptionchoice.md)[] | :heavy_minus_sign: | N/A | +| `validation` | [shared.PushValidationInfo](../../../sdk/models/shared/pushvalidationinfo.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoptiontype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoptiontype.md new file mode 100644 index 000000000..b6f44d12d --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushoptiontype.md @@ -0,0 +1,17 @@ +# PushOptionType + +The option type. + +## Example Usage + +```typescript +import { PushOptionType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PushOptionType = "Object"; +``` + +## Values + +```typescript +"Array" | "Object" | "String" | "Number" | "Boolean" | "DateTime" | "File" | "MultiPart" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushvalidationinfo.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushvalidationinfo.md new file mode 100644 index 000000000..638e6e327 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/pushvalidationinfo.md @@ -0,0 +1,16 @@ +# PushValidationInfo + +## Example Usage + +```typescript +import { PushValidationInfo } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: PushValidationInfo = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `warnings` | [shared.PushFieldValidation](../../../sdk/models/shared/pushfieldvalidation.md)[] | :heavy_minus_sign: | N/A | +| `information` | [shared.PushFieldValidation](../../../sdk/models/shared/pushfieldvalidation.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/recordlinereference.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/recordlinereference.md new file mode 100644 index 000000000..1fba1a6e1 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/recordlinereference.md @@ -0,0 +1,19 @@ +# RecordLineReference + +Reference to the purchase order line this line was generated from. + +## Example Usage + +```typescript +import { RecordLineReference } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: RecordLineReference = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record. | +| `dataType` | [shared.BillLineItemDataType](../../../sdk/models/shared/billlineitemdatatype.md) | :heavy_minus_sign: | Allowed name of the 'dataType'. | +| `lineNumber` | *string* | :heavy_minus_sign: | Line number of the underlying record. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/recordreference.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/recordreference.md new file mode 100644 index 000000000..31a07920a --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/recordreference.md @@ -0,0 +1,22 @@ +# RecordReference + +Links the current record to the underlying record or data type that created it. + +For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. + +## Example Usage + +```typescript +import { RecordReference } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: RecordReference = { + dataType: "journalEntry", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record or data type. | | +| `dataType` | *string* | :heavy_minus_sign: | Allowed name of the 'dataType'. | journalEntry | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/security.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/security.md index 30160fe18..16dd9e723 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/security.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/security.md @@ -1,5 +1,14 @@ # Security +## Example Usage + +```typescript +import { Security } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Security = { + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}; +``` ## Fields diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/sourcetype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/sourcetype.md index 3ddd34f70..beb6765af 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/sourcetype.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/sourcetype.md @@ -2,15 +2,16 @@ The type of platform of the connection. +## Example Usage + +```typescript +import { SourceType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: SourceType = "Accounting"; +``` ## Values -| Name | Value | -| ------------ | ------------ | -| `Accounting` | Accounting | -| `Banking` | Banking | -| `BankFeed` | BankFeed | -| `Commerce` | Commerce | -| `Expense` | Expense | -| `Other` | Other | -| `Unknown` | Unknown | \ No newline at end of file +```typescript +"Accounting" | "Banking" | "BankFeed" | "Commerce" | "Expense" | "Other" | "Unknown" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/status.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/status.md new file mode 100644 index 000000000..ab2ef1e69 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/status.md @@ -0,0 +1,17 @@ +# Status + +The current status of the dataset. + +## Example Usage + +```typescript +import { Status } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Status = "InternalError"; +``` + +## Values + +```typescript +"Initial" | "Queued" | "Fetching" | "MapQueued" | "Mapping" | "Complete" | "FetchError" | "MapError" | "InternalError" | "ProcessingQueued" | "Processing" | "ProcessingError" | "ValidationQueued" | "Validating" | "ValidationError" | "AuthError" | "Cancelled" | "NotSupported" | "RateLimitError" | "PermissionsError" | "PrerequisiteNotMet" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/supplementaldata.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/supplementaldata.md new file mode 100644 index 000000000..ab825f9de --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/supplementaldata.md @@ -0,0 +1,19 @@ +# SupplementalData + +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. + +## Example Usage + +```typescript +import { SupplementalData } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: SupplementalData = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `content` | Record> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/supplier.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/supplier.md new file mode 100644 index 000000000..6cfa6c419 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/supplier.md @@ -0,0 +1,71 @@ +# Supplier + +> View the coverage for suppliers in the Data coverage explorer. + +## Overview + +From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/sync-for-payables-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill). + +## Example Usage + +```typescript +import { Supplier } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: 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, + }, + }, + }, +}; +``` + +## Fields + +| 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 | +| `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 | +| `addresses` | [shared.Address](../../../sdk/models/shared/address.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. | | +| `status` | [shared.SupplierStatus](../../../sdk/models/shared/supplierstatus.md) | :heavy_check_mark: | Status of the supplier. | | +| `defaultCurrency` | *string* | :heavy_minus_sign: | Default currency the supplier's transactional data is recorded in. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/supplierref.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/supplierref.md index 673f0579e..12b295196 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/supplierref.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/supplierref.md @@ -2,6 +2,15 @@ Reference to the supplier the record relates to. +## Example Usage + +```typescript +import { SupplierRef } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: SupplierRef = { + id: "", +}; +``` ## Fields diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/suppliers.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/suppliers.md new file mode 100644 index 000000000..2472dd7d9 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/suppliers.md @@ -0,0 +1,71 @@ +# Suppliers + +## Example Usage + +```typescript +import { Suppliers } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Suppliers = { + results: [ + { + 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, + }, + }, + }, + }, + ], + pageNumber: 1, + pageSize: 10, + totalResults: 1, + links: { + self: { + href: "/companies/{id}/data/{dataType}", + }, + current: { + href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `results` | [shared.Supplier](../../../sdk/models/shared/supplier.md)[] | :heavy_minus_sign: | N/A | | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/supplierstatus.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/supplierstatus.md new file mode 100644 index 000000000..d0373829a --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/supplierstatus.md @@ -0,0 +1,17 @@ +# SupplierStatus + +Status of the supplier. + +## Example Usage + +```typescript +import { SupplierStatus } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: SupplierStatus = "Active"; +``` + +## Values + +```typescript +"Unknown" | "Active" | "Archived" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/tags.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/tags.md new file mode 100644 index 000000000..2b34f32c9 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/tags.md @@ -0,0 +1,16 @@ +# Tags + +A collection of user-defined key-value pairs that store custom metadata against the company. + +## Example Usage + +```typescript +import { Tags } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Tags = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxrate.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxrate.md new file mode 100644 index 000000000..0c726e6a3 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxrate.md @@ -0,0 +1,50 @@ +# TaxRate + +> View the coverage for tax rates in the Data coverage explorer. + +## Overview + +Accounting systems typically store a set of taxes and associated rates within the accounting software. This means that users don't have to look up or remember the rates for each type of tax. For example, applying the tax "UK sales VAT" to line items of an invoice adds the correct rate of 20%. + +### Tax components + +In some cases, a tax is made up of multiple sub taxes, often called _components_ of the tax. For example, you may have an item that is charged a tax rate called "City import tax (8%)" that has two components: + +- A city tax of 5% +- An import tax of 3% + +> **Effective tax rates** +> - Where there are multiple components of a tax, each component may be calculated on the original amount and added together. Alternatively, one tax may be calculated on the sub-total of the original amount plus another tax, which is referred to as _compounding_. When there is compounding, the effective tax rate is the rate that, if applied to the original amount, would result in the total amount of tax with compounding. +> +> **Example:** +> A tax has two components. Both components have a rate of 10%, and one component is compound. In this case, there is a total tax rate of 20% but an effective tax rate of 21%. +> +> - For QuickBooks Online, Codat doesn't use compound rates. Instead, the calculated effective tax rate for each component is shown. This means that the effective and total rates are the same because the total tax rate is a sum of the component rates. + +## Example Usage + +```typescript +import { TaxRate } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: TaxRate = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| 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 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the tax rate, unique for the company in the accounting software. | | +| `name` | *string* | :heavy_minus_sign: | Codat-augmented name of the tax rate in the accounting software. | | +| `code` | *string* | :heavy_minus_sign: | Code for the tax rate from the accounting software. | | +| `status` | [shared.TaxRateStatus](../../../sdk/models/shared/taxratestatus.md) | :heavy_minus_sign: | Status of the tax rate in the accounting software.
- `Active` - An active tax rate in use by a company.
- `Archived` - A tax rate that has been archived or is inactive in the accounting software.
- `Unknown` - Where the status of the tax rate cannot be determined from the underlying platform. | | +| `effectiveTaxRate` | *Decimal* | :heavy_minus_sign: | See Effective tax rates description. | | +| `totalTaxRate` | *Decimal* | :heavy_minus_sign: | Total (not compounded) sum of the components of a tax rate. | | +| `components` | [shared.TaxRateComponent](../../../sdk/models/shared/taxratecomponent.md)[] | :heavy_minus_sign: | N/A | | +| `validDatatypeLinks` | [shared.ValidDatatypeLinkItems](../../../sdk/models/shared/validdatatypelinkitems.md)[] | :heavy_minus_sign: | N/A | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxratecomponent.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxratecomponent.md new file mode 100644 index 000000000..3552c92d5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxratecomponent.md @@ -0,0 +1,21 @@ +# TaxRateComponent + +A tax rate can be made up of multiple sub taxes, often called components of the tax. + +## Example Usage + +```typescript +import { TaxRateComponent } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: TaxRateComponent = { + isCompound: false, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | +| `name` | *string* | :heavy_minus_sign: | Name of the tax rate component. | +| `rate` | *Decimal* | :heavy_minus_sign: | The rate of the tax rate component, usually a percentage. | +| `isCompound` | *boolean* | :heavy_check_mark: | A flag to indicate with the tax is calculated using the principle of compounding. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxratereference.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxrateref.md similarity index 63% rename from previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxratereference.md rename to previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxrateref.md index 80b4989ee..0768ddaf9 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxratereference.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxrateref.md @@ -1,12 +1,28 @@ -# TaxRateReference +# TaxRateRef -Reference to the tax rate to which the line item is linked. +Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate. +Found on: + +- Bill line items +- Bill Credit Note line items +- Credit Note line items +- Direct incomes line items +- Invoice line items +- Items + +## Example Usage + +```typescript +import { TaxRateRef } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: TaxRateRef = {}; +``` ## Fields | Field | Type | Required | Description | | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -| `effectiveTaxRate` | *number* | :heavy_minus_sign: | Applicable tax rate. | -| `id` | *string* | :heavy_minus_sign: | Unique identifier for the tax rate in the accounting platform. | -| `name` | *string* | :heavy_minus_sign: | Name of the tax rate in the accounting platform. | \ No newline at end of file +| `id` | *string* | :heavy_minus_sign: | Unique identifier for the tax rate in the accounting software. | +| `name` | *string* | :heavy_minus_sign: | Name of the tax rate in the accounting software. | +| `effectiveTaxRate` | *Decimal* | :heavy_minus_sign: | Applicable tax rate. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxrates.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxrates.md new file mode 100644 index 000000000..fb18e3dad --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxrates.md @@ -0,0 +1,37 @@ +# TaxRates + +## Example Usage + +```typescript +import { TaxRates } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: TaxRates = { + results: [ + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + }, + ], + pageNumber: 1, + pageSize: 10, + totalResults: 1, + links: { + self: { + href: "/companies/{id}/data/{dataType}", + }, + current: { + href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `results` | [shared.TaxRate](../../../sdk/models/shared/taxrate.md)[] | :heavy_minus_sign: | N/A | | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxratestatus.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxratestatus.md new file mode 100644 index 000000000..5ba41a923 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/taxratestatus.md @@ -0,0 +1,20 @@ +# TaxRateStatus + +Status of the tax rate in the accounting software. +- `Active` - An active tax rate in use by a company. +- `Archived` - A tax rate that has been archived or is inactive in the accounting software. +- `Unknown` - Where the status of the tax rate cannot be determined from the underlying platform. + +## Example Usage + +```typescript +import { TaxRateStatus } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: TaxRateStatus = "Active"; +``` + +## Values + +```typescript +"Unknown" | "Active" | "Archived" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/tracking.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/tracking.md new file mode 100644 index 000000000..ebc0b6c17 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/tracking.md @@ -0,0 +1,29 @@ +# Tracking + +Categories, and a project and customer, against which the item is tracked. + +## Example Usage + +```typescript +import { Tracking } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Tracking = { + categoryRefs: [ + { + id: "", + }, + ], + isBilledTo: "Unknown", + isRebilledTo: "NotApplicable", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `categoryRefs` | [shared.TrackingCategoryRef](../../../sdk/models/shared/trackingcategoryref.md)[] | :heavy_check_mark: | N/A | +| `customerRef` | [shared.CustomerRef](../../../sdk/models/shared/customerref.md) | :heavy_minus_sign: | N/A | +| `projectRef` | [shared.AccountingProjectReference](../../../sdk/models/shared/accountingprojectreference.md) | :heavy_minus_sign: | N/A | +| `isBilledTo` | [shared.BilledToType](../../../sdk/models/shared/billedtotype.md) | :heavy_check_mark: | Defines if the invoice or credit note is billed/rebilled to a project or customer. | +| `isRebilledTo` | [shared.BilledToType](../../../sdk/models/shared/billedtotype.md) | :heavy_check_mark: | Defines if the invoice or credit note is billed/rebilled to a project or customer. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingcategories.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingcategories.md new file mode 100644 index 000000000..89f258787 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingcategories.md @@ -0,0 +1,42 @@ +# TrackingCategories + +## Example Usage + +```typescript +import { TrackingCategories } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: TrackingCategories = { + results: [ + { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "string", + name: "string", + status: "Unknown", + parentId: "string", + hasChildren: true, + }, + ], + pageNumber: 1, + pageSize: 10, + totalResults: 1, + links: { + self: { + href: "/companies/{id}/data/{dataType}", + }, + current: { + href: "/companies/{id}/data/{dataType}?page=1&pageSize=10", + }, + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `results` | [shared.TrackingCategory](../../../sdk/models/shared/trackingcategory.md)[] | :heavy_minus_sign: | N/A | | +| `pageNumber` | *number* | :heavy_check_mark: | Current page number. | | +| `pageSize` | *number* | :heavy_check_mark: | Number of items to return in results array. | | +| `totalResults` | *number* | :heavy_check_mark: | Total number of items. | | +| `links` | [shared.Links](../../../sdk/models/shared/links.md) | :heavy_check_mark: | N/A | {
"self": {
"href": "/companies"
},
"current": {
"href": "/companies?page=1\u0026pageSize=10"
}
} | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingcategory.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingcategory.md new file mode 100644 index 000000000..c908ac592 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingcategory.md @@ -0,0 +1,159 @@ +# TrackingCategory + +Details of a category used for tracking transactions. + +> Language tip +> +> Parameters used to track types of spend in various parts of an organization can be called **dimensions**, **projects**, **classes**, or **locations** in different accounting software. In Codat, we refer to these as tracking categories. + +View the coverage for tracking categories in the Data coverage explorer. + +## Overview + +Tracking categories are used to monitor cost centres and control budgets that sit outside the standard chart of accounts. Customers may use tracking categories to group together and track the income and costs of specific departments, projects, locations or customers. + +From their accounting system, customers can: + +- Create and maintain tracking categories and tracking category types. +- View all tracking categories that are available for use. +- View the relationships between the categories. +- Assign invoices, bills, credit notes, or bill credit notes to one or more categories. +- View the categories that a transaction belongs to. +- View all transactions in a tracking category. + +### Tracking categories per platform + +Review the platform-specific tracking categories that Codat supports, and the level they are assigned to in the source platform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PlatformTracking categoryTracking level
Dynamics 365DimensionsLine item
FreshbooksExpense categoriesLine item
MYOBCategoriesTransaction
NetsuiteClassesLine item
LocationsLine item
DepartmentsLine item
Custom segmentsLine item
QuickBooks DesktopClassesLine item or transaction level
LocationsTransaction
QuickBooks OnlineClassesLine item or transaction level
LocationsTransaction
Sage 200Cost centersLine item
DepartmentsLine item
Analysis codesTransaction
Sage 50DepartmentsLine item
CostcodesLine item
ProjectsLine item
Sage IntacctDimensionsLine item
XeroTracking categoriesLine item
+ +> **Example use case** +> +> Monitor the budget for your annual conference using a tracking category called 'AnnualConference2020' with the **type** set to **Costing**. + +If a tracking category has a parent category, the ID of that parent category is displayed. There is also a `hasChildren` field that shows whether there are child subcategories nested beneath. + +## Example Usage + +```typescript +import { TrackingCategory } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: TrackingCategory = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "string", + name: "string", + status: "Unknown", + parentId: "string", + hasChildren: true, +}; +``` + +## Fields + +| 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 | +| `id` | *string* | :heavy_minus_sign: | The identifier for the item, unique per tracking category. | | +| `name` | *string* | :heavy_minus_sign: | The name of the tracking category. | | +| `status` | [shared.DefinitionStatus](../../../sdk/models/shared/definitionstatus.md) | :heavy_minus_sign: | Current state of the tracking category. | | +| `parentId` | *string* | :heavy_minus_sign: | The identifier for this item's immediate parent. | | +| `hasChildren` | *boolean* | :heavy_minus_sign: | Boolean value indicating whether this category has SubCategories. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingcategoryref.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingcategoryref.md new file mode 100644 index 000000000..f0f2455e5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingcategoryref.md @@ -0,0 +1,22 @@ +# ~~TrackingCategoryRef~~ + +References a category against which the item is tracked. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +## Example Usage + +```typescript +import { TrackingCategoryRef } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: TrackingCategoryRef = { + id: "", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `id` | *string* | :heavy_check_mark: | Unique identifier to the tracking category. | +| `name` | *string* | :heavy_minus_sign: | Name of tracking category. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingcategorytree.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingcategorytree.md new file mode 100644 index 000000000..668fac397 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingcategorytree.md @@ -0,0 +1,29 @@ +# TrackingCategoryTree + +The full structure of a specific tracking category including any child or subcategories. + +## Example Usage + +```typescript +import { TrackingCategoryTree } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: TrackingCategoryTree = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + subCategories: [], +}; +``` + +## Fields + +| 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 | +| `id` | *string* | :heavy_minus_sign: | The identifier for the item, unique per tracking category | | +| `name` | *string* | :heavy_minus_sign: | The name of the tracking category | | +| `status` | [shared.DefinitionStatus](../../../sdk/models/shared/definitionstatus.md) | :heavy_minus_sign: | Current state of the tracking category. | | +| `parentId` | *string* | :heavy_minus_sign: | The identifier for this item's immediate parent | | +| `hasChildren` | *boolean* | :heavy_minus_sign: | Boolean value indicating whether this category has SubCategories | | +| `subCategories` | [shared.TrackingCategoryTree](../../../sdk/models/shared/trackingcategorytree.md)[] | :heavy_minus_sign: | A collection of subcategories that are nested beneath this category. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingrecordref.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingrecordref.md new file mode 100644 index 000000000..e47cd1a40 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingrecordref.md @@ -0,0 +1,20 @@ +# TrackingRecordRef + +Links to the customer or tracking category. + +## Example Usage + +```typescript +import { TrackingRecordRef } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: TrackingRecordRef = { + dataType: "trackingCategories", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record or data type. | | +| `dataType` | [shared.TrackingRecordRefDataType](../../../sdk/models/shared/trackingrecordrefdatatype.md) | :heavy_minus_sign: | Name of underlying data type. | trackingCategories | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingrecordrefdatatype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingrecordrefdatatype.md new file mode 100644 index 000000000..4b06b1005 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/trackingrecordrefdatatype.md @@ -0,0 +1,17 @@ +# TrackingRecordRefDataType + +Name of underlying data type. + +## Example Usage + +```typescript +import { TrackingRecordRefDataType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: TrackingRecordRefDataType = "trackingCategories"; +``` + +## Values + +```typescript +"customers" | "suppliers" | "trackingCategories" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/type.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/type.md new file mode 100644 index 000000000..0bc2e3901 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/type.md @@ -0,0 +1,17 @@ +# Type + +The type of the weblink. + +## Example Usage + +```typescript +import { Type } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Type = "Website"; +``` + +## Values + +```typescript +"Website" | "Social" | "Unknown" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillcreditnoteresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillcreditnoteresponse.md new file mode 100644 index 000000000..ca3f4ad45 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillcreditnoteresponse.md @@ -0,0 +1,44 @@ +# UpdateBillCreditNoteResponse + +## Example Usage + +```typescript +import { UpdateBillCreditNoteResponse } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: UpdateBillCreditNoteResponse = { + changes: [ + { + recordRef: { + dataType: "invoices", + }, + }, + ], + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "ddc69260-1fb5-476b-8d5f-0d30c5fbb258", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "Pending", + statusCode: 18521, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [shared.UpdateBillCreditNoteResponseAccountingBillCreditNote](../../../sdk/models/shared/updatebillcreditnoteresponseaccountingbillcreditnote.md) | :heavy_minus_sign: | N/A | {
"id": "6a0e9dfb-87b0-47d3-aaaf-9753ae9e757d",
"billCreditNoteNumber": "14763237",
"totalAmount": 693,
"remainingCredit": 693,
"status": "Submitted",
"issueDate": "2019-02-18T16:03:07.268Z",
"note": "Track separately",
"currency": "USD",
"lineItems": [
{
"description": "AcmeMagnet",
"unitAmount": 25,
"discountAmount": 0,
"quantity": 4,
"subTotal": 100,
"taxAmount": 10,
"totalAmount": 110,
"itemRef": {
"id": "3"
},
"taxRateRef": {
"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"
},
"accountRef": {
"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"
},
"trackingCategoryRefs": [
{
"id": "department_1",
"name": "ACMERockets"
},
{
"id": "costcode_2",
"name": "ACM2-ACMESigns"
}
],
"createdFromLineRef": [
{
"id": "8462",
"dataType": "bill",
"lineNumber": 1
}
]
},
{
"description": "ACMEDisintegratingPistol",
"unitAmount": 25,
"discountAmount": 0,
"quantity": 3,
"subTotal": 75,
"taxAmount": 7.5,
"totalAmount": 82.5,
"itemRef": {
"id": "3abf0883-03f7-44c6-bc15-1372522d25e1"
},
"taxRateRef": {
"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"
},
"accountRef": {
"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"
}
},
{
"description": "ACMEWhippedCreamDispenser",
"unitAmount": 52,
"discountAmount": 0,
"quantity": 6,
"subTotal": 312,
"taxAmount": 31.2,
"totalAmount": 343.2,
"itemRef": {
"id": "3691f3d9-0ff7-4358-8a93-bed31c1b4b03"
},
"taxRateRef": {
"id": "6c88aff3-7cb9-4980-a3d3-443e72e02498"
},
"accountRef": {
"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"
}
},
{
"description": "ACMEJetPropelledPogoStick",
"unitAmount": 130,
"discountAmount": 0,
"quantity": 1,
"subTotal": 130,
"taxAmount": 27.3,
"totalAmount": 157.3,
"itemRef": {
"id": "075410d4-7edc-4936-ba52-9e1e43cbe300"
},
"taxRateRef": {
"id": "d606732b-db18-44d7-823b-7f15f42c32ea"
},
"accountRef": {
"id": "3f267b10-757d-44c0-bef9-20f70cc8fbe3"
}
}
],
"supplierRef": {
"id": "67C6A7A1-5E84-4AC4-B950-24A114E379D0",
"supplierName": "Chin's Gas and Oil"
},
"createdFromLineRef": {
"id": "8462",
"dataType": "bills",
"line": 1
}
} | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `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 | +| `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. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillcreditnoteresponseaccountingbillcreditnote.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillcreditnoteresponseaccountingbillcreditnote.md new file mode 100644 index 000000000..224c0499d --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillcreditnoteresponseaccountingbillcreditnote.md @@ -0,0 +1,95 @@ +# ~~UpdateBillCreditNoteResponseAccountingBillCreditNote~~ + +> **Bill credit notes or credit notes?** +> +> In Codat, bill credit notes represent accounts payable only. For accounts receivable, see [Credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/CreditNote). + +View the coverage for bill credit notes in the Data coverage explorer. + +## Overview + +A bill credit note is issued by a supplier for the purpose of recording credit. For example, if a supplier was unable to fulfil an order that was placed by a business, or delivered damaged goods, they would issue a bill credit note. A bill credit note reduces the amount a business owes to the supplier. It can be refunded to the business or used to pay off future bills. + +In the Codat API, a bill credit note is an accounts payable record issued by a [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier). + +A bill credit note includes details of: +* The original and remaining credit. +* Any allocations of the credit against other records, such as [bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill). +* The supplier that issued the bill credit note. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +## Example Usage + +```typescript +import { UpdateBillCreditNoteResponseAccountingBillCreditNote } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: UpdateBillCreditNoteResponseAccountingBillCreditNote = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "6a0e9dfb-87b0-47d3-aaaf-9753ae9e757d", + billCreditNoteNumber: "14763237", + supplierRef: { + id: "67C6A7A1-5E84-4AC4-B950-24A114E379D0", + supplierName: "Chin's Gas and Oil", + }, + totalAmount: new Decimal("693"), + totalDiscount: new Decimal("0"), + subTotal: new Decimal("805.78"), + totalTaxAmount: new Decimal("0"), + discountPercentage: new Decimal("0"), + remainingCredit: new Decimal("693"), + status: "Submitted", + issueDate: "2019-02-18T16:03:07.268Z", + allocatedOnDate: "2022-10-23T00:00:00Z", + currency: "USD", + lineItems: [], + paymentAllocations: [ + { + payment: { + currency: "EUR", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "USD", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], + createdFromRefs: [ + { + dataType: "transfer", + }, + ], + note: "Track separately", +}; +``` + +## Fields + +| 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 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the bill credit note that is unique to a company in the accounting software. | 1509398f-98e2-436d-8a5d-c042e0c74ffc | +| `billCreditNoteNumber` | *string* | :heavy_minus_sign: | Friendly reference for the bill credit note. | 91fe2a83-e161-4c21-929d-c5c10c4b07e5 | +| `supplierRef` | [shared.SupplierRef](../../../sdk/models/shared/supplierref.md) | :heavy_minus_sign: | Reference to the supplier the record relates to. | | +| `withholdingTax` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | N/A | | +| `totalAmount` | *Decimal* | :heavy_check_mark: | Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. | 805.78 | +| `totalDiscount` | *Decimal* | :heavy_check_mark: | Total value of any discounts applied. | 0 | +| `subTotal` | *Decimal* | :heavy_check_mark: | Total amount of the bill credit note, including discounts but excluding tax. | 805.78 | +| `totalTaxAmount` | *Decimal* | :heavy_check_mark: | Amount of tax included in the bill credit note. | 0 | +| `discountPercentage` | *Decimal* | :heavy_check_mark: | Percentage rate of any discount applied to the bill credit note. | 0 | +| `remainingCredit` | *Decimal* | :heavy_minus_sign: | Amount of the bill credit note that is still outstanding. | 0 | +| `status` | [shared.BillCreditNoteStatus](../../../sdk/models/shared/billcreditnotestatus.md) | :heavy_check_mark: | Current state of the bill credit note | Paid | +| `issueDate` | *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 | +| `allocatedOnDate` | *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 | +| `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 | +| `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. \| | | +| `lineItems` | [shared.BillCreditNoteLineItem](../../../sdk/models/shared/billcreditnotelineitem.md)[] | :heavy_minus_sign: | An array of line | | +| `paymentAllocations` | [shared.PaymentAllocationItems](../../../sdk/models/shared/paymentallocationitems.md)[] | :heavy_minus_sign: | An array of payment allocations. | | +| `createdFromRefs` | [shared.UpdateBillCreditNoteResponseRecordReference](../../../sdk/models/shared/updatebillcreditnoteresponserecordreference.md)[] | :heavy_minus_sign: | An array of records the credit note was created from. | | +| `note` | *string* | :heavy_minus_sign: | Any additional information about the bill credit note. | Bill Credit Note with 1 line items, totaling 805.78 | +| `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. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillcreditnoteresponserecordreference.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillcreditnoteresponserecordreference.md new file mode 100644 index 000000000..d24459a0a --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillcreditnoteresponserecordreference.md @@ -0,0 +1,22 @@ +# UpdateBillCreditNoteResponseRecordReference + +Links the current record to the underlying record or data type that created it. + +For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. + +## Example Usage + +```typescript +import { UpdateBillCreditNoteResponseRecordReference } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: UpdateBillCreditNoteResponseRecordReference = { + dataType: "journalEntry", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record or data type. | | +| `dataType` | *string* | :heavy_minus_sign: | Allowed name of the 'dataType'. | journalEntry | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponse.md new file mode 100644 index 000000000..dd88af322 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponse.md @@ -0,0 +1,44 @@ +# UpdateBillResponse + +## Example Usage + +```typescript +import { UpdateBillResponse } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: UpdateBillResponse = { + changes: [ + { + recordRef: { + dataType: "invoices", + }, + }, + ], + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "796f2a70-c688-4282-aa48-2562f222e981", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "Failed", + statusCode: 800379, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [shared.UpdateBillResponseAccountingBill](../../../sdk/models/shared/updatebillresponseaccountingbill.md) | :heavy_minus_sign: | N/A | | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `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 | +| `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. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponseaccountingbill.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponseaccountingbill.md new file mode 100644 index 000000000..5a3d43802 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponseaccountingbill.md @@ -0,0 +1,80 @@ +# ~~UpdateBillResponseAccountingBill~~ + +> **Invoices or bills?** +> +> We distinguish between invoices where the company *owes money* vs. *is owed money*. If the company has received an invoice, and owes money to someone else (accounts payable) we call this a Bill. +> +> See [Invoices](https://docs.codat.io/sync-for-payables-api#/schemas/Invoice) for the accounts receivable equivalent of bills. + +View the coverage for bills in the Data coverage explorer. + +## Overview + +In Codat, a bill contains details of: +* When the bill was recorded in the accounting system. +* How much the bill is for and the currency of the amount. +* Who the bill was received from — the *supplier*. +* What the bill is for — the *line items*. + +Some accounting software give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's *expenses*. + +You can find these types of transactions in our [Direct costs](https://docs.codat.io/sync-for-payables-api#/schemas/DirectCost) data model. + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +## Example Usage + +```typescript +import { UpdateBillResponseAccountingBill } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: UpdateBillResponseAccountingBill = { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + issueDate: "2022-10-23T00:00:00Z", + dueDate: "2022-10-23T00:00:00Z", + currency: "GBP", + status: "Void", + subTotal: new Decimal("4598.56"), + taxAmount: new Decimal("9251.64"), + totalAmount: new Decimal("446.12"), + paymentAllocations: [ + { + payment: { + currency: "EUR", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "USD", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], +}; +``` + +## Fields + +| 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 | +| `id` | *string* | :heavy_minus_sign: | Identifier for the bill, unique for the company in the accounting software. | | +| `reference` | *string* | :heavy_minus_sign: | User-friendly reference for the bill. | | +| `supplierRef` | [shared.SupplierRef](../../../sdk/models/shared/supplierref.md) | :heavy_minus_sign: | Reference to the supplier the record relates to. | | +| `purchaseOrderRefs` | [shared.UpdateBillResponsePurchaseOrderReference](../../../sdk/models/shared/updatebillresponsepurchaseorderreference.md)[] | :heavy_minus_sign: | N/A | | +| `issueDate` | *string* | :heavy_check_mark: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `dueDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC | +| `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 | +| `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. \| | | +| `lineItems` | [shared.BillLineItem](../../../sdk/models/shared/billlineitem.md)[] | :heavy_minus_sign: | Array of Bill line items. | | +| `withholdingTax` | [shared.UpdateBillResponseWithholdingTax](../../../sdk/models/shared/updatebillresponsewithholdingtax.md)[] | :heavy_minus_sign: | N/A | | +| `status` | [shared.BillStatus](../../../sdk/models/shared/billstatus.md) | :heavy_check_mark: | Current state of the bill. | | +| `subTotal` | *Decimal* | :heavy_check_mark: | Total amount of the bill, excluding any taxes. | | +| `taxAmount` | *Decimal* | :heavy_check_mark: | Amount of tax on the bill. | | +| `totalAmount` | *Decimal* | :heavy_check_mark: | Amount of the bill, including tax. | | +| `amountDue` | *Decimal* | :heavy_minus_sign: | Amount outstanding on the bill. | | +| `note` | *string* | :heavy_minus_sign: | Any private, company notes about the bill, such as payment information. | | +| `paymentAllocations` | [shared.UpdateBillResponseAccountingPaymentAllocation](../../../sdk/models/shared/updatebillresponseaccountingpaymentallocation.md)[] | :heavy_minus_sign: | An array of payment allocations. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponseaccountingpaymentallocation.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponseaccountingpaymentallocation.md new file mode 100644 index 000000000..851be02d9 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponseaccountingpaymentallocation.md @@ -0,0 +1,25 @@ +# UpdateBillResponseAccountingPaymentAllocation + +## Example Usage + +```typescript +import { UpdateBillResponseAccountingPaymentAllocation } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: UpdateBillResponseAccountingPaymentAllocation = { + payment: { + currency: "EUR", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "EUR", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| `payment` | [shared.PaymentAllocationPayment](../../../sdk/models/shared/paymentallocationpayment.md) | :heavy_check_mark: | N/A | +| `allocation` | [shared.UpdateBillResponseAllocation](../../../sdk/models/shared/updatebillresponseallocation.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponseallocation.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponseallocation.md new file mode 100644 index 000000000..fb448bf93 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponseallocation.md @@ -0,0 +1,21 @@ +# UpdateBillResponseAllocation + +## Example Usage + +```typescript +import { UpdateBillResponseAllocation } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: UpdateBillResponseAllocation = { + currency: "EUR", + allocatedOnDate: "2022-10-23T00:00:00Z", +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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 | +| `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. \| | | +| `allocatedOnDate` | *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 | +| `totalAmount` | *Decimal* | :heavy_minus_sign: | The total amount that has been allocated. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponsepurchaseorderreference.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponsepurchaseorderreference.md new file mode 100644 index 000000000..e8aa04baf --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponsepurchaseorderreference.md @@ -0,0 +1,16 @@ +# UpdateBillResponsePurchaseOrderReference + +## Example Usage + +```typescript +import { UpdateBillResponsePurchaseOrderReference } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: UpdateBillResponsePurchaseOrderReference = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | Identifier for the purchase order, unique for the company in the accounting software. | +| `purchaseOrderNumber` | *string* | :heavy_minus_sign: | Friendly reference for the purchase order, commonly generated by the accounting software. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponsewithholdingtax.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponsewithholdingtax.md new file mode 100644 index 000000000..5fdff86a8 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatebillresponsewithholdingtax.md @@ -0,0 +1,20 @@ +# UpdateBillResponseWithholdingTax + +## Example Usage + +```typescript +import { UpdateBillResponseWithholdingTax } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: UpdateBillResponseWithholdingTax = { + name: "", + amount: new Decimal("1811.51"), +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `name` | *string* | :heavy_check_mark: | Name assigned to withheld tax. | +| `amount` | *Decimal* | :heavy_check_mark: | Amount of tax withheld. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatesupplierresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatesupplierresponse.md new file mode 100644 index 000000000..6d3ab7481 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatesupplierresponse.md @@ -0,0 +1,44 @@ +# UpdateSupplierResponse + +## Example Usage + +```typescript +import { UpdateSupplierResponse } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: UpdateSupplierResponse = { + changes: [ + { + recordRef: { + dataType: "invoices", + }, + }, + ], + dataType: "invoices", + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "60eb1ea4-2655-45ba-bc28-744ed53b88f3", + dataConnectionKey: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestedOnUtc: "2022-10-23T00:00:00Z", + completedOnUtc: "2022-10-23T00:00:00Z", + status: "TimedOut", + statusCode: 348783, +}; +``` + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `data` | [shared.UpdateSupplierResponseAccountingSupplier](../../../sdk/models/shared/updatesupplierresponseaccountingsupplier.md) | :heavy_minus_sign: | N/A | {
"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"
} | +| `changes` | [shared.PushOperationChange](../../../sdk/models/shared/pushoperationchange.md)[] | :heavy_minus_sign: | Contains a single entry that communicates which record has changed and the manner in which it changed. | | +| `dataType` | [shared.PropertieDataType](../../../sdk/models/shared/propertiedatatype.md) | :heavy_minus_sign: | Available data types | invoices | +| `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 | +| `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. | | +| `errorMessage` | *string* | :heavy_minus_sign: | A message about the error. | | +| `validation` | [shared.Validation](../../../sdk/models/shared/validation.md) | :heavy_minus_sign: | A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. | | +| `statusCode` | *number* | :heavy_check_mark: | Push status code. | | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatesupplierresponseaccountingsupplier.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatesupplierresponseaccountingsupplier.md new file mode 100644 index 000000000..472a92010 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/updatesupplierresponseaccountingsupplier.md @@ -0,0 +1,73 @@ +# ~~UpdateSupplierResponseAccountingSupplier~~ + +> View the coverage for suppliers in the Data coverage explorer. + +## Overview + +From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/sync-for-payables-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill). + +> :warning: **DEPRECATED**: This will be removed in a future release, please migrate away from it as soon as possible. + +## Example Usage + +```typescript +import { UpdateSupplierResponseAccountingSupplier } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: UpdateSupplierResponseAccountingSupplier = { + 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, + }, + }, + }, +}; +``` + +## Fields + +| 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 | +| `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 | +| `addresses` | [shared.Address](../../../sdk/models/shared/address.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. | | +| `status` | [shared.SupplierStatus](../../../sdk/models/shared/supplierstatus.md) | :heavy_check_mark: | Status of the supplier. | | +| `defaultCurrency` | *string* | :heavy_minus_sign: | Default currency the supplier's transactional data is recorded in. | | +| `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | | +| `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/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/validation.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/validation.md new file mode 100644 index 000000000..7aac7fefa --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/validation.md @@ -0,0 +1,18 @@ +# Validation + +A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + +## Example Usage + +```typescript +import { Validation } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Validation = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `errors` | [shared.ValidationItem](../../../sdk/models/shared/validationitem.md)[] | :heavy_minus_sign: | N/A | +| `warnings` | [shared.ValidationItem](../../../sdk/models/shared/validationitem.md)[] | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/validationitem.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/validationitem.md new file mode 100644 index 000000000..1f76dbab2 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/validationitem.md @@ -0,0 +1,17 @@ +# ValidationItem + +## Example Usage + +```typescript +import { ValidationItem } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: ValidationItem = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- | +| `itemId` | *string* | :heavy_minus_sign: | Unique identifier for a validation item. | +| `message` | *string* | :heavy_minus_sign: | A message outlining validation item's issue. | +| `validatorName` | *string* | :heavy_minus_sign: | Name of validator. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/validdatatypelinkitems.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/validdatatypelinkitems.md new file mode 100644 index 000000000..de80df222 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/validdatatypelinkitems.md @@ -0,0 +1,57 @@ +# ValidDatatypeLinkItems + +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. + +## Example Usage + +```typescript +import { ValidDatatypeLinkItems } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: ValidDatatypeLinkItems = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `property` | *string* | :heavy_minus_sign: | The property from the account that can be linked. | +| `links` | *string*[] | :heavy_minus_sign: | Supported `dataTypes` that the record can be linked to. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/validdatatypelinks.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/validdatatypelinks.md new file mode 100644 index 000000000..078ab2131 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/validdatatypelinks.md @@ -0,0 +1,57 @@ +# ValidDataTypeLinks + +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. + +## Example Usage + +```typescript +import { ValidDataTypeLinks } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: ValidDataTypeLinks = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | +| `property` | *string* | :heavy_minus_sign: | The property from the account that can be linked. | +| `links` | *string*[] | :heavy_minus_sign: | Supported `dataTypes` that the record can be linked to. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/weblink.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/weblink.md new file mode 100644 index 000000000..e69c2f830 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/weblink.md @@ -0,0 +1,21 @@ +# WebLink + +Weblink associated with the company. + +## Example Usage + +```typescript +import { WebLink } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: WebLink = { + type: "Website", + url: "https://codat.io", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | +| `type` | [shared.Type](../../../sdk/models/shared/type.md) | :heavy_minus_sign: | The type of the weblink. | +| `url` | *string* | :heavy_minus_sign: | The full URL for the weblink. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/withholdingtax.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/withholdingtax.md new file mode 100644 index 000000000..2f3929f00 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/withholdingtax.md @@ -0,0 +1,20 @@ +# WithholdingTax + +## Example Usage + +```typescript +import { WithholdingTax } from "@codat/sync-for-payables-version-1/sdk/models/shared"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +let value: WithholdingTax = { + name: "", + amount: new Decimal("4551.69"), +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ | +| `name` | *string* | :heavy_check_mark: | Name assigned to withheld tax. | +| `amount` | *Decimal* | :heavy_check_mark: | Amount of tax withheld. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/zero.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/zero.md new file mode 100644 index 000000000..3c9811cfb --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/zero.md @@ -0,0 +1,21 @@ +# Zero + +Links the current record line to the underlying record line that created it. + +For example, if a bill is generated from a purchase order, this property allows you to connect the bill line item to the purchase order line item in our data model. + +## Example Usage + +```typescript +import { Zero } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: Zero = {}; +``` + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `id` | *string* | :heavy_minus_sign: | 'id' of the underlying record. | +| `dataType` | [shared.ZeroDataType](../../../sdk/models/shared/zerodatatype.md) | :heavy_minus_sign: | Allowed name of the 'dataType'. | +| `lineNumber` | *string* | :heavy_minus_sign: | Line number of the underlying record. | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/zerodatatype.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/zerodatatype.md new file mode 100644 index 000000000..0c7383e87 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdk/models/shared/zerodatatype.md @@ -0,0 +1,17 @@ +# ZeroDataType + +Allowed name of the 'dataType'. + +## Example Usage + +```typescript +import { ZeroDataType } from "@codat/sync-for-payables-version-1/sdk/models/shared"; + +let value: ZeroDataType = "bills"; +``` + +## Values + +```typescript +"purchaseOrders" | "bills" +``` \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/clientratelimitreachedresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/clientratelimitreachedresponse.md deleted file mode 100644 index 5098d8eac..000000000 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/clientratelimitreachedresponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClientRateLimitReachedResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/clientratelimitresetresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/clientratelimitresetresponse.md deleted file mode 100644 index 731e95fed..000000000 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/clientratelimitresetresponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# ClientRateLimitResetResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/payablesbillcreatedresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/payablesbillcreatedresponse.md deleted file mode 100644 index d6ea4fc6e..000000000 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/payablesbillcreatedresponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# PayablesBillCreatedResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/payablesbilldeletedresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/payablesbilldeletedresponse.md deleted file mode 100644 index 138e7a4c3..000000000 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/payablesbilldeletedresponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# PayablesBillDeletedResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/payablesbillupdatedresponse.md b/previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/payablesbillupdatedresponse.md deleted file mode 100644 index 14216b9e2..000000000 --- a/previous-versions/sync-for-payables-version-1/docs/sdk/models/webhooks/payablesbillupdatedresponse.md +++ /dev/null @@ -1,10 +0,0 @@ -# PayablesBillUpdatedResponse - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- | -| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation | -| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation | -| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdks/accounts/README.md b/previous-versions/sync-for-payables-version-1/docs/sdks/accounts/README.md new file mode 100644 index 000000000..9727950a5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdks/accounts/README.md @@ -0,0 +1,391 @@ +# Accounts +(*accounts*) + +## Overview + +Get, create, and update Accounts. + +### Available Operations + +* [list](#list) - List accounts +* [get](#get) - Get account +* [getCreateModel](#getcreatemodel) - Get create account model +* [create](#create) - Create account + +## list + +The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/sync-for-payables-api#/schemas/Account) for a given company's connection. + +[Accounts](https://docs.codat.io/sync-for-payables-api#/schemas/Account) are the categories a business uses to record accounting transactions. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.accounts.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) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { accountsList } from "@codat/sync-for-payables-version-1/funcs/accountsList.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsList(codatSyncPayables, { + 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; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListAccountsRequest](../../sdk/models/operations/listaccountsrequest.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.Accounts](../../sdk/models/shared/accounts.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## get + +The *Get account* endpoint returns a single account for a given `accountId`. + +[Accounts](https://docs.codat.io/sync-for-payables-api#/schemas/Account) are the categories a business uses to record accounting transactions. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support getting a specific account. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.accounts.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { accountsGet } from "@codat/sync-for-payables-version-1/funcs/accountsGet.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsGet(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + accountId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountRequest](../../sdk/models/operations/getaccountrequest.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.Account](../../sdk/models/shared/account.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## getCreateModel + +The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/sync-for-payables-api#/schemas/Account) for a given company and integration. + +[Accounts](https://docs.codat.io/sync-for-payables-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. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support creating an account. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.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 { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { accountsGetCreateModel } from "@codat/sync-for-payables-version-1/funcs/accountsGetCreateModel.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsGetCreateModel(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCreateAccountModelRequest](../../sdk/models/operations/getcreateaccountmodelrequest.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.PushOption](../../sdk/models/shared/pushoption.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## create + +The *Create account* endpoint creates a new [account](https://docs.codat.io/sync-for-payables-api#/schemas/Account) for a given company's connection. + +[Accounts](https://docs.codat.io/sync-for-payables-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-payables-api#/operations/get-create-chartOfAccounts-model). + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support creating an account. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.accounts.create({ + 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: "Cash On Hand", + currency: "USD", + currentBalance: new Decimal("0"), + type: "Asset", + status: "Active", + }, + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { accountsCreate } from "@codat/sync-for-payables-version-1/funcs/accountsCreate.js"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await accountsCreate(codatSyncPayables, { + 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: "Cash On Hand", + currency: "USD", + currentBalance: new Decimal("0"), + type: "Asset", + status: "Active", + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateAccountRequest](../../sdk/models/operations/createaccountrequest.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.CreateAccountResponse](../../sdk/models/shared/createaccountresponse.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/previous-versions/sync-for-payables-version-1/docs/sdks/bankaccounts/README.md b/previous-versions/sync-for-payables-version-1/docs/sdks/bankaccounts/README.md new file mode 100644 index 000000000..286a18931 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdks/bankaccounts/README.md @@ -0,0 +1,195 @@ +# BankAccounts +(*bankAccounts*) + +## Overview + +Get, create, and update Bank accounts. + +### Available Operations + +* [getCreateModel](#getcreatemodel) - Get create/update bank account model +* [create](#create) - Create bank account + +## 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-payables-api#/schemas/BankAccount) for a given company and integration. + +[Bank accounts](https://docs.codat.io/sync-for-payables-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. + +**Integration-specific behaviour** + +See the *response examples* for integration-specific indicative models. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating and updating a bank account. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.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 { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { bankAccountsGetCreateModel } from "@codat/sync-for-payables-version-1/funcs/bankAccountsGetCreateModel.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankAccountsGetCreateModel(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCreateBankAccountsModelRequest](../../sdk/models/operations/getcreatebankaccountsmodelrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `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.PushOption](../../sdk/models/shared/pushoption.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## create + +The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/sync-for-payables-api#/schemas/BankAccount) for a given company's connection. + +[Bank accounts](https://docs.codat.io/sync-for-payables-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. + +**Integration-specific behaviour** + +Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-update-bankAccounts-model). + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating an account. + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.bankAccounts.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + bankAccountPrototype: { + currency: "USD", + status: "Active", + }, + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { bankAccountsCreate } from "@codat/sync-for-payables-version-1/funcs/bankAccountsCreate.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await bankAccountsCreate(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + bankAccountPrototype: { + currency: "USD", + status: "Active", + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateBankAccountRequest](../../sdk/models/operations/createbankaccountrequest.md) | :heavy_check_mark: | The request object to use for the request. | +| `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.BankAccountCreateResponse](../../sdk/models/shared/bankaccountcreateresponse.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/previous-versions/sync-for-payables-version-1/docs/sdks/billcreditnotes/README.md b/previous-versions/sync-for-payables-version-1/docs/sdks/billcreditnotes/README.md new file mode 100644 index 000000000..ad4b89985 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdks/billcreditnotes/README.md @@ -0,0 +1,642 @@ +# BillCreditNotes +(*billCreditNotes*) + +## Overview + +Get, create, and update Bill credit notes. + +### Available Operations + +* [list](#list) - List bill credit notes +* [get](#get) - Get bill credit note +* [getCreateUpdateModel](#getcreateupdatemodel) - Get create/update bill credit note model +* [create](#create) - Create bill credit note +* [update](#update) - Update bill credit note + +## list + +The *List bill credit notes* endpoint returns a list of [bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) for a given company's connection. + +[Bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.billCreditNotes.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) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billCreditNotesList } from "@codat/sync-for-payables-version-1/funcs/billCreditNotesList.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billCreditNotesList(codatSyncPayables, { + 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; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListBillCreditNotesRequest](../../sdk/models/operations/listbillcreditnotesrequest.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.BillCreditNotes](../../sdk/models/shared/billcreditnotes.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## get + +The *Get bill credit note* endpoint returns a single bill credit note for a given `billCreditNoteId`. + +[Bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support getting a specific bill credit note. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.billCreditNotes.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billCreditNotesGet } from "@codat/sync-for-payables-version-1/funcs/billCreditNotesGet.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billCreditNotesGet(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billCreditNoteId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetBillCreditNoteRequest](../../sdk/models/operations/getbillcreditnoterequest.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.BillCreditNote](../../sdk/models/shared/billcreditnote.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## getCreateUpdateModel + +The *Get create/update bill credit note model* endpoint returns the expected data for the request payload when creating and updating a [bill credit note](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) for a given company and integration. + +[Bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. + +**Integration-specific behaviour** + +See the *response examples* for integration-specific indicative models. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating and updating a bill credit note. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.billCreditNotes.getCreateUpdateModel({ + 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 { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billCreditNotesGetCreateUpdateModel } from "@codat/sync-for-payables-version-1/funcs/billCreditNotesGetCreateUpdateModel.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billCreditNotesGetCreateUpdateModel(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCreateUpdateBillCreditNoteModelRequest](../../sdk/models/operations/getcreateupdatebillcreditnotemodelrequest.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.PushOption](../../sdk/models/shared/pushoption.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## create + +The *Create bill credit note* endpoint creates a new [bill credit note](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) for a given company's connection. + +[Bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. + +**Integration-specific behaviour** + +Required data may vary by integration. To see what data to post, first call [Get create/update bill credit note model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-update-billCreditNotes-model). + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating a bill credit note. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.billCreditNotes.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billCreditNote: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "1509398f-98e2-436d-8a5d-c042e0c74ffc", + billCreditNoteNumber: "309", + supplierRef: { + id: "87", + supplierName: "Ankunding Inc", + }, + withholdingTax: [ + { + name: "", + amount: new Decimal("4865.89"), + }, + ], + totalAmount: new Decimal("100"), + totalDiscount: new Decimal("0"), + subTotal: new Decimal("100"), + totalTaxAmount: new Decimal("0"), + discountPercentage: new Decimal("0"), + remainingCredit: new Decimal("100"), + status: "Submitted", + issueDate: "2023-04-20T00:00:00", + allocatedOnDate: "2022-10-23T00:00:00Z", + currency: "GBP", + currencyRate: new Decimal("1.242097"), + lineItems: [ + + ], + paymentAllocations: [ + { + payment: { + currency: "USD", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "GBP", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], + createdFromRefs: [ + { + dataType: "transfer", + }, + ], + note: "Bill Credit Note with 1 line items, totaling 805.78", + }, + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billCreditNotesCreate } from "@codat/sync-for-payables-version-1/funcs/billCreditNotesCreate.js"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billCreditNotesCreate(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billCreditNote: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "1509398f-98e2-436d-8a5d-c042e0c74ffc", + billCreditNoteNumber: "309", + supplierRef: { + id: "87", + supplierName: "Ankunding Inc", + }, + withholdingTax: [ + { + name: "", + amount: new Decimal("8165.88"), + }, + ], + totalAmount: new Decimal("100"), + totalDiscount: new Decimal("0"), + subTotal: new Decimal("100"), + totalTaxAmount: new Decimal("0"), + discountPercentage: new Decimal("0"), + remainingCredit: new Decimal("100"), + status: "Submitted", + issueDate: "2023-04-20T00:00:00", + allocatedOnDate: "2022-10-23T00:00:00Z", + currency: "GBP", + currencyRate: new Decimal("1.242097"), + lineItems: [ + + ], + paymentAllocations: [ + { + payment: { + currency: "USD", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "EUR", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], + createdFromRefs: [ + { + dataType: "invoice", + }, + ], + note: "Bill Credit Note with 1 line items, totaling 805.78", + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateBillCreditNoteRequest](../../sdk/models/operations/createbillcreditnoterequest.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.CreateBillCreditNoteResponse](../../sdk/models/shared/createbillcreditnoteresponse.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## update + +The *Update bill credit note* endpoint updates an existing [bill credit note](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) for a given company's connection. + +[Bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. + +**Integration-specific behaviour** + +Required data may vary by integration. To see what data to post, first call [Get create/update bill credit note model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-update-billCreditNotes-model). + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating a bill credit note. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.billCreditNotes.update({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billCreditNoteId: "", + billCreditNote: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "6a0e9dfb-87b0-47d3-aaaf-9753ae9e757d", + billCreditNoteNumber: "14763237", + supplierRef: { + id: "67C6A7A1-5E84-4AC4-B950-24A114E379D0", + supplierName: "Chin's Gas and Oil", + }, + totalAmount: new Decimal("693"), + totalDiscount: new Decimal("0"), + subTotal: new Decimal("805.78"), + totalTaxAmount: new Decimal("0"), + discountPercentage: new Decimal("0"), + remainingCredit: new Decimal("693"), + status: "Submitted", + issueDate: "2019-02-18T16:03:07.268Z", + allocatedOnDate: "2022-10-23T00:00:00Z", + currency: "USD", + lineItems: [ + + ], + paymentAllocations: [ + { + payment: { + currency: "GBP", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "EUR", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], + createdFromRefs: [ + { + dataType: "accountTransaction", + }, + ], + note: "Track separately", + }, + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billCreditNotesUpdate } from "@codat/sync-for-payables-version-1/funcs/billCreditNotesUpdate.js"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billCreditNotesUpdate(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billCreditNoteId: "", + billCreditNote: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + id: "6a0e9dfb-87b0-47d3-aaaf-9753ae9e757d", + billCreditNoteNumber: "14763237", + supplierRef: { + id: "67C6A7A1-5E84-4AC4-B950-24A114E379D0", + supplierName: "Chin's Gas and Oil", + }, + totalAmount: new Decimal("693"), + totalDiscount: new Decimal("0"), + subTotal: new Decimal("805.78"), + totalTaxAmount: new Decimal("0"), + discountPercentage: new Decimal("0"), + remainingCredit: new Decimal("693"), + status: "Submitted", + issueDate: "2019-02-18T16:03:07.268Z", + allocatedOnDate: "2022-10-23T00:00:00Z", + currency: "USD", + lineItems: [ + + ], + paymentAllocations: [ + { + payment: { + currency: "EUR", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "USD", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], + createdFromRefs: [ + { + dataType: "invoice", + }, + ], + note: "Track separately", + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateBillCreditNoteRequest](../../sdk/models/operations/updatebillcreditnoterequest.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.UpdateBillCreditNoteResponse](../../sdk/models/shared/updatebillcreditnoteresponse.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/previous-versions/sync-for-payables-version-1/docs/sdks/billpayments/README.md b/previous-versions/sync-for-payables-version-1/docs/sdks/billpayments/README.md new file mode 100644 index 000000000..ed3ed0c8c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdks/billpayments/README.md @@ -0,0 +1,562 @@ +# BillPayments +(*billPayments*) + +## Overview + +Get, create, and update Bill payments. + +### Available Operations + +* [list](#list) - List bill payments +* [get](#get) - Get bill payment +* [delete](#delete) - Delete bill payment +* [getCreateModel](#getcreatemodel) - Get create bill payment model +* [create](#create) - Create bill payments + +## list + +The *List bill payments* endpoint returns a list of [bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) for a given company's connection. + +[Bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) are an allocation of money within any Accounts Payable account. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.billPayments.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) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billPaymentsList } from "@codat/sync-for-payables-version-1/funcs/billPaymentsList.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billPaymentsList(codatSyncPayables, { + 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; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListBillPaymentsRequest](../../sdk/models/operations/listbillpaymentsrequest.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.BillPayments](../../sdk/models/shared/billpayments.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## get + +The *Get bill payment* endpoint returns a single bill payment for a given `billPaymentId`. + +[Bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) are an allocation of money within any Accounts Payable account. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support getting a specific bill payment. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.billPayments.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billPaymentsGet } from "@codat/sync-for-payables-version-1/funcs/billPaymentsGet.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billPaymentsGet(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billPaymentId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetBillPaymentsRequest](../../sdk/models/operations/getbillpaymentsrequest.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.BillPayment](../../sdk/models/shared/billpayment.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## delete + +The *Delete bill payment* endpoint allows you to delete a specified bill payment from an accounting software. + +[Bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) are an allocation of money within any Accounts Payable account. + +### Process +1. Pass the `{billPaymentId}` to the *Delete bill payment* endpoint and store the `pushOperationKey` returned. +2. Check the status of the delete operation by checking the status of the push operation either via + 1. [Push operation webhook](https://docs.codat.io/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), + 2. [Push operation status endpoint](https://docs.codat.io/sync-for-payables-api#/operations/get-push-operation). + + A `Success` status indicates that the bill payment object was deleted from the accounting software. +3. (Optional) Check that the bill payment was deleted from the accounting software. + +### Effect on related objects +Be aware that deleting a bill payment from an accounting software might cause related objects to be modified. + +## Integration specifics +Integrations that support soft delete do not permanently delete the object in the accounting software. + +| Integration | Soft Delete | Details | +|-------------|-------------|---------| +| QuickBooks Online | No | - +| QuickBooks Desktop | No | - +| Oracle NetSuite | No | See [here](/integrations/accounting/netsuite/accounting-netsuite-how-deleting-bill-payments-works) to learn more. +| Xero | Yes | - +| Sage Intacct | No | Some bill payments in Sage Intacct can only be deleted, whilst others can only be voided. Codat have applied logic to handle this complexity. + +> **Supported integrations** +> +> This functionality is currently supported for our QuickBooks Online, QuickBooks Desktop, Oracle NetSuite, Xero and Sage Intacct integrations. + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.billPayments.delete({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billPaymentId: "", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billPaymentsDelete } from "@codat/sync-for-payables-version-1/funcs/billPaymentsDelete.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billPaymentsDelete(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billPaymentId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteBillPaymentRequest](../../sdk/models/operations/deletebillpaymentrequest.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.PushOperation](../../sdk/models/shared/pushoperation.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## getCreateModel + +The *Get create bill payment model* endpoint returns the expected data for the request payload when creating a [bill payment](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) for a given company and integration. + +[Bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) are an allocation of money within any Accounts Payable account. + +**Integration-specific behaviour** + +See the *response examples* for integration-specific indicative models. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating a bill payment. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.billPayments.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 { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billPaymentsGetCreateModel } from "@codat/sync-for-payables-version-1/funcs/billPaymentsGetCreateModel.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billPaymentsGetCreateModel(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCreateBillPaymentModelRequest](../../sdk/models/operations/getcreatebillpaymentmodelrequest.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.PushOption](../../sdk/models/shared/pushoption.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## create + +The *Create bill payment* endpoint creates a new [bill payment](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) for a given company's connection. + +[Bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) are an allocation of money within any customer accounts payable account. + +**Integration-specific behaviour** + +Required data may vary by integration. To see what data to post, first call [Get create bill payment model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-billPayments-model). + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating a bill payment. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.billPayments.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billPayment: { + modifiedDate: "2023-01-05T12:33:25.339Z", + sourceModifiedDate: "2023-01-05T12:33:25.339Z", + id: "3d5a8e00-d108-4045-8823-7f342676cffa", + supplierRef: { + id: "SUPP1", + supplierName: "string", + }, + accountRef: { + id: "1200", + name: "string", + }, + totalAmount: new Decimal("15.38"), + currency: "GBP", + currencyRate: new Decimal("1"), + date: "2023-01-05T12:33:25.339Z", + note: "note - billpayment on 20230220 of 15.38", + paymentMethodRef: { + id: "string", + name: "string", + }, + lines: [ + { + amount: new Decimal("15.38"), + links: [ + { + type: "Bill", + id: "3", + amount: new Decimal("-15.38"), + currencyRate: new Decimal("1"), + }, + ], + allocatedOnDate: "2023-01-05T12:33:25.339Z", + }, + ], + reference: "reference 20230220 15.38", + metadata: { + isDeleted: true, + }, + }, + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billPaymentsCreate } from "@codat/sync-for-payables-version-1/funcs/billPaymentsCreate.js"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billPaymentsCreate(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billPayment: { + modifiedDate: "2023-01-05T12:33:25.339Z", + sourceModifiedDate: "2023-01-05T12:33:25.339Z", + id: "3d5a8e00-d108-4045-8823-7f342676cffa", + supplierRef: { + id: "SUPP1", + supplierName: "string", + }, + accountRef: { + id: "1200", + name: "string", + }, + totalAmount: new Decimal("15.38"), + currency: "GBP", + currencyRate: new Decimal("1"), + date: "2023-01-05T12:33:25.339Z", + note: "note - billpayment on 20230220 of 15.38", + paymentMethodRef: { + id: "string", + name: "string", + }, + lines: [ + { + amount: new Decimal("15.38"), + links: [ + { + type: "Bill", + id: "3", + amount: new Decimal("-15.38"), + currencyRate: new Decimal("1"), + }, + ], + allocatedOnDate: "2023-01-05T12:33:25.339Z", + }, + ], + reference: "reference 20230220 15.38", + metadata: { + isDeleted: true, + }, + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateBillPaymentRequest](../../sdk/models/operations/createbillpaymentrequest.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.CreateBillPaymentResponse](../../sdk/models/shared/createbillpaymentresponse.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/previous-versions/sync-for-payables-version-1/docs/sdks/bills/README.md b/previous-versions/sync-for-payables-version-1/docs/sdks/bills/README.md index 8f210da13..e2f592262 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdks/bills/README.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdks/bills/README.md @@ -3,48 +3,1060 @@ ## Overview -Bills +Get, create, and update Bills. ### Available Operations * [list](#list) - List bills +* [get](#get) - Get bill +* [getCreateUpdateModel](#getcreateupdatemodel) - Get create/update bill model +* [create](#create) - Create bill +* [update](#update) - Update bill +* [delete](#delete) - Delete bill +* [listAttachments](#listattachments) - List bill attachments +* [getAttachment](#getattachment) - Get bill attachment +* [deleteAttachment](#deleteattachment) - Delete bill attachment +* [downloadAttachment](#downloadattachment) - Download bill attachment +* [uploadAttachment](#uploadattachment) - Upload bill attachment ## list -The *List bills* endpoint returns a list of [bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) for a given company's connection. +The *List bills* endpoint returns a list of [bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) for a given company's connection. + +[Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.bills.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) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billsList } from "@codat/sync-for-payables-version-1/funcs/billsList.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billsList(codatSyncPayables, { + 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; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListBillsRequest](../../sdk/models/operations/listbillsrequest.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.Bills](../../sdk/models/shared/bills.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## get + +The *Get bill* endpoint returns a single bill for a given `billId`. + +[Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support getting a specific bill. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.bills.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "7110701885", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billsGet } from "@codat/sync-for-payables-version-1/funcs/billsGet.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billsGet(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + billId: "7110701885", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetBillRequest](../../sdk/models/operations/getbillrequest.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.Bill](../../sdk/models/shared/bill.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## getCreateUpdateModel + +The *Get create/update bill model* endpoint returns the expected data for the request payload when creating and updating a [bill](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) for a given company and integration. + +[Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + +**Integration-specific behaviour** + +See the *response examples* for integration-specific indicative models. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating and updating a bill. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.bills.getCreateUpdateModel({ + 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 { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billsGetCreateUpdateModel } from "@codat/sync-for-payables-version-1/funcs/billsGetCreateUpdateModel.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billsGetCreateUpdateModel(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCreateUpdateBillModelRequest](../../sdk/models/operations/getcreateupdatebillmodelrequest.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.PushOption](../../sdk/models/shared/pushoption.md)\>** + +### Errors -By default, the endpoint will return all bills irrespective of payment status. To filter outstanding bills use the `outstandingBills=true` query parameter to return all unpaid and partially paid bills. +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## create + +The *Create bill* endpoint creates a new [bill](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) for a given company's connection. [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - + +**Integration-specific behaviour** + +Required data may vary by integration. To see what data to post, first call [Get create/update bill model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-update-bills-model). + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating a bill. + ### Example Usage ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; -import { BillStatus } from "@codat/sync-for-payables/dist/sdk/models/shared"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); async function run() { - const sdk = new CodatSyncPayables({ - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", + const result = await codatSyncPayables.bills.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + bill: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + reference: "20230308 15.16", + supplierRef: { + id: "80000001-1671793885", + supplierName: "string", + }, + purchaseOrderRefs: [ + { + id: "string", + purchaseOrderNumber: "string", + }, + ], + issueDate: "2023-03-08T09:21:18.558Z", + dueDate: "2023-03-14T09:21:18.558Z", + currency: "USD", + currencyRate: new Decimal("1"), + lineItems: [ + + ], + withholdingTax: [ + { + name: "string", + amount: new Decimal("0"), + }, + ], + status: "Open", + subTotal: new Decimal("3.25"), + taxAmount: new Decimal("0"), + totalAmount: new Decimal("3.25"), + amountDue: new Decimal("115.899999984"), + note: "note", + paymentAllocations: [ + { + payment: { + currency: "USD", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "GBP", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], }, }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: - const res = await sdk.bills.list({ +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billsCreate } from "@codat/sync-for-payables-version-1/funcs/billsCreate.js"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billsCreate(codatSyncPayables, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", - page: 1, - pageSize: 100, - sourceModifiedDate: "2022-10-23T00:00:00Z", - status: [ - BillStatus.Open, - ], + bill: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + reference: "20230308 15.16", + supplierRef: { + id: "80000001-1671793885", + supplierName: "string", + }, + purchaseOrderRefs: [ + { + id: "string", + purchaseOrderNumber: "string", + }, + ], + issueDate: "2023-03-08T09:21:18.558Z", + dueDate: "2023-03-14T09:21:18.558Z", + currency: "USD", + currencyRate: new Decimal("1"), + lineItems: [ + + ], + withholdingTax: [ + { + name: "string", + amount: new Decimal("0"), + }, + ], + status: "Open", + subTotal: new Decimal("3.25"), + taxAmount: new Decimal("0"), + totalAmount: new Decimal("3.25"), + amountDue: new Decimal("115.899999984"), + note: "note", + paymentAllocations: [ + { + payment: { + currency: "GBP", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "EUR", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateBillRequest](../../sdk/models/operations/createbillrequest.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.CreateBillResponse](../../sdk/models/shared/createbillresponse.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## update + +The *Update bill* endpoint updates an existing [bill](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) for a given company's connection. + +[Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + +**Integration-specific behaviour** + +Required data may vary by integration. To see what data to post, first call [Get create/update bill model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-update-bills-model). + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating a bill. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.bills.update({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "7110701885", + bill: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + issueDate: "2022-10-23T00:00:00Z", + dueDate: "2022-10-23T00:00:00Z", + currency: "USD", + status: "Void", + subTotal: new Decimal("9914.64"), + taxAmount: new Decimal("2703.24"), + totalAmount: new Decimal("6276.9"), + paymentAllocations: [ + { + payment: { + currency: "GBP", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "EUR", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], + }, + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billsUpdate } from "@codat/sync-for-payables-version-1/funcs/billsUpdate.js"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billsUpdate(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "7110701885", + bill: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + issueDate: "2022-10-23T00:00:00Z", + dueDate: "2022-10-23T00:00:00Z", + currency: "USD", + status: "Void", + subTotal: new Decimal("9914.64"), + taxAmount: new Decimal("2703.24"), + totalAmount: new Decimal("6276.9"), + paymentAllocations: [ + { + payment: { + currency: "USD", + paidOnDate: "2022-10-23T00:00:00Z", + }, + allocation: { + currency: "EUR", + allocatedOnDate: "2022-10-23T00:00:00Z", + }, + }, + ], + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateBillRequest](../../sdk/models/operations/updatebillrequest.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.UpdateBillResponse](../../sdk/models/shared/updatebillresponse.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## delete + +The *Delete bill* endpoint allows you to delete a specified bill from an accounting software. + +[Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are itemized records of goods received or services provided to the SMB. + +### Process +1. Pass the `{billId}` to the *Delete bill* endpoint and store the `pushOperationKey` returned. +2. Check the status of the delete operation by checking the status of the push operation either via + 1. [Push operation webhook](https://docs.codat.io/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), + 2. [Push operation status endpoint](https://docs.codat.io/sync-for-payables-api#/operations/get-push-operation). + + A `Success` status indicates that the bill object was deleted from the accounting software. +3. (Optional) Check that the bill was deleted from the accounting software. + +### Effect on related objects + +Be aware that deleting a bill from an accounting software might cause related objects to be modified. For example, if you delete a paid bill in QuickBooks Online or QuickBooks Desktop, the bill is deleted but the bill payment against that bill is not. The bill payment is converted to a payment on account. + +## Integration specifics +Integrations that support soft delete do not permanently delete the object in the accounting software. + +| Integration | Soft Delete | Details | +|-------------|-------------|--------------------------------------------------------------------------------------------------------------| +| QuickBooks Online | No | - | +| QuickBooks Desktop | No | - | +| Oracle NetSuite | No | When deleting a bill that's already linked to a bill payment, you must delete the linked bill payment first. | | +| Sage Intacct | No | When deleting a bill that's already linked to a bill payment, you must delete the linked bill payment first. | +| Xero | No | Draft bills will be deleted. Open bills will be voided instead of deleted since Xero only allows voiding a bill once it's been posted. When deleting a bill that's already linked to a bill payment, you must delete the linked bill payment first. | + +> **Supported Integrations** +> +> This functionality is currently supported for our QuickBooks Online, QuickBooks Desktop, Xero, Oracle NetSuite and Sage Intacct integrations. + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.bills.delete({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "7110701885", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billsDelete } from "@codat/sync-for-payables-version-1/funcs/billsDelete.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billsDelete(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "7110701885", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteBillRequest](../../sdk/models/operations/deletebillrequest.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.PushOperation](../../sdk/models/shared/pushoperation.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## listAttachments + +The *List bill attachments* endpoint returns a list of attachments available to download for a given `billId`. + +[Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.bills.listAttachments({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "EILBDVJVNUAGVKRQ", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billsListAttachments } from "@codat/sync-for-payables-version-1/funcs/billsListAttachments.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billsListAttachments(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "EILBDVJVNUAGVKRQ", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListBillAttachmentsRequest](../../sdk/models/operations/listbillattachmentsrequest.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.Attachments](../../sdk/models/shared/attachments.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## getAttachment + +The *Get bill attachment* endpoint returns a specific attachment for a given `billId` and `attachmentId`. + +[Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support getting a bill attachment. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.bills.getAttachment({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "EILBDVJVNUAGVKRQ", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billsGetAttachment } from "@codat/sync-for-payables-version-1/funcs/billsGetAttachment.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billsGetAttachment(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "EILBDVJVNUAGVKRQ", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetBillAttachmentRequest](../../sdk/models/operations/getbillattachmentrequest.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.Attachment](../../sdk/models/shared/attachment.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## deleteAttachment + +The *Delete bill attachment* endpoint allows you to delete a specified bill attachment from an accounting software. + +[Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices +that represent the SMB's financial obligations to their supplier for a +purchase of goods or services. + +### Process + +1. Pass the `{billId}` and `{attachmentId}` to the *Delete bill attachment* endpoint and store the `pushOperationKey` returned. + +2. Check the status of the delete operation by checking the status of push operation either via + +1. [Push operation webhook](https://docs.codat.io/introduction/webhookscore-rules-types#push-operation-status-has-changed) (advised), + +2. [Push operation status endpoint](https://docs.codat.io/sync-for-payables-api#/operations/get-push-operation). A `Success` status indicates that the bill attachment object was deleted from the accounting software. + +3. (Optional) Check that the bill attachment was deleted from the accounting software. + +>**Supported Integrations** +> +>This functionality is currently only supported for our QuickBooks Online integration. + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.bills.deleteAttachment({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billsDeleteAttachment } from "@codat/sync-for-payables-version-1/funcs/billsDeleteAttachment.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billsDeleteAttachment(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "9wg4lep4ush5cxs79pl8sozmsndbaukll3ind4g7buqbm1h2", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteBillAttachmentRequest](../../sdk/models/operations/deletebillattachmentrequest.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.PushOperation](../../sdk/models/shared/pushoperation.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## downloadAttachment + +The *Download bill attachment* endpoint downloads a specific attachment for a given `billId` and `attachmentId`. + +[Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support downloading a bill attachment. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.bills.downloadAttachment({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "EILBDVJVNUAGVKRQ", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billsDownloadAttachment } from "@codat/sync-for-payables-version-1/funcs/billsDownloadAttachment.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await billsDownloadAttachment(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "EILBDVJVNUAGVKRQ", + attachmentId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - if (res.statusCode == 200) { - // handle response + if (!res.ok) { + throw res.error; } + + const { value: result } = res; + + // Handle the result + console.log(result) } run(); @@ -52,18 +1064,107 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | -| `request` | [operations.ListBillsRequest](../../sdk/models/operations/listbillsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DownloadBillAttachmentRequest](../../sdk/models/operations/downloadbillattachmentrequest.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\<[ReadableStream](../../models/.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## uploadAttachment + +The *Upload bill attachment* endpoint uploads an attachment and assigns it against a specific `billId`. + +[Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + +**Integration-specific behaviour** + +For more details on supported file types by integration see [Attachments](https://docs.codat.io/sync-for-payables-api#/schemas/Attachment). + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support uploading a bill attachment. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + await codatSyncPayables.bills.uploadAttachment({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "EILBDVJVNUAGVKRQ", + }); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { billsUploadAttachment } from "@codat/sync-for-payables-version-1/funcs/billsUploadAttachment.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); +async function run() { + const res = await billsUploadAttachment(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + billId: "EILBDVJVNUAGVKRQ", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UploadBillAttachmentRequest](../../sdk/models/operations/uploadbillattachmentrequest.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<[operations.ListBillsResponse](../../sdk/models/operations/listbillsresponse.md)>** +**Promise\** + ### Errors -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/previous-versions/sync-for-payables-version-1/docs/sdks/codatsyncpayables/README.md b/previous-versions/sync-for-payables-version-1/docs/sdks/codatsyncpayables/README.md index 7df99c035..9a8b00de8 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdks/codatsyncpayables/README.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdks/codatsyncpayables/README.md @@ -1,6 +1,5 @@ # CodatSyncPayables SDK - ## Overview Sync for Payables: The API for Sync for Payables. @@ -10,26 +9,25 @@ Sync for Payables is an API and a set of supporting tools built to help integrat [Explore product](https://docs.codat.io/payables/overview) | [See OpenAPI spec](https://github.com/codatio/oas) --- - + ## Endpoints -| Endpoints | Description | -|:---------------------|:-----------------------------------------------------------------------------------------------------------| -| Companies | Create and manage your SMB users' companies. | -| Connections | Create new and manage existing data connections for a company. | -| Accounts | Get, create, and update Accounts | -| Bills | Get, create, and update Bills | -| Bill credit notes | Get, create, and update Bill credit notes | -| Bill payments | Get, create, and update Bill payments | -| Journals | Get, create, and update Journals | -| Journal entries | Get, create, and update Journal entries | -| Payment methods | Get, create, and update Payment methods | -| Suppliers | Get, create, and update Suppliers | -| Tax rates | Get, create, and update Tax rates | -| Tracking categories | Get, create, and update Tracking categories | -| Push operations | View historic push operations | -| Company info | View company profile from the source platform. | -| Manage data | Control how data is retrieved from an integration. | - -### Available Operations - +| Endpoints | Description | +| :- |:- | +| Companies | Create and manage your SMB users' companies. | +| Connections | Create new and manage existing data connections for a company. | +| Accounts | Get, create, and update Accounts. | +| Bank accounts | Get, create, and update Bank accounts. | +| Bills | Get, create, and update Bills. | +| Bill credit notes | Get, create, and update Bill credit notes. | +| Bill payments | Get, create, and update Bill payments. | +| Journals | Get, create, and update Journals. | +| Journal entries | Get, create, and update Journal entries. | +| Payment methods | Get, create, and update Payment methods. | +| Suppliers | Get, create, and update Suppliers. | +| Tax rates | Get, create, and update Tax rates. | +| Tracking categories | Get, create, and update Tracking categories. | +| Company info | View company profile from the source platform. | +| Push operations | View historic push operations. | +| Manage data | Control how data is retrieved from an integration. | + \ No newline at end of file diff --git a/previous-versions/sync-for-payables-version-1/docs/sdks/companies/README.md b/previous-versions/sync-for-payables-version-1/docs/sdks/companies/README.md index f936cee44..2744bfcc0 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdks/companies/README.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdks/companies/README.md @@ -3,50 +3,77 @@ ## Overview -Create and manage your Codat companies. +Create and manage your SMB users' companies. ### Available Operations +* [list](#list) - List companies * [create](#create) - Create company +* [update](#update) - Update company * [delete](#delete) - Delete a company * [get](#get) - Get company -* [list](#list) - List companies -* [update](#update) - Update company -## create +## list -Use the *Create company* endpoint to create a new [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) that represents your customer in Codat. +The *List companies* endpoint returns a list of [companies] associated to your instances. A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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. -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 ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); async function run() { - const sdk = new CodatSyncPayables({ - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", - }, + const result = await codatSyncPayables.companies.list({ + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", }); + + // Handle the result + console.log(result) +} - const res = await sdk.companies.create({ - description: "Requested early access to the new financing scheme.", - groups: [ - { - id: "60d2fa12-8a04-11ee-b9d1-0242ac120002", - }, - ], - name: "Bank of Dave", +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { companiesList } from "@codat/sync-for-payables-version-1/funcs/companiesList.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesList(codatSyncPayables, { + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", }); - if (res.statusCode == 200) { - // handle response + if (!res.ok) { + throw res.error; } + + const { value: result } = res; + + // Handle the result + console.log(result) } run(); @@ -54,49 +81,94 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -| `request` | [shared.CompanyRequestBody](../../sdk/models/shared/companyrequestbody.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | - +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListCompaniesRequest](../../sdk/models/operations/listcompaniesrequest.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<[operations.CreateCompanyResponse](../../sdk/models/operations/createcompanyresponse.md)>** +**Promise\<[shared.Companies](../../sdk/models/shared/companies.md)\>** + ### Errors -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | -## delete -The *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company), its [connections](https://docs.codat.io/sync-for-payables-api#/schemas/Connection) and any cached data. This operation is irreversible. +## create + +Use the *Create company* endpoint to create a new [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) that represents your customer in Codat. A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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. +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 ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); async function run() { - const sdk = new CodatSyncPayables({ - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", - }, + const result = await codatSyncPayables.companies.create({ + name: "Technicalium", + description: "Requested early access to the new financing scheme.", + groups: [ + { + id: "60d2fa12-8a04-11ee-b9d1-0242ac120002", + }, + ], }); + + // Handle the result + console.log(result) +} - const res = await sdk.companies.delete({ - companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { companiesCreate } from "@codat/sync-for-payables-version-1/funcs/companiesCreate.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesCreate(codatSyncPayables, { + name: "Technicalium", + description: "Requested early access to the new financing scheme.", + groups: [ + { + id: "60d2fa12-8a04-11ee-b9d1-0242ac120002", + }, + ], }); - if (res.statusCode == 200) { - // handle response + if (!res.ok) { + throw res.error; } + + const { value: result } = res; + + // Handle the result + console.log(result) } run(); @@ -104,49 +176,99 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `request` | [operations.DeleteCompanyRequest](../../sdk/models/operations/deletecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | - +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [shared.CompanyRequestBody](../../sdk/models/shared/companyrequestbody.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<[operations.DeleteCompanyResponse](../../sdk/models/operations/deletecompanyresponse.md)>** +**Promise\<[shared.Company](../../sdk/models/shared/company.md)\>** + ### Errors -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 400,401,402,403,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | -## get -The *Get company* endpoint returns a single company for a given `companyId`. +## update + +Use the *Update company* endpoint to update both the name and description of the company. +If you use [groups](https://docs.codat.io/sync-for-payables-api#/schemas/Group) to manage a set of companies, use the [Add company](https://docs.codat.io/sync-for-payables-api#/operations/add-company-to-group) or [Remove company](https://docs.codat.io/sync-for-payables-api#/operations/remove-company-from-group) endpoints to add or remove a company from a group. A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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 ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); async function run() { - const sdk = new CodatSyncPayables({ - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", + const result = await codatSyncPayables.companies.update({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyRequestBody: { + name: "New Name", + description: "Requested early access to the new financing scheme.", + groups: [ + { + id: "60d2fa12-8a04-11ee-b9d1-0242ac120002", + }, + ], }, }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { companiesUpdate } from "@codat/sync-for-payables-version-1/funcs/companiesUpdate.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); - const res = await sdk.companies.get({ +async function run() { + const res = await companiesUpdate(codatSyncPayables, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + companyRequestBody: { + name: "New Name", + description: "Requested early access to the new financing scheme.", + groups: [ + { + id: "60d2fa12-8a04-11ee-b9d1-0242ac120002", + }, + ], + }, }); - if (res.statusCode == 200) { - // handle response + if (!res.ok) { + throw res.error; } + + const { value: result } = res; + + // Handle the result + console.log(result) } run(); @@ -154,50 +276,77 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -| `request` | [operations.GetCompanyRequest](../../sdk/models/operations/getcompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | - +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateCompanyRequest](../../sdk/models/operations/updatecompanyrequest.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<[operations.GetCompanyResponse](../../sdk/models/operations/getcompanyresponse.md)>** +**Promise\<[shared.Company](../../sdk/models/shared/company.md)\>** + ### Errors -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | -## list -The *List companies* endpoint returns a list of [companies] associated to your instances. +## delete + +The *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company), its [connections](https://docs.codat.io/sync-for-payables-api#/schemas/Connection) and any cached data. This operation is irreversible. A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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 ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); async function run() { - const sdk = new CodatSyncPayables({ - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", - }, + await codatSyncPayables.companies.delete({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); +} - const res = await sdk.companies.list({ - orderBy: "-modifiedDate", - page: 1, - pageSize: 100, +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { companiesDelete } from "@codat/sync-for-payables-version-1/funcs/companiesDelete.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesDelete(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - if (res.statusCode == 200) { - // handle response + if (!res.ok) { + throw res.error; } + + const { value: result } = res; + + } run(); @@ -205,58 +354,81 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `request` | [operations.ListCompaniesRequest](../../sdk/models/operations/listcompaniesrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | - +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteCompanyRequest](../../sdk/models/operations/deletecompanyrequest.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<[operations.ListCompaniesResponse](../../sdk/models/operations/listcompaniesresponse.md)>** +**Promise\** + ### Errors -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | -## update -Use the *Update company* endpoint to update both the name and description of the company. -If you use [groups](https://docs.codat.io/sync-for-payables-api#/schemas/Group) to manage a set of companies, use the [Add company](https://docs.codat.io/sync-for-payables-api#/operations/add-company-to-group) or [Remove company](https://docs.codat.io/sync-for-payables-api#/operations/remove-company-from-group) endpoints to add or remove a company from a group. +## get + +The *Get company* endpoint returns a single company for a given `companyId`. A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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 ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); async function run() { - const sdk = new CodatSyncPayables({ - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", - }, + const result = await codatSyncPayables.companies.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); + + // Handle the result + console.log(result) +} - const res = await sdk.companies.update({ - companyRequestBody: { - description: "Requested early access to the new financing scheme.", - groups: [ - { - id: "60d2fa12-8a04-11ee-b9d1-0242ac120002", - }, - ], - name: "Bank of Dave", - }, +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { companiesGet } from "@codat/sync-for-payables-version-1/funcs/companiesGet.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companiesGet(codatSyncPayables, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", }); - if (res.statusCode == 200) { - // handle response + if (!res.ok) { + throw res.error; } + + const { value: result } = res; + + // Handle the result + console.log(result) } run(); @@ -264,18 +436,20 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `request` | [operations.UpdateCompanyRequest](../../sdk/models/operations/updatecompanyrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | - +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCompanyRequest](../../sdk/models/operations/getcompanyrequest.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<[operations.UpdateCompanyResponse](../../sdk/models/operations/updatecompanyresponse.md)>** +**Promise\<[shared.Company](../../sdk/models/shared/company.md)\>** + ### Errors -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/previous-versions/sync-for-payables-version-1/docs/sdks/companyinfo/README.md b/previous-versions/sync-for-payables-version-1/docs/sdks/companyinfo/README.md new file mode 100644 index 000000000..807d961b0 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdks/companyinfo/README.md @@ -0,0 +1,87 @@ +# CompanyInfo +(*companyInfo*) + +## Overview + +View company profile from the source platform. + +### Available Operations + +* [getAccountingProfile](#getaccountingprofile) - Get company accounting profile + +## getAccountingProfile + +Gets the latest basic info for a company. + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.companyInfo.getAccountingProfile({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { companyInfoGetAccountingProfile } from "@codat/sync-for-payables-version-1/funcs/companyInfoGetAccountingProfile.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await companyInfoGetAccountingProfile(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetAccountingProfileRequest](../../sdk/models/operations/getaccountingprofilerequest.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.CompanyInfo](../../sdk/models/shared/companyinfo.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/previous-versions/sync-for-payables-version-1/docs/sdks/connections/README.md b/previous-versions/sync-for-payables-version-1/docs/sdks/connections/README.md index 8a8a8843f..e55fa47f3 100644 --- a/previous-versions/sync-for-payables-version-1/docs/sdks/connections/README.md +++ b/previous-versions/sync-for-payables-version-1/docs/sdks/connections/README.md @@ -3,44 +3,76 @@ ## Overview -Manage your companies' data connections. +Create new and manage existing data connections for a company. ### Available Operations +* [list](#list) - List connections * [create](#create) - Create connection -* [delete](#delete) - Delete connection * [get](#get) - Get connection -* [list](#list) - List connections +* [delete](#delete) - Delete connection * [unlink](#unlink) - Unlink connection -## create - -Creates a connection for the company by providing a valid `platformKey`. +## list -Use the [List Integrations](https://docs.codat.io/sync-for-payables-api#/operations/list-integrations) endpoint to access valid platform keys. +List the connections for a company. ### Example Usage ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); async function run() { - const sdk = new CodatSyncPayables({ - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", - }, + const result = await codatSyncPayables.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) +} - const res = await sdk.connections.create({ - requestBody: { - platformKey: "gbol", - }, +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { connectionsList } from "@codat/sync-for-payables-version-1/funcs/connectionsList.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await connectionsList(codatSyncPayables, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + page: 1, + pageSize: 100, + query: "id=e3334455-1aed-4e71-ab43-6bccf12092ee", + orderBy: "-modifiedDate", }); - if (res.statusCode == 200) { - // handle response + if (!res.ok) { + throw res.error; } + + const { value: result } = res; + + // Handle the result + console.log(result) } run(); @@ -48,47 +80,85 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `request` | [operations.CreateConnectionRequest](../../sdk/models/operations/createconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | - +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListConnectionsRequest](../../sdk/models/operations/listconnectionsrequest.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<[operations.CreateConnectionResponse](../../sdk/models/operations/createconnectionresponse.md)>** +**Promise\<[shared.Connections](../../sdk/models/shared/connections.md)\>** + ### Errors -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | -## delete -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. +## create + +Creates a connection for the company by providing a valid `platformKey`. + +Use the [List Integrations](https://docs.codat.io/sync-for-payables-api#/operations/list-integrations) endpoint to access valid platform keys. ### Example Usage ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); async function run() { - const sdk = new CodatSyncPayables({ - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", + const result = await codatSyncPayables.connections.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + requestBody: { + platformKey: "gbol", }, }); + + // Handle the result + console.log(result) +} - const res = await sdk.connections.delete({ +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { connectionsCreate } from "@codat/sync-for-payables-version-1/funcs/connectionsCreate.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await connectionsCreate(codatSyncPayables, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestBody: { + platformKey: "gbol", + }, }); - if (res.statusCode == 200) { - // handle response + if (!res.ok) { + throw res.error; } + + const { value: result } = res; + + // Handle the result + console.log(result) } run(); @@ -96,21 +166,24 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `request` | [operations.DeleteConnectionRequest](../../sdk/models/operations/deleteconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | - +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateConnectionRequest](../../sdk/models/operations/createconnectionrequest.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<[operations.DeleteConnectionResponse](../../sdk/models/operations/deleteconnectionresponse.md)>** +**Promise\<[shared.Connection](../../sdk/models/shared/connection.md)\>** + ### Errors -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## get @@ -119,23 +192,53 @@ run(); ### Example Usage ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); async function run() { - const sdk = new CodatSyncPayables({ - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", - }, + const result = await codatSyncPayables.connections.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function - const res = await sdk.connections.get({ +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { connectionsGet } from "@codat/sync-for-payables-version-1/funcs/connectionsGet.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await connectionsGet(codatSyncPayables, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", }); - if (res.statusCode == 200) { - // handle response + if (!res.ok) { + throw res.error; } + + const { value: result } = res; + + // Handle the result + console.log(result) } run(); @@ -143,48 +246,76 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -| `request` | [operations.GetConnectionRequest](../../sdk/models/operations/getconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | - +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetConnectionRequest](../../sdk/models/operations/getconnectionrequest.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<[operations.GetConnectionResponse](../../sdk/models/operations/getconnectionresponse.md)>** +**Promise\<[shared.Connection](../../sdk/models/shared/connection.md)\>** + ### Errors -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | -## list -List the connections for a company. +## delete + +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. ### Example Usage ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); async function run() { - const sdk = new CodatSyncPayables({ - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", - }, + await codatSyncPayables.connections.delete({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", }); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: - const res = await sdk.connections.list({ +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { connectionsDelete } from "@codat/sync-for-payables-version-1/funcs/connectionsDelete.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await connectionsDelete(codatSyncPayables, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", - orderBy: "-modifiedDate", - page: 1, - pageSize: 100, + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", }); - if (res.statusCode == 200) { - // handle response + if (!res.ok) { + throw res.error; } + + const { value: result } = res; + + } run(); @@ -192,21 +323,24 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | -| `request` | [operations.ListConnectionsRequest](../../sdk/models/operations/listconnectionsrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | - +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.DeleteConnectionRequest](../../sdk/models/operations/deleteconnectionrequest.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<[operations.ListConnectionsResponse](../../sdk/models/operations/listconnectionsresponse.md)>** +**Promise\** + ### Errors -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + ## unlink @@ -215,25 +349,59 @@ run(); ### Example Usage ```typescript -import { CodatSyncPayables } from "@codat/sync-for-payables"; -import { DataConnectionStatus } from "@codat/sync-for-payables/dist/sdk/models/shared"; +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); async function run() { - const sdk = new CodatSyncPayables({ - security: { - authHeader: "Basic BASE_64_ENCODED(API_KEY)", + const result = await codatSyncPayables.connections.unlink({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestBody: { + status: "Unlinked", }, }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { connectionsUnlink } from "@codat/sync-for-payables-version-1/funcs/connectionsUnlink.js"; - const res = await sdk.connections.unlink({ - requestBody: {}, +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await connectionsUnlink(codatSyncPayables, { companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + requestBody: { + status: "Unlinked", + }, }); - if (res.statusCode == 200) { - // handle response + if (!res.ok) { + throw res.error; } + + const { value: result } = res; + + // Handle the result + console.log(result) } run(); @@ -241,18 +409,20 @@ run(); ### Parameters -| Parameter | Type | Required | Description | -| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -| `request` | [operations.UnlinkConnectionRequest](../../sdk/models/operations/unlinkconnectionrequest.md) | :heavy_check_mark: | The request object to use for the request. | -| `retries` | [utils.RetryConfig](../../internal/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | -| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. | - +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UnlinkConnectionRequest](../../sdk/models/operations/unlinkconnectionrequest.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<[operations.UnlinkConnectionResponse](../../sdk/models/operations/unlinkconnectionresponse.md)>** +**Promise\<[shared.Connection](../../sdk/models/shared/connection.md)\>** + ### Errors -| Error Object | Status Code | Content Type | -| --------------- | --------------- | --------------- | -| errors.SDKError | 4xx-5xx | */* | +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/previous-versions/sync-for-payables-version-1/docs/sdks/journalentries/README.md b/previous-versions/sync-for-payables-version-1/docs/sdks/journalentries/README.md new file mode 100644 index 000000000..bcb3d8a5c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdks/journalentries/README.md @@ -0,0 +1,298 @@ +# JournalEntries +(*journalEntries*) + +## Overview + +Get, create, and update Journal entries. + +### Available Operations + +* [getCreateModel](#getcreatemodel) - Get create journal entry model +* [create](#create) - Create journal entry + +## getCreateModel + +The *Get create journal entry model* endpoint returns the expected data for the request payload when creating a [journal entry](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry) for a given company and integration. + +[Journal entries](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry) are made in a company's general ledger, or accounts, when transactions are approved. + +**Integration-specific behaviour** + +See the *response examples* for integration-specific indicative models. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journalEntries) for integrations that support creating a journal entry. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.journalEntries.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 { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { journalEntriesGetCreateModel } from "@codat/sync-for-payables-version-1/funcs/journalEntriesGetCreateModel.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await journalEntriesGetCreateModel(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCreateJournalEntryModelRequest](../../sdk/models/operations/getcreatejournalentrymodelrequest.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.PushOption](../../sdk/models/shared/pushoption.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## create + +The *Create journal entry* endpoint creates a new [journal entry](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry) for a given company's connection. + +[Journal entries](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry) are made in a company's general ledger, or accounts, when transactions are approved. + +**Integration-specific behaviour** + +Required data may vary by integration. To see what data to post, first call [Get create journal entry model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-journalEntries-model). + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journalEntries) for integrations that support creating a journal entry. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.journalEntries.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + journalEntry: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + description: "record level description", + postedOn: "2023-02-23T19:49:16.052Z", + createdOn: "2023-02-22T19:49:16.052Z", + updatedOn: "2023-02-21T19:49:16.052Z", + journalRef: { + id: "12", + }, + journalLines: [ + { + description: "journalLines.description debit", + netAmount: new Decimal("23.02"), + currency: "USD", + accountRef: { + id: "80000019-1671793811", + name: "Office Supplies", + }, + tracking: { + recordRefs: [ + { + id: "80000001-1674553252", + dataType: "customers", + }, + ], + }, + }, + { + description: "journalLines.description credit", + netAmount: new Decimal("-23.02"), + currency: "USD", + accountRef: { + id: "8000001E-1671793811", + name: "Utilities", + }, + tracking: { + recordRefs: [ + { + id: "80000002-1674553271", + dataType: "trackingCategories", + }, + ], + }, + }, + ], + recordRef: { + id: "80000002-6722155312", + dataType: "bills", + }, + metadata: { + isDeleted: true, + }, + }, + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { journalEntriesCreate } from "@codat/sync-for-payables-version-1/funcs/journalEntriesCreate.js"; +import { Decimal } from "@codat/sync-for-payables-version-1/sdk/types"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await journalEntriesCreate(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + journalEntry: { + modifiedDate: "2022-10-23T00:00:00Z", + sourceModifiedDate: "2022-10-23T00:00:00Z", + description: "record level description", + postedOn: "2023-02-23T19:49:16.052Z", + createdOn: "2023-02-22T19:49:16.052Z", + updatedOn: "2023-02-21T19:49:16.052Z", + journalRef: { + id: "12", + }, + journalLines: [ + { + description: "journalLines.description debit", + netAmount: new Decimal("23.02"), + currency: "USD", + accountRef: { + id: "80000019-1671793811", + name: "Office Supplies", + }, + tracking: { + recordRefs: [ + { + id: "80000001-1674553252", + dataType: "customers", + }, + ], + }, + }, + { + description: "journalLines.description credit", + netAmount: new Decimal("-23.02"), + currency: "USD", + accountRef: { + id: "8000001E-1671793811", + name: "Utilities", + }, + tracking: { + recordRefs: [ + { + id: "80000002-1674553271", + dataType: "trackingCategories", + }, + ], + }, + }, + ], + recordRef: { + id: "80000002-6722155312", + dataType: "bills", + }, + metadata: { + isDeleted: true, + }, + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateJournalEntryRequest](../../sdk/models/operations/createjournalentryrequest.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.CreateJournalEntryResponse](../../sdk/models/shared/createjournalentryresponse.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/previous-versions/sync-for-payables-version-1/docs/sdks/journals/README.md b/previous-versions/sync-for-payables-version-1/docs/sdks/journals/README.md new file mode 100644 index 000000000..d86dfe064 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdks/journals/README.md @@ -0,0 +1,374 @@ +# Journals +(*journals*) + +## Overview + +Get, create, and update Journals. + +### Available Operations + +* [list](#list) - List journals +* [get](#get) - Get journal +* [getCreateModel](#getcreatemodel) - Get create journal model +* [create](#create) - Create journal + +## list + +The *List journals* endpoint returns a list of [journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) for a given company's connection. + +[Journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) are used to record all the financial transactions of a company. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.journals.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) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { journalsList } from "@codat/sync-for-payables-version-1/funcs/journalsList.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await journalsList(codatSyncPayables, { + 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; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListJournalsRequest](../../sdk/models/operations/listjournalsrequest.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.Journals](../../sdk/models/shared/journals.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## get + +The *Get journal* endpoint returns a single journal for a given `journalId`. + +[Journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) are used to record all the financial transactions of a company. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support getting a specific journal. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.journals.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalId: "", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { journalsGet } from "@codat/sync-for-payables-version-1/funcs/journalsGet.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await journalsGet(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + journalId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetJournalRequest](../../sdk/models/operations/getjournalrequest.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.Journal](../../sdk/models/shared/journal.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## getCreateModel + +The *Get create journal model* endpoint returns the expected data for the request payload when creating a [journal](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) for a given company and integration. + +[Journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) are used to record all the financial transactions of a company. + +**Integration-specific behaviour** + +See the *response examples* for integration-specific indicative models. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support creating a journal. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.journals.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 { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { journalsGetCreateModel } from "@codat/sync-for-payables-version-1/funcs/journalsGetCreateModel.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await journalsGetCreateModel(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCreateJournalModelRequest](../../sdk/models/operations/getcreatejournalmodelrequest.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.PushOption](../../sdk/models/shared/pushoption.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## create + +The *Create journal* endpoint creates a new [journal](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) for a given company's connection. + +[Journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) are used to record all the financial transactions of a company. + +**Integration-specific behaviour** + +Required data may vary by integration. To see what data to post, first call [Get create journal model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-journals-model). + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support creating a journal. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.journals.create({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + journalPrototype: { + createdOn: "2022-10-23T00:00:00Z", + }, + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { journalsCreate } from "@codat/sync-for-payables-version-1/funcs/journalsCreate.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await journalsCreate(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + journalPrototype: { + createdOn: "2022-10-23T00:00:00Z", + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateJournalRequest](../../sdk/models/operations/createjournalrequest.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.CreateJournalResponse](../../sdk/models/shared/createjournalresponse.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/previous-versions/sync-for-payables-version-1/docs/sdks/managedata/README.md b/previous-versions/sync-for-payables-version-1/docs/sdks/managedata/README.md new file mode 100644 index 000000000..580eb46ee --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdks/managedata/README.md @@ -0,0 +1,417 @@ +# ManageData +(*manageData*) + +## Overview + +Control how data is retrieved from an integration. + +### Available Operations + +* [refreshAllDataTypes](#refreshalldatatypes) - Refresh all data +* [get](#get) - Get data status +* [refreshDataType](#refreshdatatype) - Refresh data type +* [listPullOperations](#listpulloperations) - List pull operations +* [getPullOperation](#getpulloperation) - Get pull operation + +## refreshAllDataTypes + +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`. + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + await codatSyncPayables.manageData.refreshAllDataTypes({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { manageDataRefreshAllDataTypes } from "@codat/sync-for-payables-version-1/funcs/manageDataRefreshAllDataTypes.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await manageDataRefreshAllDataTypes(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RefreshAllDataTypesRequest](../../sdk/models/operations/refreshalldatatypesrequest.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\** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## get + +Get the state of each data type for a company + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.manageData.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 { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { manageDataGet } from "@codat/sync-for-payables-version-1/funcs/manageDataGet.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await manageDataGet(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetDataStatusRequest](../../sdk/models/operations/getdatastatusrequest.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\<[operations.GetDataStatusDataStatuses](../../sdk/models/operations/getdatastatusdatastatuses.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## refreshDataType + +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. + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.manageData.refreshDataType({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + dataType: "invoices", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { manageDataRefreshDataType } from "@codat/sync-for-payables-version-1/funcs/manageDataRefreshDataType.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await manageDataRefreshDataType(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + dataType: "invoices", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.RefreshDataTypeRequest](../../sdk/models/operations/refreshdatatyperequest.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.PullOperation](../../sdk/models/shared/pulloperation.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## listPullOperations + +Gets the pull operation history (datasets) for a given company. + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.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) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { manageDataListPullOperations } from "@codat/sync-for-payables-version-1/funcs/manageDataListPullOperations.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await manageDataListPullOperations(codatSyncPayables, { + 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; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListPullOperationsRequest](../../sdk/models/operations/listpulloperationsrequest.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.PullOperations](../../sdk/models/shared/pulloperations.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## getPullOperation + +Retrieve information about a single dataset or pull operation. + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.manageData.getPullOperation({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + datasetId: "7911a54a-c808-4f4b-b87e-b195f52b4da5", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { manageDataGetPullOperation } from "@codat/sync-for-payables-version-1/funcs/manageDataGetPullOperation.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await manageDataGetPullOperation(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + datasetId: "7911a54a-c808-4f4b-b87e-b195f52b4da5", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPullOperationRequest](../../sdk/models/operations/getpulloperationrequest.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.PullOperation](../../sdk/models/shared/pulloperation.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/previous-versions/sync-for-payables-version-1/docs/sdks/paymentmethods/README.md b/previous-versions/sync-for-payables-version-1/docs/sdks/paymentmethods/README.md new file mode 100644 index 000000000..9c2432dc3 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdks/paymentmethods/README.md @@ -0,0 +1,188 @@ +# PaymentMethods +(*paymentMethods*) + +## Overview + +Get, create, and update Payment methods. + +### Available Operations + +* [list](#list) - List payment methods +* [get](#get) - Get payment method + +## list + +The *List payment methods* endpoint returns a list of [payment methods](https://docs.codat.io/sync-for-payables-api#/schemas/PaymentMethod) for a given company's connection. + +[Payment methods](https://docs.codat.io/sync-for-payables-api#/schemas/PaymentMethod) are used to pay a Bill. Payment Methods are referenced on [Bill Payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) and [Payments](https://docs.codat.io/sync-for-payables-api#/schemas/Payment). + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.paymentMethods.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) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { paymentMethodsList } from "@codat/sync-for-payables-version-1/funcs/paymentMethodsList.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await paymentMethodsList(codatSyncPayables, { + 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; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListPaymentMethodsRequest](../../sdk/models/operations/listpaymentmethodsrequest.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.PaymentMethods](../../sdk/models/shared/paymentmethods.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## get + +The *Get payment method* endpoint returns a single payment method for a given `paymentMethodId`. + +[Payment methods](https://docs.codat.io/sync-for-payables-api#/schemas/PaymentMethod) are used to pay a Bill. Payment Methods are referenced on [Bill Payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) and [Payments](https://docs.codat.io/sync-for-payables-api#/schemas/Payment). + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=paymentMethods) for integrations that support getting a specific payment method. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.paymentMethods.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentMethodId: "", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { paymentMethodsGet } from "@codat/sync-for-payables-version-1/funcs/paymentMethodsGet.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await paymentMethodsGet(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + paymentMethodId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPaymentMethodRequest](../../sdk/models/operations/getpaymentmethodrequest.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.PaymentMethod](../../sdk/models/shared/paymentmethod.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/previous-versions/sync-for-payables-version-1/docs/sdks/pushoperations/README.md b/previous-versions/sync-for-payables-version-1/docs/sdks/pushoperations/README.md new file mode 100644 index 000000000..c58fc39d5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdks/pushoperations/README.md @@ -0,0 +1,176 @@ +# PushOperations +(*pushOperations*) + +## Overview + +View historic push operations. + +### Available Operations + +* [list](#list) - List push operations +* [get](#get) - Get push operation + +## list + +List push operation records. + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.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) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { pushOperationsList } from "@codat/sync-for-payables-version-1/funcs/pushOperationsList.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await pushOperationsList(codatSyncPayables, { + 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; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListPushOperationsRequest](../../sdk/models/operations/listpushoperationsrequest.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.PushOperations](../../sdk/models/shared/pushoperations.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## get + +Retrieve push operation. + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.pushOperations.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "b18d8d81-fd7b-4764-a31e-475cb1f36591", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { pushOperationsGet } from "@codat/sync-for-payables-version-1/funcs/pushOperationsGet.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await pushOperationsGet(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + pushOperationKey: "b18d8d81-fd7b-4764-a31e-475cb1f36591", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetPushOperationRequest](../../sdk/models/operations/getpushoperationrequest.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.PushOperation](../../sdk/models/shared/pushoperation.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/previous-versions/sync-for-payables-version-1/docs/sdks/suppliers/README.md b/previous-versions/sync-for-payables-version-1/docs/sdks/suppliers/README.md new file mode 100644 index 000000000..e97683597 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdks/suppliers/README.md @@ -0,0 +1,551 @@ +# Suppliers +(*suppliers*) + +## Overview + +Get, create, and update Suppliers. + +### Available Operations + +* [list](#list) - List suppliers +* [get](#get) - Get supplier +* [getCreateUpdateModel](#getcreateupdatemodel) - Get create/update supplier model +* [create](#create) - Create supplier +* [update](#update) - Update supplier + +## list + +The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) for a given company's connection. + +[Suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.suppliers.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) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { suppliersList } from "@codat/sync-for-payables-version-1/funcs/suppliersList.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersList(codatSyncPayables, { + 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; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +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 Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,409,429,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-payables-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support getting a specific supplier. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.suppliers.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { suppliersGet } from "@codat/sync-for-payables-version-1/funcs/suppliersGet.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersGet(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + supplierId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetSupplierRequest](../../sdk/models/operations/getsupplierrequest.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.Supplier](../../sdk/models/shared/supplier.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## getCreateUpdateModel + +The *Get create/update supplier model* endpoint returns the expected data for the request payload when creating and updating a [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) for a given company and integration. + +[Suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + +**Integration-specific behaviour** + +See the *response examples* for integration-specific indicative models. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating and updating a supplier. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.suppliers.getCreateUpdateModel({ + 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 { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { suppliersGetCreateUpdateModel } from "@codat/sync-for-payables-version-1/funcs/suppliersGetCreateUpdateModel.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersGetCreateUpdateModel(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetCreateUpdateSupplierModelRequest](../../sdk/models/operations/getcreateupdatesuppliermodelrequest.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.PushOption](../../sdk/models/shared/pushoption.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| --------------------------- | --------------------------- | --------------------------- | +| errors.ErrorMessage | 401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## create + +The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) for a given company's connection. + +[Suppliers](https://docs.codat.io/sync-for-payables-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-payables-api#/operations/get-create-update-suppliers-model). + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating a supplier. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.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: "73593", + supplierName: "test 20230420 1004", + contactName: "Joe Bloggs", + phone: "(877) 492-8687", + status: "Active", + }, + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { suppliersCreate } from "@codat/sync-for-payables-version-1/funcs/suppliersCreate.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersCreate(codatSyncPayables, { + 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: "73593", + supplierName: "test 20230420 1004", + contactName: "Joe Bloggs", + phone: "(877) 492-8687", + status: "Active", + }, + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.CreateSupplierRequest](../../sdk/models/operations/createsupplierrequest.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.CreateSupplierResponse](../../sdk/models/shared/createsupplierresponse.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## update + +The *Update supplier* endpoint updates an existing [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) for a given company's connection. + +[Suppliers](https://docs.codat.io/sync-for-payables-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-payables-api#/operations/get-create-update-suppliers-model). + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating a supplier. + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.suppliers.update({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + supplierId: "", + 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": "", + }, + }, + }, + }, + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { suppliersUpdate } from "@codat/sync-for-payables-version-1/funcs/suppliersUpdate.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await suppliersUpdate(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + connectionId: "2e9d2c44-f675-40ba-8049-353bfcb5e171", + supplierId: "", + 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) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.UpdateSupplierRequest](../../sdk/models/operations/updatesupplierrequest.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.UpdateSupplierResponse](../../sdk/models/shared/updatesupplierresponse.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/previous-versions/sync-for-payables-version-1/docs/sdks/taxrates/README.md b/previous-versions/sync-for-payables-version-1/docs/sdks/taxrates/README.md new file mode 100644 index 000000000..faf2fc955 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdks/taxrates/README.md @@ -0,0 +1,188 @@ +# TaxRates +(*taxRates*) + +## Overview + +Get, create, and update Tax rates. + +### Available Operations + +* [list](#list) - List all tax rates +* [get](#get) - Get tax rate + +## list + +The *List tax rates* endpoint returns a list of [tax rates](https://docs.codat.io/sync-for-payables-api#/schemas/TaxRate) for a given company's connection. + +[Tax rates](https://docs.codat.io/sync-for-payables-api#/schemas/TaxRate) are a set of taxes and associated rates within the SMB's accounting software. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.taxRates.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) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { taxRatesList } from "@codat/sync-for-payables-version-1/funcs/taxRatesList.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await taxRatesList(codatSyncPayables, { + 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; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListTaxRatesRequest](../../sdk/models/operations/listtaxratesrequest.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.TaxRates](../../sdk/models/shared/taxrates.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## get + +The *Get tax rate* endpoint returns a single tax rate for a given `taxRateId`. + +[Tax rates](https://docs.codat.io/sync-for-payables-api#/schemas/TaxRate) are a set of taxes and associated rates within the SMB's accounting software. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=taxRates) for integrations that support getting a specific tax rate. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.taxRates.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + taxRateId: "", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { taxRatesGet } from "@codat/sync-for-payables-version-1/funcs/taxRatesGet.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await taxRatesGet(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + taxRateId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTaxRateRequest](../../sdk/models/operations/gettaxraterequest.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.TaxRate](../../sdk/models/shared/taxrate.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/previous-versions/sync-for-payables-version-1/docs/sdks/trackingcategories/README.md b/previous-versions/sync-for-payables-version-1/docs/sdks/trackingcategories/README.md new file mode 100644 index 000000000..be8348112 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/docs/sdks/trackingcategories/README.md @@ -0,0 +1,188 @@ +# TrackingCategories +(*trackingCategories*) + +## Overview + +Get, create, and update Tracking categories. + +### Available Operations + +* [list](#list) - List tracking categories +* [get](#get) - Get tracking categories + +## list + +The *List tracking categories* endpoint returns a list of [tracking categories](https://docs.codat.io/sync-for-payables-api#/schemas/TrackingCategory) for a given company's connection. + +[Tracking categories](https://docs.codat.io/sync-for-payables-api#/schemas/TrackingCategory) are used to monitor cost centres and control budgets that sit outside the standard set of accounts. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.trackingCategories.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) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { trackingCategoriesList } from "@codat/sync-for-payables-version-1/funcs/trackingCategoriesList.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await trackingCategoriesList(codatSyncPayables, { + 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; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.ListTrackingCategoriesRequest](../../sdk/models/operations/listtrackingcategoriesrequest.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.TrackingCategories](../../sdk/models/shared/trackingcategories.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | +| errors.ErrorMessage | 400,401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | + + +## get + +The *Get tracking category* endpoint returns a single tracking category for a given `trackingCategoryId`. + +[Tracking categories](https://docs.codat.io/sync-for-payables-api#/schemas/TrackingCategory) are used to monitor cost centres and control budgets that sit outside the standard set of accounts. + +Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=trackingCategories) for integrations that support getting a specific tracking category. + +Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + + +### Example Usage + +```typescript +import { CodatSyncPayables } from "@codat/sync-for-payables-version-1"; + +const codatSyncPayables = new CodatSyncPayables({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const result = await codatSyncPayables.trackingCategories.get({ + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + trackingCategoryId: "", + }); + + // Handle the result + console.log(result) +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { CodatSyncPayablesCore } from "@codat/sync-for-payables-version-1/core.js"; +import { trackingCategoriesGet } from "@codat/sync-for-payables-version-1/funcs/trackingCategoriesGet.js"; + +// Use `CodatSyncPayablesCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const codatSyncPayables = new CodatSyncPayablesCore({ + authHeader: "Basic BASE_64_ENCODED(API_KEY)", +}); + +async function run() { + const res = await trackingCategoriesGet(codatSyncPayables, { + companyId: "8a210b68-6988-11ed-a1eb-0242ac120002", + trackingCategoryId: "", + }); + + if (!res.ok) { + throw res.error; + } + + const { value: result } = res; + + // Handle the result + console.log(result) +} + +run(); +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `request` | [operations.GetTrackingCategoryRequest](../../sdk/models/operations/gettrackingcategoryrequest.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.TrackingCategoryTree](../../sdk/models/shared/trackingcategorytree.md)\>** + +### Errors + +| Error Object | Status Code | Content Type | +| ------------------------------- | ------------------------------- | ------------------------------- | +| errors.ErrorMessage | 401,402,403,404,409,429,500,503 | application/json | +| errors.SDKError | 4xx-5xx | */* | diff --git a/previous-versions/sync-for-payables-version-1/jest.config.js b/previous-versions/sync-for-payables-version-1/jest.config.js deleted file mode 100644 index e45198852..000000000 --- a/previous-versions/sync-for-payables-version-1/jest.config.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - preset: "ts-jest", - testEnvironment: "node", - testPathIgnorePatterns: [ - "/__tests__/helpers.ts", - "/__tests__/common_helpers.ts", - ], -}; diff --git a/previous-versions/sync-for-payables-version-1/jsr.json b/previous-versions/sync-for-payables-version-1/jsr.json new file mode 100644 index 000000000..1424ee786 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/jsr.json @@ -0,0 +1,27 @@ + + +{ + "name": "@codat/sync-for-payables-version-1", + "version": "2.3.0", + "exports": { + ".": "./src/index.ts", + "./sdk/models/errors": "./src/sdk/models/errors/index.ts", + "./sdk/models/shared": "./src/sdk/models/shared/index.ts", + "./sdk/models/operations": "./src/sdk/models/operations/index.ts", + "./lib/config": "./src/lib/config.ts", + "./lib/http": "./src/lib/http.ts", + "./lib/retries": "./src/lib/retries.ts", + "./lib/sdks": "./src/lib/sdks.ts", + "./types": "./src/sdk/types/index.ts" + }, + "publish": { + "include": [ + "LICENSE", + "README.md", + "RUNTIMES.md", + "USAGE.md", + "jsr.json", + "src/**/*.ts" + ] + } +} diff --git a/previous-versions/sync-for-payables-version-1/package-lock.json b/previous-versions/sync-for-payables-version-1/package-lock.json index 49f748553..65f448851 100644 --- a/previous-versions/sync-for-payables-version-1/package-lock.json +++ b/previous-versions/sync-for-payables-version-1/package-lock.json @@ -1,8809 +1,3372 @@ { - "name": "@codat/sync-for-payables", - "version": "2.2.0", - "lockfileVersion": 2, + "name": "@codat/sync-for-payables-version-1", + "version": "2.3.0", + "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@codat/sync-for-payables", - "version": "2.2.0", + "name": "@codat/sync-for-payables-version-1", + "version": "2.3.0", "dependencies": { - "axios": "^1.1.3", - "class-transformer": "^0.5.1", - "form-data": "^4.0.0", - "reflect-metadata": "^0.1.13" + "decimal.js": "^10.4.3" }, "devDependencies": { - "@types/node": "^18.11.5", - "@types/jsonpath": "^0.2.0", - "@typescript-eslint/eslint-plugin": "^5.56.0", - "@typescript-eslint/parser": "^5.56.0", - "eslint": "^8.36.0", - "typescript": "^4.8.4" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@types/node": "^18.19.3", + "@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" }, - "engines": { - "node": ">=6.0.0" + "peerDependencies": { + "zod": ">= 3" } }, - "node_modules/@babel/code-frame": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz", - "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.18.6" + "eslint-visitor-keys": "^3.3.0" }, "engines": { - "node": ">=6.9.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/@babel/compat-data": { - "version": "7.22.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.3.tgz", - "integrity": "sha512-aNtko9OPOwVESUFp3MZfD8Uzxl7JzSeJpd7npIoxCasU37PFbAQRpKglkaKwlHOyeJdrREpo8TW8ldrkYWwvIQ==", + "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==", "dev": true, + "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@babel/core": { - "version": "7.22.1", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.1.tgz", - "integrity": "sha512-Hkqu7J4ynysSXxmAahpN1jjRwVJ+NdpraFLIWflgjpVob3KNyK3/tIUc7Q7szed8WMp0JNa7Qtd1E9Oo22F9gA==", + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, + "license": "MIT", "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.21.4", - "@babel/generator": "^7.22.0", - "@babel/helper-compilation-targets": "^7.22.1", - "@babel/helper-module-transforms": "^7.22.1", - "@babel/helpers": "^7.22.0", - "@babel/parser": "^7.22.0", - "@babel/template": "^7.21.9", - "@babel/traverse": "^7.22.1", - "@babel/types": "^7.22.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.0" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" }, "engines": { - "node": ">=6.9.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" + "url": "https://opencollective.com/eslint" } }, - "node_modules/@babel/generator": { - "version": "7.22.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.3.tgz", - "integrity": "sha512-C17MW4wlk//ES/CJDL51kPNwl+qiBQyN7b9SKyVp11BLGFeSPoVaHrv+MNt8jwQFhQWowW88z1eeBx3pFz9v8A==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.22.3", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.22.1", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.1.tgz", - "integrity": "sha512-Rqx13UM3yVB5q0D/KwQ8+SPfX/+Rnsy1Lw1k/UwOC4KC6qrzIQoY3lYnBu5EHKBlEHHcj0M0W8ltPSkD8rqfsQ==", + "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==", "dev": true, + "license": "ISC", "dependencies": { - "@babel/compat-data": "^7.22.0", - "@babel/helper-validator-option": "^7.21.0", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" + "node": "*" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.1", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.1.tgz", - "integrity": "sha512-Z2tgopurB/kTbidvzeBrc2To3PUP/9i5MUe+fU6QJCQDyPwSH2oRapkLw3KGECDYSjhQZCNxEvNvZlLw8JjGwA==", + "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==", "dev": true, + "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@babel/helper-function-name": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz", - "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", + "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", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@babel/template": "^7.20.7", - "@babel/types": "^7.21.0" + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" }, "engines": { - "node": ">=6.9.0" + "node": ">=10.10.0" } }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/@babel/helper-module-imports": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz", - "integrity": "sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==", + "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==", "dev": true, + "license": "ISC", "dependencies": { - "@babel/types": "^7.21.4" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=6.9.0" + "node": "*" } }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.22.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.1.tgz", - "integrity": "sha512-dxAe9E7ySDGbQdCVOY/4+UcD8M9ZFqZcZhSPsPacvCG4M+9lwtDDQfI2EoaSvmf7W/8yCBkGU0m7Pvt1ru3UZw==", + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.1", - "@babel/helper-module-imports": "^7.21.4", - "@babel/helper-simple-access": "^7.21.5", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.21.9", - "@babel/traverse": "^7.22.1", - "@babel/types": "^7.22.0" - }, + "license": "Apache-2.0", "engines": { - "node": ">=6.9.0" + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz", - "integrity": "sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg==", + "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, - "engines": { - "node": ">=6.9.0" - } + "license": "BSD-3-Clause" }, - "node_modules/@babel/helper-simple-access": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.21.5.tgz", - "integrity": "sha512-ENPDAMC1wAjR0uaCUwliBdiSl1KBJAVnMTzXqi64c2MG8MPR6ii4qf7bSXDqSFbr4W6W028/rf5ivoHop5/mkg==", + "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": { - "@babel/types": "^7.21.5" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, "engines": { - "node": ">=6.9.0" + "node": ">= 8" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", + "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==", "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, + "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": ">= 8" } }, - "node_modules/@babel/helper-string-parser": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz", - "integrity": "sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==", + "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==", "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, "engines": { - "node": ">=6.9.0" + "node": ">= 8" } }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "node_modules/@nolyfill/is-core-module": { + "version": "1.0.39", + "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz", + "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==", "dev": true, + "license": "MIT", "engines": { - "node": ">=6.9.0" + "node": ">=12.4.0" } }, - "node_modules/@babel/helper-validator-option": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz", - "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==", + "node_modules/@rtsao/scc": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", + "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", "dev": true, - "engines": { - "node": ">=6.9.0" - } + "license": "MIT" }, - "node_modules/@babel/helpers": { - "version": "7.22.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.3.tgz", - "integrity": "sha512-jBJ7jWblbgr7r6wYZHMdIqKc73ycaTcCaWRq4/2LpuPHcx7xMlZvpGQkOYc9HeSjn6rcx15CPlgVcBtZ4WZJ2w==", + "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==", "dev": true, - "dependencies": { - "@babel/template": "^7.21.9", - "@babel/traverse": "^7.22.1", - "@babel/types": "^7.22.3" - }, - "engines": { - "node": ">=6.9.0" - } + "license": "MIT" }, - "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "node_modules/@types/node": { + "version": "18.19.50", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.50.tgz", + "integrity": "sha512-xonK+NRrMBRtkL1hVCc3G+uXtjh1Al4opBLjqVmipe5ZAaBYWW6cNAiBVZ1BvmkBhep698rP3UM3aRAdSALuhg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" + "undici-types": "~5.26.4" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz", + "integrity": "sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/type-utils": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": ">=4" + "node": "^18.18.0 || >=20.0.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 + } } }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "node_modules/@typescript-eslint/parser": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "debug": "^4.3.4" }, "engines": { - "node": ">=4" + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "node_modules/@typescript-eslint/scope-manager": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", "dev": true, + "license": "MIT", "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" + }, "engines": { - "node": ">=4" + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/@typescript-eslint/type-utils": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", + "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", "dev": true, + "license": "MIT", "dependencies": { - "has-flag": "^3.0.0" + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/utils": "7.18.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" }, "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/parser": { - "version": "7.22.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.4.tgz", - "integrity": "sha512-VLLsx06XkEYqBtE5YGPwfSGwfrjnyPP5oiGty3S8pQLFDFLaS8VwWSIxkTXpcvr5zeYLE6+MBNl2npl/YnfofA==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" + "node": "^18.18.0 || >=20.0.0" }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "eslint": "^8.56.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "node_modules/@typescript-eslint/types": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", + "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" + "license": "MIT", + "engines": { + "node": "^18.18.0 || >=20.0.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "node_modules/@typescript-eslint/typescript-estree": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", + "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "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" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "node_modules/@typescript-eslint/utils": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", + "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "7.18.0", + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "eslint": "^8.56.0" } }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.21.4.tgz", - "integrity": "sha512-5hewiLct5OKyh6PLKEYaFclcqtIgCb6bmELouxjF6up5q3Sov7rOayW4RwhbaBL0dit8rA80GNfY+UuDp2mBbQ==", + "node_modules/@typescript-eslint/visitor-keys": { + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", + "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@typescript-eslint/types": "7.18.0", + "eslint-visitor-keys": "^3.4.3" }, "engines": { - "node": ">=6.9.0" + "node": "^18.18.0 || >=20.0.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "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, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "license": "ISC" }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "license": "MIT", + "bin": { + "acorn": "bin/acorn" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "engines": { + "node": ">=0.4.0" } }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "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, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, + "license": "MIT", "peerDependencies": { - "@babel/core": "^7.0.0-0" + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "license": "MIT", + "engines": { + "node": ">=8" } }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "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": { - "@babel/helper-plugin-utils": "^7.14.5" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=6.9.0" + "node": ">=8" }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.21.4.tgz", - "integrity": "sha512-xz0D39NvhQn4t4RNsHmDnnsaQizIlUkdtYvLs8La1BlfjQ6JEwxkJGeqJMW2tAXx+q6H+WFuUTXNdYVpEya0YA==", + "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, - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } + "license": "Python-2.0" }, - "node_modules/@babel/template": { - "version": "7.21.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.21.9.tgz", - "integrity": "sha512-MK0X5k8NKOuWRamiEfc3KEJiHMTkGZNUjzMipqCGDDc6ijRl/B7RGSKVGncu4Ro/HdyzzY6cmoXuKI2Gffk7vQ==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.21.4", - "@babel/parser": "^7.21.9", - "@babel/types": "^7.21.5" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" }, "engines": { - "node": ">=6.9.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@babel/traverse": { - "version": "7.22.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.4.tgz", - "integrity": "sha512-Tn1pDsjIcI+JcLKq1AVlZEr4226gpuAQTsLMorsYg9tuS/kG7nuwwJ4AB8jfQuEgb/COBwR/DqJxmoiYFu5/rQ==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.21.4", - "@babel/generator": "^7.22.3", - "@babel/helper-environment-visitor": "^7.22.1", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.22.4", - "@babel/types": "^7.22.4", - "debug": "^4.1.0", - "globals": "^11.1.0" + "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" }, "engines": { - "node": ">=6.9.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@babel/traverse/node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "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==", "dev": true, + "license": "MIT", "engines": { - "node": ">=4" + "node": ">=8" } }, - "node_modules/@babel/types": { - "version": "7.22.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.4.tgz", - "integrity": "sha512-Tx9x3UBHTTsMSW85WB2kphxYQVvrZ/t1FxD88IpSgIjiUJlCm9z+xWIDwyo1vffTwSqteqyznB8ZE9vYYk16zA==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.21.5", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" + "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" }, "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" + "node": ">= 0.4" }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "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==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">= 0.4" }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.1.tgz", - "integrity": "sha512-BISJ6ZE4xQsuL/FmsyRaiffpq977bMlsKfGHTQrOGFErfByxIe6iZTxPf/00Zon9b9a7iUykfQwejN3s2ZW/Bw==", - "dev": true, - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@eslint/eslintrc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.1.tgz", - "integrity": "sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.5.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">= 0.4" }, "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint/js": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.36.0.tgz", - "integrity": "sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" + "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" }, "engines": { - "node": ">=10.10.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "engines": { - "node": ">=12.22" + "node": ">= 0.4" }, "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" + "possible-typed-array-names": "^1.0.0" }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "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, - "dependencies": { - "sprintf-js": "~1.0.2" - } + "license": "MIT" }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "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==", "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "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" }, - "bin": { - "js-yaml": "bin/js-yaml.js" + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=6" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { - "p-try": "^2.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=6" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { - "p-limit": "^2.2.0" + "color-name": "~1.1.4" }, "engines": { - "node": ">=8" + "node": ">=7.0.0" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true, - "engines": { - "node": ">=8" - } + "license": "MIT" }, - "node_modules/@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true, - "engines": { - "node": ">=8" - } + "license": "MIT" }, - "node_modules/@jest/console": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.5.0.tgz", - "integrity": "sha512-NEpkObxPwyw/XxZVLPmAGKE89IQRp4puc6IQRPru6JKd1M3fW9v1xM1AnzIJE65hbCkzQAdnL8P47e9hzhiYLQ==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/types": "^29.5.0", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.5.0", - "jest-util": "^29.5.0", - "slash": "^3.0.0" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 8" } }, - "node_modules/@jest/core": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.5.0.tgz", - "integrity": "sha512-28UzQc7ulUrOQw1IsN/kv1QES3q2kkbl/wGslyhAclqZ/8cMdB5M68BffkIdSJgKBUt50d3hbwJ92XESlE7LiQ==", + "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": { - "@jest/console": "^29.5.0", - "@jest/reporters": "^29.5.0", - "@jest/test-result": "^29.5.0", - "@jest/transform": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.5.0", - "jest-config": "^29.5.0", - "jest-haste-map": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.5.0", - "jest-resolve-dependencies": "^29.5.0", - "jest-runner": "^29.5.0", - "jest-runtime": "^29.5.0", - "jest-snapshot": "^29.5.0", - "jest-util": "^29.5.0", - "jest-validate": "^29.5.0", - "jest-watcher": "^29.5.0", - "micromatch": "^4.0.4", - "pretty-format": "^29.5.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + "engines": { + "node": ">= 0.4" }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@jest/environment": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.5.0.tgz", - "integrity": "sha512-5FXw2+wD29YU1d4I2htpRX7jYnAyTRjP2CsXQdo9SAM8g3ifxWPSV0HnClSn71xwctr0U3oZIIH+dtbfmnbXVQ==", + "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": { - "@jest/fake-timers": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/node": "*", - "jest-mock": "^29.5.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@jest/expect": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.5.0.tgz", - "integrity": "sha512-PueDR2HGihN3ciUNGr4uelropW7rqUfTiOn+8u0leg/42UhblPxHkfoh0Ruu3I9Y1962P3u2DY4+h7GVTSVU6g==", + "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": { - "expect": "^29.5.0", - "jest-snapshot": "^29.5.0" + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@jest/expect-utils": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.5.0.tgz", - "integrity": "sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg==", + "node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, + "license": "MIT", "dependencies": { - "jest-get-type": "^29.4.3" + "ms": "^2.1.3" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/@jest/fake-timers": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.5.0.tgz", - "integrity": "sha512-9ARvuAAQcBwDAqOnglWq2zwNIRUDtk/SCkp/ToGEhFv5r86K21l+VEs0qNTaXtyiY0lEePl3kylijSYJQqdbDg==", + "node_modules/decimal.js": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "license": "MIT" + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "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": { - "@jest/types": "^29.5.0", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.5.0", - "jest-mock": "^29.5.0", - "jest-util": "^29.5.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@jest/globals": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.5.0.tgz", - "integrity": "sha512-S02y0qMWGihdzNbUiqSAiKSpSozSuHX5UYc7QbnHP+D9Lyw8DgGGCinrN9uSuHPeKgSSzvPom2q1nAtBvUsvPQ==", + "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": { - "@jest/environment": "^29.5.0", - "@jest/expect": "^29.5.0", - "@jest/types": "^29.5.0", - "jest-mock": "^29.5.0" + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/@jest/reporters": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.5.0.tgz", - "integrity": "sha512-D05STXqj/M8bP9hQNSICtPqz97u7ffGzZu+9XLucXhkOFBqKcXe04JLZOgIekOxdb73MAoBUFnqvf7MCpKk5OA==", - "dev": true, - "dependencies": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.5.0", - "@jest/test-result": "^29.5.0", - "@jest/transform": "^29.5.0", - "@jest/types": "^29.5.0", - "@jridgewell/trace-mapping": "^0.3.15", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.5.0", - "jest-util": "^29.5.0", - "jest-worker": "^29.5.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + "node": ">= 0.4" }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@jest/schemas": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.4.3.tgz", - "integrity": "sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==", + "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": { - "@sinclair/typebox": "^0.25.16" + "path-type": "^4.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=8" } }, - "node_modules/@jest/source-map": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.4.3.tgz", - "integrity": "sha512-qyt/mb6rLyd9j1jUts4EQncvS6Yy3PM9HghnNv86QBlV+zdL2inCdK1tuVlL+J+lpiw2BI67qXOrX3UurBqQ1w==", + "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": { - "@jridgewell/trace-mapping": "^0.3.15", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" + "esutils": "^2.0.2" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=6.0.0" } }, - "node_modules/@jest/test-result": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.5.0.tgz", - "integrity": "sha512-fGl4rfitnbfLsrfx1uUpDEESS7zM8JdgZgOCQuxQvL1Sn/I6ijeAVQWGfXI9zb1i9Mzo495cIpVZhA0yr60PkQ==", + "node_modules/enhanced-resolve": { + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/console": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=10.13.0" } }, - "node_modules/@jest/test-sequencer": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.5.0.tgz", - "integrity": "sha512-yPafQEcKjkSfDXyvtgiV4pevSeyuA6MQr6ZIdVkWJly9vkqjnFfcfhRQqpD5whjoU8EORki752xQmjaqoFjzMQ==", - "dev": true, - "dependencies": { - "@jest/test-result": "^29.5.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.5.0", - "slash": "^3.0.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": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@jest/transform": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.5.0.tgz", - "integrity": "sha512-8vbeZWqLJOvHaDfeMuoHITGKSz5qWc9u04lnWrQE3VyuSw604PzQM824ZeX9XSjUCeDiE3GuxZe5UKa8J61NQw==", + "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": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.5.0", - "@jridgewell/trace-mapping": "^0.3.15", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.5.0", - "jest-regex-util": "^29.4.3", - "jest-util": "^29.5.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" + "get-intrinsic": "^1.2.4" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 0.4" } }, - "node_modules/@jest/types": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.5.0.tgz", - "integrity": "sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog==", + "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, - "dependencies": { - "@jest/schemas": "^29.4.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - }, + "license": "MIT", "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 0.4" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "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": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "es-errors": "^1.3.0" }, "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, - "engines": { - "node": ">=6.0.0" + "node": ">= 0.4" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "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": ">=6.0.0" + "node": ">= 0.4" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "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": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "hasown": "^2.0.0" } }, - "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, - "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==", + "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": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" }, "engines": { - "node": ">= 8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "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/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { - "node": ">= 8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "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/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, + "license": "MIT", "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "@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", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "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", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "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" + }, + "bin": { + "eslint": "bin/eslint.js" }, "engines": { - "node": ">= 8" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@sinclair/typebox": { - "version": "0.25.24", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.24.tgz", - "integrity": "sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==", - "dev": true - }, - "node_modules/@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", + "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": { - "type-detect": "4.0.8" + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" } }, - "node_modules/@sinonjs/fake-timers": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.2.0.tgz", - "integrity": "sha512-OPwQlEdg40HAj5KNF8WW6q2KG4Z+cBCZb3m4ninfTZKaBmbIJodviQsDBoYMPHkOyJJMHnOJo5j2+LKDOhOACg==", + "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": { - "@sinonjs/commons": "^3.0.0" + "ms": "^2.1.1" } }, - "node_modules/@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "dev": true - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true - }, - "node_modules/@types/babel__core": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz", - "integrity": "sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==", + "node_modules/eslint-import-resolver-typescript": { + "version": "3.6.3", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.3.tgz", + "integrity": "sha512-ud9aw4szY9cCT1EWWdGv1L1XR6hh2PaRWif0j2QjQ0pgTY/69iw+W0Z4qZv5wHahOl8isEr+k/JnyAqNQkLkIA==", "dev": true, + "license": "ISC", "dependencies": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" + "@nolyfill/is-core-module": "1.0.39", + "debug": "^4.3.5", + "enhanced-resolve": "^5.15.0", + "eslint-module-utils": "^2.8.1", + "fast-glob": "^3.3.2", + "get-tsconfig": "^4.7.5", + "is-bun-module": "^1.0.2", + "is-glob": "^4.0.3" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*", + "eslint-plugin-import-x": "*" + }, + "peerDependenciesMeta": { + "eslint-plugin-import": { + "optional": true + }, + "eslint-plugin-import-x": { + "optional": true + } } }, - "node_modules/@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", + "node_modules/eslint-module-utils": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.11.0.tgz", + "integrity": "sha512-gbBE5Hitek/oG6MUVj6sFuzEjA/ClzNflVrLovHi/JgLdC7fiN5gLAY1WIPW1a0V5I999MnsrvVrCOGmmVqDBQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.0.0" + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } }, - "node_modules/@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" + "ms": "^2.1.1" } }, - "node_modules/@types/babel__traverse": { - "version": "7.20.0", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.0.tgz", - "integrity": "sha512-TBOjqAGf0hmaqRwpii5LLkJLg7c6OMm4nHLmpsUxwk9bBHtoTC6dAHdVWdGv4TBxj2CZOZY8Xfq8WmfoVi7n4Q==", + "node_modules/eslint-plugin-import": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.30.0.tgz", + "integrity": "sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.20.7" + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.8", + "array.prototype.findlastindex": "^1.2.5", + "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.9.0", + "hasown": "^2.0.2", + "is-core-module": "^2.15.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.0", + "semver": "^6.3.1", + "tsconfig-paths": "^3.15.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" } }, - "node_modules/@types/graceful-fs": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", - "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", + "node_modules/eslint-plugin-import/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": { - "@types/node": "*" + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" } }, - "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", - "dev": true - }, - "node_modules/@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "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": { - "@types/istanbul-lib-coverage": "*" + "ms": "^2.1.1" } }, - "node_modules/@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "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==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@types/istanbul-lib-report": "*" + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true - }, - "node_modules/@types/jsonpath": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@types/jsonpath/-/jsonpath-0.2.0.tgz", - "integrity": "sha512-v7qlPA0VpKUlEdhghbDqRoKMxFB3h3Ch688TApBJ6v+XLDdvWCGLJIYiPKGZnS6MAOie+IorCfNYVHOPIHSWwQ==", - "dev": true - }, - "node_modules/@types/node": { - "version": "18.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", - "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==", - "dev": true - }, - "node_modules/@types/prettier": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", - "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", - "dev": true - }, - "node_modules/@types/semver": { - "version": "7.3.13", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", - "dev": true - }, - "node_modules/@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", - "dev": true - }, - "node_modules/@types/yargs": { - "version": "17.0.24", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", - "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", + "node_modules/eslint-plugin-import/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": { - "@types/yargs-parser": "*" + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "node_modules/@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", - "dev": true + "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/@typescript-eslint/eslint-plugin": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.56.0.tgz", - "integrity": "sha512-ZNW37Ccl3oMZkzxrYDUX4o7cnuPgU+YrcaYXzsRtLB16I1FR5SHMqga3zGsaSliZADCWo2v8qHWqAYIj8nWCCg==", + "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==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.56.0", - "@typescript-eslint/type-utils": "5.56.0", - "@typescript-eslint/utils": "5.56.0", - "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "url": "https://opencollective.com/eslint" } }, - "node_modules/@typescript-eslint/parser": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.56.0.tgz", - "integrity": "sha512-sn1OZmBxUsgxMmR8a8U5QM/Wl+tyqlH//jTqCg8daTAmhAk26L2PFhcqPLlYBhYUJMZJK276qLXlHN3a83o2cg==", + "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, - "dependencies": { - "@typescript-eslint/scope-manager": "5.56.0", - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/typescript-estree": "5.56.0", - "debug": "^4.3.4" - }, + "license": "Apache-2.0", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "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" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "engines": { + "node": "*" } }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.56.0.tgz", - "integrity": "sha512-jGYKyt+iBakD0SA5Ww8vFqGpoV2asSjwt60Gl6YcO8ksQ8s2HlUEyHBMSa38bdLopYqGf7EYQMUIGdT/Luw+sw==", + "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": { - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/visitor-keys": "5.56.0" + "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" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "url": "https://opencollective.com/eslint" } }, - "node_modules/@typescript-eslint/type-utils": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.56.0.tgz", - "integrity": "sha512-8WxgOgJjWRy6m4xg9KoSHPzBNZeQbGlQOH7l2QEhQID/+YseaFxg5J/DLwWSsi9Axj4e/cCiKx7PVzOq38tY4A==", + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { - "@typescript-eslint/typescript-estree": "5.56.0", - "@typescript-eslint/utils": "5.56.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" + "estraverse": "^5.1.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "*" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">=0.10" } }, - "node_modules/@typescript-eslint/types": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.56.0.tgz", - "integrity": "sha512-JyAzbTJcIyhuUhogmiu+t79AkdnqgPUEsxMTMc/dCZczGMJQh1MK2wgrju++yMN6AWroVAy2jxyPcPr3SWCq5w==", + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "engines": { + "node": ">=4.0" } }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.56.0.tgz", - "integrity": "sha512-41CH/GncsLXOJi0jb74SnC7jVPWeVJ0pxQj8bOjH1h2O26jXN3YHKDT1ejkVz5YeTEQPeLCCRY0U2r68tfNOcg==", + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "dependencies": { - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/visitor-keys": "5.56.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - }, + "license": "BSD-2-Clause", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">=4.0" } }, - "node_modules/@typescript-eslint/utils": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.56.0.tgz", - "integrity": "sha512-XhZDVdLnUJNtbzaJeDSCIYaM+Tgr59gZGbFuELgF7m0IY03PlciidS7UQNKLE0+WpUTn1GlycEr6Ivb/afjbhA==", + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.56.0", - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/typescript-estree": "5.56.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - }, + "license": "BSD-2-Clause", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "node": ">=0.10.0" } }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.56.0.tgz", - "integrity": "sha512-1mFdED7u5bZpX6Xxf5N9U2c18sb+8EvU3tyOIj6LQZ5OOvnmj8BVeNNP603OFPm5KkS1a7IvCIcwrdHXaEMG/Q==", + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "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": { - "@typescript-eslint/types": "5.56.0", - "eslint-visitor-keys": "^3.3.0" + "@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": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "node": ">=8.6.0" } }, - "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "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, - "bin": { - "acorn": "bin/acorn" + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" }, "engines": { - "node": ">=0.4.0" + "node": ">= 6" } }, - "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==", + "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", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", "dev": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } + "license": "MIT" }, - "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true, - "engines": { - "node": ">=0.4.0" - } + "license": "MIT" }, - "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/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": { - "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" + "reusify": "^1.0.4" } }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "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": { - "type-fest": "^0.21.3" + "flat-cache": "^3.0.4" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "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==", "dev": true, - "engines": { - "node": ">=10" + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "engines": { "node": ">=8" } }, - "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/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" }, "engines": { - "node": ">= 8" + "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, - "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 + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true, + "license": "ISC" }, - "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/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", "dev": true, - "engines": { - "node": ">=8" + "license": "MIT", + "dependencies": { + "is-callable": "^1.1.3" } }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + "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/axios": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.1.3.tgz", - "integrity": "sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA==", - "dependencies": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" + "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==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/babel-jest": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.5.0.tgz", - "integrity": "sha512-mA4eCDh5mSo2EcA9xQjVTpmbbNk32Zb3Q3QFQsNhaK56Q+yoXowzFodLux30HRgyOho5rsQ6B0P9QpMkvvnJ0Q==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "@jest/transform": "^29.5.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.5.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 0.4" }, - "peerDependencies": { - "@babel/core": "^7.8.0" + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" }, "engines": { - "node": ">=8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/babel-plugin-jest-hoist": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz", - "integrity": "sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", - "dev": true, - "dependencies": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" + "node_modules/get-tsconfig": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.8.1.tgz", + "integrity": "sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, - "node_modules/babel-preset-jest": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz", - "integrity": "sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg==", + "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", "dev": true, + "license": "ISC", "dependencies": { - "babel-plugin-jest-hoist": "^29.5.0", - "babel-preset-current-node-syntax": "^1.0.0" + "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" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "*" }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "funding": { + "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 + "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": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } }, - "node_modules/brace-expansion": { + "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==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "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==", "dev": true, + "license": "ISC", "dependencies": { - "fill-range": "^7.0.1" + "brace-expansion": "^1.1.7" }, "engines": { - "node": ">=8" + "node": "*" } }, - "node_modules/browserslist": { - "version": "4.21.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.7.tgz", - "integrity": "sha512-BauCXrQ7I2ftSqd2mvKHGo85XR0u7Ru3C/Hxsy/0TkfCtjrmAbPdzLGasmoiBxplpDXlPvdjX9u7srIMfgasNA==", + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], + "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001489", - "electron-to-chromium": "^1.4.411", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" - }, - "bin": { - "browserslist": "cli.js" + "type-fest": "^0.20.2" }, "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/bs-logger": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", - "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "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==", "dev": true, + "license": "MIT", "dependencies": { - "fast-json-stable-stringify": "2.x" + "define-properties": "^1.2.1", + "gopd": "^1.0.1" }, "engines": { - "node": ">= 6" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, + "license": "MIT", "dependencies": { - "node-int64": "^0.4.0" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true, + "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" + }, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", "dev": true, - "engines": { - "node": ">=6" + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/caniuse-lite": { - "version": "1.0.30001492", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001492.tgz", - "integrity": "sha512-2efF8SAZwgAX1FJr87KWhvuJxnGJKOnctQa8xLOskAXNXq8oiuqgl6u1kk3fFpsp3GgvzlRjiK1sl63hNtFADw==", + "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==", "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ] + "license": "ISC" }, - "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } + "license": "MIT" }, - "node_modules/char-regex": { + "node_modules/has-bigints": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, - "engines": { - "node": ">=10" + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/ci-info": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "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, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", - "dev": true - }, - "node_modules/class-transformer": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz", - "integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==" - }, - "node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "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": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" + "es-define-property": "^1.0.0" }, - "engines": { - "node": ">=12" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "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": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", - "dev": true - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "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, - "dependencies": { - "color-name": "~1.1.4" - }, + "license": "MIT", "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" + "node": ">= 0.4" }, - "engines": { - "node": ">= 0.8" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, - "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==", + "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": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" + "has-symbols": "^1.0.3" }, "engines": { - "node": ">= 8" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "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": { - "ms": "2.1.2" + "function-bind": "^1.1.2" }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">= 0.4" } }, - "node_modules/dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" - }, - "node_modules/deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, + "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">= 4" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "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": ">=0.4.0" + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "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": ">=8" + "node": ">=0.8.19" } }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "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, - "engines": { - "node": ">=0.3.1" + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" } }, - "node_modules/diff-sequences": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", - "integrity": "sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==", + "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, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } + "license": "ISC" }, - "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==", + "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": { - "path-type": "^4.0.0" + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" }, "engines": { - "node": ">=8" + "node": ">= 0.4" } }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "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": { - "esutils": "^2.0.2" + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" }, "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.4.414", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.414.tgz", - "integrity": "sha512-RRuCvP6ekngVh2SAJaOKT/hxqc9JAsK+Pe0hP5tGQIfonU2Zy9gMGdJ+mBdyl/vNucMG6gkXYtuM4H/1giws5w==", - "dev": true - }, - "node_modules/emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", - "dev": true, - "engines": { - "node": ">=12" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "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": { - "is-arrayish": "^0.2.1" + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "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": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/escodegen": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", - "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=4.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/escodegen/node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/escodegen/node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/escodegen/node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "dependencies": { - "prelude-ls": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/eslint": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.36.0.tgz", - "integrity": "sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==", - "dev": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.1", - "@eslint/js": "8.36.0", - "@humanwhocodes/config-array": "^0.11.8", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.5.0", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", - "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.1", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" - }, - "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-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", - "dev": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/eslint/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/espree": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.0.tgz", - "integrity": "sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==", - "dev": true, - "dependencies": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esprima": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz", - "integrity": "sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A==", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esquery/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expect": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.5.0.tgz", - "integrity": "sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg==", - "dev": true, - "dependencies": { - "@jest/expect-utils": "^29.5.0", - "jest-get-type": "^29.4.3", - "jest-matcher-utils": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-util": "^29.5.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, - "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, - "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", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" - }, - "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dev": true, - "dependencies": { - "bser": "2.1.1" - } - }, - "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, - "dependencies": { - "flat-cache": "^3.0.4" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - }, - "engines": { - "node": "^10.12.0 || >=12.0.0" - } - }, - "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - }, - "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "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 - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "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" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "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, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "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" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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==", - "dev": true - }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "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, - "engines": { - "node": ">=8" - } - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true, - "engines": { - "node": ">=10.17.0" - } - }, - "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true, - "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, - "dependencies": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "dependencies": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - }, - "bin": { - "import-local-fixture": "fixtures/cli.js" - }, - "engines": { - "node": ">=8" - }, - "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, - "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==", - "dev": true, - "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 - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "node_modules/is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "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, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "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, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "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, - "engines": { - "node": ">=0.12.0" - } - }, - "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, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", - "dev": true, - "dependencies": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "dependencies": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", - "dev": true, - "dependencies": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.5.0.tgz", - "integrity": "sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ==", - "dev": true, - "dependencies": { - "@jest/core": "^29.5.0", - "@jest/types": "^29.5.0", - "import-local": "^3.0.2", - "jest-cli": "^29.5.0" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-changed-files": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.5.0.tgz", - "integrity": "sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==", - "dev": true, - "dependencies": { - "execa": "^5.0.0", - "p-limit": "^3.1.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-circus": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.5.0.tgz", - "integrity": "sha512-gq/ongqeQKAplVxqJmbeUOJJKkW3dDNPY8PjhJ5G0lBRvu0e3EWGxGy5cI4LAGA7gV2UHCtWBI4EMXK8c9nQKA==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.5.0", - "@jest/expect": "^29.5.0", - "@jest/test-result": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.5.0", - "jest-matcher-utils": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-runtime": "^29.5.0", - "jest-snapshot": "^29.5.0", - "jest-util": "^29.5.0", - "p-limit": "^3.1.0", - "pretty-format": "^29.5.0", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-cli": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.5.0.tgz", - "integrity": "sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw==", - "dev": true, - "dependencies": { - "@jest/core": "^29.5.0", - "@jest/test-result": "^29.5.0", - "@jest/types": "^29.5.0", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^29.5.0", - "jest-util": "^29.5.0", - "jest-validate": "^29.5.0", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - }, - "bin": { - "jest": "bin/jest.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" - }, - "peerDependenciesMeta": { - "node-notifier": { - "optional": true - } - } - }, - "node_modules/jest-config": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.5.0.tgz", - "integrity": "sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.5.0", - "@jest/types": "^29.5.0", - "babel-jest": "^29.5.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.5.0", - "jest-environment-node": "^29.5.0", - "jest-get-type": "^29.4.3", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.5.0", - "jest-runner": "^29.5.0", - "jest-util": "^29.5.0", - "jest-validate": "^29.5.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.5.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@types/node": "*", - "ts-node": ">=9.0.0" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - }, - "ts-node": { - "optional": true - } - } - }, - "node_modules/jest-diff": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.5.0.tgz", - "integrity": "sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.4.3", - "jest-get-type": "^29.4.3", - "pretty-format": "^29.5.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-docblock": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.4.3.tgz", - "integrity": "sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==", - "dev": true, - "dependencies": { - "detect-newline": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-each": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.5.0.tgz", - "integrity": "sha512-HM5kIJ1BTnVt+DQZ2ALp3rzXEl+g726csObrW/jpEGl+CDSSQpOJJX2KE/vEg8cxcMXdyEPu6U4QX5eruQv5hA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.5.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.4.3", - "jest-util": "^29.5.0", - "pretty-format": "^29.5.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-environment-node": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.5.0.tgz", - "integrity": "sha512-ExxuIK/+yQ+6PRGaHkKewYtg6hto2uGCgvKdb2nfJfKXgZ17DfXjvbZ+jA1Qt9A8EQSfPnt5FKIfnOO3u1h9qw==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.5.0", - "@jest/fake-timers": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/node": "*", - "jest-mock": "^29.5.0", - "jest-util": "^29.5.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-get-type": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.4.3.tgz", - "integrity": "sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-haste-map": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.5.0.tgz", - "integrity": "sha512-IspOPnnBro8YfVYSw6yDRKh/TiCdRngjxeacCps1cQ9cgVN6+10JUcuJ1EabrgYLOATsIAigxA0rLR9x/YlrSA==", - "dev": true, - "dependencies": { - "@jest/types": "^29.5.0", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.4.3", - "jest-util": "^29.5.0", - "jest-worker": "^29.5.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "optionalDependencies": { - "fsevents": "^2.3.2" - } - }, - "node_modules/jest-leak-detector": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.5.0.tgz", - "integrity": "sha512-u9YdeeVnghBUtpN5mVxjID7KbkKE1QU4f6uUwuxiY0vYRi9BUCLKlPEZfDGR67ofdFmDz9oPAy2G92Ujrntmow==", - "dev": true, - "dependencies": { - "jest-get-type": "^29.4.3", - "pretty-format": "^29.5.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-matcher-utils": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.5.0.tgz", - "integrity": "sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "jest-diff": "^29.5.0", - "jest-get-type": "^29.4.3", - "pretty-format": "^29.5.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-message-util": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.5.0.tgz", - "integrity": "sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.5.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.5.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-mock": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.5.0.tgz", - "integrity": "sha512-GqOzvdWDE4fAV2bWQLQCkujxYWL7RxjCnj71b5VhDAGOevB3qj3Ovg26A5NI84ZpODxyzaozXLOh2NCgkbvyaw==", - "dev": true, - "dependencies": { - "@jest/types": "^29.5.0", - "@types/node": "*", - "jest-util": "^29.5.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "engines": { - "node": ">=6" - }, - "peerDependencies": { - "jest-resolve": "*" - }, - "peerDependenciesMeta": { - "jest-resolve": { - "optional": true - } - } - }, - "node_modules/jest-regex-util": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.4.3.tgz", - "integrity": "sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==", - "dev": true, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.5.0.tgz", - "integrity": "sha512-1TzxJ37FQq7J10jPtQjcc+MkCkE3GBpBecsSUWJ0qZNJpmg6m0D9/7II03yJulm3H/fvVjgqLh/k2eYg+ui52w==", - "dev": true, - "dependencies": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.5.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.5.0", - "jest-validate": "^29.5.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-resolve-dependencies": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.5.0.tgz", - "integrity": "sha512-sjV3GFr0hDJMBpYeUuGduP+YeCRbd7S/ck6IvL3kQ9cpySYKqcqhdLLC2rFwrcL7tz5vYibomBrsFYWkIGGjOg==", - "dev": true, - "dependencies": { - "jest-regex-util": "^29.4.3", - "jest-snapshot": "^29.5.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runner": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.5.0.tgz", - "integrity": "sha512-m7b6ypERhFghJsslMLhydaXBiLf7+jXy8FwGRHO3BGV1mcQpPbwiqiKUR2zU2NJuNeMenJmlFZCsIqzJCTeGLQ==", - "dev": true, - "dependencies": { - "@jest/console": "^29.5.0", - "@jest/environment": "^29.5.0", - "@jest/test-result": "^29.5.0", - "@jest/transform": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.4.3", - "jest-environment-node": "^29.5.0", - "jest-haste-map": "^29.5.0", - "jest-leak-detector": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-resolve": "^29.5.0", - "jest-runtime": "^29.5.0", - "jest-util": "^29.5.0", - "jest-watcher": "^29.5.0", - "jest-worker": "^29.5.0", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-runtime": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.5.0.tgz", - "integrity": "sha512-1Hr6Hh7bAgXQP+pln3homOiEZtCDZFqwmle7Ew2j8OlbkIu6uE3Y/etJQG8MLQs3Zy90xrp2C0BRrtPHG4zryw==", - "dev": true, - "dependencies": { - "@jest/environment": "^29.5.0", - "@jest/fake-timers": "^29.5.0", - "@jest/globals": "^29.5.0", - "@jest/source-map": "^29.4.3", - "@jest/test-result": "^29.5.0", - "@jest/transform": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-mock": "^29.5.0", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.5.0", - "jest-snapshot": "^29.5.0", - "jest-util": "^29.5.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-snapshot": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.5.0.tgz", - "integrity": "sha512-x7Wolra5V0tt3wRs3/ts3S6ciSQVypgGQlJpz2rsdQYoUKxMxPNaoHMGJN6qAuPJqS+2iQ1ZUn5kl7HCyls84g==", - "dev": true, - "dependencies": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.5.0", - "@jest/transform": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.5.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.5.0", - "jest-get-type": "^29.4.3", - "jest-matcher-utils": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-util": "^29.5.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.5.0", - "semver": "^7.3.5" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-util": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.5.0.tgz", - "integrity": "sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.5.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.5.0.tgz", - "integrity": "sha512-pC26etNIi+y3HV8A+tUGr/lph9B18GnzSRAkPaaZJIE1eFdiYm6/CewuiJQ8/RlfHd1u/8Ioi8/sJ+CmbA+zAQ==", - "dev": true, - "dependencies": { - "@jest/types": "^29.5.0", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.4.3", - "leven": "^3.1.0", - "pretty-format": "^29.5.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-validate/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/jest-watcher": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.5.0.tgz", - "integrity": "sha512-KmTojKcapuqYrKDpRwfqcQ3zjMlwu27SYext9pt4GlF5FUgB+7XE1mcCnSm6a4uUpFyQIkb6ZhzZvHl+jiBCiA==", - "dev": true, - "dependencies": { - "@jest/test-result": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.5.0", - "string-length": "^4.0.1" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.5.0.tgz", - "integrity": "sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA==", - "dev": true, - "dependencies": { - "@types/node": "*", - "jest-util": "^29.5.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/js-sdsl": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", - "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", - "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, - "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==", - "dev": 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, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true - }, - "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 - }, - "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 - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonpath": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.1.1.tgz", - "integrity": "sha512-l6Cg7jRpixfbgoWgkrl77dgEj8RPvND0wMH6TwQmi9Qs4TFfS9u5cUFnbeKTwj5ga5Y3BTGGNI28k117LJ009w==", - "dependencies": { - "esprima": "1.2.2", - "static-eval": "2.0.2", - "underscore": "1.12.1" - } - }, - "node_modules/kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "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, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "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, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", - "dev": true - }, - "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 - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, - "node_modules/makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", - "dev": true, - "dependencies": { - "tmpl": "1.0.5" - } - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "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, - "engines": { - "node": ">= 8" - } - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "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, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "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 - }, - "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 - }, - "node_modules/natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, - "node_modules/node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true - }, - "node_modules/node-releases": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", - "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==", - "dev": true - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "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, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", - "dev": true, - "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.3" - }, - "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, - "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, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "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, - "dependencies": { - "callsites": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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, - "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, - "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, - "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 - }, - "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, - "engines": { - "node": ">=8" - } - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "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, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/pretty-format": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.5.0.tgz", - "integrity": "sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==", - "dev": true, - "dependencies": { - "@jest/schemas": "^29.4.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/pretty-format/node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", - "dev": true, - "dependencies": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, - "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pure-rand": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.2.tgz", - "integrity": "sha512-6Yg0ekpKICSjPswYOuC5sku/TSWaRYlA0qsXqJgM/d/4pLPHPuTxK7Nbf7jFKzAeedUhR8C7K9Uv63FBsSo8xQ==", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/dubzzz" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/fast-check" - } - ] - }, - "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" - } - ] - }, - "node_modules/react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "node_modules/reflect-metadata": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", - "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", - "dev": true, - "dependencies": { - "is-core-module": "^2.11.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-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", - "dev": true, - "dependencies": { - "resolve-from": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/resolve-cwd/node_modules/resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "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, - "engines": { - "node": ">=4" - } - }, - "node_modules/resolve.exports": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", - "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "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, - "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==", - "dev": true, - "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" - } - ], - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "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, - "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==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "devOptional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, - "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "node_modules/stack-utils": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/stack-utils/node_modules/escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/static-eval": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.2.tgz", - "integrity": "sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==", - "dependencies": { - "escodegen": "^1.8.1" - } - }, - "node_modules/string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", - "dev": true, - "dependencies": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "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==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "dependencies": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "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==", - "dev": true - }, - "node_modules/tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "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==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/ts-jest": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.0.tgz", - "integrity": "sha512-ZhNr7Z4PcYa+JjMl62ir+zPiNJfXJN6E8hSLnaUKhOgqcn8vb3e537cpkd0FuAfRK3sR1LSqM1MOhliXNgOFPA==", - "dev": true, - "dependencies": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^29.0.0", - "json5": "^2.2.3", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "^21.0.1" - }, - "bin": { - "ts-jest": "cli.js" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - }, - "peerDependencies": { - "@babel/core": ">=7.0.0-beta.0 <8", - "@jest/types": "^29.0.0", - "babel-jest": "^29.0.0", - "jest": "^29.0.0", - "typescript": ">=4.3 <6" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - }, - "@jest/types": { - "optional": true - }, - "babel-jest": { - "optional": true - }, - "esbuild": { - "optional": true - } - } - }, - "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "dev": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, - "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "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, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "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==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/typescript": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", - "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/underscore": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", - "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" - }, - "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "update-browserslist-db": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true - }, - "node_modules/v8-to-istanbul": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", - "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" - }, - "engines": { - "node": ">=10.12.0" - } - }, - "node_modules/v8-to-istanbul/node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - }, - "node_modules/walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", - "dev": true, - "dependencies": { - "makeerror": "1.0.12" - } - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "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 - }, - "node_modules/write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - }, - "dependencies": { - "@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", - "dev": true, - "requires": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@babel/code-frame": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.21.4.tgz", - "integrity": "sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==", - "dev": true, - "requires": { - "@babel/highlight": "^7.18.6" - } - }, - "@babel/compat-data": { - "version": "7.22.3", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.3.tgz", - "integrity": "sha512-aNtko9OPOwVESUFp3MZfD8Uzxl7JzSeJpd7npIoxCasU37PFbAQRpKglkaKwlHOyeJdrREpo8TW8ldrkYWwvIQ==", - "dev": true - }, - "@babel/core": { - "version": "7.22.1", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.1.tgz", - "integrity": "sha512-Hkqu7J4ynysSXxmAahpN1jjRwVJ+NdpraFLIWflgjpVob3KNyK3/tIUc7Q7szed8WMp0JNa7Qtd1E9Oo22F9gA==", - "dev": true, - "requires": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.21.4", - "@babel/generator": "^7.22.0", - "@babel/helper-compilation-targets": "^7.22.1", - "@babel/helper-module-transforms": "^7.22.1", - "@babel/helpers": "^7.22.0", - "@babel/parser": "^7.22.0", - "@babel/template": "^7.21.9", - "@babel/traverse": "^7.22.1", - "@babel/types": "^7.22.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.0" - }, - "dependencies": { - "convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "@babel/generator": { - "version": "7.22.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.3.tgz", - "integrity": "sha512-C17MW4wlk//ES/CJDL51kPNwl+qiBQyN7b9SKyVp11BLGFeSPoVaHrv+MNt8jwQFhQWowW88z1eeBx3pFz9v8A==", - "dev": true, - "requires": { - "@babel/types": "^7.22.3", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - } - }, - "@babel/helper-compilation-targets": { - "version": "7.22.1", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.1.tgz", - "integrity": "sha512-Rqx13UM3yVB5q0D/KwQ8+SPfX/+Rnsy1Lw1k/UwOC4KC6qrzIQoY3lYnBu5EHKBlEHHcj0M0W8ltPSkD8rqfsQ==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.22.0", - "@babel/helper-validator-option": "^7.21.0", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" - }, - "dependencies": { - "lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "requires": { - "yallist": "^3.0.2" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true - } - } - }, - "@babel/helper-environment-visitor": { - "version": "7.22.1", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.1.tgz", - "integrity": "sha512-Z2tgopurB/kTbidvzeBrc2To3PUP/9i5MUe+fU6QJCQDyPwSH2oRapkLw3KGECDYSjhQZCNxEvNvZlLw8JjGwA==", - "dev": true - }, - "@babel/helper-function-name": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz", - "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", - "dev": true, - "requires": { - "@babel/template": "^7.20.7", - "@babel/types": "^7.21.0" - } - }, - "@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-module-imports": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz", - "integrity": "sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==", - "dev": true, - "requires": { - "@babel/types": "^7.21.4" - } - }, - "@babel/helper-module-transforms": { - "version": "7.22.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.1.tgz", - "integrity": "sha512-dxAe9E7ySDGbQdCVOY/4+UcD8M9ZFqZcZhSPsPacvCG4M+9lwtDDQfI2EoaSvmf7W/8yCBkGU0m7Pvt1ru3UZw==", - "dev": true, - "requires": { - "@babel/helper-environment-visitor": "^7.22.1", - "@babel/helper-module-imports": "^7.21.4", - "@babel/helper-simple-access": "^7.21.5", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.21.9", - "@babel/traverse": "^7.22.1", - "@babel/types": "^7.22.0" - } - }, - "@babel/helper-plugin-utils": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz", - "integrity": "sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg==", - "dev": true - }, - "@babel/helper-simple-access": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.21.5.tgz", - "integrity": "sha512-ENPDAMC1wAjR0uaCUwliBdiSl1KBJAVnMTzXqi64c2MG8MPR6ii4qf7bSXDqSFbr4W6W028/rf5ivoHop5/mkg==", - "dev": true, - "requires": { - "@babel/types": "^7.21.5" - } - }, - "@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", - "dev": true, - "requires": { - "@babel/types": "^7.18.6" - } - }, - "@babel/helper-string-parser": { - "version": "7.21.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz", - "integrity": "sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==", - "dev": true - }, - "@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", - "dev": true - }, - "@babel/helper-validator-option": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz", - "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==", - "dev": true - }, - "@babel/helpers": { - "version": "7.22.3", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.3.tgz", - "integrity": "sha512-jBJ7jWblbgr7r6wYZHMdIqKc73ycaTcCaWRq4/2LpuPHcx7xMlZvpGQkOYc9HeSjn6rcx15CPlgVcBtZ4WZJ2w==", - "dev": true, - "requires": { - "@babel/template": "^7.21.9", - "@babel/traverse": "^7.22.1", - "@babel/types": "^7.22.3" - } - }, - "@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "@babel/parser": { - "version": "7.22.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.4.tgz", - "integrity": "sha512-VLLsx06XkEYqBtE5YGPwfSGwfrjnyPP5oiGty3S8pQLFDFLaS8VwWSIxkTXpcvr5zeYLE6+MBNl2npl/YnfofA==", - "dev": true - }, - "@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.12.13" - } - }, - "@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-jsx": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.21.4.tgz", - "integrity": "sha512-5hewiLct5OKyh6PLKEYaFclcqtIgCb6bmELouxjF6up5q3Sov7rOayW4RwhbaBL0dit8rA80GNfY+UuDp2mBbQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.20.2" - } - }, - "@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } - }, - "@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.14.5" - } - }, - "@babel/plugin-syntax-typescript": { - "version": "7.21.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.21.4.tgz", - "integrity": "sha512-xz0D39NvhQn4t4RNsHmDnnsaQizIlUkdtYvLs8La1BlfjQ6JEwxkJGeqJMW2tAXx+q6H+WFuUTXNdYVpEya0YA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.20.2" - } - }, - "@babel/template": { - "version": "7.21.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.21.9.tgz", - "integrity": "sha512-MK0X5k8NKOuWRamiEfc3KEJiHMTkGZNUjzMipqCGDDc6ijRl/B7RGSKVGncu4Ro/HdyzzY6cmoXuKI2Gffk7vQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.21.4", - "@babel/parser": "^7.21.9", - "@babel/types": "^7.21.5" - } - }, - "@babel/traverse": { - "version": "7.22.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.4.tgz", - "integrity": "sha512-Tn1pDsjIcI+JcLKq1AVlZEr4226gpuAQTsLMorsYg9tuS/kG7nuwwJ4AB8jfQuEgb/COBwR/DqJxmoiYFu5/rQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.21.4", - "@babel/generator": "^7.22.3", - "@babel/helper-environment-visitor": "^7.22.1", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.22.4", - "@babel/types": "^7.22.4", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "dependencies": { - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - } - } - }, - "@babel/types": { - "version": "7.22.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.4.tgz", - "integrity": "sha512-Tx9x3UBHTTsMSW85WB2kphxYQVvrZ/t1FxD88IpSgIjiUJlCm9z+xWIDwyo1vffTwSqteqyznB8ZE9vYYk16zA==", - "dev": true, - "requires": { - "@babel/helper-string-parser": "^7.21.5", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - } - }, - "@bcoe/v8-coverage": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", - "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", - "dev": true - }, - "@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "dependencies": { - "@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - } - } - }, - "@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==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^3.3.0" - } - }, - "@eslint-community/regexpp": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.1.tgz", - "integrity": "sha512-BISJ6ZE4xQsuL/FmsyRaiffpq977bMlsKfGHTQrOGFErfByxIe6iZTxPf/00Zon9b9a7iUykfQwejN3s2ZW/Bw==", - "dev": true - }, - "@eslint/eslintrc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.1.tgz", - "integrity": "sha512-eFRmABvW2E5Ho6f5fHLqgena46rOj7r7OKHYfLElqcBfGFHHpjBhivyi5+jOEQuSpdc/1phIZJlbC2te+tZNIw==", - "dev": true, - "requires": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.5.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" - } - }, - "@eslint/js": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.36.0.tgz", - "integrity": "sha512-lxJ9R5ygVm8ZWgYdUweoq5ownDlJ4upvoWmO4eLxBYHdMo+vZ/Rx0EN6MbKWDJOSUGrqJy2Gt+Dyv/VKml0fjg==", - "dev": true - }, - "@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", - "dev": true, - "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - } - }, - "@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true - }, - "@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", - "dev": true - }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } - } - }, - "@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true - }, - "@jest/console": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.5.0.tgz", - "integrity": "sha512-NEpkObxPwyw/XxZVLPmAGKE89IQRp4puc6IQRPru6JKd1M3fW9v1xM1AnzIJE65hbCkzQAdnL8P47e9hzhiYLQ==", - "dev": true, - "requires": { - "@jest/types": "^29.5.0", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^29.5.0", - "jest-util": "^29.5.0", - "slash": "^3.0.0" - } - }, - "@jest/core": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.5.0.tgz", - "integrity": "sha512-28UzQc7ulUrOQw1IsN/kv1QES3q2kkbl/wGslyhAclqZ/8cMdB5M68BffkIdSJgKBUt50d3hbwJ92XESlE7LiQ==", - "dev": true, - "requires": { - "@jest/console": "^29.5.0", - "@jest/reporters": "^29.5.0", - "@jest/test-result": "^29.5.0", - "@jest/transform": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^29.5.0", - "jest-config": "^29.5.0", - "jest-haste-map": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.5.0", - "jest-resolve-dependencies": "^29.5.0", - "jest-runner": "^29.5.0", - "jest-runtime": "^29.5.0", - "jest-snapshot": "^29.5.0", - "jest-util": "^29.5.0", - "jest-validate": "^29.5.0", - "jest-watcher": "^29.5.0", - "micromatch": "^4.0.4", - "pretty-format": "^29.5.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "@jest/environment": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.5.0.tgz", - "integrity": "sha512-5FXw2+wD29YU1d4I2htpRX7jYnAyTRjP2CsXQdo9SAM8g3ifxWPSV0HnClSn71xwctr0U3oZIIH+dtbfmnbXVQ==", - "dev": true, - "requires": { - "@jest/fake-timers": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/node": "*", - "jest-mock": "^29.5.0" - } - }, - "@jest/expect": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.5.0.tgz", - "integrity": "sha512-PueDR2HGihN3ciUNGr4uelropW7rqUfTiOn+8u0leg/42UhblPxHkfoh0Ruu3I9Y1962P3u2DY4+h7GVTSVU6g==", - "dev": true, - "requires": { - "expect": "^29.5.0", - "jest-snapshot": "^29.5.0" - } - }, - "@jest/expect-utils": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.5.0.tgz", - "integrity": "sha512-fmKzsidoXQT2KwnrwE0SQq3uj8Z763vzR8LnLBwC2qYWEFpjX8daRsk6rHUM1QvNlEW/UJXNXm59ztmJJWs2Mg==", - "dev": true, - "requires": { - "jest-get-type": "^29.4.3" - } - }, - "@jest/fake-timers": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.5.0.tgz", - "integrity": "sha512-9ARvuAAQcBwDAqOnglWq2zwNIRUDtk/SCkp/ToGEhFv5r86K21l+VEs0qNTaXtyiY0lEePl3kylijSYJQqdbDg==", - "dev": true, - "requires": { - "@jest/types": "^29.5.0", - "@sinonjs/fake-timers": "^10.0.2", - "@types/node": "*", - "jest-message-util": "^29.5.0", - "jest-mock": "^29.5.0", - "jest-util": "^29.5.0" - } - }, - "@jest/globals": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.5.0.tgz", - "integrity": "sha512-S02y0qMWGihdzNbUiqSAiKSpSozSuHX5UYc7QbnHP+D9Lyw8DgGGCinrN9uSuHPeKgSSzvPom2q1nAtBvUsvPQ==", - "dev": true, - "requires": { - "@jest/environment": "^29.5.0", - "@jest/expect": "^29.5.0", - "@jest/types": "^29.5.0", - "jest-mock": "^29.5.0" - } - }, - "@jest/reporters": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.5.0.tgz", - "integrity": "sha512-D05STXqj/M8bP9hQNSICtPqz97u7ffGzZu+9XLucXhkOFBqKcXe04JLZOgIekOxdb73MAoBUFnqvf7MCpKk5OA==", - "dev": true, - "requires": { - "@bcoe/v8-coverage": "^0.2.3", - "@jest/console": "^29.5.0", - "@jest/test-result": "^29.5.0", - "@jest/transform": "^29.5.0", - "@jest/types": "^29.5.0", - "@jridgewell/trace-mapping": "^0.3.15", - "@types/node": "*", - "chalk": "^4.0.0", - "collect-v8-coverage": "^1.0.0", - "exit": "^0.1.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-instrument": "^5.1.0", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.1.3", - "jest-message-util": "^29.5.0", - "jest-util": "^29.5.0", - "jest-worker": "^29.5.0", - "slash": "^3.0.0", - "string-length": "^4.0.1", - "strip-ansi": "^6.0.0", - "v8-to-istanbul": "^9.0.1" - } - }, - "@jest/schemas": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.4.3.tgz", - "integrity": "sha512-VLYKXQmtmuEz6IxJsrZwzG9NvtkQsWNnWMsKxqWNu3+CnfzJQhp0WDDKWLVV9hLKr0l3SLLFRqcYHjhtyuDVxg==", - "dev": true, - "requires": { - "@sinclair/typebox": "^0.25.16" - } - }, - "@jest/source-map": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.4.3.tgz", - "integrity": "sha512-qyt/mb6rLyd9j1jUts4EQncvS6Yy3PM9HghnNv86QBlV+zdL2inCdK1tuVlL+J+lpiw2BI67qXOrX3UurBqQ1w==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.15", - "callsites": "^3.0.0", - "graceful-fs": "^4.2.9" - } - }, - "@jest/test-result": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.5.0.tgz", - "integrity": "sha512-fGl4rfitnbfLsrfx1uUpDEESS7zM8JdgZgOCQuxQvL1Sn/I6ijeAVQWGfXI9zb1i9Mzo495cIpVZhA0yr60PkQ==", - "dev": true, - "requires": { - "@jest/console": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/istanbul-lib-coverage": "^2.0.0", - "collect-v8-coverage": "^1.0.0" - } - }, - "@jest/test-sequencer": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.5.0.tgz", - "integrity": "sha512-yPafQEcKjkSfDXyvtgiV4pevSeyuA6MQr6ZIdVkWJly9vkqjnFfcfhRQqpD5whjoU8EORki752xQmjaqoFjzMQ==", - "dev": true, - "requires": { - "@jest/test-result": "^29.5.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.5.0", - "slash": "^3.0.0" - } - }, - "@jest/transform": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.5.0.tgz", - "integrity": "sha512-8vbeZWqLJOvHaDfeMuoHITGKSz5qWc9u04lnWrQE3VyuSw604PzQM824ZeX9XSjUCeDiE3GuxZe5UKa8J61NQw==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@jest/types": "^29.5.0", - "@jridgewell/trace-mapping": "^0.3.15", - "babel-plugin-istanbul": "^6.1.1", - "chalk": "^4.0.0", - "convert-source-map": "^2.0.0", - "fast-json-stable-stringify": "^2.1.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.5.0", - "jest-regex-util": "^29.4.3", - "jest-util": "^29.5.0", - "micromatch": "^4.0.4", - "pirates": "^4.0.4", - "slash": "^3.0.0", - "write-file-atomic": "^4.0.2" - } - }, - "@jest/types": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.5.0.tgz", - "integrity": "sha512-qbu7kN6czmVRc3xWFQcAN03RAUamgppVUdXrvl1Wr3jlNF93o9mJbGcDWrwGB6ht44u7efB1qCFgVQmca24Uog==", - "dev": true, - "requires": { - "@jest/schemas": "^29.4.3", - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^3.0.0", - "@types/node": "*", - "@types/yargs": "^17.0.8", - "chalk": "^4.0.0" - } - }, - "@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", - "dev": true, - "requires": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - } - }, - "@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true - }, - "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true - }, - "@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true - }, - "@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", - "dev": true, - "requires": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - }, - "dependencies": { - "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - } - } - }, - "@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, - "requires": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - } - }, - "@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==", - "dev": true - }, - "@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==", - "dev": true, - "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - } - }, - "@sinclair/typebox": { - "version": "0.25.24", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.24.tgz", - "integrity": "sha512-XJfwUVUKDHF5ugKwIcxEgc9k8b7HbznCp6eUfWgu710hMPNIO4aw4/zB5RogDQz8nd6gyCDpU9O/m6qYEWY6yQ==", - "dev": true - }, - "@sinonjs/commons": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", - "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } - }, - "@sinonjs/fake-timers": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.2.0.tgz", - "integrity": "sha512-OPwQlEdg40HAj5KNF8WW6q2KG4Z+cBCZb3m4ninfTZKaBmbIJodviQsDBoYMPHkOyJJMHnOJo5j2+LKDOhOACg==", - "dev": true, - "requires": { - "@sinonjs/commons": "^3.0.0" - } - }, - "@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "dev": true - }, - "@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true - }, - "@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true - }, - "@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true - }, - "@types/babel__core": { - "version": "7.20.1", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz", - "integrity": "sha512-aACu/U/omhdk15O4Nfb+fHgH/z3QsfQzpnvRZhYhThms83ZnAOZz7zZAWO7mn2yyNQaA4xTO8GLK3uqFU4bYYw==", - "dev": true, - "requires": { - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7", - "@types/babel__generator": "*", - "@types/babel__template": "*", - "@types/babel__traverse": "*" - } - }, - "@types/babel__generator": { - "version": "7.6.4", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz", - "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==", - "dev": true, - "requires": { - "@babel/types": "^7.0.0" - } - }, - "@types/babel__template": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", - "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", - "dev": true, - "requires": { - "@babel/parser": "^7.1.0", - "@babel/types": "^7.0.0" - } - }, - "@types/babel__traverse": { - "version": "7.20.0", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.0.tgz", - "integrity": "sha512-TBOjqAGf0hmaqRwpii5LLkJLg7c6OMm4nHLmpsUxwk9bBHtoTC6dAHdVWdGv4TBxj2CZOZY8Xfq8WmfoVi7n4Q==", - "dev": true, - "requires": { - "@babel/types": "^7.20.7" - } - }, - "@types/graceful-fs": { - "version": "4.1.6", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.6.tgz", - "integrity": "sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", - "dev": true - }, - "@types/istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "*" - } - }, - "@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", - "dev": true, - "requires": { - "@types/istanbul-lib-report": "*" - } - }, - "@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true - }, - "@types/jsonpath": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@types/jsonpath/-/jsonpath-0.2.0.tgz", - "integrity": "sha512-v7qlPA0VpKUlEdhghbDqRoKMxFB3h3Ch688TApBJ6v+XLDdvWCGLJIYiPKGZnS6MAOie+IorCfNYVHOPIHSWwQ==", - "dev": true - }, - "@types/node": { - "version": "18.11.9", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz", - "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==", - "dev": true - }, - "@types/prettier": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.7.3.tgz", - "integrity": "sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==", - "dev": true - }, - "@types/semver": { - "version": "7.3.13", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", - "dev": true - }, - "@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", - "dev": true - }, - "@types/yargs": { - "version": "17.0.24", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", - "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "@types/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", - "dev": true - }, - "@typescript-eslint/eslint-plugin": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.56.0.tgz", - "integrity": "sha512-ZNW37Ccl3oMZkzxrYDUX4o7cnuPgU+YrcaYXzsRtLB16I1FR5SHMqga3zGsaSliZADCWo2v8qHWqAYIj8nWCCg==", - "dev": true, - "requires": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.56.0", - "@typescript-eslint/type-utils": "5.56.0", - "@typescript-eslint/utils": "5.56.0", - "debug": "^4.3.4", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/parser": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.56.0.tgz", - "integrity": "sha512-sn1OZmBxUsgxMmR8a8U5QM/Wl+tyqlH//jTqCg8daTAmhAk26L2PFhcqPLlYBhYUJMZJK276qLXlHN3a83o2cg==", - "dev": true, - "requires": { - "@typescript-eslint/scope-manager": "5.56.0", - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/typescript-estree": "5.56.0", - "debug": "^4.3.4" - } - }, - "@typescript-eslint/scope-manager": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.56.0.tgz", - "integrity": "sha512-jGYKyt+iBakD0SA5Ww8vFqGpoV2asSjwt60Gl6YcO8ksQ8s2HlUEyHBMSa38bdLopYqGf7EYQMUIGdT/Luw+sw==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/visitor-keys": "5.56.0" - } - }, - "@typescript-eslint/type-utils": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.56.0.tgz", - "integrity": "sha512-8WxgOgJjWRy6m4xg9KoSHPzBNZeQbGlQOH7l2QEhQID/+YseaFxg5J/DLwWSsi9Axj4e/cCiKx7PVzOq38tY4A==", - "dev": true, - "requires": { - "@typescript-eslint/typescript-estree": "5.56.0", - "@typescript-eslint/utils": "5.56.0", - "debug": "^4.3.4", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/types": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.56.0.tgz", - "integrity": "sha512-JyAzbTJcIyhuUhogmiu+t79AkdnqgPUEsxMTMc/dCZczGMJQh1MK2wgrju++yMN6AWroVAy2jxyPcPr3SWCq5w==", - "dev": true - }, - "@typescript-eslint/typescript-estree": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.56.0.tgz", - "integrity": "sha512-41CH/GncsLXOJi0jb74SnC7jVPWeVJ0pxQj8bOjH1h2O26jXN3YHKDT1ejkVz5YeTEQPeLCCRY0U2r68tfNOcg==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/visitor-keys": "5.56.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" - } - }, - "@typescript-eslint/utils": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.56.0.tgz", - "integrity": "sha512-XhZDVdLnUJNtbzaJeDSCIYaM+Tgr59gZGbFuELgF7m0IY03PlciidS7UQNKLE0+WpUTn1GlycEr6Ivb/afjbhA==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", - "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.56.0", - "@typescript-eslint/types": "5.56.0", - "@typescript-eslint/typescript-estree": "5.56.0", - "eslint-scope": "^5.1.1", - "semver": "^7.3.7" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "5.56.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.56.0.tgz", - "integrity": "sha512-1mFdED7u5bZpX6Xxf5N9U2c18sb+8EvU3tyOIj6LQZ5OOvnmj8BVeNNP603OFPm5KkS1a7IvCIcwrdHXaEMG/Q==", - "dev": true, - "requires": { - "@typescript-eslint/types": "5.56.0", - "eslint-visitor-keys": "^3.3.0" - } - }, - "acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true - }, - "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, - "requires": {} - }, - "acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "requires": { - "type-fest": "^0.21.3" - }, - "dependencies": { - "type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true - } - } - }, - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "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, - "requires": { - "color-convert": "^2.0.1" - } - }, - "anymatch": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", - "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, - "requires": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - } - }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, - "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 - }, - "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==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "axios": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.1.3.tgz", - "integrity": "sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA==", - "requires": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "babel-jest": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.5.0.tgz", - "integrity": "sha512-mA4eCDh5mSo2EcA9xQjVTpmbbNk32Zb3Q3QFQsNhaK56Q+yoXowzFodLux30HRgyOho5rsQ6B0P9QpMkvvnJ0Q==", - "dev": true, - "requires": { - "@jest/transform": "^29.5.0", - "@types/babel__core": "^7.1.14", - "babel-plugin-istanbul": "^6.1.1", - "babel-preset-jest": "^29.5.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "slash": "^3.0.0" - } - }, - "babel-plugin-istanbul": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", - "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-instrument": "^5.0.4", - "test-exclude": "^6.0.0" - } - }, - "babel-plugin-jest-hoist": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.5.0.tgz", - "integrity": "sha512-zSuuuAlTMT4mzLj2nPnUm6fsE6270vdOfnpbJ+RmruU75UhLFvL0N2NgI7xpeS7NaB6hGqmd5pVpGTDYvi4Q3w==", - "dev": true, - "requires": { - "@babel/template": "^7.3.3", - "@babel/types": "^7.3.3", - "@types/babel__core": "^7.1.14", - "@types/babel__traverse": "^7.0.6" - } - }, - "babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", - "dev": true, - "requires": { - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" - } - }, - "babel-preset-jest": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.5.0.tgz", - "integrity": "sha512-JOMloxOqdiBSxMAzjRaH023/vvcaSaec49zvg+2LmNsktC7ei39LTJGw02J+9uUtTZUq6xbLyJ4dxe9sSmIuAg==", - "dev": true, - "requires": { - "babel-plugin-jest-hoist": "^29.5.0", - "babel-preset-current-node-syntax": "^1.0.0" - } - }, - "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 - }, - "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, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "browserslist": { - "version": "4.21.7", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.7.tgz", - "integrity": "sha512-BauCXrQ7I2ftSqd2mvKHGo85XR0u7Ru3C/Hxsy/0TkfCtjrmAbPdzLGasmoiBxplpDXlPvdjX9u7srIMfgasNA==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001489", - "electron-to-chromium": "^1.4.411", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" - } - }, - "bs-logger": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", - "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", - "dev": true, - "requires": { - "fast-json-stable-stringify": "2.x" - } - }, - "bser": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", - "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", - "dev": true, - "requires": { - "node-int64": "^0.4.0" - } - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30001492", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001492.tgz", - "integrity": "sha512-2efF8SAZwgAX1FJr87KWhvuJxnGJKOnctQa8xLOskAXNXq8oiuqgl6u1kk3fFpsp3GgvzlRjiK1sl63hNtFADw==", - "dev": true - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "char-regex": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", - "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", - "dev": true - }, - "ci-info": { - "version": "3.8.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", - "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", - "dev": true - }, - "cjs-module-lexer": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", - "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", - "dev": true - }, - "class-transformer": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz", - "integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==" - }, - "cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", - "dev": true - }, - "collect-v8-coverage": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", - "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", - "dev": true - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "convert-source-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", - "dev": true - }, - "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, - "dedent": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", - "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", - "dev": true - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" - }, - "deepmerge": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", - "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", - "dev": true - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" - }, - "detect-newline": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", - "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", - "dev": true - }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - }, - "diff-sequences": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.4.3.tgz", - "integrity": "sha512-ofrBgwpPhCD85kMKtE9RYFFq6OC1A89oW2vvgWZNCwxrUpRUILopY7lsYyMDSjc8g6U6aiO0Qubg6r4Wgt5ZnA==", - "dev": true - }, - "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, - "requires": { - "path-type": "^4.0.0" - } - }, - "doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "requires": { - "esutils": "^2.0.2" - } - }, - "electron-to-chromium": { - "version": "1.4.414", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.414.tgz", - "integrity": "sha512-RRuCvP6ekngVh2SAJaOKT/hxqc9JAsK+Pe0hP5tGQIfonU2Zy9gMGdJ+mBdyl/vNucMG6gkXYtuM4H/1giws5w==", - "dev": true - }, - "emittery": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", - "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "escodegen": { - "version": "1.14.3", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", - "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", - "requires": { - "esprima": "^4.0.1", - "estraverse": "^4.2.0", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==" - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "requires": { - "prelude-ls": "~1.1.2" - } - } - } - }, - "eslint": { - "version": "8.36.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.36.0.tgz", - "integrity": "sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw==", - "dev": true, - "requires": { - "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.1", - "@eslint/js": "8.36.0", - "@humanwhocodes/config-array": "^0.11.8", - "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", - "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", - "debug": "^4.3.2", - "doctrine": "^3.0.0", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.5.0", - "esquery": "^1.4.2", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", - "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.1", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" - }, - "dependencies": { - "eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - } - }, - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } - } - }, - "eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "requires": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - } - }, - "eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true - }, - "espree": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.0.tgz", - "integrity": "sha512-JPbJGhKc47++oo4JkEoTe2wjy4fmMwvFpgJT9cQzmfXKp22Dr6Hf1tdCteLz1h0P3t+mGvWZ+4Uankvh8+c6zw==", - "dev": true, - "requires": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - } - }, - "esprima": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz", - "integrity": "sha512-+JpPZam9w5DuJ3Q67SqsMGtiHKENSMRVoxvArfJZK01/BfLEObtZ6orJa/MtoGNR/rfMgp5837T41PAmTwAv/A==" - }, - "esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", - "dev": true, - "requires": { - "estraverse": "^5.1.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } - } - }, - "esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "requires": { - "estraverse": "^5.2.0" - }, - "dependencies": { - "estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true - } - } - }, - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" - }, - "execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" - } - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true - }, - "expect": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-29.5.0.tgz", - "integrity": "sha512-yM7xqUrCO2JdpFo4XpM82t+PJBFybdqoQuJLDGeDX2ij8NZzqRHyu3Hp188/JX7SWqud+7t4MUdvcgGBICMHZg==", - "dev": true, - "requires": { - "@jest/expect-utils": "^29.5.0", - "jest-get-type": "^29.4.3", - "jest-matcher-utils": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-util": "^29.5.0" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", - "dev": true, - "requires": { - "@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" - }, - "dependencies": { - "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, - "requires": { - "is-glob": "^4.0.1" - } - } - } - }, - "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", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==" - }, - "fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, - "requires": { - "reusify": "^1.0.4" - } - }, - "fb-watchman": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", - "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", - "dev": true, - "requires": { - "bser": "2.1.1" - } - }, - "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, - "requires": { - "flat-cache": "^3.0.4" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", - "dev": true, - "requires": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" - } - }, - "flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", - "dev": true - }, - "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" - }, - "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "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 - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true - }, - "get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "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" - } - }, - "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, - "requires": { - "is-glob": "^4.0.3" - } - }, - "globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "requires": { - "type-fest": "^0.20.2" - } - }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "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" - } - }, - "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==", - "dev": true - }, - "grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "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 - }, - "html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", - "dev": true - }, - "ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", - "dev": true - }, - "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, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", - "dev": true, - "requires": { - "pkg-dir": "^4.2.0", - "resolve-cwd": "^3.0.0" - } - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "is-core-module": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", - "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "is-generator-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", - "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", - "dev": true - }, - "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, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "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 - }, - "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 - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", - "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", - "dev": true, - "requires": { - "@babel/core": "^7.12.3", - "@babel/parser": "^7.14.7", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.2.0", - "semver": "^6.3.0" - }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "istanbul-lib-source-maps": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", - "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "node_modules/is-bun-module": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-bun-module/-/is-bun-module-1.2.1.tgz", + "integrity": "sha512-AmidtEM6D6NmUiLOvvU7+IePxjEjOzra2h0pSrsfSAcXwl/83zLLXDByafUJy9k/rKK0pvXMLdwKwGHlX2Ke6Q==", "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" + "license": "MIT", + "dependencies": { + "semver": "^7.6.3" } }, - "istanbul-reports": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz", - "integrity": "sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==", + "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, - "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "jest": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest/-/jest-29.5.0.tgz", - "integrity": "sha512-juMg3he2uru1QoXX078zTa7pO85QyB9xajZc6bU+d9yEGwrKX6+vGmJQ3UdVZsvTEUARIdObzH68QItim6OSSQ==", + "node_modules/is-core-module": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "dev": true, - "requires": { - "@jest/core": "^29.5.0", - "@jest/types": "^29.5.0", - "import-local": "^3.0.2", - "jest-cli": "^29.5.0" + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "jest-changed-files": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.5.0.tgz", - "integrity": "sha512-IFG34IUMUaNBIxjQXF/iu7g6EcdMrGRRxaUSw92I/2g2YC6vCdTltl4nHvt7Ci5nSJwXIkCu8Ka1DKF+X7Z1Ag==", + "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, - "requires": { - "execa": "^5.0.0", - "p-limit": "^3.1.0" + "license": "MIT", + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "jest-circus": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.5.0.tgz", - "integrity": "sha512-gq/ongqeQKAplVxqJmbeUOJJKkW3dDNPY8PjhJ5G0lBRvu0e3EWGxGy5cI4LAGA7gV2UHCtWBI4EMXK8c9nQKA==", + "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, - "requires": { - "@jest/environment": "^29.5.0", - "@jest/expect": "^29.5.0", - "@jest/test-result": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/node": "*", - "chalk": "^4.0.0", - "co": "^4.6.0", - "dedent": "^0.7.0", - "is-generator-fn": "^2.0.0", - "jest-each": "^29.5.0", - "jest-matcher-utils": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-runtime": "^29.5.0", - "jest-snapshot": "^29.5.0", - "jest-util": "^29.5.0", - "p-limit": "^3.1.0", - "pretty-format": "^29.5.0", - "pure-rand": "^6.0.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - } - }, - "jest-cli": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.5.0.tgz", - "integrity": "sha512-L1KcP1l4HtfwdxXNFCL5bmUbLQiKrakMUriBEcc1Vfz6gx31ORKdreuWvmQVBit+1ss9NNR3yxjwfwzZNdQXJw==", - "dev": true, - "requires": { - "@jest/core": "^29.5.0", - "@jest/test-result": "^29.5.0", - "@jest/types": "^29.5.0", - "chalk": "^4.0.0", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "import-local": "^3.0.2", - "jest-config": "^29.5.0", - "jest-util": "^29.5.0", - "jest-validate": "^29.5.0", - "prompts": "^2.0.1", - "yargs": "^17.3.1" - } - }, - "jest-config": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.5.0.tgz", - "integrity": "sha512-kvDUKBnNJPNBmFFOhDbm59iu1Fii1Q6SxyhXfvylq3UTHbg6o7j/g8k2dZyXWLvfdKB1vAPxNZnMgtKJcmu3kA==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@jest/test-sequencer": "^29.5.0", - "@jest/types": "^29.5.0", - "babel-jest": "^29.5.0", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "deepmerge": "^4.2.2", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-circus": "^29.5.0", - "jest-environment-node": "^29.5.0", - "jest-get-type": "^29.4.3", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.5.0", - "jest-runner": "^29.5.0", - "jest-util": "^29.5.0", - "jest-validate": "^29.5.0", - "micromatch": "^4.0.4", - "parse-json": "^5.2.0", - "pretty-format": "^29.5.0", - "slash": "^3.0.0", - "strip-json-comments": "^3.1.1" + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "jest-diff": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.5.0.tgz", - "integrity": "sha512-LtxijLLZBduXnHSniy0WMdaHjmQnt3g5sa16W4p0HqukYTTsyTW3GD1q41TyGl5YFXj/5B2U6dlh5FM1LIMgxw==", + "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, - "requires": { - "chalk": "^4.0.0", - "diff-sequences": "^29.4.3", - "jest-get-type": "^29.4.3", - "pretty-format": "^29.5.0" + "license": "MIT", + "engines": { + "node": ">=0.10.0" } }, - "jest-docblock": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.4.3.tgz", - "integrity": "sha512-fzdTftThczeSD9nZ3fzA/4KkHtnmllawWrXO69vtI+L9WjEIuXWs4AmyME7lN5hU7dB0sHhuPfcKofRsUb/2Fg==", + "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, - "requires": { - "detect-newline": "^3.0.0" + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "jest-each": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.5.0.tgz", - "integrity": "sha512-HM5kIJ1BTnVt+DQZ2ALp3rzXEl+g726csObrW/jpEGl+CDSSQpOJJX2KE/vEg8cxcMXdyEPu6U4QX5eruQv5hA==", + "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, - "requires": { - "@jest/types": "^29.5.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.4.3", - "jest-util": "^29.5.0", - "pretty-format": "^29.5.0" - } - }, - "jest-environment-node": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.5.0.tgz", - "integrity": "sha512-ExxuIK/+yQ+6PRGaHkKewYtg6hto2uGCgvKdb2nfJfKXgZ17DfXjvbZ+jA1Qt9A8EQSfPnt5FKIfnOO3u1h9qw==", - "dev": true, - "requires": { - "@jest/environment": "^29.5.0", - "@jest/fake-timers": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/node": "*", - "jest-mock": "^29.5.0", - "jest-util": "^29.5.0" - } - }, - "jest-get-type": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-29.4.3.tgz", - "integrity": "sha512-J5Xez4nRRMjk8emnTpWrlkyb9pfRQQanDrvWHhsR1+VUfbwxi30eVcZFlcdGInRibU4G5LwHXpI7IRHU0CY+gg==", - "dev": true - }, - "jest-haste-map": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.5.0.tgz", - "integrity": "sha512-IspOPnnBro8YfVYSw6yDRKh/TiCdRngjxeacCps1cQ9cgVN6+10JUcuJ1EabrgYLOATsIAigxA0rLR9x/YlrSA==", - "dev": true, - "requires": { - "@jest/types": "^29.5.0", - "@types/graceful-fs": "^4.1.3", - "@types/node": "*", - "anymatch": "^3.0.3", - "fb-watchman": "^2.0.0", - "fsevents": "^2.3.2", - "graceful-fs": "^4.2.9", - "jest-regex-util": "^29.4.3", - "jest-util": "^29.5.0", - "jest-worker": "^29.5.0", - "micromatch": "^4.0.4", - "walker": "^1.0.8" - } - }, - "jest-leak-detector": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.5.0.tgz", - "integrity": "sha512-u9YdeeVnghBUtpN5mVxjID7KbkKE1QU4f6uUwuxiY0vYRi9BUCLKlPEZfDGR67ofdFmDz9oPAy2G92Ujrntmow==", - "dev": true, - "requires": { - "jest-get-type": "^29.4.3", - "pretty-format": "^29.5.0" - } - }, - "jest-matcher-utils": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.5.0.tgz", - "integrity": "sha512-lecRtgm/rjIK0CQ7LPQwzCs2VwW6WAahA55YBuI+xqmhm7LAaxokSB8C97yJeYyT+HvQkH741StzpU41wohhWw==", - "dev": true, - "requires": { - "chalk": "^4.0.0", - "jest-diff": "^29.5.0", - "jest-get-type": "^29.4.3", - "pretty-format": "^29.5.0" + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "jest-message-util": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.5.0.tgz", - "integrity": "sha512-Kijeg9Dag6CKtIDA7O21zNTACqD5MD/8HfIV8pdD94vFyFuer52SigdC3IQMhab3vACxXMiFk+yMHNdbqtyTGA==", + "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, - "requires": { - "@babel/code-frame": "^7.12.13", - "@jest/types": "^29.5.0", - "@types/stack-utils": "^2.0.0", - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "micromatch": "^4.0.4", - "pretty-format": "^29.5.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" + "license": "MIT", + "engines": { + "node": ">=0.12.0" } }, - "jest-mock": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.5.0.tgz", - "integrity": "sha512-GqOzvdWDE4fAV2bWQLQCkujxYWL7RxjCnj71b5VhDAGOevB3qj3Ovg26A5NI84ZpODxyzaozXLOh2NCgkbvyaw==", + "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, - "requires": { - "@jest/types": "^29.5.0", - "@types/node": "*", - "jest-util": "^29.5.0" + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "jest-pnp-resolver": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", - "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "requires": {} - }, - "jest-regex-util": { - "version": "29.4.3", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.4.3.tgz", - "integrity": "sha512-O4FglZaMmWXbGHSQInfXewIsd1LMn9p3ZXB/6r4FOkyhX2/iP/soMG98jGvk/A3HAN78+5VWcBGO0BJAPRh4kg==", - "dev": true - }, - "jest-resolve": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.5.0.tgz", - "integrity": "sha512-1TzxJ37FQq7J10jPtQjcc+MkCkE3GBpBecsSUWJ0qZNJpmg6m0D9/7II03yJulm3H/fvVjgqLh/k2eYg+ui52w==", + "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, - "requires": { - "chalk": "^4.0.0", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.5.0", - "jest-pnp-resolver": "^1.2.2", - "jest-util": "^29.5.0", - "jest-validate": "^29.5.0", - "resolve": "^1.20.0", - "resolve.exports": "^2.0.0", - "slash": "^3.0.0" + "license": "MIT", + "engines": { + "node": ">=8" } }, - "jest-resolve-dependencies": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.5.0.tgz", - "integrity": "sha512-sjV3GFr0hDJMBpYeUuGduP+YeCRbd7S/ck6IvL3kQ9cpySYKqcqhdLLC2rFwrcL7tz5vYibomBrsFYWkIGGjOg==", + "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, - "requires": { - "jest-regex-util": "^29.4.3", - "jest-snapshot": "^29.5.0" + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "jest-runner": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.5.0.tgz", - "integrity": "sha512-m7b6ypERhFghJsslMLhydaXBiLf7+jXy8FwGRHO3BGV1mcQpPbwiqiKUR2zU2NJuNeMenJmlFZCsIqzJCTeGLQ==", + "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, - "requires": { - "@jest/console": "^29.5.0", - "@jest/environment": "^29.5.0", - "@jest/test-result": "^29.5.0", - "@jest/transform": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/node": "*", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "graceful-fs": "^4.2.9", - "jest-docblock": "^29.4.3", - "jest-environment-node": "^29.5.0", - "jest-haste-map": "^29.5.0", - "jest-leak-detector": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-resolve": "^29.5.0", - "jest-runtime": "^29.5.0", - "jest-util": "^29.5.0", - "jest-watcher": "^29.5.0", - "jest-worker": "^29.5.0", - "p-limit": "^3.1.0", - "source-map-support": "0.5.13" - } - }, - "jest-runtime": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.5.0.tgz", - "integrity": "sha512-1Hr6Hh7bAgXQP+pln3homOiEZtCDZFqwmle7Ew2j8OlbkIu6uE3Y/etJQG8MLQs3Zy90xrp2C0BRrtPHG4zryw==", - "dev": true, - "requires": { - "@jest/environment": "^29.5.0", - "@jest/fake-timers": "^29.5.0", - "@jest/globals": "^29.5.0", - "@jest/source-map": "^29.4.3", - "@jest/test-result": "^29.5.0", - "@jest/transform": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/node": "*", - "chalk": "^4.0.0", - "cjs-module-lexer": "^1.0.0", - "collect-v8-coverage": "^1.0.0", - "glob": "^7.1.3", - "graceful-fs": "^4.2.9", - "jest-haste-map": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-mock": "^29.5.0", - "jest-regex-util": "^29.4.3", - "jest-resolve": "^29.5.0", - "jest-snapshot": "^29.5.0", - "jest-util": "^29.5.0", - "slash": "^3.0.0", - "strip-bom": "^4.0.0" - } - }, - "jest-snapshot": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.5.0.tgz", - "integrity": "sha512-x7Wolra5V0tt3wRs3/ts3S6ciSQVypgGQlJpz2rsdQYoUKxMxPNaoHMGJN6qAuPJqS+2iQ1ZUn5kl7HCyls84g==", - "dev": true, - "requires": { - "@babel/core": "^7.11.6", - "@babel/generator": "^7.7.2", - "@babel/plugin-syntax-jsx": "^7.7.2", - "@babel/plugin-syntax-typescript": "^7.7.2", - "@babel/traverse": "^7.7.2", - "@babel/types": "^7.3.3", - "@jest/expect-utils": "^29.5.0", - "@jest/transform": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/babel__traverse": "^7.0.6", - "@types/prettier": "^2.1.5", - "babel-preset-current-node-syntax": "^1.0.0", - "chalk": "^4.0.0", - "expect": "^29.5.0", - "graceful-fs": "^4.2.9", - "jest-diff": "^29.5.0", - "jest-get-type": "^29.4.3", - "jest-matcher-utils": "^29.5.0", - "jest-message-util": "^29.5.0", - "jest-util": "^29.5.0", - "natural-compare": "^1.4.0", - "pretty-format": "^29.5.0", - "semver": "^7.3.5" + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "jest-util": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.5.0.tgz", - "integrity": "sha512-RYMgG/MTadOr5t8KdhejfvUU82MxsCu5MF6KuDUHl+NuwzUt+Sm6jJWxTJVrDR1j5M/gJVCPKQEpWXY+yIQ6lQ==", + "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, - "requires": { - "@jest/types": "^29.5.0", - "@types/node": "*", - "chalk": "^4.0.0", - "ci-info": "^3.2.0", - "graceful-fs": "^4.2.9", - "picomatch": "^2.2.3" + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "jest-validate": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.5.0.tgz", - "integrity": "sha512-pC26etNIi+y3HV8A+tUGr/lph9B18GnzSRAkPaaZJIE1eFdiYm6/CewuiJQ8/RlfHd1u/8Ioi8/sJ+CmbA+zAQ==", + "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, - "requires": { - "@jest/types": "^29.5.0", - "camelcase": "^6.2.0", - "chalk": "^4.0.0", - "jest-get-type": "^29.4.3", - "leven": "^3.1.0", - "pretty-format": "^29.5.0" - }, + "license": "MIT", "dependencies": { - "camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true - } + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "jest-watcher": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.5.0.tgz", - "integrity": "sha512-KmTojKcapuqYrKDpRwfqcQ3zjMlwu27SYext9pt4GlF5FUgB+7XE1mcCnSm6a4uUpFyQIkb6ZhzZvHl+jiBCiA==", + "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, - "requires": { - "@jest/test-result": "^29.5.0", - "@jest/types": "^29.5.0", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.13.1", - "jest-util": "^29.5.0", - "string-length": "^4.0.1" + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "jest-worker": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.5.0.tgz", - "integrity": "sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA==", + "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, - "requires": { - "@types/node": "*", - "jest-util": "^29.5.0", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, + "license": "MIT", "dependencies": { - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "js-sdsl": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.4.0.tgz", - "integrity": "sha512-FfVSdx6pJ41Oa+CF7RDaFmTnCaFhua+SNYQX74riGOpl96x+2jQCqEfQ2bnXu/5DPCqlRuiqyvTJM0Qjz26IVg==", - "dev": true + "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" }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "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" }, - "js-yaml": { + "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, - "requires": { + "license": "MIT", + "dependencies": { "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" } }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true - }, - "json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "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" }, - "json-schema-traverse": { + "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 + "dev": true, + "license": "MIT" }, - "json-stable-stringify-without-jsonify": { + "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 - }, - "json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true + "dev": true, + "license": "MIT" }, - "jsonpath": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.1.1.tgz", - "integrity": "sha512-l6Cg7jRpixfbgoWgkrl77dgEj8RPvND0wMH6TwQmi9Qs4TFfS9u5cUFnbeKTwj5ga5Y3BTGGNI28k117LJ009w==", - "requires": { - "esprima": "1.2.2", - "static-eval": "2.0.2", - "underscore": "1.12.1" + "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" } }, - "kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true - }, - "leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true + "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" + } }, - "levn": { + "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, - "requires": { + "license": "MIT", + "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" } }, - "lines-and-columns": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", - "dev": true - }, - "locate-path": { + "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, - "requires": { + "license": "MIT", + "dependencies": { "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==", - "dev": true - }, - "lodash.merge": { + "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 + "dev": true, + "license": "MIT" }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "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, - "requires": { - "yallist": "^4.0.0" + "license": "MIT", + "engines": { + "node": ">= 8" } }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, - "requires": { - "semver": "^6.0.0" - }, + "license": "MIT", "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" } }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true + "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" + } }, - "makeerror": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", - "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, - "requires": { - "tmpl": "1.0.5" + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "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": "MIT" }, - "merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true + "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" }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "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, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" + "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" } }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "requires": { - "mime-db": "1.52.0" + "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" } }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "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, - "requires": { - "brace-expansion": "^1.1.7" + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" } }, - "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 - }, - "natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true - }, - "natural-compare-lite": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", - "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", - "dev": true - }, - "node-int64": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", - "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", - "dev": true - }, - "node-releases": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", - "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==", - "dev": true - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "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, - "requires": { - "path-key": "^3.0.0" + "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" } }, - "once": { + "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, - "requires": { + "license": "ISC", + "dependencies": { "wrappy": "1" } }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, - "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, - "requires": { + "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.3" + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" } }, - "p-limit": { + "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, - "requires": { + "license": "MIT", + "dependencies": { "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "p-locate": { + "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, - "requires": { + "license": "MIT", + "dependencies": { "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "parent-module": { + "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, - "requires": { + "license": "MIT", + "dependencies": { "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" } }, - "parse-json": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", - "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "path-exists": { + "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 + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } }, - "path-is-absolute": { + "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 + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } }, - "path-key": { + "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 + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } }, - "path-parse": { + "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 + "dev": true, + "license": "MIT" }, - "path-type": { + "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 - }, - "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } }, - "picomatch": { + "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "pirates": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz", - "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==", - "dev": true - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - } + "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" } }, - "prelude-ls": { + "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 - }, - "pretty-format": { - "version": "29.5.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.5.0.tgz", - "integrity": "sha512-V2mGkI31qdttvTFX7Mt4efOqHXqJWMu4/r66Xh3Z3BwZaPfPJgp6/gbwoujRpPUtfEF6AUUWx3Jim3GCw5g/Qw==", "dev": true, - "requires": { - "@jest/schemas": "^29.4.3", - "ansi-styles": "^5.0.0", - "react-is": "^18.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true - } + "license": "MIT", + "engines": { + "node": ">= 0.8.0" } }, - "prompts": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", - "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "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, - "requires": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" + "license": "MIT", + "engines": { + "node": ">=6" } }, - "proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, - "punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true - }, - "pure-rand": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.2.tgz", - "integrity": "sha512-6Yg0ekpKICSjPswYOuC5sku/TSWaRYlA0qsXqJgM/d/4pLPHPuTxK7Nbf7jFKzAeedUhR8C7K9Uv63FBsSo8xQ==", - "dev": true - }, - "queue-microtask": { + "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 - }, - "react-is": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz", - "integrity": "sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==", - "dev": true - }, - "reflect-metadata": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", - "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" - }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true + "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" }, - "resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "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, - "requires": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" + "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" } }, - "resolve-cwd": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", - "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "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, - "requires": { - "resolve-from": "^5.0.0" - }, + "license": "MIT", "dependencies": { - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } + "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" } }, - "resolve-from": { + "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 + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } }, - "resolve.exports": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", - "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", - "dev": true + "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" + } }, - "reusify": { + "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 + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } }, - "rimraf": { + "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, - "requires": { + "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" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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" + }, + "engines": { + "node": ">=10" } }, - "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==", + "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, - "requires": { - "queue-microtask": "^1.2.2" + "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" } }, - "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "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==", "dev": true, - "requires": { - "lru-cache": "^6.0.0" + "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" + }, + "engines": { + "node": ">= 0.4" } }, - "shebang-command": { + "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, - "requires": { + "license": "MIT", + "dependencies": { "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" } }, - "shebang-regex": { + "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==", - "dev": true - }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } }, - "sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true + "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==", + "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" + } }, - "slash": { + "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "devOptional": true - }, - "source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "license": "MIT", + "engines": { + "node": ">=8" } }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "stack-utils": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "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==", "dev": true, - "requires": { - "escape-string-regexp": "^2.0.0" - }, + "license": "MIT", "dependencies": { - "escape-string-regexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", - "dev": true - } - } - }, - "static-eval": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.2.tgz", - "integrity": "sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==", - "requires": { - "escodegen": "^1.8.1" + "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" } }, - "string-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", - "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "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, - "requires": { - "char-regex": "^1.0.2", - "strip-ansi": "^6.0.0" + "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" } }, - "string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "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==", "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "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" } }, - "strip-ansi": { + "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==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } }, - "strip-json-comments": { + "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "supports-color": { + "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "supports-preserve-symlinks-flag": { + "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==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", "dev": true, - "requires": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" + "license": "MIT", + "engines": { + "node": ">=6" } }, - "text-table": { + "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==", - "dev": true - }, - "tmpl": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", - "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", - "dev": true - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true + "dev": true, + "license": "MIT" }, - "to-regex-range": { + "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==", "dev": true, - "requires": { + "license": "MIT", + "dependencies": { "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.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==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" } }, - "ts-jest": { - "version": "29.1.0", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.0.tgz", - "integrity": "sha512-ZhNr7Z4PcYa+JjMl62ir+zPiNJfXJN6E8hSLnaUKhOgqcn8vb3e537cpkd0FuAfRK3sR1LSqM1MOhliXNgOFPA==", - "dev": true, - "requires": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", - "jest-util": "^29.0.0", - "json5": "^2.2.3", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "7.x", - "yargs-parser": "^21.0.1" - } - }, - "ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "dev": true, - "requires": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - } - }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "type-check": { + "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, - "requires": { + "license": "MIT", + "dependencies": { "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" } }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "type-fest": { + "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==", - "dev": true + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "typescript": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", - "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", - "dev": true + "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==", + "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" + } }, - "underscore": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", - "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" + "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==", + "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" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "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==", "dev": true, - "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "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" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "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==", "dev": true, - "requires": { - "punycode": "^2.1.0" + "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" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true - }, - "v8-to-istanbul": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", - "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", - "dev": true, - "requires": { - "@jridgewell/trace-mapping": "^0.3.12", - "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" - }, - "dependencies": { - "convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true - } + "node_modules/typescript": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" } }, - "walker": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", - "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, + "license": "MIT" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, - "requires": { - "makeerror": "1.0.12" + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" } }, - "which": { + "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, - "requires": { + "license": "ISC", + "dependencies": { "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" + "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" + } }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "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", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "license": "MIT", + "engines": { + "node": ">=0.10.0" } }, - "wrappy": { + "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 - }, - "write-file-atomic": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", - "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.7" - } + "license": "ISC" }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "dev": true, - "requires": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - } - }, - "yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "dev": true - }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true - }, - "yocto-queue": { + "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } } } } diff --git a/previous-versions/sync-for-payables-version-1/package.json b/previous-versions/sync-for-payables-version-1/package.json index ecd09b61e..dfaf10376 100644 --- a/previous-versions/sync-for-payables-version-1/package.json +++ b/previous-versions/sync-for-payables-version-1/package.json @@ -1,37 +1,33 @@ { - "name": "@codat/sync-for-payables", - "version": "2.2.0", + "name": "@codat/sync-for-payables-version-1", + "version": "2.3.0", "author": "Codat", + "main": "./index.js", + "sideEffects": false, + "repository": { + "type": "git", + "url": "https://github.com/codatio/client-sdk-typescript.git", + "directory": "previous-versions/sync-for-payables-version-1" + }, "scripts": { - "prepare": "tsc --build", - "check:tsc": "tsc --noEmit --skipLibCheck", - "check:eslint": "eslint --max-warnings=0 src", - "check": "npm run check:tsc && npm run check:eslint" + "lint": "eslint --max-warnings=0 src", + "build": "tsc", + "prepublishOnly": "npm run build" }, - "dependencies": { - "axios": "^1.1.3", - "jsonpath": "^1.1.1", - "class-transformer": "^0.5.1", - "form-data": "^4.0.0", - "reflect-metadata": "^0.1.13" + "peerDependencies": { + "zod": ">= 3" }, "devDependencies": { - "@types/jsonpath": "^0.2.0", - "@types/node": "^18.11.5", - "typescript": "^4.8.4", - "@typescript-eslint/eslint-plugin": "^5.56.0", - "@typescript-eslint/parser": "^5.56.0", - "eslint": "^8.36.0" + "@types/node": "^18.19.3", + "@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" }, - "main": "dist/index.js", - "files": [ - "dist", - "docs", - "README.md" - ], - "repository": { - "type": "git", - "url": "https://github.com/codatio/client-sdk-typescript.git", - "directory": "sync-for-payables" + "dependencies": { + "decimal.js": "^10.4.3" } } diff --git a/previous-versions/sync-for-payables-version-1/src/core.ts b/previous-versions/sync-for-payables-version-1/src/core.ts new file mode 100644 index 000000000..3ef31d337 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/core.ts @@ -0,0 +1,13 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { ClientSDK } from "./lib/sdks.js"; + +/** + * A minimal client to use when calling standalone SDK functions. Typically, an + * instance of this class would be instantiated once at the start of an + * application and passed around through some dependency injection mechanism to + * parts of an application that need to make SDK calls. + */ +export class CodatSyncPayablesCore extends ClientSDK {} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/accountsCreate.ts b/previous-versions/sync-for-payables-version-1/src/funcs/accountsCreate.ts new file mode 100644 index 000000000..5b9c9aab5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/accountsCreate.ts @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Create account + * + * @remarks + * The *Create account* endpoint creates a new [account](https://docs.codat.io/sync-for-payables-api#/schemas/Account) for a given company's connection. + * + * [Accounts](https://docs.codat.io/sync-for-payables-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-payables-api#/operations/get-create-chartOfAccounts-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support creating an account. + */ +export async function accountsCreate( + client$: CodatSyncPayablesCore, + request: operations.CreateAccountRequest, + options?: RequestOptions, +): Promise< + Result< + shared.CreateAccountResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.CreateAccountRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.accountPrototype, { + explode: true, + }); + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/push/accounts", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "timeoutInMinutes": payload$.timeoutInMinutes, + }); + + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "create-account", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.CreateAccountResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.CreateAccountResponse$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/accountsGet.ts b/previous-versions/sync-for-payables-version-1/src/funcs/accountsGet.ts new file mode 100644 index 000000000..c0c1cef83 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/accountsGet.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get account + * + * @remarks + * The *Get account* endpoint returns a single account for a given `accountId`. + * + * [Accounts](https://docs.codat.io/sync-for-payables-api#/schemas/Account) are the categories a business uses to record accounting transactions. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support getting a specific account. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ +export async function accountsGet( + client$: CodatSyncPayablesCore, + request: operations.GetAccountRequest, + options?: RequestOptions, +): Promise< + Result< + shared.Account, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetAccountRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + accountId: encodeSimple$("accountId", payload$.accountId, { + explode: false, + charEncoding: "percent", + }), + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/accounts/{accountId}")( + pathParams$, + ); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-account", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Account, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.Account$inboundSchema), + m$.jsonErr( + [401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/accountsGetCreateModel.ts b/previous-versions/sync-for-payables-version-1/src/funcs/accountsGetCreateModel.ts new file mode 100644 index 000000000..dd322d873 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/accountsGetCreateModel.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get create account model + * + * @remarks + * The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/sync-for-payables-api#/schemas/Account) for a given company and integration. + * + * [Accounts](https://docs.codat.io/sync-for-payables-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. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support creating an account. + */ +export async function accountsGetCreateModel( + client$: CodatSyncPayablesCore, + request: operations.GetCreateAccountModelRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PushOption, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetCreateAccountModelRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/options/chartOfAccounts", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-create-account-model", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PushOption, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/accountsList.ts b/previous-versions/sync-for-payables-version-1/src/funcs/accountsList.ts new file mode 100644 index 000000000..e82909a4e --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/accountsList.ts @@ -0,0 +1,173 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * List accounts + * + * @remarks + * The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/sync-for-payables-api#/schemas/Account) for a given company's connection. + * + * [Accounts](https://docs.codat.io/sync-for-payables-api#/schemas/Account) are the categories a business uses to record accounting transactions. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ +export async function accountsList( + client$: CodatSyncPayablesCore, + request: operations.ListAccountsRequest, + options?: RequestOptions, +): Promise< + Result< + shared.Accounts, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListAccountsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/accounts")(pathParams$); + + const query$ = encodeFormQuery$({ + "orderBy": payload$.orderBy, + "page": payload$.page, + "pageSize": payload$.pageSize, + "query": payload$.query, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "list-accounts", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Accounts, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.Accounts$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/bankAccountsCreate.ts b/previous-versions/sync-for-payables-version-1/src/funcs/bankAccountsCreate.ts new file mode 100644 index 000000000..4c56b758d --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/bankAccountsCreate.ts @@ -0,0 +1,184 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Create bank account + * + * @remarks + * The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/sync-for-payables-api#/schemas/BankAccount) for a given company's connection. + * + * [Bank accounts](https://docs.codat.io/sync-for-payables-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. + * + * **Integration-specific behaviour** + * + * Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-update-bankAccounts-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating an account. + */ +export async function bankAccountsCreate( + client$: CodatSyncPayablesCore, + request: operations.CreateBankAccountRequest, + options?: RequestOptions, +): Promise< + Result< + shared.BankAccountCreateResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateBankAccountRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.bankAccountPrototype, { + explode: true, + }); + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/push/bankAccounts", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "timeoutInMinutes": payload$.timeoutInMinutes, + }); + + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "create-bank-account", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.BankAccountCreateResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.BankAccountCreateResponse$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/bankAccountsGetCreateModel.ts b/previous-versions/sync-for-payables-version-1/src/funcs/bankAccountsGetCreateModel.ts new file mode 100644 index 000000000..68585cc26 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/bankAccountsGetCreateModel.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get create/update bank account model + * + * @remarks + * The *Get create/update bank account model* endpoint returns the expected data for the request payload when creating and updating a [bank account](https://docs.codat.io/sync-for-payables-api#/schemas/BankAccount) for a given company and integration. + * + * [Bank accounts](https://docs.codat.io/sync-for-payables-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. + * + * **Integration-specific behaviour** + * + * See the *response examples* for integration-specific indicative models. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating and updating a bank account. + */ +export async function bankAccountsGetCreateModel( + client$: CodatSyncPayablesCore, + request: operations.GetCreateBankAccountsModelRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PushOption, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetCreateBankAccountsModelRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/options/bankAccounts", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-create-bankAccounts-model", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PushOption, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesCreate.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesCreate.ts new file mode 100644 index 000000000..68a505561 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesCreate.ts @@ -0,0 +1,182 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Create bill credit note + * + * @remarks + * The *Create bill credit note* endpoint creates a new [bill credit note](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) for a given company's connection. + * + * [Bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. + * + * **Integration-specific behaviour** + * + * Required data may vary by integration. To see what data to post, first call [Get create/update bill credit note model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-update-billCreditNotes-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating a bill credit note. + */ +export async function billCreditNotesCreate( + client$: CodatSyncPayablesCore, + request: operations.CreateBillCreditNoteRequest, + options?: RequestOptions, +): Promise< + Result< + shared.CreateBillCreditNoteResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateBillCreditNoteRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.BillCreditNote, { explode: true }); + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/push/billCreditNotes", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "timeoutInMinutes": payload$.timeoutInMinutes, + }); + + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "create-bill-credit-note", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.CreateBillCreditNoteResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.CreateBillCreditNoteResponse$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesGet.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesGet.ts new file mode 100644 index 000000000..a1d765bb4 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesGet.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get bill credit note + * + * @remarks + * The *Get bill credit note* endpoint returns a single bill credit note for a given `billCreditNoteId`. + * + * [Bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support getting a specific bill credit note. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ +export async function billCreditNotesGet( + client$: CodatSyncPayablesCore, + request: operations.GetBillCreditNoteRequest, + options?: RequestOptions, +): Promise< + Result< + shared.BillCreditNote, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetBillCreditNoteRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + billCreditNoteId: encodeSimple$( + "billCreditNoteId", + payload$.billCreditNoteId, + { explode: false, charEncoding: "percent" }, + ), + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/data/billCreditNotes/{billCreditNoteId}", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-bill-credit-note", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.BillCreditNote, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.BillCreditNote$inboundSchema), + m$.jsonErr( + [401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesGetCreateUpdateModel.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesGetCreateUpdateModel.ts new file mode 100644 index 000000000..83e7631d6 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesGetCreateUpdateModel.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get create/update bill credit note model + * + * @remarks + * The *Get create/update bill credit note model* endpoint returns the expected data for the request payload when creating and updating a [bill credit note](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) for a given company and integration. + * + * [Bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. + * + * **Integration-specific behaviour** + * + * See the *response examples* for integration-specific indicative models. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating and updating a bill credit note. + */ +export async function billCreditNotesGetCreateUpdateModel( + client$: CodatSyncPayablesCore, + request: operations.GetCreateUpdateBillCreditNoteModelRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PushOption, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetCreateUpdateBillCreditNoteModelRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/options/billCreditNotes", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-create-update-billCreditNote-model", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PushOption, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesList.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesList.ts new file mode 100644 index 000000000..95d164fd6 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesList.ts @@ -0,0 +1,176 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * List bill credit notes + * + * @remarks + * The *List bill credit notes* endpoint returns a list of [bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) for a given company's connection. + * + * [Bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ +export async function billCreditNotesList( + client$: CodatSyncPayablesCore, + request: operations.ListBillCreditNotesRequest, + options?: RequestOptions, +): Promise< + Result< + shared.BillCreditNotes, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListBillCreditNotesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/billCreditNotes")( + pathParams$, + ); + + const query$ = encodeFormQuery$({ + "orderBy": payload$.orderBy, + "page": payload$.page, + "pageSize": payload$.pageSize, + "query": payload$.query, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "list-bill-credit-notes", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.BillCreditNotes, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.BillCreditNotes$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesUpdate.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesUpdate.ts new file mode 100644 index 000000000..253300bb7 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billCreditNotesUpdate.ts @@ -0,0 +1,188 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Update bill credit note + * + * @remarks + * The *Update bill credit note* endpoint updates an existing [bill credit note](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) for a given company's connection. + * + * [Bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. + * + * **Integration-specific behaviour** + * + * Required data may vary by integration. To see what data to post, first call [Get create/update bill credit note model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-update-billCreditNotes-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating a bill credit note. + */ +export async function billCreditNotesUpdate( + client$: CodatSyncPayablesCore, + request: operations.UpdateBillCreditNoteRequest, + options?: RequestOptions, +): Promise< + Result< + shared.UpdateBillCreditNoteResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.UpdateBillCreditNoteRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.BillCreditNote, { explode: true }); + + const pathParams$ = { + billCreditNoteId: encodeSimple$( + "billCreditNoteId", + payload$.billCreditNoteId, + { explode: false, charEncoding: "percent" }, + ), + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/push/billCreditNotes/{billCreditNoteId}", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "forceUpdate": payload$.forceUpdate, + "timeoutInMinutes": payload$.timeoutInMinutes, + }); + + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "update-bill-credit-note", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "PUT", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.UpdateBillCreditNoteResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.UpdateBillCreditNoteResponse$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsCreate.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsCreate.ts new file mode 100644 index 000000000..51b0e9372 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsCreate.ts @@ -0,0 +1,182 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Create bill payments + * + * @remarks + * The *Create bill payment* endpoint creates a new [bill payment](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) for a given company's connection. + * + * [Bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) are an allocation of money within any customer accounts payable account. + * + * **Integration-specific behaviour** + * + * Required data may vary by integration. To see what data to post, first call [Get create bill payment model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-billPayments-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating a bill payment. + */ +export async function billPaymentsCreate( + client$: CodatSyncPayablesCore, + request: operations.CreateBillPaymentRequest, + options?: RequestOptions, +): Promise< + Result< + shared.CreateBillPaymentResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateBillPaymentRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.BillPayment, { explode: true }); + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/push/billPayments", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "timeoutInMinutes": payload$.timeoutInMinutes, + }); + + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "create-bill-payment", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.CreateBillPaymentResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.CreateBillPaymentResponse$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsDelete.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsDelete.ts new file mode 100644 index 000000000..265403ead --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsDelete.ts @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Delete bill payment + * + * @remarks + * The *Delete bill payment* endpoint allows you to delete a specified bill payment from an accounting software. + * + * [Bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) are an allocation of money within any Accounts Payable account. + * + * ### Process + * 1. Pass the `{billPaymentId}` to the *Delete bill payment* endpoint and store the `pushOperationKey` returned. + * 2. Check the status of the delete operation by checking the status of the push operation either via + * 1. [Push operation webhook](https://docs.codat.io/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), + * 2. [Push operation status endpoint](https://docs.codat.io/sync-for-payables-api#/operations/get-push-operation). + * + * A `Success` status indicates that the bill payment object was deleted from the accounting software. + * 3. (Optional) Check that the bill payment was deleted from the accounting software. + * + * ### Effect on related objects + * Be aware that deleting a bill payment from an accounting software might cause related objects to be modified. + * + * ## Integration specifics + * Integrations that support soft delete do not permanently delete the object in the accounting software. + * + * | Integration | Soft Delete | Details | + * |-------------|-------------|---------| + * | QuickBooks Online | No | - + * | QuickBooks Desktop | No | - + * | Oracle NetSuite | No | See [here](/integrations/accounting/netsuite/accounting-netsuite-how-deleting-bill-payments-works) to learn more. + * | Xero | Yes | - + * | Sage Intacct | No | Some bill payments in Sage Intacct can only be deleted, whilst others can only be voided. Codat have applied logic to handle this complexity. + * + * > **Supported integrations** + * > + * > This functionality is currently supported for our QuickBooks Online, QuickBooks Desktop, Oracle NetSuite, Xero and Sage Intacct integrations. + */ +export async function billPaymentsDelete( + client$: CodatSyncPayablesCore, + request: operations.DeleteBillPaymentRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PushOperation, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.DeleteBillPaymentRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + billPaymentId: encodeSimple$("billPaymentId", payload$.billPaymentId, { + explode: false, + charEncoding: "percent", + }), + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/push/billPayments/{billPaymentId}", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "delete-billPayment", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PushOperation, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsGet.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsGet.ts new file mode 100644 index 000000000..911ddab31 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsGet.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get bill payment + * + * @remarks + * The *Get bill payment* endpoint returns a single bill payment for a given `billPaymentId`. + * + * [Bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) are an allocation of money within any Accounts Payable account. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support getting a specific bill payment. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ +export async function billPaymentsGet( + client$: CodatSyncPayablesCore, + request: operations.GetBillPaymentsRequest, + options?: RequestOptions, +): Promise< + Result< + shared.BillPayment, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetBillPaymentsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + billPaymentId: encodeSimple$("billPaymentId", payload$.billPaymentId, { + explode: false, + charEncoding: "percent", + }), + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/data/billPayments/{billPaymentId}", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-bill-payments", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.BillPayment, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.BillPayment$inboundSchema), + m$.jsonErr( + [401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsGetCreateModel.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsGetCreateModel.ts new file mode 100644 index 000000000..7621d326a --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsGetCreateModel.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get create bill payment model + * + * @remarks + * The *Get create bill payment model* endpoint returns the expected data for the request payload when creating a [bill payment](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) for a given company and integration. + * + * [Bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) are an allocation of money within any Accounts Payable account. + * + * **Integration-specific behaviour** + * + * See the *response examples* for integration-specific indicative models. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating a bill payment. + */ +export async function billPaymentsGetCreateModel( + client$: CodatSyncPayablesCore, + request: operations.GetCreateBillPaymentModelRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PushOption, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetCreateBillPaymentModelRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/options/billPayments", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-create-billPayment-model", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PushOption, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsList.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsList.ts new file mode 100644 index 000000000..dc05a0376 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billPaymentsList.ts @@ -0,0 +1,175 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * List bill payments + * + * @remarks + * The *List bill payments* endpoint returns a list of [bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) for a given company's connection. + * + * [Bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) are an allocation of money within any Accounts Payable account. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ +export async function billPaymentsList( + client$: CodatSyncPayablesCore, + request: operations.ListBillPaymentsRequest, + options?: RequestOptions, +): Promise< + Result< + shared.BillPayments, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListBillPaymentsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/billPayments")( + pathParams$, + ); + + const query$ = encodeFormQuery$({ + "orderBy": payload$.orderBy, + "page": payload$.page, + "pageSize": payload$.pageSize, + "query": payload$.query, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "list-bill-payments", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.BillPayments, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.BillPayments$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billsCreate.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billsCreate.ts new file mode 100644 index 000000000..98d45b572 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billsCreate.ts @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Create bill + * + * @remarks + * The *Create bill* endpoint creates a new [bill](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) for a given company's connection. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + * + * **Integration-specific behaviour** + * + * Required data may vary by integration. To see what data to post, first call [Get create/update bill model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-update-bills-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating a bill. + */ +export async function billsCreate( + client$: CodatSyncPayablesCore, + request: operations.CreateBillRequest, + options?: RequestOptions, +): Promise< + Result< + shared.CreateBillResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.CreateBillRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.Bill, { explode: true }); + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/push/bills", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "timeoutInMinutes": payload$.timeoutInMinutes, + }); + + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "create-bill", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.CreateBillResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.CreateBillResponse$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billsDelete.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billsDelete.ts new file mode 100644 index 000000000..0a6b3c91f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billsDelete.ts @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Delete bill + * + * @remarks + * The *Delete bill* endpoint allows you to delete a specified bill from an accounting software. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are itemized records of goods received or services provided to the SMB. + * + * ### Process + * 1. Pass the `{billId}` to the *Delete bill* endpoint and store the `pushOperationKey` returned. + * 2. Check the status of the delete operation by checking the status of the push operation either via + * 1. [Push operation webhook](https://docs.codat.io/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), + * 2. [Push operation status endpoint](https://docs.codat.io/sync-for-payables-api#/operations/get-push-operation). + * + * A `Success` status indicates that the bill object was deleted from the accounting software. + * 3. (Optional) Check that the bill was deleted from the accounting software. + * + * ### Effect on related objects + * + * Be aware that deleting a bill from an accounting software might cause related objects to be modified. For example, if you delete a paid bill in QuickBooks Online or QuickBooks Desktop, the bill is deleted but the bill payment against that bill is not. The bill payment is converted to a payment on account. + * + * ## Integration specifics + * Integrations that support soft delete do not permanently delete the object in the accounting software. + * + * | Integration | Soft Delete | Details | + * |-------------|-------------|--------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | No | - | + * | QuickBooks Desktop | No | - | + * | Oracle NetSuite | No | When deleting a bill that's already linked to a bill payment, you must delete the linked bill payment first. | | + * | Sage Intacct | No | When deleting a bill that's already linked to a bill payment, you must delete the linked bill payment first. | + * | Xero | No | Draft bills will be deleted. Open bills will be voided instead of deleted since Xero only allows voiding a bill once it's been posted. When deleting a bill that's already linked to a bill payment, you must delete the linked bill payment first. | + * + * > **Supported Integrations** + * > + * > This functionality is currently supported for our QuickBooks Online, QuickBooks Desktop, Xero, Oracle NetSuite and Sage Intacct integrations. + */ +export async function billsDelete( + client$: CodatSyncPayablesCore, + request: operations.DeleteBillRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PushOperation, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.DeleteBillRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + billId: encodeSimple$("billId", payload$.billId, { + explode: false, + charEncoding: "percent", + }), + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/push/bills/{billId}", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "delete-bill", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PushOperation, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billsDeleteAttachment.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billsDeleteAttachment.ts new file mode 100644 index 000000000..1ddccc1a5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billsDeleteAttachment.ts @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Delete bill attachment + * + * @remarks + * The *Delete bill attachment* endpoint allows you to delete a specified bill attachment from an accounting software. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices + * that represent the SMB's financial obligations to their supplier for a + * purchase of goods or services. + * + * ### Process + * + * 1. Pass the `{billId}` and `{attachmentId}` to the *Delete bill attachment* endpoint and store the `pushOperationKey` returned. + * + * 2. Check the status of the delete operation by checking the status of push operation either via + * + * 1. [Push operation webhook](https://docs.codat.io/introduction/webhookscore-rules-types#push-operation-status-has-changed) (advised), + * + * 2. [Push operation status endpoint](https://docs.codat.io/sync-for-payables-api#/operations/get-push-operation). A `Success` status indicates that the bill attachment object was deleted from the accounting software. + * + * 3. (Optional) Check that the bill attachment was deleted from the accounting software. + * + * >**Supported Integrations** + * > + * >This functionality is currently only supported for our QuickBooks Online integration. + */ +export async function billsDeleteAttachment( + client$: CodatSyncPayablesCore, + request: operations.DeleteBillAttachmentRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PushOperation, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.DeleteBillAttachmentRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + attachmentId: encodeSimple$("attachmentId", payload$.attachmentId, { + explode: false, + charEncoding: "percent", + }), + billId: encodeSimple$("billId", payload$.billId, { + explode: false, + charEncoding: "percent", + }), + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/push/bills/{billId}/attachments/{attachmentId}", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "delete-bill-attachment", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PushOperation, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billsDownloadAttachment.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billsDownloadAttachment.ts new file mode 100644 index 000000000..8c0270b23 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billsDownloadAttachment.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Download bill attachment + * + * @remarks + * The *Download bill attachment* endpoint downloads a specific attachment for a given `billId` and `attachmentId`. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support downloading a bill attachment. + */ +export async function billsDownloadAttachment( + client$: CodatSyncPayablesCore, + request: operations.DownloadBillAttachmentRequest, + options?: RequestOptions, +): Promise< + Result< + ReadableStream, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.DownloadBillAttachmentRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + attachmentId: encodeSimple$("attachmentId", payload$.attachmentId, { + explode: false, + charEncoding: "percent", + }), + billId: encodeSimple$("billId", payload$.billId, { + explode: false, + charEncoding: "percent", + }), + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments/{attachmentId}/download", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/octet-stream", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "download-bill-attachment", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + ReadableStream, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.stream(200, z.instanceof(ReadableStream)), + m$.jsonErr( + [401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billsGet.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billsGet.ts new file mode 100644 index 000000000..122975c3c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billsGet.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get bill + * + * @remarks + * The *Get bill* endpoint returns a single bill for a given `billId`. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support getting a specific bill. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ +export async function billsGet( + client$: CodatSyncPayablesCore, + request: operations.GetBillRequest, + options?: RequestOptions, +): Promise< + Result< + shared.Bill, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetBillRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + billId: encodeSimple$("billId", payload$.billId, { + explode: false, + charEncoding: "percent", + }), + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/bills/{billId}")( + pathParams$, + ); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-bill", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Bill, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.Bill$inboundSchema), + m$.jsonErr( + [401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billsGetAttachment.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billsGetAttachment.ts new file mode 100644 index 000000000..7e3dd39cb --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billsGetAttachment.ts @@ -0,0 +1,165 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get bill attachment + * + * @remarks + * The *Get bill attachment* endpoint returns a specific attachment for a given `billId` and `attachmentId`. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support getting a bill attachment. + */ +export async function billsGetAttachment( + client$: CodatSyncPayablesCore, + request: operations.GetBillAttachmentRequest, + options?: RequestOptions, +): Promise< + Result< + shared.Attachment, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetBillAttachmentRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + attachmentId: encodeSimple$("attachmentId", payload$.attachmentId, { + explode: false, + charEncoding: "percent", + }), + billId: encodeSimple$("billId", payload$.billId, { + explode: false, + charEncoding: "percent", + }), + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments/{attachmentId}", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-bill-attachment", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Attachment, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.Attachment$inboundSchema), + m$.jsonErr( + [401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billsGetCreateUpdateModel.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billsGetCreateUpdateModel.ts new file mode 100644 index 000000000..75a9c0c07 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billsGetCreateUpdateModel.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get create/update bill model + * + * @remarks + * The *Get create/update bill model* endpoint returns the expected data for the request payload when creating and updating a [bill](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) for a given company and integration. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + * + * **Integration-specific behaviour** + * + * See the *response examples* for integration-specific indicative models. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating and updating a bill. + */ +export async function billsGetCreateUpdateModel( + client$: CodatSyncPayablesCore, + request: operations.GetCreateUpdateBillModelRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PushOption, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetCreateUpdateBillModelRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/options/bills", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-create-update-bill-model", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PushOption, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billsList.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billsList.ts new file mode 100644 index 000000000..afc119408 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billsList.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * List bills + * + * @remarks + * The *List bills* endpoint returns a list of [bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) for a given company's connection. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + */ +export async function billsList( + client$: CodatSyncPayablesCore, + request: operations.ListBillsRequest, + options?: RequestOptions, +): Promise< + Result< + shared.Bills, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListBillsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/bills")(pathParams$); + + const query$ = encodeFormQuery$({ + "orderBy": payload$.orderBy, + "page": payload$.page, + "pageSize": payload$.pageSize, + "query": payload$.query, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "list-bills", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Bills, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.Bills$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billsListAttachments.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billsListAttachments.ts new file mode 100644 index 000000000..76d32d574 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billsListAttachments.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * List bill attachments + * + * @remarks + * The *List bill attachments* endpoint returns a list of attachments available to download for a given `billId`. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + */ +export async function billsListAttachments( + client$: CodatSyncPayablesCore, + request: operations.ListBillAttachmentsRequest, + options?: RequestOptions, +): Promise< + Result< + shared.Attachments, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListBillAttachmentsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + billId: encodeSimple$("billId", payload$.billId, { + explode: false, + charEncoding: "percent", + }), + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/data/bills/{billId}/attachments", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "list-bill-attachments", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Attachments, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.Attachments$inboundSchema), + m$.jsonErr( + [401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billsUpdate.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billsUpdate.ts new file mode 100644 index 000000000..722cd427f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billsUpdate.ts @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Update bill + * + * @remarks + * The *Update bill* endpoint updates an existing [bill](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) for a given company's connection. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + * + * **Integration-specific behaviour** + * + * Required data may vary by integration. To see what data to post, first call [Get create/update bill model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-update-bills-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating a bill. + */ +export async function billsUpdate( + client$: CodatSyncPayablesCore, + request: operations.UpdateBillRequest, + options?: RequestOptions, +): Promise< + Result< + shared.UpdateBillResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.UpdateBillRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.Bill, { explode: true }); + + const pathParams$ = { + billId: encodeSimple$("billId", payload$.billId, { + explode: false, + charEncoding: "percent", + }), + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/push/bills/{billId}", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "forceUpdate": payload$.forceUpdate, + "timeoutInMinutes": payload$.timeoutInMinutes, + }); + + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "update-bill", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "PUT", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.UpdateBillResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.UpdateBillResponse$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/billsUploadAttachment.ts b/previous-versions/sync-for-payables-version-1/src/funcs/billsUploadAttachment.ts new file mode 100644 index 000000000..f5f19ad11 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/billsUploadAttachment.ts @@ -0,0 +1,198 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import { readableStreamToArrayBuffer } from "../lib/files.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { isBlobLike } from "../sdk/types/blobs.js"; +import { Result } from "../sdk/types/fp.js"; +import { isReadableStream } from "../sdk/types/streams.js"; + +/** + * Upload bill attachment + * + * @remarks + * The *Upload bill attachment* endpoint uploads an attachment and assigns it against a specific `billId`. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + * + * **Integration-specific behaviour** + * + * For more details on supported file types by integration see [Attachments](https://docs.codat.io/sync-for-payables-api#/schemas/Attachment). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support uploading a bill attachment. + */ +export async function billsUploadAttachment( + client$: CodatSyncPayablesCore, + request: operations.UploadBillAttachmentRequest, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.UploadBillAttachmentRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = new FormData(); + if (payload$.AttachmentUpload != null) { + if (isBlobLike(payload$.AttachmentUpload.file)) { + body$.append("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); + } else { + body$.append( + "file", + new Blob([payload$.AttachmentUpload.file.content], { + type: "application/octet-stream", + }), + payload$.AttachmentUpload.file.fileName, + ); + } + } + + const pathParams$ = { + billId: encodeSimple$("billId", payload$.billId, { + explode: false, + charEncoding: "percent", + }), + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/push/bills/{billId}/attachments", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "upload-bill-attachment", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + void, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, z.void()), + m$.jsonErr( + [400, 401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/companiesCreate.ts b/previous-versions/sync-for-payables-version-1/src/funcs/companiesCreate.ts new file mode 100644 index 000000000..0becfc6db --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/companiesCreate.ts @@ -0,0 +1,147 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeJSON as encodeJSON$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as shared from "../sdk/models/shared/index.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Create company + * + * @remarks + * Use the *Create company* endpoint to create a new [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) that represents your customer in Codat. + * + * A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. + * Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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. + * + * 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( + client$: CodatSyncPayablesCore, + request?: shared.CompanyRequestBody | undefined, + options?: RequestOptions, +): Promise< + Result< + shared.Company, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + shared.CompanyRequestBody$outboundSchema.optional().parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = payload$ === undefined + ? null + : encodeJSON$("body", payload$, { explode: true }); + + const path$ = pathToFunc("/companies")(); + + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "create-company", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["400", "401", "402", "403", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Company, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/companiesDelete.ts b/previous-versions/sync-for-payables-version-1/src/funcs/companiesDelete.ts new file mode 100644 index 000000000..fb5938f4f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/companiesDelete.ts @@ -0,0 +1,149 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete a company + * + * @remarks + * The *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company), its [connections](https://docs.codat.io/sync-for-payables-api#/schemas/Connection) and any cached data. This operation is irreversible. + * + * A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. + * Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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( + client$: CodatSyncPayablesCore, + request: operations.DeleteCompanyRequest, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.DeleteCompanyRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}")(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "delete-company", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + void, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(204, z.void()), + m$.jsonErr( + [401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/companiesGet.ts b/previous-versions/sync-for-payables-version-1/src/funcs/companiesGet.ts new file mode 100644 index 000000000..0048f73a8 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/companiesGet.ts @@ -0,0 +1,149 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get company + * + * @remarks + * The *Get company* endpoint returns a single company for a given `companyId`. + * + * A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. + * Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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( + client$: CodatSyncPayablesCore, + request: operations.GetCompanyRequest, + options?: RequestOptions, +): Promise< + Result< + shared.Company, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetCompanyRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}")(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-company", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Company, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/companiesList.ts b/previous-versions/sync-for-payables-version-1/src/funcs/companiesList.ts new file mode 100644 index 000000000..f97e7e202 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/companiesList.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeFormQuery as encodeFormQuery$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * List companies + * + * @remarks + * The *List companies* endpoint returns a list of [companies] associated to your instances. + * + * A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. + * Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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 companiesList( + client$: CodatSyncPayablesCore, + request: operations.ListCompaniesRequest, + options?: RequestOptions, +): Promise< + Result< + shared.Companies, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListCompaniesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const path$ = pathToFunc("/companies")(); + + const query$ = encodeFormQuery$({ + "orderBy": payload$.orderBy, + "page": payload$.page, + "pageSize": payload$.pageSize, + "query": payload$.query, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "list-companies", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Companies, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.Companies$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/companiesUpdate.ts b/previous-versions/sync-for-payables-version-1/src/funcs/companiesUpdate.ts new file mode 100644 index 000000000..5904473e9 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/companiesUpdate.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Update company + * + * @remarks + * Use the *Update company* endpoint to update both the name and description of the company. + * If you use [groups](https://docs.codat.io/sync-for-payables-api#/schemas/Group) to manage a set of companies, use the [Add company](https://docs.codat.io/sync-for-payables-api#/operations/add-company-to-group) or [Remove company](https://docs.codat.io/sync-for-payables-api#/operations/remove-company-from-group) endpoints to add or remove a company from a group. + * + * A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. + * Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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( + client$: CodatSyncPayablesCore, + request: operations.UpdateCompanyRequest, + options?: RequestOptions, +): Promise< + Result< + shared.Company, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.UpdateCompanyRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + 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({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "update-company", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "PUT", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Company, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/companyInfoGetAccountingProfile.ts b/previous-versions/sync-for-payables-version-1/src/funcs/companyInfoGetAccountingProfile.ts new file mode 100644 index 000000000..36dcd2921 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/companyInfoGetAccountingProfile.ts @@ -0,0 +1,158 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get company accounting profile + * + * @remarks + * Gets the latest basic info for a company. + */ +export async function companyInfoGetAccountingProfile( + client$: CodatSyncPayablesCore, + request: operations.GetAccountingProfileRequest, + options?: RequestOptions, +): Promise< + Result< + shared.CompanyInfo, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetAccountingProfileRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/info")(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-accounting-profile", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.CompanyInfo, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.CompanyInfo$inboundSchema), + m$.jsonErr( + [401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/connectionsCreate.ts b/previous-versions/sync-for-payables-version-1/src/funcs/connectionsCreate.ts new file mode 100644 index 000000000..e7263bf93 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/connectionsCreate.ts @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Create connection + * + * @remarks + * Creates a connection for the company by providing a valid `platformKey`. + * + * Use the [List Integrations](https://docs.codat.io/sync-for-payables-api#/operations/list-integrations) endpoint to access valid platform keys. + */ +export async function connectionsCreate( + client$: CodatSyncPayablesCore, + request: operations.CreateConnectionRequest, + options?: RequestOptions, +): Promise< + Result< + shared.Connection, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.CreateConnectionRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/connections")(pathParams$); + + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "create-connection", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Connection, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/connectionsDelete.ts b/previous-versions/sync-for-payables-version-1/src/funcs/connectionsDelete.ts new file mode 100644 index 000000000..e2cc9c491 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/connectionsDelete.ts @@ -0,0 +1,153 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Delete connection + * + * @remarks + * 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( + client$: CodatSyncPayablesCore, + request: operations.DeleteConnectionRequest, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.DeleteConnectionRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/connections/{connectionId}")( + pathParams$, + ); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "delete-connection", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "DELETE", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + void, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(200, z.void()), + m$.jsonErr( + [401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/connectionsGet.ts b/previous-versions/sync-for-payables-version-1/src/funcs/connectionsGet.ts new file mode 100644 index 000000000..4b8598b64 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/connectionsGet.ts @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get connection + * + * @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( + client$: CodatSyncPayablesCore, + request: operations.GetConnectionRequest, + options?: RequestOptions, +): Promise< + Result< + shared.Connection, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetConnectionRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/connections/{connectionId}")( + pathParams$, + ); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-connection", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Connection, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/connectionsList.ts b/previous-versions/sync-for-payables-version-1/src/funcs/connectionsList.ts new file mode 100644 index 000000000..2b73027a9 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/connectionsList.ts @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * List connections + * + * @remarks + * List the connections for a company. + */ +export async function connectionsList( + client$: CodatSyncPayablesCore, + request: operations.ListConnectionsRequest, + options?: RequestOptions, +): Promise< + Result< + shared.Connections, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListConnectionsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/connections")(pathParams$); + + const query$ = encodeFormQuery$({ + "orderBy": payload$.orderBy, + "page": payload$.page, + "pageSize": payload$.pageSize, + "query": payload$.query, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "list-connections", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Connections, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.Connections$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/connectionsUnlink.ts b/previous-versions/sync-for-payables-version-1/src/funcs/connectionsUnlink.ts new file mode 100644 index 000000000..c98d5066f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/connectionsUnlink.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Unlink connection + * + * @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( + client$: CodatSyncPayablesCore, + request: operations.UnlinkConnectionRequest, + options?: RequestOptions, +): Promise< + Result< + shared.Connection, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.UnlinkConnectionRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.RequestBody, { explode: true }); + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/connections/{connectionId}")( + pathParams$, + ); + + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "unlink-connection", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "PATCH", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Connection, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/journalEntriesCreate.ts b/previous-versions/sync-for-payables-version-1/src/funcs/journalEntriesCreate.ts new file mode 100644 index 000000000..d5ed13823 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/journalEntriesCreate.ts @@ -0,0 +1,182 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Create journal entry + * + * @remarks + * The *Create journal entry* endpoint creates a new [journal entry](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry) for a given company's connection. + * + * [Journal entries](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry) are made in a company's general ledger, or accounts, when transactions are approved. + * + * **Integration-specific behaviour** + * + * Required data may vary by integration. To see what data to post, first call [Get create journal entry model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-journalEntries-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journalEntries) for integrations that support creating a journal entry. + */ +export async function journalEntriesCreate( + client$: CodatSyncPayablesCore, + request: operations.CreateJournalEntryRequest, + options?: RequestOptions, +): Promise< + Result< + shared.CreateJournalEntryResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.CreateJournalEntryRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.JournalEntry, { explode: true }); + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/push/journalEntries", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "timeoutInMinutes": payload$.timeoutInMinutes, + }); + + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "create-journal-entry", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.CreateJournalEntryResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.CreateJournalEntryResponse$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/journalEntriesGetCreateModel.ts b/previous-versions/sync-for-payables-version-1/src/funcs/journalEntriesGetCreateModel.ts new file mode 100644 index 000000000..a5d73fda6 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/journalEntriesGetCreateModel.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get create journal entry model + * + * @remarks + * The *Get create journal entry model* endpoint returns the expected data for the request payload when creating a [journal entry](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry) for a given company and integration. + * + * [Journal entries](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry) are made in a company's general ledger, or accounts, when transactions are approved. + * + * **Integration-specific behaviour** + * + * See the *response examples* for integration-specific indicative models. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journalEntries) for integrations that support creating a journal entry. + */ +export async function journalEntriesGetCreateModel( + client$: CodatSyncPayablesCore, + request: operations.GetCreateJournalEntryModelRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PushOption, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetCreateJournalEntryModelRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/options/journalEntries", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-create-journalEntry-model", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PushOption, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/journalsCreate.ts b/previous-versions/sync-for-payables-version-1/src/funcs/journalsCreate.ts new file mode 100644 index 000000000..d582408d2 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/journalsCreate.ts @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Create journal + * + * @remarks + * The *Create journal* endpoint creates a new [journal](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) for a given company's connection. + * + * [Journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) are used to record all the financial transactions of a company. + * + * **Integration-specific behaviour** + * + * Required data may vary by integration. To see what data to post, first call [Get create journal model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-journals-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support creating a journal. + */ +export async function journalsCreate( + client$: CodatSyncPayablesCore, + request: operations.CreateJournalRequest, + options?: RequestOptions, +): Promise< + Result< + shared.CreateJournalResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.CreateJournalRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.journalPrototype, { + explode: true, + }); + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/push/journals", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "timeoutInMinutes": payload$.timeoutInMinutes, + }); + + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "create-journal", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.CreateJournalResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.CreateJournalResponse$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/journalsGet.ts b/previous-versions/sync-for-payables-version-1/src/funcs/journalsGet.ts new file mode 100644 index 000000000..51e0f5463 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/journalsGet.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get journal + * + * @remarks + * The *Get journal* endpoint returns a single journal for a given `journalId`. + * + * [Journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) are used to record all the financial transactions of a company. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support getting a specific journal. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ +export async function journalsGet( + client$: CodatSyncPayablesCore, + request: operations.GetJournalRequest, + options?: RequestOptions, +): Promise< + Result< + shared.Journal, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetJournalRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + journalId: encodeSimple$("journalId", payload$.journalId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/journals/{journalId}")( + pathParams$, + ); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-journal", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Journal, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.Journal$inboundSchema), + m$.jsonErr( + [401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/journalsGetCreateModel.ts b/previous-versions/sync-for-payables-version-1/src/funcs/journalsGetCreateModel.ts new file mode 100644 index 000000000..c61da7e7e --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/journalsGetCreateModel.ts @@ -0,0 +1,161 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get create journal model + * + * @remarks + * The *Get create journal model* endpoint returns the expected data for the request payload when creating a [journal](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) for a given company and integration. + * + * [Journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) are used to record all the financial transactions of a company. + * + * **Integration-specific behaviour** + * + * See the *response examples* for integration-specific indicative models. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support creating a journal. + */ +export async function journalsGetCreateModel( + client$: CodatSyncPayablesCore, + request: operations.GetCreateJournalModelRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PushOption, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetCreateJournalModelRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/options/journals", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-create-journal-model", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PushOption, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/journalsList.ts b/previous-versions/sync-for-payables-version-1/src/funcs/journalsList.ts new file mode 100644 index 000000000..b08964480 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/journalsList.ts @@ -0,0 +1,173 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * List journals + * + * @remarks + * The *List journals* endpoint returns a list of [journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) for a given company's connection. + * + * [Journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) are used to record all the financial transactions of a company. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ +export async function journalsList( + client$: CodatSyncPayablesCore, + request: operations.ListJournalsRequest, + options?: RequestOptions, +): Promise< + Result< + shared.Journals, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListJournalsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/journals")(pathParams$); + + const query$ = encodeFormQuery$({ + "orderBy": payload$.orderBy, + "page": payload$.page, + "pageSize": payload$.pageSize, + "query": payload$.query, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "list-journals", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Journals, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.Journals$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/manageDataGet.ts b/previous-versions/sync-for-payables-version-1/src/funcs/manageDataGet.ts new file mode 100644 index 000000000..3f0bae0cd --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/manageDataGet.ts @@ -0,0 +1,145 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Get data status + * + * @remarks + * Get the state of each data type for a company + */ +export async function manageDataGet( + client$: CodatSyncPayablesCore, + request: operations.GetDataStatusRequest, + options?: RequestOptions, +): Promise< + Result< + operations.GetDataStatusDataStatuses, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetDataStatusRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/dataStatus")(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-data-status", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + operations.GetDataStatusDataStatuses, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/manageDataGetPullOperation.ts b/previous-versions/sync-for-payables-version-1/src/funcs/manageDataGetPullOperation.ts new file mode 100644 index 000000000..02f936f7a --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/manageDataGetPullOperation.ts @@ -0,0 +1,152 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get pull operation + * + * @remarks + * Retrieve information about a single dataset or pull operation. + */ +export async function manageDataGetPullOperation( + client$: CodatSyncPayablesCore, + request: operations.GetPullOperationRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PullOperation, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetPullOperationRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + datasetId: encodeSimple$("datasetId", payload$.datasetId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/history/{datasetId}")( + pathParams$, + ); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-pull-operation", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PullOperation, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/manageDataListPullOperations.ts b/previous-versions/sync-for-payables-version-1/src/funcs/manageDataListPullOperations.ts new file mode 100644 index 000000000..0d3bbbac2 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/manageDataListPullOperations.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * List pull operations + * + * @remarks + * Gets the pull operation history (datasets) for a given company. + */ +export async function manageDataListPullOperations( + client$: CodatSyncPayablesCore, + request: operations.ListPullOperationsRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PullOperations, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListPullOperationsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/history")(pathParams$); + + const query$ = encodeFormQuery$({ + "orderBy": payload$.orderBy, + "page": payload$.page, + "pageSize": payload$.pageSize, + "query": payload$.query, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "list-pull-operations", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PullOperations, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.PullOperations$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/manageDataRefreshAllDataTypes.ts b/previous-versions/sync-for-payables-version-1/src/funcs/manageDataRefreshAllDataTypes.ts new file mode 100644 index 000000000..420229ecd --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/manageDataRefreshAllDataTypes.ts @@ -0,0 +1,151 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import * as operations from "../sdk/models/operations/index.js"; +import { Result } from "../sdk/types/fp.js"; + +/** + * Refresh all data + * + * @remarks + * 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`. + */ +export async function manageDataRefreshAllDataTypes( + client$: CodatSyncPayablesCore, + request: operations.RefreshAllDataTypesRequest, + options?: RequestOptions, +): Promise< + Result< + void, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.RefreshAllDataTypesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/all")(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "refresh-all-data-types", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + void, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.nil(204, z.void()), + m$.jsonErr( + [401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/manageDataRefreshDataType.ts b/previous-versions/sync-for-payables-version-1/src/funcs/manageDataRefreshDataType.ts new file mode 100644 index 000000000..26490273c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/manageDataRefreshDataType.ts @@ -0,0 +1,162 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Refresh data type + * + * @remarks + * 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. + */ +export async function manageDataRefreshDataType( + client$: CodatSyncPayablesCore, + request: operations.RefreshDataTypeRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PullOperation, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.RefreshDataTypeRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + dataType: encodeSimple$("dataType", payload$.dataType, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/queue/{dataType}")( + pathParams$, + ); + + const query$ = encodeFormQuery$({ + "connectionId": payload$.connectionId, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "refresh-data-type", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PullOperation, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/paymentMethodsGet.ts b/previous-versions/sync-for-payables-version-1/src/funcs/paymentMethodsGet.ts new file mode 100644 index 000000000..c16f279ab --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/paymentMethodsGet.ts @@ -0,0 +1,170 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get payment method + * + * @remarks + * The *Get payment method* endpoint returns a single payment method for a given `paymentMethodId`. + * + * [Payment methods](https://docs.codat.io/sync-for-payables-api#/schemas/PaymentMethod) are used to pay a Bill. Payment Methods are referenced on [Bill Payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) and [Payments](https://docs.codat.io/sync-for-payables-api#/schemas/Payment). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=paymentMethods) for integrations that support getting a specific payment method. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ +export async function paymentMethodsGet( + client$: CodatSyncPayablesCore, + request: operations.GetPaymentMethodRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PaymentMethod, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetPaymentMethodRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + paymentMethodId: encodeSimple$( + "paymentMethodId", + payload$.paymentMethodId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/data/paymentMethods/{paymentMethodId}", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-payment-method", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PaymentMethod, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.PaymentMethod$inboundSchema), + m$.jsonErr( + [401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/paymentMethodsList.ts b/previous-versions/sync-for-payables-version-1/src/funcs/paymentMethodsList.ts new file mode 100644 index 000000000..b2743a2e1 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/paymentMethodsList.ts @@ -0,0 +1,176 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * List payment methods + * + * @remarks + * The *List payment methods* endpoint returns a list of [payment methods](https://docs.codat.io/sync-for-payables-api#/schemas/PaymentMethod) for a given company's connection. + * + * [Payment methods](https://docs.codat.io/sync-for-payables-api#/schemas/PaymentMethod) are used to pay a Bill. Payment Methods are referenced on [Bill Payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) and [Payments](https://docs.codat.io/sync-for-payables-api#/schemas/Payment). + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ +export async function paymentMethodsList( + client$: CodatSyncPayablesCore, + request: operations.ListPaymentMethodsRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PaymentMethods, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListPaymentMethodsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/paymentMethods")( + pathParams$, + ); + + const query$ = encodeFormQuery$({ + "orderBy": payload$.orderBy, + "page": payload$.page, + "pageSize": payload$.pageSize, + "query": payload$.query, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "list-payment-methods", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PaymentMethods, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.PaymentMethods$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/pushOperationsGet.ts b/previous-versions/sync-for-payables-version-1/src/funcs/pushOperationsGet.ts new file mode 100644 index 000000000..b5ee81738 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/pushOperationsGet.ts @@ -0,0 +1,153 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get push operation + * + * @remarks + * Retrieve push operation. + */ +export async function pushOperationsGet( + client$: CodatSyncPayablesCore, + request: operations.GetPushOperationRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PushOperation, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetPushOperationRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + pushOperationKey: encodeSimple$( + "pushOperationKey", + payload$.pushOperationKey, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc("/companies/{companyId}/push/{pushOperationKey}")( + pathParams$, + ); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-push-operation", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PushOperation, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/pushOperationsList.ts b/previous-versions/sync-for-payables-version-1/src/funcs/pushOperationsList.ts new file mode 100644 index 000000000..e4fc55c5a --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/pushOperationsList.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * List push operations + * + * @remarks + * List push operation records. + */ +export async function pushOperationsList( + client$: CodatSyncPayablesCore, + request: operations.ListPushOperationsRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PushOperations, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListPushOperationsRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/push")(pathParams$); + + const query$ = encodeFormQuery$({ + "orderBy": payload$.orderBy, + "page": payload$.page, + "pageSize": payload$.pageSize, + "query": payload$.query, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "list-push-operations", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PushOperations, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.PushOperations$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/suppliersCreate.ts b/previous-versions/sync-for-payables-version-1/src/funcs/suppliersCreate.ts new file mode 100644 index 000000000..8f5f746fa --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/suppliersCreate.ts @@ -0,0 +1,181 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Create supplier + * + * @remarks + * The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) for a given company's connection. + * + * [Suppliers](https://docs.codat.io/sync-for-payables-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-payables-api#/operations/get-create-update-suppliers-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating a supplier. + */ +export async function suppliersCreate( + client$: CodatSyncPayablesCore, + request: operations.CreateSupplierRequest, + options?: RequestOptions, +): Promise< + Result< + shared.CreateSupplierResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.CreateSupplierRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.Supplier, { explode: true }); + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/push/suppliers", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "timeoutInMinutes": payload$.timeoutInMinutes, + }); + + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "create-supplier", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "POST", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.CreateSupplierResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.CreateSupplierResponse$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/suppliersGet.ts b/previous-versions/sync-for-payables-version-1/src/funcs/suppliersGet.ts new file mode 100644 index 000000000..a9a5b4b21 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/suppliersGet.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get supplier + * + * @remarks + * The *Get supplier* endpoint returns a single supplier for a given `supplierId`. + * + * [Suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support getting a specific supplier. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ +export async function suppliersGet( + client$: CodatSyncPayablesCore, + request: operations.GetSupplierRequest, + options?: RequestOptions, +): Promise< + Result< + shared.Supplier, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetSupplierRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + supplierId: encodeSimple$("supplierId", payload$.supplierId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/data/suppliers/{supplierId}", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-supplier", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Supplier, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.Supplier$inboundSchema), + m$.jsonErr( + [401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/suppliersGetCreateUpdateModel.ts b/previous-versions/sync-for-payables-version-1/src/funcs/suppliersGetCreateUpdateModel.ts new file mode 100644 index 000000000..657e601f5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/suppliersGetCreateUpdateModel.ts @@ -0,0 +1,163 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get create/update supplier model + * + * @remarks + * The *Get create/update supplier model* endpoint returns the expected data for the request payload when creating and updating a [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) for a given company and integration. + * + * [Suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + * + * **Integration-specific behaviour** + * + * See the *response examples* for integration-specific indicative models. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating and updating a supplier. + */ +export async function suppliersGetCreateUpdateModel( + client$: CodatSyncPayablesCore, + request: operations.GetCreateUpdateSupplierModelRequest, + options?: RequestOptions, +): Promise< + Result< + shared.PushOption, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetCreateUpdateSupplierModelRequest$outboundSchema.parse( + value$, + ), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/options/suppliers", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-create-update-supplier-model", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: ["401", "402", "403", "404", "429", "4XX", "500", "503", "5XX"], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.PushOption, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + 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$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/suppliersList.ts b/previous-versions/sync-for-payables-version-1/src/funcs/suppliersList.ts new file mode 100644 index 000000000..95fcb8f0c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/suppliersList.ts @@ -0,0 +1,173 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * List suppliers + * + * @remarks + * The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) for a given company's connection. + * + * [Suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + */ +export async function suppliersList( + client$: CodatSyncPayablesCore, + request: operations.ListSuppliersRequest, + options?: RequestOptions, +): Promise< + Result< + shared.Suppliers, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListSuppliersRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/suppliers")( + pathParams$, + ); + + const query$ = encodeFormQuery$({ + "orderBy": payload$.orderBy, + "page": payload$.page, + "pageSize": payload$.pageSize, + "query": payload$.query, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "list-suppliers", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.Suppliers, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.Suppliers$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/suppliersUpdate.ts b/previous-versions/sync-for-payables-version-1/src/funcs/suppliersUpdate.ts new file mode 100644 index 000000000..7ae059f42 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/suppliersUpdate.ts @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeJSON as encodeJSON$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Update supplier + * + * @remarks + * The *Update supplier* endpoint updates an existing [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) for a given company's connection. + * + * [Suppliers](https://docs.codat.io/sync-for-payables-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-payables-api#/operations/get-create-update-suppliers-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating a supplier. + */ +export async function suppliersUpdate( + client$: CodatSyncPayablesCore, + request: operations.UpdateSupplierRequest, + options?: RequestOptions, +): Promise< + Result< + shared.UpdateSupplierResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.UpdateSupplierRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = encodeJSON$("body", payload$.Supplier, { explode: true }); + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + connectionId: encodeSimple$("connectionId", payload$.connectionId, { + explode: false, + charEncoding: "percent", + }), + supplierId: encodeSimple$("supplierId", payload$.supplierId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/connections/{connectionId}/push/suppliers/{supplierId}", + )(pathParams$); + + const query$ = encodeFormQuery$({ + "forceUpdate": payload$.forceUpdate, + "timeoutInMinutes": payload$.timeoutInMinutes, + }); + + const headers$ = new Headers({ + "Content-Type": "application/json", + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "update-supplier", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "PUT", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.UpdateSupplierResponse, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.UpdateSupplierResponse$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/taxRatesGet.ts b/previous-versions/sync-for-payables-version-1/src/funcs/taxRatesGet.ts new file mode 100644 index 000000000..aabfc7734 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/taxRatesGet.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get tax rate + * + * @remarks + * The *Get tax rate* endpoint returns a single tax rate for a given `taxRateId`. + * + * [Tax rates](https://docs.codat.io/sync-for-payables-api#/schemas/TaxRate) are a set of taxes and associated rates within the SMB's accounting software. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=taxRates) for integrations that support getting a specific tax rate. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ +export async function taxRatesGet( + client$: CodatSyncPayablesCore, + request: operations.GetTaxRateRequest, + options?: RequestOptions, +): Promise< + Result< + shared.TaxRate, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.GetTaxRateRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + taxRateId: encodeSimple$("taxRateId", payload$.taxRateId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/taxRates/{taxRateId}")( + pathParams$, + ); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-tax-rate", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.TaxRate, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.TaxRate$inboundSchema), + m$.jsonErr( + [401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/taxRatesList.ts b/previous-versions/sync-for-payables-version-1/src/funcs/taxRatesList.ts new file mode 100644 index 000000000..d8125a7d5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/taxRatesList.ts @@ -0,0 +1,173 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * List all tax rates + * + * @remarks + * The *List tax rates* endpoint returns a list of [tax rates](https://docs.codat.io/sync-for-payables-api#/schemas/TaxRate) for a given company's connection. + * + * [Tax rates](https://docs.codat.io/sync-for-payables-api#/schemas/TaxRate) are a set of taxes and associated rates within the SMB's accounting software. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ +export async function taxRatesList( + client$: CodatSyncPayablesCore, + request: operations.ListTaxRatesRequest, + options?: RequestOptions, +): Promise< + Result< + shared.TaxRates, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => operations.ListTaxRatesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/taxRates")(pathParams$); + + const query$ = encodeFormQuery$({ + "orderBy": payload$.orderBy, + "page": payload$.page, + "pageSize": payload$.pageSize, + "query": payload$.query, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "list-tax-rates", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.TaxRates, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.TaxRates$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/trackingCategoriesGet.ts b/previous-versions/sync-for-payables-version-1/src/funcs/trackingCategoriesGet.ts new file mode 100644 index 000000000..721aacb19 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/trackingCategoriesGet.ts @@ -0,0 +1,171 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { encodeSimple as encodeSimple$ } from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * Get tracking categories + * + * @remarks + * The *Get tracking category* endpoint returns a single tracking category for a given `trackingCategoryId`. + * + * [Tracking categories](https://docs.codat.io/sync-for-payables-api#/schemas/TrackingCategory) are used to monitor cost centres and control budgets that sit outside the standard set of accounts. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=trackingCategories) for integrations that support getting a specific tracking category. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ +export async function trackingCategoriesGet( + client$: CodatSyncPayablesCore, + request: operations.GetTrackingCategoryRequest, + options?: RequestOptions, +): Promise< + Result< + shared.TrackingCategoryTree, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.GetTrackingCategoryRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + trackingCategoryId: encodeSimple$( + "trackingCategoryId", + payload$.trackingCategoryId, + { explode: false, charEncoding: "percent" }, + ), + }; + + const path$ = pathToFunc( + "/companies/{companyId}/data/trackingCategories/{trackingCategoryId}", + )(pathParams$); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "get-tracking-category", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.TrackingCategoryTree, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.TrackingCategoryTree$inboundSchema), + m$.jsonErr( + [401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/funcs/trackingCategoriesList.ts b/previous-versions/sync-for-payables-version-1/src/funcs/trackingCategoriesList.ts new file mode 100644 index 000000000..aeb631449 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/funcs/trackingCategoriesList.ts @@ -0,0 +1,176 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { CodatSyncPayablesCore } from "../core.js"; +import { + encodeFormQuery as encodeFormQuery$, + encodeSimple as encodeSimple$, +} from "../lib/encodings.js"; +import * as m$ from "../lib/matchers.js"; +import * as schemas$ from "../lib/schemas.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + 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 { 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 { Result } from "../sdk/types/fp.js"; + +/** + * List tracking categories + * + * @remarks + * The *List tracking categories* endpoint returns a list of [tracking categories](https://docs.codat.io/sync-for-payables-api#/schemas/TrackingCategory) for a given company's connection. + * + * [Tracking categories](https://docs.codat.io/sync-for-payables-api#/schemas/TrackingCategory) are used to monitor cost centres and control budgets that sit outside the standard set of accounts. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ +export async function trackingCategoriesList( + client$: CodatSyncPayablesCore, + request: operations.ListTrackingCategoriesRequest, + options?: RequestOptions, +): Promise< + Result< + shared.TrackingCategories, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + > +> { + const input$ = request; + + const parsed$ = schemas$.safeParse( + input$, + (value$) => + operations.ListTrackingCategoriesRequest$outboundSchema.parse(value$), + "Input validation failed", + ); + if (!parsed$.ok) { + return parsed$; + } + const payload$ = parsed$.value; + const body$ = null; + + const pathParams$ = { + companyId: encodeSimple$("companyId", payload$.companyId, { + explode: false, + charEncoding: "percent", + }), + }; + + const path$ = pathToFunc("/companies/{companyId}/data/trackingCategories")( + pathParams$, + ); + + const query$ = encodeFormQuery$({ + "orderBy": payload$.orderBy, + "page": payload$.page, + "pageSize": payload$.pageSize, + "query": payload$.query, + }); + + const headers$ = new Headers({ + Accept: "application/json", + }); + + const authHeader$ = await extractSecurity(client$.options$.authHeader); + const security$ = authHeader$ == null ? {} : { authHeader: authHeader$ }; + const context = { + operationID: "list-tracking-categories", + oAuth2Scopes: [], + securitySource: client$.options$.authHeader, + }; + const securitySettings$ = resolveGlobalSecurity(security$); + + const requestRes = client$.createRequest$(context, { + security: securitySettings$, + method: "GET", + path: path$, + headers: headers$, + query: query$, + body: body$, + timeoutMs: options?.timeoutMs || client$.options$.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return requestRes; + } + const request$ = requestRes.value; + + const doResult = await client$.do$(request$, { + context, + errorCodes: [ + "400", + "401", + "402", + "403", + "404", + "409", + "429", + "4XX", + "500", + "503", + "5XX", + ], + retryConfig: options?.retries + || client$.options$.retryConfig + || { + strategy: "backoff", + backoff: { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, + }, + retryConnectionErrors: true, + }, + retryCodes: options?.retryCodes || ["408", "429", "5XX"], + }); + if (!doResult.ok) { + return doResult; + } + const response = doResult.value; + + const responseFields$ = { + HttpMeta: { Response: response, Request: request$ }, + }; + + const [result$] = await m$.match< + shared.TrackingCategories, + | errors.ErrorMessage + | SDKError + | SDKValidationError + | UnexpectedClientError + | InvalidRequestError + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + >( + m$.json(200, shared.TrackingCategories$inboundSchema), + m$.jsonErr( + [400, 401, 402, 403, 404, 409, 429, 500, 503], + errors.ErrorMessage$inboundSchema, + ), + m$.fail(["4XX", "5XX"]), + )(response, { extraFields: responseFields$ }); + if (!result$.ok) { + return result$; + } + + return result$; +} diff --git a/previous-versions/sync-for-payables-version-1/src/hooks/hooks.ts b/previous-versions/sync-for-payables-version-1/src/hooks/hooks.ts new file mode 100644 index 000000000..d1b3396f5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/hooks/hooks.ts @@ -0,0 +1,112 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { RequestInput } from "../lib/http.js"; +import { + AfterErrorContext, + AfterErrorHook, + AfterSuccessContext, + AfterSuccessHook, + BeforeCreateRequestContext, + BeforeCreateRequestHook, + BeforeRequestContext, + BeforeRequestHook, + Hooks, + SDKInitHook, + SDKInitOptions, +} from "./types.js"; + +import { initHooks } from "./registration.js"; + +export class SDKHooks implements Hooks { + sdkInitHooks: SDKInitHook[] = []; + beforeCreateRequestHooks: BeforeCreateRequestHook[] = []; + beforeRequestHooks: BeforeRequestHook[] = []; + afterSuccessHooks: AfterSuccessHook[] = []; + afterErrorHooks: AfterErrorHook[] = []; + + constructor() { + initHooks(this); + } + + registerSDKInitHook(hook: SDKInitHook) { + this.sdkInitHooks.push(hook); + } + + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook) { + this.beforeCreateRequestHooks.push(hook); + } + + registerBeforeRequestHook(hook: BeforeRequestHook) { + this.beforeRequestHooks.push(hook); + } + + registerAfterSuccessHook(hook: AfterSuccessHook) { + this.afterSuccessHooks.push(hook); + } + + registerAfterErrorHook(hook: AfterErrorHook) { + this.afterErrorHooks.push(hook); + } + + sdkInit(opts: SDKInitOptions): SDKInitOptions { + return this.sdkInitHooks.reduce((opts, hook) => hook.sdkInit(opts), opts); + } + + beforeCreateRequest( + hookCtx: BeforeCreateRequestContext, + input: RequestInput, + ): RequestInput { + let inp = input; + + for (const hook of this.beforeCreateRequestHooks) { + inp = hook.beforeCreateRequest(hookCtx, inp); + } + + return inp; + } + + async beforeRequest( + hookCtx: BeforeRequestContext, + request: Request, + ): Promise { + let req = request; + + for (const hook of this.beforeRequestHooks) { + req = await hook.beforeRequest(hookCtx, req); + } + + return req; + } + + async afterSuccess( + hookCtx: AfterSuccessContext, + response: Response, + ): Promise { + let res = response; + + for (const hook of this.afterSuccessHooks) { + res = await hook.afterSuccess(hookCtx, res); + } + + return res; + } + + async afterError( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown, + ): Promise<{ response: Response | null; error: unknown }> { + let res = response; + let err = error; + + for (const hook of this.afterErrorHooks) { + const result = await hook.afterError(hookCtx, res, err); + res = result.response; + err = result.error; + } + + return { response: res, error: err }; + } +} diff --git a/previous-versions/sync-for-payables-version-1/src/hooks/index.ts b/previous-versions/sync-for-payables-version-1/src/hooks/index.ts new file mode 100644 index 000000000..f60ec7acd --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/hooks/index.ts @@ -0,0 +1,6 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "./hooks.js"; +export * from "./types.js"; diff --git a/previous-versions/sync-for-payables-version-1/src/hooks/registration.ts b/previous-versions/sync-for-payables-version-1/src/hooks/registration.ts new file mode 100644 index 000000000..70649734e --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/hooks/registration.ts @@ -0,0 +1,14 @@ +import { Hooks } from "./types.js"; + +/* + * This file is only ever generated once on the first generation and then is free to be modified. + * Any hooks you wish to add should be registered in the initHooks function. Feel free to define them + * in this file or in separate files in the hooks folder. + */ + +// @ts-expect-error remove this line when you add your first hook and hooks is used +export function initHooks(hooks: Hooks) { + // Add hooks by calling hooks.register{ClientInit/BeforeCreateRequest/BeforeRequest/AfterSuccess/AfterError}Hook + // with an instance of a hook that implements that specific Hook interface + // Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance +} diff --git a/previous-versions/sync-for-payables-version-1/src/hooks/types.ts b/previous-versions/sync-for-payables-version-1/src/hooks/types.ts new file mode 100644 index 000000000..656b9e373 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/hooks/types.ts @@ -0,0 +1,98 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { HTTPClient, RequestInput } from "../lib/http.js"; + +export type HookContext = { + operationID: string; + oAuth2Scopes?: string[]; + securitySource?: any | (() => Promise); +}; + +export type Awaitable = T | Promise; + +export type SDKInitOptions = { + baseURL: URL | null; + client: HTTPClient; +}; + +export type BeforeCreateRequestContext = HookContext & {}; +export type BeforeRequestContext = HookContext & {}; +export type AfterSuccessContext = HookContext & {}; +export type AfterErrorContext = HookContext & {}; + +/** + * SDKInitHook is called when the SDK is initializing. The + * hook can return a new baseURL and HTTP client to be used by the SDK. + */ +export interface SDKInitHook { + sdkInit: (opts: SDKInitOptions) => SDKInitOptions; +} + +export interface BeforeCreateRequestHook { + /** + * A hook that is called before the SDK creates a `Request` object. The hook + * can modify how a request is constructed since certain modifications, like + * changing the request URL, cannot be done on a request object directly. + */ + beforeCreateRequest: ( + hookCtx: BeforeCreateRequestContext, + input: RequestInput, + ) => RequestInput; +} + +export interface BeforeRequestHook { + /** + * A hook that is called before the SDK sends a request. The hook can + * introduce instrumentation code such as logging, tracing and metrics or + * replace the request before it is sent or throw an error to stop the + * request from being sent. + */ + beforeRequest: ( + hookCtx: BeforeRequestContext, + request: Request, + ) => Awaitable; +} + +export interface AfterSuccessHook { + /** + * A hook that is called after the SDK receives a response. The hook can + * introduce instrumentation code such as logging, tracing and metrics or + * modify the response before it is handled or throw an error to stop the + * response from being handled. + */ + afterSuccess: ( + hookCtx: AfterSuccessContext, + response: Response, + ) => Awaitable; +} + +export interface AfterErrorHook { + /** + * A hook that is called after the SDK encounters an error, or a + * non-successful response. The hook can introduce instrumentation code such + * as logging, tracing and metrics or modify the response or error values. + */ + afterError: ( + hookCtx: AfterErrorContext, + response: Response | null, + error: unknown, + ) => Awaitable<{ + response: Response | null; + error: unknown; + }>; +} + +export interface Hooks { + /** Registers a hook to be used by the SDK for initialization event. */ + registerSDKInitHook(hook: SDKInitHook): void; + /** Registers a hook to be used by the SDK for to modify `Request` construction. */ + registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook): void; + /** Registers a hook to be used by the SDK for the before request event. */ + registerBeforeRequestHook(hook: BeforeRequestHook): void; + /** Registers a hook to be used by the SDK for the after success event. */ + registerAfterSuccessHook(hook: AfterSuccessHook): void; + /** Registers a hook to be used by the SDK for the after error event. */ + registerAfterErrorHook(hook: AfterErrorHook): void; +} diff --git a/previous-versions/sync-for-payables-version-1/src/index.ts b/previous-versions/sync-for-payables-version-1/src/index.ts index 313031483..5ddc765ed 100644 --- a/previous-versions/sync-for-payables-version-1/src/index.ts +++ b/previous-versions/sync-for-payables-version-1/src/index.ts @@ -1,5 +1,7 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./sdk"; +export * from "./lib/config.js"; +export * as files from "./lib/files.js"; +export * from "./sdk/sdk.js"; diff --git a/previous-versions/sync-for-payables-version-1/src/internal/utils/contenttype.ts b/previous-versions/sync-for-payables-version-1/src/internal/utils/contenttype.ts deleted file mode 100644 index ddf6c82ba..000000000 --- a/previous-versions/sync-for-payables-version-1/src/internal/utils/contenttype.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -export function matchContentType( - contentType: string, - pattern: string, -): boolean { - let res = false; - contentType - .split(";") - .map((ctPart: string) => { - return ctPart.trim(); - }) - .forEach((ctPart: string) => { - if (ctPart === pattern || pattern === "*" || pattern === "*/*") { - res = true; - return; - } - if (ctPart === pattern) { - res = true; - return; - } - const parts: string[] = ctPart.split("/"); - if (parts.length === 2) { - if (`${parts[0]}/*` === pattern || `*/${parts[1]}` === pattern) { - res = true; - return; - } - } - }); - return res; -} diff --git a/previous-versions/sync-for-payables-version-1/src/internal/utils/headers.ts b/previous-versions/sync-for-payables-version-1/src/internal/utils/headers.ts deleted file mode 100644 index 489ba6732..000000000 --- a/previous-versions/sync-for-payables-version-1/src/internal/utils/headers.ts +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { AxiosResponseHeaders, RawAxiosResponseHeaders } from "axios"; -import { - ParamDecorator, - isBooleanRecord, - isEmpty, - isNumberRecord, - isStringRecord, - parseParamDecorator, - valToString, -} from "./utils"; - -import { requestMetadataKey } from "./requestbody"; - -export const headerMetadataKey = "header"; - -export function getHeadersFromRequest(headerParams: any): any { - if (headerParams == null) return; - - const headers: any = {}; - - const fieldNames: string[] = Object.getOwnPropertyNames(headerParams); - fieldNames.forEach((fname) => { - const requestBodyAnn: string = Reflect.getMetadata( - requestMetadataKey, - headerParams, - fname, - ); - - if (requestBodyAnn) return; - - const headerAnn: string = Reflect.getMetadata( - headerMetadataKey, - headerParams, - fname, - ); - - if (headerAnn == null) return; - - const headerDecorator: ParamDecorator = parseParamDecorator( - headerAnn, - fname, - "simple", - false, - ); - - if (headerDecorator == null) return; - - const value: string = serializeHeader( - headerParams[fname], - headerDecorator.Explode, - ); - - if (value != "") headers[headerDecorator.ParamName] = value; - }); - - return headers; -} - -export function getHeadersFromResponse( - headers: RawAxiosResponseHeaders | AxiosResponseHeaders, -): Record { - const reponseHeaders: Record = {}; - - Object.keys(headers).forEach((key) => { - const value = headers[key]; - - if (!value) return; - - if (Array.isArray(value)) { - const h: string[] = []; - - value.forEach((val: any) => { - if (val) { - h.push(String(val)); - } - }); - - reponseHeaders[key] = h; - } else { - reponseHeaders[key] = [value]; - } - }); - - return reponseHeaders; -} - -function serializeHeader(header: any, explode: boolean): string { - const headerVals: string[] = []; - - if (Array.isArray(header)) { - header.forEach((val: any) => { - headerVals.push(valToString(val)); - }); - } else if ( - isStringRecord(header) || - isNumberRecord(header) || - isBooleanRecord(header) - ) { - Object.getOwnPropertyNames(header).forEach((headerKey: string) => { - if (explode) - headerVals.push(`${headerKey}=${valToString(header[headerKey])}`); - else headerVals.push(`${headerKey},${valToString(header[headerKey])}`); - }); - } else if (header instanceof Object) { - Object.getOwnPropertyNames(header).forEach((headerKey: string) => { - const headerAnn: string = Reflect.getMetadata( - headerMetadataKey, - header, - headerKey, - ); - - if (headerAnn == null) return; - - const headerDecorator: ParamDecorator = parseParamDecorator( - headerAnn, - headerKey, - "simple", - explode, - ); - - if (headerDecorator == null) return; - - const headerFieldValue = valToString(header[headerKey]); - - if (isEmpty(headerFieldValue)) return; - else if (explode) - headerVals.push(`${headerDecorator.ParamName}=${headerFieldValue}`); - else headerVals.push(`${headerDecorator.ParamName},${headerFieldValue}`); - }); - } else { - return String(header); - } - return headerVals.join(","); -} diff --git a/previous-versions/sync-for-payables-version-1/src/internal/utils/index.ts b/previous-versions/sync-for-payables-version-1/src/internal/utils/index.ts deleted file mode 100644 index db8bb23fd..000000000 --- a/previous-versions/sync-for-payables-version-1/src/internal/utils/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -export * from "./contenttype"; -export * from "./headers"; -export * from "./pathparams"; -export * from "./queryparams"; -export * from "./requestbody"; -export * from "./retries"; -export * from "./security"; -export * from "./utils"; diff --git a/previous-versions/sync-for-payables-version-1/src/internal/utils/pathparams.ts b/previous-versions/sync-for-payables-version-1/src/internal/utils/pathparams.ts deleted file mode 100644 index 0b8137ac6..000000000 --- a/previous-versions/sync-for-payables-version-1/src/internal/utils/pathparams.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { - ParamDecorator, - isBooleanRecord, - isEmpty, - isNumberRecord, - isStringRecord, - parseParamDecorator, - valToString, -} from "./utils"; - -export const ppMetadataKey = "pathParam"; - -export function getSimplePathParams( - paramName: string, - paramValue: any, - explode: boolean, -): Map { - const pathParams: Map = new Map(); - const ppVals: string[] = []; - - if (Array.isArray(paramValue)) { - paramValue.forEach((param) => { - ppVals.push(encodeURIComponent(valToString(param))); - }); - pathParams.set(paramName, ppVals.join(",")); - } else if ( - isStringRecord(paramValue) || - isNumberRecord(paramValue) || - isBooleanRecord(paramValue) - ) { - Object.getOwnPropertyNames(paramValue).forEach((paramKey: string) => { - const paramFieldValue = encodeURIComponent( - valToString(paramValue[paramKey]), - ); - - if (explode) ppVals.push(`${paramKey}=${paramFieldValue}`); - else ppVals.push(`${paramKey},${paramFieldValue}`); - }); - - pathParams.set(paramName, ppVals.join(",")); - } else if (paramValue instanceof Object) { - Object.getOwnPropertyNames(paramValue).forEach((paramKey: string) => { - const ppAnn: string = Reflect.getMetadata( - ppMetadataKey, - paramValue, - paramKey, - ); - - if (ppAnn == null) return; - - const ppDecorator: ParamDecorator = parseParamDecorator( - ppAnn, - paramKey, - "simple", - explode, - ); - - if (ppDecorator == null) return; - - const paramFieldValue = encodeURIComponent( - valToString(paramValue[paramKey]), - ); - - if (isEmpty(paramFieldValue)) return; - else if (explode) - ppVals.push(`${ppDecorator.ParamName}=${paramFieldValue}`); - else ppVals.push(`${ppDecorator.ParamName},${paramFieldValue}`); - }); - - pathParams.set(paramName, ppVals.join(",")); - } else { - pathParams.set(paramName, encodeURIComponent(valToString(paramValue))); - } - return pathParams; -} diff --git a/previous-versions/sync-for-payables-version-1/src/internal/utils/queryparams.ts b/previous-versions/sync-for-payables-version-1/src/internal/utils/queryparams.ts deleted file mode 100644 index 34a9f714f..000000000 --- a/previous-versions/sync-for-payables-version-1/src/internal/utils/queryparams.ts +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { - ParamDecorator, - parseParamDecorator, - populateFromGlobals, - shouldQueryParamSerialize, - valToString, -} from "./utils"; - -import { requestMetadataKey } from "./requestbody"; - -export const qpMetadataKey = "queryParam"; -const queryStringPrefix = "?"; - -const filterAndJoin = (strings: string[]): string => - strings.filter((s) => !!s).join("&"); - -export function serializeQueryParams(queryParams: any, globals?: any): string { - const queryStringParts: string[] = []; - if (!queryParams) return filterAndJoin(queryStringParts); - - const fieldNames: string[] = - "__props__" in queryParams - ? queryParams["__props__"].map((prop: any) => prop.key) - : Object.getOwnPropertyNames(queryParams); - - fieldNames.forEach((fname) => { - const requestBodyAnn: string = Reflect.getMetadata( - requestMetadataKey, - queryParams, - fname, - ); - - if (requestBodyAnn) return; - - const qpAnn: string = Reflect.getMetadata( - qpMetadataKey, - queryParams, - fname, - ); - - if (!qpAnn) return { serialize: () => "" }; - - const qpDecorator: ParamDecorator = parseParamDecorator( - qpAnn, - fname, - "form", - true, - ); - - if (!qpDecorator) return; - - let value = queryParams[fname]; - value = populateFromGlobals(value, fname, "queryParam", globals); - - if (qpDecorator.Serialization === "json") - queryStringParts.push(jsonSerializer({ [qpDecorator.ParamName]: value })); - else { - switch (qpDecorator.Style) { - case "deepObject": - queryStringParts.push( - deepObjectSerializer({ [qpDecorator.ParamName]: value }), - ); - return; - case "form": - if (!qpDecorator.Explode) - queryStringParts.push( - noExplodeSerializer({ [qpDecorator.ParamName]: value }), - ); - else - queryStringParts.push( - formSerializerExplode({ [qpDecorator.ParamName]: value }), - ); - return; - case "pipeDelimited": - if (!qpDecorator.Explode) { - queryStringParts.push( - noExplodeSerializer({ [qpDecorator.ParamName]: value }, "|"), - ); - } else { - queryStringParts.push( - formSerializerExplode({ [qpDecorator.ParamName]: value }), - ); - } - return; - default: - queryStringParts.push( - formSerializerExplode({ [qpDecorator.ParamName]: value }), - ); - } - } - }); - return queryStringPrefix + filterAndJoin(queryStringParts); -} - -// TODO: Add support for disabling percent encoding for reserved characters -function jsonSerializer(params: Record): string { - const query: string[] = []; - - Object.entries(Object.assign({}, params)).forEach(([key, value]) => { - query.push(`${key}=${encodeURIComponent(JSON.stringify(value))}`); - }); - return filterAndJoin(query); -} - -// TODO: Add support for disabling percent encoding for reserved characters -function noExplodeSerializer( - params: Record, - delimiter = ",", -): string { - const query: string[] = []; - - Object.entries(Object.assign({}, params)).forEach(([key, value]) => { - if (!shouldQueryParamSerialize(value)) return; - if (value !== Object(value)) - query.push(`${key}=${encodeURIComponent(valToString(value))}`); - else if (Array.isArray(value)) { - const values: string = value.map((aValue) => aValue).join(delimiter); - - query.push(`${key}=${encodeURIComponent(values)}`); - } else { - const values: string = Object.getOwnPropertyNames(value) - .map((paramKey: string) => { - const qpAnn: string = Reflect.getMetadata( - qpMetadataKey, - value, - paramKey, - ); - - const qpDecorator: ParamDecorator = parseParamDecorator( - qpAnn, - paramKey, - "form", - true, - ); - - if (qpDecorator == null) return; - - const key = qpDecorator.ParamName || paramKey; - return `${key}${delimiter}${valToString(value[paramKey])}`; - }) - .join(delimiter); - query.push(`${key}=${encodeURIComponent(values)}`); - } - }); - return filterAndJoin(query); -} - -// TODO: Add support for disabling percent encoding for reserved characters -function formSerializerExplode(params: Record): string { - const query: string[] = []; - - Object.entries(Object.assign({}, params)).forEach(([key, value]) => { - if (!shouldQueryParamSerialize(value)) return; - if (value !== Object(value)) - query.push(`${key}=${encodeURIComponent(value)}`); - else if (Array.isArray(value)) { - query.push( - value - .map((aValue) => `${key}=${encodeURIComponent(valToString(aValue))}`) - .join("&"), - ); - } else - query.push( - Object.getOwnPropertyNames(value) - .map((paramKey: string) => { - const qpAnn: string = Reflect.getMetadata( - qpMetadataKey, - value, - paramKey, - ); - - const qpDecorator: ParamDecorator = parseParamDecorator( - qpAnn, - paramKey, - "form", - true, - ); - - if (qpDecorator == null) return; - - const key = qpDecorator.ParamName || paramKey; - return `${key}=${encodeURIComponent(valToString(value[paramKey]))}`; - }) - .join("&"), - ); - }); - return filterAndJoin(query); -} - -// TODO: Add support for disabling percent encoding for reserved characters -function deepObjectSerializer(params: Record): string { - const query: string[] = []; - - Object.entries(Object.assign({}, params)).forEach(([key, value]) => { - if (!shouldQueryParamSerialize(value)) return; - if (value !== Object(value)) - query.push(`${key}=${encodeURIComponent(value)}`); - else if (Array.isArray(value)) { - query.push( - value - .map( - ([objKey, objValue]) => - `${key}[${objKey}]=${encodeURIComponent(valToString(objValue))}`, - ) - .join("&"), - ); - } else - query.push( - Object.getOwnPropertyNames(value) - .map((paramKey: string) => { - const qpAnn: string = Reflect.getMetadata( - qpMetadataKey, - value, - paramKey, - ); - - const qpDecorator: ParamDecorator = parseParamDecorator( - qpAnn, - paramKey, - "form", - true, - ); - - if (qpDecorator == null) return; - - // For deep objects, arr is wrapped inside object - if (Array.isArray(value[paramKey])) - return value[paramKey] - .map( - (arrValue: any) => - `${key}[${paramKey}]=${encodeURIComponent( - valToString(arrValue), - )}`, - ) - .join("&"); - return `${key}[${paramKey}]=${encodeURIComponent( - valToString(value[paramKey]), - )}`; - }) - .join("&"), - ); - }); - return filterAndJoin(query); -} diff --git a/previous-versions/sync-for-payables-version-1/src/internal/utils/requestbody.ts b/previous-versions/sync-for-payables-version-1/src/internal/utils/requestbody.ts deleted file mode 100644 index 3e4374c15..000000000 --- a/previous-versions/sync-for-payables-version-1/src/internal/utils/requestbody.ts +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { - isBooleanRecord, - isNumberRecord, - isStringRecord, - SerializationMethodToContentType, - valToString, -} from "./utils"; - -import FormData from "form-data"; -import { RFCDate } from "../../sdk/types"; -import { classToPlain } from "class-transformer"; - -export const requestMetadataKey = "request"; -const mpFormMetadataKey = "multipart_form"; - -export function serializeRequestBody( - request: any, - requestFieldName: string, - serializationMethod: string -): [Record, any] { - if (request !== Object(request) || !request.hasOwnProperty(requestFieldName)) { - return serializeContentType(SerializationMethodToContentType[serializationMethod], request); - } - - const requestBodyAnn: string = Reflect.getMetadata( - requestMetadataKey, - request, - requestFieldName - ); - if (!requestBodyAnn) { - throw new Error("invalid request type"); - } - - const requestDecorator: RequestDecorator = parseRequestDecorator(requestBodyAnn); - return serializeContentType(requestDecorator.MediaType, request[requestFieldName]); -} - -const serializeContentType = (contentType: string, reqBody: any): [Record, any] => { - let [requestHeaders, requestBody]: [Record, any] = [{}, {}]; - - switch (contentType) { - case "multipart/form-data": - requestBody = encodeMultipartFormData(reqBody); - break; - - case "multipart/mixed": - requestBody = encodeMultipartFormData(reqBody); - requestHeaders = (requestBody as FormData).getHeaders(); - break; - - case "application/x-www-form-urlencoded": - [requestHeaders, requestBody] = [ - { "Content-Type": `${contentType}` }, - encodeFormUrlEncodedData(reqBody), - ]; - break; - - case "application/json": - [requestHeaders, requestBody] = [ - { "Content-Type": `${contentType}` }, - classToPlain(reqBody, { exposeUnsetFields: false }), - ]; - break; - case "text/json": - [requestHeaders, requestBody] = [{ "Content-Type": `${contentType}` }, reqBody]; - break; - - default: { - requestBody = reqBody; - const requestBodyType: string = typeof requestBody; - if ( - requestBodyType === "string" || - requestBody instanceof String || - requestBody instanceof Uint8Array - ) - requestHeaders = { "Content-Type": `${contentType}` }; - else - throw new Error( - `invalid request body type ${requestBodyType} for mediaType ${contentType}` - ); - } - } - return [requestHeaders, requestBody]; -}; - -const encodeFormUrlEncodedData = (data: any): string => { - const fieldNames: string[] = Object.getOwnPropertyNames(data); - - let urlencoded = ""; - let amp = ""; - const appendPair = (key: string, value: string) => { - urlencoded += `${amp}${encodeURIComponent(key)}=${encodeURIComponent(value)}`; - amp = "&"; - }; - - if (isNumberRecord(data) || isBooleanRecord(data) || isStringRecord(data)) { - fieldNames.forEach((fname) => { - const formAnn: string = Reflect.getMetadata("form", data, fname); - let name = fname; - if (formAnn) { - const formDecorator: FormDecorator = parseFormDecorator(formAnn); - name = formDecorator.Name ?? fname; - } - appendPair(name, data[fname]?.toString()); - }); - } else { - fieldNames.forEach((fname) => { - const formAnn: string = Reflect.getMetadata("form", data, fname); - if (formAnn === null) { - return; - } - const formDecorator: FormDecorator = parseFormDecorator(formAnn); - - if (formDecorator.JSON) { - const name = formDecorator.Name ?? fname; - const val = JSON.stringify(data[fname]); - appendPair(name, val); - } else if (formDecorator.Style === "form") { - let parsed: Record; - const name = formDecorator.Name ?? fname; - if (formDecorator.Explode === true) { - parsed = formExplode(name, data[fname]); - } else { - parsed = formNotExplode(name, data[fname]); - } - - Object.keys(parsed).forEach((key) => { - parsed[key].forEach((v) => appendPair(key, v)); - }); - return; - } - }); - } - return urlencoded; -}; - -const formExplode = (fname: string, data: any): Record => { - const exploded: Record = {}; - - if (Array.isArray(data)) { - data.forEach((value) => { - if (!exploded[fname]) { - exploded[fname] = []; - } - exploded[fname].push(value); - }); - } else if (typeof data === "object") { - if (data instanceof Date || data instanceof RFCDate) { - if (!exploded[fname]) { - exploded[fname] = []; - } - exploded[fname].push(valToString(data)); - } else { - Object.keys(data).forEach((key) => { - if (!exploded[key]) { - exploded[key] = []; - } - exploded[key].push(data[key]); - }); - } - } else { - if (!exploded[fname]) { - exploded[fname] = []; - } - exploded[fname].push(valToString(data)); - } - return exploded; -}; - -const formNotExplode = (fname: string, data: any): Record => { - const notExploded: Record = {}; - - if (Array.isArray(data)) { - if (!notExploded[fname]) { - notExploded[fname] = []; - } - notExploded[fname].push(data.map((item) => item.toString()).join(",")); - } else if (typeof data === "object") { - if (data instanceof Date || data instanceof RFCDate) { - if (!notExploded[fname]) { - notExploded[fname] = []; - } - notExploded[fname].push(valToString(data)); - } else { - Object.keys(data).forEach((key) => { - if (!notExploded[key]) { - notExploded[key] = []; - } - notExploded[fname].push(`${key}=${data[key]}`); - }); - } - } else { - if (!notExploded[fname]) { - notExploded[fname] = []; - } - notExploded[fname].push(valToString(data)); - } - return notExploded; -}; - -function parseFormDecorator(formAnn: string): FormDecorator { - const formDecorator: FormDecorator = new FormDecorator("", "form", false, false); - formAnn.split(";").forEach((formAnnPart) => { - const [formKey, formVal]: string[] = formAnnPart.split("="); - switch (formKey) { - case "name": - formDecorator.Name = formVal; - break; - case "style": - formDecorator.Style = formVal; - break; - case "explode": - formDecorator.Explode = formVal === "true"; - break; - case "json": - formDecorator.JSON = formVal === "true"; - break; - } - }); - - return formDecorator; -} - -class FormDecorator { - Name?: string; - Style?: string; - Explode?: boolean; - JSON?: boolean; - - constructor(Name?: string, Style?: string, Explode?: boolean, JSON?: boolean) { - this.Name = Name; - this.Style = Style; - this.Explode = Explode; - this.JSON = JSON; - } -} - -function encodeMultipartFormData(form: any): FormData { - const formData: FormData = new FormData(); - - const fieldNames: string[] = Object.getOwnPropertyNames(form); - fieldNames.forEach((fname) => { - const mpFormAnn: string = Reflect.getMetadata(mpFormMetadataKey, form, fname); - - if (mpFormAnn == null) return; - - const mpFormDecorator: MultipartFormDecorator = parseMultipartFormDecorator(mpFormAnn); - - if (mpFormDecorator.File) return encodeMultipartFormDataFile(formData, form[fname]); - else if (mpFormDecorator.JSON) { - formData.append(mpFormDecorator.Name, JSON.stringify(form[fname])); - } else { - if (Array.isArray(form[fname])) { - form[fname].forEach((val: any) => { - formData.append(mpFormDecorator.Name + "[]", valToString(val)); - }); - } else { - formData.append(mpFormDecorator.Name, valToString(form[fname])); - } - } - }); - return formData; -} - -function encodeMultipartFormDataFile(formData: FormData, file: any): FormData { - if (typeof file !== "object" || Array.isArray(file) || file == null) { - throw new Error("invalid type for multipart/form-data file"); - } - let content: any = null; - let fileName = ""; - let mpFormDecoratorName = ""; - - const fieldNames: string[] = Object.getOwnPropertyNames(file); - fieldNames.forEach((fname) => { - const mpFormAnn: string = Reflect.getMetadata(mpFormMetadataKey, file, fname); - - if (mpFormAnn == null) return; - - const mpFormDecorator: MultipartFormDecorator = parseMultipartFormDecorator(mpFormAnn); - - if (!mpFormDecorator.Content && mpFormDecorator.Name == "") return; - if (mpFormDecorator.Content) content = file[fname]; - else { - mpFormDecoratorName = mpFormDecorator.Name; - fileName = file[fname]; - } - }); - - if (mpFormDecoratorName === "" || fileName === "" || content == null) { - throw new Error("invalid multipart/form-data file"); - } - formData.append(mpFormDecoratorName, Buffer.from(content), fileName); - return formData; -} - -function parseMultipartFormDecorator(mpFormAnn: string): MultipartFormDecorator { - // example "name=file" - const mpFormDecorator: MultipartFormDecorator = new MultipartFormDecorator( - false, - false, - false, - "" - ); - mpFormAnn.split(";").forEach((mpFormAnnPart) => { - const [mpFormKey, mpFormVal]: string[] = mpFormAnnPart.split("="); - switch (mpFormKey) { - case "file": - mpFormDecorator.File = mpFormVal == "true"; - break; - case "content": - mpFormDecorator.Content = mpFormVal == "true"; - break; - case "name": - mpFormDecorator.Name = mpFormVal; - break; - case "json": - mpFormDecorator.JSON = mpFormVal == "true"; - break; - } - }); - - return mpFormDecorator; -} - -class MultipartFormDecorator { - File: boolean; - Content: boolean; - JSON: boolean; - Name: string; - - constructor(File: boolean, Content: boolean, JSON: boolean, Name: string) { - this.File = File; - this.Content = Content; - this.JSON = JSON; - this.Name = Name; - } -} - -function parseRequestDecorator(requestAnn: string): RequestDecorator { - // example "media_type=multipart/form-data" - const requestDecorator: RequestDecorator = new RequestDecorator("application/octet-stream"); - const [mediaTypeKey, mediaTypeVal]: string[] = requestAnn.split("="); - if (mediaTypeKey === "media_type") requestDecorator.MediaType = mediaTypeVal; - return requestDecorator; -} - -class RequestDecorator { - MediaType: string; - - constructor(MediaType: string) { - this.MediaType = MediaType; - } -} diff --git a/previous-versions/sync-for-payables-version-1/src/internal/utils/retries.ts b/previous-versions/sync-for-payables-version-1/src/internal/utils/retries.ts deleted file mode 100644 index 6b03d6f3d..000000000 --- a/previous-versions/sync-for-payables-version-1/src/internal/utils/retries.ts +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { AxiosError, AxiosResponse } from "axios"; - -export class BackoffStrategy { - initialInterval: number; - maxInterval: number; - exponent: number; - maxElapsedTime: number; - - constructor( - initialInterval: number, - maxInterval: number, - exponent: number, - maxElapsedTime: number, - ) { - this.initialInterval = initialInterval; - this.maxInterval = maxInterval; - this.exponent = exponent; - this.maxElapsedTime = maxElapsedTime; - } -} - -export class RetryConfig { - strategy: "backoff" | "none"; - backoff?: BackoffStrategy; - retryConnectionErrors: boolean; - - constructor( - strategy: "backoff" | "none", - backoff?: BackoffStrategy, - retryConnectionErrors = true, - ) { - this.strategy = strategy; - this.backoff = backoff; - this.retryConnectionErrors = retryConnectionErrors; - } -} - -export class Retries { - config: RetryConfig; - statusCodes: string[]; - - constructor(config: RetryConfig, statusCodes: string[]) { - this.config = config; - this.statusCodes = statusCodes; - } -} - -class PermanentError extends Error { - inner: unknown; - - constructor(inner: unknown) { - super("Permanent error"); - this.inner = inner; - - Object.setPrototypeOf(this, PermanentError.prototype); - } -} - -class TemporaryError extends Error { - res: AxiosResponse; - - constructor(res: AxiosResponse) { - super("Temporary error"); - this.res = res; - - Object.setPrototypeOf(this, TemporaryError.prototype); - } -} - -export async function Retry( - fn: () => Promise>, - retries: Retries, -): Promise> { - switch (retries.config.strategy) { - case "backoff": - return retryBackoff( - async () => { - try { - const res = await fn(); - if (isRetryableResponse(res, retries.statusCodes)) { - throw new TemporaryError(res); - } - - return res; - } catch (err) { - if (err instanceof AxiosError) { - if (err.response) { - if (isRetryableResponse(err.response, retries.statusCodes)) { - throw err; - } - throw new PermanentError(err); - } else if (err.request) { - throw err; - } else { - throw new PermanentError(err); - } - } else if (err instanceof TemporaryError) { - throw err; - } - throw new PermanentError(err); - } - }, - retries.config.backoff?.initialInterval ?? 500, - retries.config.backoff?.maxInterval ?? 60000, - retries.config.backoff?.exponent ?? 1.5, - retries.config.backoff?.maxElapsedTime ?? 3600000, - ); - default: - return await fn(); - } -} - -function isRetryableResponse( - res: AxiosResponse, - statusCodes: string[], -): boolean { - for (const code of statusCodes) { - if (code.toUpperCase().includes("X")) { - const codeRange = parseInt(code[0]); - if (isNaN(codeRange)) { - throw new Error("Invalid status code range"); - } - - const s = res.status / 100; - - if (s >= codeRange && s < codeRange + 1) { - return true; - } - } else if (res.status == parseInt(code)) { - return true; - } - } - - return false; -} - -async function retryBackoff( - fn: () => Promise>, - initialInterval: number, - maxInterval: number, - exponent: number, - maxElapsedTime: number, -): Promise> { - const start = Date.now(); - let x = 0; - - // eslint-disable-next-line no-constant-condition - while (true) { - try { - return await fn(); - } catch (err) { - if (err instanceof PermanentError) { - throw err.inner; - } - - const now = Date.now(); - if (now - start > maxElapsedTime) { - if (err instanceof TemporaryError) { - return err.res; - } - - throw err; - } - - const d = Math.min( - initialInterval * Math.pow(x, exponent) + Math.random() * 1000, - maxInterval, - ); - - await delay(d); - x++; - } - } -} - -async function delay(delay: number): Promise { - return new Promise((resolve) => setTimeout(resolve, delay)); -} diff --git a/previous-versions/sync-for-payables-version-1/src/internal/utils/security.ts b/previous-versions/sync-for-payables-version-1/src/internal/utils/security.ts deleted file mode 100644 index d9c693d47..000000000 --- a/previous-versions/sync-for-payables-version-1/src/internal/utils/security.ts +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -const securityMetadataKey = "security"; - -export type SecurityProperties = { - params: Record; - headers: Record; -}; - -export function parseSecurityProperties(security: any): SecurityProperties { - return parseSecurityClass(security); -} - -function parseSecurityDecorator(securityAnn: string): SecurityDecorator { - // scheme=true;type=apiKey;subtype=header" - let option = false; - let scheme = false; - let name = ""; - let securityType = ""; - let securitySubType = ""; - - securityAnn.split(";").forEach((securityAnnPart) => { - const [sKey, sVal]: string[] = securityAnnPart.split("="); - switch (sKey) { - case "name": - name = sVal; - break; - case "type": - securityType = sVal; - break; - case "subtype": - securitySubType = sVal; - break; - case "option": - option = sVal == "true"; - break; - case "scheme": - scheme = sVal == "true"; - } - }); - - return new SecurityDecorator( - name, - securityType, - option, - scheme, - securitySubType, - ); -} - -function parseSecurityClass(security: any): SecurityProperties { - const fieldNames: string[] = Object.getOwnPropertyNames(security); - const properties: SecurityProperties = { - params: {}, - headers: {}, - }; - fieldNames.forEach((fname) => { - const securityAnn: string = Reflect.getMetadata( - securityMetadataKey, - security, - fname, - ); - if (securityAnn == null) return; - const securityDecorator: SecurityDecorator = - parseSecurityDecorator(securityAnn); - if (securityDecorator == null) return; - - const value = security[fname]; - - if (securityDecorator.Option) { - return parseSecurityOption(properties, value); - } else if (securityDecorator.Scheme) { - if (securityDecorator.SubType === "basic" && value !== Object(value)) { - return parseSecurityScheme(properties, securityDecorator, security); - } else { - return parseSecurityScheme(properties, securityDecorator, value); - } - } - }); - - return properties; -} - -function parseSecurityOption( - properties: SecurityProperties, - optionType: any, -): void { - const fieldNames: string[] = Object.getOwnPropertyNames(optionType); - fieldNames.forEach((fname) => { - const securityAnn: string = Reflect.getMetadata( - securityMetadataKey, - optionType, - fname, - ); - if (securityAnn == null) return; - const securityDecorator: SecurityDecorator = - parseSecurityDecorator(securityAnn); - if (securityDecorator == null || !securityDecorator.Scheme) return; - return parseSecurityScheme( - properties, - securityDecorator, - optionType[fname], - ); - }); -} - -function parseSecurityScheme( - properties: SecurityProperties, - schemeDecorator: SecurityDecorator, - scheme: any, -): void { - if (scheme === Object(scheme)) { - if ( - schemeDecorator.Type === "http" && - schemeDecorator.SubType === "basic" - ) { - return parseBasicAuthScheme(properties, scheme); - } - - const fieldNames: string[] = Object.getOwnPropertyNames(scheme); - fieldNames.forEach((fname) => { - const securityAnn: string = Reflect.getMetadata( - securityMetadataKey, - scheme, - fname, - ); - if (securityAnn == null) return; - const securityDecorator: SecurityDecorator = - parseSecurityDecorator(securityAnn); - if (securityDecorator == null || securityDecorator.Name === "") return; - - return parseSecuritySchemeValue( - properties, - schemeDecorator, - securityDecorator, - scheme[fname], - ); - }); - } else { - return parseSecuritySchemeValue( - properties, - schemeDecorator, - schemeDecorator, - scheme, - ); - } -} - -function parseSecuritySchemeValue( - properties: SecurityProperties, - schemeDecorator: SecurityDecorator, - securityDecorator: SecurityDecorator, - value: any, -): void { - switch (schemeDecorator.Type) { - case "apiKey": - switch (schemeDecorator.SubType) { - case "header": - properties.headers[securityDecorator.Name] = value; - break; - case "query": - properties.params[securityDecorator.Name] = value; - break; - case "cookie": { - const securityDecoratorName: string = securityDecorator.Name; - const val: string = value; - properties.headers["Cookie"] = `${securityDecoratorName}=${val}`; - break; - } - default: - throw new Error("not supported"); - } - break; - case "openIdConnect": - properties.headers[securityDecorator.Name] = value; - break; - case "oauth2": - properties.headers[securityDecorator.Name] = value - .toLowerCase() - .startsWith("bearer ") - ? value - : `Bearer ${value}`; - break; - case "http": - switch (schemeDecorator.SubType) { - case "basic": - break; - case "bearer": - properties.headers[securityDecorator.Name] = value - .toLowerCase() - .startsWith("bearer ") - ? value - : `Bearer ${value}`; - break; - default: - throw new Error("not supported"); - } - break; - default: - throw new Error("not supported"); - } -} - -function parseBasicAuthScheme( - properties: SecurityProperties, - scheme: any, -): void { - let username, - password = ""; - - const fieldNames: string[] = Object.getOwnPropertyNames(scheme); - fieldNames.forEach((fname) => { - const securityAnn: string = Reflect.getMetadata( - securityMetadataKey, - scheme, - fname, - ); - if (securityAnn == null) return; - const securityDecorator: SecurityDecorator = - parseSecurityDecorator(securityAnn); - if (securityDecorator == null || securityDecorator.Name === "") return; - - switch (securityDecorator.Name) { - case "username": - username = scheme[fname]; - break; - case "password": - password = scheme[fname]; - break; - } - }); - - properties.headers["Authorization"] = `Basic ${Buffer.from( - `${username}:${password}`, - ).toString("base64")}`; -} - -class SecurityDecorator { - Name: string; - Type: string; - Option: boolean; - Scheme: boolean; - SubType: string; - constructor( - Name: string, - Type: string, - Option: boolean, - Scheme: boolean, - SubType: string, - ) { - this.Name = Name; - this.Type = Type; - this.Option = Option; - this.Scheme = Scheme; - this.SubType = SubType; - } -} diff --git a/previous-versions/sync-for-payables-version-1/src/internal/utils/utils.ts b/previous-versions/sync-for-payables-version-1/src/internal/utils/utils.ts deleted file mode 100644 index 38f9f4b66..000000000 --- a/previous-versions/sync-for-payables-version-1/src/internal/utils/utils.ts +++ /dev/null @@ -1,367 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import "reflect-metadata"; - -import { getSimplePathParams, ppMetadataKey } from "./pathparams"; - -import { plainToInstance } from "class-transformer"; -import { RFCDate } from "../../sdk/types"; -import { requestMetadataKey } from "./requestbody"; - -export const SerializationMethodToContentType: Record = { - json: "application/json", - form: "application/x-www-form-urlencoded", - multipart: "multipart/form-data", - raw: "application/octet-stream", - string: "text/plain", -}; - -export interface PropInfo { - key: string | symbol; - type: any; - elemType: any; - elemDepth: number; -} - -function isSpeakeasyBase(type: any): boolean { - return type && Object.getPrototypeOf(type)?.name == SpeakeasyBase.name; -} - -function handleArray(value: any, elemType: any, elemDepth: number): any { - if (!Array.isArray(value)) { - return value; - } - - if (elemDepth == 1) { - return value.map((v: any) => new elemType(v)); - } else { - return value.map((v: any) => { - if (Array.isArray(v)) { - return handleArray(v, elemType, elemDepth - 1); - } else if (typeof v == "object") { - return handleObject(v, elemType, elemDepth - 1); - } else { - return v; - } - }); - } -} - -function handleObject(value: any, elemType: any, elemDepth: number): any { - if (typeof value != "object") { - return value; - } - - if (elemDepth == 1) { - return Object.keys(value).reduce((acc: any, key: string) => { - acc[key] = new elemType(value[key]); - return acc; - }, {}); - } else { - return Object.keys(value).reduce((acc: any, key: string) => { - const v = value[key]; - if (Array.isArray(v)) { - acc[key] = handleArray(v, elemType, elemDepth - 1); - } else if (typeof v == "object") { - acc[key] = handleObject(v, elemType, elemDepth - 1); - } else { - acc[key] = v; - } - return acc; - }, {}); - } -} - -export class SpeakeasyBase { - constructor(payload?: Record) { - const props: PropInfo[] = (this as any)["__props__"]; - if (props) { - for (const prop of props) { - if (payload && payload.hasOwnProperty(prop.key)) { - const value = payload[prop.key]; - if (isSpeakeasyBase(prop.type) && value != null) { - (this as any)[prop.key] = new prop.type(value); - } else if (prop.type.name == "Array" && isSpeakeasyBase(prop.elemType)) { - (this as any)[prop.key] = handleArray(value, prop.elemType, prop.elemDepth); - } else if (prop.type.name == "Object" && isSpeakeasyBase(prop.elemType)) { - (this as any)[prop.key] = handleObject( - value, - prop.elemType, - prop.elemDepth - ); - } else if (prop.type.name == "RFCDate") { - if (value instanceof Date) { - (this as any)[prop.key] = new RFCDate(value); - } else { - (this as any)[prop.key] = value; - } - } else { - (this as any)[prop.key] = value; - } - } - } - } - } -} - -export class ParamDecorator { - Style: string; - Explode: boolean; - ParamName: string; - Serialization?: string; - constructor(Style: string, Explode: boolean, ParamName: string, Serialization?: string) { - this.Style = Style; - this.Explode = Explode; - this.ParamName = ParamName; - this.Serialization = Serialization; - } -} - -export function SpeakeasyMetadata< - T extends SpeakeasyBase = Record ->(params?: { data?: string; elemType?: { new (): T }; elemDepth?: number }): PropertyDecorator { - return (target, propertyKey) => { - if (params?.data) { - const annsArr = params.data.split(", "); - - for (let i = 0; i < annsArr.length; i += 2) { - Reflect.defineMetadata(annsArr[i], annsArr[i + 1], target, propertyKey); - } - } - - let props: PropInfo[]; - if (target.hasOwnProperty("__props__")) { - props = (target as any)["__props__"]; - } else { - props = (target as any)["__props__"] = []; - } - - const prop = { - key: propertyKey, - type: Reflect.getMetadata("design:type", target, propertyKey), - } as PropInfo; - - if (params?.elemType) { - prop.elemType = params.elemType; - prop.elemDepth = params.elemDepth || 1; - } - - props.push(prop); - }; -} - -export function templateUrl(stringWithParams: string, params: Record): string { - let res: string = stringWithParams; - if (params) { - Object.entries(params).forEach(([key, value]) => { - const match: string = "{" + key + "}"; - res = res.replaceAll(match, value); - }); - } - return res; -} - -export function generateURL( - serverURL: string, - path: string, - pathParams: any, - globals?: any -): string { - const url: string = serverURL.replace(/\/$/, "") + path; - const parsedParameters: Record = {}; - - const fieldNames: string[] = - "__props__" in pathParams - ? pathParams["__props__"].map((prop: any) => prop.key) - : Object.getOwnPropertyNames(pathParams); - fieldNames.forEach((fname) => { - const requestBodyAnn: string = Reflect.getMetadata(requestMetadataKey, pathParams, fname); - - if (requestBodyAnn) return; - - const ppAnn: string = Reflect.getMetadata(ppMetadataKey, pathParams, fname); - - if (ppAnn == null) return; - - const ppDecorator: ParamDecorator = parseParamDecorator(ppAnn, fname, "simple", false); - if (ppDecorator == null) return; - - let value = pathParams[fname]; - value = populateFromGlobals(value, fname, "pathParam", globals); - - if (ppDecorator.Serialization) { - switch (ppDecorator.Serialization) { - case "json": - parsedParameters[ppDecorator.ParamName] = encodeURIComponent( - JSON.stringify(value) - ); - break; - } - } else { - switch (ppDecorator.Style) { - case "simple": { - const simpleParams: Map = getSimplePathParams( - ppDecorator.ParamName, - value, - ppDecorator.Explode - ); - simpleParams.forEach((value, key) => { - parsedParameters[key] = value; - }); - } - } - } - }); - return templateUrl(url, parsedParameters); -} - -export function parseParamDecorator( - ann: string, - fName: string, - defaultStyle: string, - defaultExplode: boolean -): ParamDecorator { - // style=simple;explode=false;name=apiID - const decorator: ParamDecorator = new ParamDecorator( - defaultStyle, - defaultExplode, - fName.toLowerCase() - ); - - if (ann == null) return decorator; - ann.split(";").forEach((annPart) => { - const [paramKey, paramVal]: string[] = annPart.split("="); - switch (paramKey) { - case "style": - decorator.Style = paramVal; - break; - case "explode": - decorator.Explode = paramVal == "true"; - break; - case "name": - decorator.ParamName = paramVal; - break; - case "serialization": - decorator.Serialization = paramVal; - break; - } - }); - return decorator; -} - -export function isStringRecord(obj: any): obj is Record { - if (typeof obj !== "object") return false; - - if (Object.getOwnPropertySymbols(obj).length > 0) return false; - - return Object.getOwnPropertyNames(obj).every((prop) => typeof obj[prop] === "string"); -} - -export function isNumberRecord(obj: any): obj is Record { - if (typeof obj !== "object") return false; - - if (Object.getOwnPropertySymbols(obj).length > 0) return false; - - return Object.getOwnPropertyNames(obj).every((prop) => typeof obj[prop] === "number"); -} - -export function isBooleanRecord(obj: any): obj is Record { - if (typeof obj !== "object") return false; - - if (Object.getOwnPropertySymbols(obj).length > 0) return false; - - return Object.getOwnPropertyNames(obj).every((prop) => typeof obj[prop] === "boolean"); -} - -export function isEmpty(value: any): boolean { - // check for undefined, null, and NaN - let res = false; - if (typeof value === "number") res = Number.isNaN(value); - else if (typeof value === "string") res = value === ""; - return res || value == null; -} - -export function objectToClass(value: T, klass?: any, elemDepth = 0): any { - if (value !== Object(value)) { - return value; - } - - if (elemDepth === 0 && klass != null) { - return plainToInstance(klass, value, { - excludeExtraneousValues: true, - exposeUnsetFields: false, - }) as typeof klass; - } - - if (Array.isArray(value)) { - return value.map((v) => objectToClass(v, klass, elemDepth - 1)); - } - - if (typeof value === "object" && value != null) { - const copiedRecord: Record = {}; - for (const key in value) { - copiedRecord[key] = objectToClass(value[key], klass, elemDepth - 1); - } - return copiedRecord; - } - - return plainToInstance(klass, value, { - excludeExtraneousValues: true, - exposeUnsetFields: false, - }) as typeof klass; -} - -export function getResFieldDepth(res: any): number { - const props = res["__props__"]; - let resFieldDepth = 1; - - if (props) { - for (const prop of props) { - if (res && res.hasOwnProperty(prop.key)) { - if ( - (prop.type.name == "Array" || prop.type.name == "Object") && - isSpeakeasyBase(prop.elemType) - ) { - if (prop.elemDepth > resFieldDepth) { - resFieldDepth = prop.elemDepth; - break; - } - } - } - } - } - - return resFieldDepth; -} - -export function populateFromGlobals( - value: any, - fieldName: string, - paramType: string, - globals: any -): any { - if (globals && value === undefined) { - if ("parameters" in globals && paramType in globals.parameters) { - const globalValue = globals.parameters[paramType][fieldName]; - if (globalValue !== undefined) { - value = globalValue; - } - } - } - - return value; -} - -export function valToString(value: any): string { - if (value instanceof Date) { - return value.toISOString(); - } - - return value.toString(); -} - -export function shouldQueryParamSerialize(value: any): boolean { - return !(value === undefined || value === null || value === ""); -} diff --git a/previous-versions/sync-for-payables-version-1/src/lib/base64.ts b/previous-versions/sync-for-payables-version-1/src/lib/base64.ts new file mode 100644 index 000000000..c2d5b3898 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/lib/base64.ts @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export function bytesToBase64(u8arr: Uint8Array): string { + return btoa(String.fromCodePoint(...u8arr)); +} + +export function bytesFromBase64(encoded: string): Uint8Array { + return Uint8Array.from(atob(encoded), (c) => c.charCodeAt(0)); +} + +export function stringToBytes(str: string): Uint8Array { + return new TextEncoder().encode(str); +} + +export function stringFromBytes(u8arr: Uint8Array): string { + return new TextDecoder().decode(u8arr); +} + +export function stringToBase64(str: string): string { + return bytesToBase64(stringToBytes(str)); +} + +export function stringFromBase64(b64str: string): string { + return stringFromBytes(bytesFromBase64(b64str)); +} + +export const zodOutbound = z + .instanceof(Uint8Array) + .or(z.string().transform(stringToBytes)); + +export const zodInbound = z + .instanceof(Uint8Array) + .or(z.string().transform(bytesFromBase64)); diff --git a/previous-versions/sync-for-payables-version-1/src/lib/config.ts b/previous-versions/sync-for-payables-version-1/src/lib/config.ts new file mode 100644 index 000000000..a14b05540 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/lib/config.ts @@ -0,0 +1,64 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { HTTPClient } from "./http.js"; +import { Logger } from "./logger.js"; +import { RetryConfig } from "./retries.js"; +import { Params, pathToFunc } from "./url.js"; + +/** + * Contains the list of servers available to the SDK + */ +export const ServerList = [ + /** + * Production + */ + "https://api.codat.io", +] as const; + +export type SDKOptions = { + authHeader?: string | (() => Promise); + + httpClient?: HTTPClient; + /** + * Allows overriding the default server used by the SDK + */ + serverIdx?: number; + /** + * Allows overriding the default server URL used by the SDK + */ + serverURL?: string; + /** + * Allows overriding the default retry config used by the SDK + */ + retryConfig?: RetryConfig; + timeoutMs?: number; + debugLogger?: Logger; +}; + +export function serverURLFromOptions(options: SDKOptions): URL | null { + let serverURL = options.serverURL; + + const params: Params = {}; + + if (!serverURL) { + const serverIdx = options.serverIdx ?? 0; + if (serverIdx < 0 || serverIdx >= ServerList.length) { + throw new Error(`Invalid server index ${serverIdx}`); + } + serverURL = ServerList[serverIdx] || ""; + } + + const u = pathToFunc(serverURL)(params); + return new URL(u); +} + +export const SDK_METADATA = { + language: "typescript", + openapiDocVersion: "3.0.0", + sdkVersion: "2.3.0", + genVersion: "2.415.6", + userAgent: + "speakeasy-sdk/typescript 2.3.0 2.415.6 3.0.0 @codat/sync-for-payables-version-1", +} as const; diff --git a/previous-versions/sync-for-payables-version-1/src/lib/dlv.ts b/previous-versions/sync-for-payables-version-1/src/lib/dlv.ts new file mode 100644 index 000000000..e81091f5e --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/lib/dlv.ts @@ -0,0 +1,53 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/* +MIT License + +Copyright (c) 2024 Jason Miller (http://jasonformat.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +/** + * @param obj The object to walk + * @param key The key path to walk the object with + * @param def A default value to return if the result is undefined + * + * @example + * dlv(obj, "a.b.c.d") + * @example + * dlv(object, ["a", "b", "c", "d"]) + * @example + * dlv(object, "foo.bar.baz", "Hello, default value!") + */ +export function dlv( + obj: any, + key: string | string[], + def?: T, + p?: number, + undef?: never, +): T | undefined { + key = Array.isArray(key) ? key : key.split("."); + for (p = 0; p < key.length; p++) { + const k = key[p]; + obj = k != null && obj ? obj[k] : undef; + } + return obj === undef ? def : obj; +} diff --git a/previous-versions/sync-for-payables-version-1/src/lib/encodings.ts b/previous-versions/sync-for-payables-version-1/src/lib/encodings.ts new file mode 100644 index 000000000..44fa72840 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/lib/encodings.ts @@ -0,0 +1,449 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { bytesToBase64 } from "./base64.js"; +import { isPlainObject } from "./is-plain-object.js"; + +export class EncodingError extends Error { + constructor(message: string) { + super(message); + this.name = "EncodingError"; + } +} + +export function encodeMatrix( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + 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 encValue = ""; + + if (pv === undefined) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join(","); + } else if (isPlainObject(pv)) { + encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `,${encodeString(k)},${encodeValue(v)}`; + }).join(""); + encValue = encValue.slice(1); + } else { + encValue = `${encodeValue(pv)}`; + } + + const keyPrefix = encodeString(pk); + tmp = `${keyPrefix}=${encValue}`; + // trim trailing '=' if value was empty + if (tmp === `${keyPrefix}=`) { + tmp = tmp.slice(0, -1); + } + + // If we end up with the nothing then skip forward + if (!tmp) { + return; + } + + out += `;${tmp}`; + }); + + return out; +} + +export function encodeLabel( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let encValue = ""; + + if (pv === undefined) { + return; + } else if (Array.isArray(pv)) { + encValue = mapDefined(pv, (v) => `${encodeValue(v)}`).join("."); + } else if (isPlainObject(pv)) { + encValue = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `.${encodeString(k)}.${encodeValue(v)}`; + }).join(""); + encValue = encValue.slice(1); + } else { + const k = + options?.explode && isPlainObject(value) ? `${encodeString(pk)}=` : ""; + encValue = `${k}${encodeValue(pv)}`; + } + + out += `.${encValue}`; + }); + + return out; +} + +type FormEncoder = ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +) => string; + +function formEncoder(sep: string): FormEncoder { + return ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, + ) => { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + const encodedSep = encodeString(sep); + + pairs.forEach(([pk, pv]) => { + let tmp = ""; + let encValue = ""; + + if (pv === undefined) { + return; + } else if (Array.isArray(pv)) { + 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); + } else { + encValue = `${encodeValue(pv)}`; + } + + tmp = `${encodeString(pk)}=${encValue}`; + + // If we end up with the nothing then skip forward + if (!tmp || tmp === "=") { + return; + } + + out += `&${tmp}`; + }); + + return out.slice(1); + }; +} + +export const encodeForm = formEncoder(","); +export const encodeSpaceDelimited = formEncoder(" "); +export const encodePipeDelimited = formEncoder("|"); + +export function encodeBodyForm( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + 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 encValue = ""; + + if (pv === undefined) { + return; + } else if (Array.isArray(pv)) { + encValue = JSON.stringify(pv, jsonReplacer); + } else if (isPlainObject(pv)) { + encValue = JSON.stringify(pv, jsonReplacer); + } else { + encValue = `${encodeValue(pv)}`; + } + + tmp = `${encodeString(pk)}=${encValue}`; + + // If we end up with the nothing then skip forward + if (!tmp || tmp === "=") { + return; + } + + out += `&${tmp}`; + }); + + return out.slice(1); +} + +export function encodeDeepObject( + key: string, + value: unknown, + options?: { charEncoding?: "percent" | "none" }, +): string { + if (value == null) { + return ""; + } + + if (!isPlainObject(value)) { + throw new EncodingError( + `Value of parameter '${key}' which uses deepObject encoding must be an object`, + ); + } + + return encodeDeepObjectObject(key, value, options); +} + +export function encodeDeepObjectObject( + key: string, + value: unknown, + options?: { charEncoding?: "percent" | "none" }, +): string { + if (value == null) { + return ""; + } + + let out = ""; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + if (!isPlainObject(value)) { + throw new EncodingError(`Expected parameter '${key}' to be an object.`); + } + + Object.entries(value).forEach(([ck, cv]) => { + if (cv === undefined) { + return; + } + + const pk = `${key}[${ck}]`; + + if (isPlainObject(cv)) { + const objOut = encodeDeepObjectObject(pk, cv, options); + + out += `&${objOut}`; + + return; + } + + const pairs: unknown[] = Array.isArray(cv) ? cv : [cv]; + let encoded = ""; + + encoded = mapDefined(pairs, (v) => { + return `${encodeString(pk)}=${encodeString(serializeValue(v))}`; + }).join("&"); + + out += `&${encoded}`; + }); + + return out.slice(1); +} + +export function encodeJSON( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string { + if (typeof value === "undefined") { + return ""; + } + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + + const encVal = encodeString(JSON.stringify(value, jsonReplacer)); + + return options?.explode ? encVal : `${encodeString(key)}=${encVal}`; +} + +export const encodeSimple = ( + key: string, + value: unknown, + options?: { explode?: boolean; charEncoding?: "percent" | "none" }, +): string => { + let out = ""; + const pairs: [string, unknown][] = options?.explode + ? explode(key, value) + : [[key, value]]; + + const encodeString = (v: string) => { + return options?.charEncoding === "percent" ? encodeURIComponent(v) : v; + }; + const encodeValue = (v: unknown) => encodeString(serializeValue(v)); + + pairs.forEach(([pk, pv]) => { + let tmp = ""; + + if (pv === undefined) { + return; + } else if (Array.isArray(pv)) { + tmp = mapDefined(pv, (v) => `${encodeValue(v)}`).join(","); + } else if (isPlainObject(pv)) { + tmp = mapDefinedEntries(Object.entries(pv), ([k, v]) => { + return `,${encodeString(k)},${encodeValue(v)}`; + }).join(""); + tmp = tmp.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}`; + }); + + return out.slice(1); +}; + +function explode(key: string, value: unknown): [string, unknown][] { + if (Array.isArray(value)) { + return value.map((v) => [key, v]); + } else if (isPlainObject(value)) { + const o = value ?? {}; + return Object.entries(o).map(([k, v]) => [k, v]); + } else { + return [[key, value]]; + } +} + +function serializeValue(value: unknown): string { + if (value === null) { + return "null"; + } else if (typeof value === "undefined") { + return ""; + } else if (value instanceof Date) { + return value.toISOString(); + } else if (value instanceof Uint8Array) { + return bytesToBase64(value); + } else if (typeof value === "object") { + return JSON.stringify(value, jsonReplacer); + } + + return `${value}`; +} + +function jsonReplacer(_: string, value: unknown): unknown { + if (value instanceof Uint8Array) { + return bytesToBase64(value); + } else { + return value; + } +} + +function mapDefined(inp: T[], mapper: (v: T) => R): R[] { + return inp.reduce((acc, v) => { + if (v === undefined) { + return acc; + } + + const m = mapper(v); + if (m === undefined) { + return acc; + } + + acc.push(m); + + return acc; + }, []); +} + +function mapDefinedEntries( + inp: Iterable<[K, V]>, + mapper: (v: [K, V]) => R, +): R[] { + const acc: R[] = []; + for (const [k, v] of inp) { + if (v === undefined) { + continue; + } + + const m = mapper([k, v]); + if (m === undefined) { + continue; + } + + acc.push(m); + } + + return acc; +} + +export function queryJoin(...args: string[]): string { + return args.filter(Boolean).join("&"); +} + +type QueryEncoderOptions = { + explode?: boolean; + charEncoding?: "percent" | "none"; +}; + +type QueryEncoder = ( + key: string, + value: unknown, + options?: QueryEncoderOptions, +) => string; + +type BulkQueryEncoder = ( + values: Record, + options?: QueryEncoderOptions, +) => string; + +export function queryEncoder(f: QueryEncoder): BulkQueryEncoder { + const bulkEncode = function ( + values: Record, + options?: QueryEncoderOptions, + ): string { + const opts: QueryEncoderOptions = { + ...options, + explode: options?.explode ?? true, + charEncoding: options?.charEncoding ?? "percent", + }; + + const encoded = Object.entries(values).map(([key, value]) => { + return f(key, value, opts); + }); + return queryJoin(...encoded); + }; + + return bulkEncode; +} + +export const encodeJSONQuery = queryEncoder(encodeJSON); +export const encodeFormQuery = queryEncoder(encodeForm); +export const encodeSpaceDelimitedQuery = queryEncoder(encodeSpaceDelimited); +export const encodePipeDelimitedQuery = queryEncoder(encodePipeDelimited); +export const encodeDeepObjectQuery = queryEncoder(encodeDeepObject); diff --git a/previous-versions/sync-for-payables-version-1/src/lib/files.ts b/previous-versions/sync-for-payables-version-1/src/lib/files.ts new file mode 100644 index 000000000..19e08041f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/lib/files.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** + * Consumes a stream and returns a concatenated array buffer. Useful in + * situations where we need to read the whole file because it forms part of a + * larger payload containing other fields, and we can't modify the underlying + * request structure. + */ +export async function readableStreamToArrayBuffer( + readable: ReadableStream, +): Promise { + const reader = readable.getReader(); + const chunks: Uint8Array[] = []; + + let totalLength = 0; + let done = false; + + while (!done) { + const { value, done: doneReading } = await reader.read(); + + if (doneReading) { + done = true; + } else { + chunks.push(value); + totalLength += value.length; + } + } + + const concatenatedChunks = new Uint8Array(totalLength); + let offset = 0; + + for (const chunk of chunks) { + concatenatedChunks.set(chunk, offset); + offset += chunk.length; + } + + return concatenatedChunks.buffer; +} diff --git a/previous-versions/sync-for-payables-version-1/src/lib/http.ts b/previous-versions/sync-for-payables-version-1/src/lib/http.ts new file mode 100644 index 000000000..13cf1fd78 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/lib/http.ts @@ -0,0 +1,323 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export type Fetcher = ( + input: RequestInfo | URL, + init?: RequestInit, +) => Promise; + +export type Awaitable = T | Promise; + +const DEFAULT_FETCHER: Fetcher = (input, init) => { + // If input is a Request and init is undefined, Bun will discard the method, + // headers, body and other options that were set on the request object. + // Node.js and browers would ignore an undefined init value. This check is + // therefore needed for interop with Bun. + if (init == null) { + return fetch(input); + } else { + return fetch(input, init); + } +}; + +export type RequestInput = { + /** + * The URL the request will use. + */ + url: URL; + /** + * Options used to create a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request). + */ + options?: RequestInit | undefined; +}; + +export interface HTTPClientOptions { + fetcher?: Fetcher; +} + +export type BeforeRequestHook = (req: Request) => Awaitable; +export type RequestErrorHook = (err: unknown, req: Request) => Awaitable; +export type ResponseHook = (res: Response, req: Request) => Awaitable; + +export class HTTPClient { + private fetcher: Fetcher; + private requestHooks: BeforeRequestHook[] = []; + private requestErrorHooks: RequestErrorHook[] = []; + private responseHooks: ResponseHook[] = []; + + constructor(private options: HTTPClientOptions = {}) { + this.fetcher = options.fetcher || DEFAULT_FETCHER; + } + + async request(request: Request): Promise { + let req = request; + for (const hook of this.requestHooks) { + const nextRequest = await hook(req); + if (nextRequest) { + req = nextRequest; + } + } + + try { + const res = await this.fetcher(req); + + for (const hook of this.responseHooks) { + await hook(res, req); + } + + return res; + } catch (err) { + for (const hook of this.requestErrorHooks) { + await hook(err, req); + } + + throw err; + } + } + + /** + * Registers a hook that is called before a request is made. The hook function + * can mutate the request or return a new request. This may be useful to add + * additional information to request such as request IDs and tracing headers. + */ + addHook(hook: "beforeRequest", fn: BeforeRequestHook): this; + /** + * Registers a hook that is called when a request cannot be made due to a + * network error. + */ + addHook(hook: "requestError", fn: RequestErrorHook): this; + /** + * Registers a hook that is called when a response has been received from the + * server. + */ + addHook(hook: "response", fn: ResponseHook): this; + addHook( + ...args: + | [hook: "beforeRequest", fn: BeforeRequestHook] + | [hook: "requestError", fn: RequestErrorHook] + | [hook: "response", fn: ResponseHook] + ) { + if (args[0] === "beforeRequest") { + this.requestHooks.push(args[1]); + } else if (args[0] === "requestError") { + this.requestErrorHooks.push(args[1]); + } else if (args[0] === "response") { + this.responseHooks.push(args[1]); + } else { + throw new Error(`Invalid hook type: ${args[0]}`); + } + return this; + } + + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "beforeRequest", fn: BeforeRequestHook): this; + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "requestError", fn: RequestErrorHook): this; + /** Removes a hook that was previously registered with `addHook`. */ + removeHook(hook: "response", fn: ResponseHook): this; + removeHook( + ...args: + | [hook: "beforeRequest", fn: BeforeRequestHook] + | [hook: "requestError", fn: RequestErrorHook] + | [hook: "response", fn: ResponseHook] + ): this { + let target: unknown[]; + if (args[0] === "beforeRequest") { + target = this.requestHooks; + } else if (args[0] === "requestError") { + target = this.requestErrorHooks; + } else if (args[0] === "response") { + target = this.responseHooks; + } else { + throw new Error(`Invalid hook type: ${args[0]}`); + } + + const index = target.findIndex((v) => v === args[1]); + if (index >= 0) { + target.splice(index, 1); + } + + return this; + } + + clone(): HTTPClient { + const child = new HTTPClient(this.options); + child.requestHooks = this.requestHooks.slice(); + child.requestErrorHooks = this.requestErrorHooks.slice(); + child.responseHooks = this.responseHooks.slice(); + + return child; + } +} + +export type StatusCodePredicate = number | string | (number | string)[]; + +// A semicolon surrounded by optional whitespace characters is used to separate +// segments in a media type string. +const mediaParamSeparator = /\s*;\s*/g; + +export function matchContentType(response: Response, pattern: string): boolean { + // `*` is a special case which means anything is acceptable. + if (pattern === "*") { + return true; + } + + let contentType = + response.headers.get("content-type")?.trim() || "application/octet-stream"; + contentType = contentType.toLowerCase(); + + const wantParts = pattern.toLowerCase().trim().split(mediaParamSeparator); + const [wantType = "", ...wantParams] = wantParts; + + if (wantType.split("/").length !== 2) { + return false; + } + + const gotParts = contentType.split(mediaParamSeparator); + const [gotType = "", ...gotParams] = gotParts; + + const [type = "", subtype = ""] = gotType.split("/"); + if (!type || !subtype) { + return false; + } + + if ( + wantType !== "*/*" && + gotType !== wantType && + `${type}/*` !== wantType && + `*/${subtype}` !== wantType + ) { + return false; + } + + if (gotParams.length < wantParams.length) { + return false; + } + + const params = new Set(gotParams); + for (const wantParam of wantParams) { + if (!params.has(wantParam)) { + return false; + } + } + + return true; +} + +const codeRangeRE = new RegExp("^[0-9]xx$", "i"); + +export function matchStatusCode( + response: Response, + codes: StatusCodePredicate, +): boolean { + const actual = `${response.status}`; + const expectedCodes = Array.isArray(codes) ? codes : [codes]; + if (!expectedCodes.length) { + return false; + } + + return expectedCodes.some((ec) => { + const code = `${ec}`; + + if (code === "default") { + return true; + } + + if (!codeRangeRE.test(`${code}`)) { + return code === actual; + } + + const expectFamily = code.charAt(0); + if (!expectFamily) { + throw new Error("Invalid status code range"); + } + + const actualFamily = actual.charAt(0); + if (!actualFamily) { + throw new Error(`Invalid response status code: ${actual}`); + } + + return actualFamily === expectFamily; + }); +} + +export function matchResponse( + response: Response, + code: StatusCodePredicate, + contentTypePattern: string, +): boolean { + return ( + matchStatusCode(response, code) && + matchContentType(response, contentTypePattern) + ); +} + +/** + * Uses various heurisitics to determine if an error is a connection error. + */ +export function isConnectionError(err: unknown): boolean { + if (typeof err !== "object" || err == null) { + return false; + } + + // Covers fetch in Deno as well + const isBrowserErr = + err instanceof TypeError && + err.message.toLowerCase().startsWith("failed to fetch"); + + const isNodeErr = + err instanceof TypeError && + err.message.toLowerCase().startsWith("fetch failed"); + + const isBunErr = "name" in err && err.name === "ConnectionError"; + + const isGenericErr = + "code" in err && + typeof err.code === "string" && + err.code.toLowerCase() === "econnreset"; + + return isBrowserErr || isNodeErr || isGenericErr || isBunErr; +} + +/** + * Uses various heurisitics to determine if an error is a timeout error. + */ +export function isTimeoutError(err: unknown): boolean { + if (typeof err !== "object" || err == null) { + return false; + } + + // Fetch in browser, Node.js, Bun, Deno + const isNative = "name" in err && err.name === "TimeoutError"; + const isLegacyNative = "code" in err && err.code === 23; + + // Node.js HTTP client and Axios + const isGenericErr = + "code" in err && + typeof err.code === "string" && + err.code.toLowerCase() === "econnaborted"; + + return isNative || isLegacyNative || isGenericErr; +} + +/** + * Uses various heurisitics to determine if an error is a abort error. + */ +export function isAbortError(err: unknown): boolean { + if (typeof err !== "object" || err == null) { + return false; + } + + // Fetch in browser, Node.js, Bun, Deno + const isNative = "name" in err && err.name === "AbortError"; + const isLegacyNative = "code" in err && err.code === 20; + + // Node.js HTTP client and Axios + const isGenericErr = + "code" in err && + typeof err.code === "string" && + err.code.toLowerCase() === "econnaborted"; + + return isNative || isLegacyNative || isGenericErr; +} diff --git a/previous-versions/sync-for-payables-version-1/src/lib/is-plain-object.ts b/previous-versions/sync-for-payables-version-1/src/lib/is-plain-object.ts new file mode 100644 index 000000000..61070d3d7 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/lib/is-plain-object.ts @@ -0,0 +1,43 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/* +MIT License + +Copyright (c) Sindre Sorhus (https://sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +*/ + +// Taken from https://github.com/sindresorhus/is-plain-obj/blob/97f38e8836f86a642cce98fc6ab3058bc36df181/index.js + +export function isPlainObject(value: unknown): value is object { + if (typeof value !== "object" || value === null) { + return false; + } + + const prototype = Object.getPrototypeOf(value); + return ( + (prototype === null || + prototype === Object.prototype || + Object.getPrototypeOf(prototype) === null) && + !(Symbol.toStringTag in value) && + !(Symbol.iterator in value) + ); +} diff --git a/previous-versions/sync-for-payables-version-1/src/lib/logger.ts b/previous-versions/sync-for-payables-version-1/src/lib/logger.ts new file mode 100644 index 000000000..d181f2937 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/lib/logger.ts @@ -0,0 +1,9 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export interface Logger { + group(label?: string): void; + groupEnd(): void; + log(message: any, ...args: any[]): void; +} diff --git a/previous-versions/sync-for-payables-version-1/src/lib/matchers.ts b/previous-versions/sync-for-payables-version-1/src/lib/matchers.ts new file mode 100644 index 000000000..bddfff769 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/lib/matchers.ts @@ -0,0 +1,322 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { SDKError } from "../sdk/models/errors/sdkerror.js"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import { 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 = + | "json" + | "text" + | "bytes" + | "stream" + | "sse" + | "nil" + | "fail"; + +const DEFAULT_CONTENT_TYPES: Record = { + json: "application/json", + text: "text/plain", + bytes: "application/octet-stream", + stream: "application/octet-stream", + sse: "text/event-stream", + nil: "*", + fail: "*", +}; + +type Schema = { parse(raw: unknown): T }; + +type MatchOptions = { + ctype?: string; + hdrs?: boolean; + key?: string; + sseSentinel?: string; +}; + +export type ValueMatcher = MatchOptions & { + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; +}; + +export type ErrorMatcher = MatchOptions & { + enc: Encoding; + codes: StatusCodePredicate; + schema: Schema; + err: true; +}; + +export type FailMatcher = { + enc: "fail"; + codes: StatusCodePredicate; +}; + +export type Matcher = ValueMatcher | ErrorMatcher | FailMatcher; + +export function jsonErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "json", codes, schema }; +} +export function json( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "json", codes, schema }; +} + +export function textErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "text", codes, schema }; +} +export function text( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "text", codes, schema }; +} + +export function bytesErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "bytes", codes, schema }; +} +export function bytes( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "bytes", codes, schema }; +} + +export function streamErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "stream", codes, schema }; +} +export function stream( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "stream", codes, schema }; +} + +export function sseErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "sse", codes, schema }; +} +export function sse( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "sse", codes, schema }; +} + +export function nilErr( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ErrorMatcher { + return { ...options, err: true, enc: "nil", codes, schema }; +} +export function nil( + codes: StatusCodePredicate, + schema: Schema, + options?: MatchOptions, +): ValueMatcher { + return { ...options, enc: "nil", codes, schema }; +} + +export function fail(codes: StatusCodePredicate): FailMatcher { + return { enc: "fail", codes }; +} + +export type MatchedValue = Matchers extends Matcher[] + ? T + : never; +export type MatchedError = Matchers extends Matcher[] + ? E + : never; +export type MatchFunc = ( + response: Response, + options?: { resultKey?: string; extraFields?: Record }, +) => Promise<[result: Result, raw: unknown]>; + +export function match( + ...matchers: Array> +): MatchFunc { + return async function matchFunc( + response: Response, + options?: { resultKey?: string; extraFields?: Record }, + ): Promise< + [result: Result, raw: unknown] + > { + let raw: unknown; + let matcher: Matcher | undefined; + for (const match of matchers) { + const { codes } = match; + const ctpattern = "ctype" in match + ? match.ctype + : DEFAULT_CONTENT_TYPES[match.enc]; + if (ctpattern && matchResponse(response, codes, ctpattern)) { + matcher = match; + break; + } else if (!ctpattern && matchStatusCode(response, codes)) { + matcher = match; + break; + } + } + + if (!matcher) { + const responseBody = await response.text(); + return [{ + ok: false, + error: new SDKError( + "Unexpected API response status or content-type", + response, + responseBody, + ), + }, responseBody]; + } + + const encoding = matcher.enc; + switch (encoding) { + case "json": + raw = await response.json(); + break; + case "bytes": + raw = await response.arrayBuffer(); + break; + case "stream": + raw = response.body; + break; + case "text": + raw = await response.text(); + break; + case "sse": + raw = response.body; + break; + case "nil": + raw = await discardResponseBody(response); + break; + case "fail": + raw = await response.text(); + break; + default: + encoding satisfies never; + throw new Error(`Unsupported response type: ${encoding}`); + } + + if (matcher.enc === "fail") { + return [{ + ok: false, + error: new SDKError( + "API error occurred", + response, + typeof raw === "string" ? raw : "", + ), + }, raw]; + } + + const resultKey = matcher.key || options?.resultKey; + let data: unknown; + + if ("err" in matcher) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + ...(isPlainObject(raw) ? raw : null), + }; + } else if (resultKey) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + [resultKey]: raw, + }; + } else if (matcher.hdrs) { + data = { + ...options?.extraFields, + ...(matcher.hdrs ? { Headers: unpackHeaders(response.headers) } : null), + ...(isPlainObject(raw) ? raw : null), + }; + } else { + data = raw; + } + + if ("err" in matcher) { + const result = safeParse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + ); + return [result.ok ? { ok: false, error: result.value } : result, raw]; + } else { + return [ + safeParse( + data, + (v: unknown) => matcher.schema.parse(v), + "Response validation failed", + ), + raw, + ]; + } + }; +} + +const headerValRE = /, */; +/** + * Iterates over a Headers object and returns an object with all the header + * entries. Values are represented as an array to account for repeated headers. + */ +export function unpackHeaders(headers: Headers): Record { + const out: Record = {}; + + for (const [k, v] of headers.entries()) { + out[k] = v.split(headerValRE); + } + + 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; + } + + try { + let done = false; + while (!done) { + const res = await reader.read(); + done = res.done; + } + } finally { + reader.releaseLock(); + } +} diff --git a/previous-versions/sync-for-payables-version-1/src/lib/primitives.ts b/previous-versions/sync-for-payables-version-1/src/lib/primitives.ts new file mode 100644 index 000000000..23794a2b6 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/lib/primitives.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export type Remap = { + [k in keyof Inp as Mapping[k] extends string /* if we have a string mapping for this key then use it */ + ? Mapping[k] + : Mapping[k] extends null /* if the mapping is to `null` then drop the key */ + ? never + : k /* otherwise keep the key as-is */]: Inp[k]; +}; + +/** + * Converts or omits an object's keys according to a mapping. + * + * @param inp An object whose keys will be remapped + * @param mappings A mapping of original keys to new keys. If a key is not present in the mapping, it will be left as is. If a key is mapped to `null`, it will be removed in the resulting object. + * @returns A new object with keys remapped or omitted according to the mappings + */ +export function remap< + Inp extends Record, + const Mapping extends { [k in keyof Inp]?: string | null }, +>(inp: Inp, mappings: Mapping): Remap { + let out: any = {}; + + if (!Object.keys(mappings).length) { + out = inp; + return out; + } + + for (const [k, v] of Object.entries(inp)) { + const j = mappings[k]; + if (j === null) { + continue; + } + out[j ?? k] = v; + } + + return out; +} diff --git a/previous-versions/sync-for-payables-version-1/src/lib/retries.ts b/previous-versions/sync-for-payables-version-1/src/lib/retries.ts new file mode 100644 index 000000000..df3e0bc27 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/lib/retries.ts @@ -0,0 +1,187 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { isConnectionError, isTimeoutError } from "./http.js"; + +export type BackoffStrategy = { + initialInterval: number; + maxInterval: number; + exponent: number; + maxElapsedTime: number; +}; + +const defaultBackoff: BackoffStrategy = { + initialInterval: 500, + maxInterval: 60000, + exponent: 1.5, + maxElapsedTime: 3600000, +}; + +export type RetryConfig = + | { strategy: "none" } + | { + strategy: "backoff"; + backoff?: BackoffStrategy; + retryConnectionErrors?: boolean; + }; + +class PermanentError extends Error { + inner: unknown; + + constructor(inner: unknown) { + super("Permanent error"); + this.inner = inner; + + Object.setPrototypeOf(this, PermanentError.prototype); + } +} + +class TemporaryError extends Error { + res: Response; + + constructor(res: Response) { + super("Temporary error"); + this.res = res; + + Object.setPrototypeOf(this, TemporaryError.prototype); + } +} + +export async function retry( + fetchFn: () => Promise, + options: { + config: RetryConfig; + statusCodes: string[]; + }, +): Promise { + switch (options.config.strategy) { + case "backoff": + return retryBackoff( + wrapFetcher(fetchFn, { + statusCodes: options.statusCodes, + retryConnectionErrors: !!options.config.retryConnectionErrors, + }), + options.config.backoff ?? defaultBackoff, + ); + default: + return await fetchFn(); + } +} + +function wrapFetcher( + fn: () => Promise, + options: { + statusCodes: string[]; + retryConnectionErrors: boolean; + }, +): () => Promise { + return async () => { + try { + const res = await fn(); + if (isRetryableResponse(res, options.statusCodes)) { + throw new TemporaryError(res); + } + + return res; + } catch (err) { + if (err instanceof TemporaryError) { + throw err; + } + + if ( + options.retryConnectionErrors && + (isTimeoutError(err) || isConnectionError(err)) + ) { + throw err; + } + + throw new PermanentError(err); + } + }; +} + +const codeRangeRE = new RegExp("^[0-9]xx$", "i"); + +function isRetryableResponse(res: Response, statusCodes: string[]): boolean { + const actual = `${res.status}`; + + return statusCodes.some((code) => { + if (!codeRangeRE.test(code)) { + return code === actual; + } + + const expectFamily = code.charAt(0); + if (!expectFamily) { + throw new Error("Invalid status code range"); + } + + const actualFamily = actual.charAt(0); + if (!actualFamily) { + throw new Error(`Invalid response status code: ${actual}`); + } + + return actualFamily === expectFamily; + }); +} + +async function retryBackoff( + fn: () => Promise, + strategy: BackoffStrategy, +): Promise { + const { maxElapsedTime, initialInterval, exponent, maxInterval } = strategy; + + const start = Date.now(); + let x = 0; + + // eslint-disable-next-line no-constant-condition + while (true) { + try { + const res = await fn(); + return res; + } catch (err) { + if (err instanceof PermanentError) { + throw err.inner; + } + const elapsed = Date.now() - start; + if (elapsed > maxElapsedTime) { + if (err instanceof TemporaryError) { + return err.res; + } + + throw err; + } + + let retryInterval = 0; + if (err instanceof TemporaryError && err.res && err.res.headers) { + const retryVal = err.res.headers.get("retry-after") || ""; + if (retryVal != "") { + const parsedNumber = Number(retryVal); + if (!isNaN(parsedNumber) && Number.isInteger(parsedNumber)) { + retryInterval = parsedNumber * 1000; + } else { + const parsedDate = Date.parse(retryVal); + if (!isNaN(parsedDate)) { + const deltaMS = parsedDate - Date.now(); + retryInterval = deltaMS > 0 ? Math.ceil(deltaMS) : 0; + } + } + } + } + + if (retryInterval == 0) { + retryInterval = + initialInterval * Math.pow(x, exponent) + Math.random() * 1000; + } + + const d = Math.min(retryInterval, maxInterval); + + await delay(d); + x++; + } + } +} + +async function delay(delay: number): Promise { + return new Promise((resolve) => setTimeout(resolve, delay)); +} diff --git a/previous-versions/sync-for-payables-version-1/src/lib/schemas.ts b/previous-versions/sync-for-payables-version-1/src/lib/schemas.ts new file mode 100644 index 000000000..a2ad30da3 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/lib/schemas.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { + output, + ZodEffects, + ZodError, + ZodObject, + ZodRawShape, + ZodTypeAny, +} from "zod"; +import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js"; +import { ERR, OK, Result } from "../sdk/types/fp.js"; + +/** + * Utility function that executes some code which may throw a ZodError. It + * intercepts this error and converts it to an SDKValidationError so as to not + * leak Zod implementation details to user code. + */ +export function parse( + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, +): Out { + try { + return fn(rawValue); + } catch (err) { + if (err instanceof ZodError) { + throw new SDKValidationError(errorMessage, err, rawValue); + } + throw err; + } +} + +/** + * Utility function that executes some code which may result in a ZodError. It + * intercepts this error and converts it to an SDKValidationError so as to not + * leak Zod implementation details to user code. + */ +export function safeParse( + rawValue: Inp, + fn: (value: Inp) => Out, + errorMessage: string, +): Result { + try { + return OK(fn(rawValue)); + } catch (err) { + return ERR(new SDKValidationError(errorMessage, err, rawValue)); + } +} + +export function collectExtraKeys< + Shape extends ZodRawShape, + Catchall extends ZodTypeAny, + K extends string, +>( + obj: ZodObject, + extrasKey: K, +): ZodEffects< + typeof obj, + & output> + & { + [k in K]: Record>; + } +> { + return obj.transform((val) => { + const extras: Record> = {}; + const { shape } = obj; + for (const [key] of Object.entries(val)) { + if (key in shape) { + continue; + } + + const v = val[key]; + if (typeof v === "undefined") { + continue; + } + + extras[key] = v; + delete val[key]; + } + + return { ...val, [extrasKey]: extras }; + }); +} diff --git a/previous-versions/sync-for-payables-version-1/src/lib/sdks.ts b/previous-versions/sync-for-payables-version-1/src/lib/sdks.ts new file mode 100644 index 000000000..dc42cb99b --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/lib/sdks.ts @@ -0,0 +1,384 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { SDKHooks } from "../hooks/hooks.js"; +import { HookContext } from "../hooks/types.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../sdk/models/errors/httpclienterrors.js"; +import { ERR, OK, Result } from "../sdk/types/fp.js"; +import { stringToBase64 } from "./base64.js"; +import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "./config.js"; +import { encodeForm } from "./encodings.js"; +import { + HTTPClient, + isAbortError, + isConnectionError, + isTimeoutError, + matchContentType, + matchStatusCode, +} from "./http.js"; +import { Logger } from "./logger.js"; +import { retry, RetryConfig } from "./retries.js"; +import { SecurityState } from "./security.js"; + +export type RequestOptions = { + /** + * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If + * `fetchOptions.signal` is set then it will take precedence over this option. + */ + timeoutMs?: number; + /** + * Set or override a retry policy on HTTP calls. + */ + retries?: RetryConfig; + /** + * Specifies the status codes which should be retried using the given retry policy. + */ + retryCodes?: string[]; + /** + * 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; +}; + +type RequestConfig = { + method: string; + path: string; + baseURL?: string | URL; + query?: string; + body?: RequestInit["body"]; + headers?: HeadersInit; + security?: SecurityState | null; + uaHeader?: string; + timeoutMs?: number; +}; + +const gt: unknown = typeof globalThis === "undefined" ? null : globalThis; +const webWorkerLike = typeof gt === "object" + && gt != null + && "importScripts" in gt + && typeof gt["importScripts"] === "function"; +const isBrowserLike = webWorkerLike + || (typeof navigator !== "undefined" && "serviceWorker" in navigator) + || (typeof window === "object" && typeof window.document !== "undefined"); + +export class ClientSDK { + private readonly httpClient: HTTPClient; + protected readonly baseURL: URL | null; + protected readonly hooks$: SDKHooks; + protected readonly logger?: Logger | undefined; + public readonly options$: SDKOptions & { hooks?: SDKHooks }; + + constructor(options: SDKOptions = {}) { + const opt = options as unknown; + if ( + typeof opt === "object" + && opt != null + && "hooks" in opt + && opt.hooks instanceof SDKHooks + ) { + this.hooks$ = opt.hooks; + } 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; + } + + public createRequest$( + context: HookContext, + conf: RequestConfig, + options?: RequestOptions, + ): Result { + const { method, path, query, headers: opHeaders, security } = conf; + + const base = conf.baseURL ?? this.baseURL; + if (!base) { + return ERR(new InvalidRequestError("No base URL provided for operation")); + } + const reqURL = new URL(base); + const inputURL = new URL(path, reqURL); + + if (path) { + reqURL.pathname += inputURL.pathname.replace(/^\/+/, ""); + } + + let finalQuery = query || ""; + + const secQuery: string[] = []; + for (const [k, v] of Object.entries(security?.queryParams || {})) { + secQuery.push(encodeForm(k, v, { charEncoding: "percent" })); + } + if (secQuery.length) { + finalQuery += `&${secQuery.join("&")}`; + } + + if (finalQuery) { + const q = finalQuery.startsWith("&") ? finalQuery.slice(1) : finalQuery; + reqURL.search = `?${q}`; + } + + const headers = new Headers(opHeaders); + + const username = security?.basic.username; + const password = security?.basic.password; + if (username != null || password != null) { + const encoded = stringToBase64( + [username || "", password || ""].join(":"), + ); + headers.set("Authorization", `Basic ${encoded}`); + } + + const securityHeaders = new Headers(security?.headers || {}); + for (const [k, v] of securityHeaders) { + headers.set(k, v); + } + + let cookie = headers.get("cookie") || ""; + for (const [k, v] of Object.entries(security?.cookies || {})) { + cookie += `; ${k}=${v}`; + } + cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie; + headers.set("cookie", cookie); + + const userHeaders = new Headers(options?.fetchOptions?.headers); + for (const [k, v] of userHeaders) { + headers.set(k, v); + } + + // 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); + } + + let fetchOptions = options?.fetchOptions; + if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) { + const timeoutSignal = AbortSignal.timeout(conf.timeoutMs); + if (!fetchOptions) { + fetchOptions = { signal: timeoutSignal }; + } else { + 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"; + } + } + + let input; + try { + input = this.hooks$.beforeCreateRequest(context, { + url: reqURL, + options: { + ...fetchOptions, + body: conf.body ?? null, + headers, + method, + }, + }); + } catch (err: unknown) { + return ERR( + new UnexpectedClientError("Create request hook failed to execute", { + cause: err, + }), + ); + } + + return OK(new Request(input.url, input.options)); + } + + public async do$( + request: Request, + options: { + context: HookContext; + errorCodes: number | string | (number | string)[]; + retryConfig?: RetryConfig | undefined; + retryCodes?: string[] | undefined; + }, + ): Promise< + Result< + Response, + | RequestAbortedError + | RequestTimeoutError + | ConnectionError + | UnexpectedClientError + > + > { + const { context, errorCodes } = options; + const retryConfig = options.retryConfig || { strategy: "none" }; + const retryCodes = options.retryCodes || []; + + return retry( + async () => { + const req = await this.hooks$.beforeRequest(context, request.clone()); + await logRequest(this.logger, req).catch((e) => + this.logger?.log("Failed to log request:", e) + ); + + let response = await this.httpClient.request(req); + + if (matchStatusCode(response, errorCodes)) { + const result = await this.hooks$.afterError(context, response, null); + if (result.error) { + throw result.error; + } + response = result.response || response; + } else { + response = await this.hooks$.afterSuccess(context, response); + } + + await logResponse(this.logger, response, req) + .catch(e => this.logger?.log("Failed to log response:", e)); + + return response; + }, + { config: retryConfig, statusCodes: retryCodes }, + ).then( + (r) => OK(r), + (err) => { + switch (true) { + case isAbortError(err): + return ERR( + new RequestAbortedError("Request aborted by client", { + cause: err, + }), + ); + case isTimeoutError(err): + return ERR( + new RequestTimeoutError("Request timed out", { cause: err }), + ); + case isConnectionError(err): + return ERR( + new ConnectionError("Unable to make request", { cause: err }), + ); + default: + return ERR( + new UnexpectedClientError("Unexpected HTTP client error", { + cause: err, + }), + ); + } + }, + ); + } +} + +const jsonLikeContentTypeRE = /^application\/(?:.{0,100}\+)?json/; +async function logRequest(logger: Logger | undefined, req: Request) { + if (!logger) { + return; + } + + const contentType = req.headers.get("content-type"); + const ct = contentType?.split(";")[0] || ""; + + logger.group(`> Request: ${req.method} ${req.url}`); + + logger.group("Headers:"); + for (const [k, v] of req.headers.entries()) { + logger.log(`${k}: ${v}`); + } + logger.groupEnd(); + + logger.group("Body:"); + switch (true) { + case jsonLikeContentTypeRE.test(ct): + logger.log(await req.clone().json()); + break; + case ct.startsWith("text/"): + logger.log(await req.clone().text()); + break; + case ct === "multipart/form-data": { + const body = await req.clone().formData(); + for (const [k, v] of body) { + const vlabel = v instanceof Blob ? "" : v; + logger.log(`${k}: ${vlabel}`); + } + break; + } + default: + logger.log(`<${contentType}>`); + break; + } + logger.groupEnd(); + + logger.groupEnd(); +} + +async function logResponse( + logger: Logger | undefined, + res: Response, + req: Request, +) { + if (!logger) { + return; + } + + const contentType = res.headers.get("content-type"); + const ct = contentType?.split(";")[0] || ""; + + logger.group(`< Response: ${req.method} ${req.url}`); + logger.log("Status Code:", res.status, res.statusText); + + logger.group("Headers:"); + for (const [k, v] of res.headers.entries()) { + logger.log(`${k}: ${v}`); + } + logger.groupEnd(); + + logger.group("Body:"); + switch (true) { + case matchContentType(res, "application/json") + || jsonLikeContentTypeRE.test(ct): + logger.log(await res.clone().json()); + break; + case matchContentType(res, "text/event-stream"): + logger.log(`<${contentType}>`); + break; + case matchContentType(res, "text/*"): + logger.log(await res.clone().text()); + break; + case matchContentType(res, "multipart/form-data"): { + const body = await res.clone().formData(); + for (const [k, v] of body) { + const vlabel = v instanceof Blob ? "" : v; + logger.log(`${k}: ${vlabel}`); + } + break; + } + default: + logger.log(`<${contentType}>`); + break; + } + logger.groupEnd(); + + logger.groupEnd(); +} diff --git a/previous-versions/sync-for-payables-version-1/src/lib/security.ts b/previous-versions/sync-for-payables-version-1/src/lib/security.ts new file mode 100644 index 000000000..bdb5865a3 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/lib/security.ts @@ -0,0 +1,217 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as shared from "../sdk/models/shared/index.js"; + +export enum SecurityErrorCode { + Incomplete = "incomplete", + UnrecognisedSecurityType = "unrecognized_security_type", +} + +export class SecurityError extends Error { + constructor( + public code: SecurityErrorCode, + message: string, + ) { + super(message); + this.name = "SecurityError"; + } + + static incomplete(): SecurityError { + return new SecurityError( + SecurityErrorCode.Incomplete, + "Security requirements not met in order to perform the operation", + ); + } + static unrecognizedType(type: string): SecurityError { + return new SecurityError( + SecurityErrorCode.UnrecognisedSecurityType, + `Unrecognised security type: ${type}`, + ); + } +} + +export type SecurityState = { + basic: { username?: string | undefined; password?: string | undefined }; + headers: Record; + queryParams: Record; + cookies: Record; +}; + +type SecurityInputBasic = { + type: "http:basic"; + value: + | { username?: string | undefined; password?: string | undefined } + | null + | undefined; +}; + +type SecurityInputBearer = { + type: "http:bearer"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputAPIKey = { + type: "apiKey:header" | "apiKey:query" | "apiKey:cookie"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputOIDC = { + type: "openIdConnect"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputOAuth2 = { + type: "oauth2"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputOAuth2ClientCredentials = { + type: "oauth2:client_credentials"; + value: string | null | undefined; + fieldName: string; +}; + +type SecurityInputCustom = { + type: "http:custom"; + value: any | null | undefined; + fieldName: string; +}; + +export type SecurityInput = + | SecurityInputBasic + | SecurityInputBearer + | SecurityInputAPIKey + | SecurityInputOAuth2 + | SecurityInputOAuth2ClientCredentials + | SecurityInputOIDC + | SecurityInputCustom; + +export function resolveSecurity( + ...options: SecurityInput[][] +): SecurityState | null { + const state: SecurityState = { + basic: { username: "", password: "" }, + headers: {}, + queryParams: {}, + cookies: {}, + }; + + const option = options.find((opts) => { + return opts.every((o) => { + if (o.value == null) { + return false; + } else if (o.type === "http:basic") { + return o.value.username != null || o.value.password != null; + } else if (o.type === "http:custom") { + return null; + } else if (typeof o.value === "string") { + return !!o.value; + } else { + throw new Error( + `Unrecognized security type: ${o.type} (value type: ${typeof o + .value})`, + ); + } + }); + }); + if (option == null) { + return null; + } + + option.forEach((spec) => { + if (spec.value == null) { + return; + } + + const { type } = spec; + + switch (type) { + case "apiKey:header": + state.headers[spec.fieldName] = spec.value; + break; + case "apiKey:query": + state.queryParams[spec.fieldName] = spec.value; + break; + case "apiKey:cookie": + state.cookies[spec.fieldName] = spec.value; + break; + case "http:basic": + applyBasic(state, spec); + break; + case "http:custom": + break; + case "http:bearer": + applyBearer(state, spec); + break; + case "oauth2": + applyBearer(state, spec); + break; + case "oauth2:client_credentials": + break; + case "openIdConnect": + applyBearer(state, spec); + break; + default: + spec satisfies never; + throw SecurityError.unrecognizedType(type); + } + }); + + return state; +} + +function applyBasic( + state: SecurityState, + spec: SecurityInputBasic, +) { + if (spec.value == null) { + return; + } + + state.basic = spec.value; +} + +function applyBearer( + state: SecurityState, + spec: SecurityInputBearer | SecurityInputOAuth2 | SecurityInputOIDC, +) { + if (spec.value == null) { + return; + } + + let value = spec.value; + if (value.slice(0, 7).toLowerCase() !== "bearer ") { + value = `Bearer ${value}`; + } + + state.headers[spec.fieldName] = value; +} +export function resolveGlobalSecurity( + security: Partial | null | undefined, +): SecurityState | null { + return resolveSecurity( + [ + { + fieldName: "Authorization", + type: "apiKey:header", + value: security?.authHeader, + }, + ], + ); +} + +export async function extractSecurity< + T extends string | Record, +>(sec: T | (() => Promise) | undefined): Promise { + if (sec == null) { + return; + } + + return typeof sec === "function" ? sec() : sec; +} diff --git a/previous-versions/sync-for-payables-version-1/src/lib/url.ts b/previous-versions/sync-for-payables-version-1/src/lib/url.ts new file mode 100644 index 000000000..6bc6356e2 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/lib/url.ts @@ -0,0 +1,33 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +const hasOwn = Object.prototype.hasOwnProperty; + +export type Params = Partial>; + +export function pathToFunc( + pathPattern: string, + options?: { charEncoding?: "percent" | "none" }, +): (params?: Params) => string { + const paramRE = /\{([a-zA-Z0-9_]+?)\}/g; + + return function buildURLPath(params: Record = {}): string { + return pathPattern.replace(paramRE, function (_, placeholder) { + if (!hasOwn.call(params, placeholder)) { + throw new Error(`Parameter '${placeholder}' is required`); + } + + const value = params[placeholder]; + if (typeof value !== "string" && typeof value !== "number") { + throw new Error( + `Parameter '${placeholder}' must be a string or number`, + ); + } + + return options?.charEncoding === "percent" + ? encodeURIComponent(`${value}`) + : `${value}`; + }); + }; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/accounts.ts b/previous-versions/sync-for-payables-version-1/src/sdk/accounts.ts new file mode 100644 index 000000000..4e8109fc3 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/accounts.ts @@ -0,0 +1,108 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { accountsCreate } from "../funcs/accountsCreate.js"; +import { accountsGet } from "../funcs/accountsGet.js"; +import { accountsGetCreateModel } from "../funcs/accountsGetCreateModel.js"; +import { accountsList } from "../funcs/accountsList.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class Accounts extends ClientSDK { + /** + * List accounts + * + * @remarks + * The *List accounts* endpoint returns a list of [accounts](https://docs.codat.io/sync-for-payables-api#/schemas/Account) for a given company's connection. + * + * [Accounts](https://docs.codat.io/sync-for-payables-api#/schemas/Account) are the categories a business uses to record accounting transactions. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ + async list( + request: operations.ListAccountsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(accountsList( + this, + request, + options, + )); + } + + /** + * Get account + * + * @remarks + * The *Get account* endpoint returns a single account for a given `accountId`. + * + * [Accounts](https://docs.codat.io/sync-for-payables-api#/schemas/Account) are the categories a business uses to record accounting transactions. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support getting a specific account. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ + async get( + request: operations.GetAccountRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(accountsGet( + this, + request, + options, + )); + } + + /** + * Get create account model + * + * @remarks + * The *Get create account model* endpoint returns the expected data for the request payload when creating an [account](https://docs.codat.io/sync-for-payables-api#/schemas/Account) for a given company and integration. + * + * [Accounts](https://docs.codat.io/sync-for-payables-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. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support creating an account. + */ + async getCreateModel( + request: operations.GetCreateAccountModelRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(accountsGetCreateModel( + this, + request, + options, + )); + } + + /** + * Create account + * + * @remarks + * The *Create account* endpoint creates a new [account](https://docs.codat.io/sync-for-payables-api#/schemas/Account) for a given company's connection. + * + * [Accounts](https://docs.codat.io/sync-for-payables-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-payables-api#/operations/get-create-chartOfAccounts-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=chartOfAccounts) for integrations that support creating an account. + */ + async create( + request: operations.CreateAccountRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(accountsCreate( + this, + request, + options, + )); + } +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/bankaccounts.ts b/previous-versions/sync-for-payables-version-1/src/sdk/bankaccounts.ts new file mode 100644 index 000000000..3f731a182 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/bankaccounts.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { bankAccountsCreate } from "../funcs/bankAccountsCreate.js"; +import { bankAccountsGetCreateModel } from "../funcs/bankAccountsGetCreateModel.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class BankAccounts extends ClientSDK { + /** + * Get create/update bank account model + * + * @remarks + * The *Get create/update bank account model* endpoint returns the expected data for the request payload when creating and updating a [bank account](https://docs.codat.io/sync-for-payables-api#/schemas/BankAccount) for a given company and integration. + * + * [Bank accounts](https://docs.codat.io/sync-for-payables-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. + * + * **Integration-specific behaviour** + * + * See the *response examples* for integration-specific indicative models. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating and updating a bank account. + */ + async getCreateModel( + request: operations.GetCreateBankAccountsModelRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(bankAccountsGetCreateModel( + this, + request, + options, + )); + } + + /** + * Create bank account + * + * @remarks + * The *Create bank account* endpoint creates a new [bank account](https://docs.codat.io/sync-for-payables-api#/schemas/BankAccount) for a given company's connection. + * + * [Bank accounts](https://docs.codat.io/sync-for-payables-api#/schemas/BankAccount) are financial accounts maintained by a bank or other financial institution. + * + * **Integration-specific behaviour** + * + * Required data may vary by integration. To see what data to post, first call [Get create/update bank account model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-update-bankAccounts-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bankAccounts) for integrations that support creating an account. + */ + async create( + request: operations.CreateBankAccountRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(bankAccountsCreate( + this, + request, + options, + )); + } +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/billcreditnotes.ts b/previous-versions/sync-for-payables-version-1/src/sdk/billcreditnotes.ts new file mode 100644 index 000000000..574535568 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/billcreditnotes.ts @@ -0,0 +1,134 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { billCreditNotesCreate } from "../funcs/billCreditNotesCreate.js"; +import { billCreditNotesGet } from "../funcs/billCreditNotesGet.js"; +import { billCreditNotesGetCreateUpdateModel } from "../funcs/billCreditNotesGetCreateUpdateModel.js"; +import { billCreditNotesList } from "../funcs/billCreditNotesList.js"; +import { billCreditNotesUpdate } from "../funcs/billCreditNotesUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class BillCreditNotes extends ClientSDK { + /** + * List bill credit notes + * + * @remarks + * The *List bill credit notes* endpoint returns a list of [bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) for a given company's connection. + * + * [Bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ + async list( + request: operations.ListBillCreditNotesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billCreditNotesList( + this, + request, + options, + )); + } + + /** + * Get bill credit note + * + * @remarks + * The *Get bill credit note* endpoint returns a single bill credit note for a given `billCreditNoteId`. + * + * [Bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support getting a specific bill credit note. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ + async get( + request: operations.GetBillCreditNoteRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billCreditNotesGet( + this, + request, + options, + )); + } + + /** + * Get create/update bill credit note model + * + * @remarks + * The *Get create/update bill credit note model* endpoint returns the expected data for the request payload when creating and updating a [bill credit note](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) for a given company and integration. + * + * [Bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. + * + * **Integration-specific behaviour** + * + * See the *response examples* for integration-specific indicative models. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating and updating a bill credit note. + */ + async getCreateUpdateModel( + request: operations.GetCreateUpdateBillCreditNoteModelRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billCreditNotesGetCreateUpdateModel( + this, + request, + options, + )); + } + + /** + * Create bill credit note + * + * @remarks + * The *Create bill credit note* endpoint creates a new [bill credit note](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) for a given company's connection. + * + * [Bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. + * + * **Integration-specific behaviour** + * + * Required data may vary by integration. To see what data to post, first call [Get create/update bill credit note model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-update-billCreditNotes-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating a bill credit note. + */ + async create( + request: operations.CreateBillCreditNoteRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billCreditNotesCreate( + this, + request, + options, + )); + } + + /** + * Update bill credit note + * + * @remarks + * The *Update bill credit note* endpoint updates an existing [bill credit note](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) for a given company's connection. + * + * [Bill credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote) are issued by a supplier for the purpose of recording credit. + * + * **Integration-specific behaviour** + * + * Required data may vary by integration. To see what data to post, first call [Get create/update bill credit note model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-update-billCreditNotes-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billCreditNotes) for integrations that support creating a bill credit note. + */ + async update( + request: operations.UpdateBillCreditNoteRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billCreditNotesUpdate( + this, + request, + options, + )); + } +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/billpayments.ts b/previous-versions/sync-for-payables-version-1/src/sdk/billpayments.ts new file mode 100644 index 000000000..4b80dec4f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/billpayments.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { billPaymentsCreate } from "../funcs/billPaymentsCreate.js"; +import { billPaymentsDelete } from "../funcs/billPaymentsDelete.js"; +import { billPaymentsGet } from "../funcs/billPaymentsGet.js"; +import { billPaymentsGetCreateModel } from "../funcs/billPaymentsGetCreateModel.js"; +import { billPaymentsList } from "../funcs/billPaymentsList.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class BillPayments extends ClientSDK { + /** + * List bill payments + * + * @remarks + * The *List bill payments* endpoint returns a list of [bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) for a given company's connection. + * + * [Bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) are an allocation of money within any Accounts Payable account. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ + async list( + request: operations.ListBillPaymentsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billPaymentsList( + this, + request, + options, + )); + } + + /** + * Get bill payment + * + * @remarks + * The *Get bill payment* endpoint returns a single bill payment for a given `billPaymentId`. + * + * [Bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) are an allocation of money within any Accounts Payable account. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support getting a specific bill payment. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ + async get( + request: operations.GetBillPaymentsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billPaymentsGet( + this, + request, + options, + )); + } + + /** + * Delete bill payment + * + * @remarks + * The *Delete bill payment* endpoint allows you to delete a specified bill payment from an accounting software. + * + * [Bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) are an allocation of money within any Accounts Payable account. + * + * ### Process + * 1. Pass the `{billPaymentId}` to the *Delete bill payment* endpoint and store the `pushOperationKey` returned. + * 2. Check the status of the delete operation by checking the status of the push operation either via + * 1. [Push operation webhook](https://docs.codat.io/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), + * 2. [Push operation status endpoint](https://docs.codat.io/sync-for-payables-api#/operations/get-push-operation). + * + * A `Success` status indicates that the bill payment object was deleted from the accounting software. + * 3. (Optional) Check that the bill payment was deleted from the accounting software. + * + * ### Effect on related objects + * Be aware that deleting a bill payment from an accounting software might cause related objects to be modified. + * + * ## Integration specifics + * Integrations that support soft delete do not permanently delete the object in the accounting software. + * + * | Integration | Soft Delete | Details | + * |-------------|-------------|---------| + * | QuickBooks Online | No | - + * | QuickBooks Desktop | No | - + * | Oracle NetSuite | No | See [here](/integrations/accounting/netsuite/accounting-netsuite-how-deleting-bill-payments-works) to learn more. + * | Xero | Yes | - + * | Sage Intacct | No | Some bill payments in Sage Intacct can only be deleted, whilst others can only be voided. Codat have applied logic to handle this complexity. + * + * > **Supported integrations** + * > + * > This functionality is currently supported for our QuickBooks Online, QuickBooks Desktop, Oracle NetSuite, Xero and Sage Intacct integrations. + */ + async delete( + request: operations.DeleteBillPaymentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billPaymentsDelete( + this, + request, + options, + )); + } + + /** + * Get create bill payment model + * + * @remarks + * The *Get create bill payment model* endpoint returns the expected data for the request payload when creating a [bill payment](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) for a given company and integration. + * + * [Bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) are an allocation of money within any Accounts Payable account. + * + * **Integration-specific behaviour** + * + * See the *response examples* for integration-specific indicative models. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating a bill payment. + */ + async getCreateModel( + request: operations.GetCreateBillPaymentModelRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billPaymentsGetCreateModel( + this, + request, + options, + )); + } + + /** + * Create bill payments + * + * @remarks + * The *Create bill payment* endpoint creates a new [bill payment](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) for a given company's connection. + * + * [Bill payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) are an allocation of money within any customer accounts payable account. + * + * **Integration-specific behaviour** + * + * Required data may vary by integration. To see what data to post, first call [Get create bill payment model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-billPayments-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=billPayments) for integrations that support creating a bill payment. + */ + async create( + request: operations.CreateBillPaymentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billPaymentsCreate( + this, + request, + options, + )); + } +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/bills.ts b/previous-versions/sync-for-payables-version-1/src/sdk/bills.ts index 7b7d383c7..7f85ffdea 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/bills.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/bills.ts @@ -1,135 +1,308 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as utils from "../internal/utils"; -import * as errors from "../sdk/models/errors"; -import * as operations from "../sdk/models/operations"; -import * as shared from "../sdk/models/shared"; -import { SDKConfiguration } from "./sdk"; -import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios"; +import { billsCreate } from "../funcs/billsCreate.js"; +import { billsDelete } from "../funcs/billsDelete.js"; +import { billsDeleteAttachment } from "../funcs/billsDeleteAttachment.js"; +import { billsDownloadAttachment } from "../funcs/billsDownloadAttachment.js"; +import { billsGet } from "../funcs/billsGet.js"; +import { billsGetAttachment } from "../funcs/billsGetAttachment.js"; +import { billsGetCreateUpdateModel } from "../funcs/billsGetCreateUpdateModel.js"; +import { billsList } from "../funcs/billsList.js"; +import { billsListAttachments } from "../funcs/billsListAttachments.js"; +import { billsUpdate } from "../funcs/billsUpdate.js"; +import { billsUploadAttachment } from "../funcs/billsUploadAttachment.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; -/** - * Bills - */ +export class Bills extends ClientSDK { + /** + * List bills + * + * @remarks + * The *List bills* endpoint returns a list of [bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) for a given company's connection. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + */ + async list( + request: operations.ListBillsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billsList( + this, + request, + options, + )); + } -export class Bills { - private sdkConfiguration: SDKConfiguration; + /** + * Get bill + * + * @remarks + * The *Get bill* endpoint returns a single bill for a given `billId`. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support getting a specific bill. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ + async get( + request: operations.GetBillRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billsGet( + this, + request, + options, + )); + } - constructor(sdkConfig: SDKConfiguration) { - this.sdkConfiguration = sdkConfig; - } + /** + * Get create/update bill model + * + * @remarks + * The *Get create/update bill model* endpoint returns the expected data for the request payload when creating and updating a [bill](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) for a given company and integration. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + * + * **Integration-specific behaviour** + * + * See the *response examples* for integration-specific indicative models. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating and updating a bill. + */ + async getCreateUpdateModel( + request: operations.GetCreateUpdateBillModelRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billsGetCreateUpdateModel( + this, + request, + options, + )); + } - /** - * List bills - * - * @remarks - * The *List bills* endpoint returns a list of [bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) for a given company's connection. - * - * By default, the endpoint will return all bills irrespective of payment status. To filter outstanding bills use the `outstandingBills=true` query parameter to return all unpaid and partially paid bills. - * - * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - * - */ - async list( - req: operations.ListBillsRequest, - retries?: utils.RetryConfig, - config?: AxiosRequestConfig - ): Promise { - if (!(req instanceof utils.SpeakeasyBase)) { - req = new operations.ListBillsRequest(req); - } + /** + * Create bill + * + * @remarks + * The *Create bill* endpoint creates a new [bill](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) for a given company's connection. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + * + * **Integration-specific behaviour** + * + * Required data may vary by integration. To see what data to post, first call [Get create/update bill model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-update-bills-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating a bill. + */ + async create( + request: operations.CreateBillRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billsCreate( + this, + request, + options, + )); + } - const baseURL: string = utils.templateUrl( - this.sdkConfiguration.serverURL, - this.sdkConfiguration.serverDefaults - ); - const operationUrl: string = utils.generateURL( - baseURL, - "/companies/{companyId}/connection/{connectionId}/payables/bills", - req - ); - const client: AxiosInstance = this.sdkConfiguration.defaultClient; - let globalSecurity = this.sdkConfiguration.security; - if (typeof globalSecurity === "function") { - globalSecurity = await globalSecurity(); - } - if (!(globalSecurity instanceof utils.SpeakeasyBase)) { - globalSecurity = new shared.Security(globalSecurity); - } - const properties = utils.parseSecurityProperties(globalSecurity); - const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers }; - const queryParams: string = utils.serializeQueryParams(req); - headers["Accept"] = "application/json"; + /** + * Update bill + * + * @remarks + * The *Update bill* endpoint updates an existing [bill](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) for a given company's connection. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + * + * **Integration-specific behaviour** + * + * Required data may vary by integration. To see what data to post, first call [Get create/update bill model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-update-bills-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support creating a bill. + */ + async update( + request: operations.UpdateBillRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billsUpdate( + this, + request, + options, + )); + } - headers["user-agent"] = this.sdkConfiguration.userAgent; + /** + * Delete bill + * + * @remarks + * The *Delete bill* endpoint allows you to delete a specified bill from an accounting software. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are itemized records of goods received or services provided to the SMB. + * + * ### Process + * 1. Pass the `{billId}` to the *Delete bill* endpoint and store the `pushOperationKey` returned. + * 2. Check the status of the delete operation by checking the status of the push operation either via + * 1. [Push operation webhook](https://docs.codat.io/introduction/webhooks/core-rules-types#push-operation-status-has-changed) (advised), + * 2. [Push operation status endpoint](https://docs.codat.io/sync-for-payables-api#/operations/get-push-operation). + * + * A `Success` status indicates that the bill object was deleted from the accounting software. + * 3. (Optional) Check that the bill was deleted from the accounting software. + * + * ### Effect on related objects + * + * Be aware that deleting a bill from an accounting software might cause related objects to be modified. For example, if you delete a paid bill in QuickBooks Online or QuickBooks Desktop, the bill is deleted but the bill payment against that bill is not. The bill payment is converted to a payment on account. + * + * ## Integration specifics + * Integrations that support soft delete do not permanently delete the object in the accounting software. + * + * | Integration | Soft Delete | Details | + * |-------------|-------------|--------------------------------------------------------------------------------------------------------------| + * | QuickBooks Online | No | - | + * | QuickBooks Desktop | No | - | + * | Oracle NetSuite | No | When deleting a bill that's already linked to a bill payment, you must delete the linked bill payment first. | | + * | Sage Intacct | No | When deleting a bill that's already linked to a bill payment, you must delete the linked bill payment first. | + * | Xero | No | Draft bills will be deleted. Open bills will be voided instead of deleted since Xero only allows voiding a bill once it's been posted. When deleting a bill that's already linked to a bill payment, you must delete the linked bill payment first. | + * + * > **Supported Integrations** + * > + * > This functionality is currently supported for our QuickBooks Online, QuickBooks Desktop, Xero, Oracle NetSuite and Sage Intacct integrations. + */ + async delete( + request: operations.DeleteBillRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billsDelete( + this, + request, + options, + )); + } - const globalRetryConfig = this.sdkConfiguration.retryConfig; - let retryConfig: utils.RetryConfig | undefined = retries; - if (!retryConfig) { - if (globalRetryConfig) { - retryConfig = globalRetryConfig; - } else { - retryConfig = new utils.RetryConfig( - "backoff", - new utils.BackoffStrategy(500, 60000, 1.5, 3600000), - true - ); - } - } - const httpRes: AxiosResponse = await utils.Retry(() => { - return client.request({ - validateStatus: () => true, - url: operationUrl + queryParams, - method: "get", - headers: headers, - responseType: "arraybuffer", - ...config, - }); - }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); + /** + * List bill attachments + * + * @remarks + * The *List bill attachments* endpoint returns a list of attachments available to download for a given `billId`. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + */ + async listAttachments( + request: operations.ListBillAttachmentsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billsListAttachments( + this, + request, + options, + )); + } - const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; + /** + * Get bill attachment + * + * @remarks + * The *Get bill attachment* endpoint returns a specific attachment for a given `billId` and `attachmentId`. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support getting a bill attachment. + */ + async getAttachment( + request: operations.GetBillAttachmentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billsGetAttachment( + this, + request, + options, + )); + } - if (httpRes?.status == null) { - throw new Error(`status code not found in response: ${httpRes}`); - } + /** + * Delete bill attachment + * + * @remarks + * The *Delete bill attachment* endpoint allows you to delete a specified bill attachment from an accounting software. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices + * that represent the SMB's financial obligations to their supplier for a + * purchase of goods or services. + * + * ### Process + * + * 1. Pass the `{billId}` and `{attachmentId}` to the *Delete bill attachment* endpoint and store the `pushOperationKey` returned. + * + * 2. Check the status of the delete operation by checking the status of push operation either via + * + * 1. [Push operation webhook](https://docs.codat.io/introduction/webhookscore-rules-types#push-operation-status-has-changed) (advised), + * + * 2. [Push operation status endpoint](https://docs.codat.io/sync-for-payables-api#/operations/get-push-operation). A `Success` status indicates that the bill attachment object was deleted from the accounting software. + * + * 3. (Optional) Check that the bill attachment was deleted from the accounting software. + * + * >**Supported Integrations** + * > + * >This functionality is currently only supported for our QuickBooks Online integration. + */ + async deleteAttachment( + request: operations.DeleteBillAttachmentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billsDeleteAttachment( + this, + request, + options, + )); + } - const res: operations.ListBillsResponse = new operations.ListBillsResponse({ - statusCode: httpRes.status, - contentType: responseContentType, - rawResponse: httpRes, - }); - const decodedRes = new TextDecoder().decode(httpRes?.data); - switch (true) { - case httpRes?.status == 200: - if (utils.matchContentType(responseContentType, `application/json`)) { - res.bills = utils.objectToClass(JSON.parse(decodedRes), shared.Bills); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - case [400, 401, 402, 403, 404, 409, 429, 500, 503].includes(httpRes?.status): - if (utils.matchContentType(responseContentType, `application/json`)) { - res.errorMessage = utils.objectToClass( - JSON.parse(decodedRes), - shared.ErrorMessage - ); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - } + /** + * Download bill attachment + * + * @remarks + * The *Download bill attachment* endpoint downloads a specific attachment for a given `billId` and `attachmentId`. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support downloading a bill attachment. + */ + async downloadAttachment( + request: operations.DownloadBillAttachmentRequest, + options?: RequestOptions, + ): Promise> { + return unwrapAsync(billsDownloadAttachment( + this, + request, + options, + )); + } - return res; - } + /** + * Upload bill attachment + * + * @remarks + * The *Upload bill attachment* endpoint uploads an attachment and assigns it against a specific `billId`. + * + * [Bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + * + * **Integration-specific behaviour** + * + * For more details on supported file types by integration see [Attachments](https://docs.codat.io/sync-for-payables-api#/schemas/Attachment). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=bills) for integrations that support uploading a bill attachment. + */ + async uploadAttachment( + request: operations.UploadBillAttachmentRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(billsUploadAttachment( + this, + request, + options, + )); + } } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/companies.ts b/previous-versions/sync-for-payables-version-1/src/sdk/companies.ts index 05ded6903..8ce7ed8c9 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/companies.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/companies.ts @@ -1,582 +1,118 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as utils from "../internal/utils"; -import * as errors from "../sdk/models/errors"; -import * as operations from "../sdk/models/operations"; -import * as shared from "../sdk/models/shared"; -import { SDKConfiguration } from "./sdk"; -import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios"; - -/** - * Create and manage your Codat companies. - */ - -export class Companies { - private sdkConfiguration: SDKConfiguration; - - constructor(sdkConfig: SDKConfiguration) { - this.sdkConfiguration = sdkConfig; - } - - /** - * Create company - * - * @remarks - * Use the *Create company* endpoint to create a new [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) that represents your customer in Codat. - * - * A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. - * Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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. - * - * 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`. - */ - async create( - req: shared.CompanyRequestBody, - retries?: utils.RetryConfig, - config?: AxiosRequestConfig - ): Promise { - if (!(req instanceof utils.SpeakeasyBase)) { - req = new shared.CompanyRequestBody(req); - } - - const baseURL: string = utils.templateUrl( - this.sdkConfiguration.serverURL, - this.sdkConfiguration.serverDefaults - ); - const operationUrl: string = baseURL.replace(/\/$/, "") + "/companies"; - - let [reqBodyHeaders, reqBody]: [object, any] = [{}, null]; - - try { - [reqBodyHeaders, reqBody] = utils.serializeRequestBody(req, "request", "json"); - } catch (e: unknown) { - if (e instanceof Error) { - throw new Error(`Error serializing request body, cause: ${e.message}`); - } - } - const client: AxiosInstance = this.sdkConfiguration.defaultClient; - let globalSecurity = this.sdkConfiguration.security; - if (typeof globalSecurity === "function") { - globalSecurity = await globalSecurity(); - } - if (!(globalSecurity instanceof utils.SpeakeasyBase)) { - globalSecurity = new shared.Security(globalSecurity); - } - const properties = utils.parseSecurityProperties(globalSecurity); - const headers: RawAxiosRequestHeaders = { - ...reqBodyHeaders, - ...config?.headers, - ...properties.headers, - }; - headers["Accept"] = "application/json"; - - headers["user-agent"] = this.sdkConfiguration.userAgent; - - const globalRetryConfig = this.sdkConfiguration.retryConfig; - let retryConfig: utils.RetryConfig | undefined = retries; - if (!retryConfig) { - if (globalRetryConfig) { - retryConfig = globalRetryConfig; - } else { - retryConfig = new utils.RetryConfig( - "backoff", - new utils.BackoffStrategy(500, 60000, 1.5, 3600000), - true - ); - } - } - const httpRes: AxiosResponse = await utils.Retry(() => { - return client.request({ - validateStatus: () => true, - url: operationUrl, - method: "post", - headers: headers, - responseType: "arraybuffer", - data: reqBody, - ...config, - }); - }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - - const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; - - if (httpRes?.status == null) { - throw new Error(`status code not found in response: ${httpRes}`); - } - - const res: operations.CreateCompanyResponse = new operations.CreateCompanyResponse({ - statusCode: httpRes.status, - contentType: responseContentType, - rawResponse: httpRes, - }); - const decodedRes = new TextDecoder().decode(httpRes?.data); - switch (true) { - case httpRes?.status == 200: - if (utils.matchContentType(responseContentType, `application/json`)) { - res.company = utils.objectToClass(JSON.parse(decodedRes), shared.Company); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - case [400, 401, 402, 403, 429, 500, 503].includes(httpRes?.status): - if (utils.matchContentType(responseContentType, `application/json`)) { - res.errorMessage = utils.objectToClass( - JSON.parse(decodedRes), - shared.ErrorMessage - ); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - } - - return res; - } - - /** - * Delete a company - * - * @remarks - * The *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company), its [connections](https://docs.codat.io/sync-for-payables-api#/schemas/Connection) and any cached data. This operation is irreversible. - * - * A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. - * Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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 delete( - req: operations.DeleteCompanyRequest, - retries?: utils.RetryConfig, - config?: AxiosRequestConfig - ): Promise { - if (!(req instanceof utils.SpeakeasyBase)) { - req = new operations.DeleteCompanyRequest(req); - } - - const baseURL: string = utils.templateUrl( - this.sdkConfiguration.serverURL, - this.sdkConfiguration.serverDefaults - ); - const operationUrl: string = utils.generateURL(baseURL, "/companies/{companyId}", req); - const client: AxiosInstance = this.sdkConfiguration.defaultClient; - let globalSecurity = this.sdkConfiguration.security; - if (typeof globalSecurity === "function") { - globalSecurity = await globalSecurity(); - } - if (!(globalSecurity instanceof utils.SpeakeasyBase)) { - globalSecurity = new shared.Security(globalSecurity); - } - const properties = utils.parseSecurityProperties(globalSecurity); - const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers }; - headers["Accept"] = "application/json"; - - headers["user-agent"] = this.sdkConfiguration.userAgent; - - const globalRetryConfig = this.sdkConfiguration.retryConfig; - let retryConfig: utils.RetryConfig | undefined = retries; - if (!retryConfig) { - if (globalRetryConfig) { - retryConfig = globalRetryConfig; - } else { - retryConfig = new utils.RetryConfig( - "backoff", - new utils.BackoffStrategy(500, 60000, 1.5, 3600000), - true - ); - } - } - const httpRes: AxiosResponse = await utils.Retry(() => { - return client.request({ - validateStatus: () => true, - url: operationUrl, - method: "delete", - headers: headers, - responseType: "arraybuffer", - ...config, - }); - }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - - const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; - - if (httpRes?.status == null) { - throw new Error(`status code not found in response: ${httpRes}`); - } - - const res: operations.DeleteCompanyResponse = new operations.DeleteCompanyResponse({ - statusCode: httpRes.status, - contentType: responseContentType, - rawResponse: httpRes, - }); - const decodedRes = new TextDecoder().decode(httpRes?.data); - switch (true) { - case httpRes?.status == 204: - break; - case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): - if (utils.matchContentType(responseContentType, `application/json`)) { - res.errorMessage = utils.objectToClass( - JSON.parse(decodedRes), - shared.ErrorMessage - ); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - } - - return res; - } - - /** - * Get company - * - * @remarks - * The *Get company* endpoint returns a single company for a given `companyId`. - * - * A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. - * Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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 get( - req: operations.GetCompanyRequest, - retries?: utils.RetryConfig, - config?: AxiosRequestConfig - ): Promise { - if (!(req instanceof utils.SpeakeasyBase)) { - req = new operations.GetCompanyRequest(req); - } - - const baseURL: string = utils.templateUrl( - this.sdkConfiguration.serverURL, - this.sdkConfiguration.serverDefaults - ); - const operationUrl: string = utils.generateURL(baseURL, "/companies/{companyId}", req); - const client: AxiosInstance = this.sdkConfiguration.defaultClient; - let globalSecurity = this.sdkConfiguration.security; - if (typeof globalSecurity === "function") { - globalSecurity = await globalSecurity(); - } - if (!(globalSecurity instanceof utils.SpeakeasyBase)) { - globalSecurity = new shared.Security(globalSecurity); - } - const properties = utils.parseSecurityProperties(globalSecurity); - const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers }; - headers["Accept"] = "application/json"; - - headers["user-agent"] = this.sdkConfiguration.userAgent; - - const globalRetryConfig = this.sdkConfiguration.retryConfig; - let retryConfig: utils.RetryConfig | undefined = retries; - if (!retryConfig) { - if (globalRetryConfig) { - retryConfig = globalRetryConfig; - } else { - retryConfig = new utils.RetryConfig( - "backoff", - new utils.BackoffStrategy(500, 60000, 1.5, 3600000), - true - ); - } - } - const httpRes: AxiosResponse = await utils.Retry(() => { - return client.request({ - validateStatus: () => true, - url: operationUrl, - method: "get", - headers: headers, - responseType: "arraybuffer", - ...config, - }); - }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - - const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; - - if (httpRes?.status == null) { - throw new Error(`status code not found in response: ${httpRes}`); - } - - const res: operations.GetCompanyResponse = new operations.GetCompanyResponse({ - statusCode: httpRes.status, - contentType: responseContentType, - rawResponse: httpRes, - }); - const decodedRes = new TextDecoder().decode(httpRes?.data); - switch (true) { - case httpRes?.status == 200: - if (utils.matchContentType(responseContentType, `application/json`)) { - res.company = utils.objectToClass(JSON.parse(decodedRes), shared.Company); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): - if (utils.matchContentType(responseContentType, `application/json`)) { - res.errorMessage = utils.objectToClass( - JSON.parse(decodedRes), - shared.ErrorMessage - ); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - } - - return res; - } - - /** - * List companies - * - * @remarks - * The *List companies* endpoint returns a list of [companies] associated to your instances. - * - * A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. - * Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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 list( - req: operations.ListCompaniesRequest, - retries?: utils.RetryConfig, - config?: AxiosRequestConfig - ): Promise { - if (!(req instanceof utils.SpeakeasyBase)) { - req = new operations.ListCompaniesRequest(req); - } - - const baseURL: string = utils.templateUrl( - this.sdkConfiguration.serverURL, - this.sdkConfiguration.serverDefaults - ); - const operationUrl: string = baseURL.replace(/\/$/, "") + "/companies"; - const client: AxiosInstance = this.sdkConfiguration.defaultClient; - let globalSecurity = this.sdkConfiguration.security; - if (typeof globalSecurity === "function") { - globalSecurity = await globalSecurity(); - } - if (!(globalSecurity instanceof utils.SpeakeasyBase)) { - globalSecurity = new shared.Security(globalSecurity); - } - const properties = utils.parseSecurityProperties(globalSecurity); - const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers }; - const queryParams: string = utils.serializeQueryParams(req); - headers["Accept"] = "application/json"; - - headers["user-agent"] = this.sdkConfiguration.userAgent; - - const globalRetryConfig = this.sdkConfiguration.retryConfig; - let retryConfig: utils.RetryConfig | undefined = retries; - if (!retryConfig) { - if (globalRetryConfig) { - retryConfig = globalRetryConfig; - } else { - retryConfig = new utils.RetryConfig( - "backoff", - new utils.BackoffStrategy(500, 60000, 1.5, 3600000), - true - ); - } - } - const httpRes: AxiosResponse = await utils.Retry(() => { - return client.request({ - validateStatus: () => true, - url: operationUrl + queryParams, - method: "get", - headers: headers, - responseType: "arraybuffer", - ...config, - }); - }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - - const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; - - if (httpRes?.status == null) { - throw new Error(`status code not found in response: ${httpRes}`); - } - - const res: operations.ListCompaniesResponse = new operations.ListCompaniesResponse({ - statusCode: httpRes.status, - contentType: responseContentType, - rawResponse: httpRes, - }); - const decodedRes = new TextDecoder().decode(httpRes?.data); - switch (true) { - case httpRes?.status == 200: - if (utils.matchContentType(responseContentType, `application/json`)) { - res.companies = utils.objectToClass(JSON.parse(decodedRes), shared.Companies); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - case [400, 401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): - if (utils.matchContentType(responseContentType, `application/json`)) { - res.errorMessage = utils.objectToClass( - JSON.parse(decodedRes), - shared.ErrorMessage - ); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - } - - return res; - } - - /** - * Update company - * - * @remarks - * Use the *Update company* endpoint to update both the name and description of the company. - * If you use [groups](https://docs.codat.io/sync-for-payables-api#/schemas/Group) to manage a set of companies, use the [Add company](https://docs.codat.io/sync-for-payables-api#/operations/add-company-to-group) or [Remove company](https://docs.codat.io/sync-for-payables-api#/operations/remove-company-from-group) endpoints to add or remove a company from a group. - * - * A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. - * Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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 update( - req: operations.UpdateCompanyRequest, - retries?: utils.RetryConfig, - config?: AxiosRequestConfig - ): Promise { - if (!(req instanceof utils.SpeakeasyBase)) { - req = new operations.UpdateCompanyRequest(req); - } - - const baseURL: string = utils.templateUrl( - this.sdkConfiguration.serverURL, - this.sdkConfiguration.serverDefaults - ); - const operationUrl: string = utils.generateURL(baseURL, "/companies/{companyId}", req); - - let [reqBodyHeaders, reqBody]: [object, any] = [{}, null]; - - try { - [reqBodyHeaders, reqBody] = utils.serializeRequestBody( - req, - "companyRequestBody", - "json" - ); - } catch (e: unknown) { - if (e instanceof Error) { - throw new Error(`Error serializing request body, cause: ${e.message}`); - } - } - const client: AxiosInstance = this.sdkConfiguration.defaultClient; - let globalSecurity = this.sdkConfiguration.security; - if (typeof globalSecurity === "function") { - globalSecurity = await globalSecurity(); - } - if (!(globalSecurity instanceof utils.SpeakeasyBase)) { - globalSecurity = new shared.Security(globalSecurity); - } - const properties = utils.parseSecurityProperties(globalSecurity); - const headers: RawAxiosRequestHeaders = { - ...reqBodyHeaders, - ...config?.headers, - ...properties.headers, - }; - headers["Accept"] = "application/json"; - - headers["user-agent"] = this.sdkConfiguration.userAgent; - - const globalRetryConfig = this.sdkConfiguration.retryConfig; - let retryConfig: utils.RetryConfig | undefined = retries; - if (!retryConfig) { - if (globalRetryConfig) { - retryConfig = globalRetryConfig; - } else { - retryConfig = new utils.RetryConfig( - "backoff", - new utils.BackoffStrategy(500, 60000, 1.5, 3600000), - true - ); - } - } - const httpRes: AxiosResponse = await utils.Retry(() => { - return client.request({ - validateStatus: () => true, - url: operationUrl, - method: "put", - headers: headers, - responseType: "arraybuffer", - data: reqBody, - ...config, - }); - }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - - const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; - - if (httpRes?.status == null) { - throw new Error(`status code not found in response: ${httpRes}`); - } - - const res: operations.UpdateCompanyResponse = new operations.UpdateCompanyResponse({ - statusCode: httpRes.status, - contentType: responseContentType, - rawResponse: httpRes, - }); - const decodedRes = new TextDecoder().decode(httpRes?.data); - switch (true) { - case httpRes?.status == 200: - if (utils.matchContentType(responseContentType, `application/json`)) { - res.company = utils.objectToClass(JSON.parse(decodedRes), shared.Company); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): - if (utils.matchContentType(responseContentType, `application/json`)) { - res.errorMessage = utils.objectToClass( - JSON.parse(decodedRes), - shared.ErrorMessage - ); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - } - - return res; - } +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 { companiesUpdate } from "../funcs/companiesUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class Companies extends ClientSDK { + /** + * List companies + * + * @remarks + * The *List companies* endpoint returns a list of [companies] associated to your instances. + * + * A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. + * Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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 list( + request: operations.ListCompaniesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(companiesList( + this, + request, + options, + )); + } + + /** + * Create company + * + * @remarks + * Use the *Create company* endpoint to create a new [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) that represents your customer in Codat. + * + * A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. + * Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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. + * + * 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`. + */ + async create( + request?: shared.CompanyRequestBody | undefined, + options?: RequestOptions, + ): Promise { + return unwrapAsync(companiesCreate( + this, + request, + options, + )); + } + + /** + * Update company + * + * @remarks + * Use the *Update company* endpoint to update both the name and description of the company. + * If you use [groups](https://docs.codat.io/sync-for-payables-api#/schemas/Group) to manage a set of companies, use the [Add company](https://docs.codat.io/sync-for-payables-api#/operations/add-company-to-group) or [Remove company](https://docs.codat.io/sync-for-payables-api#/operations/remove-company-from-group) endpoints to add or remove a company from a group. + * + * A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. + * Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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 update( + request: operations.UpdateCompanyRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(companiesUpdate( + this, + request, + options, + )); + } + + /** + * Delete a company + * + * @remarks + * The *Delete company* endpoint permanently deletes a [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company), its [connections](https://docs.codat.io/sync-for-payables-api#/schemas/Connection) and any cached data. This operation is irreversible. + * + * A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. + * Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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 delete( + request: operations.DeleteCompanyRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(companiesDelete( + this, + request, + options, + )); + } + + /** + * Get company + * + * @remarks + * The *Get company* endpoint returns a single company for a given `companyId`. + * + * A [company](https://docs.codat.io/sync-for-payables-api#/schemas/Company) represents a business sharing access to their data. + * Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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 get( + request: operations.GetCompanyRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(companiesGet( + this, + request, + options, + )); + } } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/companyinfo.ts b/previous-versions/sync-for-payables-version-1/src/sdk/companyinfo.ts new file mode 100644 index 000000000..4801eab20 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/companyinfo.ts @@ -0,0 +1,28 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { companyInfoGetAccountingProfile } from "../funcs/companyInfoGetAccountingProfile.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class CompanyInfo extends ClientSDK { + /** + * Get company accounting profile + * + * @remarks + * Gets the latest basic info for a company. + */ + async getAccountingProfile( + request: operations.GetAccountingProfileRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(companyInfoGetAccountingProfile( + this, + request, + options, + )); + } +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/connections.ts b/previous-versions/sync-for-payables-version-1/src/sdk/connections.ts index 34cc833d4..357bdbce7 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/connections.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/connections.ts @@ -1,584 +1,103 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as utils from "../internal/utils"; -import * as errors from "../sdk/models/errors"; -import * as operations from "../sdk/models/operations"; -import * as shared from "../sdk/models/shared"; -import { SDKConfiguration } from "./sdk"; -import { AxiosInstance, AxiosRequestConfig, AxiosResponse, RawAxiosRequestHeaders } from "axios"; - -/** - * Manage your companies' data connections. - */ - -export class Connections { - private sdkConfiguration: SDKConfiguration; - - constructor(sdkConfig: SDKConfiguration) { - this.sdkConfiguration = sdkConfig; - } - - /** - * Create connection - * - * @remarks - * Creates a connection for the company by providing a valid `platformKey`. - * - * Use the [List Integrations](https://docs.codat.io/sync-for-payables-api#/operations/list-integrations) endpoint to access valid platform keys. - */ - async create( - req: operations.CreateConnectionRequest, - retries?: utils.RetryConfig, - config?: AxiosRequestConfig - ): Promise { - if (!(req instanceof utils.SpeakeasyBase)) { - req = new operations.CreateConnectionRequest(req); - } - - const baseURL: string = utils.templateUrl( - this.sdkConfiguration.serverURL, - this.sdkConfiguration.serverDefaults - ); - const operationUrl: string = utils.generateURL( - baseURL, - "/companies/{companyId}/connections", - req - ); - - let [reqBodyHeaders, reqBody]: [object, any] = [{}, null]; - - try { - [reqBodyHeaders, reqBody] = utils.serializeRequestBody(req, "requestBody", "json"); - } catch (e: unknown) { - if (e instanceof Error) { - throw new Error(`Error serializing request body, cause: ${e.message}`); - } - } - const client: AxiosInstance = this.sdkConfiguration.defaultClient; - let globalSecurity = this.sdkConfiguration.security; - if (typeof globalSecurity === "function") { - globalSecurity = await globalSecurity(); - } - if (!(globalSecurity instanceof utils.SpeakeasyBase)) { - globalSecurity = new shared.Security(globalSecurity); - } - const properties = utils.parseSecurityProperties(globalSecurity); - const headers: RawAxiosRequestHeaders = { - ...reqBodyHeaders, - ...config?.headers, - ...properties.headers, - }; - headers["Accept"] = "application/json"; - - headers["user-agent"] = this.sdkConfiguration.userAgent; - - const globalRetryConfig = this.sdkConfiguration.retryConfig; - let retryConfig: utils.RetryConfig | undefined = retries; - if (!retryConfig) { - if (globalRetryConfig) { - retryConfig = globalRetryConfig; - } else { - retryConfig = new utils.RetryConfig( - "backoff", - new utils.BackoffStrategy(500, 60000, 1.5, 3600000), - true - ); - } - } - const httpRes: AxiosResponse = await utils.Retry(() => { - return client.request({ - validateStatus: () => true, - url: operationUrl, - method: "post", - headers: headers, - responseType: "arraybuffer", - data: reqBody, - ...config, - }); - }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - - const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; - - if (httpRes?.status == null) { - throw new Error(`status code not found in response: ${httpRes}`); - } - - const res: operations.CreateConnectionResponse = new operations.CreateConnectionResponse({ - statusCode: httpRes.status, - contentType: responseContentType, - rawResponse: httpRes, - }); - const decodedRes = new TextDecoder().decode(httpRes?.data); - switch (true) { - case httpRes?.status == 200: - if (utils.matchContentType(responseContentType, `application/json`)) { - res.connection = utils.objectToClass(JSON.parse(decodedRes), shared.Connection); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): - if (utils.matchContentType(responseContentType, `application/json`)) { - res.errorMessage = utils.objectToClass( - JSON.parse(decodedRes), - shared.ErrorMessage - ); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - } - - return res; - } - - /** - * Delete connection - * - * @remarks - * 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. - */ - async delete( - req: operations.DeleteConnectionRequest, - retries?: utils.RetryConfig, - config?: AxiosRequestConfig - ): Promise { - if (!(req instanceof utils.SpeakeasyBase)) { - req = new operations.DeleteConnectionRequest(req); - } - - const baseURL: string = utils.templateUrl( - this.sdkConfiguration.serverURL, - this.sdkConfiguration.serverDefaults - ); - const operationUrl: string = utils.generateURL( - baseURL, - "/companies/{companyId}/connections/{connectionId}", - req - ); - const client: AxiosInstance = this.sdkConfiguration.defaultClient; - let globalSecurity = this.sdkConfiguration.security; - if (typeof globalSecurity === "function") { - globalSecurity = await globalSecurity(); - } - if (!(globalSecurity instanceof utils.SpeakeasyBase)) { - globalSecurity = new shared.Security(globalSecurity); - } - const properties = utils.parseSecurityProperties(globalSecurity); - const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers }; - headers["Accept"] = "application/json"; - - headers["user-agent"] = this.sdkConfiguration.userAgent; - - const globalRetryConfig = this.sdkConfiguration.retryConfig; - let retryConfig: utils.RetryConfig | undefined = retries; - if (!retryConfig) { - if (globalRetryConfig) { - retryConfig = globalRetryConfig; - } else { - retryConfig = new utils.RetryConfig( - "backoff", - new utils.BackoffStrategy(500, 60000, 1.5, 3600000), - true - ); - } - } - const httpRes: AxiosResponse = await utils.Retry(() => { - return client.request({ - validateStatus: () => true, - url: operationUrl, - method: "delete", - headers: headers, - responseType: "arraybuffer", - ...config, - }); - }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - - const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; - - if (httpRes?.status == null) { - throw new Error(`status code not found in response: ${httpRes}`); - } - - const res: operations.DeleteConnectionResponse = new operations.DeleteConnectionResponse({ - statusCode: httpRes.status, - contentType: responseContentType, - rawResponse: httpRes, - }); - const decodedRes = new TextDecoder().decode(httpRes?.data); - switch (true) { - case httpRes?.status == 200: - break; - case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): - if (utils.matchContentType(responseContentType, `application/json`)) { - res.errorMessage = utils.objectToClass( - JSON.parse(decodedRes), - shared.ErrorMessage - ); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - } - - return res; - } - - /** - * Get connection - * - * @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. - */ - async get( - req: operations.GetConnectionRequest, - retries?: utils.RetryConfig, - config?: AxiosRequestConfig - ): Promise { - if (!(req instanceof utils.SpeakeasyBase)) { - req = new operations.GetConnectionRequest(req); - } - - const baseURL: string = utils.templateUrl( - this.sdkConfiguration.serverURL, - this.sdkConfiguration.serverDefaults - ); - const operationUrl: string = utils.generateURL( - baseURL, - "/companies/{companyId}/connections/{connectionId}", - req - ); - const client: AxiosInstance = this.sdkConfiguration.defaultClient; - let globalSecurity = this.sdkConfiguration.security; - if (typeof globalSecurity === "function") { - globalSecurity = await globalSecurity(); - } - if (!(globalSecurity instanceof utils.SpeakeasyBase)) { - globalSecurity = new shared.Security(globalSecurity); - } - const properties = utils.parseSecurityProperties(globalSecurity); - const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers }; - headers["Accept"] = "application/json"; - - headers["user-agent"] = this.sdkConfiguration.userAgent; - - const globalRetryConfig = this.sdkConfiguration.retryConfig; - let retryConfig: utils.RetryConfig | undefined = retries; - if (!retryConfig) { - if (globalRetryConfig) { - retryConfig = globalRetryConfig; - } else { - retryConfig = new utils.RetryConfig( - "backoff", - new utils.BackoffStrategy(500, 60000, 1.5, 3600000), - true - ); - } - } - const httpRes: AxiosResponse = await utils.Retry(() => { - return client.request({ - validateStatus: () => true, - url: operationUrl, - method: "get", - headers: headers, - responseType: "arraybuffer", - ...config, - }); - }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - - const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; - - if (httpRes?.status == null) { - throw new Error(`status code not found in response: ${httpRes}`); - } - - const res: operations.GetConnectionResponse = new operations.GetConnectionResponse({ - statusCode: httpRes.status, - contentType: responseContentType, - rawResponse: httpRes, - }); - const decodedRes = new TextDecoder().decode(httpRes?.data); - switch (true) { - case httpRes?.status == 200: - if (utils.matchContentType(responseContentType, `application/json`)) { - res.connection = utils.objectToClass(JSON.parse(decodedRes), shared.Connection); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): - if (utils.matchContentType(responseContentType, `application/json`)) { - res.errorMessage = utils.objectToClass( - JSON.parse(decodedRes), - shared.ErrorMessage - ); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - } - - return res; - } - - /** - * List connections - * - * @remarks - * List the connections for a company. - */ - async list( - req: operations.ListConnectionsRequest, - retries?: utils.RetryConfig, - config?: AxiosRequestConfig - ): Promise { - if (!(req instanceof utils.SpeakeasyBase)) { - req = new operations.ListConnectionsRequest(req); - } - - const baseURL: string = utils.templateUrl( - this.sdkConfiguration.serverURL, - this.sdkConfiguration.serverDefaults - ); - const operationUrl: string = utils.generateURL( - baseURL, - "/companies/{companyId}/connections", - req - ); - const client: AxiosInstance = this.sdkConfiguration.defaultClient; - let globalSecurity = this.sdkConfiguration.security; - if (typeof globalSecurity === "function") { - globalSecurity = await globalSecurity(); - } - if (!(globalSecurity instanceof utils.SpeakeasyBase)) { - globalSecurity = new shared.Security(globalSecurity); - } - const properties = utils.parseSecurityProperties(globalSecurity); - const headers: RawAxiosRequestHeaders = { ...config?.headers, ...properties.headers }; - const queryParams: string = utils.serializeQueryParams(req); - headers["Accept"] = "application/json"; - - headers["user-agent"] = this.sdkConfiguration.userAgent; - - const globalRetryConfig = this.sdkConfiguration.retryConfig; - let retryConfig: utils.RetryConfig | undefined = retries; - if (!retryConfig) { - if (globalRetryConfig) { - retryConfig = globalRetryConfig; - } else { - retryConfig = new utils.RetryConfig( - "backoff", - new utils.BackoffStrategy(500, 60000, 1.5, 3600000), - true - ); - } - } - const httpRes: AxiosResponse = await utils.Retry(() => { - return client.request({ - validateStatus: () => true, - url: operationUrl + queryParams, - method: "get", - headers: headers, - responseType: "arraybuffer", - ...config, - }); - }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - - const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; - - if (httpRes?.status == null) { - throw new Error(`status code not found in response: ${httpRes}`); - } - - const res: operations.ListConnectionsResponse = new operations.ListConnectionsResponse({ - statusCode: httpRes.status, - contentType: responseContentType, - rawResponse: httpRes, - }); - const decodedRes = new TextDecoder().decode(httpRes?.data); - switch (true) { - case httpRes?.status == 200: - if (utils.matchContentType(responseContentType, `application/json`)) { - res.connections = utils.objectToClass( - JSON.parse(decodedRes), - shared.Connections - ); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - case [400, 401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): - if (utils.matchContentType(responseContentType, `application/json`)) { - res.errorMessage = utils.objectToClass( - JSON.parse(decodedRes), - shared.ErrorMessage - ); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - } - - return res; - } - - /** - * Unlink connection - * - * @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. - */ - async unlink( - req: operations.UnlinkConnectionRequest, - retries?: utils.RetryConfig, - config?: AxiosRequestConfig - ): Promise { - if (!(req instanceof utils.SpeakeasyBase)) { - req = new operations.UnlinkConnectionRequest(req); - } - - const baseURL: string = utils.templateUrl( - this.sdkConfiguration.serverURL, - this.sdkConfiguration.serverDefaults - ); - const operationUrl: string = utils.generateURL( - baseURL, - "/companies/{companyId}/connections/{connectionId}", - req - ); - - let [reqBodyHeaders, reqBody]: [object, any] = [{}, null]; - - try { - [reqBodyHeaders, reqBody] = utils.serializeRequestBody(req, "requestBody", "json"); - } catch (e: unknown) { - if (e instanceof Error) { - throw new Error(`Error serializing request body, cause: ${e.message}`); - } - } - const client: AxiosInstance = this.sdkConfiguration.defaultClient; - let globalSecurity = this.sdkConfiguration.security; - if (typeof globalSecurity === "function") { - globalSecurity = await globalSecurity(); - } - if (!(globalSecurity instanceof utils.SpeakeasyBase)) { - globalSecurity = new shared.Security(globalSecurity); - } - const properties = utils.parseSecurityProperties(globalSecurity); - const headers: RawAxiosRequestHeaders = { - ...reqBodyHeaders, - ...config?.headers, - ...properties.headers, - }; - headers["Accept"] = "application/json"; - - headers["user-agent"] = this.sdkConfiguration.userAgent; - - const globalRetryConfig = this.sdkConfiguration.retryConfig; - let retryConfig: utils.RetryConfig | undefined = retries; - if (!retryConfig) { - if (globalRetryConfig) { - retryConfig = globalRetryConfig; - } else { - retryConfig = new utils.RetryConfig( - "backoff", - new utils.BackoffStrategy(500, 60000, 1.5, 3600000), - true - ); - } - } - const httpRes: AxiosResponse = await utils.Retry(() => { - return client.request({ - validateStatus: () => true, - url: operationUrl, - method: "patch", - headers: headers, - responseType: "arraybuffer", - data: reqBody, - ...config, - }); - }, new utils.Retries(retryConfig, ["408", "429", "5XX"])); - - const responseContentType: string = httpRes?.headers?.["content-type"] ?? ""; - - if (httpRes?.status == null) { - throw new Error(`status code not found in response: ${httpRes}`); - } - - const res: operations.UnlinkConnectionResponse = new operations.UnlinkConnectionResponse({ - statusCode: httpRes.status, - contentType: responseContentType, - rawResponse: httpRes, - }); - const decodedRes = new TextDecoder().decode(httpRes?.data); - switch (true) { - case httpRes?.status == 200: - if (utils.matchContentType(responseContentType, `application/json`)) { - res.connection = utils.objectToClass(JSON.parse(decodedRes), shared.Connection); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - case [401, 402, 403, 404, 429, 500, 503].includes(httpRes?.status): - if (utils.matchContentType(responseContentType, `application/json`)) { - res.errorMessage = utils.objectToClass( - JSON.parse(decodedRes), - shared.ErrorMessage - ); - } else { - throw new errors.SDKError( - "unknown content-type received: " + responseContentType, - httpRes.status, - decodedRes, - httpRes - ); - } - break; - } - - return res; - } +import { connectionsCreate } from "../funcs/connectionsCreate.js"; +import { connectionsDelete } from "../funcs/connectionsDelete.js"; +import { connectionsGet } from "../funcs/connectionsGet.js"; +import { connectionsList } from "../funcs/connectionsList.js"; +import { connectionsUnlink } from "../funcs/connectionsUnlink.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class Connections extends ClientSDK { + /** + * List connections + * + * @remarks + * List the connections for a company. + */ + async list( + request: operations.ListConnectionsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(connectionsList( + this, + request, + options, + )); + } + + /** + * Create connection + * + * @remarks + * Creates a connection for the company by providing a valid `platformKey`. + * + * Use the [List Integrations](https://docs.codat.io/sync-for-payables-api#/operations/list-integrations) endpoint to access valid platform keys. + */ + async create( + request: operations.CreateConnectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(connectionsCreate( + this, + request, + options, + )); + } + + /** + * Get connection + * + * @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. + */ + async get( + request: operations.GetConnectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(connectionsGet( + this, + request, + options, + )); + } + + /** + * Delete connection + * + * @remarks + * 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. + */ + async delete( + request: operations.DeleteConnectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(connectionsDelete( + this, + request, + options, + )); + } + + /** + * Unlink connection + * + * @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. + */ + async unlink( + request: operations.UnlinkConnectionRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(connectionsUnlink( + this, + request, + options, + )); + } } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/index.ts b/previous-versions/sync-for-payables-version-1/src/sdk/index.ts index 313031483..ecac22648 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/index.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/index.ts @@ -1,5 +1,5 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./sdk"; +export * from "./sdk.js"; diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/journalentries.ts b/previous-versions/sync-for-payables-version-1/src/sdk/journalentries.ts new file mode 100644 index 000000000..59567457e --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/journalentries.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { journalEntriesCreate } from "../funcs/journalEntriesCreate.js"; +import { journalEntriesGetCreateModel } from "../funcs/journalEntriesGetCreateModel.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class JournalEntries extends ClientSDK { + /** + * Get create journal entry model + * + * @remarks + * The *Get create journal entry model* endpoint returns the expected data for the request payload when creating a [journal entry](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry) for a given company and integration. + * + * [Journal entries](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry) are made in a company's general ledger, or accounts, when transactions are approved. + * + * **Integration-specific behaviour** + * + * See the *response examples* for integration-specific indicative models. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journalEntries) for integrations that support creating a journal entry. + */ + async getCreateModel( + request: operations.GetCreateJournalEntryModelRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(journalEntriesGetCreateModel( + this, + request, + options, + )); + } + + /** + * Create journal entry + * + * @remarks + * The *Create journal entry* endpoint creates a new [journal entry](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry) for a given company's connection. + * + * [Journal entries](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry) are made in a company's general ledger, or accounts, when transactions are approved. + * + * **Integration-specific behaviour** + * + * Required data may vary by integration. To see what data to post, first call [Get create journal entry model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-journalEntries-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journalEntries) for integrations that support creating a journal entry. + */ + async create( + request: operations.CreateJournalEntryRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(journalEntriesCreate( + this, + request, + options, + )); + } +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/journals.ts b/previous-versions/sync-for-payables-version-1/src/sdk/journals.ts new file mode 100644 index 000000000..e12b1b614 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/journals.ts @@ -0,0 +1,108 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { journalsCreate } from "../funcs/journalsCreate.js"; +import { journalsGet } from "../funcs/journalsGet.js"; +import { journalsGetCreateModel } from "../funcs/journalsGetCreateModel.js"; +import { journalsList } from "../funcs/journalsList.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class Journals extends ClientSDK { + /** + * List journals + * + * @remarks + * The *List journals* endpoint returns a list of [journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) for a given company's connection. + * + * [Journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) are used to record all the financial transactions of a company. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ + async list( + request: operations.ListJournalsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(journalsList( + this, + request, + options, + )); + } + + /** + * Get journal + * + * @remarks + * The *Get journal* endpoint returns a single journal for a given `journalId`. + * + * [Journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) are used to record all the financial transactions of a company. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support getting a specific journal. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ + async get( + request: operations.GetJournalRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(journalsGet( + this, + request, + options, + )); + } + + /** + * Get create journal model + * + * @remarks + * The *Get create journal model* endpoint returns the expected data for the request payload when creating a [journal](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) for a given company and integration. + * + * [Journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) are used to record all the financial transactions of a company. + * + * **Integration-specific behaviour** + * + * See the *response examples* for integration-specific indicative models. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support creating a journal. + */ + async getCreateModel( + request: operations.GetCreateJournalModelRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(journalsGetCreateModel( + this, + request, + options, + )); + } + + /** + * Create journal + * + * @remarks + * The *Create journal* endpoint creates a new [journal](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) for a given company's connection. + * + * [Journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) are used to record all the financial transactions of a company. + * + * **Integration-specific behaviour** + * + * Required data may vary by integration. To see what data to post, first call [Get create journal model](https://docs.codat.io/sync-for-payables-api#/operations/get-create-journals-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=journals) for integrations that support creating a journal. + */ + async create( + request: operations.CreateJournalRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(journalsCreate( + this, + request, + options, + )); + } +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/managedata.ts b/previous-versions/sync-for-payables-version-1/src/sdk/managedata.ts new file mode 100644 index 000000000..abc8b7a38 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/managedata.ts @@ -0,0 +1,106 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { manageDataGet } from "../funcs/manageDataGet.js"; +import { manageDataGetPullOperation } from "../funcs/manageDataGetPullOperation.js"; +import { manageDataListPullOperations } from "../funcs/manageDataListPullOperations.js"; +import { manageDataRefreshAllDataTypes } from "../funcs/manageDataRefreshAllDataTypes.js"; +import { manageDataRefreshDataType } from "../funcs/manageDataRefreshDataType.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class ManageData extends ClientSDK { + /** + * Refresh all data + * + * @remarks + * 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`. + */ + async refreshAllDataTypes( + request: operations.RefreshAllDataTypesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(manageDataRefreshAllDataTypes( + this, + request, + options, + )); + } + + /** + * Get data status + * + * @remarks + * Get the state of each data type for a company + */ + async get( + request: operations.GetDataStatusRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(manageDataGet( + this, + request, + options, + )); + } + + /** + * Refresh data type + * + * @remarks + * 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. + */ + async refreshDataType( + request: operations.RefreshDataTypeRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(manageDataRefreshDataType( + this, + request, + options, + )); + } + + /** + * List pull operations + * + * @remarks + * Gets the pull operation history (datasets) for a given company. + */ + async listPullOperations( + request: operations.ListPullOperationsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(manageDataListPullOperations( + this, + request, + options, + )); + } + + /** + * Get pull operation + * + * @remarks + * Retrieve information about a single dataset or pull operation. + */ + async getPullOperation( + request: operations.GetPullOperationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(manageDataGetPullOperation( + this, + request, + options, + )); + } +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/errors/errormessage.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/errors/errormessage.ts new file mode 100644 index 000000000..5d7f59312 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/errors/errormessage.ts @@ -0,0 +1,156 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import * as shared from "../shared/index.js"; + +/** + * The request made is not valid. + */ +export type ErrorMessageData = { + /** + * The HTTP status code returned by the error. + */ + statusCode?: number | undefined; + /** + * Codat's service the returned the error. + */ + service?: string | undefined; + /** + * A brief description of the error. + */ + error?: string | undefined; + /** + * Unique identifier used to propagate to all downstream services and determine the source of the error. + */ + correlationId?: string | undefined; + /** + * A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. + */ + validation?: shared.ErrorValidation | null | undefined; + /** + * `True` if the error occurred transiently and can be retried. + */ + canBeRetried?: string | undefined; + /** + * Machine readable error code used to automate processes based on the code returned. + */ + detailedErrorCode?: number | undefined; +}; + +/** + * The request made is not valid. + */ +export class ErrorMessage extends Error { + /** + * The HTTP status code returned by the error. + */ + statusCode?: number | undefined; + /** + * Codat's service the returned the error. + */ + service?: string | undefined; + /** + * A brief description of the error. + */ + error?: string | undefined; + /** + * Unique identifier used to propagate to all downstream services and determine the source of the error. + */ + correlationId?: string | undefined; + /** + * A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. + */ + validation?: shared.ErrorValidation | null | undefined; + /** + * `True` if the error occurred transiently and can be retried. + */ + canBeRetried?: string | undefined; + /** + * Machine readable error code used to automate processes based on the code returned. + */ + detailedErrorCode?: number | undefined; + + /** The original data that was passed to this error instance. */ + data$: ErrorMessageData; + + constructor(err: ErrorMessageData) { + const message = "message" in err && typeof err.message === "string" + ? err.message + : `API error occurred: ${JSON.stringify(err)}`; + super(message); + 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; + if (err.validation != null) this.validation = err.validation; + if (err.canBeRetried != null) this.canBeRetried = err.canBeRetried; + if (err.detailedErrorCode != null) { + this.detailedErrorCode = err.detailedErrorCode; + } + + this.name = "ErrorMessage"; + } +} + +/** @internal */ +export const ErrorMessage$inboundSchema: z.ZodType< + ErrorMessage, + z.ZodTypeDef, + unknown +> = z.object({ + statusCode: z.number().int().optional(), + service: z.string().optional(), + error: z.string().optional(), + correlationId: z.string().optional(), + validation: z.nullable(shared.ErrorValidation$inboundSchema).optional(), + canBeRetried: z.string().optional(), + detailedErrorCode: z.number().int().optional(), +}) + .transform((v) => { + return new ErrorMessage(v); + }); + +/** @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/previous-versions/sync-for-payables-version-1/src/sdk/models/errors/httpclienterrors.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/errors/httpclienterrors.ts new file mode 100644 index 000000000..b34f61212 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/errors/httpclienterrors.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** + * Base class for all HTTP errors. + */ +export class HTTPClientError extends Error { + /** The underlying cause of the error. */ + override readonly cause: unknown; + override name = "HTTPClientError"; + constructor(message: string, opts?: { cause?: unknown }) { + let msg = message; + if (opts?.cause) { + msg += `: ${opts.cause}`; + } + + super(msg, opts); + // In older runtimes, the cause field would not have been assigned through + // the super() call. + if (typeof this.cause === "undefined") { + this.cause = opts?.cause; + } + } +} + +/** + * An error to capture unrecognised or unexpected errors when making HTTP calls. + */ +export class UnexpectedClientError extends HTTPClientError { + override name = "UnexpectedClientError"; +} + +/** + * An error that is raised when any inputs used to create a request are invalid. + */ +export class InvalidRequestError extends HTTPClientError { + override name = "InvalidRequestError"; +} + +/** + * An error that is raised when a HTTP request was aborted by the client error. + */ +export class RequestAbortedError extends HTTPClientError { + override readonly name = "RequestAbortedError"; +} + +/** + * An error that is raised when a HTTP request timed out due to an AbortSignal + * signal timeout. + */ +export class RequestTimeoutError extends HTTPClientError { + override readonly name = "RequestTimeoutError"; +} + +/** + * An error that is raised when a HTTP client is unable to make a request to + * a server. + */ +export class ConnectionError extends HTTPClientError { + override readonly name = "ConnectionError"; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/errors/index.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/errors/index.ts index 4779e6a4c..615a51570 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/errors/index.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/errors/index.ts @@ -1,5 +1,8 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./sdkerror"; +export * from "./errormessage.js"; +export * from "./httpclienterrors.js"; +export * from "./sdkerror.js"; +export * from "./sdkvalidationerror.js"; diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/errors/sdkerror.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/errors/sdkerror.ts index f12b6e29a..001f46592 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/errors/sdkerror.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/errors/sdkerror.ts @@ -1,31 +1,27 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { AxiosResponse } from "axios"; - export class SDKError extends Error { - statusCode: number; - body: string; - rawResponse: AxiosResponse; + public readonly statusCode: number; + public readonly contentType: string; constructor( message: string, - statusCode: number, - body: string, - rawResponse: AxiosResponse, + public readonly rawResponse: Response, + public readonly body: string = "", ) { - let bodyString = ""; - if (body?.length > 0) { - bodyString = `\n${body}`; - } + 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}`, + ); - super(`${message}: Status ${statusCode}${bodyString}`); this.statusCode = statusCode; - this.body = body; - this.rawResponse = rawResponse; + this.contentType = contentType; this.name = "SDKError"; - Object.setPrototypeOf(this, SDKError.prototype); } } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/errors/sdkvalidationerror.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/errors/sdkvalidationerror.ts new file mode 100644 index 000000000..16929b9e5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/errors/sdkvalidationerror.ts @@ -0,0 +1,97 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export class SDKValidationError extends Error { + /** + * The raw value that failed validation. + */ + public readonly rawValue: unknown; + + /** + * The raw message that failed validation. + */ + public readonly rawMessage: unknown; + + constructor(message: string, cause: unknown, rawValue: unknown) { + super(`${message}: ${cause}`); + this.name = "SDKValidationError"; + this.cause = cause; + this.rawValue = rawValue; + this.rawMessage = message; + } + + /** + * 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(); + } + } +} + +export function formatZodError(err: z.ZodError, level = 0): string { + let pre = " ".repeat(level); + pre = level > 0 ? `│${pre}` : pre; + pre += " ".repeat(level); + + let message = ""; + const append = (str: string) => (message += `\n${pre}${str}`); + + const len = err.issues.length; + const headline = len === 1 ? `${len} issue found` : `${len} issues found`; + + if (len) { + append(`┌ ${headline}:`); + } + + for (const issue of err.issues) { + let path = issue.path.join("."); + path = path ? `.${path}` : ""; + append(`│ • [${path}]: ${issue.message} (${issue.code})`); + switch (issue.code) { + case "invalid_literal": + case "invalid_type": { + append(`│ Want: ${issue.expected}`); + append(`│ Got: ${issue.received}`); + break; + } + case "unrecognized_keys": { + append(`│ Keys: ${issue.keys.join(", ")}`); + break; + } + case "invalid_enum_value": { + append(`│ Allowed: ${issue.options.join(", ")}`); + append(`│ Got: ${issue.received}`); + break; + } + case "invalid_union_discriminator": { + append(`│ Allowed: ${issue.options.join(", ")}`); + break; + } + case "invalid_union": { + const len = issue.unionErrors.length; + append( + `│ ✖︎ Attemped to deserialize into one of ${len} union members:`, + ); + issue.unionErrors.forEach((err, i) => { + append(`│ ✖︎ Member ${i + 1} of ${len}`); + append(`${formatZodError(err, level + 1)}`); + }); + } + } + } + + if (err.issues.length) { + append(`└─*`); + } + + return message.slice(1); +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createaccount.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createaccount.ts new file mode 100644 index 000000000..232e5c13f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createaccount.ts @@ -0,0 +1,67 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import * as shared from "../shared/index.js"; + +export type CreateAccountRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Time limit for the push operation to complete before it is timed out. + */ + timeoutInMinutes?: number | undefined; + 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(), + accountPrototype: shared.AccountPrototype$inboundSchema.optional(), +}); + +/** @internal */ +export type CreateAccountRequest$Outbound = { + companyId: string; + connectionId: string; + timeoutInMinutes?: number | undefined; + accountPrototype?: shared.AccountPrototype$Outbound | undefined; +}; + +/** @internal */ +export const CreateAccountRequest$outboundSchema: z.ZodType< + CreateAccountRequest$Outbound, + z.ZodTypeDef, + CreateAccountRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + timeoutInMinutes: z.number().int().optional(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createbankaccount.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createbankaccount.ts new file mode 100644 index 000000000..9e43a45ef --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createbankaccount.ts @@ -0,0 +1,67 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import * as shared from "../shared/index.js"; + +export type CreateBankAccountRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Time limit for the push operation to complete before it is timed out. + */ + timeoutInMinutes?: number | undefined; + bankAccountPrototype?: shared.BankAccountPrototype | 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(), + bankAccountPrototype: shared.BankAccountPrototype$inboundSchema.optional(), +}); + +/** @internal */ +export type CreateBankAccountRequest$Outbound = { + companyId: string; + connectionId: string; + timeoutInMinutes?: number | undefined; + bankAccountPrototype?: shared.BankAccountPrototype$Outbound | undefined; +}; + +/** @internal */ +export const CreateBankAccountRequest$outboundSchema: z.ZodType< + CreateBankAccountRequest$Outbound, + z.ZodTypeDef, + CreateBankAccountRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + timeoutInMinutes: z.number().int().optional(), + bankAccountPrototype: shared.BankAccountPrototype$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 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createbill.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createbill.ts new file mode 100644 index 000000000..5f16448de --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createbill.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import * as shared from "../shared/index.js"; + +export type CreateBillRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Time limit for the push operation to complete before it is timed out. + */ + timeoutInMinutes?: number | undefined; + bill?: shared.Bill | null | undefined; +}; + +/** @internal */ +export const CreateBillRequest$inboundSchema: z.ZodType< + CreateBillRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + timeoutInMinutes: z.number().int().optional(), + Bill: z.nullable(shared.Bill$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "Bill": "bill", + }); +}); + +/** @internal */ +export type CreateBillRequest$Outbound = { + companyId: string; + connectionId: string; + timeoutInMinutes?: number | undefined; + Bill?: shared.Bill$Outbound | null | undefined; +}; + +/** @internal */ +export const CreateBillRequest$outboundSchema: z.ZodType< + CreateBillRequest$Outbound, + z.ZodTypeDef, + CreateBillRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + timeoutInMinutes: z.number().int().optional(), + bill: z.nullable(shared.Bill$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + bill: "Bill", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateBillRequest$ { + /** @deprecated use `CreateBillRequest$inboundSchema` instead. */ + export const inboundSchema = CreateBillRequest$inboundSchema; + /** @deprecated use `CreateBillRequest$outboundSchema` instead. */ + export const outboundSchema = CreateBillRequest$outboundSchema; + /** @deprecated use `CreateBillRequest$Outbound` instead. */ + export type Outbound = CreateBillRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createbillcreditnote.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createbillcreditnote.ts new file mode 100644 index 000000000..05a293fba --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createbillcreditnote.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import * as shared from "../shared/index.js"; + +export type CreateBillCreditNoteRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Time limit for the push operation to complete before it is timed out. + */ + timeoutInMinutes?: number | undefined; + billCreditNote?: shared.BillCreditNote | null | undefined; +}; + +/** @internal */ +export const CreateBillCreditNoteRequest$inboundSchema: z.ZodType< + CreateBillCreditNoteRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + timeoutInMinutes: z.number().int().optional(), + BillCreditNote: z.nullable(shared.BillCreditNote$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "BillCreditNote": "billCreditNote", + }); +}); + +/** @internal */ +export type CreateBillCreditNoteRequest$Outbound = { + companyId: string; + connectionId: string; + timeoutInMinutes?: number | undefined; + BillCreditNote?: shared.BillCreditNote$Outbound | null | undefined; +}; + +/** @internal */ +export const CreateBillCreditNoteRequest$outboundSchema: z.ZodType< + CreateBillCreditNoteRequest$Outbound, + z.ZodTypeDef, + CreateBillCreditNoteRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + timeoutInMinutes: z.number().int().optional(), + billCreditNote: z.nullable(shared.BillCreditNote$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + billCreditNote: "BillCreditNote", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateBillCreditNoteRequest$ { + /** @deprecated use `CreateBillCreditNoteRequest$inboundSchema` instead. */ + export const inboundSchema = CreateBillCreditNoteRequest$inboundSchema; + /** @deprecated use `CreateBillCreditNoteRequest$outboundSchema` instead. */ + export const outboundSchema = CreateBillCreditNoteRequest$outboundSchema; + /** @deprecated use `CreateBillCreditNoteRequest$Outbound` instead. */ + export type Outbound = CreateBillCreditNoteRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createbillpayment.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createbillpayment.ts new file mode 100644 index 000000000..5323b5b75 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createbillpayment.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import * as shared from "../shared/index.js"; + +export type CreateBillPaymentRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Time limit for the push operation to complete before it is timed out. + */ + timeoutInMinutes?: number | undefined; + billPayment?: shared.BillPayment | null | undefined; +}; + +/** @internal */ +export const CreateBillPaymentRequest$inboundSchema: z.ZodType< + CreateBillPaymentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + timeoutInMinutes: z.number().int().optional(), + BillPayment: z.nullable(shared.BillPayment$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "BillPayment": "billPayment", + }); +}); + +/** @internal */ +export type CreateBillPaymentRequest$Outbound = { + companyId: string; + connectionId: string; + timeoutInMinutes?: number | undefined; + BillPayment?: shared.BillPayment$Outbound | null | undefined; +}; + +/** @internal */ +export const CreateBillPaymentRequest$outboundSchema: z.ZodType< + CreateBillPaymentRequest$Outbound, + z.ZodTypeDef, + CreateBillPaymentRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + timeoutInMinutes: z.number().int().optional(), + billPayment: z.nullable(shared.BillPayment$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + billPayment: "BillPayment", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateBillPaymentRequest$ { + /** @deprecated use `CreateBillPaymentRequest$inboundSchema` instead. */ + export const inboundSchema = CreateBillPaymentRequest$inboundSchema; + /** @deprecated use `CreateBillPaymentRequest$outboundSchema` instead. */ + export const outboundSchema = CreateBillPaymentRequest$outboundSchema; + /** @deprecated use `CreateBillPaymentRequest$Outbound` instead. */ + export type Outbound = CreateBillPaymentRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createcompany.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createcompany.ts deleted file mode 100644 index 74b819f4c..000000000 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createcompany.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../../../sdk/models/shared"; -import { AxiosResponse } from "axios"; - -export class CreateCompanyResponse extends SpeakeasyBase { - /** - * OK - */ - @SpeakeasyMetadata() - company?: shared.Company; - - /** - * HTTP response content type for this operation - */ - @SpeakeasyMetadata() - contentType: string; - - /** - * The request made is not valid. - */ - @SpeakeasyMetadata() - errorMessage?: shared.ErrorMessage; - - /** - * HTTP response status code for this operation - */ - @SpeakeasyMetadata() - statusCode: number; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SpeakeasyMetadata() - rawResponse: AxiosResponse; -} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createconnection.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createconnection.ts index 8b8baf146..ae3d8b6fe 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createconnection.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createconnection.ts @@ -1,60 +1,106 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../../../sdk/models/shared"; -import { AxiosResponse } from "axios"; -import { Expose } from "class-transformer"; - -export class CreateConnectionRequestBody extends SpeakeasyBase { - /** - * 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. - */ - @SpeakeasyMetadata() - @Expose({ name: "platformKey" }) - platformKey?: string; -} +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; + +export type CreateConnectionRequestBody = { + /** + * 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. + */ + platformKey?: string | undefined; +}; + +export type CreateConnectionRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + 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; +}; -export class CreateConnectionRequest extends SpeakeasyBase { - @SpeakeasyMetadata({ data: "request, media_type=application/json" }) - requestBody?: CreateConnectionRequestBody; +/** @internal */ +export const CreateConnectionRequestBody$outboundSchema: z.ZodType< + CreateConnectionRequestBody$Outbound, + z.ZodTypeDef, + CreateConnectionRequestBody +> = z.object({ + platformKey: z.string().optional(), +}); - /** - * Unique identifier for a company. - */ - @SpeakeasyMetadata({ data: "pathParam, style=simple;explode=false;name=companyId" }) - companyId: string; +/** + * @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 class CreateConnectionResponse extends SpeakeasyBase { - /** - * OK - */ - @SpeakeasyMetadata() - connection?: shared.Connection; - - /** - * HTTP response content type for this operation - */ - @SpeakeasyMetadata() - contentType: string; - - /** - * Your API request was not properly authorized. - */ - @SpeakeasyMetadata() - errorMessage?: shared.ErrorMessage; - - /** - * HTTP response status code for this operation - */ - @SpeakeasyMetadata() - statusCode: number; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SpeakeasyMetadata() - rawResponse: AxiosResponse; +/** @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; + RequestBody?: CreateConnectionRequestBody$Outbound | undefined; +}; + +/** @internal */ +export const CreateConnectionRequest$outboundSchema: z.ZodType< + CreateConnectionRequest$Outbound, + z.ZodTypeDef, + CreateConnectionRequest +> = z.object({ + companyId: z.string(), + requestBody: z.lazy(() => CreateConnectionRequestBody$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); + +/** + * @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createjournal.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createjournal.ts new file mode 100644 index 000000000..22aca2817 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createjournal.ts @@ -0,0 +1,67 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import * as shared from "../shared/index.js"; + +export type CreateJournalRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Time limit for the push operation to complete before it is timed out. + */ + timeoutInMinutes?: number | undefined; + journalPrototype?: shared.JournalPrototype | undefined; +}; + +/** @internal */ +export const CreateJournalRequest$inboundSchema: z.ZodType< + CreateJournalRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + timeoutInMinutes: z.number().int().optional(), + journalPrototype: shared.JournalPrototype$inboundSchema.optional(), +}); + +/** @internal */ +export type CreateJournalRequest$Outbound = { + companyId: string; + connectionId: string; + timeoutInMinutes?: number | undefined; + journalPrototype?: shared.JournalPrototype$Outbound | undefined; +}; + +/** @internal */ +export const CreateJournalRequest$outboundSchema: z.ZodType< + CreateJournalRequest$Outbound, + z.ZodTypeDef, + CreateJournalRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + timeoutInMinutes: z.number().int().optional(), + journalPrototype: shared.JournalPrototype$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 CreateJournalRequest$ { + /** @deprecated use `CreateJournalRequest$inboundSchema` instead. */ + export const inboundSchema = CreateJournalRequest$inboundSchema; + /** @deprecated use `CreateJournalRequest$outboundSchema` instead. */ + export const outboundSchema = CreateJournalRequest$outboundSchema; + /** @deprecated use `CreateJournalRequest$Outbound` instead. */ + export type Outbound = CreateJournalRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createjournalentry.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createjournalentry.ts new file mode 100644 index 000000000..c894e80e9 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createjournalentry.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import * as shared from "../shared/index.js"; + +export type CreateJournalEntryRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Time limit for the push operation to complete before it is timed out. + */ + timeoutInMinutes?: number | undefined; + journalEntry?: shared.JournalEntry | null | undefined; +}; + +/** @internal */ +export const CreateJournalEntryRequest$inboundSchema: z.ZodType< + CreateJournalEntryRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + timeoutInMinutes: z.number().int().optional(), + JournalEntry: z.nullable(shared.JournalEntry$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "JournalEntry": "journalEntry", + }); +}); + +/** @internal */ +export type CreateJournalEntryRequest$Outbound = { + companyId: string; + connectionId: string; + timeoutInMinutes?: number | undefined; + JournalEntry?: shared.JournalEntry$Outbound | null | undefined; +}; + +/** @internal */ +export const CreateJournalEntryRequest$outboundSchema: z.ZodType< + CreateJournalEntryRequest$Outbound, + z.ZodTypeDef, + CreateJournalEntryRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + timeoutInMinutes: z.number().int().optional(), + journalEntry: z.nullable(shared.JournalEntry$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + journalEntry: "JournalEntry", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateJournalEntryRequest$ { + /** @deprecated use `CreateJournalEntryRequest$inboundSchema` instead. */ + export const inboundSchema = CreateJournalEntryRequest$inboundSchema; + /** @deprecated use `CreateJournalEntryRequest$outboundSchema` instead. */ + export const outboundSchema = CreateJournalEntryRequest$outboundSchema; + /** @deprecated use `CreateJournalEntryRequest$Outbound` instead. */ + export type Outbound = CreateJournalEntryRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createsupplier.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createsupplier.ts new file mode 100644 index 000000000..8d4bc1410 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/createsupplier.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import * as shared from "../shared/index.js"; + +export type CreateSupplierRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Time limit for the push operation to complete before it is timed out. + */ + timeoutInMinutes?: number | undefined; + 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(), + Supplier: z.nullable(shared.Supplier$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "Supplier": "supplier", + }); +}); + +/** @internal */ +export type CreateSupplierRequest$Outbound = { + companyId: string; + connectionId: string; + timeoutInMinutes?: number | undefined; + Supplier?: shared.Supplier$Outbound | null | undefined; +}; + +/** @internal */ +export const CreateSupplierRequest$outboundSchema: z.ZodType< + CreateSupplierRequest$Outbound, + z.ZodTypeDef, + CreateSupplierRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + timeoutInMinutes: z.number().int().optional(), + supplier: z.nullable(shared.Supplier$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + supplier: "Supplier", + }); +}); + +/** + * @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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deletebill.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deletebill.ts new file mode 100644 index 000000000..b4deffbf6 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deletebill.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type DeleteBillRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Unique identifier for a bill. + */ + billId: string; +}; + +/** @internal */ +export const DeleteBillRequest$inboundSchema: z.ZodType< + DeleteBillRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billId: z.string(), +}); + +/** @internal */ +export type DeleteBillRequest$Outbound = { + companyId: string; + connectionId: string; + billId: string; +}; + +/** @internal */ +export const DeleteBillRequest$outboundSchema: z.ZodType< + DeleteBillRequest$Outbound, + z.ZodTypeDef, + DeleteBillRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billId: 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 DeleteBillRequest$ { + /** @deprecated use `DeleteBillRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteBillRequest$inboundSchema; + /** @deprecated use `DeleteBillRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteBillRequest$outboundSchema; + /** @deprecated use `DeleteBillRequest$Outbound` instead. */ + export type Outbound = DeleteBillRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deletebillattachment.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deletebillattachment.ts new file mode 100644 index 000000000..13420a6f1 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deletebillattachment.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type DeleteBillAttachmentRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Unique identifier for a bill. + */ + billId: string; + /** + * Unique identifier for an attachment. + */ + attachmentId: string; +}; + +/** @internal */ +export const DeleteBillAttachmentRequest$inboundSchema: z.ZodType< + DeleteBillAttachmentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billId: z.string(), + attachmentId: z.string(), +}); + +/** @internal */ +export type DeleteBillAttachmentRequest$Outbound = { + companyId: string; + connectionId: string; + billId: string; + attachmentId: string; +}; + +/** @internal */ +export const DeleteBillAttachmentRequest$outboundSchema: z.ZodType< + DeleteBillAttachmentRequest$Outbound, + z.ZodTypeDef, + DeleteBillAttachmentRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billId: z.string(), + attachmentId: 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 DeleteBillAttachmentRequest$ { + /** @deprecated use `DeleteBillAttachmentRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteBillAttachmentRequest$inboundSchema; + /** @deprecated use `DeleteBillAttachmentRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteBillAttachmentRequest$outboundSchema; + /** @deprecated use `DeleteBillAttachmentRequest$Outbound` instead. */ + export type Outbound = DeleteBillAttachmentRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deletebillpayment.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deletebillpayment.ts new file mode 100644 index 000000000..00dd4d73c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deletebillpayment.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type DeleteBillPaymentRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Unique identifier for a bill payment. + */ + billPaymentId: string; +}; + +/** @internal */ +export const DeleteBillPaymentRequest$inboundSchema: z.ZodType< + DeleteBillPaymentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billPaymentId: z.string(), +}); + +/** @internal */ +export type DeleteBillPaymentRequest$Outbound = { + companyId: string; + connectionId: string; + billPaymentId: string; +}; + +/** @internal */ +export const DeleteBillPaymentRequest$outboundSchema: z.ZodType< + DeleteBillPaymentRequest$Outbound, + z.ZodTypeDef, + DeleteBillPaymentRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billPaymentId: 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 DeleteBillPaymentRequest$ { + /** @deprecated use `DeleteBillPaymentRequest$inboundSchema` instead. */ + export const inboundSchema = DeleteBillPaymentRequest$inboundSchema; + /** @deprecated use `DeleteBillPaymentRequest$outboundSchema` instead. */ + export const outboundSchema = DeleteBillPaymentRequest$outboundSchema; + /** @deprecated use `DeleteBillPaymentRequest$Outbound` instead. */ + export type Outbound = DeleteBillPaymentRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deletecompany.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deletecompany.ts index 4ded139e9..150689b35 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deletecompany.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deletecompany.ts @@ -1,41 +1,48 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../../../sdk/models/shared"; -import { AxiosResponse } from "axios"; +import * as z from "zod"; -export class DeleteCompanyRequest extends SpeakeasyBase { - /** - * Unique identifier for a company. - */ - @SpeakeasyMetadata({ data: "pathParam, style=simple;explode=false;name=companyId" }) - companyId: string; -} +export type DeleteCompanyRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; +}; -export class DeleteCompanyResponse extends SpeakeasyBase { - /** - * HTTP response content type for this operation - */ - @SpeakeasyMetadata() - contentType: string; +/** @internal */ +export const DeleteCompanyRequest$inboundSchema: z.ZodType< + DeleteCompanyRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), +}); - /** - * Your API request was not properly authorized. - */ - @SpeakeasyMetadata() - errorMessage?: shared.ErrorMessage; +/** @internal */ +export type DeleteCompanyRequest$Outbound = { + companyId: string; +}; - /** - * HTTP response status code for this operation - */ - @SpeakeasyMetadata() - statusCode: number; +/** @internal */ +export const DeleteCompanyRequest$outboundSchema: z.ZodType< + DeleteCompanyRequest$Outbound, + z.ZodTypeDef, + DeleteCompanyRequest +> = z.object({ + companyId: z.string(), +}); - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SpeakeasyMetadata() - rawResponse: AxiosResponse; +/** + * @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deleteconnection.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deleteconnection.ts index 32528870a..fa1ceb1b7 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deleteconnection.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/deleteconnection.ts @@ -1,47 +1,55 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../../../sdk/models/shared"; -import { AxiosResponse } from "axios"; +import * as z from "zod"; -export class DeleteConnectionRequest extends SpeakeasyBase { - /** - * Unique identifier for a company. - */ - @SpeakeasyMetadata({ data: "pathParam, style=simple;explode=false;name=companyId" }) - companyId: string; +export type DeleteConnectionRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; +}; - /** - * Unique identifier for a connection. - */ - @SpeakeasyMetadata({ data: "pathParam, style=simple;explode=false;name=connectionId" }) - connectionId: string; -} - -export class DeleteConnectionResponse extends SpeakeasyBase { - /** - * HTTP response content type for this operation - */ - @SpeakeasyMetadata() - contentType: string; +/** @internal */ +export const DeleteConnectionRequest$inboundSchema: z.ZodType< + DeleteConnectionRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), +}); - /** - * Your API request was not properly authorized. - */ - @SpeakeasyMetadata() - errorMessage?: shared.ErrorMessage; +/** @internal */ +export type DeleteConnectionRequest$Outbound = { + companyId: string; + connectionId: string; +}; - /** - * HTTP response status code for this operation - */ - @SpeakeasyMetadata() - statusCode: number; +/** @internal */ +export const DeleteConnectionRequest$outboundSchema: z.ZodType< + DeleteConnectionRequest$Outbound, + z.ZodTypeDef, + DeleteConnectionRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), +}); - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SpeakeasyMetadata() - rawResponse: AxiosResponse; +/** + * @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/downloadbillattachment.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/downloadbillattachment.ts new file mode 100644 index 000000000..a7c453bff --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/downloadbillattachment.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type DownloadBillAttachmentRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Unique identifier for a bill. + */ + billId: string; + /** + * Unique identifier for an attachment. + */ + attachmentId: string; +}; + +/** @internal */ +export const DownloadBillAttachmentRequest$inboundSchema: z.ZodType< + DownloadBillAttachmentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billId: z.string(), + attachmentId: z.string(), +}); + +/** @internal */ +export type DownloadBillAttachmentRequest$Outbound = { + companyId: string; + connectionId: string; + billId: string; + attachmentId: string; +}; + +/** @internal */ +export const DownloadBillAttachmentRequest$outboundSchema: z.ZodType< + DownloadBillAttachmentRequest$Outbound, + z.ZodTypeDef, + DownloadBillAttachmentRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billId: z.string(), + attachmentId: 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 DownloadBillAttachmentRequest$ { + /** @deprecated use `DownloadBillAttachmentRequest$inboundSchema` instead. */ + export const inboundSchema = DownloadBillAttachmentRequest$inboundSchema; + /** @deprecated use `DownloadBillAttachmentRequest$outboundSchema` instead. */ + export const outboundSchema = DownloadBillAttachmentRequest$outboundSchema; + /** @deprecated use `DownloadBillAttachmentRequest$Outbound` instead. */ + export type Outbound = DownloadBillAttachmentRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getaccount.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getaccount.ts new file mode 100644 index 000000000..ccdb8a830 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getaccount.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetAccountRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for an account. + */ + accountId: string; +}; + +/** @internal */ +export const GetAccountRequest$inboundSchema: z.ZodType< + GetAccountRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + accountId: z.string(), +}); + +/** @internal */ +export type GetAccountRequest$Outbound = { + companyId: string; + accountId: string; +}; + +/** @internal */ +export const GetAccountRequest$outboundSchema: z.ZodType< + GetAccountRequest$Outbound, + z.ZodTypeDef, + GetAccountRequest +> = z.object({ + companyId: z.string(), + accountId: 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 GetAccountRequest$ { + /** @deprecated use `GetAccountRequest$inboundSchema` instead. */ + export const inboundSchema = GetAccountRequest$inboundSchema; + /** @deprecated use `GetAccountRequest$outboundSchema` instead. */ + export const outboundSchema = GetAccountRequest$outboundSchema; + /** @deprecated use `GetAccountRequest$Outbound` instead. */ + export type Outbound = GetAccountRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getaccountingprofile.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getaccountingprofile.ts new file mode 100644 index 000000000..41561f874 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getaccountingprofile.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetAccountingProfileRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; +}; + +/** @internal */ +export const GetAccountingProfileRequest$inboundSchema: z.ZodType< + GetAccountingProfileRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), +}); + +/** @internal */ +export type GetAccountingProfileRequest$Outbound = { + companyId: string; +}; + +/** @internal */ +export const GetAccountingProfileRequest$outboundSchema: z.ZodType< + GetAccountingProfileRequest$Outbound, + z.ZodTypeDef, + GetAccountingProfileRequest +> = z.object({ + 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 GetAccountingProfileRequest$ { + /** @deprecated use `GetAccountingProfileRequest$inboundSchema` instead. */ + export const inboundSchema = GetAccountingProfileRequest$inboundSchema; + /** @deprecated use `GetAccountingProfileRequest$outboundSchema` instead. */ + export const outboundSchema = GetAccountingProfileRequest$outboundSchema; + /** @deprecated use `GetAccountingProfileRequest$Outbound` instead. */ + export type Outbound = GetAccountingProfileRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getbill.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getbill.ts new file mode 100644 index 000000000..d04e9bb07 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getbill.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetBillRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a bill. + */ + billId: string; +}; + +/** @internal */ +export const GetBillRequest$inboundSchema: z.ZodType< + GetBillRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + billId: z.string(), +}); + +/** @internal */ +export type GetBillRequest$Outbound = { + companyId: string; + billId: string; +}; + +/** @internal */ +export const GetBillRequest$outboundSchema: z.ZodType< + GetBillRequest$Outbound, + z.ZodTypeDef, + GetBillRequest +> = z.object({ + companyId: z.string(), + billId: 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 GetBillRequest$ { + /** @deprecated use `GetBillRequest$inboundSchema` instead. */ + export const inboundSchema = GetBillRequest$inboundSchema; + /** @deprecated use `GetBillRequest$outboundSchema` instead. */ + export const outboundSchema = GetBillRequest$outboundSchema; + /** @deprecated use `GetBillRequest$Outbound` instead. */ + export type Outbound = GetBillRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getbillattachment.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getbillattachment.ts new file mode 100644 index 000000000..d9cd6948f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getbillattachment.ts @@ -0,0 +1,69 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetBillAttachmentRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Unique identifier for a bill. + */ + billId: string; + /** + * Unique identifier for an attachment. + */ + attachmentId: string; +}; + +/** @internal */ +export const GetBillAttachmentRequest$inboundSchema: z.ZodType< + GetBillAttachmentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billId: z.string(), + attachmentId: z.string(), +}); + +/** @internal */ +export type GetBillAttachmentRequest$Outbound = { + companyId: string; + connectionId: string; + billId: string; + attachmentId: string; +}; + +/** @internal */ +export const GetBillAttachmentRequest$outboundSchema: z.ZodType< + GetBillAttachmentRequest$Outbound, + z.ZodTypeDef, + GetBillAttachmentRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billId: z.string(), + attachmentId: 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 GetBillAttachmentRequest$ { + /** @deprecated use `GetBillAttachmentRequest$inboundSchema` instead. */ + export const inboundSchema = GetBillAttachmentRequest$inboundSchema; + /** @deprecated use `GetBillAttachmentRequest$outboundSchema` instead. */ + export const outboundSchema = GetBillAttachmentRequest$outboundSchema; + /** @deprecated use `GetBillAttachmentRequest$Outbound` instead. */ + export type Outbound = GetBillAttachmentRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getbillcreditnote.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getbillcreditnote.ts new file mode 100644 index 000000000..1643fe89a --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getbillcreditnote.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetBillCreditNoteRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a bill credit note. + */ + billCreditNoteId: string; +}; + +/** @internal */ +export const GetBillCreditNoteRequest$inboundSchema: z.ZodType< + GetBillCreditNoteRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + billCreditNoteId: z.string(), +}); + +/** @internal */ +export type GetBillCreditNoteRequest$Outbound = { + companyId: string; + billCreditNoteId: string; +}; + +/** @internal */ +export const GetBillCreditNoteRequest$outboundSchema: z.ZodType< + GetBillCreditNoteRequest$Outbound, + z.ZodTypeDef, + GetBillCreditNoteRequest +> = z.object({ + companyId: z.string(), + billCreditNoteId: 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 GetBillCreditNoteRequest$ { + /** @deprecated use `GetBillCreditNoteRequest$inboundSchema` instead. */ + export const inboundSchema = GetBillCreditNoteRequest$inboundSchema; + /** @deprecated use `GetBillCreditNoteRequest$outboundSchema` instead. */ + export const outboundSchema = GetBillCreditNoteRequest$outboundSchema; + /** @deprecated use `GetBillCreditNoteRequest$Outbound` instead. */ + export type Outbound = GetBillCreditNoteRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getbillpayments.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getbillpayments.ts new file mode 100644 index 000000000..6fb65643b --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getbillpayments.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetBillPaymentsRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a bill payment. + */ + billPaymentId: string; +}; + +/** @internal */ +export const GetBillPaymentsRequest$inboundSchema: z.ZodType< + GetBillPaymentsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + billPaymentId: z.string(), +}); + +/** @internal */ +export type GetBillPaymentsRequest$Outbound = { + companyId: string; + billPaymentId: string; +}; + +/** @internal */ +export const GetBillPaymentsRequest$outboundSchema: z.ZodType< + GetBillPaymentsRequest$Outbound, + z.ZodTypeDef, + GetBillPaymentsRequest +> = z.object({ + companyId: z.string(), + billPaymentId: 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 GetBillPaymentsRequest$ { + /** @deprecated use `GetBillPaymentsRequest$inboundSchema` instead. */ + export const inboundSchema = GetBillPaymentsRequest$inboundSchema; + /** @deprecated use `GetBillPaymentsRequest$outboundSchema` instead. */ + export const outboundSchema = GetBillPaymentsRequest$outboundSchema; + /** @deprecated use `GetBillPaymentsRequest$Outbound` instead. */ + export type Outbound = GetBillPaymentsRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcompany.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcompany.ts index facf51b5a..d1f16062b 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcompany.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcompany.ts @@ -1,47 +1,48 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../../../sdk/models/shared"; -import { AxiosResponse } from "axios"; +import * as z from "zod"; -export class GetCompanyRequest extends SpeakeasyBase { - /** - * Unique identifier for a company. - */ - @SpeakeasyMetadata({ data: "pathParam, style=simple;explode=false;name=companyId" }) - companyId: string; -} - -export class GetCompanyResponse extends SpeakeasyBase { - /** - * OK - */ - @SpeakeasyMetadata() - company?: shared.Company; +export type GetCompanyRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; +}; - /** - * HTTP response content type for this operation - */ - @SpeakeasyMetadata() - contentType: string; +/** @internal */ +export const GetCompanyRequest$inboundSchema: z.ZodType< + GetCompanyRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), +}); - /** - * Your API request was not properly authorized. - */ - @SpeakeasyMetadata() - errorMessage?: shared.ErrorMessage; +/** @internal */ +export type GetCompanyRequest$Outbound = { + companyId: string; +}; - /** - * HTTP response status code for this operation - */ - @SpeakeasyMetadata() - statusCode: number; +/** @internal */ +export const GetCompanyRequest$outboundSchema: z.ZodType< + GetCompanyRequest$Outbound, + z.ZodTypeDef, + GetCompanyRequest +> = z.object({ + companyId: z.string(), +}); - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SpeakeasyMetadata() - rawResponse: AxiosResponse; +/** + * @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getconnection.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getconnection.ts index be017c8dd..f3bf95545 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getconnection.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getconnection.ts @@ -1,53 +1,55 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../../../sdk/models/shared"; -import { AxiosResponse } from "axios"; - -export class GetConnectionRequest extends SpeakeasyBase { - /** - * Unique identifier for a company. - */ - @SpeakeasyMetadata({ data: "pathParam, style=simple;explode=false;name=companyId" }) - companyId: string; - - /** - * Unique identifier for a connection. - */ - @SpeakeasyMetadata({ data: "pathParam, style=simple;explode=false;name=connectionId" }) - connectionId: string; -} - -export class GetConnectionResponse extends SpeakeasyBase { - /** - * OK - */ - @SpeakeasyMetadata() - connection?: shared.Connection; - - /** - * HTTP response content type for this operation - */ - @SpeakeasyMetadata() - contentType: string; - - /** - * Your API request was not properly authorized. - */ - @SpeakeasyMetadata() - errorMessage?: shared.ErrorMessage; - - /** - * HTTP response status code for this operation - */ - @SpeakeasyMetadata() - statusCode: number; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SpeakeasyMetadata() - rawResponse: AxiosResponse; +import * as z from "zod"; + +export type GetConnectionRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + 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; + connectionId: string; +}; + +/** @internal */ +export const GetConnectionRequest$outboundSchema: z.ZodType< + GetConnectionRequest$Outbound, + z.ZodTypeDef, + GetConnectionRequest +> = z.object({ + companyId: z.string(), + 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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreateaccountmodel.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreateaccountmodel.ts new file mode 100644 index 000000000..5669de9ea --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreateaccountmodel.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetCreateAccountModelRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; +}; + +/** @internal */ +export const GetCreateAccountModelRequest$inboundSchema: z.ZodType< + GetCreateAccountModelRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), +}); + +/** @internal */ +export type GetCreateAccountModelRequest$Outbound = { + companyId: string; + connectionId: string; +}; + +/** @internal */ +export const GetCreateAccountModelRequest$outboundSchema: z.ZodType< + GetCreateAccountModelRequest$Outbound, + z.ZodTypeDef, + GetCreateAccountModelRequest +> = z.object({ + companyId: z.string(), + 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 GetCreateAccountModelRequest$ { + /** @deprecated use `GetCreateAccountModelRequest$inboundSchema` instead. */ + export const inboundSchema = GetCreateAccountModelRequest$inboundSchema; + /** @deprecated use `GetCreateAccountModelRequest$outboundSchema` instead. */ + export const outboundSchema = GetCreateAccountModelRequest$outboundSchema; + /** @deprecated use `GetCreateAccountModelRequest$Outbound` instead. */ + export type Outbound = GetCreateAccountModelRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreatebankaccountsmodel.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreatebankaccountsmodel.ts new file mode 100644 index 000000000..70a6cc9d4 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreatebankaccountsmodel.ts @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetCreateBankAccountsModelRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + 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; + connectionId: string; +}; + +/** @internal */ +export const GetCreateBankAccountsModelRequest$outboundSchema: z.ZodType< + GetCreateBankAccountsModelRequest$Outbound, + z.ZodTypeDef, + GetCreateBankAccountsModelRequest +> = z.object({ + companyId: z.string(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreatebillpaymentmodel.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreatebillpaymentmodel.ts new file mode 100644 index 000000000..aab8ed59c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreatebillpaymentmodel.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetCreateBillPaymentModelRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; +}; + +/** @internal */ +export const GetCreateBillPaymentModelRequest$inboundSchema: z.ZodType< + GetCreateBillPaymentModelRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), +}); + +/** @internal */ +export type GetCreateBillPaymentModelRequest$Outbound = { + companyId: string; + connectionId: string; +}; + +/** @internal */ +export const GetCreateBillPaymentModelRequest$outboundSchema: z.ZodType< + GetCreateBillPaymentModelRequest$Outbound, + z.ZodTypeDef, + GetCreateBillPaymentModelRequest +> = z.object({ + companyId: z.string(), + 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 GetCreateBillPaymentModelRequest$ { + /** @deprecated use `GetCreateBillPaymentModelRequest$inboundSchema` instead. */ + export const inboundSchema = GetCreateBillPaymentModelRequest$inboundSchema; + /** @deprecated use `GetCreateBillPaymentModelRequest$outboundSchema` instead. */ + export const outboundSchema = GetCreateBillPaymentModelRequest$outboundSchema; + /** @deprecated use `GetCreateBillPaymentModelRequest$Outbound` instead. */ + export type Outbound = GetCreateBillPaymentModelRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreatejournalentrymodel.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreatejournalentrymodel.ts new file mode 100644 index 000000000..42ddef94d --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreatejournalentrymodel.ts @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetCreateJournalEntryModelRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; +}; + +/** @internal */ +export const GetCreateJournalEntryModelRequest$inboundSchema: z.ZodType< + GetCreateJournalEntryModelRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), +}); + +/** @internal */ +export type GetCreateJournalEntryModelRequest$Outbound = { + companyId: string; + connectionId: string; +}; + +/** @internal */ +export const GetCreateJournalEntryModelRequest$outboundSchema: z.ZodType< + GetCreateJournalEntryModelRequest$Outbound, + z.ZodTypeDef, + GetCreateJournalEntryModelRequest +> = z.object({ + companyId: z.string(), + 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 GetCreateJournalEntryModelRequest$ { + /** @deprecated use `GetCreateJournalEntryModelRequest$inboundSchema` instead. */ + export const inboundSchema = GetCreateJournalEntryModelRequest$inboundSchema; + /** @deprecated use `GetCreateJournalEntryModelRequest$outboundSchema` instead. */ + export const outboundSchema = + GetCreateJournalEntryModelRequest$outboundSchema; + /** @deprecated use `GetCreateJournalEntryModelRequest$Outbound` instead. */ + export type Outbound = GetCreateJournalEntryModelRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreatejournalmodel.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreatejournalmodel.ts new file mode 100644 index 000000000..c2d7bbf86 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreatejournalmodel.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetCreateJournalModelRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; +}; + +/** @internal */ +export const GetCreateJournalModelRequest$inboundSchema: z.ZodType< + GetCreateJournalModelRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), +}); + +/** @internal */ +export type GetCreateJournalModelRequest$Outbound = { + companyId: string; + connectionId: string; +}; + +/** @internal */ +export const GetCreateJournalModelRequest$outboundSchema: z.ZodType< + GetCreateJournalModelRequest$Outbound, + z.ZodTypeDef, + GetCreateJournalModelRequest +> = z.object({ + companyId: z.string(), + 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 GetCreateJournalModelRequest$ { + /** @deprecated use `GetCreateJournalModelRequest$inboundSchema` instead. */ + export const inboundSchema = GetCreateJournalModelRequest$inboundSchema; + /** @deprecated use `GetCreateJournalModelRequest$outboundSchema` instead. */ + export const outboundSchema = GetCreateJournalModelRequest$outboundSchema; + /** @deprecated use `GetCreateJournalModelRequest$Outbound` instead. */ + export type Outbound = GetCreateJournalModelRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreateupdatebillcreditnotemodel.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreateupdatebillcreditnotemodel.ts new file mode 100644 index 000000000..c2eba6e54 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreateupdatebillcreditnotemodel.ts @@ -0,0 +1,58 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetCreateUpdateBillCreditNoteModelRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; +}; + +/** @internal */ +export const GetCreateUpdateBillCreditNoteModelRequest$inboundSchema: z.ZodType< + GetCreateUpdateBillCreditNoteModelRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), +}); + +/** @internal */ +export type GetCreateUpdateBillCreditNoteModelRequest$Outbound = { + companyId: string; + connectionId: string; +}; + +/** @internal */ +export const GetCreateUpdateBillCreditNoteModelRequest$outboundSchema: + z.ZodType< + GetCreateUpdateBillCreditNoteModelRequest$Outbound, + z.ZodTypeDef, + GetCreateUpdateBillCreditNoteModelRequest + > = z.object({ + companyId: z.string(), + 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 GetCreateUpdateBillCreditNoteModelRequest$ { + /** @deprecated use `GetCreateUpdateBillCreditNoteModelRequest$inboundSchema` instead. */ + export const inboundSchema = + GetCreateUpdateBillCreditNoteModelRequest$inboundSchema; + /** @deprecated use `GetCreateUpdateBillCreditNoteModelRequest$outboundSchema` instead. */ + export const outboundSchema = + GetCreateUpdateBillCreditNoteModelRequest$outboundSchema; + /** @deprecated use `GetCreateUpdateBillCreditNoteModelRequest$Outbound` instead. */ + export type Outbound = GetCreateUpdateBillCreditNoteModelRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreateupdatebillmodel.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreateupdatebillmodel.ts new file mode 100644 index 000000000..c3fac1bb2 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreateupdatebillmodel.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetCreateUpdateBillModelRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; +}; + +/** @internal */ +export const GetCreateUpdateBillModelRequest$inboundSchema: z.ZodType< + GetCreateUpdateBillModelRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), +}); + +/** @internal */ +export type GetCreateUpdateBillModelRequest$Outbound = { + companyId: string; + connectionId: string; +}; + +/** @internal */ +export const GetCreateUpdateBillModelRequest$outboundSchema: z.ZodType< + GetCreateUpdateBillModelRequest$Outbound, + z.ZodTypeDef, + GetCreateUpdateBillModelRequest +> = z.object({ + companyId: z.string(), + 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 GetCreateUpdateBillModelRequest$ { + /** @deprecated use `GetCreateUpdateBillModelRequest$inboundSchema` instead. */ + export const inboundSchema = GetCreateUpdateBillModelRequest$inboundSchema; + /** @deprecated use `GetCreateUpdateBillModelRequest$outboundSchema` instead. */ + export const outboundSchema = GetCreateUpdateBillModelRequest$outboundSchema; + /** @deprecated use `GetCreateUpdateBillModelRequest$Outbound` instead. */ + export type Outbound = GetCreateUpdateBillModelRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreateupdatesuppliermodel.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreateupdatesuppliermodel.ts new file mode 100644 index 000000000..7de2bf25a --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getcreateupdatesuppliermodel.ts @@ -0,0 +1,57 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetCreateUpdateSupplierModelRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; +}; + +/** @internal */ +export const GetCreateUpdateSupplierModelRequest$inboundSchema: z.ZodType< + GetCreateUpdateSupplierModelRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), +}); + +/** @internal */ +export type GetCreateUpdateSupplierModelRequest$Outbound = { + companyId: string; + connectionId: string; +}; + +/** @internal */ +export const GetCreateUpdateSupplierModelRequest$outboundSchema: z.ZodType< + GetCreateUpdateSupplierModelRequest$Outbound, + z.ZodTypeDef, + GetCreateUpdateSupplierModelRequest +> = z.object({ + companyId: z.string(), + 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 GetCreateUpdateSupplierModelRequest$ { + /** @deprecated use `GetCreateUpdateSupplierModelRequest$inboundSchema` instead. */ + export const inboundSchema = + GetCreateUpdateSupplierModelRequest$inboundSchema; + /** @deprecated use `GetCreateUpdateSupplierModelRequest$outboundSchema` instead. */ + export const outboundSchema = + GetCreateUpdateSupplierModelRequest$outboundSchema; + /** @deprecated use `GetCreateUpdateSupplierModelRequest$Outbound` instead. */ + export type Outbound = GetCreateUpdateSupplierModelRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getdatastatus.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getdatastatus.ts new file mode 100644 index 000000000..81e885671 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getdatastatus.ts @@ -0,0 +1,426 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import * as shared from "../shared/index.js"; + +export type GetDataStatusRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; +}; + +/** + * OK + */ +export type GetDataStatusDataStatuses = { + /** + * Describes the state of data in the Codat cache for a company and data type + */ + accountTransactions?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + balanceSheet?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + bankAccounts?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + bankTransactions?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + billCreditNotes?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + billPayments?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + bills?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + cashFlowStatement?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + chartOfAccounts?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + company?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + creditNotes?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + customers?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + directCosts?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + directIncomes?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + invoices?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + itemReceipts?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + items?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + journalEntries?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + journals?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + paymentMethods?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + payments?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + profitAndLoss?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + purchaseOrders?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + salesOrders?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + suppliers?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + taxRates?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + trackingCategories?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + transfers?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + bankingAccountBalances?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + bankingAccounts?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + bankingTransactionCategories?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + bankingTransactions?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + commerceCompanyInfo?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + commerceCustomers?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + commerceDisputes?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + commerceLocations?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + commerceOrders?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + commercePaymentMethods?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + commercePayments?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + commerceProductCategories?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + commerceProducts?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + commerceTaxComponents?: shared.DataStatus | undefined; + /** + * Describes the state of data in the Codat cache for a company and data type + */ + 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; +}; + +/** @internal */ +export const GetDataStatusRequest$outboundSchema: z.ZodType< + GetDataStatusRequest$Outbound, + z.ZodTypeDef, + GetDataStatusRequest +> = z.object({ + 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; +} + +/** @internal */ +export const GetDataStatusDataStatuses$inboundSchema: z.ZodType< + GetDataStatusDataStatuses, + z.ZodTypeDef, + unknown +> = z.object({ + accountTransactions: shared.DataStatus$inboundSchema.optional(), + balanceSheet: shared.DataStatus$inboundSchema.optional(), + bankAccounts: shared.DataStatus$inboundSchema.optional(), + bankTransactions: shared.DataStatus$inboundSchema.optional(), + billCreditNotes: shared.DataStatus$inboundSchema.optional(), + billPayments: shared.DataStatus$inboundSchema.optional(), + bills: shared.DataStatus$inboundSchema.optional(), + cashFlowStatement: shared.DataStatus$inboundSchema.optional(), + chartOfAccounts: shared.DataStatus$inboundSchema.optional(), + company: shared.DataStatus$inboundSchema.optional(), + creditNotes: shared.DataStatus$inboundSchema.optional(), + customers: shared.DataStatus$inboundSchema.optional(), + directCosts: shared.DataStatus$inboundSchema.optional(), + directIncomes: shared.DataStatus$inboundSchema.optional(), + invoices: shared.DataStatus$inboundSchema.optional(), + itemReceipts: shared.DataStatus$inboundSchema.optional(), + items: shared.DataStatus$inboundSchema.optional(), + journalEntries: shared.DataStatus$inboundSchema.optional(), + journals: shared.DataStatus$inboundSchema.optional(), + paymentMethods: shared.DataStatus$inboundSchema.optional(), + payments: shared.DataStatus$inboundSchema.optional(), + profitAndLoss: shared.DataStatus$inboundSchema.optional(), + purchaseOrders: shared.DataStatus$inboundSchema.optional(), + salesOrders: shared.DataStatus$inboundSchema.optional(), + suppliers: shared.DataStatus$inboundSchema.optional(), + taxRates: shared.DataStatus$inboundSchema.optional(), + trackingCategories: shared.DataStatus$inboundSchema.optional(), + transfers: shared.DataStatus$inboundSchema.optional(), + "banking-accountBalances": shared.DataStatus$inboundSchema.optional(), + "banking-accounts": shared.DataStatus$inboundSchema.optional(), + "banking-transactionCategories": shared.DataStatus$inboundSchema.optional(), + "banking-transactions": shared.DataStatus$inboundSchema.optional(), + "commerce-companyInfo": shared.DataStatus$inboundSchema.optional(), + "commerce-customers": shared.DataStatus$inboundSchema.optional(), + "commerce-disputes": shared.DataStatus$inboundSchema.optional(), + "commerce-locations": shared.DataStatus$inboundSchema.optional(), + "commerce-orders": shared.DataStatus$inboundSchema.optional(), + "commerce-paymentMethods": shared.DataStatus$inboundSchema.optional(), + "commerce-payments": shared.DataStatus$inboundSchema.optional(), + "commerce-productCategories": shared.DataStatus$inboundSchema.optional(), + "commerce-products": shared.DataStatus$inboundSchema.optional(), + "commerce-taxComponents": shared.DataStatus$inboundSchema.optional(), + "commerce-transactions": shared.DataStatus$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "banking-accountBalances": "bankingAccountBalances", + "banking-accounts": "bankingAccounts", + "banking-transactionCategories": "bankingTransactionCategories", + "banking-transactions": "bankingTransactions", + "commerce-companyInfo": "commerceCompanyInfo", + "commerce-customers": "commerceCustomers", + "commerce-disputes": "commerceDisputes", + "commerce-locations": "commerceLocations", + "commerce-orders": "commerceOrders", + "commerce-paymentMethods": "commercePaymentMethods", + "commerce-payments": "commercePayments", + "commerce-productCategories": "commerceProductCategories", + "commerce-products": "commerceProducts", + "commerce-taxComponents": "commerceTaxComponents", + "commerce-transactions": "commerceTransactions", + }); +}); + +/** @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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getjournal.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getjournal.ts new file mode 100644 index 000000000..36f762ff1 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getjournal.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetJournalRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a journal. + */ + journalId: string; +}; + +/** @internal */ +export const GetJournalRequest$inboundSchema: z.ZodType< + GetJournalRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + journalId: z.string(), +}); + +/** @internal */ +export type GetJournalRequest$Outbound = { + companyId: string; + journalId: string; +}; + +/** @internal */ +export const GetJournalRequest$outboundSchema: z.ZodType< + GetJournalRequest$Outbound, + z.ZodTypeDef, + GetJournalRequest +> = z.object({ + companyId: z.string(), + journalId: 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 GetJournalRequest$ { + /** @deprecated use `GetJournalRequest$inboundSchema` instead. */ + export const inboundSchema = GetJournalRequest$inboundSchema; + /** @deprecated use `GetJournalRequest$outboundSchema` instead. */ + export const outboundSchema = GetJournalRequest$outboundSchema; + /** @deprecated use `GetJournalRequest$Outbound` instead. */ + export type Outbound = GetJournalRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getpaymentmethod.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getpaymentmethod.ts new file mode 100644 index 000000000..f5881a229 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getpaymentmethod.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetPaymentMethodRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a payment method. + */ + paymentMethodId: string; +}; + +/** @internal */ +export const GetPaymentMethodRequest$inboundSchema: z.ZodType< + GetPaymentMethodRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + paymentMethodId: z.string(), +}); + +/** @internal */ +export type GetPaymentMethodRequest$Outbound = { + companyId: string; + paymentMethodId: string; +}; + +/** @internal */ +export const GetPaymentMethodRequest$outboundSchema: z.ZodType< + GetPaymentMethodRequest$Outbound, + z.ZodTypeDef, + GetPaymentMethodRequest +> = z.object({ + companyId: z.string(), + paymentMethodId: 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 GetPaymentMethodRequest$ { + /** @deprecated use `GetPaymentMethodRequest$inboundSchema` instead. */ + export const inboundSchema = GetPaymentMethodRequest$inboundSchema; + /** @deprecated use `GetPaymentMethodRequest$outboundSchema` instead. */ + export const outboundSchema = GetPaymentMethodRequest$outboundSchema; + /** @deprecated use `GetPaymentMethodRequest$Outbound` instead. */ + export type Outbound = GetPaymentMethodRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getpulloperation.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getpulloperation.ts new file mode 100644 index 000000000..565fc8bff --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getpulloperation.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetPullOperationRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for the dataset that completed its sync. + */ + 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; + datasetId: string; +}; + +/** @internal */ +export const GetPullOperationRequest$outboundSchema: z.ZodType< + GetPullOperationRequest$Outbound, + z.ZodTypeDef, + GetPullOperationRequest +> = z.object({ + companyId: z.string(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getpushoperation.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getpushoperation.ts new file mode 100644 index 000000000..e91791710 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getpushoperation.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetPushOperationRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Push operation key. + */ + 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; + pushOperationKey: string; +}; + +/** @internal */ +export const GetPushOperationRequest$outboundSchema: z.ZodType< + GetPushOperationRequest$Outbound, + z.ZodTypeDef, + GetPushOperationRequest +> = z.object({ + companyId: z.string(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getsupplier.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getsupplier.ts new file mode 100644 index 000000000..9d545df75 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/getsupplier.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetSupplierRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a supplier. + */ + 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; + supplierId: string; +}; + +/** @internal */ +export const GetSupplierRequest$outboundSchema: z.ZodType< + GetSupplierRequest$Outbound, + z.ZodTypeDef, + GetSupplierRequest +> = z.object({ + companyId: z.string(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/gettaxrate.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/gettaxrate.ts new file mode 100644 index 000000000..eaa0c841e --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/gettaxrate.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetTaxRateRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a tax rate. + */ + taxRateId: string; +}; + +/** @internal */ +export const GetTaxRateRequest$inboundSchema: z.ZodType< + GetTaxRateRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + taxRateId: z.string(), +}); + +/** @internal */ +export type GetTaxRateRequest$Outbound = { + companyId: string; + taxRateId: string; +}; + +/** @internal */ +export const GetTaxRateRequest$outboundSchema: z.ZodType< + GetTaxRateRequest$Outbound, + z.ZodTypeDef, + GetTaxRateRequest +> = z.object({ + companyId: z.string(), + taxRateId: 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 GetTaxRateRequest$ { + /** @deprecated use `GetTaxRateRequest$inboundSchema` instead. */ + export const inboundSchema = GetTaxRateRequest$inboundSchema; + /** @deprecated use `GetTaxRateRequest$outboundSchema` instead. */ + export const outboundSchema = GetTaxRateRequest$outboundSchema; + /** @deprecated use `GetTaxRateRequest$Outbound` instead. */ + export type Outbound = GetTaxRateRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/gettrackingcategory.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/gettrackingcategory.ts new file mode 100644 index 000000000..a6adce8b8 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/gettrackingcategory.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type GetTrackingCategoryRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a tracking category. + */ + trackingCategoryId: string; +}; + +/** @internal */ +export const GetTrackingCategoryRequest$inboundSchema: z.ZodType< + GetTrackingCategoryRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + trackingCategoryId: z.string(), +}); + +/** @internal */ +export type GetTrackingCategoryRequest$Outbound = { + companyId: string; + trackingCategoryId: string; +}; + +/** @internal */ +export const GetTrackingCategoryRequest$outboundSchema: z.ZodType< + GetTrackingCategoryRequest$Outbound, + z.ZodTypeDef, + GetTrackingCategoryRequest +> = z.object({ + companyId: z.string(), + trackingCategoryId: 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 GetTrackingCategoryRequest$ { + /** @deprecated use `GetTrackingCategoryRequest$inboundSchema` instead. */ + export const inboundSchema = GetTrackingCategoryRequest$inboundSchema; + /** @deprecated use `GetTrackingCategoryRequest$outboundSchema` instead. */ + export const outboundSchema = GetTrackingCategoryRequest$outboundSchema; + /** @deprecated use `GetTrackingCategoryRequest$Outbound` instead. */ + export type Outbound = GetTrackingCategoryRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/index.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/index.ts index 2807de6ef..784d80918 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/index.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/index.ts @@ -1,15 +1,65 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./createcompany"; -export * from "./createconnection"; -export * from "./deletecompany"; -export * from "./deleteconnection"; -export * from "./getcompany"; -export * from "./getconnection"; -export * from "./listbills"; -export * from "./listcompanies"; -export * from "./listconnections"; -export * from "./unlinkconnection"; -export * from "./updatecompany"; +export * from "./createaccount.js"; +export * from "./createbankaccount.js"; +export * from "./createbill.js"; +export * from "./createbillcreditnote.js"; +export * from "./createbillpayment.js"; +export * from "./createconnection.js"; +export * from "./createjournal.js"; +export * from "./createjournalentry.js"; +export * from "./createsupplier.js"; +export * from "./deletebill.js"; +export * from "./deletebillattachment.js"; +export * from "./deletebillpayment.js"; +export * from "./deletecompany.js"; +export * from "./deleteconnection.js"; +export * from "./downloadbillattachment.js"; +export * from "./getaccount.js"; +export * from "./getaccountingprofile.js"; +export * from "./getbill.js"; +export * from "./getbillattachment.js"; +export * from "./getbillcreditnote.js"; +export * from "./getbillpayments.js"; +export * from "./getcompany.js"; +export * from "./getconnection.js"; +export * from "./getcreateaccountmodel.js"; +export * from "./getcreatebankaccountsmodel.js"; +export * from "./getcreatebillpaymentmodel.js"; +export * from "./getcreatejournalentrymodel.js"; +export * from "./getcreatejournalmodel.js"; +export * from "./getcreateupdatebillcreditnotemodel.js"; +export * from "./getcreateupdatebillmodel.js"; +export * from "./getcreateupdatesuppliermodel.js"; +export * from "./getdatastatus.js"; +export * from "./getjournal.js"; +export * from "./getpaymentmethod.js"; +export * from "./getpulloperation.js"; +export * from "./getpushoperation.js"; +export * from "./getsupplier.js"; +export * from "./gettaxrate.js"; +export * from "./gettrackingcategory.js"; +export * from "./listaccounts.js"; +export * from "./listbillattachments.js"; +export * from "./listbillcreditnotes.js"; +export * from "./listbillpayments.js"; +export * from "./listbills.js"; +export * from "./listcompanies.js"; +export * from "./listconnections.js"; +export * from "./listjournals.js"; +export * from "./listpaymentmethods.js"; +export * from "./listpulloperations.js"; +export * from "./listpushoperations.js"; +export * from "./listsuppliers.js"; +export * from "./listtaxrates.js"; +export * from "./listtrackingcategories.js"; +export * from "./refreshalldatatypes.js"; +export * from "./refreshdatatype.js"; +export * from "./unlinkconnection.js"; +export * from "./updatebill.js"; +export * from "./updatebillcreditnote.js"; +export * from "./updatecompany.js"; +export * from "./updatesupplier.js"; +export * from "./uploadbillattachment.js"; diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listaccounts.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listaccounts.ts new file mode 100644 index 000000000..15461bca1 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listaccounts.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ListAccountsRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Page number. [Read more](https://docs.codat.io/using-the-api/paging). + */ + page?: number | undefined; + /** + * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). + */ + pageSize?: number | undefined; + /** + * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). + */ + query?: string | undefined; + /** + * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). + */ + orderBy?: string | undefined; +}; + +/** @internal */ +export const ListAccountsRequest$inboundSchema: z.ZodType< + ListAccountsRequest, + 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 ListAccountsRequest$Outbound = { + companyId: string; + page: number; + pageSize: number; + query?: string | undefined; + orderBy?: string | undefined; +}; + +/** @internal */ +export const ListAccountsRequest$outboundSchema: z.ZodType< + ListAccountsRequest$Outbound, + z.ZodTypeDef, + ListAccountsRequest +> = 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 + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListAccountsRequest$ { + /** @deprecated use `ListAccountsRequest$inboundSchema` instead. */ + export const inboundSchema = ListAccountsRequest$inboundSchema; + /** @deprecated use `ListAccountsRequest$outboundSchema` instead. */ + export const outboundSchema = ListAccountsRequest$outboundSchema; + /** @deprecated use `ListAccountsRequest$Outbound` instead. */ + export type Outbound = ListAccountsRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listbillattachments.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listbillattachments.ts new file mode 100644 index 000000000..846b79635 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listbillattachments.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ListBillAttachmentsRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Unique identifier for a bill. + */ + billId: string; +}; + +/** @internal */ +export const ListBillAttachmentsRequest$inboundSchema: z.ZodType< + ListBillAttachmentsRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billId: z.string(), +}); + +/** @internal */ +export type ListBillAttachmentsRequest$Outbound = { + companyId: string; + connectionId: string; + billId: string; +}; + +/** @internal */ +export const ListBillAttachmentsRequest$outboundSchema: z.ZodType< + ListBillAttachmentsRequest$Outbound, + z.ZodTypeDef, + ListBillAttachmentsRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billId: 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 ListBillAttachmentsRequest$ { + /** @deprecated use `ListBillAttachmentsRequest$inboundSchema` instead. */ + export const inboundSchema = ListBillAttachmentsRequest$inboundSchema; + /** @deprecated use `ListBillAttachmentsRequest$outboundSchema` instead. */ + export const outboundSchema = ListBillAttachmentsRequest$outboundSchema; + /** @deprecated use `ListBillAttachmentsRequest$Outbound` instead. */ + export type Outbound = ListBillAttachmentsRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listbillcreditnotes.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listbillcreditnotes.ts new file mode 100644 index 000000000..0f16e0524 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listbillcreditnotes.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ListBillCreditNotesRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Page number. [Read more](https://docs.codat.io/using-the-api/paging). + */ + page?: number | undefined; + /** + * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). + */ + pageSize?: number | undefined; + /** + * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). + */ + query?: string | undefined; + /** + * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). + */ + orderBy?: string | undefined; +}; + +/** @internal */ +export const ListBillCreditNotesRequest$inboundSchema: z.ZodType< + ListBillCreditNotesRequest, + 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 ListBillCreditNotesRequest$Outbound = { + companyId: string; + page: number; + pageSize: number; + query?: string | undefined; + orderBy?: string | undefined; +}; + +/** @internal */ +export const ListBillCreditNotesRequest$outboundSchema: z.ZodType< + ListBillCreditNotesRequest$Outbound, + z.ZodTypeDef, + ListBillCreditNotesRequest +> = 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 + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListBillCreditNotesRequest$ { + /** @deprecated use `ListBillCreditNotesRequest$inboundSchema` instead. */ + export const inboundSchema = ListBillCreditNotesRequest$inboundSchema; + /** @deprecated use `ListBillCreditNotesRequest$outboundSchema` instead. */ + export const outboundSchema = ListBillCreditNotesRequest$outboundSchema; + /** @deprecated use `ListBillCreditNotesRequest$Outbound` instead. */ + export type Outbound = ListBillCreditNotesRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listbillpayments.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listbillpayments.ts new file mode 100644 index 000000000..5faee1895 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listbillpayments.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ListBillPaymentsRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Page number. [Read more](https://docs.codat.io/using-the-api/paging). + */ + page?: number | undefined; + /** + * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). + */ + pageSize?: number | undefined; + /** + * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). + */ + query?: string | undefined; + /** + * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). + */ + orderBy?: string | undefined; +}; + +/** @internal */ +export const ListBillPaymentsRequest$inboundSchema: z.ZodType< + ListBillPaymentsRequest, + 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 ListBillPaymentsRequest$Outbound = { + companyId: string; + page: number; + pageSize: number; + query?: string | undefined; + orderBy?: string | undefined; +}; + +/** @internal */ +export const ListBillPaymentsRequest$outboundSchema: z.ZodType< + ListBillPaymentsRequest$Outbound, + z.ZodTypeDef, + ListBillPaymentsRequest +> = 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 + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListBillPaymentsRequest$ { + /** @deprecated use `ListBillPaymentsRequest$inboundSchema` instead. */ + export const inboundSchema = ListBillPaymentsRequest$inboundSchema; + /** @deprecated use `ListBillPaymentsRequest$outboundSchema` instead. */ + export const outboundSchema = ListBillPaymentsRequest$outboundSchema; + /** @deprecated use `ListBillPaymentsRequest$Outbound` instead. */ + export type Outbound = ListBillPaymentsRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listbills.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listbills.ts index bb38c8cc7..8045ded92 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listbills.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listbills.ts @@ -1,77 +1,76 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../../../sdk/models/shared"; -import { AxiosResponse } from "axios"; +import * as z from "zod"; -export class ListBillsRequest extends SpeakeasyBase { - /** - * Unique identifier for a company. - */ - @SpeakeasyMetadata({ data: "pathParam, style=simple;explode=false;name=companyId" }) - companyId: string; +export type ListBillsRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Page number. [Read more](https://docs.codat.io/using-the-api/paging). + */ + page?: number | undefined; + /** + * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). + */ + pageSize?: number | undefined; + /** + * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). + */ + query?: string | undefined; + /** + * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). + */ + orderBy?: string | undefined; +}; - /** - * Unique identifier for a connection. - */ - @SpeakeasyMetadata({ data: "pathParam, style=simple;explode=false;name=connectionId" }) - connectionId: string; +/** @internal */ +export const ListBillsRequest$inboundSchema: z.ZodType< + ListBillsRequest, + 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(), +}); - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - @SpeakeasyMetadata({ data: "queryParam, style=form;explode=true;name=page" }) - page?: number; +/** @internal */ +export type ListBillsRequest$Outbound = { + companyId: string; + page: number; + pageSize: number; + query?: string | undefined; + orderBy?: string | undefined; +}; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - @SpeakeasyMetadata({ data: "queryParam, style=form;explode=true;name=pageSize" }) - pageSize?: number; +/** @internal */ +export const ListBillsRequest$outboundSchema: z.ZodType< + ListBillsRequest$Outbound, + z.ZodTypeDef, + ListBillsRequest +> = 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(), +}); - /** - * Filter bills by `sourceModifiedDate` to return bills that have changed after a specified date. - */ - @SpeakeasyMetadata({ data: "queryParam, style=form;explode=true;name=sourceModifiedDate" }) - sourceModifiedDate?: string; - - /** - * Filter bills by `status`. - */ - @SpeakeasyMetadata({ data: "queryParam, style=form;explode=false;name=status" }) - status?: shared.BillStatus[]; -} - -export class ListBillsResponse extends SpeakeasyBase { - /** - * HTTP response content type for this operation - */ - @SpeakeasyMetadata() - contentType: string; - - /** - * Your `query` parameter was not correctly formed - */ - @SpeakeasyMetadata() - errorMessage?: shared.ErrorMessage; - - /** - * HTTP response status code for this operation - */ - @SpeakeasyMetadata() - statusCode: number; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SpeakeasyMetadata() - rawResponse: AxiosResponse; - - /** - * Success - */ - @SpeakeasyMetadata() - bills?: shared.Bills; +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListBillsRequest$ { + /** @deprecated use `ListBillsRequest$inboundSchema` instead. */ + export const inboundSchema = ListBillsRequest$inboundSchema; + /** @deprecated use `ListBillsRequest$outboundSchema` instead. */ + export const outboundSchema = ListBillsRequest$outboundSchema; + /** @deprecated use `ListBillsRequest$Outbound` instead. */ + export type Outbound = ListBillsRequest$Outbound; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listcompanies.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listcompanies.ts index 0f76bf55e..8bcb364ea 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listcompanies.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listcompanies.ts @@ -1,65 +1,69 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../../../sdk/models/shared"; -import { AxiosResponse } from "axios"; +import * as z from "zod"; -export class ListCompaniesRequest extends SpeakeasyBase { - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - @SpeakeasyMetadata({ data: "queryParam, style=form;explode=true;name=orderBy" }) - orderBy?: string; +export type ListCompaniesRequest = { + /** + * Page number. [Read more](https://docs.codat.io/using-the-api/paging). + */ + page?: number | undefined; + /** + * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). + */ + pageSize?: number | undefined; + /** + * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). + */ + query?: string | undefined; + /** + * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). + */ + orderBy?: string | undefined; +}; - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - @SpeakeasyMetadata({ data: "queryParam, style=form;explode=true;name=page" }) - page?: number; +/** @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(), +}); - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - @SpeakeasyMetadata({ data: "queryParam, style=form;explode=true;name=pageSize" }) - pageSize?: number; +/** @internal */ +export type ListCompaniesRequest$Outbound = { + page: number; + pageSize: number; + query?: string | undefined; + orderBy?: string | undefined; +}; - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - @SpeakeasyMetadata({ data: "queryParam, style=form;explode=true;name=query" }) - query?: string; -} - -export class ListCompaniesResponse extends SpeakeasyBase { - /** - * OK - */ - @SpeakeasyMetadata() - companies?: shared.Companies; - - /** - * HTTP response content type for this operation - */ - @SpeakeasyMetadata() - contentType: string; +/** @internal */ +export const ListCompaniesRequest$outboundSchema: z.ZodType< + ListCompaniesRequest$Outbound, + z.ZodTypeDef, + ListCompaniesRequest +> = z.object({ + page: z.number().int().default(1), + pageSize: z.number().int().default(100), + query: z.string().optional(), + orderBy: z.string().optional(), +}); - /** - * Your `query` parameter was not correctly formed - */ - @SpeakeasyMetadata() - errorMessage?: shared.ErrorMessage; - - /** - * HTTP response status code for this operation - */ - @SpeakeasyMetadata() - statusCode: number; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SpeakeasyMetadata() - rawResponse: AxiosResponse; +/** + * @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listconnections.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listconnections.ts index f2b232473..e17611ba7 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listconnections.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listconnections.ts @@ -1,71 +1,76 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../../../sdk/models/shared"; -import { AxiosResponse } from "axios"; +import * as z from "zod"; -export class ListConnectionsRequest extends SpeakeasyBase { - /** - * Unique identifier for a company. - */ - @SpeakeasyMetadata({ data: "pathParam, style=simple;explode=false;name=companyId" }) - companyId: string; +export type ListConnectionsRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Page number. [Read more](https://docs.codat.io/using-the-api/paging). + */ + page?: number | undefined; + /** + * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). + */ + pageSize?: number | undefined; + /** + * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). + */ + query?: string | undefined; + /** + * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). + */ + orderBy?: string | undefined; +}; - /** - * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). - */ - @SpeakeasyMetadata({ data: "queryParam, style=form;explode=true;name=orderBy" }) - orderBy?: string; +/** @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(), +}); - /** - * Page number. [Read more](https://docs.codat.io/using-the-api/paging). - */ - @SpeakeasyMetadata({ data: "queryParam, style=form;explode=true;name=page" }) - page?: number; +/** @internal */ +export type ListConnectionsRequest$Outbound = { + companyId: string; + page: number; + pageSize: number; + query?: string | undefined; + orderBy?: string | undefined; +}; - /** - * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). - */ - @SpeakeasyMetadata({ data: "queryParam, style=form;explode=true;name=pageSize" }) - pageSize?: number; +/** @internal */ +export const ListConnectionsRequest$outboundSchema: z.ZodType< + ListConnectionsRequest$Outbound, + z.ZodTypeDef, + ListConnectionsRequest +> = 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(), +}); - /** - * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). - */ - @SpeakeasyMetadata({ data: "queryParam, style=form;explode=true;name=query" }) - query?: string; -} - -export class ListConnectionsResponse extends SpeakeasyBase { - /** - * OK - */ - @SpeakeasyMetadata() - connections?: shared.Connections; - - /** - * HTTP response content type for this operation - */ - @SpeakeasyMetadata() - contentType: string; - - /** - * Your `query` parameter was not correctly formed - */ - @SpeakeasyMetadata() - errorMessage?: shared.ErrorMessage; - - /** - * HTTP response status code for this operation - */ - @SpeakeasyMetadata() - statusCode: number; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SpeakeasyMetadata() - rawResponse: AxiosResponse; +/** + * @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listjournals.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listjournals.ts new file mode 100644 index 000000000..408b5d4ed --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listjournals.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ListJournalsRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Page number. [Read more](https://docs.codat.io/using-the-api/paging). + */ + page?: number | undefined; + /** + * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). + */ + pageSize?: number | undefined; + /** + * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). + */ + query?: string | undefined; + /** + * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). + */ + orderBy?: string | undefined; +}; + +/** @internal */ +export const ListJournalsRequest$inboundSchema: z.ZodType< + ListJournalsRequest, + 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 ListJournalsRequest$Outbound = { + companyId: string; + page: number; + pageSize: number; + query?: string | undefined; + orderBy?: string | undefined; +}; + +/** @internal */ +export const ListJournalsRequest$outboundSchema: z.ZodType< + ListJournalsRequest$Outbound, + z.ZodTypeDef, + ListJournalsRequest +> = 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 + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListJournalsRequest$ { + /** @deprecated use `ListJournalsRequest$inboundSchema` instead. */ + export const inboundSchema = ListJournalsRequest$inboundSchema; + /** @deprecated use `ListJournalsRequest$outboundSchema` instead. */ + export const outboundSchema = ListJournalsRequest$outboundSchema; + /** @deprecated use `ListJournalsRequest$Outbound` instead. */ + export type Outbound = ListJournalsRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listpaymentmethods.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listpaymentmethods.ts new file mode 100644 index 000000000..4c2463a62 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listpaymentmethods.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ListPaymentMethodsRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Page number. [Read more](https://docs.codat.io/using-the-api/paging). + */ + page?: number | undefined; + /** + * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). + */ + pageSize?: number | undefined; + /** + * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). + */ + query?: string | undefined; + /** + * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). + */ + orderBy?: string | undefined; +}; + +/** @internal */ +export const ListPaymentMethodsRequest$inboundSchema: z.ZodType< + ListPaymentMethodsRequest, + 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 ListPaymentMethodsRequest$Outbound = { + companyId: string; + page: number; + pageSize: number; + query?: string | undefined; + orderBy?: string | undefined; +}; + +/** @internal */ +export const ListPaymentMethodsRequest$outboundSchema: z.ZodType< + ListPaymentMethodsRequest$Outbound, + z.ZodTypeDef, + ListPaymentMethodsRequest +> = 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 + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListPaymentMethodsRequest$ { + /** @deprecated use `ListPaymentMethodsRequest$inboundSchema` instead. */ + export const inboundSchema = ListPaymentMethodsRequest$inboundSchema; + /** @deprecated use `ListPaymentMethodsRequest$outboundSchema` instead. */ + export const outboundSchema = ListPaymentMethodsRequest$outboundSchema; + /** @deprecated use `ListPaymentMethodsRequest$Outbound` instead. */ + export type Outbound = ListPaymentMethodsRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listpulloperations.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listpulloperations.ts new file mode 100644 index 000000000..261d9a88a --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listpulloperations.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ListPullOperationsRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Page number. [Read more](https://docs.codat.io/using-the-api/paging). + */ + page?: number | undefined; + /** + * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). + */ + pageSize?: number | undefined; + /** + * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). + */ + query?: string | undefined; + /** + * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). + */ + 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; + page: number; + pageSize: number; + query?: string | undefined; + orderBy?: string | undefined; +}; + +/** @internal */ +export const ListPullOperationsRequest$outboundSchema: z.ZodType< + ListPullOperationsRequest$Outbound, + z.ZodTypeDef, + ListPullOperationsRequest +> = 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 + * @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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listpushoperations.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listpushoperations.ts new file mode 100644 index 000000000..2e678eff5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listpushoperations.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ListPushOperationsRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Page number. [Read more](https://docs.codat.io/using-the-api/paging). + */ + page?: number | undefined; + /** + * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). + */ + pageSize?: number | undefined; + /** + * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). + */ + query?: string | undefined; + /** + * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). + */ + 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; + page: number; + pageSize: number; + query?: string | undefined; + orderBy?: string | undefined; +}; + +/** @internal */ +export const ListPushOperationsRequest$outboundSchema: z.ZodType< + ListPushOperationsRequest$Outbound, + z.ZodTypeDef, + ListPushOperationsRequest +> = 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 + * @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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listsuppliers.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listsuppliers.ts new file mode 100644 index 000000000..6b5565306 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listsuppliers.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ListSuppliersRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Page number. [Read more](https://docs.codat.io/using-the-api/paging). + */ + page?: number | undefined; + /** + * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). + */ + pageSize?: number | undefined; + /** + * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). + */ + query?: string | undefined; + /** + * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). + */ + 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; + page: number; + pageSize: number; + query?: string | undefined; + orderBy?: string | undefined; +}; + +/** @internal */ +export const ListSuppliersRequest$outboundSchema: z.ZodType< + ListSuppliersRequest$Outbound, + z.ZodTypeDef, + ListSuppliersRequest +> = 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 + * @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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listtaxrates.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listtaxrates.ts new file mode 100644 index 000000000..9b01fee74 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listtaxrates.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ListTaxRatesRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Page number. [Read more](https://docs.codat.io/using-the-api/paging). + */ + page?: number | undefined; + /** + * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). + */ + pageSize?: number | undefined; + /** + * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). + */ + query?: string | undefined; + /** + * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). + */ + orderBy?: string | undefined; +}; + +/** @internal */ +export const ListTaxRatesRequest$inboundSchema: z.ZodType< + ListTaxRatesRequest, + 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 ListTaxRatesRequest$Outbound = { + companyId: string; + page: number; + pageSize: number; + query?: string | undefined; + orderBy?: string | undefined; +}; + +/** @internal */ +export const ListTaxRatesRequest$outboundSchema: z.ZodType< + ListTaxRatesRequest$Outbound, + z.ZodTypeDef, + ListTaxRatesRequest +> = 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 + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListTaxRatesRequest$ { + /** @deprecated use `ListTaxRatesRequest$inboundSchema` instead. */ + export const inboundSchema = ListTaxRatesRequest$inboundSchema; + /** @deprecated use `ListTaxRatesRequest$outboundSchema` instead. */ + export const outboundSchema = ListTaxRatesRequest$outboundSchema; + /** @deprecated use `ListTaxRatesRequest$Outbound` instead. */ + export type Outbound = ListTaxRatesRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listtrackingcategories.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listtrackingcategories.ts new file mode 100644 index 000000000..035350352 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/listtrackingcategories.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ListTrackingCategoriesRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Page number. [Read more](https://docs.codat.io/using-the-api/paging). + */ + page?: number | undefined; + /** + * Number of records to return in a page. [Read more](https://docs.codat.io/using-the-api/paging). + */ + pageSize?: number | undefined; + /** + * Codat query string. [Read more](https://docs.codat.io/using-the-api/querying). + */ + query?: string | undefined; + /** + * Field to order results by. [Read more](https://docs.codat.io/using-the-api/ordering-results). + */ + orderBy?: string | undefined; +}; + +/** @internal */ +export const ListTrackingCategoriesRequest$inboundSchema: z.ZodType< + ListTrackingCategoriesRequest, + 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 ListTrackingCategoriesRequest$Outbound = { + companyId: string; + page: number; + pageSize: number; + query?: string | undefined; + orderBy?: string | undefined; +}; + +/** @internal */ +export const ListTrackingCategoriesRequest$outboundSchema: z.ZodType< + ListTrackingCategoriesRequest$Outbound, + z.ZodTypeDef, + ListTrackingCategoriesRequest +> = 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 + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ListTrackingCategoriesRequest$ { + /** @deprecated use `ListTrackingCategoriesRequest$inboundSchema` instead. */ + export const inboundSchema = ListTrackingCategoriesRequest$inboundSchema; + /** @deprecated use `ListTrackingCategoriesRequest$outboundSchema` instead. */ + export const outboundSchema = ListTrackingCategoriesRequest$outboundSchema; + /** @deprecated use `ListTrackingCategoriesRequest$Outbound` instead. */ + export type Outbound = ListTrackingCategoriesRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/refreshalldatatypes.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/refreshalldatatypes.ts new file mode 100644 index 000000000..a6d763f9a --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/refreshalldatatypes.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type RefreshAllDataTypesRequest = { + /** + * Unique identifier for a company. + */ + 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; +}; + +/** @internal */ +export const RefreshAllDataTypesRequest$outboundSchema: z.ZodType< + RefreshAllDataTypesRequest$Outbound, + z.ZodTypeDef, + RefreshAllDataTypesRequest +> = z.object({ + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/refreshdatatype.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/refreshdatatype.ts new file mode 100644 index 000000000..61f70799c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/refreshdatatype.ts @@ -0,0 +1,63 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import * as shared from "../shared/index.js"; + +export type RefreshDataTypeRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * The key of a Codat data type + */ + dataType: shared.DataType; + /** + * Optionally, provide a data connection id to only queue pull operations on that connection. + */ + 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; + dataType: string; + connectionId?: string | undefined; +}; + +/** @internal */ +export const RefreshDataTypeRequest$outboundSchema: z.ZodType< + RefreshDataTypeRequest$Outbound, + z.ZodTypeDef, + RefreshDataTypeRequest +> = z.object({ + companyId: z.string(), + dataType: shared.DataType$outboundSchema, + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/unlinkconnection.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/unlinkconnection.ts index 1af9d0459..ef65f18b8 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/unlinkconnection.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/unlinkconnection.ts @@ -1,66 +1,114 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../../../sdk/models/shared"; -import { AxiosResponse } from "axios"; -import { Expose } from "class-transformer"; +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import * as shared from "../shared/index.js"; -export class UnlinkConnectionUpdateConnection extends SpeakeasyBase { - /** - * The current authorization status of the data connection. - */ - @SpeakeasyMetadata() - @Expose({ name: "status" }) - status?: shared.DataConnectionStatus; -} +export type UnlinkConnectionUpdateConnection = { + /** + * The current authorization status of the data connection. + */ + status?: shared.DataConnectionStatus | undefined; +}; -export class UnlinkConnectionRequest extends SpeakeasyBase { - @SpeakeasyMetadata({ data: "request, media_type=application/json" }) - requestBody?: UnlinkConnectionUpdateConnection; +export type UnlinkConnectionRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + requestBody?: UnlinkConnectionUpdateConnection | undefined; +}; - /** - * Unique identifier for a company. - */ - @SpeakeasyMetadata({ data: "pathParam, style=simple;explode=false;name=companyId" }) - companyId: string; +/** @internal */ +export const UnlinkConnectionUpdateConnection$inboundSchema: z.ZodType< + UnlinkConnectionUpdateConnection, + z.ZodTypeDef, + unknown +> = z.object({ + status: shared.DataConnectionStatus$inboundSchema.optional(), +}); - /** - * Unique identifier for a connection. - */ - @SpeakeasyMetadata({ data: "pathParam, style=simple;explode=false;name=connectionId" }) - connectionId: string; -} +/** @internal */ +export type UnlinkConnectionUpdateConnection$Outbound = { + status?: string | undefined; +}; + +/** @internal */ +export const UnlinkConnectionUpdateConnection$outboundSchema: z.ZodType< + UnlinkConnectionUpdateConnection$Outbound, + z.ZodTypeDef, + UnlinkConnectionUpdateConnection +> = z.object({ + status: shared.DataConnectionStatus$outboundSchema.optional(), +}); -export class UnlinkConnectionResponse extends SpeakeasyBase { - /** - * OK - */ - @SpeakeasyMetadata() - connection?: shared.Connection; +/** + * @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; +} - /** - * HTTP response content type for this operation - */ - @SpeakeasyMetadata() - contentType: string; +/** @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", + }); +}); - /** - * Your API request was not properly authorized. - */ - @SpeakeasyMetadata() - errorMessage?: shared.ErrorMessage; +/** @internal */ +export type UnlinkConnectionRequest$Outbound = { + companyId: string; + connectionId: string; + RequestBody?: UnlinkConnectionUpdateConnection$Outbound | undefined; +}; - /** - * HTTP response status code for this operation - */ - @SpeakeasyMetadata() - statusCode: number; +/** @internal */ +export const UnlinkConnectionRequest$outboundSchema: z.ZodType< + UnlinkConnectionRequest$Outbound, + z.ZodTypeDef, + UnlinkConnectionRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + requestBody: z.lazy(() => UnlinkConnectionUpdateConnection$outboundSchema) + .optional(), +}).transform((v) => { + return remap$(v, { + requestBody: "RequestBody", + }); +}); - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SpeakeasyMetadata() - rawResponse: AxiosResponse; +/** + * @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/updatebill.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/updatebill.ts new file mode 100644 index 000000000..711e39eb2 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/updatebill.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import * as shared from "../shared/index.js"; + +export type UpdateBillRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Unique identifier for a bill. + */ + billId: string; + /** + * Time limit for the push operation to complete before it is timed out. + */ + timeoutInMinutes?: number | undefined; + /** + * 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. + */ + forceUpdate?: boolean | undefined; + bill?: shared.Bill | null | undefined; +}; + +/** @internal */ +export const UpdateBillRequest$inboundSchema: z.ZodType< + UpdateBillRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billId: z.string(), + timeoutInMinutes: z.number().int().optional(), + forceUpdate: z.boolean().default(false), + Bill: z.nullable(shared.Bill$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "Bill": "bill", + }); +}); + +/** @internal */ +export type UpdateBillRequest$Outbound = { + companyId: string; + connectionId: string; + billId: string; + timeoutInMinutes?: number | undefined; + forceUpdate: boolean; + Bill?: shared.Bill$Outbound | null | undefined; +}; + +/** @internal */ +export const UpdateBillRequest$outboundSchema: z.ZodType< + UpdateBillRequest$Outbound, + z.ZodTypeDef, + UpdateBillRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billId: z.string(), + timeoutInMinutes: z.number().int().optional(), + forceUpdate: z.boolean().default(false), + bill: z.nullable(shared.Bill$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + bill: "Bill", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateBillRequest$ { + /** @deprecated use `UpdateBillRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateBillRequest$inboundSchema; + /** @deprecated use `UpdateBillRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateBillRequest$outboundSchema; + /** @deprecated use `UpdateBillRequest$Outbound` instead. */ + export type Outbound = UpdateBillRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/updatebillcreditnote.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/updatebillcreditnote.ts new file mode 100644 index 000000000..e6fe257f3 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/updatebillcreditnote.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import * as shared from "../shared/index.js"; + +export type UpdateBillCreditNoteRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Unique identifier for a bill credit note. + */ + billCreditNoteId: string; + /** + * Time limit for the push operation to complete before it is timed out. + */ + timeoutInMinutes?: number | undefined; + /** + * 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. + */ + forceUpdate?: boolean | undefined; + billCreditNote?: shared.BillCreditNote | null | undefined; +}; + +/** @internal */ +export const UpdateBillCreditNoteRequest$inboundSchema: z.ZodType< + UpdateBillCreditNoteRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billCreditNoteId: z.string(), + timeoutInMinutes: z.number().int().optional(), + forceUpdate: z.boolean().default(false), + BillCreditNote: z.nullable(shared.BillCreditNote$inboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + "BillCreditNote": "billCreditNote", + }); +}); + +/** @internal */ +export type UpdateBillCreditNoteRequest$Outbound = { + companyId: string; + connectionId: string; + billCreditNoteId: string; + timeoutInMinutes?: number | undefined; + forceUpdate: boolean; + BillCreditNote?: shared.BillCreditNote$Outbound | null | undefined; +}; + +/** @internal */ +export const UpdateBillCreditNoteRequest$outboundSchema: z.ZodType< + UpdateBillCreditNoteRequest$Outbound, + z.ZodTypeDef, + UpdateBillCreditNoteRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billCreditNoteId: z.string(), + timeoutInMinutes: z.number().int().optional(), + forceUpdate: z.boolean().default(false), + billCreditNote: z.nullable(shared.BillCreditNote$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + billCreditNote: "BillCreditNote", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateBillCreditNoteRequest$ { + /** @deprecated use `UpdateBillCreditNoteRequest$inboundSchema` instead. */ + export const inboundSchema = UpdateBillCreditNoteRequest$inboundSchema; + /** @deprecated use `UpdateBillCreditNoteRequest$outboundSchema` instead. */ + export const outboundSchema = UpdateBillCreditNoteRequest$outboundSchema; + /** @deprecated use `UpdateBillCreditNoteRequest$Outbound` instead. */ + export type Outbound = UpdateBillCreditNoteRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/updatecompany.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/updatecompany.ts index 5e9c5b28e..2bcdcf1c2 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/updatecompany.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/updatecompany.ts @@ -1,50 +1,62 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import * as shared from "../../../sdk/models/shared"; -import { AxiosResponse } from "axios"; - -export class UpdateCompanyRequest extends SpeakeasyBase { - @SpeakeasyMetadata({ data: "request, media_type=application/json" }) - companyRequestBody?: shared.CompanyRequestBody; - - /** - * Unique identifier for a company. - */ - @SpeakeasyMetadata({ data: "pathParam, style=simple;explode=false;name=companyId" }) - companyId: string; -} - -export class UpdateCompanyResponse extends SpeakeasyBase { - /** - * OK - */ - @SpeakeasyMetadata() - company?: shared.Company; - - /** - * HTTP response content type for this operation - */ - @SpeakeasyMetadata() - contentType: string; - - /** - * Your API request was not properly authorized. - */ - @SpeakeasyMetadata() - errorMessage?: shared.ErrorMessage; - - /** - * HTTP response status code for this operation - */ - @SpeakeasyMetadata() - statusCode: number; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SpeakeasyMetadata() - rawResponse: AxiosResponse; +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import * as shared from "../shared/index.js"; + +export type UpdateCompanyRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + companyRequestBody?: shared.CompanyRequestBody | 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; +}; + +/** @internal */ +export const UpdateCompanyRequest$outboundSchema: z.ZodType< + UpdateCompanyRequest$Outbound, + z.ZodTypeDef, + UpdateCompanyRequest +> = z.object({ + companyId: z.string(), + companyRequestBody: shared.CompanyRequestBody$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + companyRequestBody: "CompanyRequestBody", + }); +}); + +/** + * @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/updatesupplier.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/updatesupplier.ts new file mode 100644 index 000000000..2e819e9a9 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/updatesupplier.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import * as shared from "../shared/index.js"; + +export type UpdateSupplierRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Unique identifier for a supplier. + */ + supplierId: string; + /** + * Time limit for the push operation to complete before it is timed out. + */ + timeoutInMinutes?: number | undefined; + /** + * 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. + */ + forceUpdate?: boolean | undefined; + 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(), + 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; + connectionId: string; + supplierId: string; + timeoutInMinutes?: number | undefined; + forceUpdate: boolean; + Supplier?: shared.Supplier$Outbound | null | undefined; +}; + +/** @internal */ +export const UpdateSupplierRequest$outboundSchema: z.ZodType< + UpdateSupplierRequest$Outbound, + z.ZodTypeDef, + UpdateSupplierRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + supplierId: z.string(), + timeoutInMinutes: z.number().int().optional(), + forceUpdate: z.boolean().default(false), + supplier: z.nullable(shared.Supplier$outboundSchema).optional(), +}).transform((v) => { + return remap$(v, { + supplier: "Supplier", + }); +}); + +/** + * @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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/uploadbillattachment.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/uploadbillattachment.ts new file mode 100644 index 000000000..f0e6d81cc --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/operations/uploadbillattachment.ts @@ -0,0 +1,76 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import * as shared from "../shared/index.js"; + +export type UploadBillAttachmentRequest = { + /** + * Unique identifier for a company. + */ + companyId: string; + /** + * Unique identifier for a connection. + */ + connectionId: string; + /** + * Unique identifier for a bill. + */ + billId: string; + attachmentUpload?: shared.AttachmentUpload | undefined; +}; + +/** @internal */ +export const UploadBillAttachmentRequest$inboundSchema: z.ZodType< + UploadBillAttachmentRequest, + z.ZodTypeDef, + unknown +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billId: z.string(), + AttachmentUpload: shared.AttachmentUpload$inboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + "AttachmentUpload": "attachmentUpload", + }); +}); + +/** @internal */ +export type UploadBillAttachmentRequest$Outbound = { + companyId: string; + connectionId: string; + billId: string; + AttachmentUpload?: shared.AttachmentUpload$Outbound | undefined; +}; + +/** @internal */ +export const UploadBillAttachmentRequest$outboundSchema: z.ZodType< + UploadBillAttachmentRequest$Outbound, + z.ZodTypeDef, + UploadBillAttachmentRequest +> = z.object({ + companyId: z.string(), + connectionId: z.string(), + billId: z.string(), + attachmentUpload: shared.AttachmentUpload$outboundSchema.optional(), +}).transform((v) => { + return remap$(v, { + attachmentUpload: "AttachmentUpload", + }); +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UploadBillAttachmentRequest$ { + /** @deprecated use `UploadBillAttachmentRequest$inboundSchema` instead. */ + export const inboundSchema = UploadBillAttachmentRequest$inboundSchema; + /** @deprecated use `UploadBillAttachmentRequest$outboundSchema` instead. */ + export const outboundSchema = UploadBillAttachmentRequest$outboundSchema; + /** @deprecated use `UploadBillAttachmentRequest$Outbound` instead. */ + export type Outbound = UploadBillAttachmentRequest$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/account.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/account.ts new file mode 100644 index 000000000..32fe8f4f5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/account.ts @@ -0,0 +1,318 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { + AccountStatus, + AccountStatus$inboundSchema, + AccountStatus$outboundSchema, +} from "./accountstatus.js"; +import { + AccountType, + AccountType$inboundSchema, + AccountType$outboundSchema, +} from "./accounttype.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} from "./metadata.js"; +import { + SupplementalData, + SupplementalData$inboundSchema, + SupplementalData$Outbound, + SupplementalData$outboundSchema, +} from "./supplementaldata.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. + * + * @remarks + * + * 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. + */ +export type ValidDataTypeLinks = { + /** + * The property from the account that can be linked. + */ + property?: string | null | undefined; + /** + * Supported `dataTypes` that the record can be linked to. + */ + links?: Array | null | undefined; +}; + +/** + * > **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**. + * + * @remarks + * + * View the coverage for accounts in the Data coverage explorer. + * + * ## Overview + * + * Accounts 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. + * + * The categories for an account include: + * * Asset + * * Expense + * * Income + * * Liability + * * Equity. + * + * The 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. + * + * At 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. + * + * To determine the list of allowed categories for a specific integration, you can: + * - 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-payables-api#/operations/get-create-chartOfAccounts-model). + * - Refer to the integration's own documentation. + * + * > **Accounts with no category** + * > + * > 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`. + * > + * > 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. + */ +export type Account = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Identifier for the account, unique for the company. + */ + id?: string | undefined; + /** + * 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. + */ + nominalCode?: string | null | undefined; + /** + * Name of the account. + */ + name?: string | null | undefined; + /** + * Description for the account. + */ + description?: string | null | undefined; + /** + * Full category of the account. + * + * @remarks + * + * 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. + */ + fullyQualifiedCategory?: string | null | undefined; + /** + * Full name of the account, for example: + * + * @remarks + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + */ + fullyQualifiedName?: string | null | undefined; + /** + * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + * + * @remarks + * + * ## 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. + */ + currency?: string | undefined; + /** + * Current balance in the account. + */ + currentBalance?: Decimal$ | number | null | undefined; + /** + * Type of account + */ + type?: AccountType | undefined; + /** + * Status of the account + */ + status?: AccountStatus | undefined; + /** + * Confirms whether the account is a bank account or not. + */ + isBankAccount?: boolean | undefined; + /** + * 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-payables-api#/schemas/ValidDataTypeLinks). + */ + validDatatypeLinks?: Array | null | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; + metadata?: Metadata | 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; + links?: Array | null | undefined; +}; + +/** @internal */ +export const ValidDataTypeLinks$outboundSchema: z.ZodType< + ValidDataTypeLinks$Outbound, + z.ZodTypeDef, + ValidDataTypeLinks +> = 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 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; +} + +/** @internal */ +export const Account$inboundSchema: z.ZodType = + 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.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(), + metadata: Metadata$inboundSchema.optional(), + }); + +/** @internal */ +export type Account$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?: Metadata$Outbound | undefined; +}; + +/** @internal */ +export const Account$outboundSchema: z.ZodType< + Account$Outbound, + z.ZodTypeDef, + Account +> = 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(() => ValidDataTypeLinks$outboundSchema)), + ).optional(), + supplementalData: SupplementalData$outboundSchema.optional(), + metadata: Metadata$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 Account$ { + /** @deprecated use `Account$inboundSchema` instead. */ + export const inboundSchema = Account$inboundSchema; + /** @deprecated use `Account$outboundSchema` instead. */ + export const outboundSchema = Account$outboundSchema; + /** @deprecated use `Account$Outbound` instead. */ + export type Outbound = Account$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accountingaddresstype.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accountingaddresstype.ts new file mode 100644 index 000000000..5ca428861 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accountingaddresstype.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * The type of the address + */ +export const AccountingAddressType = { + Unknown: "Unknown", + Billing: "Billing", + Delivery: "Delivery", +} as const; +/** + * The type of the address + */ +export type AccountingAddressType = ClosedEnum; + +/** @internal */ +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/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accountprototype.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accountprototype.ts new file mode 100644 index 000000000..6c887c83d --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accountprototype.ts @@ -0,0 +1,271 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { + AccountStatus, + AccountStatus$inboundSchema, + AccountStatus$outboundSchema, +} from "./accountstatus.js"; +import { + AccountType, + AccountType$inboundSchema, + AccountType$outboundSchema, +} from "./accounttype.js"; +import { + SupplementalData, + SupplementalData$inboundSchema, + SupplementalData$Outbound, + SupplementalData$outboundSchema, +} from "./supplementaldata.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. + * + * @remarks + * + * 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. + */ +export type AccountPrototypeValidDataTypeLinks = { + /** + * The property from the account that can be linked. + */ + property?: string | null | undefined; + /** + * Supported `dataTypes` that the record can be linked to. + */ + links?: Array | null | undefined; +}; + +export type AccountPrototype = { + /** + * 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. + */ + nominalCode?: string | null | undefined; + /** + * Name of the account. + */ + name?: string | null | undefined; + /** + * Description for the account. + */ + description?: string | null | undefined; + /** + * Full category of the account. + * + * @remarks + * + * 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. + */ + fullyQualifiedCategory?: string | null | undefined; + /** + * Full name of the account, for example: + * + * @remarks + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + */ + fullyQualifiedName?: string | null | undefined; + /** + * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + * + * @remarks + * + * ## 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. + */ + currency?: string | undefined; + /** + * Current balance in the account. + */ + currentBalance?: Decimal$ | number | null | undefined; + /** + * Type of account + */ + type?: AccountType | undefined; + /** + * Status of the account + */ + status?: AccountStatus | undefined; + /** + * Confirms whether the account is a bank account or not. + */ + isBankAccount?: boolean | undefined; + /** + * 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-payables-api#/schemas/ValidDataTypeLinks). + */ + validDatatypeLinks?: + | Array + | null + | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; +}; + +/** @internal */ +export const AccountPrototypeValidDataTypeLinks$inboundSchema: z.ZodType< + AccountPrototypeValidDataTypeLinks, + z.ZodTypeDef, + unknown +> = z.object({ + property: z.nullable(z.string()).optional(), + links: z.nullable(z.array(z.string())).optional(), +}); + +/** @internal */ +export type AccountPrototypeValidDataTypeLinks$Outbound = { + property?: string | null | undefined; + links?: Array | null | undefined; +}; + +/** @internal */ +export const AccountPrototypeValidDataTypeLinks$outboundSchema: z.ZodType< + AccountPrototypeValidDataTypeLinks$Outbound, + z.ZodTypeDef, + AccountPrototypeValidDataTypeLinks +> = 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 AccountPrototypeValidDataTypeLinks$ { + /** @deprecated use `AccountPrototypeValidDataTypeLinks$inboundSchema` instead. */ + export const inboundSchema = AccountPrototypeValidDataTypeLinks$inboundSchema; + /** @deprecated use `AccountPrototypeValidDataTypeLinks$outboundSchema` instead. */ + export const outboundSchema = + AccountPrototypeValidDataTypeLinks$outboundSchema; + /** @deprecated use `AccountPrototypeValidDataTypeLinks$Outbound` instead. */ + export type Outbound = AccountPrototypeValidDataTypeLinks$Outbound; +} + +/** @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(() => AccountPrototypeValidDataTypeLinks$inboundSchema)), + ).optional(), + supplementalData: SupplementalData$inboundSchema.optional(), +}); + +/** @internal */ +export type AccountPrototype$Outbound = { + 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; +}; + +/** @internal */ +export const AccountPrototype$outboundSchema: z.ZodType< + AccountPrototype$Outbound, + z.ZodTypeDef, + AccountPrototype +> = 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.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(() => AccountPrototypeValidDataTypeLinks$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 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accountref.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accountref.ts new file mode 100644 index 000000000..5260fddf6 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accountref.ts @@ -0,0 +1,58 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * 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. + */ +export type AccountRef = { + /** + * 'id' from the Accounts data type. + */ + id?: string | undefined; + /** + * 'name' from the Accounts data type. + */ + name?: string | undefined; +}; + +/** @internal */ +export const AccountRef$inboundSchema: z.ZodType< + AccountRef, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), + name: z.string().optional(), +}); + +/** @internal */ +export type AccountRef$Outbound = { + id?: string | undefined; + name?: string | undefined; +}; + +/** @internal */ +export const AccountRef$outboundSchema: z.ZodType< + AccountRef$Outbound, + z.ZodTypeDef, + AccountRef +> = z.object({ + id: z.string().optional(), + name: 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 AccountRef$ { + /** @deprecated use `AccountRef$inboundSchema` instead. */ + export const inboundSchema = AccountRef$inboundSchema; + /** @deprecated use `AccountRef$outboundSchema` instead. */ + export const outboundSchema = AccountRef$outboundSchema; + /** @deprecated use `AccountRef$Outbound` instead. */ + export type Outbound = AccountRef$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accounts.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accounts.ts new file mode 100644 index 000000000..dfabef6e5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accounts.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { + Account, + Account$inboundSchema, + Account$Outbound, + Account$outboundSchema, +} from "./account.js"; +import { + Links, + Links$inboundSchema, + Links$Outbound, + Links$outboundSchema, +} from "./links.js"; + +export type Accounts = { + results?: Array | undefined; + /** + * Current page number. + */ + pageNumber: number; + /** + * Number of items to return in results array. + */ + pageSize: number; + /** + * Total number of items. + */ + totalResults: number; + links: Links; +}; + +/** @internal */ +export const Accounts$inboundSchema: z.ZodType< + Accounts, + z.ZodTypeDef, + unknown +> = z.object({ + results: z.array(Account$inboundSchema).optional(), + pageNumber: z.number().int(), + pageSize: z.number().int(), + totalResults: z.number().int(), + _links: Links$inboundSchema, +}).transform((v) => { + return remap$(v, { + "_links": "links", + }); +}); + +/** @internal */ +export type Accounts$Outbound = { + results?: Array | undefined; + pageNumber: number; + pageSize: number; + totalResults: number; + _links: Links$Outbound; +}; + +/** @internal */ +export const Accounts$outboundSchema: z.ZodType< + Accounts$Outbound, + z.ZodTypeDef, + Accounts +> = z.object({ + results: z.array(Account$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 Accounts$ { + /** @deprecated use `Accounts$inboundSchema` instead. */ + export const inboundSchema = Accounts$inboundSchema; + /** @deprecated use `Accounts$outboundSchema` instead. */ + export const outboundSchema = Accounts$outboundSchema; + /** @deprecated use `Accounts$Outbound` instead. */ + export type Outbound = Accounts$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accountstatus.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accountstatus.ts new file mode 100644 index 000000000..5932cfb46 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accountstatus.ts @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Status of the account + */ +export const AccountStatus = { + Unknown: "Unknown", + Active: "Active", + Archived: "Archived", + Pending: "Pending", +} as const; +/** + * Status of the account + */ +export type AccountStatus = ClosedEnum; + +/** @internal */ +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/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accounttype.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accounttype.ts new file mode 100644 index 000000000..129692dba --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/accounttype.ts @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Type of account + */ +export const AccountType = { + Unknown: "Unknown", + Asset: "Asset", + Expense: "Expense", + Income: "Income", + Liability: "Liability", + Equity: "Equity", +} as const; +/** + * Type of account + */ +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/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/address.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/address.ts new file mode 100644 index 000000000..0fde5dc3c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/address.ts @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + AccountingAddressType, + AccountingAddressType$inboundSchema, + AccountingAddressType$outboundSchema, +} from "./accountingaddresstype.js"; + +export type Address = { + /** + * The type of the address + */ + type: AccountingAddressType; + /** + * Line 1 of the customer address. + */ + line1?: string | null | undefined; + /** + * Line 2 of the customer address. + */ + line2?: string | null | undefined; + /** + * City of the customer address. + */ + city?: string | null | undefined; + /** + * Region of the customer address. + */ + region?: string | null | undefined; + /** + * Country of the customer address. + */ + country?: string | null | undefined; + /** + * Postal code or zip code. + */ + postalCode?: string | null | undefined; +}; + +/** @internal */ +export const Address$inboundSchema: z.ZodType = + z.object({ + type: AccountingAddressType$inboundSchema, + 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 */ +export type Address$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 Address$outboundSchema: z.ZodType< + Address$Outbound, + z.ZodTypeDef, + Address +> = 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 Address$ { + /** @deprecated use `Address$inboundSchema` instead. */ + export const inboundSchema = Address$inboundSchema; + /** @deprecated use `Address$outboundSchema` instead. */ + export const outboundSchema = Address$outboundSchema; + /** @deprecated use `Address$Outbound` instead. */ + export type Outbound = Address$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/attachment.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/attachment.ts new file mode 100644 index 000000000..b4a72513b --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/attachment.ts @@ -0,0 +1,135 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The Codat API supports pulling and pushing of file attachments for invoices, bills, direct costs, and direct incomes. + * + * @remarks + * + * > **Retrieving attachments** + * > + * > If a company is authorized, you can query the Codat API to read, download, and upload attachments without requiring a fresh sync of data. + * + * Unlike other data types, Codat doesn't support [sync settings](https://docs.codat.io/knowledge-base/advanced-sync-settings) for attachments. + * + * Note that different integrations have different requirements to file size and extension of attachments. + * + * | Integration | File size | File extension | + * |-------------------|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------| + * | Xero | 4 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 | + * | QuickBooks Online | 100 MB | AI, CSV, DOC, DOCX, EPS, GIF, JPEG, JPG, ODS, PAGES, PDF, PNG, RTF, TIF, TXT, XLS, XLSX, XML | + * | NetSuite | 100 MB | BMP, CSV, XLS, XLSX, JSON, PDF, PJPG, PJPEG, PNG, TXT, SVG, TIF, TIFF, DOC, DOCX, ZIP | + * | Dynamics 365 Business Central | 350 MB | Dynamics do not explicitly outline which file types are supported but they do state here that "You can attach any type of file, such as text, image, or video files". | + * + * View the coverage for each integration in the Data coverage explorer. + */ +export type Attachment = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Identifier for the attachment, unique for the company in the accounting software. + */ + id?: string | undefined; + /** + * Name of the attachment file. + */ + name?: string | null | undefined; + /** + * File type of the attachment. This is represented by appending the file type to the [IETF standard file naming requirements](https://tools.ietf.org/html/rfc6838). For example, for a jpeg file the output is **image/jpeg**. + * + * @remarks + * + * Supported file types vary per platform. + */ + contentType?: string | 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: + * + * @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. + */ + dateCreated?: string | undefined; + /** + * File size in bytes. For example, if this reads **46153**, then the file size is 46kb. + */ + fileSize?: number | null | undefined; + /** + * If `true`, then the attachment is included with the associated invoice, bill or direct costs when it is printed, emailed, or sent to a customer, if the underlying accounting software allows this. + */ + includeWhenSent?: boolean | undefined; +}; + +/** @internal */ +export const Attachment$inboundSchema: z.ZodType< + Attachment, + z.ZodTypeDef, + unknown +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + name: z.nullable(z.string()).optional(), + contentType: z.nullable(z.string()).optional(), + dateCreated: z.string().optional(), + fileSize: z.nullable(z.number().int()).optional(), + includeWhenSent: z.boolean().optional(), +}); + +/** @internal */ +export type Attachment$Outbound = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + id?: string | undefined; + name?: string | null | undefined; + contentType?: string | null | undefined; + dateCreated?: string | undefined; + fileSize?: number | null | undefined; + includeWhenSent?: boolean | undefined; +}; + +/** @internal */ +export const Attachment$outboundSchema: z.ZodType< + Attachment$Outbound, + z.ZodTypeDef, + Attachment +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + name: z.nullable(z.string()).optional(), + contentType: z.nullable(z.string()).optional(), + dateCreated: z.string().optional(), + fileSize: z.nullable(z.number().int()).optional(), + includeWhenSent: 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 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/attachments.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/attachments.ts new file mode 100644 index 000000000..923a0a6d1 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/attachments.ts @@ -0,0 +1,51 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + Attachment, + Attachment$inboundSchema, + Attachment$Outbound, + Attachment$outboundSchema, +} from "./attachment.js"; + +export type Attachments = { + attachments?: Array | null | undefined; +}; + +/** @internal */ +export const Attachments$inboundSchema: z.ZodType< + Attachments, + z.ZodTypeDef, + unknown +> = z.object({ + attachments: z.nullable(z.array(Attachment$inboundSchema)).optional(), +}); + +/** @internal */ +export type Attachments$Outbound = { + attachments?: Array | null | undefined; +}; + +/** @internal */ +export const Attachments$outboundSchema: z.ZodType< + Attachments$Outbound, + z.ZodTypeDef, + Attachments +> = z.object({ + attachments: z.nullable(z.array(Attachment$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 Attachments$ { + /** @deprecated use `Attachments$inboundSchema` instead. */ + export const inboundSchema = Attachments$inboundSchema; + /** @deprecated use `Attachments$outboundSchema` instead. */ + export const outboundSchema = Attachments$outboundSchema; + /** @deprecated use `Attachments$Outbound` instead. */ + export type Outbound = Attachments$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/attachmentupload.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/attachmentupload.ts new file mode 100644 index 000000000..16f8575bc --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/attachmentupload.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { blobLikeSchema } from "../../types/blobs.js"; +import { + CodatFile, + CodatFile$inboundSchema, + CodatFile$Outbound, + CodatFile$outboundSchema, +} from "./codatfile.js"; + +export type AttachmentUpload = { + /** + * The file to be uploaded as an attachment. + */ + 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; +}; + +/** @internal */ +export const AttachmentUpload$outboundSchema: z.ZodType< + AttachmentUpload$Outbound, + z.ZodTypeDef, + AttachmentUpload +> = z.object({ + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bankaccountcreateresponse.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bankaccountcreateresponse.ts new file mode 100644 index 000000000..0a74e6689 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bankaccountcreateresponse.ts @@ -0,0 +1,480 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { + BankAccountStatus, + BankAccountStatus$inboundSchema, + BankAccountStatus$outboundSchema, +} from "./bankaccountstatus.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} 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"; + +/** + * The type of transactions and balances on the account. + * + * @remarks + * For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. + * For Debit accounts, positive balances are assets, and positive transactions **increase** assets. + */ +export const BankAccountCreateResponseBankAccountType = { + Unknown: "Unknown", + Credit: "Credit", + Debit: "Debit", +} as const; +/** + * The type of transactions and balances on the account. + * + * @remarks + * For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. + * For Debit accounts, positive balances are assets, and positive transactions **increase** assets. + */ +export type BankAccountCreateResponseBankAccountType = ClosedEnum< + typeof BankAccountCreateResponseBankAccountType +>; + +/** + * > **Accessing Bank Accounts through Banking API** + * + * @remarks + * > + * > 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 datatype [here](https://docs.codat.io/sync-for-payables-api#/schemas/Account) + * + * > View the coverage for bank accounts in the Data coverage explorer. + * + * ## 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. + * + * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + */ +export type AccountingBankAccount = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Identifier for the account, unique for the company in the accounting software. + */ + id?: string | undefined; + /** + * Name of the bank account in the accounting software. + */ + accountName?: string | null | undefined; + /** + * The type of transactions and balances on the account. + * + * @remarks + * For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. + * For Debit accounts, positive balances are assets, and positive transactions **increase** assets. + */ + accountType?: BankAccountCreateResponseBankAccountType | undefined; + /** + * Code used to identify each nominal account for a business. + */ + nominalCode?: string | null | undefined; + /** + * Sort code for the bank account. + * + * @remarks + * + * 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. + */ + sortCode?: string | null | undefined; + /** + * Account number for the bank account. + * + * @remarks + * + * 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. + */ + accountNumber?: string | null | undefined; + /** + * International bank account number of the account. Often used when making or receiving international payments. + */ + iBan?: string | null | undefined; + /** + * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + * + * @remarks + * + * ## 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. + */ + currency?: string | undefined; + /** + * Balance of the bank account. + */ + balance?: Decimal$ | number | null | undefined; + /** + * The institution of the bank account. + */ + institution?: string | null | undefined; + /** + * 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. + */ + availableBalance?: Decimal$ | number | null | undefined; + /** + * Pre-arranged overdraft limit of the account. + * + * @remarks + * + * The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. + */ + overdraftLimit?: Decimal$ | number | null | undefined; + /** + * Status of the bank account. + */ + status?: BankAccountStatus | undefined; + metadata?: Metadata | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; +}; + +export type BankAccountCreateResponse = { + data?: AccountingBankAccount | null | undefined; + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + */ + changes?: Array | null | undefined; + /** + * Available data types + */ + dataType?: PropertieDataType | undefined; + /** + * Unique identifier for your SMB in Codat. + */ + companyId: string; + /** + * 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. + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + */ + dataConnectionKey: string; + /** + * 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. + */ + requestedOnUtc: string; + /** + * 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. + */ + completedOnUtc?: string | undefined; + /** + * Number of minutes the push operation must complete within before it times out. + */ + timeoutInMinutes?: number | null | undefined; + /** + * Number of seconds the push operation must complete within before it times out. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + timeoutInSeconds?: number | null | undefined; + /** + * The current status of the push operation. + */ + status: PushOperationStatus; + /** + * A message about the error. + */ + errorMessage?: string | null | undefined; + /** + * A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + */ + validation?: Validation | undefined; + /** + * Push status code. + */ + statusCode: number; +}; + +/** @internal */ +export const BankAccountCreateResponseBankAccountType$inboundSchema: + z.ZodNativeEnum = z + .nativeEnum(BankAccountCreateResponseBankAccountType); + +/** @internal */ +export const BankAccountCreateResponseBankAccountType$outboundSchema: + z.ZodNativeEnum = + BankAccountCreateResponseBankAccountType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BankAccountCreateResponseBankAccountType$ { + /** @deprecated use `BankAccountCreateResponseBankAccountType$inboundSchema` instead. */ + export const inboundSchema = + BankAccountCreateResponseBankAccountType$inboundSchema; + /** @deprecated use `BankAccountCreateResponseBankAccountType$outboundSchema` instead. */ + export const outboundSchema = + BankAccountCreateResponseBankAccountType$outboundSchema; +} + +/** @internal */ +export const AccountingBankAccount$inboundSchema: z.ZodType< + AccountingBankAccount, + z.ZodTypeDef, + unknown +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + accountName: z.nullable(z.string()).optional(), + accountType: BankAccountCreateResponseBankAccountType$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(), +}); + +/** @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: BankAccountCreateResponseBankAccountType$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; +} + +/** @internal */ +export const BankAccountCreateResponse$inboundSchema: z.ZodType< + BankAccountCreateResponse, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable(z.lazy(() => AccountingBankAccount$inboundSchema)) + .optional(), + changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), + dataType: PropertieDataType$inboundSchema.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$inboundSchema, + errorMessage: z.nullable(z.string()).optional(), + validation: Validation$inboundSchema.optional(), + statusCode: z.number().int(), +}); + +/** @internal */ +export type BankAccountCreateResponse$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 BankAccountCreateResponse$outboundSchema: z.ZodType< + BankAccountCreateResponse$Outbound, + z.ZodTypeDef, + BankAccountCreateResponse +> = 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 BankAccountCreateResponse$ { + /** @deprecated use `BankAccountCreateResponse$inboundSchema` instead. */ + export const inboundSchema = BankAccountCreateResponse$inboundSchema; + /** @deprecated use `BankAccountCreateResponse$outboundSchema` instead. */ + export const outboundSchema = BankAccountCreateResponse$outboundSchema; + /** @deprecated use `BankAccountCreateResponse$Outbound` instead. */ + export type Outbound = BankAccountCreateResponse$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bankaccountprototype.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bankaccountprototype.ts new file mode 100644 index 000000000..d4564232e --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bankaccountprototype.ts @@ -0,0 +1,217 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { + BankAccountStatus, + BankAccountStatus$inboundSchema, + BankAccountStatus$outboundSchema, +} from "./bankaccountstatus.js"; + +/** + * The type of transactions and balances on the account. + * + * @remarks + * For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. + * For Debit accounts, positive balances are assets, and positive transactions **increase** assets. + */ +export const BankAccountType = { + Unknown: "Unknown", + Credit: "Credit", + Debit: "Debit", +} as const; +/** + * The type of transactions and balances on the account. + * + * @remarks + * For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. + * For Debit accounts, positive balances are assets, and positive transactions **increase** assets. + */ +export type BankAccountType = ClosedEnum; + +export type BankAccountPrototype = { + /** + * Name of the bank account in the accounting software. + */ + accountName?: string | null | undefined; + /** + * The type of transactions and balances on the account. + * + * @remarks + * For Credit accounts, positive balances are liabilities, and positive transactions **reduce** liabilities. + * For Debit accounts, positive balances are assets, and positive transactions **increase** assets. + */ + accountType?: BankAccountType | undefined; + /** + * Code used to identify each nominal account for a business. + */ + nominalCode?: string | null | undefined; + /** + * Sort code for the bank account. + * + * @remarks + * + * 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. + */ + sortCode?: string | null | undefined; + /** + * Account number for the bank account. + * + * @remarks + * + * 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. + */ + accountNumber?: string | null | undefined; + /** + * International bank account number of the account. Often used when making or receiving international payments. + */ + iBan?: string | null | undefined; + /** + * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + * + * @remarks + * + * ## 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. + */ + currency?: string | undefined; + /** + * Balance of the bank account. + */ + balance?: Decimal$ | number | null | undefined; + /** + * The institution of the bank account. + */ + institution?: string | null | undefined; + /** + * 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. + */ + availableBalance?: Decimal$ | number | null | undefined; + /** + * Pre-arranged overdraft limit of the account. + * + * @remarks + * + * The value is always positive. For example, an overdraftLimit of `1000` means that the balance of the account can go down to `-1000`. + */ + overdraftLimit?: Decimal$ | number | null | undefined; + /** + * Status of the bank account. + */ + status?: BankAccountStatus | 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 BankAccountPrototype$inboundSchema: z.ZodType< + BankAccountPrototype, + z.ZodTypeDef, + unknown +> = z.object({ + 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(), +}); + +/** @internal */ +export type BankAccountPrototype$Outbound = { + 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; +}; + +/** @internal */ +export const BankAccountPrototype$outboundSchema: z.ZodType< + BankAccountPrototype$Outbound, + z.ZodTypeDef, + BankAccountPrototype +> = z.object({ + accountName: z.nullable(z.string()).optional(), + accountType: BankAccountType$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(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BankAccountPrototype$ { + /** @deprecated use `BankAccountPrototype$inboundSchema` instead. */ + export const inboundSchema = BankAccountPrototype$inboundSchema; + /** @deprecated use `BankAccountPrototype$outboundSchema` instead. */ + export const outboundSchema = BankAccountPrototype$outboundSchema; + /** @deprecated use `BankAccountPrototype$Outbound` instead. */ + export type Outbound = BankAccountPrototype$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bankaccountstatus.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bankaccountstatus.ts new file mode 100644 index 000000000..636071113 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bankaccountstatus.ts @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Status of the bank account. + */ +export const BankAccountStatus = { + Unknown: "Unknown", + Active: "Active", + Archived: "Archived", + Pending: "Pending", +} as const; +/** + * Status of the bank account. + */ +export type BankAccountStatus = ClosedEnum; + +/** @internal */ +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/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bill.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bill.ts index 5a5ce1220..9b802294e 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bill.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bill.ts @@ -1,92 +1,570 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { BillLineItem } from "./billlineitem"; -import { BillStatus } from "./billstatus"; -import { SupplierRef } from "./supplierref"; -import { Expose, Type } from "class-transformer"; +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { + BillLineItem, + BillLineItem$inboundSchema, + BillLineItem$Outbound, + BillLineItem$outboundSchema, +} from "./billlineitem.js"; +import { + BillStatus, + BillStatus$inboundSchema, + BillStatus$outboundSchema, +} from "./billstatus.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} from "./metadata.js"; +import { + PaymentAllocationPayment, + PaymentAllocationPayment$inboundSchema, + PaymentAllocationPayment$Outbound, + PaymentAllocationPayment$outboundSchema, +} from "./paymentallocationpayment.js"; +import { + SupplementalData, + SupplementalData$inboundSchema, + SupplementalData$Outbound, + SupplementalData$outboundSchema, +} from "./supplementaldata.js"; +import { + SupplierRef, + SupplierRef$inboundSchema, + SupplierRef$Outbound, + SupplierRef$outboundSchema, +} from "./supplierref.js"; + +export type PurchaseOrderReference = { + /** + * Identifier for the purchase order, unique for the company in the accounting software. + */ + id?: string | undefined; + /** + * Friendly reference for the purchase order, commonly generated by the accounting software. + */ + purchaseOrderNumber?: string | null | undefined; +}; + +export type WithholdingTax = { + /** + * Name assigned to withheld tax. + */ + name: string; + /** + * Amount of tax withheld. + */ + amount: Decimal$ | number; +}; + +export type BillAllocation = { + /** + * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + * + * @remarks + * + * ## 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. + */ + currency?: string | undefined; + /** + * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. + * + * @remarks + * + * 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. | + */ + currencyRate?: Decimal$ | number | 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: + * + * @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. + */ + allocatedOnDate?: string | undefined; + /** + * The total amount that has been allocated. + */ + totalAmount?: Decimal$ | number | undefined; +}; + +export type AccountingPaymentAllocation = { + payment: PaymentAllocationPayment; + allocation: BillAllocation; +}; + +/** + * > **Invoices or bills?** + * + * @remarks + * > + * > We distinguish between invoices where the company *owes money* vs. *is owed money*. If the company has received an invoice, and owes money to someone else (accounts payable) we call this a Bill. + * > + * > See [Invoices](https://docs.codat.io/sync-for-payables-api#/schemas/Invoice) for the accounts receivable equivalent of bills. + * + * View the coverage for bills in the Data coverage explorer. + * + * ## Overview + * + * In Codat, a bill contains details of: + * * When the bill was recorded in the accounting system. + * * How much the bill is for and the currency of the amount. + * * Who the bill was received from — the *supplier*. + * * What the bill is for — the *line items*. + * + * Some accounting software give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's *expenses*. + * + * You can find these types of transactions in our [Direct costs](https://docs.codat.io/sync-for-payables-api#/schemas/DirectCost) data model. + */ +export type Bill = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Identifier for the bill, unique for the company in the accounting software. + */ + id?: string | undefined; + /** + * User-friendly reference for the bill. + */ + reference?: string | null | undefined; + /** + * Reference to the supplier the record relates to. + */ + supplierRef?: SupplierRef | undefined; + purchaseOrderRefs?: Array | null | undefined; + issueDate: string; + dueDate?: string | undefined; + /** + * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + * + * @remarks + * + * ## 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. + */ + currency?: string | undefined; + /** + * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. + * + * @remarks + * + * 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. | + */ + currencyRate?: Decimal$ | number | null | undefined; + /** + * Array of Bill line items. + */ + lineItems?: Array | null | undefined; + withholdingTax?: Array | null | undefined; + /** + * Current state of the bill. + */ + status: BillStatus; + /** + * Total amount of the bill, excluding any taxes. + */ + subTotal: Decimal$ | number; + /** + * Amount of tax on the bill. + */ + taxAmount: Decimal$ | number; + /** + * Amount of the bill, including tax. + */ + totalAmount: Decimal$ | number; + /** + * Amount outstanding on the bill. + */ + amountDue?: Decimal$ | number | null | undefined; + /** + * Any private, company notes about the bill, such as payment information. + */ + note?: string | null | undefined; + /** + * An array of payment allocations. + */ + paymentAllocations?: Array | null | undefined; + metadata?: Metadata | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; +}; + +/** @internal */ +export const PurchaseOrderReference$inboundSchema: z.ZodType< + PurchaseOrderReference, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), + purchaseOrderNumber: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type PurchaseOrderReference$Outbound = { + id?: string | undefined; + purchaseOrderNumber?: string | null | undefined; +}; + +/** @internal */ +export const PurchaseOrderReference$outboundSchema: z.ZodType< + PurchaseOrderReference$Outbound, + z.ZodTypeDef, + PurchaseOrderReference +> = z.object({ + id: z.string().optional(), + purchaseOrderNumber: 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 PurchaseOrderReference$ { + /** @deprecated use `PurchaseOrderReference$inboundSchema` instead. */ + export const inboundSchema = PurchaseOrderReference$inboundSchema; + /** @deprecated use `PurchaseOrderReference$outboundSchema` instead. */ + export const outboundSchema = PurchaseOrderReference$outboundSchema; + /** @deprecated use `PurchaseOrderReference$Outbound` instead. */ + export type Outbound = PurchaseOrderReference$Outbound; +} + +/** @internal */ +export const WithholdingTax$inboundSchema: z.ZodType< + WithholdingTax, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + amount: z.number().transform(v => new Decimal$(v)), +}); + +/** @internal */ +export type WithholdingTax$Outbound = { + name: string; + amount: number; +}; + +/** @internal */ +export const WithholdingTax$outboundSchema: z.ZodType< + WithholdingTax$Outbound, + z.ZodTypeDef, + WithholdingTax +> = z.object({ + name: z.string(), + amount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace WithholdingTax$ { + /** @deprecated use `WithholdingTax$inboundSchema` instead. */ + export const inboundSchema = WithholdingTax$inboundSchema; + /** @deprecated use `WithholdingTax$outboundSchema` instead. */ + export const outboundSchema = WithholdingTax$outboundSchema; + /** @deprecated use `WithholdingTax$Outbound` instead. */ + export type Outbound = WithholdingTax$Outbound; +} + +/** @internal */ +export const BillAllocation$inboundSchema: z.ZodType< + BillAllocation, + z.ZodTypeDef, + unknown +> = z.object({ + currency: z.string().optional(), + currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + allocatedOnDate: z.string().optional(), + totalAmount: z.number().transform(v => new Decimal$(v)).optional(), +}); + +/** @internal */ +export type BillAllocation$Outbound = { + currency?: string | undefined; + currencyRate?: number | null | undefined; + allocatedOnDate?: string | undefined; + totalAmount?: number | undefined; +}; + +/** @internal */ +export const BillAllocation$outboundSchema: z.ZodType< + BillAllocation$Outbound, + z.ZodTypeDef, + BillAllocation +> = z.object({ + currency: z.string().optional(), + currencyRate: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + allocatedOnDate: z.string().optional(), + totalAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BillAllocation$ { + /** @deprecated use `BillAllocation$inboundSchema` instead. */ + export const inboundSchema = BillAllocation$inboundSchema; + /** @deprecated use `BillAllocation$outboundSchema` instead. */ + export const outboundSchema = BillAllocation$outboundSchema; + /** @deprecated use `BillAllocation$Outbound` instead. */ + export type Outbound = BillAllocation$Outbound; +} + +/** @internal */ +export const AccountingPaymentAllocation$inboundSchema: z.ZodType< + AccountingPaymentAllocation, + z.ZodTypeDef, + unknown +> = z.object({ + payment: PaymentAllocationPayment$inboundSchema, + allocation: z.lazy(() => BillAllocation$inboundSchema), +}); + +/** @internal */ +export type AccountingPaymentAllocation$Outbound = { + payment: PaymentAllocationPayment$Outbound; + allocation: BillAllocation$Outbound; +}; + +/** @internal */ +export const AccountingPaymentAllocation$outboundSchema: z.ZodType< + AccountingPaymentAllocation$Outbound, + z.ZodTypeDef, + AccountingPaymentAllocation +> = z.object({ + payment: PaymentAllocationPayment$outboundSchema, + allocation: z.lazy(() => BillAllocation$outboundSchema), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace AccountingPaymentAllocation$ { + /** @deprecated use `AccountingPaymentAllocation$inboundSchema` instead. */ + export const inboundSchema = AccountingPaymentAllocation$inboundSchema; + /** @deprecated use `AccountingPaymentAllocation$outboundSchema` instead. */ + export const outboundSchema = AccountingPaymentAllocation$outboundSchema; + /** @deprecated use `AccountingPaymentAllocation$Outbound` instead. */ + export type Outbound = AccountingPaymentAllocation$Outbound; +} + +/** @internal */ +export const Bill$inboundSchema: z.ZodType = z + .object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + reference: z.nullable(z.string()).optional(), + supplierRef: SupplierRef$inboundSchema.optional(), + purchaseOrderRefs: z.nullable( + z.array(z.lazy(() => PurchaseOrderReference$inboundSchema)), + ).optional(), + issueDate: z.string(), + dueDate: z.string().optional(), + currency: z.string().optional(), + currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + lineItems: z.nullable(z.array(BillLineItem$inboundSchema)).optional(), + withholdingTax: z.nullable( + z.array(z.lazy(() => WithholdingTax$inboundSchema)), + ).optional(), + status: BillStatus$inboundSchema, + subTotal: z.number().transform(v => new Decimal$(v)), + taxAmount: z.number().transform(v => new Decimal$(v)), + totalAmount: z.number().transform(v => new Decimal$(v)), + amountDue: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + note: z.nullable(z.string()).optional(), + paymentAllocations: z.nullable( + z.array(z.lazy(() => AccountingPaymentAllocation$inboundSchema)), + ).optional(), + metadata: Metadata$inboundSchema.optional(), + supplementalData: SupplementalData$inboundSchema.optional(), + }); + +/** @internal */ +export type Bill$Outbound = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + id?: string | undefined; + reference?: string | null | undefined; + supplierRef?: SupplierRef$Outbound | undefined; + purchaseOrderRefs?: Array | null | undefined; + issueDate: string; + dueDate?: string | undefined; + currency?: string | undefined; + currencyRate?: number | null | undefined; + lineItems?: Array | null | undefined; + withholdingTax?: Array | null | undefined; + status: string; + subTotal: number; + taxAmount: number; + totalAmount: number; + amountDue?: number | null | undefined; + note?: string | null | undefined; + paymentAllocations?: + | Array + | null + | undefined; + metadata?: Metadata$Outbound | undefined; + supplementalData?: SupplementalData$Outbound | undefined; +}; + +/** @internal */ +export const Bill$outboundSchema: z.ZodType = + z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + reference: z.nullable(z.string()).optional(), + supplierRef: SupplierRef$outboundSchema.optional(), + purchaseOrderRefs: z.nullable( + z.array(z.lazy(() => PurchaseOrderReference$outboundSchema)), + ).optional(), + issueDate: z.string(), + dueDate: z.string().optional(), + currency: z.string().optional(), + currencyRate: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + lineItems: z.nullable(z.array(BillLineItem$outboundSchema)).optional(), + withholdingTax: z.nullable( + z.array(z.lazy(() => WithholdingTax$outboundSchema)), + ).optional(), + status: BillStatus$outboundSchema, + subTotal: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + taxAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + totalAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + amountDue: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + note: z.nullable(z.string()).optional(), + paymentAllocations: z.nullable( + z.array(z.lazy(() => AccountingPaymentAllocation$outboundSchema)), + ).optional(), + metadata: Metadata$outboundSchema.optional(), + supplementalData: SupplementalData$outboundSchema.optional(), + }); /** - * Bills are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ -export class Bill extends SpeakeasyBase { - /** - * Amount outstanding on the bill. - */ - @SpeakeasyMetadata() - @Expose({ name: "amountDue" }) - amountDue?: number; - - /** - * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. - * - * @remarks - * - * ## 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. - */ - @SpeakeasyMetadata() - @Expose({ name: "currency" }) - currency?: string; - - @SpeakeasyMetadata() - @Expose({ name: "dueDate" }) - dueDate?: string; - - /** - * Identifier for the bill, unique for the company in the accounting platform. - */ - @SpeakeasyMetadata() - @Expose({ name: "id" }) - id?: string; - - @SpeakeasyMetadata() - @Expose({ name: "issueDate" }) - issueDate?: string; - - /** - * Array of Bill line items. - */ - @SpeakeasyMetadata({ elemType: BillLineItem }) - @Expose({ name: "lineItems" }) - @Type(() => BillLineItem) - lineItems?: BillLineItem[]; - - /** - * User-friendly reference for the bill. - */ - @SpeakeasyMetadata() - @Expose({ name: "reference" }) - reference?: string; - - @SpeakeasyMetadata() - @Expose({ name: "sourceModifiedDate" }) - sourceModifiedDate?: string; - - /** - * Current state of the bill. - */ - @SpeakeasyMetadata() - @Expose({ name: "status" }) - status?: BillStatus; - - /** - * Reference to the supplier the record relates to. - */ - @SpeakeasyMetadata() - @Expose({ name: "supplierRef" }) - @Type(() => SupplierRef) - supplierRef?: SupplierRef; - - /** - * Amount of the bill, including tax. - */ - @SpeakeasyMetadata() - @Expose({ name: "totalAmount" }) - totalAmount?: number; +export namespace Bill$ { + /** @deprecated use `Bill$inboundSchema` instead. */ + export const inboundSchema = Bill$inboundSchema; + /** @deprecated use `Bill$outboundSchema` instead. */ + export const outboundSchema = Bill$outboundSchema; + /** @deprecated use `Bill$Outbound` instead. */ + export type Outbound = Bill$Outbound; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billcreditnote.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billcreditnote.ts new file mode 100644 index 000000000..7ca6fcec2 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billcreditnote.ts @@ -0,0 +1,417 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { + BillCreditNoteLineItem, + BillCreditNoteLineItem$inboundSchema, + BillCreditNoteLineItem$Outbound, + BillCreditNoteLineItem$outboundSchema, +} from "./billcreditnotelineitem.js"; +import { + BillCreditNoteStatus, + BillCreditNoteStatus$inboundSchema, + BillCreditNoteStatus$outboundSchema, +} from "./billcreditnotestatus.js"; +import { + Items, + Items$inboundSchema, + Items$Outbound, + Items$outboundSchema, +} from "./items.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} from "./metadata.js"; +import { + PaymentAllocationItems, + PaymentAllocationItems$inboundSchema, + PaymentAllocationItems$Outbound, + PaymentAllocationItems$outboundSchema, +} from "./paymentallocationitems.js"; +import { + SupplementalData, + SupplementalData$inboundSchema, + SupplementalData$Outbound, + SupplementalData$outboundSchema, +} from "./supplementaldata.js"; +import { + SupplierRef, + SupplierRef$inboundSchema, + SupplierRef$Outbound, + SupplierRef$outboundSchema, +} from "./supplierref.js"; + +/** + * Links the current record to the underlying record or data type that created it. + * + * @remarks + * + * For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. + */ +export type RecordReference = { + /** + * 'id' of the underlying record or data type. + */ + id?: string | undefined; + /** + * Allowed name of the 'dataType'. + */ + dataType?: string | undefined; +}; + +/** + * > **Bill credit notes or credit notes?** + * + * @remarks + * > + * > In Codat, bill credit notes represent accounts payable only. For accounts receivable, see [Credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/CreditNote). + * + * View the coverage for bill credit notes in the Data coverage explorer. + * + * ## Overview + * + * A bill credit note is issued by a supplier for the purpose of recording credit. For example, if a supplier was unable to fulfil an order that was placed by a business, or delivered damaged goods, they would issue a bill credit note. A bill credit note reduces the amount a business owes to the supplier. It can be refunded to the business or used to pay off future bills. + * + * In the Codat API, a bill credit note is an accounts payable record issued by a [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier). + * + * A bill credit note includes details of: + * * The original and remaining credit. + * * Any allocations of the credit against other records, such as [bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill). + * * The supplier that issued the bill credit note. + */ +export type BillCreditNote = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Identifier for the bill credit note that is unique to a company in the accounting software. + */ + id?: string | undefined; + /** + * Friendly reference for the bill credit note. + */ + billCreditNoteNumber?: string | null | undefined; + /** + * Reference to the supplier the record relates to. + */ + supplierRef?: SupplierRef | undefined; + withholdingTax?: Array | null | undefined; + /** + * Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. + */ + totalAmount: Decimal$ | number; + /** + * Total value of any discounts applied. + */ + totalDiscount: Decimal$ | number; + /** + * Total amount of the bill credit note, including discounts but excluding tax. + */ + subTotal: Decimal$ | number; + /** + * Amount of tax included in the bill credit note. + */ + totalTaxAmount: Decimal$ | number; + /** + * Percentage rate of any discount applied to the bill credit note. + */ + discountPercentage: Decimal$ | number; + /** + * Amount of the bill credit note that is still outstanding. + */ + remainingCredit?: Decimal$ | number | undefined; + /** + * Current state of the bill credit note + */ + status: BillCreditNoteStatus; + /** + * 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. + */ + issueDate?: string | 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. + */ + allocatedOnDate?: string | undefined; + /** + * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + * + * @remarks + * + * ## 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. + */ + currency?: string | undefined; + /** + * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. + * + * @remarks + * + * 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. | + */ + currencyRate?: Decimal$ | number | null | undefined; + /** + * An array of line + */ + lineItems?: Array | null | undefined; + /** + * An array of payment allocations. + */ + paymentAllocations?: Array | null | undefined; + /** + * An array of records the credit note was created from. + */ + createdFromRefs?: Array | null | undefined; + /** + * Any additional information about the bill credit note. + */ + note?: string | null | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; + metadata?: Metadata | undefined; +}; + +/** @internal */ +export const RecordReference$inboundSchema: z.ZodType< + RecordReference, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), + dataType: z.string().optional(), +}); + +/** @internal */ +export type RecordReference$Outbound = { + id?: string | undefined; + dataType?: string | undefined; +}; + +/** @internal */ +export const RecordReference$outboundSchema: z.ZodType< + RecordReference$Outbound, + z.ZodTypeDef, + RecordReference +> = z.object({ + id: z.string().optional(), + dataType: 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 RecordReference$ { + /** @deprecated use `RecordReference$inboundSchema` instead. */ + export const inboundSchema = RecordReference$inboundSchema; + /** @deprecated use `RecordReference$outboundSchema` instead. */ + export const outboundSchema = RecordReference$outboundSchema; + /** @deprecated use `RecordReference$Outbound` instead. */ + export type Outbound = RecordReference$Outbound; +} + +/** @internal */ +export const BillCreditNote$inboundSchema: z.ZodType< + BillCreditNote, + z.ZodTypeDef, + unknown +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + billCreditNoteNumber: z.nullable(z.string()).optional(), + supplierRef: SupplierRef$inboundSchema.optional(), + withholdingTax: z.nullable(z.array(Items$inboundSchema)).optional(), + totalAmount: z.number().transform(v => new Decimal$(v)), + totalDiscount: z.number().transform(v => new Decimal$(v)), + subTotal: z.number().transform(v => new Decimal$(v)), + totalTaxAmount: z.number().transform(v => new Decimal$(v)), + discountPercentage: z.number().transform(v => new Decimal$(v)), + remainingCredit: z.number().transform(v => new Decimal$(v)).optional(), + status: BillCreditNoteStatus$inboundSchema, + issueDate: z.string().optional(), + allocatedOnDate: z.string().optional(), + currency: z.string().optional(), + currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + lineItems: z.nullable(z.array(BillCreditNoteLineItem$inboundSchema)) + .optional(), + paymentAllocations: z.nullable(z.array(PaymentAllocationItems$inboundSchema)) + .optional(), + createdFromRefs: z.nullable( + z.array(z.lazy(() => RecordReference$inboundSchema)), + ).optional(), + note: z.nullable(z.string()).optional(), + supplementalData: SupplementalData$inboundSchema.optional(), + metadata: Metadata$inboundSchema.optional(), +}); + +/** @internal */ +export type BillCreditNote$Outbound = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + id?: string | undefined; + billCreditNoteNumber?: string | null | undefined; + supplierRef?: SupplierRef$Outbound | undefined; + withholdingTax?: Array | null | undefined; + totalAmount: number; + totalDiscount: number; + subTotal: number; + totalTaxAmount: number; + discountPercentage: number; + remainingCredit?: number | undefined; + status: string; + issueDate?: string | undefined; + allocatedOnDate?: string | undefined; + currency?: string | undefined; + currencyRate?: number | null | undefined; + lineItems?: Array | null | undefined; + paymentAllocations?: + | Array + | null + | undefined; + createdFromRefs?: Array | null | undefined; + note?: string | null | undefined; + supplementalData?: SupplementalData$Outbound | undefined; + metadata?: Metadata$Outbound | undefined; +}; + +/** @internal */ +export const BillCreditNote$outboundSchema: z.ZodType< + BillCreditNote$Outbound, + z.ZodTypeDef, + BillCreditNote +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + billCreditNoteNumber: z.nullable(z.string()).optional(), + supplierRef: SupplierRef$outboundSchema.optional(), + withholdingTax: z.nullable(z.array(Items$outboundSchema)).optional(), + totalAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + totalDiscount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + subTotal: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + totalTaxAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + discountPercentage: z.union([z.instanceof(Decimal$), z.number()]).transform( + v => typeof v === "number" ? v : v.toNumber() + ), + remainingCredit: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ).optional(), + status: BillCreditNoteStatus$outboundSchema, + issueDate: z.string().optional(), + allocatedOnDate: z.string().optional(), + currency: z.string().optional(), + currencyRate: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + lineItems: z.nullable(z.array(BillCreditNoteLineItem$outboundSchema)) + .optional(), + paymentAllocations: z.nullable(z.array(PaymentAllocationItems$outboundSchema)) + .optional(), + createdFromRefs: z.nullable( + z.array(z.lazy(() => RecordReference$outboundSchema)), + ).optional(), + note: z.nullable(z.string()).optional(), + supplementalData: SupplementalData$outboundSchema.optional(), + metadata: Metadata$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 BillCreditNote$ { + /** @deprecated use `BillCreditNote$inboundSchema` instead. */ + export const inboundSchema = BillCreditNote$inboundSchema; + /** @deprecated use `BillCreditNote$outboundSchema` instead. */ + export const outboundSchema = BillCreditNote$outboundSchema; + /** @deprecated use `BillCreditNote$Outbound` instead. */ + export type Outbound = BillCreditNote$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billcreditnotelineitem.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billcreditnotelineitem.ts new file mode 100644 index 000000000..09c0bde61 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billcreditnotelineitem.ts @@ -0,0 +1,456 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { + AccountRef, + AccountRef$inboundSchema, + AccountRef$Outbound, + AccountRef$outboundSchema, +} from "./accountref.js"; +import { + BilledToType, + BilledToType$inboundSchema, + BilledToType$outboundSchema, +} from "./billedtotype.js"; +import { + TaxRateRef, + TaxRateRef$inboundSchema, + TaxRateRef$Outbound, + TaxRateRef$outboundSchema, +} from "./taxrateref.js"; +import { + TrackingCategoryRef, + TrackingCategoryRef$inboundSchema, + TrackingCategoryRef$Outbound, + TrackingCategoryRef$outboundSchema, +} from "./trackingcategoryref.js"; +import { + Zero, + Zero$inboundSchema, + Zero$Outbound, + Zero$outboundSchema, +} from "./zero.js"; + +/** + * Reference to the item the line is linked to. + */ +export type ItemReference = { + /** + * Unique identifier for the item in the accounting software. + */ + id: string; + /** + * Name of the item in the accounting software. + */ + name?: string | null | undefined; +}; + +export type BillCreditNoteLineItemCustomerRef = { + /** + * `id` from the Customers data type + */ + id: string; + /** + * `customerName` from the Customer data type + */ + companyName?: string | null | undefined; +}; + +export type BillCreditNoteLineItemAccountingProjectReference = { + /** + * Unique identifier to the project reference. + */ + id: string; + /** + * The project's name. + */ + name?: string | null | undefined; +}; + +/** + * Categories, and a project and customer, against which the item is tracked. + */ +export type BillCreditNoteLineItemTracking = { + categoryRefs: Array; + customerRef?: BillCreditNoteLineItemCustomerRef | undefined; + projectRef?: BillCreditNoteLineItemAccountingProjectReference | undefined; + /** + * Defines if the invoice or credit note is billed/rebilled to a project or customer. + */ + isBilledTo: BilledToType; + /** + * Defines if the invoice or credit note is billed/rebilled to a project or customer. + */ + isRebilledTo: BilledToType; +}; + +export type BillCreditNoteLineItem = { + /** + * Friendly name of each line item. For example, the goods or service for which credit has been received. + */ + description?: string | null | undefined; + /** + * Unit price of the goods or service. + */ + unitAmount: Decimal$ | number; + /** + * Number of units of the goods or service for which credit has been received. + */ + quantity: Decimal$ | number; + /** + * The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). + */ + unitOfMeasurement?: string | null | undefined; + /** + * Value of any discounts applied. + */ + discountAmount?: Decimal$ | number | null | undefined; + /** + * Amount of credit associated with the line item, including discounts but excluding tax. + */ + subTotal?: Decimal$ | number | null | undefined; + /** + * Amount of tax associated with the line item. + */ + taxAmount?: Decimal$ | number | null | undefined; + /** + * Total amount of the line item, including discounts and tax. + */ + totalAmount?: Decimal$ | number | null | undefined; + /** + * 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. + */ + accountRef?: AccountRef | undefined; + /** + * Percentage rate of any discount applied to the line item. + */ + discountPercentage?: Decimal$ | number | null | undefined; + /** + * Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate. + * + * @remarks + * + * Found on: + * + * - Bill line items + * - Bill Credit Note line items + * - Credit Note line items + * - Direct incomes line items + * - Invoice line items + * - Items + */ + taxRateRef?: TaxRateRef | undefined; + /** + * Reference to the item the line is linked to. + */ + itemRef?: ItemReference | undefined; + /** + * Links the current record line to the underlying record line that created it. + * + * @remarks + * + * For example, if a bill is generated from a purchase order, this property allows you to connect the bill line item to the purchase order line item in our data model. + */ + createdFromLineRef?: Zero | undefined; + /** + * Reference to the tracking categories to which the line item is linked. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + trackingCategoryRefs?: Array | null | undefined; + /** + * Categories, and a project and customer, against which the item is tracked. + */ + tracking?: BillCreditNoteLineItemTracking | undefined; +}; + +/** @internal */ +export const ItemReference$inboundSchema: z.ZodType< + ItemReference, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + name: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type ItemReference$Outbound = { + id: string; + name?: string | null | undefined; +}; + +/** @internal */ +export const ItemReference$outboundSchema: z.ZodType< + ItemReference$Outbound, + z.ZodTypeDef, + ItemReference +> = z.object({ + id: z.string(), + name: 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 ItemReference$ { + /** @deprecated use `ItemReference$inboundSchema` instead. */ + export const inboundSchema = ItemReference$inboundSchema; + /** @deprecated use `ItemReference$outboundSchema` instead. */ + export const outboundSchema = ItemReference$outboundSchema; + /** @deprecated use `ItemReference$Outbound` instead. */ + export type Outbound = ItemReference$Outbound; +} + +/** @internal */ +export const BillCreditNoteLineItemCustomerRef$inboundSchema: z.ZodType< + BillCreditNoteLineItemCustomerRef, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + companyName: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type BillCreditNoteLineItemCustomerRef$Outbound = { + id: string; + companyName?: string | null | undefined; +}; + +/** @internal */ +export const BillCreditNoteLineItemCustomerRef$outboundSchema: z.ZodType< + BillCreditNoteLineItemCustomerRef$Outbound, + z.ZodTypeDef, + BillCreditNoteLineItemCustomerRef +> = z.object({ + id: z.string(), + companyName: 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 BillCreditNoteLineItemCustomerRef$ { + /** @deprecated use `BillCreditNoteLineItemCustomerRef$inboundSchema` instead. */ + export const inboundSchema = BillCreditNoteLineItemCustomerRef$inboundSchema; + /** @deprecated use `BillCreditNoteLineItemCustomerRef$outboundSchema` instead. */ + export const outboundSchema = + BillCreditNoteLineItemCustomerRef$outboundSchema; + /** @deprecated use `BillCreditNoteLineItemCustomerRef$Outbound` instead. */ + export type Outbound = BillCreditNoteLineItemCustomerRef$Outbound; +} + +/** @internal */ +export const BillCreditNoteLineItemAccountingProjectReference$inboundSchema: + z.ZodType< + BillCreditNoteLineItemAccountingProjectReference, + z.ZodTypeDef, + unknown + > = z.object({ + id: z.string(), + name: z.nullable(z.string()).optional(), + }); + +/** @internal */ +export type BillCreditNoteLineItemAccountingProjectReference$Outbound = { + id: string; + name?: string | null | undefined; +}; + +/** @internal */ +export const BillCreditNoteLineItemAccountingProjectReference$outboundSchema: + z.ZodType< + BillCreditNoteLineItemAccountingProjectReference$Outbound, + z.ZodTypeDef, + BillCreditNoteLineItemAccountingProjectReference + > = z.object({ + id: z.string(), + name: 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 BillCreditNoteLineItemAccountingProjectReference$ { + /** @deprecated use `BillCreditNoteLineItemAccountingProjectReference$inboundSchema` instead. */ + export const inboundSchema = + BillCreditNoteLineItemAccountingProjectReference$inboundSchema; + /** @deprecated use `BillCreditNoteLineItemAccountingProjectReference$outboundSchema` instead. */ + export const outboundSchema = + BillCreditNoteLineItemAccountingProjectReference$outboundSchema; + /** @deprecated use `BillCreditNoteLineItemAccountingProjectReference$Outbound` instead. */ + export type Outbound = + BillCreditNoteLineItemAccountingProjectReference$Outbound; +} + +/** @internal */ +export const BillCreditNoteLineItemTracking$inboundSchema: z.ZodType< + BillCreditNoteLineItemTracking, + z.ZodTypeDef, + unknown +> = z.object({ + categoryRefs: z.array(TrackingCategoryRef$inboundSchema), + customerRef: z.lazy(() => BillCreditNoteLineItemCustomerRef$inboundSchema) + .optional(), + projectRef: z.lazy(() => + BillCreditNoteLineItemAccountingProjectReference$inboundSchema + ).optional(), + isBilledTo: BilledToType$inboundSchema, + isRebilledTo: BilledToType$inboundSchema, +}); + +/** @internal */ +export type BillCreditNoteLineItemTracking$Outbound = { + categoryRefs: Array; + customerRef?: BillCreditNoteLineItemCustomerRef$Outbound | undefined; + projectRef?: + | BillCreditNoteLineItemAccountingProjectReference$Outbound + | undefined; + isBilledTo: string; + isRebilledTo: string; +}; + +/** @internal */ +export const BillCreditNoteLineItemTracking$outboundSchema: z.ZodType< + BillCreditNoteLineItemTracking$Outbound, + z.ZodTypeDef, + BillCreditNoteLineItemTracking +> = z.object({ + categoryRefs: z.array(TrackingCategoryRef$outboundSchema), + customerRef: z.lazy(() => BillCreditNoteLineItemCustomerRef$outboundSchema) + .optional(), + projectRef: z.lazy(() => + BillCreditNoteLineItemAccountingProjectReference$outboundSchema + ).optional(), + isBilledTo: BilledToType$outboundSchema, + isRebilledTo: BilledToType$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BillCreditNoteLineItemTracking$ { + /** @deprecated use `BillCreditNoteLineItemTracking$inboundSchema` instead. */ + export const inboundSchema = BillCreditNoteLineItemTracking$inboundSchema; + /** @deprecated use `BillCreditNoteLineItemTracking$outboundSchema` instead. */ + export const outboundSchema = BillCreditNoteLineItemTracking$outboundSchema; + /** @deprecated use `BillCreditNoteLineItemTracking$Outbound` instead. */ + export type Outbound = BillCreditNoteLineItemTracking$Outbound; +} + +/** @internal */ +export const BillCreditNoteLineItem$inboundSchema: z.ZodType< + BillCreditNoteLineItem, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.nullable(z.string()).optional(), + unitAmount: z.number().transform(v => new Decimal$(v)), + quantity: z.number().transform(v => new Decimal$(v)), + unitOfMeasurement: z.nullable(z.string()).optional(), + discountAmount: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + subTotal: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), + taxAmount: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), + totalAmount: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + accountRef: AccountRef$inboundSchema.optional(), + discountPercentage: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + taxRateRef: TaxRateRef$inboundSchema.optional(), + itemRef: z.lazy(() => ItemReference$inboundSchema).optional(), + createdFromLineRef: Zero$inboundSchema.optional(), + trackingCategoryRefs: z.nullable(z.array(TrackingCategoryRef$inboundSchema)) + .optional(), + tracking: z.lazy(() => BillCreditNoteLineItemTracking$inboundSchema) + .optional(), +}); + +/** @internal */ +export type BillCreditNoteLineItem$Outbound = { + description?: string | null | undefined; + unitAmount: number; + quantity: number; + unitOfMeasurement?: string | null | undefined; + discountAmount?: number | null | undefined; + subTotal?: number | null | undefined; + taxAmount?: number | null | undefined; + totalAmount?: number | null | undefined; + accountRef?: AccountRef$Outbound | undefined; + discountPercentage?: number | null | undefined; + taxRateRef?: TaxRateRef$Outbound | undefined; + itemRef?: ItemReference$Outbound | undefined; + createdFromLineRef?: Zero$Outbound | undefined; + trackingCategoryRefs?: Array | null | undefined; + tracking?: BillCreditNoteLineItemTracking$Outbound | undefined; +}; + +/** @internal */ +export const BillCreditNoteLineItem$outboundSchema: z.ZodType< + BillCreditNoteLineItem$Outbound, + z.ZodTypeDef, + BillCreditNoteLineItem +> = z.object({ + description: z.nullable(z.string()).optional(), + unitAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + quantity: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + unitOfMeasurement: z.nullable(z.string()).optional(), + discountAmount: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + subTotal: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + taxAmount: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + totalAmount: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + accountRef: AccountRef$outboundSchema.optional(), + discountPercentage: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + taxRateRef: TaxRateRef$outboundSchema.optional(), + itemRef: z.lazy(() => ItemReference$outboundSchema).optional(), + createdFromLineRef: Zero$outboundSchema.optional(), + trackingCategoryRefs: z.nullable(z.array(TrackingCategoryRef$outboundSchema)) + .optional(), + tracking: z.lazy(() => BillCreditNoteLineItemTracking$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 BillCreditNoteLineItem$ { + /** @deprecated use `BillCreditNoteLineItem$inboundSchema` instead. */ + export const inboundSchema = BillCreditNoteLineItem$inboundSchema; + /** @deprecated use `BillCreditNoteLineItem$outboundSchema` instead. */ + export const outboundSchema = BillCreditNoteLineItem$outboundSchema; + /** @deprecated use `BillCreditNoteLineItem$Outbound` instead. */ + export type Outbound = BillCreditNoteLineItem$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billcreditnotes.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billcreditnotes.ts new file mode 100644 index 000000000..287b88aea --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billcreditnotes.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { + BillCreditNote, + BillCreditNote$inboundSchema, + BillCreditNote$Outbound, + BillCreditNote$outboundSchema, +} from "./billcreditnote.js"; +import { + Links, + Links$inboundSchema, + Links$Outbound, + Links$outboundSchema, +} from "./links.js"; + +export type BillCreditNotes = { + results?: Array | undefined; + /** + * Current page number. + */ + pageNumber: number; + /** + * Number of items to return in results array. + */ + pageSize: number; + /** + * Total number of items. + */ + totalResults: number; + links: Links; +}; + +/** @internal */ +export const BillCreditNotes$inboundSchema: z.ZodType< + BillCreditNotes, + z.ZodTypeDef, + unknown +> = z.object({ + results: z.array(BillCreditNote$inboundSchema).optional(), + pageNumber: z.number().int(), + pageSize: z.number().int(), + totalResults: z.number().int(), + _links: Links$inboundSchema, +}).transform((v) => { + return remap$(v, { + "_links": "links", + }); +}); + +/** @internal */ +export type BillCreditNotes$Outbound = { + results?: Array | undefined; + pageNumber: number; + pageSize: number; + totalResults: number; + _links: Links$Outbound; +}; + +/** @internal */ +export const BillCreditNotes$outboundSchema: z.ZodType< + BillCreditNotes$Outbound, + z.ZodTypeDef, + BillCreditNotes +> = z.object({ + results: z.array(BillCreditNote$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 BillCreditNotes$ { + /** @deprecated use `BillCreditNotes$inboundSchema` instead. */ + export const inboundSchema = BillCreditNotes$inboundSchema; + /** @deprecated use `BillCreditNotes$outboundSchema` instead. */ + export const outboundSchema = BillCreditNotes$outboundSchema; + /** @deprecated use `BillCreditNotes$Outbound` instead. */ + export type Outbound = BillCreditNotes$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billcreditnotestatus.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billcreditnotestatus.ts new file mode 100644 index 000000000..af680c4f9 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billcreditnotestatus.ts @@ -0,0 +1,43 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Current state of the bill credit note + */ +export const BillCreditNoteStatus = { + Unknown: "Unknown", + Draft: "Draft", + Submitted: "Submitted", + Paid: "Paid", + Void: "Void", + PartiallyPaid: "PartiallyPaid", +} as const; +/** + * Current state of the bill credit note + */ +export type BillCreditNoteStatus = ClosedEnum; + +/** @internal */ +export const BillCreditNoteStatus$inboundSchema: z.ZodNativeEnum< + typeof BillCreditNoteStatus +> = z.nativeEnum(BillCreditNoteStatus); + +/** @internal */ +export const BillCreditNoteStatus$outboundSchema: z.ZodNativeEnum< + typeof BillCreditNoteStatus +> = BillCreditNoteStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BillCreditNoteStatus$ { + /** @deprecated use `BillCreditNoteStatus$inboundSchema` instead. */ + export const inboundSchema = BillCreditNoteStatus$inboundSchema; + /** @deprecated use `BillCreditNoteStatus$outboundSchema` instead. */ + export const outboundSchema = BillCreditNoteStatus$outboundSchema; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billedtotype.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billedtotype.ts new file mode 100644 index 000000000..ebd767f05 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billedtotype.ts @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Defines if the invoice or credit note is billed/rebilled to a project or customer. + */ +export const BilledToType = { + Unknown: "Unknown", + NotApplicable: "NotApplicable", + Customer: "Customer", + Project: "Project", +} as const; +/** + * Defines if the invoice or credit note is billed/rebilled to a project or customer. + */ +export type BilledToType = ClosedEnum; + +/** @internal */ +export const BilledToType$inboundSchema: z.ZodNativeEnum = + z.nativeEnum(BilledToType); + +/** @internal */ +export const BilledToType$outboundSchema: z.ZodNativeEnum = + BilledToType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BilledToType$ { + /** @deprecated use `BilledToType$inboundSchema` instead. */ + export const inboundSchema = BilledToType$inboundSchema; + /** @deprecated use `BilledToType$outboundSchema` instead. */ + export const outboundSchema = BilledToType$outboundSchema; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billeventpayload.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billeventpayload.ts deleted file mode 100644 index 47f3a0953..000000000 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billeventpayload.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { Bill } from "./bill"; -import { Expose, Type } from "class-transformer"; - -export class BillEventPayload extends SpeakeasyBase { - /** - * Bills are invoices that represent the SMB's financial obligations to their supplier for a purchase of goods or services. - */ - @SpeakeasyMetadata() - @Expose({ name: "bill" }) - @Type(() => Bill) - bill?: Bill; - - /** - * Unique identifier for your SMB in Codat. - */ - @SpeakeasyMetadata() - @Expose({ name: "companyId" }) - companyId?: string; - - /** - * Unique identifier for a company's data connection. - */ - @SpeakeasyMetadata() - @Expose({ name: "connectionId" }) - connectionId?: string; - - /** - * Unique identifier for the push operation. - */ - @SpeakeasyMetadata() - @Expose({ name: "pushOperationKey" }) - pushOperationKey?: string; -} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billeventwebhook.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billeventwebhook.ts deleted file mode 100644 index 6868b7a5f..000000000 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billeventwebhook.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { BillEventPayload } from "./billeventpayload"; -import { Expose, Type } from "class-transformer"; - -export class BillEventWebhook extends SpeakeasyBase { - /** - * The datetime in UTC of when the webhook event was produced by Codat. - */ - @SpeakeasyMetadata() - @Expose({ name: "createdDate" }) - createdDate?: string; - - /** - * Unique identifier of the bill event. - */ - @SpeakeasyMetadata() - @Expose({ name: "id" }) - id?: string; - - @SpeakeasyMetadata() - @Expose({ name: "payload" }) - @Type(() => BillEventPayload) - payload?: BillEventPayload; - - /** - * Type of webhook event. - */ - @SpeakeasyMetadata() - @Expose({ name: "type" }) - type?: string; -} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billlineitem.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billlineitem.ts index 927ef83fe..df3232289 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billlineitem.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billlineitem.ts @@ -1,104 +1,328 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { Expose, Type } from "class-transformer"; +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { + AccountRef, + AccountRef$inboundSchema, + AccountRef$Outbound, + AccountRef$outboundSchema, +} from "./accountref.js"; +import { + ItemRef, + ItemRef$inboundSchema, + ItemRef$Outbound, + ItemRef$outboundSchema, +} from "./itemref.js"; +import { + TaxRateRef, + TaxRateRef$inboundSchema, + TaxRateRef$Outbound, + TaxRateRef$outboundSchema, +} from "./taxrateref.js"; +import { + Tracking, + Tracking$inboundSchema, + Tracking$Outbound, + Tracking$outboundSchema, +} from "./tracking.js"; +import { + TrackingCategoryRef, + TrackingCategoryRef$inboundSchema, + TrackingCategoryRef$Outbound, + TrackingCategoryRef$outboundSchema, +} from "./trackingcategoryref.js"; /** - * Reference to the account to which the line item is linked. + * Allowed name of the 'dataType'. */ -export class AccountReference extends SpeakeasyBase { - /** - * 'id' from the Accounts data type. - */ - @SpeakeasyMetadata() - @Expose({ name: "id" }) - id?: string; - - /** - * 'name' from the Accounts data type. - */ - @SpeakeasyMetadata() - @Expose({ name: "name" }) - name?: string; -} +export const BillLineItemDataType = { + PurchaseOrders: "purchaseOrders", + Bills: "bills", +} as const; +/** + * Allowed name of the 'dataType'. + */ +export type BillLineItemDataType = ClosedEnum; /** - * Reference to the tax rate to which the line item is linked. + * Reference to the purchase order line this line was generated from. */ -export class TaxRateReference extends SpeakeasyBase { - /** - * Applicable tax rate. - */ - @SpeakeasyMetadata() - @Expose({ name: "effectiveTaxRate" }) - effectiveTaxRate?: number; +export type RecordLineReference = { + /** + * 'id' of the underlying record. + */ + id?: string | undefined; + /** + * Allowed name of the 'dataType'. + */ + dataType?: BillLineItemDataType | undefined; + /** + * Line number of the underlying record. + */ + lineNumber?: string | undefined; +}; - /** - * Unique identifier for the tax rate in the accounting platform. - */ - @SpeakeasyMetadata() - @Expose({ name: "id" }) - id?: string; +export type BillLineItem = { + /** + * The bill line's number. + */ + lineNumber?: string | null | undefined; + /** + * Friendly name of the goods or services received. + */ + description?: string | null | undefined; + /** + * Price of each unit of goods or services. + */ + unitAmount: Decimal$ | number; + /** + * Number of units of goods or services received. + */ + quantity: Decimal$ | number; + /** + * The measurement which defines a unit for this item (e.g. 'kilogram', 'litre'). + */ + unitOfMeasurement?: string | null | undefined; + /** + * Numerical value of any discounts applied. + * + * @remarks + * + * Do not use to apply discounts in Oracle NetSuite—see Oracle NetSuite integration reference. + */ + discountAmount?: Decimal$ | number | null | undefined; + /** + * Amount of the line, inclusive of discounts but exclusive of tax. + */ + subTotal?: Decimal$ | number | null | undefined; + /** + * Amount of tax for the line. + */ + taxAmount?: Decimal$ | number | null | undefined; + /** + * Total amount of the line, including tax. + */ + totalAmount?: Decimal$ | number | null | undefined; + /** + * Percentage rate of any discount applied to the bill. + */ + discountPercentage?: Decimal$ | number | null | undefined; + /** + * 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. + */ + accountRef?: AccountRef | undefined; + /** + * Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate. + * + * @remarks + * + * Found on: + * + * - Bill line items + * - Bill Credit Note line items + * - Credit Note line items + * - Direct incomes line items + * - Invoice line items + * - Items + */ + taxRateRef?: TaxRateRef | undefined; + /** + * Reference to the item the line is linked to. + */ + itemRef?: ItemRef | undefined; + purchaseOrderLineRef?: RecordLineReference | undefined; + /** + * Collection of categories against which this item is tracked. + */ + trackingCategoryRefs?: Array | null | undefined; + /** + * Categories, and a project and customer, against which the item is tracked. + */ + tracking?: Tracking | undefined; + /** + * The bill is a direct cost if `True`. + */ + isDirectCost?: boolean | undefined; +}; - /** - * Name of the tax rate in the accounting platform. - */ - @SpeakeasyMetadata() - @Expose({ name: "name" }) - name?: string; +/** @internal */ +export const BillLineItemDataType$inboundSchema: z.ZodNativeEnum< + typeof BillLineItemDataType +> = z.nativeEnum(BillLineItemDataType); + +/** @internal */ +export const BillLineItemDataType$outboundSchema: z.ZodNativeEnum< + typeof BillLineItemDataType +> = BillLineItemDataType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BillLineItemDataType$ { + /** @deprecated use `BillLineItemDataType$inboundSchema` instead. */ + export const inboundSchema = BillLineItemDataType$inboundSchema; + /** @deprecated use `BillLineItemDataType$outboundSchema` instead. */ + export const outboundSchema = BillLineItemDataType$outboundSchema; } -export class BillLineItem extends SpeakeasyBase { - /** - * Reference to the account to which the line item is linked. - */ - @SpeakeasyMetadata() - @Expose({ name: "accountRef" }) - @Type(() => AccountReference) - accountRef?: AccountReference; +/** @internal */ +export const RecordLineReference$inboundSchema: z.ZodType< + RecordLineReference, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), + dataType: BillLineItemDataType$inboundSchema.optional(), + lineNumber: z.string().optional(), +}); - /** - * Friendly name of the goods or services received. - */ - @SpeakeasyMetadata() - @Expose({ name: "description" }) - description?: string; +/** @internal */ +export type RecordLineReference$Outbound = { + id?: string | undefined; + dataType?: string | undefined; + lineNumber?: string | undefined; +}; - /** - * Number of units of goods or services received. - */ - @SpeakeasyMetadata() - @Expose({ name: "quantity" }) - quantity: number; +/** @internal */ +export const RecordLineReference$outboundSchema: z.ZodType< + RecordLineReference$Outbound, + z.ZodTypeDef, + RecordLineReference +> = z.object({ + id: z.string().optional(), + dataType: BillLineItemDataType$outboundSchema.optional(), + lineNumber: z.string().optional(), +}); - /** - * Amount of tax applied to the line item. - */ - @SpeakeasyMetadata() - @Expose({ name: "taxAmount" }) - taxAmount?: number; +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace RecordLineReference$ { + /** @deprecated use `RecordLineReference$inboundSchema` instead. */ + export const inboundSchema = RecordLineReference$inboundSchema; + /** @deprecated use `RecordLineReference$outboundSchema` instead. */ + export const outboundSchema = RecordLineReference$outboundSchema; + /** @deprecated use `RecordLineReference$Outbound` instead. */ + export type Outbound = RecordLineReference$Outbound; +} - /** - * Reference to the tax rate to which the line item is linked. - */ - @SpeakeasyMetadata() - @Expose({ name: "taxRateRef" }) - @Type(() => TaxRateReference) - taxRateRef?: TaxRateReference; +/** @internal */ +export const BillLineItem$inboundSchema: z.ZodType< + BillLineItem, + z.ZodTypeDef, + unknown +> = z.object({ + lineNumber: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + unitAmount: z.number().transform(v => new Decimal$(v)), + quantity: z.number().transform(v => new Decimal$(v)), + unitOfMeasurement: z.nullable(z.string()).optional(), + discountAmount: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + subTotal: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), + taxAmount: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), + totalAmount: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + discountPercentage: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + accountRef: AccountRef$inboundSchema.optional(), + taxRateRef: TaxRateRef$inboundSchema.optional(), + itemRef: ItemRef$inboundSchema.optional(), + purchaseOrderLineRef: z.lazy(() => RecordLineReference$inboundSchema) + .optional(), + trackingCategoryRefs: z.nullable(z.array(TrackingCategoryRef$inboundSchema)) + .optional(), + tracking: Tracking$inboundSchema.optional(), + isDirectCost: z.boolean().optional(), +}); - /** - * Total amount of the line, including tax. - */ - @SpeakeasyMetadata() - @Expose({ name: "totalAmount" }) - totalAmount?: number; +/** @internal */ +export type BillLineItem$Outbound = { + lineNumber?: string | null | undefined; + description?: string | null | undefined; + unitAmount: number; + quantity: number; + unitOfMeasurement?: string | null | undefined; + discountAmount?: number | null | undefined; + subTotal?: number | null | undefined; + taxAmount?: number | null | undefined; + totalAmount?: number | null | undefined; + discountPercentage?: number | null | undefined; + accountRef?: AccountRef$Outbound | undefined; + taxRateRef?: TaxRateRef$Outbound | undefined; + itemRef?: ItemRef$Outbound | undefined; + purchaseOrderLineRef?: RecordLineReference$Outbound | undefined; + trackingCategoryRefs?: Array | null | undefined; + tracking?: Tracking$Outbound | undefined; + isDirectCost?: boolean | undefined; +}; - /** - * Unit price of the goods or service. - */ - @SpeakeasyMetadata() - @Expose({ name: "unitAmount" }) - unitAmount?: number; +/** @internal */ +export const BillLineItem$outboundSchema: z.ZodType< + BillLineItem$Outbound, + z.ZodTypeDef, + BillLineItem +> = z.object({ + lineNumber: z.nullable(z.string()).optional(), + description: z.nullable(z.string()).optional(), + unitAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + quantity: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + unitOfMeasurement: z.nullable(z.string()).optional(), + discountAmount: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + subTotal: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + taxAmount: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + totalAmount: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + discountPercentage: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + accountRef: AccountRef$outboundSchema.optional(), + taxRateRef: TaxRateRef$outboundSchema.optional(), + itemRef: ItemRef$outboundSchema.optional(), + purchaseOrderLineRef: z.lazy(() => RecordLineReference$outboundSchema) + .optional(), + trackingCategoryRefs: z.nullable(z.array(TrackingCategoryRef$outboundSchema)) + .optional(), + tracking: Tracking$outboundSchema.optional(), + isDirectCost: 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 BillLineItem$ { + /** @deprecated use `BillLineItem$inboundSchema` instead. */ + export const inboundSchema = BillLineItem$inboundSchema; + /** @deprecated use `BillLineItem$outboundSchema` instead. */ + export const outboundSchema = BillLineItem$outboundSchema; + /** @deprecated use `BillLineItem$Outbound` instead. */ + export type Outbound = BillLineItem$Outbound; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpayment.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpayment.ts new file mode 100644 index 000000000..063e5207d --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpayment.ts @@ -0,0 +1,359 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { + AccountRef, + AccountRef$inboundSchema, + AccountRef$Outbound, + AccountRef$outboundSchema, +} from "./accountref.js"; +import { + BillPaymentLine, + BillPaymentLine$inboundSchema, + BillPaymentLine$Outbound, + BillPaymentLine$outboundSchema, +} from "./billpaymentline.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} from "./metadata.js"; +import { + PaymentMethodRef, + PaymentMethodRef$inboundSchema, + PaymentMethodRef$Outbound, + PaymentMethodRef$outboundSchema, +} from "./paymentmethodref.js"; +import { + SupplementalData, + SupplementalData$inboundSchema, + SupplementalData$Outbound, + SupplementalData$outboundSchema, +} from "./supplementaldata.js"; +import { + SupplierRef, + SupplierRef$inboundSchema, + SupplierRef$Outbound, + SupplierRef$outboundSchema, +} from "./supplierref.js"; + +/** + * > **Bill payments or payments?** + * + * @remarks + * > + * > We distinguish between transactions where the company received money vs. paid money. If the transaction represents a company spending money (accounts payable) we call this a Bill payment. + * > + * > See [payments](https://docs.codat.io/sync-for-payables-api#/schemas/Payment) for the accounts receivable equivalent of Bill payments, which covers [invoices](https://docs.codat.io/sync-for-payables-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/CreditNote). + * + * > View the coverage for bill payments in the Data coverage explorer. + * + * ## Overview + * + * Bill payments include all accounts payable transaction data ([bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) and [credit notes against bills](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote)). + * + * A bill payment in Codat usually represents an allocation of money within any customer accounts payable account. This includes, but is not strictly limited to: + * + * - A payment made against a bill — for example, a credit card payment, cheque payment, or cash payment. + * - An allocation of a supplier's credit note to a bill or perhaps a refund. + * - A bill payment made directly to an accounts payable account. This could be an overpayment or a prepayment, or a refund of a payment made directly to an accounts payable account. + * + * Depending on the bill payments which are allowed by the underlying accounting software, some of these types may be combined. Please see the example data section for samples of what these cases look like. + * + * In Codat, a bill payment contains details of: + * + * - When the bill payment was recorded in the accounting system. + * - How much it is for and in the currency. + * - Who the payment has been paid to, the _supplier_. + * - The types of bill payments, the _line items_. + * + * Some accounting software give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's _expenses_. You can find these types of transactions in our [Direct costs](https://docs.codat.io/sync-for-payables-api#/schemas/DirectCost) data model. + * + * Bill payments is a child data type of [account transactions](https://docs.codat.io/sync-for-payables-api#/schemas/AccountTransaction). + * + * --- + * + * ## Bill payment types + * + * ### Payment of a bill + * + * A payment paying a single bill should have the following properties: + * + * - A `totalAmount` indicating the amount of the bill that was paid. This is always positive. + * - A `lines` array containing one element with the following properties: + * - An `amount` equal to the `totalAmount` above. + * - A `links` array containing one element with the following properties: + * - A `type` indicating the type of link, in this case a `Bill`. + * - An `id` containing the ID of the bill that was paid. + * - An amount of `-totalAmount` (negative `totalAmount`), indicating that the entirety of the paid amount is allocated to the bill. + * + * ### Payment of multiple bills + * + * It is possible for one payment to pay multiple bills. This can be represented using two possible formats, depending on how the supplier keeps their books: + * + * 1. The payment has multiple entries in its **lines** array, one for each bill that is paid. Each line will follow the above example for paying a bill, and the rules detailed in the data model. + * 2. The payment has a line with multiple links to each bill. This occurs when the proportion of the original payment allocated to each bill is not available. + * + * Each line is the same as those described above, with the **amount** indicating how much of the payment is allocated to the bill. The **amount** on the lines sum to the **totalAmount** on the payment. + * + * > Pushing batch payments to Xero + * > + * > When pushing a single bill payment to Xero to pay multiple bills, only the first format is supported—multiple entries in the payment **lines** array. + * + * ### Payments and refunds on account + * + * A payment on account, that is a payment that doesn’t pay a specific bill, has one entry in its lines array. + * + * The line has the following properties: + * + * - A **totalAmount** indicating the amount paid by a supplier or refunded to them by a company. A payment to the supplier is always negative. A refund is always positive. + * - A **links** array containing one element with the following properties: + * - A **type** indicating the type of link. For a payment this is `PaymentOnAccount`. For a refund this is `Refund`. + * - The **id** containing the ID of the supplier. + * - An amount for the link is `0` **totalAmount** or the amount of the payment or refund. + * + * It is possible to have a payment that is part on account and part allocated to a bill. Each line should follow the examples above. + * + * ### Using a credit note to pay a bill + * + * The payment of a bill using a credit note has one entry in its `lines` array. This **line** has the following properties: + * + * - An **amount** indicating the amount of money moved, which in this case is `0`, as the credit note and bill allocation must balance each other. + * - A **links** array containing two elements: + * - The first link has: + * - A **type** indicating the type of link, in this case a `Bill`. + * - An **id** containing the ID of the bill that was paid. + * - The second link has: + * - A **type** indicating the type of link, in this case a `CreditNote`. + * - An **id** containing the ID of the credit note used by this payment. + * + * The **amount** field on the **line** equals the **totalAmount** on the payment. + * + * ### Refunding a credit note + * + * A bill payment refunding a credit note has one entry in its **lines** array. This line has the following properties: + * + * - An **amount** indicating the amount of the credit note that was refunded. This is always negative, indicating that it is a refund. + * - A **links** array containing one element with the following properties: + * - A **type** indicating the type of `link`, in this case a `CreditNote`. + * - An **id** containing the ID of the credit note that was refunded. + * + * The **totalAmount** field on the payment equals the line's **amount** field. These are both negative, as this is money leaving accounts payable. + * + * ### Refunding a payment + * + * If a payment is refunded, for example, when a company overpaid a bill and the overpayment is returned, there are two payment records: + * + * - One for the incoming overpayment. + * - Another for the outgoing refund. + * + * The payment issuing the refund is identified by the fact that the **totalAmount** is negative. This payment has one entry in its lines array that have the following properties: + * + * - An **amount** indicating the amount that was refunded. This is always negative. + * - A **links** array containing one element with the following properties: + * - A **type** indicating the type of a the link, in this case a `BillPayment`. + * - An **id** containing the ID of the payment that was refunded. + * + * The **amount** field on the line equals the **totalAmount** on the payment and is negative as this is money leaving accounts payable. + * + * The payment that was refunded can be identified as it has a line where the `amount` on its `line` is positive and the type of the link is `Refund`. This payment may have several entries in its **lines** array if it was partly used to pay an bill. For example, a £1,050 payment paying a £1,000 bill with a refund of £50 has two lines: + * + * - One for £1,000 linked to the bill that was paid + * - Another for £50 linked to the payment that refunded the over payment. This link is of type `Refund` but the ID corresponds to a bill payment. + * + * The line linked to the bill payment has the following properties: + * + * - An **amount** indicating the amount that was refunded. This is positive as its money that was added to accounts payable, but is balanced out by the negative amount of the refund. + * - A **links** array containing one element with the following properties: + * - A **type** indicating the type of the link, in this case a `Refund`. + * - An **id** containing the ID of the payment that refunded this line. + * + * > Linked payments + * > + * > Not all accounting software support linked payments in this way. In these platforms you may see a payment on account and a refund on account. + * + * ## Foreign currencies + * + * There are two types of currency rate that are detailed in the bill payments data type: + * + * Payment currency rate: + * + * - Base currency of the accounts payable account. + * - Foreign currency of the bill payment. + * + * Payment line link currency rate: + * + * - Base currency of the item that the link represents. + * - Foreign currency of the payment. + * + * These two rates allow the calculation of currency loss or gain for any of the transactions affected by the payment lines. The second rate is used when a bill payment is applied to an item in a currency that does not match either: + * + * - The base currency for the accounts payable account. + * - The currency of the item. + */ +export type BillPayment = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Identifier for the bill payment, unique for the company in the accounting software. + */ + id?: string | undefined; + supplierRef?: SupplierRef | undefined; + /** + * 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. + */ + accountRef?: AccountRef | undefined; + /** + * Amount of the payment in the payment currency. This value never changes and represents the amount of money that is paid into the supplier's account. + */ + totalAmount?: Decimal$ | number | undefined; + currency?: string | undefined; + /** + * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. + * + * @remarks + * + * 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. | + */ + currencyRate?: Decimal$ | number | null | undefined; + date: string; + /** + * Additional information associated with the payment. + */ + note?: string | null | undefined; + paymentMethodRef?: PaymentMethodRef | undefined; + /** + * An array of bill payment lines. + */ + lines?: Array | null | undefined; + /** + * Additional information associated with the payment. + */ + reference?: string | null | undefined; + metadata?: Metadata | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; +}; + +/** @internal */ +export const BillPayment$inboundSchema: z.ZodType< + BillPayment, + z.ZodTypeDef, + unknown +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + supplierRef: SupplierRef$inboundSchema.optional(), + accountRef: AccountRef$inboundSchema.optional(), + totalAmount: z.number().transform(v => new Decimal$(v)).optional(), + currency: z.string().optional(), + currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + date: z.string(), + note: z.nullable(z.string()).optional(), + paymentMethodRef: PaymentMethodRef$inboundSchema.optional(), + lines: z.nullable(z.array(BillPaymentLine$inboundSchema)).optional(), + reference: z.nullable(z.string()).optional(), + metadata: Metadata$inboundSchema.optional(), + supplementalData: SupplementalData$inboundSchema.optional(), +}); + +/** @internal */ +export type BillPayment$Outbound = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + id?: string | undefined; + supplierRef?: SupplierRef$Outbound | undefined; + accountRef?: AccountRef$Outbound | undefined; + totalAmount?: number | undefined; + currency?: string | undefined; + currencyRate?: number | null | undefined; + date: string; + note?: string | null | undefined; + paymentMethodRef?: PaymentMethodRef$Outbound | undefined; + lines?: Array | null | undefined; + reference?: string | null | undefined; + metadata?: Metadata$Outbound | undefined; + supplementalData?: SupplementalData$Outbound | undefined; +}; + +/** @internal */ +export const BillPayment$outboundSchema: z.ZodType< + BillPayment$Outbound, + z.ZodTypeDef, + BillPayment +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + supplierRef: SupplierRef$outboundSchema.optional(), + accountRef: AccountRef$outboundSchema.optional(), + totalAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ).optional(), + currency: z.string().optional(), + currencyRate: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + date: z.string(), + note: z.nullable(z.string()).optional(), + paymentMethodRef: PaymentMethodRef$outboundSchema.optional(), + lines: z.nullable(z.array(BillPaymentLine$outboundSchema)).optional(), + reference: 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 BillPayment$ { + /** @deprecated use `BillPayment$inboundSchema` instead. */ + export const inboundSchema = BillPayment$inboundSchema; + /** @deprecated use `BillPayment$outboundSchema` instead. */ + export const outboundSchema = BillPayment$outboundSchema; + /** @deprecated use `BillPayment$Outbound` instead. */ + export type Outbound = BillPayment$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpaymentline.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpaymentline.ts new file mode 100644 index 000000000..026d790e0 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpaymentline.ts @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { + BillPaymentLineLink, + BillPaymentLineLink$inboundSchema, + BillPaymentLineLink$Outbound, + BillPaymentLineLink$outboundSchema, +} from "./billpaymentlinelink.js"; + +export type BillPaymentLine = { + /** + * Amount in the bill payment currency. + */ + amount: Decimal$ | number; + links?: Array | 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: + * + * @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. + */ + allocatedOnDate?: string | undefined; +}; + +/** @internal */ +export const BillPaymentLine$inboundSchema: z.ZodType< + BillPaymentLine, + z.ZodTypeDef, + unknown +> = z.object({ + amount: z.number().transform(v => new Decimal$(v)), + links: z.nullable(z.array(BillPaymentLineLink$inboundSchema)).optional(), + allocatedOnDate: z.string().optional(), +}); + +/** @internal */ +export type BillPaymentLine$Outbound = { + amount: number; + links?: Array | null | undefined; + allocatedOnDate?: string | undefined; +}; + +/** @internal */ +export const BillPaymentLine$outboundSchema: z.ZodType< + BillPaymentLine$Outbound, + z.ZodTypeDef, + BillPaymentLine +> = z.object({ + amount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + links: z.nullable(z.array(BillPaymentLineLink$outboundSchema)).optional(), + allocatedOnDate: 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 BillPaymentLine$ { + /** @deprecated use `BillPaymentLine$inboundSchema` instead. */ + export const inboundSchema = BillPaymentLine$inboundSchema; + /** @deprecated use `BillPaymentLine$outboundSchema` instead. */ + export const outboundSchema = BillPaymentLine$outboundSchema; + /** @deprecated use `BillPaymentLine$Outbound` instead. */ + export type Outbound = BillPaymentLine$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpaymentlinelink.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpaymentlinelink.ts new file mode 100644 index 000000000..eb213faf9 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpaymentlinelink.ts @@ -0,0 +1,121 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { + BillPaymentLineLinkType, + BillPaymentLineLinkType$inboundSchema, + BillPaymentLineLinkType$outboundSchema, +} from "./billpaymentlinelinktype.js"; + +export type BillPaymentLineLink = { + /** + * Types of links to bill payment lines. + */ + type: BillPaymentLineLinkType; + /** + * Unique identifier of the transaction represented by the link. + */ + id?: string | null | undefined; + /** + * Amount by which the balance of the linked entity is altered, in the currency of the linked entity. + * + * @remarks + * + * - A negative link amount reduces the outstanding amount on the accounts payable account. + * - A positive link amount increases the outstanding amount on the accounts payable account. + */ + amount?: Decimal$ | number | null | undefined; + /** + * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. + * + * @remarks + * + * 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. | + */ + currencyRate?: Decimal$ | number | null | undefined; +}; + +/** @internal */ +export const BillPaymentLineLink$inboundSchema: z.ZodType< + BillPaymentLineLink, + z.ZodTypeDef, + unknown +> = z.object({ + type: BillPaymentLineLinkType$inboundSchema, + id: z.nullable(z.string()).optional(), + amount: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), + currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), +}); + +/** @internal */ +export type BillPaymentLineLink$Outbound = { + type: string; + id?: string | null | undefined; + amount?: number | null | undefined; + currencyRate?: number | null | undefined; +}; + +/** @internal */ +export const BillPaymentLineLink$outboundSchema: z.ZodType< + BillPaymentLineLink$Outbound, + z.ZodTypeDef, + BillPaymentLineLink +> = z.object({ + type: BillPaymentLineLinkType$outboundSchema, + id: z.nullable(z.string()).optional(), + amount: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + currencyRate: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BillPaymentLineLink$ { + /** @deprecated use `BillPaymentLineLink$inboundSchema` instead. */ + export const inboundSchema = BillPaymentLineLink$inboundSchema; + /** @deprecated use `BillPaymentLineLink$outboundSchema` instead. */ + export const outboundSchema = BillPaymentLineLink$outboundSchema; + /** @deprecated use `BillPaymentLineLink$Outbound` instead. */ + export type Outbound = BillPaymentLineLink$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpaymentlinelinktype.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpaymentlinelinktype.ts new file mode 100644 index 000000000..0f52dcea5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpaymentlinelinktype.ts @@ -0,0 +1,49 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Types of links to bill payment lines. + */ +export const BillPaymentLineLinkType = { + Unknown: "Unknown", + Unlinked: "Unlinked", + Bill: "Bill", + Other: "Other", + CreditNote: "CreditNote", + BillPayment: "BillPayment", + PaymentOnAccount: "PaymentOnAccount", + Refund: "Refund", + ManualJournal: "ManualJournal", + Discount: "Discount", +} as const; +/** + * Types of links to bill payment lines. + */ +export type BillPaymentLineLinkType = ClosedEnum< + typeof BillPaymentLineLinkType +>; + +/** @internal */ +export const BillPaymentLineLinkType$inboundSchema: z.ZodNativeEnum< + typeof BillPaymentLineLinkType +> = z.nativeEnum(BillPaymentLineLinkType); + +/** @internal */ +export const BillPaymentLineLinkType$outboundSchema: z.ZodNativeEnum< + typeof BillPaymentLineLinkType +> = BillPaymentLineLinkType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BillPaymentLineLinkType$ { + /** @deprecated use `BillPaymentLineLinkType$inboundSchema` instead. */ + export const inboundSchema = BillPaymentLineLinkType$inboundSchema; + /** @deprecated use `BillPaymentLineLinkType$outboundSchema` instead. */ + export const outboundSchema = BillPaymentLineLinkType$outboundSchema; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpayments.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpayments.ts new file mode 100644 index 000000000..d2f8d7565 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billpayments.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { + BillPayment, + BillPayment$inboundSchema, + BillPayment$Outbound, + BillPayment$outboundSchema, +} from "./billpayment.js"; +import { + Links, + Links$inboundSchema, + Links$Outbound, + Links$outboundSchema, +} from "./links.js"; + +export type BillPayments = { + results?: Array | undefined; + /** + * Current page number. + */ + pageNumber: number; + /** + * Number of items to return in results array. + */ + pageSize: number; + /** + * Total number of items. + */ + totalResults: number; + links: Links; +}; + +/** @internal */ +export const BillPayments$inboundSchema: z.ZodType< + BillPayments, + z.ZodTypeDef, + unknown +> = z.object({ + results: z.array(BillPayment$inboundSchema).optional(), + pageNumber: z.number().int(), + pageSize: z.number().int(), + totalResults: z.number().int(), + _links: Links$inboundSchema, +}).transform((v) => { + return remap$(v, { + "_links": "links", + }); +}); + +/** @internal */ +export type BillPayments$Outbound = { + results?: Array | undefined; + pageNumber: number; + pageSize: number; + totalResults: number; + _links: Links$Outbound; +}; + +/** @internal */ +export const BillPayments$outboundSchema: z.ZodType< + BillPayments$Outbound, + z.ZodTypeDef, + BillPayments +> = z.object({ + results: z.array(BillPayment$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 BillPayments$ { + /** @deprecated use `BillPayments$inboundSchema` instead. */ + export const inboundSchema = BillPayments$inboundSchema; + /** @deprecated use `BillPayments$outboundSchema` instead. */ + export const outboundSchema = BillPayments$outboundSchema; + /** @deprecated use `BillPayments$Outbound` instead. */ + export type Outbound = BillPayments$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bills.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bills.ts index 251a5a349..35e58097b 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bills.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/bills.ts @@ -1,41 +1,88 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { Bill } from "./bill"; -import { Links } from "./links"; -import { Expose, Type } from "class-transformer"; +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { + Bill, + Bill$inboundSchema, + Bill$Outbound, + Bill$outboundSchema, +} from "./bill.js"; +import { + Links, + Links$inboundSchema, + Links$Outbound, + Links$outboundSchema, +} from "./links.js"; -export class Bills extends SpeakeasyBase { - @SpeakeasyMetadata() - @Expose({ name: "_links" }) - @Type(() => Links) - links: Links; +export type Bills = { + results?: Array | undefined; + /** + * Current page number. + */ + pageNumber: number; + /** + * Number of items to return in results array. + */ + pageSize: number; + /** + * Total number of items. + */ + totalResults: number; + links: Links; +}; - /** - * Current page number. - */ - @SpeakeasyMetadata() - @Expose({ name: "pageNumber" }) - pageNumber: number; +/** @internal */ +export const Bills$inboundSchema: z.ZodType = z + .object({ + results: z.array(Bill$inboundSchema).optional(), + pageNumber: z.number().int(), + pageSize: z.number().int(), + totalResults: z.number().int(), + _links: Links$inboundSchema, + }).transform((v) => { + return remap$(v, { + "_links": "links", + }); + }); - /** - * Number of items to return in results array. - */ - @SpeakeasyMetadata() - @Expose({ name: "pageSize" }) - pageSize: number; +/** @internal */ +export type Bills$Outbound = { + results?: Array | undefined; + pageNumber: number; + pageSize: number; + totalResults: number; + _links: Links$Outbound; +}; - @SpeakeasyMetadata({ elemType: Bill }) - @Expose({ name: "results" }) - @Type(() => Bill) - results?: Bill[]; +/** @internal */ +export const Bills$outboundSchema: z.ZodType< + Bills$Outbound, + z.ZodTypeDef, + Bills +> = z.object({ + results: z.array(Bill$outboundSchema).optional(), + pageNumber: z.number().int(), + pageSize: z.number().int(), + totalResults: z.number().int(), + links: Links$outboundSchema, +}).transform((v) => { + return remap$(v, { + links: "_links", + }); +}); - /** - * Total number of items. - */ - @SpeakeasyMetadata() - @Expose({ name: "totalResults" }) - totalResults: number; +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Bills$ { + /** @deprecated use `Bills$inboundSchema` instead. */ + export const inboundSchema = Bills$inboundSchema; + /** @deprecated use `Bills$outboundSchema` instead. */ + export const outboundSchema = Bills$outboundSchema; + /** @deprecated use `Bills$Outbound` instead. */ + export type Outbound = Bills$Outbound; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billstatus.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billstatus.ts index ccbff4698..5cbda83a1 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billstatus.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/billstatus.ts @@ -1,15 +1,41 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + /** * Current state of the bill. */ -export enum BillStatus { - Unknown = "Unknown", - Open = "Open", - PartiallyPaid = "PartiallyPaid", - Paid = "Paid", - Void = "Void", - Draft = "Draft", +export const BillStatus = { + Unknown: "Unknown", + Open: "Open", + PartiallyPaid: "PartiallyPaid", + Paid: "Paid", + Void: "Void", + Draft: "Draft", +} as const; +/** + * Current state of the bill. + */ +export type BillStatus = ClosedEnum; + +/** @internal */ +export const BillStatus$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(BillStatus); + +/** @internal */ +export const BillStatus$outboundSchema: z.ZodNativeEnum = + BillStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace BillStatus$ { + /** @deprecated use `BillStatus$inboundSchema` instead. */ + export const inboundSchema = BillStatus$inboundSchema; + /** @deprecated use `BillStatus$outboundSchema` instead. */ + export const outboundSchema = BillStatus$outboundSchema; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitreachedwebhook.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitreachedwebhook.ts index f74f75e1a..cf722aee9 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitreachedwebhook.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitreachedwebhook.ts @@ -1,59 +1,119 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { ClientRateLimitReachedWebhookData } from "./clientratelimitreachedwebhookdata"; -import { Expose, Type } from "class-transformer"; +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.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 class ClientRateLimitReachedWebhook extends SpeakeasyBase { - /** - * Unique identifier of the webhook event. - */ - @SpeakeasyMetadata() - @Expose({ name: "AlertId" }) - alertId?: string; +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; +}; - /** - * Unique identifier for your client in Codat. - */ - @SpeakeasyMetadata() - @Expose({ name: "ClientId" }) - clientId?: string; +/** @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", + }); +}); - /** - * Name of your client in Codat. - */ - @SpeakeasyMetadata() - @Expose({ name: "ClientName" }) - clientName?: string; +/** @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; +}; - @SpeakeasyMetadata() - @Expose({ name: "Data" }) - @Type(() => ClientRateLimitReachedWebhookData) - data?: ClientRateLimitReachedWebhookData; +/** @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", + }); +}); - /** - * A human readable message about the webhook. - */ - @SpeakeasyMetadata() - @Expose({ name: "Message" }) - message?: string; - - /** - * Unique identifier for the rule. - */ - @SpeakeasyMetadata() - @Expose({ name: "RuleId" }) - ruleId?: string; - - /** - * The type of rule. - */ - @SpeakeasyMetadata() - @Expose({ name: "RuleType" }) - ruleType?: string; +/** + * @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitreachedwebhookdata.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitreachedwebhookdata.ts index 4c242c003..9217995cc 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitreachedwebhookdata.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitreachedwebhookdata.ts @@ -1,42 +1,85 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { Expose } from "class-transformer"; +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; -export class ClientRateLimitReachedWebhookData extends SpeakeasyBase { - /** - * The number of available requests per day. - */ - @SpeakeasyMetadata() - @Expose({ name: "DailyQuota" }) - dailyQuota?: number; +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; +}; - /** - * 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. - */ - @SpeakeasyMetadata() - @Expose({ name: "ExpiresUtc" }) - expiresUtc?: string; +/** @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitresetwebhook.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitresetwebhook.ts index 466203516..17a19d34e 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitresetwebhook.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitresetwebhook.ts @@ -1,59 +1,119 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { ClientRateLimitResetWebhookData } from "./clientratelimitresetwebhookdata"; -import { Expose, Type } from "class-transformer"; +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.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 class ClientRateLimitResetWebhook extends SpeakeasyBase { - /** - * Unique identifier of the webhook event. - */ - @SpeakeasyMetadata() - @Expose({ name: "AlertId" }) - alertId?: string; +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; +}; - /** - * Unique identifier for your client in Codat. - */ - @SpeakeasyMetadata() - @Expose({ name: "ClientId" }) - clientId?: string; +/** @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", + }); +}); - /** - * Name of your client in Codat. - */ - @SpeakeasyMetadata() - @Expose({ name: "ClientName" }) - clientName?: string; +/** @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; +}; - @SpeakeasyMetadata() - @Expose({ name: "Data" }) - @Type(() => ClientRateLimitResetWebhookData) - data?: ClientRateLimitResetWebhookData; +/** @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", + }); +}); - /** - * A human readable message about the webhook. - */ - @SpeakeasyMetadata() - @Expose({ name: "Message" }) - message?: string; - - /** - * Unique identifier for the rule. - */ - @SpeakeasyMetadata() - @Expose({ name: "RuleId" }) - ruleId?: string; - - /** - * The type of rule. - */ - @SpeakeasyMetadata() - @Expose({ name: "RuleType" }) - ruleType?: string; +/** + * @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitresetwebhookdata.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitresetwebhookdata.ts index a58994176..a9cd1848f 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitresetwebhookdata.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitresetwebhookdata.ts @@ -1,56 +1,102 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { Expose } from "class-transformer"; +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; -export class ClientRateLimitResetWebhookData extends SpeakeasyBase { - /** - * The number of available requests per day. - */ - @SpeakeasyMetadata() - @Expose({ name: "DailyQuota" }) - dailyQuota?: number; +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; +}; - /** - * 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. - */ - @SpeakeasyMetadata() - @Expose({ name: "ExpiresUtc" }) - expiresUtc?: string; +/** @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", + }); +}); - /** - * Total number of request remaining for your client. - */ - @SpeakeasyMetadata() - @Expose({ name: "QuotaRemaining" }) - quotaRemaining?: number; +/** @internal */ +export type ClientRateLimitResetWebhookData$Outbound = { + QuotaRemaining?: number | null | undefined; + ResetReason?: string | undefined; + DailyQuota?: number | undefined; + ExpiresUtc?: string | undefined; +}; - /** - * The reason for your rate limit quota being reset. - */ - @SpeakeasyMetadata() - @Expose({ name: "ResetReason" }) - resetReason?: string; +/** @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitwebhook.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitwebhook.ts new file mode 100644 index 000000000..2e7886459 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitwebhook.ts @@ -0,0 +1,90 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + ClientRateLimitWebhookPayload, + ClientRateLimitWebhookPayload$inboundSchema, + ClientRateLimitWebhookPayload$Outbound, + ClientRateLimitWebhookPayload$outboundSchema, +} from "./clientratelimitwebhookpayload.js"; + +export type ClientRateLimitWebhook = { + /** + * Unique identifier of the event. + */ + id?: string | undefined; + /** + * The type of event. + */ + eventType?: string | 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. + */ + generatedDate?: string | undefined; + payload?: ClientRateLimitWebhookPayload | undefined; +}; + +/** @internal */ +export const ClientRateLimitWebhook$inboundSchema: z.ZodType< + ClientRateLimitWebhook, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), + eventType: z.string().optional(), + generatedDate: z.string().optional(), + payload: ClientRateLimitWebhookPayload$inboundSchema.optional(), +}); + +/** @internal */ +export type ClientRateLimitWebhook$Outbound = { + id?: string | undefined; + eventType?: string | undefined; + generatedDate?: string | undefined; + payload?: ClientRateLimitWebhookPayload$Outbound | undefined; +}; + +/** @internal */ +export const ClientRateLimitWebhook$outboundSchema: z.ZodType< + ClientRateLimitWebhook$Outbound, + z.ZodTypeDef, + ClientRateLimitWebhook +> = z.object({ + id: z.string().optional(), + eventType: z.string().optional(), + generatedDate: z.string().optional(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitwebhookpayload.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitwebhookpayload.ts new file mode 100644 index 000000000..64fcc380d --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/clientratelimitwebhookpayload.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ClientRateLimitWebhookPayload = { + /** + * The number of available requests per day. + */ + dailyQuota?: number | undefined; + /** + * Total number of requests remaining for your client. + */ + quotaRemaining?: 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. + */ + expiryDate?: string | undefined; +}; + +/** @internal */ +export const ClientRateLimitWebhookPayload$inboundSchema: z.ZodType< + ClientRateLimitWebhookPayload, + z.ZodTypeDef, + unknown +> = z.object({ + dailyQuota: z.number().int().optional(), + quotaRemaining: z.number().int().optional(), + expiryDate: z.string().optional(), +}); + +/** @internal */ +export type ClientRateLimitWebhookPayload$Outbound = { + dailyQuota?: number | undefined; + quotaRemaining?: number | undefined; + expiryDate?: string | undefined; +}; + +/** @internal */ +export const ClientRateLimitWebhookPayload$outboundSchema: z.ZodType< + ClientRateLimitWebhookPayload$Outbound, + z.ZodTypeDef, + ClientRateLimitWebhookPayload +> = z.object({ + dailyQuota: z.number().int().optional(), + quotaRemaining: z.number().int().optional(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/codatfile.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/codatfile.ts new file mode 100644 index 000000000..2b4ab844f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/codatfile.ts @@ -0,0 +1,59 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type CodatFile = { + fileName: string; + content: ReadableStream | Blob | ArrayBuffer | Buffer; +}; + +/** @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(Buffer), + ]), +}); + +/** @internal */ +export type CodatFile$Outbound = { + fileName: string; + content: ReadableStream | Blob | ArrayBuffer | Buffer; +}; + +/** @internal */ +export const CodatFile$outboundSchema: z.ZodType< + CodatFile$Outbound, + z.ZodTypeDef, + CodatFile +> = z.object({ + fileName: z.string(), + content: z.union([ + z.instanceof(ReadableStream), + z.instanceof(Blob), + z.instanceof(ArrayBuffer), + z.instanceof(Buffer), + ]), +}); + +/** + * @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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/companies.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/companies.ts index b481f0dc2..e74f803cb 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/companies.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/companies.ts @@ -1,41 +1,91 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { Company } from "./company"; -import { Links } from "./links"; -import { Expose, Type } from "class-transformer"; +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { + Company, + Company$inboundSchema, + Company$Outbound, + Company$outboundSchema, +} from "./company.js"; +import { + Links, + Links$inboundSchema, + Links$Outbound, + Links$outboundSchema, +} from "./links.js"; -export class Companies extends SpeakeasyBase { - @SpeakeasyMetadata() - @Expose({ name: "_links" }) - @Type(() => Links) - links: Links; +export type Companies = { + results?: Array | undefined; + /** + * Current page number. + */ + pageNumber: number; + /** + * Number of items to return in results array. + */ + pageSize: number; + /** + * Total number of items. + */ + totalResults: number; + links: Links; +}; - /** - * Current page number. - */ - @SpeakeasyMetadata() - @Expose({ name: "pageNumber" }) - pageNumber: number; +/** @internal */ +export const Companies$inboundSchema: z.ZodType< + Companies, + z.ZodTypeDef, + unknown +> = z.object({ + results: z.array(Company$inboundSchema).optional(), + pageNumber: z.number().int(), + pageSize: z.number().int(), + totalResults: z.number().int(), + _links: Links$inboundSchema, +}).transform((v) => { + return remap$(v, { + "_links": "links", + }); +}); - /** - * Number of items to return in results array. - */ - @SpeakeasyMetadata() - @Expose({ name: "pageSize" }) - pageSize: number; +/** @internal */ +export type Companies$Outbound = { + results?: Array | undefined; + pageNumber: number; + pageSize: number; + totalResults: number; + _links: Links$Outbound; +}; - @SpeakeasyMetadata({ elemType: Company }) - @Expose({ name: "results" }) - @Type(() => Company) - results?: Company[]; +/** @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", + }); +}); - /** - * Total number of items. - */ - @SpeakeasyMetadata() - @Expose({ name: "totalResults" }) - totalResults: number; +/** + * @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/company.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/company.ts index 7cae3d4fb..2845ddf6b 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/company.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/company.ts @@ -1,19 +1,19 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { Connection } from "./connection"; -import { Expose, Type } from "class-transformer"; +import * as z from "zod"; +import { + Connection, + Connection$inboundSchema, + Connection$Outbound, + Connection$outboundSchema, +} from "./connection.js"; -export class GroupReference extends SpeakeasyBase { - /** - * Unique identifier for the group. - */ - @SpeakeasyMetadata() - @Expose({ name: "id" }) - id?: string; -} +/** + * A collection of user-defined key-value pairs that store custom metadata against the company. + */ +export type Tags = {}; /** * In Codat, a company represents a business sharing access to their data. Each company can have multiple [connections](https://docs.codat.io/sync-for-payables-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. @@ -24,115 +24,155 @@ export class GroupReference extends SpeakeasyBase { * * When 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. */ -export class Company extends SpeakeasyBase { - /** - * 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. - */ - @SpeakeasyMetadata() - @Expose({ name: "created" }) - created?: string; +export type Company = { + /** + * Unique identifier for your SMB in Codat. + */ + id: string; + /** + * The name of the company + */ + name: string; + /** + * Additional information about the company. This can be used to store foreign IDs, references, etc. + */ + description?: string | undefined; + /** + * 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. + */ + redirect: string; + /** + * 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. + */ + lastSync?: string | 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. + */ + created?: string | undefined; + /** + * Name of user that created the company in Codat. + */ + createdByUserName?: string | null | undefined; + /** + * A collection of user-defined key-value pairs that store custom metadata against the company. + */ + tags?: Tags | undefined; + dataConnections?: Array | undefined; +}; - /** - * Name of user that created the company in Codat. - */ - @SpeakeasyMetadata() - @Expose({ name: "createdByUserName" }) - createdByUserName?: string; +/** @internal */ +export const Tags$inboundSchema: z.ZodType = z + .object({}); - @SpeakeasyMetadata({ elemType: Connection }) - @Expose({ name: "dataConnections" }) - @Type(() => Connection) - dataConnections?: Connection[]; +/** @internal */ +export type Tags$Outbound = {}; - /** - * Additional information about the company. This can be used to store foreign IDs, references, etc. - */ - @SpeakeasyMetadata() - @Expose({ name: "description" }) - description?: string; +/** @internal */ +export const Tags$outboundSchema: z.ZodType = + z.object({}); - /** - * An array of groups the company has been assigned to. - */ - @SpeakeasyMetadata({ elemType: GroupReference }) - @Expose({ name: "groups" }) - @Type(() => GroupReference) - groups?: GroupReference[]; - - /** - * Unique identifier for your SMB in Codat. - */ - @SpeakeasyMetadata() - @Expose({ name: "id" }) - id: string; +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Tags$ { + /** @deprecated use `Tags$inboundSchema` instead. */ + export const inboundSchema = Tags$inboundSchema; + /** @deprecated use `Tags$outboundSchema` instead. */ + export const outboundSchema = Tags$outboundSchema; + /** @deprecated use `Tags$Outbound` instead. */ + export type Outbound = Tags$Outbound; +} - /** - * 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. - */ - @SpeakeasyMetadata() - @Expose({ name: "lastSync" }) - lastSync?: string; +/** @internal */ +export const Company$inboundSchema: z.ZodType = + 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(), + tags: z.lazy(() => Tags$inboundSchema).optional(), + dataConnections: z.array(Connection$inboundSchema).optional(), + }); - /** - * The name of the company - */ - @SpeakeasyMetadata() - @Expose({ name: "name" }) - name: string; +/** @internal */ +export type Company$Outbound = { + id: string; + name: string; + description?: string | undefined; + redirect: string; + lastSync?: string | undefined; + created?: string | undefined; + createdByUserName?: string | null | undefined; + tags?: Tags$Outbound | undefined; + dataConnections?: Array | undefined; +}; - /** - * `platformKeys` name used when creating the company. - * - * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. - */ - @SpeakeasyMetadata() - @Expose({ name: "platform" }) - platform?: string; +/** @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(), + tags: z.lazy(() => Tags$outboundSchema).optional(), + dataConnections: z.array(Connection$outboundSchema).optional(), +}); - /** - * 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. - */ - @SpeakeasyMetadata() - @Expose({ name: "redirect" }) - redirect: string; +/** + * @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/companyinfo.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/companyinfo.ts new file mode 100644 index 000000000..0b501204c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/companyinfo.ts @@ -0,0 +1,236 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + Address, + Address$inboundSchema, + Address$Outbound, + Address$outboundSchema, +} from "./address.js"; +import { + PhoneNumber, + PhoneNumber$inboundSchema, + PhoneNumber$Outbound, + PhoneNumber$outboundSchema, +} from "./phonenumber.js"; +import { + SupplementalData, + SupplementalData$inboundSchema, + SupplementalData$Outbound, + SupplementalData$outboundSchema, +} from "./supplementaldata.js"; +import { + WebLink, + WebLink$inboundSchema, + WebLink$Outbound, + WebLink$outboundSchema, +} from "./weblink.js"; + +/** + * > View the coverage for company profile in the Data coverage explorer. + * + * @remarks + * + * Company info provides standard details about a linked company such as their address, phone number, and company registration. + * + * > **Company information or companies?** + * > + * > Company profile 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. + */ +export type CompanyInfo = { + /** + * Name of the linked company. + */ + companyName?: string | null | undefined; + /** + * Identifier or reference for the company in the accounting software. + */ + accountingPlatformRef?: string | null | undefined; + /** + * Registered legal name of the linked company. + */ + companyLegalName?: string | null | undefined; + /** + * An array of Addresses. + */ + addresses?: Array
| null | undefined; + /** + * An array of phone numbers. + */ + phoneNumbers?: Array | null | undefined; + /** + * An array of weblinks. + */ + webLinks?: Array | 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: + * + * @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. + */ + ledgerLockDate?: string | undefined; + /** + * Registration number given to the linked company by the companies authority in the country of origin. In the UK this is Companies House. + */ + registrationNumber?: string | null | undefined; + /** + * Company tax number. + */ + taxNumber?: string | 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: + * + * @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. + */ + financialYearStartDate?: string | undefined; + /** + * Currency set in the accounting software of the linked company. Used by the currency rate. + */ + baseCurrency?: string | null | undefined; + /** + * URL addresses for the accounting source. + * + * @remarks + * + * 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; + /** + * 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. + */ + createdDate?: string | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; +}; + +/** @internal */ +export const CompanyInfo$inboundSchema: z.ZodType< + CompanyInfo, + z.ZodTypeDef, + unknown +> = 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(Address$inboundSchema)).optional(), + phoneNumbers: z.nullable(z.array(PhoneNumber$inboundSchema)).optional(), + webLinks: z.nullable(z.array(WebLink$inboundSchema)).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$inboundSchema.optional(), +}); + +/** @internal */ +export type CompanyInfo$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 CompanyInfo$outboundSchema: z.ZodType< + CompanyInfo$Outbound, + z.ZodTypeDef, + CompanyInfo +> = 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(Address$outboundSchema)).optional(), + phoneNumbers: z.nullable(z.array(PhoneNumber$outboundSchema)).optional(), + webLinks: z.nullable(z.array(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 CompanyInfo$ { + /** @deprecated use `CompanyInfo$inboundSchema` instead. */ + export const inboundSchema = CompanyInfo$inboundSchema; + /** @deprecated use `CompanyInfo$outboundSchema` instead. */ + export const outboundSchema = CompanyInfo$outboundSchema; + /** @deprecated use `CompanyInfo$Outbound` instead. */ + export type Outbound = CompanyInfo$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/companyrequestbody.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/companyrequestbody.ts index 45d339aa0..44fcc1424 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/companyrequestbody.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/companyrequestbody.ts @@ -1,31 +1,105 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { Items } from "./items"; -import { Expose, Type } from "class-transformer"; - -export class CompanyRequestBody extends SpeakeasyBase { - /** - * Additional information about the company. This can be used to store foreign IDs, references, etc. - */ - @SpeakeasyMetadata() - @Expose({ name: "description" }) - description?: string; - - /** - * Reference to the groups that the company is assigned to. - */ - @SpeakeasyMetadata({ elemType: Items }) - @Expose({ name: "groups" }) - @Type(() => Items) - groups?: Items[]; - - /** - * Name of company being connected. - */ - @SpeakeasyMetadata() - @Expose({ name: "name" }) - name: string; +import * as z from "zod"; + +export type GroupReference = { + /** + * Unique identifier for the group. + */ + id?: string | undefined; +}; + +export type CompanyRequestBody = { + /** + * Name of company being connected. + */ + name: string; + /** + * Additional information about the company. This can be used to store foreign IDs, references, etc. + */ + description?: string | undefined; + /** + * Reference to the groups that the company is assigned to. + */ + groups?: Array | undefined; +}; + +/** @internal */ +export const GroupReference$inboundSchema: z.ZodType< + GroupReference, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), +}); + +/** @internal */ +export type GroupReference$Outbound = { + id?: string | undefined; +}; + +/** @internal */ +export const GroupReference$outboundSchema: z.ZodType< + GroupReference$Outbound, + z.ZodTypeDef, + GroupReference +> = z.object({ + 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 GroupReference$ { + /** @deprecated use `GroupReference$inboundSchema` instead. */ + export const inboundSchema = GroupReference$inboundSchema; + /** @deprecated use `GroupReference$outboundSchema` instead. */ + export const outboundSchema = GroupReference$outboundSchema; + /** @deprecated use `GroupReference$Outbound` instead. */ + export type Outbound = GroupReference$Outbound; +} + +/** @internal */ +export const CompanyRequestBody$inboundSchema: z.ZodType< + CompanyRequestBody, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + description: z.string().optional(), + groups: z.array(z.lazy(() => GroupReference$inboundSchema)).optional(), +}); + +/** @internal */ +export type CompanyRequestBody$Outbound = { + name: string; + description?: string | undefined; + groups?: Array | undefined; +}; + +/** @internal */ +export const CompanyRequestBody$outboundSchema: z.ZodType< + CompanyRequestBody$Outbound, + z.ZodTypeDef, + CompanyRequestBody +> = z.object({ + name: z.string(), + description: z.string().optional(), + groups: z.array(z.lazy(() => GroupReference$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 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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/connection.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/connection.ts index 9760d5d04..94fe04106 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/connection.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/connection.ts @@ -1,24 +1,37 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { DataConnectionError } from "./dataconnectionerror"; -import { DataConnectionStatus } from "./dataconnectionstatus"; -import { Expose, Type } from "class-transformer"; +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; +import { + DataConnectionError, + DataConnectionError$inboundSchema, + DataConnectionError$Outbound, + DataConnectionError$outboundSchema, +} from "./dataconnectionerror.js"; +import { + DataConnectionStatus, + DataConnectionStatus$inboundSchema, + DataConnectionStatus$outboundSchema, +} from "./dataconnectionstatus.js"; /** * The type of platform of the connection. */ -export enum SourceType { - Accounting = "Accounting", - Banking = "Banking", - BankFeed = "BankFeed", - Commerce = "Commerce", - Expense = "Expense", - Other = "Other", - Unknown = "Unknown", -} +export const SourceType = { + Accounting: "Accounting", + Banking: "Banking", + BankFeed: "BankFeed", + Commerce: "Commerce", + Expense: "Expense", + Other: "Other", + Unknown: "Unknown", +} as const; +/** + * The type of platform of the connection. + */ +export type SourceType = ClosedEnum; /** * A connection represents a [company's](https://docs.codat.io/sync-for-payables-api#/schemas/Company) connection to a data source and allows you to synchronize data (pull and/or push) with that source. @@ -34,127 +47,175 @@ export enum SourceType { * * Before 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). */ -export class Connection extends SpeakeasyBase { - @SpeakeasyMetadata() - @Expose({ name: "additionalProperties" }) - additionalProperties?: any; - - @SpeakeasyMetadata() - @Expose({ name: "connectionInfo" }) - connectionInfo?: Record; - - /** - * 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. - */ - @SpeakeasyMetadata() - @Expose({ name: "created" }) - created: string; - - @SpeakeasyMetadata({ elemType: DataConnectionError }) - @Expose({ name: "dataConnectionErrors" }) - @Type(() => DataConnectionError) - dataConnectionErrors?: DataConnectionError[]; +export type Connection = { + /** + * Unique identifier for a company's data connection. + */ + id: string; + /** + * A Codat ID representing the integration. + */ + integrationId: string; + /** + * 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. + */ + integrationKey: string; + /** + * 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`. + */ + sourceId: string; + /** + * The type of platform of the connection. + */ + sourceType: SourceType; + /** + * Name of integration connected to company. + */ + platformName: string; + /** + * The link URL your customers can use to authorize access to their business application. + */ + linkUrl: string; + /** + * The current authorization status of the data connection. + */ + status: DataConnectionStatus; + /** + * 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. + */ + lastSync?: string | 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. + */ + created: string; + dataConnectionErrors?: Array | undefined; + connectionInfo?: { [k: string]: string } | undefined; + additionalProperties?: any | undefined; +}; - /** - * Unique identifier for a company's data connection. - */ - @SpeakeasyMetadata() - @Expose({ name: "id" }) - id: string; +/** @internal */ +export const SourceType$inboundSchema: z.ZodNativeEnum = z + .nativeEnum(SourceType); - /** - * A Codat ID representing the integration. - */ - @SpeakeasyMetadata() - @Expose({ name: "integrationId" }) - integrationId: string; +/** @internal */ +export const SourceType$outboundSchema: z.ZodNativeEnum = + SourceType$inboundSchema; - /** - * 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. - */ - @SpeakeasyMetadata() - @Expose({ name: "integrationKey" }) - integrationKey: string; - - /** - * 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. - */ - @SpeakeasyMetadata() - @Expose({ name: "lastSync" }) - lastSync?: string; - - /** - * The link URL your customers can use to authorize access to their business application. - */ - @SpeakeasyMetadata() - @Expose({ name: "linkUrl" }) - linkUrl: string; +/** + * @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; +} - /** - * Name of integration connected to company. - */ - @SpeakeasyMetadata() - @Expose({ name: "platformName" }) - platformName: string; +/** @internal */ +export const Connection$inboundSchema: z.ZodType< + Connection, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + integrationId: z.string(), + integrationKey: z.string(), + sourceId: z.string(), + sourceType: SourceType$inboundSchema, + platformName: z.string(), + linkUrl: z.string(), + status: DataConnectionStatus$inboundSchema, + lastSync: z.string().optional(), + created: z.string(), + dataConnectionErrors: z.array(DataConnectionError$inboundSchema).optional(), + connectionInfo: z.record(z.string()).optional(), + additionalProperties: z.any().optional(), +}); - /** - * 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`. - */ - @SpeakeasyMetadata() - @Expose({ name: "sourceId" }) - sourceId: string; +/** @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 | undefined; + connectionInfo?: { [k: string]: string } | undefined; + additionalProperties?: any | undefined; +}; - /** - * The type of platform of the connection. - */ - @SpeakeasyMetadata() - @Expose({ name: "sourceType" }) - sourceType: SourceType; +/** @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.array(DataConnectionError$outboundSchema).optional(), + connectionInfo: z.record(z.string()).optional(), + additionalProperties: z.any().optional(), +}); - /** - * The current authorization status of the data connection. - */ - @SpeakeasyMetadata() - @Expose({ name: "status" }) - status: DataConnectionStatus; +/** + * @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/connections.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/connections.ts index 7ac3cd11f..5a686ff39 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/connections.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/connections.ts @@ -1,41 +1,91 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { Connection } from "./connection"; -import { Links } from "./links"; -import { Expose, Type } from "class-transformer"; +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { + Connection, + Connection$inboundSchema, + Connection$Outbound, + Connection$outboundSchema, +} from "./connection.js"; +import { + Links, + Links$inboundSchema, + Links$Outbound, + Links$outboundSchema, +} from "./links.js"; -export class Connections extends SpeakeasyBase { - @SpeakeasyMetadata() - @Expose({ name: "_links" }) - @Type(() => Links) - links: Links; +export type Connections = { + results?: Array | undefined; + /** + * Current page number. + */ + pageNumber: number; + /** + * Number of items to return in results array. + */ + pageSize: number; + /** + * Total number of items. + */ + totalResults: number; + links: Links; +}; - /** - * Current page number. - */ - @SpeakeasyMetadata() - @Expose({ name: "pageNumber" }) - pageNumber: number; +/** @internal */ +export const Connections$inboundSchema: z.ZodType< + Connections, + z.ZodTypeDef, + unknown +> = z.object({ + results: z.array(Connection$inboundSchema).optional(), + pageNumber: z.number().int(), + pageSize: z.number().int(), + totalResults: z.number().int(), + _links: Links$inboundSchema, +}).transform((v) => { + return remap$(v, { + "_links": "links", + }); +}); - /** - * Number of items to return in results array. - */ - @SpeakeasyMetadata() - @Expose({ name: "pageSize" }) - pageSize: number; +/** @internal */ +export type Connections$Outbound = { + results?: Array | undefined; + pageNumber: number; + pageSize: number; + totalResults: number; + _links: Links$Outbound; +}; - @SpeakeasyMetadata({ elemType: Connection }) - @Expose({ name: "results" }) - @Type(() => Connection) - results?: Connection[]; +/** @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", + }); +}); - /** - * Total number of items. - */ - @SpeakeasyMetadata() - @Expose({ name: "totalResults" }) - totalResults: number; +/** + * @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createaccountresponse.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createaccountresponse.ts new file mode 100644 index 000000000..786f47f18 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createaccountresponse.ts @@ -0,0 +1,526 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { + AccountStatus, + AccountStatus$inboundSchema, + AccountStatus$outboundSchema, +} from "./accountstatus.js"; +import { + AccountType, + AccountType$inboundSchema, + AccountType$outboundSchema, +} from "./accounttype.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} 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"; + +/** + * 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. + * + * @remarks + * + * 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. + */ +export type CreateAccountResponseValidDataTypeLinks = { + /** + * The property from the account that can be linked. + */ + property?: string | null | undefined; + /** + * Supported `dataTypes` that the record can be linked to. + */ + links?: Array | null | undefined; +}; + +/** + * > **Language tip:** Accounts are also referred to as **chart of accounts**, **nominal accounts**, and **general ledger**. + * + * @remarks + * + * View the coverage for accounts in the Data coverage explorer. + * + * ## Overview + * + * Accounts 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. + * + * The categories for an account include: + * * Asset + * * Expense + * * Income + * * Liability + * * Equity. + * + * The 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. + * + * At 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. + * + * To determine the list of allowed categories for a specific integration, you can: + * - 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-payables-api#/operations/get-create-chartOfAccounts-model). + * - Refer to the integration's own documentation. + * + * > **Accounts with no category** + * > + * > 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`. + * > + * > 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. + * + * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + */ +export type AccountingAccount = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Identifier for the account, unique for the company. + */ + id?: string | undefined; + /** + * 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. + */ + nominalCode?: string | null | undefined; + /** + * Name of the account. + */ + name?: string | null | undefined; + /** + * Description for the account. + */ + description?: string | null | undefined; + /** + * Full category of the account. + * + * @remarks + * + * 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. + */ + fullyQualifiedCategory?: string | null | undefined; + /** + * Full name of the account, for example: + * + * @remarks + * - `Cash On Hand` + * - `Rents Held In Trust` + * - `Fixed Asset` + */ + fullyQualifiedName?: string | null | undefined; + /** + * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + * + * @remarks + * + * ## 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. + */ + currency?: string | undefined; + /** + * Current balance in the account. + */ + currentBalance?: Decimal$ | number | null | undefined; + /** + * Type of account + */ + type?: AccountType | undefined; + /** + * Status of the account + */ + status?: AccountStatus | undefined; + /** + * Confirms whether the account is a bank account or not. + */ + isBankAccount?: boolean | undefined; + /** + * 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-payables-api#/schemas/ValidDataTypeLinks). + */ + validDatatypeLinks?: + | Array + | null + | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; + metadata?: Metadata | undefined; +}; + +export type CreateAccountResponse = { + data?: AccountingAccount | null | undefined; + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + */ + changes?: Array | null | undefined; + /** + * Available data types + */ + dataType?: PropertieDataType | undefined; + /** + * Unique identifier for your SMB in Codat. + */ + companyId: string; + /** + * 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. + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + */ + dataConnectionKey: string; + /** + * 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. + */ + requestedOnUtc: string; + /** + * 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. + */ + completedOnUtc?: string | undefined; + /** + * Number of minutes the push operation must complete within before it times out. + */ + timeoutInMinutes?: number | null | undefined; + /** + * Number of seconds the push operation must complete within before it times out. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + timeoutInSeconds?: number | null | undefined; + /** + * The current status of the push operation. + */ + status: PushOperationStatus; + /** + * A message about the error. + */ + errorMessage?: string | null | undefined; + /** + * A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + */ + validation?: Validation | undefined; + /** + * Push status code. + */ + statusCode: number; +}; + +/** @internal */ +export const CreateAccountResponseValidDataTypeLinks$inboundSchema: z.ZodType< + CreateAccountResponseValidDataTypeLinks, + z.ZodTypeDef, + unknown +> = z.object({ + property: z.nullable(z.string()).optional(), + 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; +} + +/** @internal */ +export const AccountingAccount$inboundSchema: z.ZodType< + AccountingAccount, + z.ZodTypeDef, + unknown +> = 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.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(() => CreateAccountResponseValidDataTypeLinks$inboundSchema), + ), + ).optional(), + supplementalData: SupplementalData$inboundSchema.optional(), + metadata: Metadata$inboundSchema.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?: Metadata$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: Metadata$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; +} + +/** @internal */ +export const CreateAccountResponse$inboundSchema: z.ZodType< + CreateAccountResponse, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable(z.lazy(() => AccountingAccount$inboundSchema)).optional(), + changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), + dataType: PropertieDataType$inboundSchema.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$inboundSchema, + errorMessage: z.nullable(z.string()).optional(), + validation: Validation$inboundSchema.optional(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createbillcreditnoteresponse.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createbillcreditnoteresponse.ts new file mode 100644 index 000000000..0506c0274 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createbillcreditnoteresponse.ts @@ -0,0 +1,626 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { + BillCreditNoteLineItem, + BillCreditNoteLineItem$inboundSchema, + BillCreditNoteLineItem$Outbound, + BillCreditNoteLineItem$outboundSchema, +} from "./billcreditnotelineitem.js"; +import { + BillCreditNoteStatus, + BillCreditNoteStatus$inboundSchema, + BillCreditNoteStatus$outboundSchema, +} from "./billcreditnotestatus.js"; +import { + Items, + Items$inboundSchema, + Items$Outbound, + Items$outboundSchema, +} from "./items.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} from "./metadata.js"; +import { + PaymentAllocationItems, + PaymentAllocationItems$inboundSchema, + PaymentAllocationItems$Outbound, + PaymentAllocationItems$outboundSchema, +} from "./paymentallocationitems.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 { + SupplierRef, + SupplierRef$inboundSchema, + SupplierRef$Outbound, + SupplierRef$outboundSchema, +} from "./supplierref.js"; +import { + Validation, + Validation$inboundSchema, + Validation$Outbound, + Validation$outboundSchema, +} from "./validation.js"; + +/** + * Links the current record to the underlying record or data type that created it. + * + * @remarks + * + * For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. + */ +export type CreateBillCreditNoteResponseRecordReference = { + /** + * 'id' of the underlying record or data type. + */ + id?: string | undefined; + /** + * Allowed name of the 'dataType'. + */ + dataType?: string | undefined; +}; + +/** + * > **Bill credit notes or credit notes?** + * + * @remarks + * > + * > In Codat, bill credit notes represent accounts payable only. For accounts receivable, see [Credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/CreditNote). + * + * View the coverage for bill credit notes in the Data coverage explorer. + * + * ## Overview + * + * A bill credit note is issued by a supplier for the purpose of recording credit. For example, if a supplier was unable to fulfil an order that was placed by a business, or delivered damaged goods, they would issue a bill credit note. A bill credit note reduces the amount a business owes to the supplier. It can be refunded to the business or used to pay off future bills. + * + * In the Codat API, a bill credit note is an accounts payable record issued by a [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier). + * + * A bill credit note includes details of: + * * The original and remaining credit. + * * Any allocations of the credit against other records, such as [bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill). + * * The supplier that issued the bill credit note. + * + * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + */ +export type AccountingBillCreditNote = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Identifier for the bill credit note that is unique to a company in the accounting software. + */ + id?: string | undefined; + /** + * Friendly reference for the bill credit note. + */ + billCreditNoteNumber?: string | null | undefined; + /** + * Reference to the supplier the record relates to. + */ + supplierRef?: SupplierRef | undefined; + withholdingTax?: Array | null | undefined; + /** + * Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. + */ + totalAmount: Decimal$ | number; + /** + * Total value of any discounts applied. + */ + totalDiscount: Decimal$ | number; + /** + * Total amount of the bill credit note, including discounts but excluding tax. + */ + subTotal: Decimal$ | number; + /** + * Amount of tax included in the bill credit note. + */ + totalTaxAmount: Decimal$ | number; + /** + * Percentage rate of any discount applied to the bill credit note. + */ + discountPercentage: Decimal$ | number; + /** + * Amount of the bill credit note that is still outstanding. + */ + remainingCredit?: Decimal$ | number | undefined; + /** + * Current state of the bill credit note + */ + status: BillCreditNoteStatus; + /** + * 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. + */ + issueDate?: string | 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. + */ + allocatedOnDate?: string | undefined; + /** + * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + * + * @remarks + * + * ## 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. + */ + currency?: string | undefined; + /** + * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. + * + * @remarks + * + * 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. | + */ + currencyRate?: Decimal$ | number | null | undefined; + /** + * An array of line + */ + lineItems?: Array | null | undefined; + /** + * An array of payment allocations. + */ + paymentAllocations?: Array | null | undefined; + /** + * An array of records the credit note was created from. + */ + createdFromRefs?: + | Array + | null + | undefined; + /** + * Any additional information about the bill credit note. + */ + note?: string | null | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; + metadata?: Metadata | undefined; +}; + +export type CreateBillCreditNoteResponse = { + data?: AccountingBillCreditNote | null | undefined; + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + */ + changes?: Array | null | undefined; + /** + * Available data types + */ + dataType?: PropertieDataType | undefined; + /** + * Unique identifier for your SMB in Codat. + */ + companyId: string; + /** + * 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. + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + */ + dataConnectionKey: string; + /** + * 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. + */ + requestedOnUtc: string; + /** + * 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. + */ + completedOnUtc?: string | undefined; + /** + * Number of minutes the push operation must complete within before it times out. + */ + timeoutInMinutes?: number | null | undefined; + /** + * Number of seconds the push operation must complete within before it times out. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + timeoutInSeconds?: number | null | undefined; + /** + * The current status of the push operation. + */ + status: PushOperationStatus; + /** + * A message about the error. + */ + errorMessage?: string | null | undefined; + /** + * A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + */ + validation?: Validation | undefined; + /** + * Push status code. + */ + statusCode: number; +}; + +/** @internal */ +export const CreateBillCreditNoteResponseRecordReference$inboundSchema: + z.ZodType< + CreateBillCreditNoteResponseRecordReference, + z.ZodTypeDef, + unknown + > = z.object({ + id: z.string().optional(), + dataType: z.string().optional(), + }); + +/** @internal */ +export type CreateBillCreditNoteResponseRecordReference$Outbound = { + id?: string | undefined; + dataType?: string | undefined; +}; + +/** @internal */ +export const CreateBillCreditNoteResponseRecordReference$outboundSchema: + z.ZodType< + CreateBillCreditNoteResponseRecordReference$Outbound, + z.ZodTypeDef, + CreateBillCreditNoteResponseRecordReference + > = z.object({ + id: z.string().optional(), + dataType: 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 CreateBillCreditNoteResponseRecordReference$ { + /** @deprecated use `CreateBillCreditNoteResponseRecordReference$inboundSchema` instead. */ + export const inboundSchema = + CreateBillCreditNoteResponseRecordReference$inboundSchema; + /** @deprecated use `CreateBillCreditNoteResponseRecordReference$outboundSchema` instead. */ + export const outboundSchema = + CreateBillCreditNoteResponseRecordReference$outboundSchema; + /** @deprecated use `CreateBillCreditNoteResponseRecordReference$Outbound` instead. */ + export type Outbound = CreateBillCreditNoteResponseRecordReference$Outbound; +} + +/** @internal */ +export const AccountingBillCreditNote$inboundSchema: z.ZodType< + AccountingBillCreditNote, + z.ZodTypeDef, + unknown +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + billCreditNoteNumber: z.nullable(z.string()).optional(), + supplierRef: SupplierRef$inboundSchema.optional(), + withholdingTax: z.nullable(z.array(Items$inboundSchema)).optional(), + totalAmount: z.number().transform(v => new Decimal$(v)), + totalDiscount: z.number().transform(v => new Decimal$(v)), + subTotal: z.number().transform(v => new Decimal$(v)), + totalTaxAmount: z.number().transform(v => new Decimal$(v)), + discountPercentage: z.number().transform(v => new Decimal$(v)), + remainingCredit: z.number().transform(v => new Decimal$(v)).optional(), + status: BillCreditNoteStatus$inboundSchema, + issueDate: z.string().optional(), + allocatedOnDate: z.string().optional(), + currency: z.string().optional(), + currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + lineItems: z.nullable(z.array(BillCreditNoteLineItem$inboundSchema)) + .optional(), + paymentAllocations: z.nullable(z.array(PaymentAllocationItems$inboundSchema)) + .optional(), + createdFromRefs: z.nullable( + z.array(z.lazy(() => + CreateBillCreditNoteResponseRecordReference$inboundSchema + )), + ).optional(), + note: z.nullable(z.string()).optional(), + supplementalData: SupplementalData$inboundSchema.optional(), + metadata: Metadata$inboundSchema.optional(), +}); + +/** @internal */ +export type AccountingBillCreditNote$Outbound = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + id?: string | undefined; + billCreditNoteNumber?: string | null | undefined; + supplierRef?: SupplierRef$Outbound | undefined; + withholdingTax?: Array | null | undefined; + totalAmount: number; + totalDiscount: number; + subTotal: number; + totalTaxAmount: number; + discountPercentage: number; + remainingCredit?: number | undefined; + status: string; + issueDate?: string | undefined; + allocatedOnDate?: string | undefined; + currency?: string | undefined; + currencyRate?: number | null | undefined; + lineItems?: Array | null | undefined; + paymentAllocations?: + | Array + | null + | undefined; + createdFromRefs?: + | Array + | null + | undefined; + note?: string | null | undefined; + supplementalData?: SupplementalData$Outbound | undefined; + metadata?: Metadata$Outbound | undefined; +}; + +/** @internal */ +export const AccountingBillCreditNote$outboundSchema: z.ZodType< + AccountingBillCreditNote$Outbound, + z.ZodTypeDef, + AccountingBillCreditNote +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + billCreditNoteNumber: z.nullable(z.string()).optional(), + supplierRef: SupplierRef$outboundSchema.optional(), + withholdingTax: z.nullable(z.array(Items$outboundSchema)).optional(), + totalAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + totalDiscount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + subTotal: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + totalTaxAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + discountPercentage: z.union([z.instanceof(Decimal$), z.number()]).transform( + v => typeof v === "number" ? v : v.toNumber() + ), + remainingCredit: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ).optional(), + status: BillCreditNoteStatus$outboundSchema, + issueDate: z.string().optional(), + allocatedOnDate: z.string().optional(), + currency: z.string().optional(), + currencyRate: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + lineItems: z.nullable(z.array(BillCreditNoteLineItem$outboundSchema)) + .optional(), + paymentAllocations: z.nullable(z.array(PaymentAllocationItems$outboundSchema)) + .optional(), + createdFromRefs: z.nullable( + z.array(z.lazy(() => + CreateBillCreditNoteResponseRecordReference$outboundSchema + )), + ).optional(), + note: z.nullable(z.string()).optional(), + supplementalData: SupplementalData$outboundSchema.optional(), + metadata: Metadata$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 AccountingBillCreditNote$ { + /** @deprecated use `AccountingBillCreditNote$inboundSchema` instead. */ + export const inboundSchema = AccountingBillCreditNote$inboundSchema; + /** @deprecated use `AccountingBillCreditNote$outboundSchema` instead. */ + export const outboundSchema = AccountingBillCreditNote$outboundSchema; + /** @deprecated use `AccountingBillCreditNote$Outbound` instead. */ + export type Outbound = AccountingBillCreditNote$Outbound; +} + +/** @internal */ +export const CreateBillCreditNoteResponse$inboundSchema: z.ZodType< + CreateBillCreditNoteResponse, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable(z.lazy(() => AccountingBillCreditNote$inboundSchema)) + .optional(), + changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), + dataType: PropertieDataType$inboundSchema.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$inboundSchema, + errorMessage: z.nullable(z.string()).optional(), + validation: Validation$inboundSchema.optional(), + statusCode: z.number().int(), +}); + +/** @internal */ +export type CreateBillCreditNoteResponse$Outbound = { + data?: AccountingBillCreditNote$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 CreateBillCreditNoteResponse$outboundSchema: z.ZodType< + CreateBillCreditNoteResponse$Outbound, + z.ZodTypeDef, + CreateBillCreditNoteResponse +> = z.object({ + data: z.nullable(z.lazy(() => AccountingBillCreditNote$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 CreateBillCreditNoteResponse$ { + /** @deprecated use `CreateBillCreditNoteResponse$inboundSchema` instead. */ + export const inboundSchema = CreateBillCreditNoteResponse$inboundSchema; + /** @deprecated use `CreateBillCreditNoteResponse$outboundSchema` instead. */ + export const outboundSchema = CreateBillCreditNoteResponse$outboundSchema; + /** @deprecated use `CreateBillCreditNoteResponse$Outbound` instead. */ + export type Outbound = CreateBillCreditNoteResponse$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createbillpaymentresponse.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createbillpaymentresponse.ts new file mode 100644 index 000000000..9e74781c0 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createbillpaymentresponse.ts @@ -0,0 +1,554 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { + AccountRef, + AccountRef$inboundSchema, + AccountRef$Outbound, + AccountRef$outboundSchema, +} from "./accountref.js"; +import { + BillPaymentLine, + BillPaymentLine$inboundSchema, + BillPaymentLine$Outbound, + BillPaymentLine$outboundSchema, +} from "./billpaymentline.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} from "./metadata.js"; +import { + PaymentMethodRef, + PaymentMethodRef$inboundSchema, + PaymentMethodRef$Outbound, + PaymentMethodRef$outboundSchema, +} from "./paymentmethodref.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 { + SupplierRef, + SupplierRef$inboundSchema, + SupplierRef$Outbound, + SupplierRef$outboundSchema, +} from "./supplierref.js"; +import { + Validation, + Validation$inboundSchema, + Validation$Outbound, + Validation$outboundSchema, +} from "./validation.js"; + +/** + * > **Bill payments or payments?** + * + * @remarks + * > + * > We distinguish between transactions where the company received money vs. paid money. If the transaction represents a company spending money (accounts payable) we call this a Bill payment. + * > + * > See [payments](https://docs.codat.io/sync-for-payables-api#/schemas/Payment) for the accounts receivable equivalent of Bill payments, which covers [invoices](https://docs.codat.io/sync-for-payables-api#/schemas/Invoice) and [credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/CreditNote). + * + * > View the coverage for bill payments in the Data coverage explorer. + * + * ## Overview + * + * Bill payments include all accounts payable transaction data ([bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill) and [credit notes against bills](https://docs.codat.io/sync-for-payables-api#/schemas/BillCreditNote)). + * + * A bill payment in Codat usually represents an allocation of money within any customer accounts payable account. This includes, but is not strictly limited to: + * + * - A payment made against a bill — for example, a credit card payment, cheque payment, or cash payment. + * - An allocation of a supplier's credit note to a bill or perhaps a refund. + * - A bill payment made directly to an accounts payable account. This could be an overpayment or a prepayment, or a refund of a payment made directly to an accounts payable account. + * + * Depending on the bill payments which are allowed by the underlying accounting software, some of these types may be combined. Please see the example data section for samples of what these cases look like. + * + * In Codat, a bill payment contains details of: + * + * - When the bill payment was recorded in the accounting system. + * - How much it is for and in the currency. + * - Who the payment has been paid to, the _supplier_. + * - The types of bill payments, the _line items_. + * + * Some accounting software give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's _expenses_. You can find these types of transactions in our [Direct costs](https://docs.codat.io/sync-for-payables-api#/schemas/DirectCost) data model. + * + * Bill payments is a child data type of [account transactions](https://docs.codat.io/sync-for-payables-api#/schemas/AccountTransaction). + * + * --- + * + * ## Bill payment types + * + * ### Payment of a bill + * + * A payment paying a single bill should have the following properties: + * + * - A `totalAmount` indicating the amount of the bill that was paid. This is always positive. + * - A `lines` array containing one element with the following properties: + * - An `amount` equal to the `totalAmount` above. + * - A `links` array containing one element with the following properties: + * - A `type` indicating the type of link, in this case a `Bill`. + * - An `id` containing the ID of the bill that was paid. + * - An amount of `-totalAmount` (negative `totalAmount`), indicating that the entirety of the paid amount is allocated to the bill. + * + * ### Payment of multiple bills + * + * It is possible for one payment to pay multiple bills. This can be represented using two possible formats, depending on how the supplier keeps their books: + * + * 1. The payment has multiple entries in its **lines** array, one for each bill that is paid. Each line will follow the above example for paying a bill, and the rules detailed in the data model. + * 2. The payment has a line with multiple links to each bill. This occurs when the proportion of the original payment allocated to each bill is not available. + * + * Each line is the same as those described above, with the **amount** indicating how much of the payment is allocated to the bill. The **amount** on the lines sum to the **totalAmount** on the payment. + * + * > Pushing batch payments to Xero + * > + * > When pushing a single bill payment to Xero to pay multiple bills, only the first format is supported—multiple entries in the payment **lines** array. + * + * ### Payments and refunds on account + * + * A payment on account, that is a payment that doesn’t pay a specific bill, has one entry in its lines array. + * + * The line has the following properties: + * + * - A **totalAmount** indicating the amount paid by a supplier or refunded to them by a company. A payment to the supplier is always negative. A refund is always positive. + * - A **links** array containing one element with the following properties: + * - A **type** indicating the type of link. For a payment this is `PaymentOnAccount`. For a refund this is `Refund`. + * - The **id** containing the ID of the supplier. + * - An amount for the link is `0` **totalAmount** or the amount of the payment or refund. + * + * It is possible to have a payment that is part on account and part allocated to a bill. Each line should follow the examples above. + * + * ### Using a credit note to pay a bill + * + * The payment of a bill using a credit note has one entry in its `lines` array. This **line** has the following properties: + * + * - An **amount** indicating the amount of money moved, which in this case is `0`, as the credit note and bill allocation must balance each other. + * - A **links** array containing two elements: + * - The first link has: + * - A **type** indicating the type of link, in this case a `Bill`. + * - An **id** containing the ID of the bill that was paid. + * - The second link has: + * - A **type** indicating the type of link, in this case a `CreditNote`. + * - An **id** containing the ID of the credit note used by this payment. + * + * The **amount** field on the **line** equals the **totalAmount** on the payment. + * + * ### Refunding a credit note + * + * A bill payment refunding a credit note has one entry in its **lines** array. This line has the following properties: + * + * - An **amount** indicating the amount of the credit note that was refunded. This is always negative, indicating that it is a refund. + * - A **links** array containing one element with the following properties: + * - A **type** indicating the type of `link`, in this case a `CreditNote`. + * - An **id** containing the ID of the credit note that was refunded. + * + * The **totalAmount** field on the payment equals the line's **amount** field. These are both negative, as this is money leaving accounts payable. + * + * ### Refunding a payment + * + * If a payment is refunded, for example, when a company overpaid a bill and the overpayment is returned, there are two payment records: + * + * - One for the incoming overpayment. + * - Another for the outgoing refund. + * + * The payment issuing the refund is identified by the fact that the **totalAmount** is negative. This payment has one entry in its lines array that have the following properties: + * + * - An **amount** indicating the amount that was refunded. This is always negative. + * - A **links** array containing one element with the following properties: + * - A **type** indicating the type of a the link, in this case a `BillPayment`. + * - An **id** containing the ID of the payment that was refunded. + * + * The **amount** field on the line equals the **totalAmount** on the payment and is negative as this is money leaving accounts payable. + * + * The payment that was refunded can be identified as it has a line where the `amount` on its `line` is positive and the type of the link is `Refund`. This payment may have several entries in its **lines** array if it was partly used to pay an bill. For example, a £1,050 payment paying a £1,000 bill with a refund of £50 has two lines: + * + * - One for £1,000 linked to the bill that was paid + * - Another for £50 linked to the payment that refunded the over payment. This link is of type `Refund` but the ID corresponds to a bill payment. + * + * The line linked to the bill payment has the following properties: + * + * - An **amount** indicating the amount that was refunded. This is positive as its money that was added to accounts payable, but is balanced out by the negative amount of the refund. + * - A **links** array containing one element with the following properties: + * - A **type** indicating the type of the link, in this case a `Refund`. + * - An **id** containing the ID of the payment that refunded this line. + * + * > Linked payments + * > + * > Not all accounting software support linked payments in this way. In these platforms you may see a payment on account and a refund on account. + * + * ## Foreign currencies + * + * There are two types of currency rate that are detailed in the bill payments data type: + * + * Payment currency rate: + * + * - Base currency of the accounts payable account. + * - Foreign currency of the bill payment. + * + * Payment line link currency rate: + * + * - Base currency of the item that the link represents. + * - Foreign currency of the payment. + * + * These two rates allow the calculation of currency loss or gain for any of the transactions affected by the payment lines. The second rate is used when a bill payment is applied to an item in a currency that does not match either: + * + * - The base currency for the accounts payable account. + * - The currency of the item. + * + * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + */ +export type AccountingBillPayment = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Identifier for the bill payment, unique for the company in the accounting software. + */ + id?: string | undefined; + supplierRef?: SupplierRef | undefined; + /** + * 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. + */ + accountRef?: AccountRef | undefined; + /** + * Amount of the payment in the payment currency. This value never changes and represents the amount of money that is paid into the supplier's account. + */ + totalAmount?: Decimal$ | number | undefined; + currency?: string | undefined; + /** + * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. + * + * @remarks + * + * 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. | + */ + currencyRate?: Decimal$ | number | null | undefined; + date: string; + /** + * Additional information associated with the payment. + */ + note?: string | null | undefined; + paymentMethodRef?: PaymentMethodRef | undefined; + /** + * An array of bill payment lines. + */ + lines?: Array | null | undefined; + /** + * Additional information associated with the payment. + */ + reference?: string | null | undefined; + metadata?: Metadata | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; +}; + +export type CreateBillPaymentResponse = { + data?: AccountingBillPayment | null | undefined; + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + */ + changes?: Array | null | undefined; + /** + * Available data types + */ + dataType?: PropertieDataType | undefined; + /** + * Unique identifier for your SMB in Codat. + */ + companyId: string; + /** + * 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. + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + */ + dataConnectionKey: string; + /** + * 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. + */ + requestedOnUtc: string; + /** + * 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. + */ + completedOnUtc?: string | undefined; + /** + * Number of minutes the push operation must complete within before it times out. + */ + timeoutInMinutes?: number | null | undefined; + /** + * Number of seconds the push operation must complete within before it times out. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + timeoutInSeconds?: number | null | undefined; + /** + * The current status of the push operation. + */ + status: PushOperationStatus; + /** + * A message about the error. + */ + errorMessage?: string | null | undefined; + /** + * A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + */ + validation?: Validation | undefined; + /** + * Push status code. + */ + statusCode: number; +}; + +/** @internal */ +export const AccountingBillPayment$inboundSchema: z.ZodType< + AccountingBillPayment, + z.ZodTypeDef, + unknown +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + supplierRef: SupplierRef$inboundSchema.optional(), + accountRef: AccountRef$inboundSchema.optional(), + totalAmount: z.number().transform(v => new Decimal$(v)).optional(), + currency: z.string().optional(), + currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + date: z.string(), + note: z.nullable(z.string()).optional(), + paymentMethodRef: PaymentMethodRef$inboundSchema.optional(), + lines: z.nullable(z.array(BillPaymentLine$inboundSchema)).optional(), + reference: z.nullable(z.string()).optional(), + metadata: Metadata$inboundSchema.optional(), + supplementalData: SupplementalData$inboundSchema.optional(), +}); + +/** @internal */ +export type AccountingBillPayment$Outbound = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + id?: string | undefined; + supplierRef?: SupplierRef$Outbound | undefined; + accountRef?: AccountRef$Outbound | undefined; + totalAmount?: number | undefined; + currency?: string | undefined; + currencyRate?: number | null | undefined; + date: string; + note?: string | null | undefined; + paymentMethodRef?: PaymentMethodRef$Outbound | undefined; + lines?: Array | null | undefined; + reference?: string | null | undefined; + metadata?: Metadata$Outbound | undefined; + supplementalData?: SupplementalData$Outbound | undefined; +}; + +/** @internal */ +export const AccountingBillPayment$outboundSchema: z.ZodType< + AccountingBillPayment$Outbound, + z.ZodTypeDef, + AccountingBillPayment +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + supplierRef: SupplierRef$outboundSchema.optional(), + accountRef: AccountRef$outboundSchema.optional(), + totalAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ).optional(), + currency: z.string().optional(), + currencyRate: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + date: z.string(), + note: z.nullable(z.string()).optional(), + paymentMethodRef: PaymentMethodRef$outboundSchema.optional(), + lines: z.nullable(z.array(BillPaymentLine$outboundSchema)).optional(), + reference: 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 AccountingBillPayment$ { + /** @deprecated use `AccountingBillPayment$inboundSchema` instead. */ + export const inboundSchema = AccountingBillPayment$inboundSchema; + /** @deprecated use `AccountingBillPayment$outboundSchema` instead. */ + export const outboundSchema = AccountingBillPayment$outboundSchema; + /** @deprecated use `AccountingBillPayment$Outbound` instead. */ + export type Outbound = AccountingBillPayment$Outbound; +} + +/** @internal */ +export const CreateBillPaymentResponse$inboundSchema: z.ZodType< + CreateBillPaymentResponse, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable(z.lazy(() => AccountingBillPayment$inboundSchema)) + .optional(), + changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), + dataType: PropertieDataType$inboundSchema.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$inboundSchema, + errorMessage: z.nullable(z.string()).optional(), + validation: Validation$inboundSchema.optional(), + statusCode: z.number().int(), +}); + +/** @internal */ +export type CreateBillPaymentResponse$Outbound = { + data?: AccountingBillPayment$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 CreateBillPaymentResponse$outboundSchema: z.ZodType< + CreateBillPaymentResponse$Outbound, + z.ZodTypeDef, + CreateBillPaymentResponse +> = z.object({ + data: z.nullable(z.lazy(() => AccountingBillPayment$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 CreateBillPaymentResponse$ { + /** @deprecated use `CreateBillPaymentResponse$inboundSchema` instead. */ + export const inboundSchema = CreateBillPaymentResponse$inboundSchema; + /** @deprecated use `CreateBillPaymentResponse$outboundSchema` instead. */ + export const outboundSchema = CreateBillPaymentResponse$outboundSchema; + /** @deprecated use `CreateBillPaymentResponse$Outbound` instead. */ + export type Outbound = CreateBillPaymentResponse$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createbillresponse.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createbillresponse.ts new file mode 100644 index 000000000..3f9cab3c8 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createbillresponse.ts @@ -0,0 +1,794 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { + BillLineItem, + BillLineItem$inboundSchema, + BillLineItem$Outbound, + BillLineItem$outboundSchema, +} from "./billlineitem.js"; +import { + BillStatus, + BillStatus$inboundSchema, + BillStatus$outboundSchema, +} from "./billstatus.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} from "./metadata.js"; +import { + PaymentAllocationPayment, + PaymentAllocationPayment$inboundSchema, + PaymentAllocationPayment$Outbound, + PaymentAllocationPayment$outboundSchema, +} from "./paymentallocationpayment.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 { + SupplierRef, + SupplierRef$inboundSchema, + SupplierRef$Outbound, + SupplierRef$outboundSchema, +} from "./supplierref.js"; +import { + Validation, + Validation$inboundSchema, + Validation$Outbound, + Validation$outboundSchema, +} from "./validation.js"; + +export type CreateBillResponsePurchaseOrderReference = { + /** + * Identifier for the purchase order, unique for the company in the accounting software. + */ + id?: string | undefined; + /** + * Friendly reference for the purchase order, commonly generated by the accounting software. + */ + purchaseOrderNumber?: string | null | undefined; +}; + +export type CreateBillResponseWithholdingTax = { + /** + * Name assigned to withheld tax. + */ + name: string; + /** + * Amount of tax withheld. + */ + amount: Decimal$ | number; +}; + +export type CreateBillResponseAllocation = { + /** + * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + * + * @remarks + * + * ## 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. + */ + currency?: string | undefined; + /** + * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. + * + * @remarks + * + * 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. | + */ + currencyRate?: Decimal$ | number | 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: + * + * @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. + */ + allocatedOnDate?: string | undefined; + /** + * The total amount that has been allocated. + */ + totalAmount?: Decimal$ | number | undefined; +}; + +export type CreateBillResponseAccountingPaymentAllocation = { + payment: PaymentAllocationPayment; + allocation: CreateBillResponseAllocation; +}; + +/** + * > **Invoices or bills?** + * + * @remarks + * > + * > We distinguish between invoices where the company *owes money* vs. *is owed money*. If the company has received an invoice, and owes money to someone else (accounts payable) we call this a Bill. + * > + * > See [Invoices](https://docs.codat.io/sync-for-payables-api#/schemas/Invoice) for the accounts receivable equivalent of bills. + * + * View the coverage for bills in the Data coverage explorer. + * + * ## Overview + * + * In Codat, a bill contains details of: + * * When the bill was recorded in the accounting system. + * * How much the bill is for and the currency of the amount. + * * Who the bill was received from — the *supplier*. + * * What the bill is for — the *line items*. + * + * Some accounting software give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's *expenses*. + * + * You can find these types of transactions in our [Direct costs](https://docs.codat.io/sync-for-payables-api#/schemas/DirectCost) data model. + * + * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + */ +export type AccountingBill = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Identifier for the bill, unique for the company in the accounting software. + */ + id?: string | undefined; + /** + * User-friendly reference for the bill. + */ + reference?: string | null | undefined; + /** + * Reference to the supplier the record relates to. + */ + supplierRef?: SupplierRef | undefined; + purchaseOrderRefs?: + | Array + | null + | undefined; + issueDate: string; + dueDate?: string | undefined; + /** + * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + * + * @remarks + * + * ## 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. + */ + currency?: string | undefined; + /** + * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. + * + * @remarks + * + * 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. | + */ + currencyRate?: Decimal$ | number | null | undefined; + /** + * Array of Bill line items. + */ + lineItems?: Array | null | undefined; + withholdingTax?: Array | null | undefined; + /** + * Current state of the bill. + */ + status: BillStatus; + /** + * Total amount of the bill, excluding any taxes. + */ + subTotal: Decimal$ | number; + /** + * Amount of tax on the bill. + */ + taxAmount: Decimal$ | number; + /** + * Amount of the bill, including tax. + */ + totalAmount: Decimal$ | number; + /** + * Amount outstanding on the bill. + */ + amountDue?: Decimal$ | number | null | undefined; + /** + * Any private, company notes about the bill, such as payment information. + */ + note?: string | null | undefined; + /** + * An array of payment allocations. + */ + paymentAllocations?: + | Array + | null + | undefined; + metadata?: Metadata | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; +}; + +export type CreateBillResponse = { + data?: AccountingBill | null | undefined; + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + */ + changes?: Array | null | undefined; + /** + * Available data types + */ + dataType?: PropertieDataType | undefined; + /** + * Unique identifier for your SMB in Codat. + */ + companyId: string; + /** + * 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. + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + */ + dataConnectionKey: string; + /** + * 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. + */ + requestedOnUtc: string; + /** + * 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. + */ + completedOnUtc?: string | undefined; + /** + * Number of minutes the push operation must complete within before it times out. + */ + timeoutInMinutes?: number | null | undefined; + /** + * Number of seconds the push operation must complete within before it times out. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + timeoutInSeconds?: number | null | undefined; + /** + * The current status of the push operation. + */ + status: PushOperationStatus; + /** + * A message about the error. + */ + errorMessage?: string | null | undefined; + /** + * A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + */ + validation?: Validation | undefined; + /** + * Push status code. + */ + statusCode: number; +}; + +/** @internal */ +export const CreateBillResponsePurchaseOrderReference$inboundSchema: z.ZodType< + CreateBillResponsePurchaseOrderReference, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), + purchaseOrderNumber: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type CreateBillResponsePurchaseOrderReference$Outbound = { + id?: string | undefined; + purchaseOrderNumber?: string | null | undefined; +}; + +/** @internal */ +export const CreateBillResponsePurchaseOrderReference$outboundSchema: z.ZodType< + CreateBillResponsePurchaseOrderReference$Outbound, + z.ZodTypeDef, + CreateBillResponsePurchaseOrderReference +> = z.object({ + id: z.string().optional(), + purchaseOrderNumber: 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 CreateBillResponsePurchaseOrderReference$ { + /** @deprecated use `CreateBillResponsePurchaseOrderReference$inboundSchema` instead. */ + export const inboundSchema = + CreateBillResponsePurchaseOrderReference$inboundSchema; + /** @deprecated use `CreateBillResponsePurchaseOrderReference$outboundSchema` instead. */ + export const outboundSchema = + CreateBillResponsePurchaseOrderReference$outboundSchema; + /** @deprecated use `CreateBillResponsePurchaseOrderReference$Outbound` instead. */ + export type Outbound = CreateBillResponsePurchaseOrderReference$Outbound; +} + +/** @internal */ +export const CreateBillResponseWithholdingTax$inboundSchema: z.ZodType< + CreateBillResponseWithholdingTax, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + amount: z.number().transform(v => new Decimal$(v)), +}); + +/** @internal */ +export type CreateBillResponseWithholdingTax$Outbound = { + name: string; + amount: number; +}; + +/** @internal */ +export const CreateBillResponseWithholdingTax$outboundSchema: z.ZodType< + CreateBillResponseWithholdingTax$Outbound, + z.ZodTypeDef, + CreateBillResponseWithholdingTax +> = z.object({ + name: z.string(), + amount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateBillResponseWithholdingTax$ { + /** @deprecated use `CreateBillResponseWithholdingTax$inboundSchema` instead. */ + export const inboundSchema = CreateBillResponseWithholdingTax$inboundSchema; + /** @deprecated use `CreateBillResponseWithholdingTax$outboundSchema` instead. */ + export const outboundSchema = CreateBillResponseWithholdingTax$outboundSchema; + /** @deprecated use `CreateBillResponseWithholdingTax$Outbound` instead. */ + export type Outbound = CreateBillResponseWithholdingTax$Outbound; +} + +/** @internal */ +export const CreateBillResponseAllocation$inboundSchema: z.ZodType< + CreateBillResponseAllocation, + z.ZodTypeDef, + unknown +> = z.object({ + currency: z.string().optional(), + currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + allocatedOnDate: z.string().optional(), + totalAmount: z.number().transform(v => new Decimal$(v)).optional(), +}); + +/** @internal */ +export type CreateBillResponseAllocation$Outbound = { + currency?: string | undefined; + currencyRate?: number | null | undefined; + allocatedOnDate?: string | undefined; + totalAmount?: number | undefined; +}; + +/** @internal */ +export const CreateBillResponseAllocation$outboundSchema: z.ZodType< + CreateBillResponseAllocation$Outbound, + z.ZodTypeDef, + CreateBillResponseAllocation +> = z.object({ + currency: z.string().optional(), + currencyRate: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + allocatedOnDate: z.string().optional(), + totalAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateBillResponseAllocation$ { + /** @deprecated use `CreateBillResponseAllocation$inboundSchema` instead. */ + export const inboundSchema = CreateBillResponseAllocation$inboundSchema; + /** @deprecated use `CreateBillResponseAllocation$outboundSchema` instead. */ + export const outboundSchema = CreateBillResponseAllocation$outboundSchema; + /** @deprecated use `CreateBillResponseAllocation$Outbound` instead. */ + export type Outbound = CreateBillResponseAllocation$Outbound; +} + +/** @internal */ +export const CreateBillResponseAccountingPaymentAllocation$inboundSchema: + z.ZodType< + CreateBillResponseAccountingPaymentAllocation, + z.ZodTypeDef, + unknown + > = z.object({ + payment: PaymentAllocationPayment$inboundSchema, + allocation: z.lazy(() => CreateBillResponseAllocation$inboundSchema), + }); + +/** @internal */ +export type CreateBillResponseAccountingPaymentAllocation$Outbound = { + payment: PaymentAllocationPayment$Outbound; + allocation: CreateBillResponseAllocation$Outbound; +}; + +/** @internal */ +export const CreateBillResponseAccountingPaymentAllocation$outboundSchema: + z.ZodType< + CreateBillResponseAccountingPaymentAllocation$Outbound, + z.ZodTypeDef, + CreateBillResponseAccountingPaymentAllocation + > = z.object({ + payment: PaymentAllocationPayment$outboundSchema, + allocation: z.lazy(() => CreateBillResponseAllocation$outboundSchema), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace CreateBillResponseAccountingPaymentAllocation$ { + /** @deprecated use `CreateBillResponseAccountingPaymentAllocation$inboundSchema` instead. */ + export const inboundSchema = + CreateBillResponseAccountingPaymentAllocation$inboundSchema; + /** @deprecated use `CreateBillResponseAccountingPaymentAllocation$outboundSchema` instead. */ + export const outboundSchema = + CreateBillResponseAccountingPaymentAllocation$outboundSchema; + /** @deprecated use `CreateBillResponseAccountingPaymentAllocation$Outbound` instead. */ + export type Outbound = CreateBillResponseAccountingPaymentAllocation$Outbound; +} + +/** @internal */ +export const AccountingBill$inboundSchema: z.ZodType< + AccountingBill, + z.ZodTypeDef, + unknown +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + reference: z.nullable(z.string()).optional(), + supplierRef: SupplierRef$inboundSchema.optional(), + purchaseOrderRefs: z.nullable( + z.array( + z.lazy(() => CreateBillResponsePurchaseOrderReference$inboundSchema), + ), + ).optional(), + issueDate: z.string(), + dueDate: z.string().optional(), + currency: z.string().optional(), + currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + lineItems: z.nullable(z.array(BillLineItem$inboundSchema)).optional(), + withholdingTax: z.nullable( + z.array(z.lazy(() => CreateBillResponseWithholdingTax$inboundSchema)), + ).optional(), + status: BillStatus$inboundSchema, + subTotal: z.number().transform(v => new Decimal$(v)), + taxAmount: z.number().transform(v => new Decimal$(v)), + totalAmount: z.number().transform(v => new Decimal$(v)), + amountDue: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), + note: z.nullable(z.string()).optional(), + paymentAllocations: z.nullable( + z.array(z.lazy(() => + CreateBillResponseAccountingPaymentAllocation$inboundSchema + )), + ).optional(), + metadata: Metadata$inboundSchema.optional(), + supplementalData: SupplementalData$inboundSchema.optional(), +}); + +/** @internal */ +export type AccountingBill$Outbound = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + id?: string | undefined; + reference?: string | null | undefined; + supplierRef?: SupplierRef$Outbound | undefined; + purchaseOrderRefs?: + | Array + | null + | undefined; + issueDate: string; + dueDate?: string | undefined; + currency?: string | undefined; + currencyRate?: number | null | undefined; + lineItems?: Array | null | undefined; + withholdingTax?: + | Array + | null + | undefined; + status: string; + subTotal: number; + taxAmount: number; + totalAmount: number; + amountDue?: number | null | undefined; + note?: string | null | undefined; + paymentAllocations?: + | Array + | null + | undefined; + metadata?: Metadata$Outbound | undefined; + supplementalData?: SupplementalData$Outbound | undefined; +}; + +/** @internal */ +export const AccountingBill$outboundSchema: z.ZodType< + AccountingBill$Outbound, + z.ZodTypeDef, + AccountingBill +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + reference: z.nullable(z.string()).optional(), + supplierRef: SupplierRef$outboundSchema.optional(), + purchaseOrderRefs: z.nullable( + z.array( + z.lazy(() => CreateBillResponsePurchaseOrderReference$outboundSchema), + ), + ).optional(), + issueDate: z.string(), + dueDate: z.string().optional(), + currency: z.string().optional(), + currencyRate: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + lineItems: z.nullable(z.array(BillLineItem$outboundSchema)).optional(), + withholdingTax: z.nullable( + z.array(z.lazy(() => CreateBillResponseWithholdingTax$outboundSchema)), + ).optional(), + status: BillStatus$outboundSchema, + subTotal: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + taxAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + totalAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + amountDue: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + note: z.nullable(z.string()).optional(), + paymentAllocations: z.nullable( + z.array(z.lazy(() => + CreateBillResponseAccountingPaymentAllocation$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 AccountingBill$ { + /** @deprecated use `AccountingBill$inboundSchema` instead. */ + export const inboundSchema = AccountingBill$inboundSchema; + /** @deprecated use `AccountingBill$outboundSchema` instead. */ + export const outboundSchema = AccountingBill$outboundSchema; + /** @deprecated use `AccountingBill$Outbound` instead. */ + export type Outbound = AccountingBill$Outbound; +} + +/** @internal */ +export const CreateBillResponse$inboundSchema: z.ZodType< + CreateBillResponse, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable(z.lazy(() => AccountingBill$inboundSchema)).optional(), + changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), + dataType: PropertieDataType$inboundSchema.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$inboundSchema, + errorMessage: z.nullable(z.string()).optional(), + validation: Validation$inboundSchema.optional(), + statusCode: z.number().int(), +}); + +/** @internal */ +export type CreateBillResponse$Outbound = { + data?: AccountingBill$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 CreateBillResponse$outboundSchema: z.ZodType< + CreateBillResponse$Outbound, + z.ZodTypeDef, + CreateBillResponse +> = z.object({ + data: z.nullable(z.lazy(() => AccountingBill$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 CreateBillResponse$ { + /** @deprecated use `CreateBillResponse$inboundSchema` instead. */ + export const inboundSchema = CreateBillResponse$inboundSchema; + /** @deprecated use `CreateBillResponse$outboundSchema` instead. */ + export const outboundSchema = CreateBillResponse$outboundSchema; + /** @deprecated use `CreateBillResponse$Outbound` instead. */ + export type Outbound = CreateBillResponse$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createjournalentryresponse.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createjournalentryresponse.ts new file mode 100644 index 000000000..33e3688ff --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createjournalentryresponse.ts @@ -0,0 +1,425 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + JournalEntryRecordRef, + JournalEntryRecordRef$inboundSchema, + JournalEntryRecordRef$Outbound, + JournalEntryRecordRef$outboundSchema, +} from "./journalentryrecordref.js"; +import { + JournalLine, + JournalLine$inboundSchema, + JournalLine$Outbound, + JournalLine$outboundSchema, +} from "./journalline.js"; +import { + JournalRef, + JournalRef$inboundSchema, + JournalRef$Outbound, + JournalRef$outboundSchema, +} from "./journalref.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} 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"; + +/** + * > **Language tip:** For the top-level record of a company's financial transactions, refer to the [Journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) data type + * + * @remarks + * + * > View the coverage for journal entries in the Data coverage explorer. + * + * ## Overview + * + * A journal entry report shows the entries made in a company's general ledger, or [accounts](https://docs.codat.io/sync-for-payables-api#/schemas/Account), when transactions are approved. The journal line items for each journal entry should balance. + * + * A journal entry line item is a single transaction line on the journal entry. For example: + * + * - When a journal entry is recording a receipt of cash, the credit to accounts receivable and the debit to cash are separate line items. + * - When a company needs to recognise revenue from an annual contract on a monthly basis, on receipt of cash for month one, they make a debit to deferred income and a credit to revenue. + * + * In Codat a journal entry contains details of: + * + * - The date on which the entry was created and posted. + * - Itemised lines, including amounts and currency. + * - A reference to the associated accounts. + * - A reference to the underlying record. For example, the invoice, bill, or other data type that triggered the posting of the journal entry to the general ledger. + * + * > **Pushing journal entries** + * > Codat only supports journal entries in the base currency of the company that are pushed into accounts denominated in the same base currency. + * + * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + */ +export type AccountingJournalEntry = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Unique identifier of the journal entry for the company in the accounting software. + */ + id?: string | undefined; + /** + * Optional description of the journal entry. + */ + description?: string | 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: + * + * @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. + */ + postedOn?: string | 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. + */ + createdOn?: string | 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. + */ + updatedOn?: string | undefined; + /** + * Links journal entries to the relevant journal in accounting integrations that use multi-book accounting (multiple journals). + */ + journalRef?: JournalRef | undefined; + /** + * An array of journal lines. + */ + journalLines?: Array | null | undefined; + /** + * Links a journal entry to the underlying record that created it. + */ + recordRef?: JournalEntryRecordRef | undefined; + metadata?: Metadata | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; +}; + +export type CreateJournalEntryResponse = { + data?: AccountingJournalEntry | null | undefined; + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + */ + changes?: Array | null | undefined; + /** + * Available data types + */ + dataType?: PropertieDataType | undefined; + /** + * Unique identifier for your SMB in Codat. + */ + companyId: string; + /** + * 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. + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + */ + dataConnectionKey: string; + /** + * 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. + */ + requestedOnUtc: string; + /** + * 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. + */ + completedOnUtc?: string | undefined; + /** + * Number of minutes the push operation must complete within before it times out. + */ + timeoutInMinutes?: number | null | undefined; + /** + * Number of seconds the push operation must complete within before it times out. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + timeoutInSeconds?: number | null | undefined; + /** + * The current status of the push operation. + */ + status: PushOperationStatus; + /** + * A message about the error. + */ + errorMessage?: string | null | undefined; + /** + * A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + */ + validation?: Validation | undefined; + /** + * Push status code. + */ + statusCode: number; +}; + +/** @internal */ +export const AccountingJournalEntry$inboundSchema: z.ZodType< + AccountingJournalEntry, + z.ZodTypeDef, + unknown +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + description: z.nullable(z.string()).optional(), + postedOn: z.string().optional(), + createdOn: z.string().optional(), + updatedOn: z.string().optional(), + journalRef: JournalRef$inboundSchema.optional(), + journalLines: z.nullable(z.array(JournalLine$inboundSchema)).optional(), + recordRef: JournalEntryRecordRef$inboundSchema.optional(), + metadata: Metadata$inboundSchema.optional(), + supplementalData: SupplementalData$inboundSchema.optional(), +}); + +/** @internal */ +export type AccountingJournalEntry$Outbound = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + id?: string | undefined; + description?: string | null | undefined; + postedOn?: string | undefined; + createdOn?: string | undefined; + updatedOn?: string | undefined; + journalRef?: JournalRef$Outbound | undefined; + journalLines?: Array | null | undefined; + recordRef?: JournalEntryRecordRef$Outbound | undefined; + metadata?: Metadata$Outbound | undefined; + supplementalData?: SupplementalData$Outbound | undefined; +}; + +/** @internal */ +export const AccountingJournalEntry$outboundSchema: z.ZodType< + AccountingJournalEntry$Outbound, + z.ZodTypeDef, + AccountingJournalEntry +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + description: z.nullable(z.string()).optional(), + postedOn: z.string().optional(), + createdOn: z.string().optional(), + updatedOn: z.string().optional(), + journalRef: JournalRef$outboundSchema.optional(), + journalLines: z.nullable(z.array(JournalLine$outboundSchema)).optional(), + recordRef: JournalEntryRecordRef$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 AccountingJournalEntry$ { + /** @deprecated use `AccountingJournalEntry$inboundSchema` instead. */ + export const inboundSchema = AccountingJournalEntry$inboundSchema; + /** @deprecated use `AccountingJournalEntry$outboundSchema` instead. */ + export const outboundSchema = AccountingJournalEntry$outboundSchema; + /** @deprecated use `AccountingJournalEntry$Outbound` instead. */ + export type Outbound = AccountingJournalEntry$Outbound; +} + +/** @internal */ +export const CreateJournalEntryResponse$inboundSchema: z.ZodType< + CreateJournalEntryResponse, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable(z.lazy(() => AccountingJournalEntry$inboundSchema)) + .optional(), + changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), + dataType: PropertieDataType$inboundSchema.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$inboundSchema, + errorMessage: z.nullable(z.string()).optional(), + validation: Validation$inboundSchema.optional(), + statusCode: z.number().int(), +}); + +/** @internal */ +export type CreateJournalEntryResponse$Outbound = { + data?: AccountingJournalEntry$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 CreateJournalEntryResponse$outboundSchema: z.ZodType< + CreateJournalEntryResponse$Outbound, + z.ZodTypeDef, + CreateJournalEntryResponse +> = z.object({ + data: z.nullable(z.lazy(() => AccountingJournalEntry$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 CreateJournalEntryResponse$ { + /** @deprecated use `CreateJournalEntryResponse$inboundSchema` instead. */ + export const inboundSchema = CreateJournalEntryResponse$inboundSchema; + /** @deprecated use `CreateJournalEntryResponse$outboundSchema` instead. */ + export const outboundSchema = CreateJournalEntryResponse$outboundSchema; + /** @deprecated use `CreateJournalEntryResponse$Outbound` instead. */ + export type Outbound = CreateJournalEntryResponse$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createjournalresponse.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createjournalresponse.ts new file mode 100644 index 000000000..06e736080 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createjournalresponse.ts @@ -0,0 +1,363 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + JournalStatus, + JournalStatus$inboundSchema, + JournalStatus$outboundSchema, +} from "./journalstatus.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} 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 { + Validation, + Validation$inboundSchema, + Validation$Outbound, + Validation$outboundSchema, +} from "./validation.js"; + +/** + * > **Language tip:** For line items, or individual transactions, of a company's financial documents, refer to the [Journal entries](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry) data type + * + * @remarks + * + * > View the coverage for journals in the Data coverage explorer. + * + * ## Overview + * + * In accounting software, journals are used to record all the financial transactions of a company. Each transaction in a journal is represented by a separate [journal entry](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry). These entries are used to create the general ledger, which is then used to create the financial statements of a business. + * + * When a company records all their transactions in a single journal, it can become large and difficult to maintain and track. This is why large companies often use multiple journals (also known as subjournals) to categorize and manage journal entries. + * + * Such journals can be divided into two categories: + * + * - Special journals: journals used to record specific types of transactions; for example, a purchases journal, a sales journal, or a cash management journal. + * - General journals: journals used to record transactions that fall outside the scope of the special journals. + * + * Multiple journals or subjournals are used in the following Codat integrations: + * + * - [Sage Intacct](https://docs.codat.io/integrations/accounting/sage-intacct/accounting-sage-intacct) (mandatory) + * - [Exact Online](https://docs.codat.io/integrations/accounting/exact-online/accounting-exact-online) (mandatory) + * - [Oracle NetSuite](https://docs.codat.io/integrations/accounting/netsuite/accounting-netsuite) (optional) + * + * > When pushing journal entries to an accounting software that doesn’t support multiple journals (multi-book accounting), the entries will be linked to the platform-generic journal. The Journals data type will only include one object. + * + * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + */ +export type AccountingJournal = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Journal ID. + */ + id?: string | undefined; + /** + * Native journal number or code. + */ + journalCode?: string | null | undefined; + /** + * Journal name. + * + * @remarks + * The maximum length for a journal name is 256 characters. All characters above that number will be truncated. + */ + name?: string | null | undefined; + /** + * The type of the journal. + */ + type?: string | null | undefined; + /** + * Parent journal ID. + * + * @remarks + * If the journal is a parent journal, this value is not present. + */ + parentId?: string | null | undefined; + /** + * If the journal has child journals, this value is true. If it doesn’t, it is false. + */ + hasChildren?: boolean | 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. + */ + createdOn?: string | undefined; + /** + * Current journal status. + */ + status?: JournalStatus | undefined; + metadata?: Metadata | undefined; +}; + +export type CreateJournalResponse = { + data?: AccountingJournal | null | undefined; + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + */ + changes?: Array | null | undefined; + /** + * Available data types + */ + dataType?: PropertieDataType | undefined; + /** + * Unique identifier for your SMB in Codat. + */ + companyId: string; + /** + * 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. + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + */ + dataConnectionKey: string; + /** + * 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. + */ + requestedOnUtc: string; + /** + * 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. + */ + completedOnUtc?: string | undefined; + /** + * Number of minutes the push operation must complete within before it times out. + */ + timeoutInMinutes?: number | null | undefined; + /** + * Number of seconds the push operation must complete within before it times out. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + timeoutInSeconds?: number | null | undefined; + /** + * The current status of the push operation. + */ + status: PushOperationStatus; + /** + * A message about the error. + */ + errorMessage?: string | null | undefined; + /** + * A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + */ + validation?: Validation | undefined; + /** + * Push status code. + */ + statusCode: number; +}; + +/** @internal */ +export const AccountingJournal$inboundSchema: z.ZodType< + AccountingJournal, + z.ZodTypeDef, + unknown +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + journalCode: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + parentId: z.nullable(z.string()).optional(), + hasChildren: z.boolean().optional(), + createdOn: z.string().optional(), + status: JournalStatus$inboundSchema.optional(), + metadata: Metadata$inboundSchema.optional(), +}); + +/** @internal */ +export type AccountingJournal$Outbound = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + id?: string | undefined; + journalCode?: string | null | undefined; + name?: string | null | undefined; + type?: string | null | undefined; + parentId?: string | null | undefined; + hasChildren?: boolean | undefined; + createdOn?: string | undefined; + status?: string | undefined; + metadata?: Metadata$Outbound | undefined; +}; + +/** @internal */ +export const AccountingJournal$outboundSchema: z.ZodType< + AccountingJournal$Outbound, + z.ZodTypeDef, + AccountingJournal +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + journalCode: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + parentId: z.nullable(z.string()).optional(), + hasChildren: z.boolean().optional(), + createdOn: z.string().optional(), + status: JournalStatus$outboundSchema.optional(), + metadata: Metadata$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 AccountingJournal$ { + /** @deprecated use `AccountingJournal$inboundSchema` instead. */ + export const inboundSchema = AccountingJournal$inboundSchema; + /** @deprecated use `AccountingJournal$outboundSchema` instead. */ + export const outboundSchema = AccountingJournal$outboundSchema; + /** @deprecated use `AccountingJournal$Outbound` instead. */ + export type Outbound = AccountingJournal$Outbound; +} + +/** @internal */ +export const CreateJournalResponse$inboundSchema: z.ZodType< + CreateJournalResponse, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable(z.lazy(() => AccountingJournal$inboundSchema)).optional(), + changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), + dataType: PropertieDataType$inboundSchema.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$inboundSchema, + errorMessage: z.nullable(z.string()).optional(), + validation: Validation$inboundSchema.optional(), + statusCode: z.number().int(), +}); + +/** @internal */ +export type CreateJournalResponse$Outbound = { + data?: AccountingJournal$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 CreateJournalResponse$outboundSchema: z.ZodType< + CreateJournalResponse$Outbound, + z.ZodTypeDef, + CreateJournalResponse +> = z.object({ + data: z.nullable(z.lazy(() => AccountingJournal$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 CreateJournalResponse$ { + /** @deprecated use `CreateJournalResponse$inboundSchema` instead. */ + export const inboundSchema = CreateJournalResponse$inboundSchema; + /** @deprecated use `CreateJournalResponse$outboundSchema` instead. */ + export const outboundSchema = CreateJournalResponse$outboundSchema; + /** @deprecated use `CreateJournalResponse$Outbound` instead. */ + export type Outbound = CreateJournalResponse$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createsupplierresponse.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createsupplierresponse.ts new file mode 100644 index 000000000..9a9dcece6 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/createsupplierresponse.ts @@ -0,0 +1,359 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + Address, + Address$inboundSchema, + Address$Outbound, + Address$outboundSchema, +} from "./address.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} 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"; + +/** + * > View the coverage for suppliers in the Data coverage explorer. + * + * @remarks + * + * ## Overview + * + * From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/sync-for-payables-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill). + * + * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + */ +export type AccountingSupplier = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Identifier for the supplier, unique to the company in the accounting software. + */ + id?: string | undefined; + /** + * Name of the supplier as recorded in the accounting system, typically the company name. + */ + supplierName?: string | null | undefined; + /** + * Name of the main contact for the supplier. + */ + contactName?: string | null | undefined; + /** + * Email address that the supplier may be contacted on. + */ + emailAddress?: string | null | undefined; + /** + * Phone number that the supplier may be contacted on. + */ + phone?: string | null | undefined; + /** + * An array of Addresses. + */ + addresses?: Array
| null | undefined; + /** + * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. + */ + registrationNumber?: string | null | undefined; + /** + * Supplier's company tax number. + */ + taxNumber?: string | null | undefined; + /** + * Status of the supplier. + */ + status: SupplierStatus; + /** + * Default currency the supplier's transactional data is recorded in. + */ + defaultCurrency?: string | null | undefined; + metadata?: Metadata | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; +}; + +export type CreateSupplierResponse = { + data?: AccountingSupplier | null | undefined; + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + */ + changes?: Array | null | undefined; + /** + * Available data types + */ + dataType?: PropertieDataType | undefined; + /** + * Unique identifier for your SMB in Codat. + */ + companyId: string; + /** + * 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. + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + */ + dataConnectionKey: string; + /** + * 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. + */ + requestedOnUtc: string; + /** + * 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. + */ + completedOnUtc?: string | undefined; + /** + * Number of minutes the push operation must complete within before it times out. + */ + timeoutInMinutes?: number | null | undefined; + /** + * Number of seconds the push operation must complete within before it times out. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + timeoutInSeconds?: number | null | undefined; + /** + * The current status of the push operation. + */ + status: PushOperationStatus; + /** + * A message about the error. + */ + errorMessage?: string | null | undefined; + /** + * A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + */ + validation?: Validation | undefined; + /** + * Push status code. + */ + statusCode: number; +}; + +/** @internal */ +export const AccountingSupplier$inboundSchema: z.ZodType< + AccountingSupplier, + z.ZodTypeDef, + unknown +> = 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(Address$inboundSchema)).optional(), + registrationNumber: z.nullable(z.string()).optional(), + taxNumber: z.nullable(z.string()).optional(), + status: SupplierStatus$inboundSchema, + defaultCurrency: z.nullable(z.string()).optional(), + metadata: Metadata$inboundSchema.optional(), + 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(Address$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; +} + +/** @internal */ +export const CreateSupplierResponse$inboundSchema: z.ZodType< + CreateSupplierResponse, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable(z.lazy(() => AccountingSupplier$inboundSchema)).optional(), + changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), + dataType: PropertieDataType$inboundSchema.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$inboundSchema, + errorMessage: z.nullable(z.string()).optional(), + validation: Validation$inboundSchema.optional(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/dataconnectionerror.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/dataconnectionerror.ts index a0aadd6d2..b18c0aa24 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/dataconnectionerror.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/dataconnectionerror.ts @@ -1,56 +1,151 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { Expose } from "class-transformer"; - -export class DataConnectionError extends SpeakeasyBase { - /** - * A brief message about the error. - */ - @SpeakeasyMetadata() - @Expose({ name: "errorMessage" }) - errorMessage?: string; - - /** - * 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. - */ - @SpeakeasyMetadata() - @Expose({ name: "erroredOnUtc" }) - erroredOnUtc?: string; - - /** - * The HTTP status code returned by the error. - */ - @SpeakeasyMetadata() - @Expose({ name: "statusCode" }) - statusCode?: string; - - /** - * A non-numeric status code/text. - */ - @SpeakeasyMetadata() - @Expose({ name: "statusText" }) - statusText?: string; +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * The current status of a transient error. Null statuses indicate that the error is not transient. + */ +export const ErrorStatus = { + Active: "Active", + Resolved: "Resolved", +} as const; +/** + * The current status of a transient error. Null statuses indicate that the error is not transient. + */ +export type ErrorStatus = ClosedEnum; + +export type DataConnectionError = { + /** + * The HTTP status code returned by the source platform when the error occurred. + */ + statusCode?: string | undefined; + /** + * A non-numeric status code/text returned by the source platform when the error occurred. + */ + statusText?: string | undefined; + /** + * A message about a error returned by Codat. + */ + errorMessage?: string | 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. + */ + erroredOnUtc?: string | undefined; + /** + * The current status of a transient error. Null statuses indicate that the error is not transient. + */ + status?: ErrorStatus | 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: + * + * @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. + */ + resolvedOnUtc?: string | undefined; +}; + +/** @internal */ +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, + z.ZodTypeDef, + unknown +> = z.object({ + statusCode: z.string().optional(), + statusText: z.string().optional(), + errorMessage: z.string().optional(), + erroredOnUtc: z.string().optional(), + status: z.nullable(ErrorStatus$inboundSchema).optional(), + 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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/dataconnectionstatus.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/dataconnectionstatus.ts index 6593f604f..d96ea52c0 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/dataconnectionstatus.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/dataconnectionstatus.ts @@ -1,13 +1,41 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + /** * The current authorization status of the data connection. */ -export enum DataConnectionStatus { - PendingAuth = "PendingAuth", - Linked = "Linked", - Unlinked = "Unlinked", - Deauthorized = "Deauthorized", +export const DataConnectionStatus = { + PendingAuth: "PendingAuth", + Linked: "Linked", + Unlinked: "Unlinked", + Deauthorized: "Deauthorized", +} as const; +/** + * The current authorization status of the data connection. + */ +export type DataConnectionStatus = ClosedEnum; + +/** @internal */ +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/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/datastatus.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/datastatus.ts new file mode 100644 index 000000000..0ee08fe44 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/datastatus.ts @@ -0,0 +1,175 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; +import { + Status, + Status$inboundSchema, + Status$outboundSchema, +} from "./status.js"; + +/** + * Available data types + */ +export const DataTypes = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", + 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", +} as const; +/** + * Available data types + */ +export type DataTypes = ClosedEnum; + +/** + * Describes the state of data in the Codat cache for a company and data type + */ +export type DataStatus = { + /** + * Available data types + */ + dataType: DataTypes; + /** + * 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. + */ + lastSuccessfulSync: string; + /** + * The current status of the dataset. + */ + currentStatus: Status; + /** + * Unique identifier for most recent sync of data type. + */ + latestSyncId?: string | undefined; + /** + * Unique identifier for the most recent successful sync of data type. + */ + latestSuccessfulSyncId?: string | undefined; +}; + +/** @internal */ +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, + z.ZodTypeDef, + unknown +> = z.object({ + dataType: DataTypes$inboundSchema, + lastSuccessfulSync: z.string(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/datatype.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/datatype.ts new file mode 100644 index 000000000..65186430c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/datatype.ts @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Available data types + */ +export const DataType = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", + 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", +} as const; +/** + * Available data types + */ +export type DataType = ClosedEnum; + +/** @internal */ +export const DataType$inboundSchema: 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/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/definitionstatus.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/definitionstatus.ts new file mode 100644 index 000000000..9c7df1b3e --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/definitionstatus.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Current state of the tracking category. + */ +export const DefinitionStatus = { + Unknown: "Unknown", + Active: "Active", + Archived: "Archived", +} as const; +/** + * Current state of the tracking category. + */ +export type DefinitionStatus = ClosedEnum; + +/** @internal */ +export const DefinitionStatus$inboundSchema: z.ZodNativeEnum< + typeof DefinitionStatus +> = z.nativeEnum(DefinitionStatus); + +/** @internal */ +export const DefinitionStatus$outboundSchema: z.ZodNativeEnum< + typeof DefinitionStatus +> = DefinitionStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace DefinitionStatus$ { + /** @deprecated use `DefinitionStatus$inboundSchema` instead. */ + export const inboundSchema = DefinitionStatus$inboundSchema; + /** @deprecated use `DefinitionStatus$outboundSchema` instead. */ + export const outboundSchema = DefinitionStatus$outboundSchema; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/errormessage.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/errormessage.ts deleted file mode 100644 index bad892813..000000000 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/errormessage.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { ErrorValidation } from "./errorvalidation"; -import { Expose, Type } from "class-transformer"; - -export class ErrorMessage extends SpeakeasyBase { - /** - * `True` if the error occurred transiently and can be retried. - */ - @SpeakeasyMetadata() - @Expose({ name: "canBeRetried" }) - canBeRetried?: string; - - /** - * Unique identifier used to propagate to all downstream services and determine the source of the error. - */ - @SpeakeasyMetadata() - @Expose({ name: "correlationId" }) - correlationId?: string; - - /** - * Machine readable error code used to automate processes based on the code returned. - */ - @SpeakeasyMetadata() - @Expose({ name: "detailedErrorCode" }) - detailedErrorCode?: number; - - /** - * A brief description of the error. - */ - @SpeakeasyMetadata() - @Expose({ name: "error" }) - error?: string; - - /** - * Codat's service the returned the error. - */ - @SpeakeasyMetadata() - @Expose({ name: "service" }) - service?: string; - - /** - * The HTTP status code returned by the error. - */ - @SpeakeasyMetadata() - @Expose({ name: "statusCode" }) - statusCode?: number; - - /** - * A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. - */ - @SpeakeasyMetadata() - @Expose({ name: "validation" }) - @Type(() => ErrorValidation) - validation?: ErrorValidation; -} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/errorvalidation.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/errorvalidation.ts index 931d8c088..c79e94900 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/errorvalidation.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/errorvalidation.ts @@ -1,22 +1,58 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { ErrorValidationItem } from "./errorvalidationitem"; -import { Expose, Type } from "class-transformer"; +import * as z from "zod"; +import { + ErrorValidationItem, + ErrorValidationItem$inboundSchema, + ErrorValidationItem$Outbound, + ErrorValidationItem$outboundSchema, +} from "./errorvalidationitem.js"; /** * A human-readable object describing validation decisions Codat has made. If an operation has failed because of validation errors, they will be detailed here. */ -export class ErrorValidation extends SpeakeasyBase { - @SpeakeasyMetadata({ elemType: ErrorValidationItem }) - @Expose({ name: "errors" }) - @Type(() => ErrorValidationItem) - errors?: ErrorValidationItem[]; +export type ErrorValidation = { + errors?: Array | null | undefined; + warnings?: Array | null | undefined; +}; - @SpeakeasyMetadata({ elemType: ErrorValidationItem }) - @Expose({ name: "warnings" }) - @Type(() => ErrorValidationItem) - warnings?: ErrorValidationItem[]; +/** @internal */ +export const ErrorValidation$inboundSchema: z.ZodType< + ErrorValidation, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.nullable(z.array(ErrorValidationItem$inboundSchema)).optional(), + 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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/errorvalidationitem.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/errorvalidationitem.ts index c9f96ff2d..ec4d7aace 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/errorvalidationitem.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/errorvalidationitem.ts @@ -1,29 +1,62 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { Expose } from "class-transformer"; +import * as z from "zod"; -export class ErrorValidationItem extends SpeakeasyBase { - /** - * Unique identifier for a validation item. - */ - @SpeakeasyMetadata() - @Expose({ name: "itemId" }) - itemId?: string; +export type ErrorValidationItem = { + /** + * Unique identifier for a validation item. + */ + itemId?: string | null | undefined; + /** + * A message outlining validation item's issue. + */ + message?: string | null | undefined; + /** + * Name of validator. + */ + validatorName?: string | null | undefined; +}; - /** - * A message outlining validation item's issue. - */ - @SpeakeasyMetadata() - @Expose({ name: "message" }) - message?: string; +/** @internal */ +export const ErrorValidationItem$inboundSchema: z.ZodType< + ErrorValidationItem, + z.ZodTypeDef, + unknown +> = z.object({ + itemId: z.nullable(z.string()).optional(), + message: z.nullable(z.string()).optional(), + validatorName: z.nullable(z.string()).optional(), +}); - /** - * Name of validator. - */ - @SpeakeasyMetadata() - @Expose({ name: "validatorName" }) - validatorName?: string; +/** @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/halref.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/halref.ts index 074849699..322dda690 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/halref.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/halref.ts @@ -1,15 +1,45 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { Expose } from "class-transformer"; +import * as z from "zod"; -export class HalRef extends SpeakeasyBase { - /** - * Uri hypertext reference. - */ - @SpeakeasyMetadata() - @Expose({ name: "href" }) - href?: string; +export type HalRef = { + /** + * Uri hypertext reference. + */ + href?: string | undefined; +}; + +/** @internal */ +export const HalRef$inboundSchema: z.ZodType = z + .object({ + 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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/index.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/index.ts index a2b583143..b2dc96b23 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/index.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/index.ts @@ -1,29 +1,121 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./bill"; -export * from "./billeventpayload"; -export * from "./billeventwebhook"; -export * from "./billlineitem"; -export * from "./bills"; -export * from "./billstatus"; -export * from "./clientratelimitreachedwebhook"; -export * from "./clientratelimitreachedwebhookdata"; -export * from "./clientratelimitresetwebhook"; -export * from "./clientratelimitresetwebhookdata"; -export * from "./companies"; -export * from "./company"; -export * from "./companyrequestbody"; -export * from "./connection"; -export * from "./connections"; -export * from "./dataconnectionerror"; -export * from "./dataconnectionstatus"; -export * from "./errormessage"; -export * from "./errorvalidation"; -export * from "./errorvalidationitem"; -export * from "./halref"; -export * from "./items"; -export * from "./links"; -export * from "./security"; -export * from "./supplierref"; +export * from "./account.js"; +export * from "./accountingaddresstype.js"; +export * from "./accountprototype.js"; +export * from "./accountref.js"; +export * from "./accounts.js"; +export * from "./accountstatus.js"; +export * from "./accounttype.js"; +export * from "./address.js"; +export * from "./attachment.js"; +export * from "./attachments.js"; +export * from "./attachmentupload.js"; +export * from "./bankaccountcreateresponse.js"; +export * from "./bankaccountprototype.js"; +export * from "./bankaccountstatus.js"; +export * from "./bill.js"; +export * from "./billcreditnote.js"; +export * from "./billcreditnotelineitem.js"; +export * from "./billcreditnotes.js"; +export * from "./billcreditnotestatus.js"; +export * from "./billedtotype.js"; +export * from "./billlineitem.js"; +export * from "./billpayment.js"; +export * from "./billpaymentline.js"; +export * from "./billpaymentlinelink.js"; +export * from "./billpaymentlinelinktype.js"; +export * from "./billpayments.js"; +export * from "./bills.js"; +export * from "./billstatus.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"; +export * from "./companies.js"; +export * from "./company.js"; +export * from "./companyinfo.js"; +export * from "./companyrequestbody.js"; +export * from "./connection.js"; +export * from "./connections.js"; +export * from "./createaccountresponse.js"; +export * from "./createbillcreditnoteresponse.js"; +export * from "./createbillpaymentresponse.js"; +export * from "./createbillresponse.js"; +export * from "./createjournalentryresponse.js"; +export * from "./createjournalresponse.js"; +export * from "./createsupplierresponse.js"; +export * from "./dataconnectionerror.js"; +export * from "./dataconnectionstatus.js"; +export * from "./datastatus.js"; +export * from "./datatype.js"; +export * from "./definitionstatus.js"; +export * from "./errorvalidation.js"; +export * from "./errorvalidationitem.js"; +export * from "./halref.js"; +export * from "./itemref.js"; +export * from "./items.js"; +export * from "./journal.js"; +export * from "./journalentry.js"; +export * from "./journalentryrecordref.js"; +export * from "./journalline.js"; +export * from "./journalprototype.js"; +export * from "./journalref.js"; +export * from "./journals.js"; +export * from "./journalstatus.js"; +export * from "./links.js"; +export * from "./metadata.js"; +export * from "./paymentallocationitems.js"; +export * from "./paymentallocationpayment.js"; +export * from "./paymentmethod.js"; +export * from "./paymentmethodref.js"; +export * from "./paymentmethods.js"; +export * from "./paymentmethodtype.js"; +export * from "./phonenumber.js"; +export * from "./phonenumbertype.js"; +export * from "./propertiedatatype.js"; +export * from "./pulloperation.js"; +export * from "./pulloperations.js"; +export * from "./pushchangetype.js"; +export * from "./pushfieldvalidation.js"; +export * from "./pushoperation.js"; +export * from "./pushoperationchange.js"; +export * from "./pushoperationref.js"; +export * from "./pushoperations.js"; +export * from "./pushoperationstatus.js"; +export * from "./pushoption.js"; +export * from "./pushoptionchoice.js"; +export * from "./pushoptionproperty.js"; +export * from "./pushoptiontype.js"; +export * from "./pushvalidationinfo.js"; +export * from "./security.js"; +export * from "./status.js"; +export * from "./supplementaldata.js"; +export * from "./supplier.js"; +export * from "./supplierref.js"; +export * from "./suppliers.js"; +export * from "./supplierstatus.js"; +export * from "./taxrate.js"; +export * from "./taxratecomponent.js"; +export * from "./taxrateref.js"; +export * from "./taxrates.js"; +export * from "./taxratestatus.js"; +export * from "./tracking.js"; +export * from "./trackingcategories.js"; +export * from "./trackingcategory.js"; +export * from "./trackingcategoryref.js"; +export * from "./trackingcategorytree.js"; +export * from "./trackingrecordref.js"; +export * from "./updatebillcreditnoteresponse.js"; +export * from "./updatebillresponse.js"; +export * from "./updatesupplierresponse.js"; +export * from "./validation.js"; +export * from "./validationitem.js"; +export * from "./validdatatypelinkitems.js"; +export * from "./weblink.js"; +export * from "./zero.js"; diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/itemref.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/itemref.ts new file mode 100644 index 000000000..33ce6a5fe --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/itemref.ts @@ -0,0 +1,55 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * Reference to the item the line is linked to. + */ +export type ItemRef = { + /** + * Unique identifier for the item in the accounting software. + */ + id: string; + /** + * Name of the item in the accounting software. + */ + name?: string | null | undefined; +}; + +/** @internal */ +export const ItemRef$inboundSchema: z.ZodType = + z.object({ + id: z.string(), + name: z.nullable(z.string()).optional(), + }); + +/** @internal */ +export type ItemRef$Outbound = { + id: string; + name?: string | null | undefined; +}; + +/** @internal */ +export const ItemRef$outboundSchema: z.ZodType< + ItemRef$Outbound, + z.ZodTypeDef, + ItemRef +> = z.object({ + id: z.string(), + name: 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 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/items.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/items.ts index 86eb3d73d..9f5dffbdb 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/items.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/items.ts @@ -1,15 +1,55 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { Expose } from "class-transformer"; +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; -export class Items extends SpeakeasyBase { - /** - * Unique identifier for the group. - */ - @SpeakeasyMetadata() - @Expose({ name: "id" }) - id?: string; +export type Items = { + /** + * Name assigned to withheld tax. + */ + name: string; + /** + * Amount of tax withheld. + */ + amount: Decimal$ | number; +}; + +/** @internal */ +export const Items$inboundSchema: z.ZodType = z + .object({ + name: z.string(), + amount: z.number().transform(v => new Decimal$(v)), + }); + +/** @internal */ +export type Items$Outbound = { + name: string; + amount: number; +}; + +/** @internal */ +export const Items$outboundSchema: z.ZodType< + Items$Outbound, + z.ZodTypeDef, + Items +> = z.object({ + name: z.string(), + amount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), +}); + +/** + * @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journal.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journal.ts new file mode 100644 index 000000000..7132cc70b --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journal.ts @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + JournalStatus, + JournalStatus$inboundSchema, + JournalStatus$outboundSchema, +} from "./journalstatus.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} from "./metadata.js"; + +/** + * > **Language tip:** For line items, or individual transactions, of a company's financial documents, refer to the [Journal entries](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry) data type + * + * @remarks + * + * > View the coverage for journals in the Data coverage explorer. + * + * ## Overview + * + * In accounting software, journals are used to record all the financial transactions of a company. Each transaction in a journal is represented by a separate [journal entry](https://docs.codat.io/sync-for-payables-api#/schemas/JournalEntry). These entries are used to create the general ledger, which is then used to create the financial statements of a business. + * + * When a company records all their transactions in a single journal, it can become large and difficult to maintain and track. This is why large companies often use multiple journals (also known as subjournals) to categorize and manage journal entries. + * + * Such journals can be divided into two categories: + * + * - Special journals: journals used to record specific types of transactions; for example, a purchases journal, a sales journal, or a cash management journal. + * - General journals: journals used to record transactions that fall outside the scope of the special journals. + * + * Multiple journals or subjournals are used in the following Codat integrations: + * + * - [Sage Intacct](https://docs.codat.io/integrations/accounting/sage-intacct/accounting-sage-intacct) (mandatory) + * - [Exact Online](https://docs.codat.io/integrations/accounting/exact-online/accounting-exact-online) (mandatory) + * - [Oracle NetSuite](https://docs.codat.io/integrations/accounting/netsuite/accounting-netsuite) (optional) + * + * > When pushing journal entries to an accounting software that doesn’t support multiple journals (multi-book accounting), the entries will be linked to the platform-generic journal. The Journals data type will only include one object. + */ +export type Journal = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Journal ID. + */ + id?: string | undefined; + /** + * Native journal number or code. + */ + journalCode?: string | null | undefined; + /** + * Journal name. + * + * @remarks + * The maximum length for a journal name is 256 characters. All characters above that number will be truncated. + */ + name?: string | null | undefined; + /** + * The type of the journal. + */ + type?: string | null | undefined; + /** + * Parent journal ID. + * + * @remarks + * If the journal is a parent journal, this value is not present. + */ + parentId?: string | null | undefined; + /** + * If the journal has child journals, this value is true. If it doesn’t, it is false. + */ + hasChildren?: boolean | 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. + */ + createdOn?: string | undefined; + /** + * Current journal status. + */ + status?: JournalStatus | undefined; + metadata?: Metadata | undefined; +}; + +/** @internal */ +export const Journal$inboundSchema: z.ZodType = + z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + journalCode: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + parentId: z.nullable(z.string()).optional(), + hasChildren: z.boolean().optional(), + createdOn: z.string().optional(), + status: JournalStatus$inboundSchema.optional(), + metadata: Metadata$inboundSchema.optional(), + }); + +/** @internal */ +export type Journal$Outbound = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + id?: string | undefined; + journalCode?: string | null | undefined; + name?: string | null | undefined; + type?: string | null | undefined; + parentId?: string | null | undefined; + hasChildren?: boolean | undefined; + createdOn?: string | undefined; + status?: string | undefined; + metadata?: Metadata$Outbound | undefined; +}; + +/** @internal */ +export const Journal$outboundSchema: z.ZodType< + Journal$Outbound, + z.ZodTypeDef, + Journal +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + journalCode: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + parentId: z.nullable(z.string()).optional(), + hasChildren: z.boolean().optional(), + createdOn: z.string().optional(), + status: JournalStatus$outboundSchema.optional(), + metadata: Metadata$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 Journal$ { + /** @deprecated use `Journal$inboundSchema` instead. */ + export const inboundSchema = Journal$inboundSchema; + /** @deprecated use `Journal$outboundSchema` instead. */ + export const outboundSchema = Journal$outboundSchema; + /** @deprecated use `Journal$Outbound` instead. */ + export type Outbound = Journal$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalentry.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalentry.ts new file mode 100644 index 000000000..ed38302f5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalentry.ts @@ -0,0 +1,230 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + JournalEntryRecordRef, + JournalEntryRecordRef$inboundSchema, + JournalEntryRecordRef$Outbound, + JournalEntryRecordRef$outboundSchema, +} from "./journalentryrecordref.js"; +import { + JournalLine, + JournalLine$inboundSchema, + JournalLine$Outbound, + JournalLine$outboundSchema, +} from "./journalline.js"; +import { + JournalRef, + JournalRef$inboundSchema, + JournalRef$Outbound, + JournalRef$outboundSchema, +} from "./journalref.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} from "./metadata.js"; +import { + SupplementalData, + SupplementalData$inboundSchema, + SupplementalData$Outbound, + SupplementalData$outboundSchema, +} from "./supplementaldata.js"; + +/** + * > **Language tip:** For the top-level record of a company's financial transactions, refer to the [Journals](https://docs.codat.io/sync-for-payables-api#/schemas/Journal) data type + * + * @remarks + * + * > View the coverage for journal entries in the Data coverage explorer. + * + * ## Overview + * + * A journal entry report shows the entries made in a company's general ledger, or [accounts](https://docs.codat.io/sync-for-payables-api#/schemas/Account), when transactions are approved. The journal line items for each journal entry should balance. + * + * A journal entry line item is a single transaction line on the journal entry. For example: + * + * - When a journal entry is recording a receipt of cash, the credit to accounts receivable and the debit to cash are separate line items. + * - When a company needs to recognise revenue from an annual contract on a monthly basis, on receipt of cash for month one, they make a debit to deferred income and a credit to revenue. + * + * In Codat a journal entry contains details of: + * + * - The date on which the entry was created and posted. + * - Itemised lines, including amounts and currency. + * - A reference to the associated accounts. + * - A reference to the underlying record. For example, the invoice, bill, or other data type that triggered the posting of the journal entry to the general ledger. + * + * > **Pushing journal entries** + * > Codat only supports journal entries in the base currency of the company that are pushed into accounts denominated in the same base currency. + */ +export type JournalEntry = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Unique identifier of the journal entry for the company in the accounting software. + */ + id?: string | undefined; + /** + * Optional description of the journal entry. + */ + description?: string | 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: + * + * @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. + */ + postedOn?: string | 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. + */ + createdOn?: string | 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. + */ + updatedOn?: string | undefined; + /** + * Links journal entries to the relevant journal in accounting integrations that use multi-book accounting (multiple journals). + */ + journalRef?: JournalRef | undefined; + /** + * An array of journal lines. + */ + journalLines?: Array | null | undefined; + /** + * Links a journal entry to the underlying record that created it. + */ + recordRef?: JournalEntryRecordRef | undefined; + metadata?: Metadata | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; +}; + +/** @internal */ +export const JournalEntry$inboundSchema: z.ZodType< + JournalEntry, + z.ZodTypeDef, + unknown +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + description: z.nullable(z.string()).optional(), + postedOn: z.string().optional(), + createdOn: z.string().optional(), + updatedOn: z.string().optional(), + journalRef: JournalRef$inboundSchema.optional(), + journalLines: z.nullable(z.array(JournalLine$inboundSchema)).optional(), + recordRef: JournalEntryRecordRef$inboundSchema.optional(), + metadata: Metadata$inboundSchema.optional(), + supplementalData: SupplementalData$inboundSchema.optional(), +}); + +/** @internal */ +export type JournalEntry$Outbound = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + id?: string | undefined; + description?: string | null | undefined; + postedOn?: string | undefined; + createdOn?: string | undefined; + updatedOn?: string | undefined; + journalRef?: JournalRef$Outbound | undefined; + journalLines?: Array | null | undefined; + recordRef?: JournalEntryRecordRef$Outbound | undefined; + metadata?: Metadata$Outbound | undefined; + supplementalData?: SupplementalData$Outbound | undefined; +}; + +/** @internal */ +export const JournalEntry$outboundSchema: z.ZodType< + JournalEntry$Outbound, + z.ZodTypeDef, + JournalEntry +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + description: z.nullable(z.string()).optional(), + postedOn: z.string().optional(), + createdOn: z.string().optional(), + updatedOn: z.string().optional(), + journalRef: JournalRef$outboundSchema.optional(), + journalLines: z.nullable(z.array(JournalLine$outboundSchema)).optional(), + recordRef: JournalEntryRecordRef$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 JournalEntry$ { + /** @deprecated use `JournalEntry$inboundSchema` instead. */ + export const inboundSchema = JournalEntry$inboundSchema; + /** @deprecated use `JournalEntry$outboundSchema` instead. */ + export const outboundSchema = JournalEntry$outboundSchema; + /** @deprecated use `JournalEntry$Outbound` instead. */ + export type Outbound = JournalEntry$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalentryrecordref.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalentryrecordref.ts new file mode 100644 index 000000000..99e82cc36 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalentryrecordref.ts @@ -0,0 +1,103 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Name of underlying data type. + */ +export const JournalEntryRecordRefDataType = { + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CreditNotes: "creditNotes", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + JournalEntries: "journalEntries", + Payments: "payments", + Transfers: "transfers", +} as const; +/** + * Name of underlying data type. + */ +export type JournalEntryRecordRefDataType = ClosedEnum< + typeof JournalEntryRecordRefDataType +>; + +/** + * Links a journal entry to the underlying record that created it. + */ +export type JournalEntryRecordRef = { + /** + * 'id' of the underlying record or data type. + */ + id?: string | undefined; + /** + * Name of underlying data type. + */ + dataType?: JournalEntryRecordRefDataType | undefined; +}; + +/** @internal */ +export const JournalEntryRecordRefDataType$inboundSchema: z.ZodNativeEnum< + typeof JournalEntryRecordRefDataType +> = z.nativeEnum(JournalEntryRecordRefDataType); + +/** @internal */ +export const JournalEntryRecordRefDataType$outboundSchema: z.ZodNativeEnum< + typeof JournalEntryRecordRefDataType +> = JournalEntryRecordRefDataType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace JournalEntryRecordRefDataType$ { + /** @deprecated use `JournalEntryRecordRefDataType$inboundSchema` instead. */ + export const inboundSchema = JournalEntryRecordRefDataType$inboundSchema; + /** @deprecated use `JournalEntryRecordRefDataType$outboundSchema` instead. */ + export const outboundSchema = JournalEntryRecordRefDataType$outboundSchema; +} + +/** @internal */ +export const JournalEntryRecordRef$inboundSchema: z.ZodType< + JournalEntryRecordRef, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), + dataType: JournalEntryRecordRefDataType$inboundSchema.optional(), +}); + +/** @internal */ +export type JournalEntryRecordRef$Outbound = { + id?: string | undefined; + dataType?: string | undefined; +}; + +/** @internal */ +export const JournalEntryRecordRef$outboundSchema: z.ZodType< + JournalEntryRecordRef$Outbound, + z.ZodTypeDef, + JournalEntryRecordRef +> = z.object({ + id: z.string().optional(), + dataType: JournalEntryRecordRefDataType$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 JournalEntryRecordRef$ { + /** @deprecated use `JournalEntryRecordRef$inboundSchema` instead. */ + export const inboundSchema = JournalEntryRecordRef$inboundSchema; + /** @deprecated use `JournalEntryRecordRef$outboundSchema` instead. */ + export const outboundSchema = JournalEntryRecordRef$outboundSchema; + /** @deprecated use `JournalEntryRecordRef$Outbound` instead. */ + export type Outbound = JournalEntryRecordRef$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalline.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalline.ts new file mode 100644 index 000000000..1638032db --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalline.ts @@ -0,0 +1,222 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { ClosedEnum } from "../../types/enums.js"; +import { + AccountRef, + AccountRef$inboundSchema, + AccountRef$Outbound, + AccountRef$outboundSchema, +} from "./accountref.js"; +import { + TrackingRecordRef, + TrackingRecordRef$inboundSchema, + TrackingRecordRef$Outbound, + TrackingRecordRef$outboundSchema, +} from "./trackingrecordref.js"; + +/** + * List of record refs associated with the tracking information for the line (eg to a Tracking Category, or customer etc.) + */ +export type JournalLineTracking = { + recordRefs?: Array | null | undefined; +}; + +/** + * Allowed name of the 'dataType'. + */ +export const JournalLineDataType = { + Customers: "customers", + Suppliers: "suppliers", +} as const; +/** + * Allowed name of the 'dataType'. + */ +export type JournalLineDataType = ClosedEnum; + +export type ContactReference = { + /** + * Unique identifier for a customer or supplier. + */ + id: string; + /** + * Allowed name of the 'dataType'. + */ + dataType?: JournalLineDataType | null | undefined; +}; + +export type JournalLine = { + /** + * Description of the journal line item. + */ + description?: string | null | undefined; + /** + * Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative. + */ + netAmount: Decimal$ | number; + /** + * Currency for the journal line item. + */ + currency?: string | null | undefined; + /** + * 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. + */ + accountRef?: AccountRef | undefined; + /** + * List of record refs associated with the tracking information for the line (eg to a Tracking Category, or customer etc.) + */ + tracking?: JournalLineTracking | undefined; + contactRef?: ContactReference | undefined; +}; + +/** @internal */ +export const JournalLineTracking$inboundSchema: z.ZodType< + JournalLineTracking, + z.ZodTypeDef, + unknown +> = z.object({ + recordRefs: z.nullable(z.array(TrackingRecordRef$inboundSchema)).optional(), +}); + +/** @internal */ +export type JournalLineTracking$Outbound = { + recordRefs?: Array | null | undefined; +}; + +/** @internal */ +export const JournalLineTracking$outboundSchema: z.ZodType< + JournalLineTracking$Outbound, + z.ZodTypeDef, + JournalLineTracking +> = z.object({ + recordRefs: z.nullable(z.array(TrackingRecordRef$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 JournalLineTracking$ { + /** @deprecated use `JournalLineTracking$inboundSchema` instead. */ + export const inboundSchema = JournalLineTracking$inboundSchema; + /** @deprecated use `JournalLineTracking$outboundSchema` instead. */ + export const outboundSchema = JournalLineTracking$outboundSchema; + /** @deprecated use `JournalLineTracking$Outbound` instead. */ + export type Outbound = JournalLineTracking$Outbound; +} + +/** @internal */ +export const JournalLineDataType$inboundSchema: z.ZodNativeEnum< + typeof JournalLineDataType +> = z.nativeEnum(JournalLineDataType); + +/** @internal */ +export const JournalLineDataType$outboundSchema: z.ZodNativeEnum< + typeof JournalLineDataType +> = JournalLineDataType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace JournalLineDataType$ { + /** @deprecated use `JournalLineDataType$inboundSchema` instead. */ + export const inboundSchema = JournalLineDataType$inboundSchema; + /** @deprecated use `JournalLineDataType$outboundSchema` instead. */ + export const outboundSchema = JournalLineDataType$outboundSchema; +} + +/** @internal */ +export const ContactReference$inboundSchema: z.ZodType< + ContactReference, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + dataType: z.nullable(JournalLineDataType$inboundSchema).optional(), +}); + +/** @internal */ +export type ContactReference$Outbound = { + id: string; + dataType?: string | null | undefined; +}; + +/** @internal */ +export const ContactReference$outboundSchema: z.ZodType< + ContactReference$Outbound, + z.ZodTypeDef, + ContactReference +> = z.object({ + id: z.string(), + dataType: z.nullable(JournalLineDataType$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 ContactReference$ { + /** @deprecated use `ContactReference$inboundSchema` instead. */ + export const inboundSchema = ContactReference$inboundSchema; + /** @deprecated use `ContactReference$outboundSchema` instead. */ + export const outboundSchema = ContactReference$outboundSchema; + /** @deprecated use `ContactReference$Outbound` instead. */ + export type Outbound = ContactReference$Outbound; +} + +/** @internal */ +export const JournalLine$inboundSchema: z.ZodType< + JournalLine, + z.ZodTypeDef, + unknown +> = z.object({ + description: z.nullable(z.string()).optional(), + netAmount: z.number().transform(v => new Decimal$(v)), + currency: z.nullable(z.string()).optional(), + accountRef: AccountRef$inboundSchema.optional(), + tracking: z.lazy(() => JournalLineTracking$inboundSchema).optional(), + contactRef: z.lazy(() => ContactReference$inboundSchema).optional(), +}); + +/** @internal */ +export type JournalLine$Outbound = { + description?: string | null | undefined; + netAmount: number; + currency?: string | null | undefined; + accountRef?: AccountRef$Outbound | undefined; + tracking?: JournalLineTracking$Outbound | undefined; + contactRef?: ContactReference$Outbound | undefined; +}; + +/** @internal */ +export const JournalLine$outboundSchema: z.ZodType< + JournalLine$Outbound, + z.ZodTypeDef, + JournalLine +> = z.object({ + description: z.nullable(z.string()).optional(), + netAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + currency: z.nullable(z.string()).optional(), + accountRef: AccountRef$outboundSchema.optional(), + tracking: z.lazy(() => JournalLineTracking$outboundSchema).optional(), + contactRef: z.lazy(() => ContactReference$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 JournalLine$ { + /** @deprecated use `JournalLine$inboundSchema` instead. */ + export const inboundSchema = JournalLine$inboundSchema; + /** @deprecated use `JournalLine$outboundSchema` instead. */ + export const outboundSchema = JournalLine$outboundSchema; + /** @deprecated use `JournalLine$Outbound` instead. */ + export type Outbound = JournalLine$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalprototype.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalprototype.ts new file mode 100644 index 000000000..b38883c03 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalprototype.ts @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + JournalStatus, + JournalStatus$inboundSchema, + JournalStatus$outboundSchema, +} from "./journalstatus.js"; + +export type JournalPrototype = { + /** + * Native journal number or code. + */ + journalCode?: string | null | undefined; + /** + * Journal name. + * + * @remarks + * The maximum length for a journal name is 256 characters. All characters above that number will be truncated. + */ + name?: string | null | undefined; + /** + * The type of the journal. + */ + type?: string | null | undefined; + /** + * Parent journal ID. + * + * @remarks + * If the journal is a parent journal, this value is not present. + */ + parentId?: string | null | undefined; + /** + * If the journal has child journals, this value is true. If it doesn’t, it is false. + */ + hasChildren?: boolean | 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. + */ + createdOn?: string | undefined; + /** + * Current journal status. + */ + status?: JournalStatus | undefined; +}; + +/** @internal */ +export const JournalPrototype$inboundSchema: z.ZodType< + JournalPrototype, + z.ZodTypeDef, + unknown +> = z.object({ + journalCode: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + parentId: z.nullable(z.string()).optional(), + hasChildren: z.boolean().optional(), + createdOn: z.string().optional(), + status: JournalStatus$inboundSchema.optional(), +}); + +/** @internal */ +export type JournalPrototype$Outbound = { + journalCode?: string | null | undefined; + name?: string | null | undefined; + type?: string | null | undefined; + parentId?: string | null | undefined; + hasChildren?: boolean | undefined; + createdOn?: string | undefined; + status?: string | undefined; +}; + +/** @internal */ +export const JournalPrototype$outboundSchema: z.ZodType< + JournalPrototype$Outbound, + z.ZodTypeDef, + JournalPrototype +> = z.object({ + journalCode: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + type: z.nullable(z.string()).optional(), + parentId: z.nullable(z.string()).optional(), + hasChildren: z.boolean().optional(), + createdOn: z.string().optional(), + status: JournalStatus$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 JournalPrototype$ { + /** @deprecated use `JournalPrototype$inboundSchema` instead. */ + export const inboundSchema = JournalPrototype$inboundSchema; + /** @deprecated use `JournalPrototype$outboundSchema` instead. */ + export const outboundSchema = JournalPrototype$outboundSchema; + /** @deprecated use `JournalPrototype$Outbound` instead. */ + export type Outbound = JournalPrototype$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalref.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalref.ts new file mode 100644 index 000000000..2b60b717e --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalref.ts @@ -0,0 +1,58 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * Links journal entries to the relevant journal in accounting integrations that use multi-book accounting (multiple journals). + */ +export type JournalRef = { + /** + * GUID of the underlying journal. + */ + id: string; + /** + * Name of journal + */ + name?: string | null | undefined; +}; + +/** @internal */ +export const JournalRef$inboundSchema: z.ZodType< + JournalRef, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + name: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type JournalRef$Outbound = { + id: string; + name?: string | null | undefined; +}; + +/** @internal */ +export const JournalRef$outboundSchema: z.ZodType< + JournalRef$Outbound, + z.ZodTypeDef, + JournalRef +> = z.object({ + id: z.string(), + name: 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 JournalRef$ { + /** @deprecated use `JournalRef$inboundSchema` instead. */ + export const inboundSchema = JournalRef$inboundSchema; + /** @deprecated use `JournalRef$outboundSchema` instead. */ + export const outboundSchema = JournalRef$outboundSchema; + /** @deprecated use `JournalRef$Outbound` instead. */ + export type Outbound = JournalRef$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journals.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journals.ts new file mode 100644 index 000000000..a69fc108c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journals.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { + Journal, + Journal$inboundSchema, + Journal$Outbound, + Journal$outboundSchema, +} from "./journal.js"; +import { + Links, + Links$inboundSchema, + Links$Outbound, + Links$outboundSchema, +} from "./links.js"; + +export type Journals = { + results?: Array | undefined; + /** + * Current page number. + */ + pageNumber: number; + /** + * Number of items to return in results array. + */ + pageSize: number; + /** + * Total number of items. + */ + totalResults: number; + links: Links; +}; + +/** @internal */ +export const Journals$inboundSchema: z.ZodType< + Journals, + z.ZodTypeDef, + unknown +> = z.object({ + results: z.array(Journal$inboundSchema).optional(), + pageNumber: z.number().int(), + pageSize: z.number().int(), + totalResults: z.number().int(), + _links: Links$inboundSchema, +}).transform((v) => { + return remap$(v, { + "_links": "links", + }); +}); + +/** @internal */ +export type Journals$Outbound = { + results?: Array | undefined; + pageNumber: number; + pageSize: number; + totalResults: number; + _links: Links$Outbound; +}; + +/** @internal */ +export const Journals$outboundSchema: z.ZodType< + Journals$Outbound, + z.ZodTypeDef, + Journals +> = z.object({ + results: z.array(Journal$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 Journals$ { + /** @deprecated use `Journals$inboundSchema` instead. */ + export const inboundSchema = Journals$inboundSchema; + /** @deprecated use `Journals$outboundSchema` instead. */ + export const outboundSchema = Journals$outboundSchema; + /** @deprecated use `Journals$Outbound` instead. */ + export type Outbound = Journals$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalstatus.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalstatus.ts new file mode 100644 index 000000000..b440299d3 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/journalstatus.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Current journal status. + */ +export const JournalStatus = { + Unknown: "Unknown", + Active: "Active", + Archived: "Archived", +} as const; +/** + * Current journal status. + */ +export type JournalStatus = ClosedEnum; + +/** @internal */ +export const JournalStatus$inboundSchema: z.ZodNativeEnum< + typeof JournalStatus +> = z.nativeEnum(JournalStatus); + +/** @internal */ +export const JournalStatus$outboundSchema: z.ZodNativeEnum< + typeof JournalStatus +> = JournalStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace JournalStatus$ { + /** @deprecated use `JournalStatus$inboundSchema` instead. */ + export const inboundSchema = JournalStatus$inboundSchema; + /** @deprecated use `JournalStatus$outboundSchema` instead. */ + export const outboundSchema = JournalStatus$outboundSchema; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/links.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/links.ts index dcc438fbd..31ddfc070 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/links.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/links.ts @@ -1,29 +1,60 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { HalRef } from "./halref"; -import { Expose, Type } from "class-transformer"; +import * as z from "zod"; +import { + HalRef, + HalRef$inboundSchema, + HalRef$Outbound, + HalRef$outboundSchema, +} from "./halref.js"; -export class Links extends SpeakeasyBase { - @SpeakeasyMetadata() - @Expose({ name: "current" }) - @Type(() => HalRef) - current: HalRef; +export type Links = { + self: HalRef; + current: HalRef; + next?: HalRef | undefined; + previous?: HalRef | undefined; +}; - @SpeakeasyMetadata() - @Expose({ name: "next" }) - @Type(() => HalRef) - next?: HalRef; +/** @internal */ +export const Links$inboundSchema: z.ZodType = z + .object({ + self: HalRef$inboundSchema, + current: HalRef$inboundSchema, + next: HalRef$inboundSchema.optional(), + previous: HalRef$inboundSchema.optional(), + }); - @SpeakeasyMetadata() - @Expose({ name: "previous" }) - @Type(() => HalRef) - previous?: HalRef; +/** @internal */ +export type Links$Outbound = { + self: HalRef$Outbound; + current: HalRef$Outbound; + next?: HalRef$Outbound | undefined; + previous?: HalRef$Outbound | undefined; +}; - @SpeakeasyMetadata() - @Expose({ name: "self" }) - @Type(() => HalRef) - self: HalRef; +/** @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/metadata.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/metadata.ts new file mode 100644 index 000000000..ceed8f31b --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/metadata.ts @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type Metadata = { + /** + * Indicates whether the record has been deleted in the third-party system this record originated from. + */ + isDeleted?: boolean | null | undefined; +}; + +/** @internal */ +export const Metadata$inboundSchema: z.ZodType< + Metadata, + z.ZodTypeDef, + unknown +> = z.object({ + isDeleted: z.nullable(z.boolean()).optional(), +}); + +/** @internal */ +export type Metadata$Outbound = { + isDeleted?: boolean | null | undefined; +}; + +/** @internal */ +export const Metadata$outboundSchema: z.ZodType< + Metadata$Outbound, + z.ZodTypeDef, + Metadata +> = 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 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentallocationitems.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentallocationitems.ts new file mode 100644 index 000000000..324c9ef6f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentallocationitems.ts @@ -0,0 +1,185 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { + PaymentAllocationPayment, + PaymentAllocationPayment$inboundSchema, + PaymentAllocationPayment$Outbound, + PaymentAllocationPayment$outboundSchema, +} from "./paymentallocationpayment.js"; + +export type Allocation = { + /** + * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + * + * @remarks + * + * ## 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. + */ + currency?: string | undefined; + /** + * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. + * + * @remarks + * + * 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. | + */ + currencyRate?: Decimal$ | number | 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: + * + * @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. + */ + allocatedOnDate?: string | undefined; + /** + * The total amount that has been allocated. + */ + totalAmount?: Decimal$ | number | undefined; +}; + +export type PaymentAllocationItems = { + payment: PaymentAllocationPayment; + allocation: Allocation; +}; + +/** @internal */ +export const Allocation$inboundSchema: z.ZodType< + Allocation, + z.ZodTypeDef, + unknown +> = z.object({ + currency: z.string().optional(), + currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + allocatedOnDate: z.string().optional(), + totalAmount: z.number().transform(v => new Decimal$(v)).optional(), +}); + +/** @internal */ +export type Allocation$Outbound = { + currency?: string | undefined; + currencyRate?: number | null | undefined; + allocatedOnDate?: string | undefined; + totalAmount?: number | undefined; +}; + +/** @internal */ +export const Allocation$outboundSchema: z.ZodType< + Allocation$Outbound, + z.ZodTypeDef, + Allocation +> = z.object({ + currency: z.string().optional(), + currencyRate: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + allocatedOnDate: z.string().optional(), + totalAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Allocation$ { + /** @deprecated use `Allocation$inboundSchema` instead. */ + export const inboundSchema = Allocation$inboundSchema; + /** @deprecated use `Allocation$outboundSchema` instead. */ + export const outboundSchema = Allocation$outboundSchema; + /** @deprecated use `Allocation$Outbound` instead. */ + export type Outbound = Allocation$Outbound; +} + +/** @internal */ +export const PaymentAllocationItems$inboundSchema: z.ZodType< + PaymentAllocationItems, + z.ZodTypeDef, + unknown +> = z.object({ + payment: PaymentAllocationPayment$inboundSchema, + allocation: z.lazy(() => Allocation$inboundSchema), +}); + +/** @internal */ +export type PaymentAllocationItems$Outbound = { + payment: PaymentAllocationPayment$Outbound; + allocation: Allocation$Outbound; +}; + +/** @internal */ +export const PaymentAllocationItems$outboundSchema: z.ZodType< + PaymentAllocationItems$Outbound, + z.ZodTypeDef, + PaymentAllocationItems +> = z.object({ + payment: PaymentAllocationPayment$outboundSchema, + allocation: z.lazy(() => Allocation$outboundSchema), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PaymentAllocationItems$ { + /** @deprecated use `PaymentAllocationItems$inboundSchema` instead. */ + export const inboundSchema = PaymentAllocationItems$inboundSchema; + /** @deprecated use `PaymentAllocationItems$outboundSchema` instead. */ + export const outboundSchema = PaymentAllocationItems$outboundSchema; + /** @deprecated use `PaymentAllocationItems$Outbound` instead. */ + export type Outbound = PaymentAllocationItems$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentallocationpayment.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentallocationpayment.ts new file mode 100644 index 000000000..257cace07 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentallocationpayment.ts @@ -0,0 +1,169 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { + AccountRef, + AccountRef$inboundSchema, + AccountRef$Outbound, + AccountRef$outboundSchema, +} from "./accountref.js"; + +export type PaymentAllocationPayment = { + /** + * Identifier of the allocated payment. + */ + id?: string | undefined; + /** + * Notes attached to the allocated payment. + */ + note?: string | null | undefined; + /** + * Reference to the allocated payment. + */ + reference?: string | null | undefined; + /** + * 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. + */ + accountRef?: AccountRef | undefined; + /** + * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + * + * @remarks + * + * ## 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. + */ + currency?: string | undefined; + /** + * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. + * + * @remarks + * + * 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. | + */ + currencyRate?: Decimal$ | number | 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: + * + * @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. + */ + paidOnDate?: string | undefined; + /** + * Total amount that was paid. + */ + totalAmount?: Decimal$ | number | undefined; +}; + +/** @internal */ +export const PaymentAllocationPayment$inboundSchema: z.ZodType< + PaymentAllocationPayment, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), + note: z.nullable(z.string()).optional(), + reference: z.nullable(z.string()).optional(), + accountRef: AccountRef$inboundSchema.optional(), + currency: z.string().optional(), + currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + paidOnDate: z.string().optional(), + totalAmount: z.number().transform(v => new Decimal$(v)).optional(), +}); + +/** @internal */ +export type PaymentAllocationPayment$Outbound = { + id?: string | undefined; + note?: string | null | undefined; + reference?: string | null | undefined; + accountRef?: AccountRef$Outbound | undefined; + currency?: string | undefined; + currencyRate?: number | null | undefined; + paidOnDate?: string | undefined; + totalAmount?: number | undefined; +}; + +/** @internal */ +export const PaymentAllocationPayment$outboundSchema: z.ZodType< + PaymentAllocationPayment$Outbound, + z.ZodTypeDef, + PaymentAllocationPayment +> = z.object({ + id: z.string().optional(), + note: z.nullable(z.string()).optional(), + reference: z.nullable(z.string()).optional(), + accountRef: AccountRef$outboundSchema.optional(), + currency: z.string().optional(), + currencyRate: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + paidOnDate: z.string().optional(), + totalAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PaymentAllocationPayment$ { + /** @deprecated use `PaymentAllocationPayment$inboundSchema` instead. */ + export const inboundSchema = PaymentAllocationPayment$inboundSchema; + /** @deprecated use `PaymentAllocationPayment$outboundSchema` instead. */ + export const outboundSchema = PaymentAllocationPayment$outboundSchema; + /** @deprecated use `PaymentAllocationPayment$Outbound` instead. */ + export type Outbound = PaymentAllocationPayment$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentmethod.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentmethod.ts new file mode 100644 index 000000000..ce2c6402d --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentmethod.ts @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} from "./metadata.js"; +import { + PaymentMethodType, + PaymentMethodType$inboundSchema, + PaymentMethodType$outboundSchema, +} from "./paymentmethodtype.js"; + +/** + * Status of the Payment Method. + */ +export const PaymentMethodStatus = { + Unknown: "Unknown", + Active: "Active", + Archived: "Archived", +} as const; +/** + * Status of the Payment Method. + */ +export type PaymentMethodStatus = ClosedEnum; + +/** + * > View the coverage for payment methods in the Data coverage explorer. + * + * @remarks + * + * ## Overview + * + * A Payment Method represents the payment method(s) used to pay a Bill. Payment Methods are referenced on [Bill Payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) and [Payments](https://docs.codat.io/sync-for-payables-api#/schemas/Payment). + */ +export type PaymentMethod = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Unique identifier for the payment method. + */ + id?: string | undefined; + /** + * Name of the payment method. + */ + name?: string | null | undefined; + /** + * Method of payment. + */ + type?: PaymentMethodType | undefined; + /** + * Status of the Payment Method. + */ + status?: PaymentMethodStatus | undefined; + metadata?: Metadata | undefined; +}; + +/** @internal */ +export const PaymentMethodStatus$inboundSchema: z.ZodNativeEnum< + typeof PaymentMethodStatus +> = z.nativeEnum(PaymentMethodStatus); + +/** @internal */ +export const PaymentMethodStatus$outboundSchema: z.ZodNativeEnum< + typeof PaymentMethodStatus +> = PaymentMethodStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PaymentMethodStatus$ { + /** @deprecated use `PaymentMethodStatus$inboundSchema` instead. */ + export const inboundSchema = PaymentMethodStatus$inboundSchema; + /** @deprecated use `PaymentMethodStatus$outboundSchema` instead. */ + export const outboundSchema = PaymentMethodStatus$outboundSchema; +} + +/** @internal */ +export const PaymentMethod$inboundSchema: z.ZodType< + PaymentMethod, + z.ZodTypeDef, + unknown +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + name: z.nullable(z.string()).optional(), + type: PaymentMethodType$inboundSchema.optional(), + status: PaymentMethodStatus$inboundSchema.optional(), + metadata: Metadata$inboundSchema.optional(), +}); + +/** @internal */ +export type PaymentMethod$Outbound = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + id?: string | undefined; + name?: string | null | undefined; + type?: string | undefined; + status?: string | undefined; + metadata?: Metadata$Outbound | undefined; +}; + +/** @internal */ +export const PaymentMethod$outboundSchema: z.ZodType< + PaymentMethod$Outbound, + z.ZodTypeDef, + PaymentMethod +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + name: z.nullable(z.string()).optional(), + type: PaymentMethodType$outboundSchema.optional(), + status: PaymentMethodStatus$outboundSchema.optional(), + metadata: Metadata$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 PaymentMethod$ { + /** @deprecated use `PaymentMethod$inboundSchema` instead. */ + export const inboundSchema = PaymentMethod$inboundSchema; + /** @deprecated use `PaymentMethod$outboundSchema` instead. */ + export const outboundSchema = PaymentMethod$outboundSchema; + /** @deprecated use `PaymentMethod$Outbound` instead. */ + export type Outbound = PaymentMethod$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentmethodref.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentmethodref.ts new file mode 100644 index 000000000..40920c63f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentmethodref.ts @@ -0,0 +1,58 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * The Payment Method to which the payment is linked in the accounting software. + */ +export type PaymentMethodRef = { + /** + * The unique identifier of the location being referenced. + */ + id: string; + /** + * Name of the location being referenced. + */ + name?: string | undefined; +}; + +/** @internal */ +export const PaymentMethodRef$inboundSchema: z.ZodType< + PaymentMethodRef, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + name: z.string().optional(), +}); + +/** @internal */ +export type PaymentMethodRef$Outbound = { + id: string; + name?: string | undefined; +}; + +/** @internal */ +export const PaymentMethodRef$outboundSchema: z.ZodType< + PaymentMethodRef$Outbound, + z.ZodTypeDef, + PaymentMethodRef +> = z.object({ + id: z.string(), + name: 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 PaymentMethodRef$ { + /** @deprecated use `PaymentMethodRef$inboundSchema` instead. */ + export const inboundSchema = PaymentMethodRef$inboundSchema; + /** @deprecated use `PaymentMethodRef$outboundSchema` instead. */ + export const outboundSchema = PaymentMethodRef$outboundSchema; + /** @deprecated use `PaymentMethodRef$Outbound` instead. */ + export type Outbound = PaymentMethodRef$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentmethods.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentmethods.ts new file mode 100644 index 000000000..3b331b9ac --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentmethods.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { + Links, + Links$inboundSchema, + Links$Outbound, + Links$outboundSchema, +} from "./links.js"; +import { + PaymentMethod, + PaymentMethod$inboundSchema, + PaymentMethod$Outbound, + PaymentMethod$outboundSchema, +} from "./paymentmethod.js"; + +export type PaymentMethods = { + results?: Array | undefined; + /** + * Current page number. + */ + pageNumber: number; + /** + * Number of items to return in results array. + */ + pageSize: number; + /** + * Total number of items. + */ + totalResults: number; + links: Links; +}; + +/** @internal */ +export const PaymentMethods$inboundSchema: z.ZodType< + PaymentMethods, + z.ZodTypeDef, + unknown +> = z.object({ + results: z.array(PaymentMethod$inboundSchema).optional(), + pageNumber: z.number().int(), + pageSize: z.number().int(), + totalResults: z.number().int(), + _links: Links$inboundSchema, +}).transform((v) => { + return remap$(v, { + "_links": "links", + }); +}); + +/** @internal */ +export type PaymentMethods$Outbound = { + results?: Array | undefined; + pageNumber: number; + pageSize: number; + totalResults: number; + _links: Links$Outbound; +}; + +/** @internal */ +export const PaymentMethods$outboundSchema: z.ZodType< + PaymentMethods$Outbound, + z.ZodTypeDef, + PaymentMethods +> = z.object({ + results: z.array(PaymentMethod$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 PaymentMethods$ { + /** @deprecated use `PaymentMethods$inboundSchema` instead. */ + export const inboundSchema = PaymentMethods$inboundSchema; + /** @deprecated use `PaymentMethods$outboundSchema` instead. */ + export const outboundSchema = PaymentMethods$outboundSchema; + /** @deprecated use `PaymentMethods$Outbound` instead. */ + export type Outbound = PaymentMethods$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentmethodtype.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentmethodtype.ts new file mode 100644 index 000000000..0b26f1024 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/paymentmethodtype.ts @@ -0,0 +1,44 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Method of payment. + */ +export const PaymentMethodType = { + Unknown: "Unknown", + Cash: "Cash", + Check: "Check", + CreditCard: "CreditCard", + DebitCard: "DebitCard", + BankTransfer: "BankTransfer", + Other: "Other", +} as const; +/** + * Method of payment. + */ +export type PaymentMethodType = ClosedEnum; + +/** @internal */ +export const PaymentMethodType$inboundSchema: z.ZodNativeEnum< + typeof PaymentMethodType +> = z.nativeEnum(PaymentMethodType); + +/** @internal */ +export const PaymentMethodType$outboundSchema: z.ZodNativeEnum< + typeof PaymentMethodType +> = PaymentMethodType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace PaymentMethodType$ { + /** @deprecated use `PaymentMethodType$inboundSchema` instead. */ + export const inboundSchema = PaymentMethodType$inboundSchema; + /** @deprecated use `PaymentMethodType$outboundSchema` instead. */ + export const outboundSchema = PaymentMethodType$outboundSchema; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/phonenumber.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/phonenumber.ts new file mode 100644 index 000000000..37d29588f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/phonenumber.ts @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + PhoneNumberType, + PhoneNumberType$inboundSchema, + PhoneNumberType$outboundSchema, +} from "./phonenumbertype.js"; + +export type PhoneNumber = { + /** + * A phone number. + */ + number?: string | null | undefined; + /** + * The type of phone number + */ + type: PhoneNumberType; +}; + +/** @internal */ +export const PhoneNumber$inboundSchema: z.ZodType< + PhoneNumber, + z.ZodTypeDef, + unknown +> = z.object({ + number: z.nullable(z.string()).optional(), + type: PhoneNumberType$inboundSchema, +}); + +/** @internal */ +export type PhoneNumber$Outbound = { + number?: string | null | undefined; + type: string; +}; + +/** @internal */ +export const PhoneNumber$outboundSchema: z.ZodType< + PhoneNumber$Outbound, + z.ZodTypeDef, + PhoneNumber +> = 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 PhoneNumber$ { + /** @deprecated use `PhoneNumber$inboundSchema` instead. */ + export const inboundSchema = PhoneNumber$inboundSchema; + /** @deprecated use `PhoneNumber$outboundSchema` instead. */ + export const outboundSchema = PhoneNumber$outboundSchema; + /** @deprecated use `PhoneNumber$Outbound` instead. */ + export type Outbound = PhoneNumber$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/phonenumbertype.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/phonenumbertype.ts new file mode 100644 index 000000000..833a84c36 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/phonenumbertype.ts @@ -0,0 +1,42 @@ +/* + * 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/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/propertiedatatype.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/propertiedatatype.ts new file mode 100644 index 000000000..84677eb73 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/propertiedatatype.ts @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Available data types + */ +export const PropertieDataType = { + AccountTransactions: "accountTransactions", + BalanceSheet: "balanceSheet", + BankAccounts: "bankAccounts", + BankTransactions: "bankTransactions", + BillCreditNotes: "billCreditNotes", + BillPayments: "billPayments", + Bills: "bills", + CashFlowStatement: "cashFlowStatement", + ChartOfAccounts: "chartOfAccounts", + Company: "company", + CreditNotes: "creditNotes", + Customers: "customers", + DirectCosts: "directCosts", + DirectIncomes: "directIncomes", + Invoices: "invoices", + ItemReceipts: "itemReceipts", + Items: "items", + JournalEntries: "journalEntries", + Journals: "journals", + PaymentMethods: "paymentMethods", + Payments: "payments", + ProfitAndLoss: "profitAndLoss", + PurchaseOrders: "purchaseOrders", + SalesOrders: "salesOrders", + Suppliers: "suppliers", + TaxRates: "taxRates", + TrackingCategories: "trackingCategories", + Transfers: "transfers", + 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", +} as const; +/** + * Available data types + */ +export type PropertieDataType = ClosedEnum; + +/** @internal */ +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/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pulloperation.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pulloperation.ts new file mode 100644 index 000000000..d52493767 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pulloperation.ts @@ -0,0 +1,220 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * The current status of the dataset. + */ +export const DatasetStatus = { + Initial: "Initial", + Queued: "Queued", + Fetching: "Fetching", + MapQueued: "MapQueued", + Mapping: "Mapping", + Complete: "Complete", + FetchError: "FetchError", + MapError: "MapError", + InternalError: "InternalError", + ProcessingQueued: "ProcessingQueued", + Processing: "Processing", + ProcessingError: "ProcessingError", + ValidationQueued: "ValidationQueued", + Validating: "Validating", + ValidationError: "ValidationError", + AuthError: "AuthError", + Cancelled: "Cancelled", + NotSupported: "NotSupported", + RateLimitError: "RateLimitError", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", +} as const; +/** + * The current status of the dataset. + */ +export type DatasetStatus = ClosedEnum; + +/** + * Information about a queued, in progress or completed pull operation. + * + * @remarks + * *Formally called `dataset`* + */ +export type PullOperation = { + /** + * Unique identifier of the pull operation. + */ + id: string; + /** + * Unique identifier of the company associated to this pull operation. + */ + companyId: string; + /** + * Unique identifier of the connection associated to this pull operation. + */ + connectionId: string; + /** + * The data type you are requesting in a pull operation. + */ + dataType: string; + /** + * The current status of the dataset. + */ + status: DatasetStatus; + /** + * Additional information about the dataset status. + */ + statusDescription?: string | null | undefined; + /** + * A message about a transient or persistent error returned by Codat or the source platform. + */ + errorMessage?: string | 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: + * + * @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. + */ + requested: string; + /** + * 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. + */ + completed?: string | undefined; + /** + * An integer signifying the progress of the pull operation. + */ + progress: number; + /** + * `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. + */ + isCompleted: boolean; + /** + * `True` if the pull operation entered an error state. + */ + isErrored: boolean; +}; + +/** @internal */ +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, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + companyId: z.string(), + connectionId: z.string(), + dataType: z.string(), + status: DatasetStatus$inboundSchema, + 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 */ +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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pulloperations.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pulloperations.ts new file mode 100644 index 000000000..18b685f25 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pulloperations.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { + Links, + Links$inboundSchema, + Links$Outbound, + Links$outboundSchema, +} from "./links.js"; +import { + PullOperation, + PullOperation$inboundSchema, + PullOperation$Outbound, + PullOperation$outboundSchema, +} from "./pulloperation.js"; + +export type PullOperations = { + results?: Array | undefined; + /** + * Current page number. + */ + pageNumber: number; + /** + * Number of items to return in results array. + */ + pageSize: number; + /** + * Total number of items. + */ + totalResults: number; + links: Links; +}; + +/** @internal */ +export const PullOperations$inboundSchema: z.ZodType< + PullOperations, + z.ZodTypeDef, + unknown +> = z.object({ + results: z.array(PullOperation$inboundSchema).optional(), + pageNumber: z.number().int(), + pageSize: z.number().int(), + totalResults: z.number().int(), + _links: Links$inboundSchema, +}).transform((v) => { + return remap$(v, { + "_links": "links", + }); +}); + +/** @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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushchangetype.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushchangetype.ts new file mode 100644 index 000000000..9f6cbdc71 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushchangetype.ts @@ -0,0 +1,42 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Type of change being applied to record in third party platform. + */ +export const PushChangeType = { + Unknown: "Unknown", + Created: "Created", + Modified: "Modified", + Deleted: "Deleted", + AttachmentUploaded: "AttachmentUploaded", +} as const; +/** + * Type of change being applied to record in third party platform. + */ +export type PushChangeType = ClosedEnum; + +/** @internal */ +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/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushfieldvalidation.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushfieldvalidation.ts new file mode 100644 index 000000000..ab19effe2 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushfieldvalidation.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type PushFieldValidation = { + /** + * Field name that resulted in the validation issue. + */ + field?: string | undefined; + /** + * Details on the validation issue. + */ + details: string; + /** + * Unique reference identifier for the validation issue. + */ + ref?: string | null | undefined; +}; + +/** @internal */ +export const PushFieldValidation$inboundSchema: z.ZodType< + PushFieldValidation, + z.ZodTypeDef, + unknown +> = z.object({ + field: z.string().optional(), + details: z.string(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperation.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperation.ts new file mode 100644 index 000000000..5a47dfd7f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperation.ts @@ -0,0 +1,192 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +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"; + +export type PushOperation = { + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + */ + changes?: Array | null | undefined; + /** + * Available data types + */ + dataType?: PropertieDataType | undefined; + /** + * Unique identifier for your SMB in Codat. + */ + companyId: string; + /** + * 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. + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + */ + dataConnectionKey: string; + /** + * 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. + */ + requestedOnUtc: string; + /** + * 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. + */ + completedOnUtc?: string | undefined; + /** + * Number of minutes the push operation must complete within before it times out. + */ + timeoutInMinutes?: number | null | undefined; + /** + * Number of seconds the push operation must complete within before it times out. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + timeoutInSeconds?: number | null | undefined; + /** + * The current status of the push operation. + */ + status: PushOperationStatus; + /** + * A message about the error. + */ + errorMessage?: string | null | undefined; + /** + * A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + */ + validation?: Validation | undefined; + /** + * Push status code. + */ + statusCode: number; +}; + +/** @internal */ +export const PushOperation$inboundSchema: z.ZodType< + PushOperation, + z.ZodTypeDef, + unknown +> = z.object({ + changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), + dataType: PropertieDataType$inboundSchema.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$inboundSchema, + errorMessage: z.nullable(z.string()).optional(), + validation: Validation$inboundSchema.optional(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperationchange.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperationchange.ts new file mode 100644 index 000000000..474736889 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperationchange.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + PushChangeType, + PushChangeType$inboundSchema, + PushChangeType$outboundSchema, +} from "./pushchangetype.js"; +import { + PushOperationRef, + PushOperationRef$inboundSchema, + PushOperationRef$Outbound, + PushOperationRef$outboundSchema, +} from "./pushoperationref.js"; + +export type PushOperationChange = { + /** + * Type of change being applied to record in third party platform. + */ + type?: PushChangeType | undefined; + recordRef?: PushOperationRef | undefined; + /** + * Unique identifier for the attachment created otherwise null. + */ + attachmentId?: string | null | undefined; +}; + +/** @internal */ +export const PushOperationChange$inboundSchema: z.ZodType< + PushOperationChange, + z.ZodTypeDef, + unknown +> = z.object({ + type: PushChangeType$inboundSchema.optional(), + recordRef: PushOperationRef$inboundSchema.optional(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperationref.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperationref.ts new file mode 100644 index 000000000..4165ae56d --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperationref.ts @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + PropertieDataType, + PropertieDataType$inboundSchema, + PropertieDataType$outboundSchema, +} from "./propertiedatatype.js"; + +export type PushOperationRef = { + /** + * Unique identifier for a push operation. + */ + id?: string | undefined; + /** + * Available data types + */ + dataType?: PropertieDataType | undefined; +}; + +/** @internal */ +export const PushOperationRef$inboundSchema: z.ZodType< + PushOperationRef, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperations.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperations.ts new file mode 100644 index 000000000..df1c1523c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperations.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { + Links, + Links$inboundSchema, + Links$Outbound, + Links$outboundSchema, +} from "./links.js"; +import { + PushOperation, + PushOperation$inboundSchema, + PushOperation$Outbound, + PushOperation$outboundSchema, +} from "./pushoperation.js"; + +export type PushOperations = { + results?: Array | undefined; + /** + * Current page number. + */ + pageNumber: number; + /** + * Number of items to return in results array. + */ + pageSize: number; + /** + * Total number of items. + */ + totalResults: number; + links: Links; +}; + +/** @internal */ +export const PushOperations$inboundSchema: z.ZodType< + PushOperations, + z.ZodTypeDef, + unknown +> = z.object({ + results: z.array(PushOperation$inboundSchema).optional(), + pageNumber: z.number().int(), + pageSize: z.number().int(), + totalResults: z.number().int(), + _links: Links$inboundSchema, +}).transform((v) => { + return remap$(v, { + "_links": "links", + }); +}); + +/** @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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperationstatus.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperationstatus.ts new file mode 100644 index 000000000..f4da233b5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoperationstatus.ts @@ -0,0 +1,41 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * The current status of the push operation. + */ +export const PushOperationStatus = { + Pending: "Pending", + Failed: "Failed", + Success: "Success", + TimedOut: "TimedOut", +} as const; +/** + * The current status of the push operation. + */ +export type PushOperationStatus = ClosedEnum; + +/** @internal */ +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/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoption.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoption.ts new file mode 100644 index 000000000..cf16071bd --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoption.ts @@ -0,0 +1,105 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +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 = { + /** + * The option type. + */ + type: PushOptionType; + /** + * The property's display name. + */ + displayName: string; + /** + * A description of the property. + */ + description?: string | undefined; + /** + * The property is required if `True`. + */ + required: boolean; + properties?: { [k: string]: PushOptionProperty } | null | undefined; + options?: Array | null | undefined; + validation?: PushValidationInfo | undefined; +}; + +/** @internal */ +export const PushOption$inboundSchema: z.ZodType< + PushOption, + z.ZodTypeDef, + unknown +> = z.object({ + type: PushOptionType$inboundSchema, + displayName: z.string(), + description: z.string().optional(), + required: z.boolean(), + properties: z.nullable(z.record(PushOptionProperty$inboundSchema)).optional(), + options: z.nullable(z.array(PushOptionChoice$inboundSchema)).optional(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoptionchoice.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoptionchoice.ts new file mode 100644 index 000000000..873a731de --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoptionchoice.ts @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + PushOptionType, + PushOptionType$inboundSchema, + PushOptionType$outboundSchema, +} from "./pushoptiontype.js"; + +export type PushOptionChoice = { + /** + * Allowed value for field. + */ + value?: string | undefined; + /** + * The option type. + */ + type?: PushOptionType | undefined; + /** + * The property's display name. + */ + displayName?: string | undefined; + /** + * A description of the property. + */ + description?: string | undefined; + /** + * The property is required if `True`. + */ + required?: boolean | undefined; +}; + +/** @internal */ +export const PushOptionChoice$inboundSchema: z.ZodType< + PushOptionChoice, + z.ZodTypeDef, + unknown +> = z.object({ + value: z.string().optional(), + type: PushOptionType$inboundSchema.optional(), + displayName: z.string().optional(), + description: z.string().optional(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoptionproperty.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoptionproperty.ts new file mode 100644 index 000000000..0b2b817f5 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoptionproperty.ts @@ -0,0 +1,102 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +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 = { + /** + * The option type. + */ + type: PushOptionType; + /** + * The property's display name. + */ + displayName: string; + /** + * A description of the property. + */ + description: string; + /** + * The property is required if `True`. + */ + required: boolean; + properties?: { [k: string]: PushOptionProperty } | null | undefined; + options?: Array | null | undefined; + validation?: PushValidationInfo | undefined; +}; + +/** @internal */ +export const PushOptionProperty$inboundSchema: z.ZodType< + PushOptionProperty, + z.ZodTypeDef, + unknown +> = z.object({ + type: PushOptionType$inboundSchema, + displayName: z.string(), + description: z.string(), + required: z.boolean(), + properties: z.nullable( + z.record(z.lazy(() => PushOptionProperty$inboundSchema)), + ).optional(), + options: z.nullable(z.array(PushOptionChoice$inboundSchema)).optional(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoptiontype.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoptiontype.ts new file mode 100644 index 000000000..4f470dbae --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushoptiontype.ts @@ -0,0 +1,45 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * The option type. + */ +export const PushOptionType = { + Array: "Array", + Object: "Object", + String: "String", + Number: "Number", + Boolean: "Boolean", + DateTime: "DateTime", + File: "File", + MultiPart: "MultiPart", +} as const; +/** + * The option type. + */ +export type PushOptionType = ClosedEnum; + +/** @internal */ +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/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushvalidationinfo.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushvalidationinfo.ts new file mode 100644 index 000000000..a332d428f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/pushvalidationinfo.ts @@ -0,0 +1,57 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + PushFieldValidation, + PushFieldValidation$inboundSchema, + PushFieldValidation$Outbound, + PushFieldValidation$outboundSchema, +} from "./pushfieldvalidation.js"; + +export type PushValidationInfo = { + warnings?: Array | null | undefined; + information?: Array | null | undefined; +}; + +/** @internal */ +export const PushValidationInfo$inboundSchema: z.ZodType< + PushValidationInfo, + z.ZodTypeDef, + unknown +> = z.object({ + warnings: z.nullable(z.array(PushFieldValidation$inboundSchema)).optional(), + information: z.nullable(z.array(PushFieldValidation$inboundSchema)) + .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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/security.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/security.ts index 251182dd7..53558d2e0 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/security.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/security.ts @@ -1,12 +1,54 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; -export class Security extends SpeakeasyBase { - @SpeakeasyMetadata({ - data: "security, scheme=true;type=apiKey;subtype=header;name=Authorization", - }) - authHeader: string; +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; +}; + +/** @internal */ +export const Security$outboundSchema: z.ZodType< + Security$Outbound, + z.ZodTypeDef, + Security +> = z.object({ + authHeader: z.string(), +}).transform((v) => { + return remap$(v, { + authHeader: "auth_header", + }); +}); + +/** + * @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; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/status.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/status.ts new file mode 100644 index 000000000..9d1667b9f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/status.ts @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * The current status of the dataset. + */ +export const Status = { + Initial: "Initial", + Queued: "Queued", + Fetching: "Fetching", + MapQueued: "MapQueued", + Mapping: "Mapping", + Complete: "Complete", + FetchError: "FetchError", + MapError: "MapError", + InternalError: "InternalError", + ProcessingQueued: "ProcessingQueued", + Processing: "Processing", + ProcessingError: "ProcessingError", + ValidationQueued: "ValidationQueued", + Validating: "Validating", + ValidationError: "ValidationError", + AuthError: "AuthError", + Cancelled: "Cancelled", + NotSupported: "NotSupported", + RateLimitError: "RateLimitError", + PermissionsError: "PermissionsError", + PrerequisiteNotMet: "PrerequisiteNotMet", +} as const; +/** + * The current status of the dataset. + */ +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/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/supplementaldata.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/supplementaldata.ts new file mode 100644 index 000000000..b25d0fd01 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/supplementaldata.ts @@ -0,0 +1,52 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ +export type SupplementalData = { + content?: { [k: string]: { [k: string]: any } } | null | undefined; +}; + +/** @internal */ +export const SupplementalData$inboundSchema: z.ZodType< + SupplementalData, + z.ZodTypeDef, + unknown +> = 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; +}; + +/** @internal */ +export const SupplementalData$outboundSchema: z.ZodType< + SupplementalData$Outbound, + z.ZodTypeDef, + SupplementalData +> = z.object({ + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/supplier.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/supplier.ts new file mode 100644 index 000000000..ed55dc301 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/supplier.ts @@ -0,0 +1,166 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + Address, + Address$inboundSchema, + Address$Outbound, + Address$outboundSchema, +} from "./address.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} from "./metadata.js"; +import { + SupplementalData, + SupplementalData$inboundSchema, + SupplementalData$Outbound, + SupplementalData$outboundSchema, +} from "./supplementaldata.js"; +import { + SupplierStatus, + SupplierStatus$inboundSchema, + SupplierStatus$outboundSchema, +} from "./supplierstatus.js"; + +/** + * > View the coverage for suppliers in the Data coverage explorer. + * + * @remarks + * + * ## Overview + * + * From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/sync-for-payables-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill). + */ +export type Supplier = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Identifier for the supplier, unique to the company in the accounting software. + */ + id?: string | undefined; + /** + * Name of the supplier as recorded in the accounting system, typically the company name. + */ + supplierName?: string | null | undefined; + /** + * Name of the main contact for the supplier. + */ + contactName?: string | null | undefined; + /** + * Email address that the supplier may be contacted on. + */ + emailAddress?: string | null | undefined; + /** + * Phone number that the supplier may be contacted on. + */ + phone?: string | null | undefined; + /** + * An array of Addresses. + */ + addresses?: Array
| null | undefined; + /** + * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. + */ + registrationNumber?: string | null | undefined; + /** + * Supplier's company tax number. + */ + taxNumber?: string | null | undefined; + /** + * Status of the supplier. + */ + status: SupplierStatus; + /** + * Default currency the supplier's transactional data is recorded in. + */ + defaultCurrency?: string | null | undefined; + metadata?: Metadata | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; +}; + +/** @internal */ +export const Supplier$inboundSchema: z.ZodType< + Supplier, + z.ZodTypeDef, + unknown +> = 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(Address$inboundSchema)).optional(), + registrationNumber: z.nullable(z.string()).optional(), + taxNumber: z.nullable(z.string()).optional(), + status: SupplierStatus$inboundSchema, + defaultCurrency: z.nullable(z.string()).optional(), + metadata: Metadata$inboundSchema.optional(), + supplementalData: SupplementalData$inboundSchema.optional(), +}); + +/** @internal */ +export type Supplier$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 Supplier$outboundSchema: z.ZodType< + Supplier$Outbound, + z.ZodTypeDef, + Supplier +> = 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(Address$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 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/supplierref.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/supplierref.ts index 9f959c7a0..34b311bc9 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/supplierref.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/supplierref.ts @@ -1,25 +1,58 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { Expose } from "class-transformer"; +import * as z from "zod"; /** * Reference to the supplier the record relates to. */ -export class SupplierRef extends SpeakeasyBase { - /** - * The supplier's unique ID - */ - @SpeakeasyMetadata() - @Expose({ name: "id" }) - id: string; +export type SupplierRef = { + /** + * The supplier's unique ID + */ + id: string; + /** + * The supplier's name + */ + supplierName?: string | null | undefined; +}; - /** - * The supplier's name - */ - @SpeakeasyMetadata() - @Expose({ name: "supplierName" }) - supplierName?: string; +/** @internal */ +export const SupplierRef$inboundSchema: z.ZodType< + SupplierRef, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + supplierName: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type SupplierRef$Outbound = { + id: string; + supplierName?: string | null | undefined; +}; + +/** @internal */ +export const SupplierRef$outboundSchema: z.ZodType< + SupplierRef$Outbound, + z.ZodTypeDef, + SupplierRef +> = z.object({ + id: z.string(), + supplierName: 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 SupplierRef$ { + /** @deprecated use `SupplierRef$inboundSchema` instead. */ + export const inboundSchema = SupplierRef$inboundSchema; + /** @deprecated use `SupplierRef$outboundSchema` instead. */ + export const outboundSchema = SupplierRef$outboundSchema; + /** @deprecated use `SupplierRef$Outbound` instead. */ + export type Outbound = SupplierRef$Outbound; } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/suppliers.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/suppliers.ts new file mode 100644 index 000000000..d73ffbc40 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/suppliers.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { + Links, + Links$inboundSchema, + Links$Outbound, + Links$outboundSchema, +} from "./links.js"; +import { + Supplier, + Supplier$inboundSchema, + Supplier$Outbound, + Supplier$outboundSchema, +} from "./supplier.js"; + +export type Suppliers = { + results?: Array | undefined; + /** + * Current page number. + */ + pageNumber: number; + /** + * Number of items to return in results array. + */ + pageSize: number; + /** + * Total number of items. + */ + totalResults: number; + links: Links; +}; + +/** @internal */ +export const Suppliers$inboundSchema: z.ZodType< + Suppliers, + z.ZodTypeDef, + unknown +> = z.object({ + results: z.array(Supplier$inboundSchema).optional(), + pageNumber: z.number().int(), + pageSize: z.number().int(), + totalResults: z.number().int(), + _links: Links$inboundSchema, +}).transform((v) => { + return remap$(v, { + "_links": "links", + }); +}); + +/** @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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/supplierstatus.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/supplierstatus.ts new file mode 100644 index 000000000..4d55a94e6 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/supplierstatus.ts @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Status of the supplier. + */ +export const SupplierStatus = { + Unknown: "Unknown", + Active: "Active", + Archived: "Archived", +} as const; +/** + * Status of the supplier. + */ +export type SupplierStatus = ClosedEnum; + +/** @internal */ +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/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxrate.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxrate.ts new file mode 100644 index 000000000..26e56b251 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxrate.ts @@ -0,0 +1,186 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} from "./metadata.js"; +import { + SupplementalData, + SupplementalData$inboundSchema, + SupplementalData$Outbound, + SupplementalData$outboundSchema, +} from "./supplementaldata.js"; +import { + TaxRateComponent, + TaxRateComponent$inboundSchema, + TaxRateComponent$Outbound, + TaxRateComponent$outboundSchema, +} from "./taxratecomponent.js"; +import { + TaxRateStatus, + TaxRateStatus$inboundSchema, + TaxRateStatus$outboundSchema, +} from "./taxratestatus.js"; +import { + ValidDatatypeLinkItems, + ValidDatatypeLinkItems$inboundSchema, + ValidDatatypeLinkItems$Outbound, + ValidDatatypeLinkItems$outboundSchema, +} from "./validdatatypelinkitems.js"; + +/** + * > View the coverage for tax rates in the Data coverage explorer. + * + * @remarks + * + * ## Overview + * + * Accounting systems typically store a set of taxes and associated rates within the accounting software. This means that users don't have to look up or remember the rates for each type of tax. For example, applying the tax "UK sales VAT" to line items of an invoice adds the correct rate of 20%. + * + * ### Tax components + * + * In some cases, a tax is made up of multiple sub taxes, often called _components_ of the tax. For example, you may have an item that is charged a tax rate called "City import tax (8%)" that has two components: + * + * - A city tax of 5% + * - An import tax of 3% + * + * > **Effective tax rates** + * > - Where there are multiple components of a tax, each component may be calculated on the original amount and added together. Alternatively, one tax may be calculated on the sub-total of the original amount plus another tax, which is referred to as _compounding_. When there is compounding, the effective tax rate is the rate that, if applied to the original amount, would result in the total amount of tax with compounding. + * > + * > **Example:** + * > A tax has two components. Both components have a rate of 10%, and one component is compound. In this case, there is a total tax rate of 20% but an effective tax rate of 21%. + * > + * > - For QuickBooks Online, Codat doesn't use compound rates. Instead, the calculated effective tax rate for each component is shown. This means that the effective and total rates are the same because the total tax rate is a sum of the component rates. + */ +export type TaxRate = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Identifier for the tax rate, unique for the company in the accounting software. + */ + id?: string | undefined; + /** + * Codat-augmented name of the tax rate in the accounting software. + */ + name?: string | null | undefined; + /** + * Code for the tax rate from the accounting software. + */ + code?: string | null | undefined; + /** + * Status of the tax rate in the accounting software. + * + * @remarks + * - `Active` - An active tax rate in use by a company. + * - `Archived` - A tax rate that has been archived or is inactive in the accounting software. + * - `Unknown` - Where the status of the tax rate cannot be determined from the underlying platform. + */ + status?: TaxRateStatus | undefined; + /** + * See Effective tax rates description. + */ + effectiveTaxRate?: Decimal$ | number | null | undefined; + /** + * Total (not compounded) sum of the components of a tax rate. + */ + totalTaxRate?: Decimal$ | number | null | undefined; + components?: Array | null | undefined; + validDatatypeLinks?: Array | null | undefined; + metadata?: Metadata | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; +}; + +/** @internal */ +export const TaxRate$inboundSchema: z.ZodType = + z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + name: z.nullable(z.string()).optional(), + code: z.nullable(z.string()).optional(), + status: TaxRateStatus$inboundSchema.optional(), + effectiveTaxRate: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + totalTaxRate: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + components: z.nullable(z.array(TaxRateComponent$inboundSchema)).optional(), + validDatatypeLinks: z.nullable( + z.array(ValidDatatypeLinkItems$inboundSchema), + ).optional(), + metadata: Metadata$inboundSchema.optional(), + supplementalData: SupplementalData$inboundSchema.optional(), + }); + +/** @internal */ +export type TaxRate$Outbound = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + id?: string | undefined; + name?: string | null | undefined; + code?: string | null | undefined; + status?: string | undefined; + effectiveTaxRate?: number | null | undefined; + totalTaxRate?: number | null | undefined; + components?: Array | null | undefined; + validDatatypeLinks?: + | Array + | null + | undefined; + metadata?: Metadata$Outbound | undefined; + supplementalData?: SupplementalData$Outbound | undefined; +}; + +/** @internal */ +export const TaxRate$outboundSchema: z.ZodType< + TaxRate$Outbound, + z.ZodTypeDef, + TaxRate +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + name: z.nullable(z.string()).optional(), + code: z.nullable(z.string()).optional(), + status: TaxRateStatus$outboundSchema.optional(), + effectiveTaxRate: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + totalTaxRate: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + components: z.nullable(z.array(TaxRateComponent$outboundSchema)).optional(), + validDatatypeLinks: z.nullable(z.array(ValidDatatypeLinkItems$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 TaxRate$ { + /** @deprecated use `TaxRate$inboundSchema` instead. */ + export const inboundSchema = TaxRate$inboundSchema; + /** @deprecated use `TaxRate$outboundSchema` instead. */ + export const outboundSchema = TaxRate$outboundSchema; + /** @deprecated use `TaxRate$Outbound` instead. */ + export type Outbound = TaxRate$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxratecomponent.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxratecomponent.ts new file mode 100644 index 000000000..0d406bf5c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxratecomponent.ts @@ -0,0 +1,70 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; + +/** + * A tax rate can be made up of multiple sub taxes, often called components of the tax. + */ +export type TaxRateComponent = { + /** + * Name of the tax rate component. + */ + name?: string | null | undefined; + /** + * The rate of the tax rate component, usually a percentage. + */ + rate?: Decimal$ | number | null | undefined; + /** + * A flag to indicate with the tax is calculated using the principle of compounding. + */ + isCompound: boolean; +}; + +/** @internal */ +export const TaxRateComponent$inboundSchema: z.ZodType< + TaxRateComponent, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.nullable(z.string()).optional(), + rate: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), + isCompound: z.boolean(), +}); + +/** @internal */ +export type TaxRateComponent$Outbound = { + name?: string | null | undefined; + rate?: number | null | undefined; + isCompound: boolean; +}; + +/** @internal */ +export const TaxRateComponent$outboundSchema: z.ZodType< + TaxRateComponent$Outbound, + z.ZodTypeDef, + TaxRateComponent +> = z.object({ + name: z.nullable(z.string()).optional(), + rate: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + isCompound: 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 TaxRateComponent$ { + /** @deprecated use `TaxRateComponent$inboundSchema` instead. */ + export const inboundSchema = TaxRateComponent$inboundSchema; + /** @deprecated use `TaxRateComponent$outboundSchema` instead. */ + export const outboundSchema = TaxRateComponent$outboundSchema; + /** @deprecated use `TaxRateComponent$Outbound` instead. */ + export type Outbound = TaxRateComponent$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxrateref.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxrateref.ts new file mode 100644 index 000000000..268e3e4ee --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxrateref.ts @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; + +/** + * Data types that reference a tax rate, for example invoice and bill line items, use a taxRateRef that includes the ID and name of the linked tax rate. + * + * @remarks + * + * Found on: + * + * - Bill line items + * - Bill Credit Note line items + * - Credit Note line items + * - Direct incomes line items + * - Invoice line items + * - Items + */ +export type TaxRateRef = { + /** + * Unique identifier for the tax rate in the accounting software. + */ + id?: string | undefined; + /** + * Name of the tax rate in the accounting software. + */ + name?: string | undefined; + /** + * Applicable tax rate. + */ + effectiveTaxRate?: Decimal$ | number | undefined; +}; + +/** @internal */ +export const TaxRateRef$inboundSchema: z.ZodType< + TaxRateRef, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), + name: z.string().optional(), + effectiveTaxRate: z.number().transform(v => new Decimal$(v)).optional(), +}); + +/** @internal */ +export type TaxRateRef$Outbound = { + id?: string | undefined; + name?: string | undefined; + effectiveTaxRate?: number | undefined; +}; + +/** @internal */ +export const TaxRateRef$outboundSchema: z.ZodType< + TaxRateRef$Outbound, + z.ZodTypeDef, + TaxRateRef +> = z.object({ + id: z.string().optional(), + name: z.string().optional(), + effectiveTaxRate: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TaxRateRef$ { + /** @deprecated use `TaxRateRef$inboundSchema` instead. */ + export const inboundSchema = TaxRateRef$inboundSchema; + /** @deprecated use `TaxRateRef$outboundSchema` instead. */ + export const outboundSchema = TaxRateRef$outboundSchema; + /** @deprecated use `TaxRateRef$Outbound` instead. */ + export type Outbound = TaxRateRef$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxrates.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxrates.ts new file mode 100644 index 000000000..7a20a8b11 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxrates.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { + Links, + Links$inboundSchema, + Links$Outbound, + Links$outboundSchema, +} from "./links.js"; +import { + TaxRate, + TaxRate$inboundSchema, + TaxRate$Outbound, + TaxRate$outboundSchema, +} from "./taxrate.js"; + +export type TaxRates = { + results?: Array | undefined; + /** + * Current page number. + */ + pageNumber: number; + /** + * Number of items to return in results array. + */ + pageSize: number; + /** + * Total number of items. + */ + totalResults: number; + links: Links; +}; + +/** @internal */ +export const TaxRates$inboundSchema: z.ZodType< + TaxRates, + z.ZodTypeDef, + unknown +> = z.object({ + results: z.array(TaxRate$inboundSchema).optional(), + pageNumber: z.number().int(), + pageSize: z.number().int(), + totalResults: z.number().int(), + _links: Links$inboundSchema, +}).transform((v) => { + return remap$(v, { + "_links": "links", + }); +}); + +/** @internal */ +export type TaxRates$Outbound = { + results?: Array | undefined; + pageNumber: number; + pageSize: number; + totalResults: number; + _links: Links$Outbound; +}; + +/** @internal */ +export const TaxRates$outboundSchema: z.ZodType< + TaxRates$Outbound, + z.ZodTypeDef, + TaxRates +> = z.object({ + results: z.array(TaxRate$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 TaxRates$ { + /** @deprecated use `TaxRates$inboundSchema` instead. */ + export const inboundSchema = TaxRates$inboundSchema; + /** @deprecated use `TaxRates$outboundSchema` instead. */ + export const outboundSchema = TaxRates$outboundSchema; + /** @deprecated use `TaxRates$Outbound` instead. */ + export type Outbound = TaxRates$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxratestatus.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxratestatus.ts new file mode 100644 index 000000000..a1f52c844 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/taxratestatus.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Status of the tax rate in the accounting software. + * + * @remarks + * - `Active` - An active tax rate in use by a company. + * - `Archived` - A tax rate that has been archived or is inactive in the accounting software. + * - `Unknown` - Where the status of the tax rate cannot be determined from the underlying platform. + */ +export const TaxRateStatus = { + Unknown: "Unknown", + Active: "Active", + Archived: "Archived", +} as const; +/** + * Status of the tax rate in the accounting software. + * + * @remarks + * - `Active` - An active tax rate in use by a company. + * - `Archived` - A tax rate that has been archived or is inactive in the accounting software. + * - `Unknown` - Where the status of the tax rate cannot be determined from the underlying platform. + */ +export type TaxRateStatus = ClosedEnum; + +/** @internal */ +export const TaxRateStatus$inboundSchema: z.ZodNativeEnum< + typeof TaxRateStatus +> = z.nativeEnum(TaxRateStatus); + +/** @internal */ +export const TaxRateStatus$outboundSchema: z.ZodNativeEnum< + typeof TaxRateStatus +> = TaxRateStatus$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TaxRateStatus$ { + /** @deprecated use `TaxRateStatus$inboundSchema` instead. */ + export const inboundSchema = TaxRateStatus$inboundSchema; + /** @deprecated use `TaxRateStatus$outboundSchema` instead. */ + export const outboundSchema = TaxRateStatus$outboundSchema; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/tracking.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/tracking.ts new file mode 100644 index 000000000..84a454d05 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/tracking.ts @@ -0,0 +1,182 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + BilledToType, + BilledToType$inboundSchema, + BilledToType$outboundSchema, +} from "./billedtotype.js"; +import { + TrackingCategoryRef, + TrackingCategoryRef$inboundSchema, + TrackingCategoryRef$Outbound, + TrackingCategoryRef$outboundSchema, +} from "./trackingcategoryref.js"; + +export type CustomerRef = { + /** + * `id` from the Customers data type + */ + id: string; + /** + * `customerName` from the Customer data type + */ + companyName?: string | null | undefined; +}; + +export type AccountingProjectReference = { + /** + * Unique identifier to the project reference. + */ + id: string; + /** + * The project's name. + */ + name?: string | null | undefined; +}; + +/** + * Categories, and a project and customer, against which the item is tracked. + */ +export type Tracking = { + categoryRefs: Array; + customerRef?: CustomerRef | undefined; + projectRef?: AccountingProjectReference | undefined; + /** + * Defines if the invoice or credit note is billed/rebilled to a project or customer. + */ + isBilledTo: BilledToType; + /** + * Defines if the invoice or credit note is billed/rebilled to a project or customer. + */ + isRebilledTo: BilledToType; +}; + +/** @internal */ +export const CustomerRef$inboundSchema: z.ZodType< + CustomerRef, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + companyName: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type CustomerRef$Outbound = { + id: string; + companyName?: string | null | undefined; +}; + +/** @internal */ +export const CustomerRef$outboundSchema: z.ZodType< + CustomerRef$Outbound, + z.ZodTypeDef, + CustomerRef +> = z.object({ + id: z.string(), + companyName: 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 CustomerRef$ { + /** @deprecated use `CustomerRef$inboundSchema` instead. */ + export const inboundSchema = CustomerRef$inboundSchema; + /** @deprecated use `CustomerRef$outboundSchema` instead. */ + export const outboundSchema = CustomerRef$outboundSchema; + /** @deprecated use `CustomerRef$Outbound` instead. */ + export type Outbound = CustomerRef$Outbound; +} + +/** @internal */ +export const AccountingProjectReference$inboundSchema: z.ZodType< + AccountingProjectReference, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + name: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type AccountingProjectReference$Outbound = { + id: string; + name?: string | null | undefined; +}; + +/** @internal */ +export const AccountingProjectReference$outboundSchema: z.ZodType< + AccountingProjectReference$Outbound, + z.ZodTypeDef, + AccountingProjectReference +> = z.object({ + id: z.string(), + name: 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 AccountingProjectReference$ { + /** @deprecated use `AccountingProjectReference$inboundSchema` instead. */ + export const inboundSchema = AccountingProjectReference$inboundSchema; + /** @deprecated use `AccountingProjectReference$outboundSchema` instead. */ + export const outboundSchema = AccountingProjectReference$outboundSchema; + /** @deprecated use `AccountingProjectReference$Outbound` instead. */ + export type Outbound = AccountingProjectReference$Outbound; +} + +/** @internal */ +export const Tracking$inboundSchema: z.ZodType< + Tracking, + z.ZodTypeDef, + unknown +> = z.object({ + categoryRefs: z.array(TrackingCategoryRef$inboundSchema), + customerRef: z.lazy(() => CustomerRef$inboundSchema).optional(), + projectRef: z.lazy(() => AccountingProjectReference$inboundSchema).optional(), + isBilledTo: BilledToType$inboundSchema, + isRebilledTo: BilledToType$inboundSchema, +}); + +/** @internal */ +export type Tracking$Outbound = { + categoryRefs: Array; + customerRef?: CustomerRef$Outbound | undefined; + projectRef?: AccountingProjectReference$Outbound | undefined; + isBilledTo: string; + isRebilledTo: string; +}; + +/** @internal */ +export const Tracking$outboundSchema: z.ZodType< + Tracking$Outbound, + z.ZodTypeDef, + Tracking +> = z.object({ + categoryRefs: z.array(TrackingCategoryRef$outboundSchema), + customerRef: z.lazy(() => CustomerRef$outboundSchema).optional(), + projectRef: z.lazy(() => AccountingProjectReference$outboundSchema) + .optional(), + isBilledTo: BilledToType$outboundSchema, + isRebilledTo: BilledToType$outboundSchema, +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace Tracking$ { + /** @deprecated use `Tracking$inboundSchema` instead. */ + export const inboundSchema = Tracking$inboundSchema; + /** @deprecated use `Tracking$outboundSchema` instead. */ + export const outboundSchema = Tracking$outboundSchema; + /** @deprecated use `Tracking$Outbound` instead. */ + export type Outbound = Tracking$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingcategories.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingcategories.ts new file mode 100644 index 000000000..780aff054 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingcategories.ts @@ -0,0 +1,91 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { remap as remap$ } from "../../../lib/primitives.js"; +import { + Links, + Links$inboundSchema, + Links$Outbound, + Links$outboundSchema, +} from "./links.js"; +import { + TrackingCategory, + TrackingCategory$inboundSchema, + TrackingCategory$Outbound, + TrackingCategory$outboundSchema, +} from "./trackingcategory.js"; + +export type TrackingCategories = { + results?: Array | undefined; + /** + * Current page number. + */ + pageNumber: number; + /** + * Number of items to return in results array. + */ + pageSize: number; + /** + * Total number of items. + */ + totalResults: number; + links: Links; +}; + +/** @internal */ +export const TrackingCategories$inboundSchema: z.ZodType< + TrackingCategories, + z.ZodTypeDef, + unknown +> = z.object({ + results: z.array(TrackingCategory$inboundSchema).optional(), + pageNumber: z.number().int(), + pageSize: z.number().int(), + totalResults: z.number().int(), + _links: Links$inboundSchema, +}).transform((v) => { + return remap$(v, { + "_links": "links", + }); +}); + +/** @internal */ +export type TrackingCategories$Outbound = { + results?: Array | undefined; + pageNumber: number; + pageSize: number; + totalResults: number; + _links: Links$Outbound; +}; + +/** @internal */ +export const TrackingCategories$outboundSchema: z.ZodType< + TrackingCategories$Outbound, + z.ZodTypeDef, + TrackingCategories +> = z.object({ + results: z.array(TrackingCategory$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 TrackingCategories$ { + /** @deprecated use `TrackingCategories$inboundSchema` instead. */ + export const inboundSchema = TrackingCategories$inboundSchema; + /** @deprecated use `TrackingCategories$outboundSchema` instead. */ + export const outboundSchema = TrackingCategories$outboundSchema; + /** @deprecated use `TrackingCategories$Outbound` instead. */ + export type Outbound = TrackingCategories$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingcategory.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingcategory.ts new file mode 100644 index 000000000..ea75d275a --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingcategory.ts @@ -0,0 +1,231 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + DefinitionStatus, + DefinitionStatus$inboundSchema, + DefinitionStatus$outboundSchema, +} from "./definitionstatus.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} from "./metadata.js"; + +/** + * Details of a category used for tracking transactions. + * + * @remarks + * + * > Language tip + * > + * > Parameters used to track types of spend in various parts of an organization can be called **dimensions**, **projects**, **classes**, or **locations** in different accounting software. In Codat, we refer to these as tracking categories. + * + * View the coverage for tracking categories in the Data coverage explorer. + * + * ## Overview + * + * Tracking categories are used to monitor cost centres and control budgets that sit outside the standard chart of accounts. Customers may use tracking categories to group together and track the income and costs of specific departments, projects, locations or customers. + * + * From their accounting system, customers can: + * + * - Create and maintain tracking categories and tracking category types. + * - View all tracking categories that are available for use. + * - View the relationships between the categories. + * - Assign invoices, bills, credit notes, or bill credit notes to one or more categories. + * - View the categories that a transaction belongs to. + * - View all transactions in a tracking category. + * + * ### Tracking categories per platform + * + * Review the platform-specific tracking categories that Codat supports, and the level they are assigned to in the source platform. + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PlatformTracking categoryTracking level
Dynamics 365DimensionsLine item
FreshbooksExpense categoriesLine item
MYOBCategoriesTransaction
NetsuiteClassesLine item
LocationsLine item
DepartmentsLine item
Custom segmentsLine item
QuickBooks DesktopClassesLine item or transaction level
LocationsTransaction
QuickBooks OnlineClassesLine item or transaction level
LocationsTransaction
Sage 200Cost centersLine item
DepartmentsLine item
Analysis codesTransaction
Sage 50DepartmentsLine item
CostcodesLine item
ProjectsLine item
Sage IntacctDimensionsLine item
XeroTracking categoriesLine item
+ * + * > **Example use case** + * > + * > Monitor the budget for your annual conference using a tracking category called 'AnnualConference2020' with the **type** set to **Costing**. + * + * If a tracking category has a parent category, the ID of that parent category is displayed. There is also a `hasChildren` field that shows whether there are child subcategories nested beneath. + */ +export type TrackingCategory = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * The identifier for the item, unique per tracking category. + */ + id?: string | null | undefined; + /** + * The name of the tracking category. + */ + name?: string | null | undefined; + /** + * Current state of the tracking category. + */ + status?: DefinitionStatus | undefined; + /** + * The identifier for this item's immediate parent. + */ + parentId?: string | null | undefined; + /** + * Boolean value indicating whether this category has SubCategories. + */ + hasChildren?: boolean | undefined; + metadata?: Metadata | undefined; +}; + +/** @internal */ +export const TrackingCategory$inboundSchema: z.ZodType< + TrackingCategory, + z.ZodTypeDef, + unknown +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + status: DefinitionStatus$inboundSchema.optional(), + parentId: z.nullable(z.string()).optional(), + hasChildren: z.boolean().optional(), + metadata: Metadata$inboundSchema.optional(), +}); + +/** @internal */ +export type TrackingCategory$Outbound = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + status?: string | undefined; + parentId?: string | null | undefined; + hasChildren?: boolean | undefined; + metadata?: Metadata$Outbound | undefined; +}; + +/** @internal */ +export const TrackingCategory$outboundSchema: z.ZodType< + TrackingCategory$Outbound, + z.ZodTypeDef, + TrackingCategory +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + status: DefinitionStatus$outboundSchema.optional(), + parentId: z.nullable(z.string()).optional(), + hasChildren: z.boolean().optional(), + metadata: Metadata$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 TrackingCategory$ { + /** @deprecated use `TrackingCategory$inboundSchema` instead. */ + export const inboundSchema = TrackingCategory$inboundSchema; + /** @deprecated use `TrackingCategory$outboundSchema` instead. */ + export const outboundSchema = TrackingCategory$outboundSchema; + /** @deprecated use `TrackingCategory$Outbound` instead. */ + export type Outbound = TrackingCategory$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingcategoryref.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingcategoryref.ts new file mode 100644 index 000000000..01c294e05 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingcategoryref.ts @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * References a category against which the item is tracked. + * + * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + */ +export type TrackingCategoryRef = { + /** + * Unique identifier to the tracking category. + */ + id: string; + /** + * Name of tracking category. + */ + name?: string | null | undefined; +}; + +/** @internal */ +export const TrackingCategoryRef$inboundSchema: z.ZodType< + TrackingCategoryRef, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string(), + name: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type TrackingCategoryRef$Outbound = { + id: string; + name?: string | null | undefined; +}; + +/** @internal */ +export const TrackingCategoryRef$outboundSchema: z.ZodType< + TrackingCategoryRef$Outbound, + z.ZodTypeDef, + TrackingCategoryRef +> = z.object({ + id: z.string(), + name: 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 TrackingCategoryRef$ { + /** @deprecated use `TrackingCategoryRef$inboundSchema` instead. */ + export const inboundSchema = TrackingCategoryRef$inboundSchema; + /** @deprecated use `TrackingCategoryRef$outboundSchema` instead. */ + export const outboundSchema = TrackingCategoryRef$outboundSchema; + /** @deprecated use `TrackingCategoryRef$Outbound` instead. */ + export type Outbound = TrackingCategoryRef$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingcategorytree.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingcategorytree.ts new file mode 100644 index 000000000..a270e04c2 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingcategorytree.ts @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + DefinitionStatus, + DefinitionStatus$inboundSchema, + DefinitionStatus$outboundSchema, +} from "./definitionstatus.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} from "./metadata.js"; + +/** + * The full structure of a specific tracking category including any child or subcategories. + */ +export type TrackingCategoryTree = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * The identifier for the item, unique per tracking category + */ + id?: string | null | undefined; + /** + * The name of the tracking category + */ + name?: string | null | undefined; + /** + * Current state of the tracking category. + */ + status?: DefinitionStatus | undefined; + /** + * The identifier for this item's immediate parent + */ + parentId?: string | null | undefined; + /** + * Boolean value indicating whether this category has SubCategories + */ + hasChildren?: boolean | undefined; + /** + * A collection of subcategories that are nested beneath this category. + */ + subCategories?: Array | null | undefined; + metadata?: Metadata | undefined; +}; + +/** @internal */ +export const TrackingCategoryTree$inboundSchema: z.ZodType< + TrackingCategoryTree, + z.ZodTypeDef, + unknown +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + status: DefinitionStatus$inboundSchema.optional(), + parentId: z.nullable(z.string()).optional(), + hasChildren: z.boolean().optional(), + subCategories: z.nullable( + z.array(z.lazy(() => TrackingCategoryTree$inboundSchema)), + ).optional(), + metadata: Metadata$inboundSchema.optional(), +}); + +/** @internal */ +export type TrackingCategoryTree$Outbound = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + id?: string | null | undefined; + name?: string | null | undefined; + status?: string | undefined; + parentId?: string | null | undefined; + hasChildren?: boolean | undefined; + subCategories?: Array | null | undefined; + metadata?: Metadata$Outbound | undefined; +}; + +/** @internal */ +export const TrackingCategoryTree$outboundSchema: z.ZodType< + TrackingCategoryTree$Outbound, + z.ZodTypeDef, + TrackingCategoryTree +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.nullable(z.string()).optional(), + name: z.nullable(z.string()).optional(), + status: DefinitionStatus$outboundSchema.optional(), + parentId: z.nullable(z.string()).optional(), + hasChildren: z.boolean().optional(), + subCategories: z.nullable( + z.array(z.lazy(() => TrackingCategoryTree$outboundSchema)), + ).optional(), + metadata: Metadata$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 TrackingCategoryTree$ { + /** @deprecated use `TrackingCategoryTree$inboundSchema` instead. */ + export const inboundSchema = TrackingCategoryTree$inboundSchema; + /** @deprecated use `TrackingCategoryTree$outboundSchema` instead. */ + export const outboundSchema = TrackingCategoryTree$outboundSchema; + /** @deprecated use `TrackingCategoryTree$Outbound` instead. */ + export type Outbound = TrackingCategoryTree$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingrecordref.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingrecordref.ts new file mode 100644 index 000000000..094940d5c --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/trackingrecordref.ts @@ -0,0 +1,95 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Name of underlying data type. + */ +export const TrackingRecordRefDataType = { + Customers: "customers", + Suppliers: "suppliers", + TrackingCategories: "trackingCategories", +} as const; +/** + * Name of underlying data type. + */ +export type TrackingRecordRefDataType = ClosedEnum< + typeof TrackingRecordRefDataType +>; + +/** + * Links to the customer or tracking category. + */ +export type TrackingRecordRef = { + /** + * 'id' of the underlying record or data type. + */ + id?: string | undefined; + /** + * Name of underlying data type. + */ + dataType?: TrackingRecordRefDataType | undefined; +}; + +/** @internal */ +export const TrackingRecordRefDataType$inboundSchema: z.ZodNativeEnum< + typeof TrackingRecordRefDataType +> = z.nativeEnum(TrackingRecordRefDataType); + +/** @internal */ +export const TrackingRecordRefDataType$outboundSchema: z.ZodNativeEnum< + typeof TrackingRecordRefDataType +> = TrackingRecordRefDataType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace TrackingRecordRefDataType$ { + /** @deprecated use `TrackingRecordRefDataType$inboundSchema` instead. */ + export const inboundSchema = TrackingRecordRefDataType$inboundSchema; + /** @deprecated use `TrackingRecordRefDataType$outboundSchema` instead. */ + export const outboundSchema = TrackingRecordRefDataType$outboundSchema; +} + +/** @internal */ +export const TrackingRecordRef$inboundSchema: z.ZodType< + TrackingRecordRef, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), + dataType: TrackingRecordRefDataType$inboundSchema.optional(), +}); + +/** @internal */ +export type TrackingRecordRef$Outbound = { + id?: string | undefined; + dataType?: string | undefined; +}; + +/** @internal */ +export const TrackingRecordRef$outboundSchema: z.ZodType< + TrackingRecordRef$Outbound, + z.ZodTypeDef, + TrackingRecordRef +> = z.object({ + id: z.string().optional(), + dataType: TrackingRecordRefDataType$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 TrackingRecordRef$ { + /** @deprecated use `TrackingRecordRef$inboundSchema` instead. */ + export const inboundSchema = TrackingRecordRef$inboundSchema; + /** @deprecated use `TrackingRecordRef$outboundSchema` instead. */ + export const outboundSchema = TrackingRecordRef$outboundSchema; + /** @deprecated use `TrackingRecordRef$Outbound` instead. */ + export type Outbound = TrackingRecordRef$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/updatebillcreditnoteresponse.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/updatebillcreditnoteresponse.ts new file mode 100644 index 000000000..3570df5f1 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/updatebillcreditnoteresponse.ts @@ -0,0 +1,645 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { + BillCreditNoteLineItem, + BillCreditNoteLineItem$inboundSchema, + BillCreditNoteLineItem$Outbound, + BillCreditNoteLineItem$outboundSchema, +} from "./billcreditnotelineitem.js"; +import { + BillCreditNoteStatus, + BillCreditNoteStatus$inboundSchema, + BillCreditNoteStatus$outboundSchema, +} from "./billcreditnotestatus.js"; +import { + Items, + Items$inboundSchema, + Items$Outbound, + Items$outboundSchema, +} from "./items.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} from "./metadata.js"; +import { + PaymentAllocationItems, + PaymentAllocationItems$inboundSchema, + PaymentAllocationItems$Outbound, + PaymentAllocationItems$outboundSchema, +} from "./paymentallocationitems.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 { + SupplierRef, + SupplierRef$inboundSchema, + SupplierRef$Outbound, + SupplierRef$outboundSchema, +} from "./supplierref.js"; +import { + Validation, + Validation$inboundSchema, + Validation$Outbound, + Validation$outboundSchema, +} from "./validation.js"; + +/** + * Links the current record to the underlying record or data type that created it. + * + * @remarks + * + * For example, if a journal entry is generated based on an invoice, this property allows you to connect the journal entry to the underlying invoice in our data model. + */ +export type UpdateBillCreditNoteResponseRecordReference = { + /** + * 'id' of the underlying record or data type. + */ + id?: string | undefined; + /** + * Allowed name of the 'dataType'. + */ + dataType?: string | undefined; +}; + +/** + * > **Bill credit notes or credit notes?** + * + * @remarks + * > + * > In Codat, bill credit notes represent accounts payable only. For accounts receivable, see [Credit notes](https://docs.codat.io/sync-for-payables-api#/schemas/CreditNote). + * + * View the coverage for bill credit notes in the Data coverage explorer. + * + * ## Overview + * + * A bill credit note is issued by a supplier for the purpose of recording credit. For example, if a supplier was unable to fulfil an order that was placed by a business, or delivered damaged goods, they would issue a bill credit note. A bill credit note reduces the amount a business owes to the supplier. It can be refunded to the business or used to pay off future bills. + * + * In the Codat API, a bill credit note is an accounts payable record issued by a [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier). + * + * A bill credit note includes details of: + * * The original and remaining credit. + * * Any allocations of the credit against other records, such as [bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill). + * * The supplier that issued the bill credit note. + * + * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + */ +export type UpdateBillCreditNoteResponseAccountingBillCreditNote = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Identifier for the bill credit note that is unique to a company in the accounting software. + */ + id?: string | undefined; + /** + * Friendly reference for the bill credit note. + */ + billCreditNoteNumber?: string | null | undefined; + /** + * Reference to the supplier the record relates to. + */ + supplierRef?: SupplierRef | undefined; + withholdingTax?: Array | null | undefined; + /** + * Total amount of credit that has been applied to the business' account with the supplier, including discounts and tax. + */ + totalAmount: Decimal$ | number; + /** + * Total value of any discounts applied. + */ + totalDiscount: Decimal$ | number; + /** + * Total amount of the bill credit note, including discounts but excluding tax. + */ + subTotal: Decimal$ | number; + /** + * Amount of tax included in the bill credit note. + */ + totalTaxAmount: Decimal$ | number; + /** + * Percentage rate of any discount applied to the bill credit note. + */ + discountPercentage: Decimal$ | number; + /** + * Amount of the bill credit note that is still outstanding. + */ + remainingCredit?: Decimal$ | number | undefined; + /** + * Current state of the bill credit note + */ + status: BillCreditNoteStatus; + /** + * 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. + */ + issueDate?: string | 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. + */ + allocatedOnDate?: string | undefined; + /** + * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + * + * @remarks + * + * ## 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. + */ + currency?: string | undefined; + /** + * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. + * + * @remarks + * + * 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. | + */ + currencyRate?: Decimal$ | number | null | undefined; + /** + * An array of line + */ + lineItems?: Array | null | undefined; + /** + * An array of payment allocations. + */ + paymentAllocations?: Array | null | undefined; + /** + * An array of records the credit note was created from. + */ + createdFromRefs?: + | Array + | null + | undefined; + /** + * Any additional information about the bill credit note. + */ + note?: string | null | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; + metadata?: Metadata | undefined; +}; + +export type UpdateBillCreditNoteResponse = { + data?: + | UpdateBillCreditNoteResponseAccountingBillCreditNote + | null + | undefined; + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + */ + changes?: Array | null | undefined; + /** + * Available data types + */ + dataType?: PropertieDataType | undefined; + /** + * Unique identifier for your SMB in Codat. + */ + companyId: string; + /** + * 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. + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + */ + dataConnectionKey: string; + /** + * 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. + */ + requestedOnUtc: string; + /** + * 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. + */ + completedOnUtc?: string | undefined; + /** + * Number of minutes the push operation must complete within before it times out. + */ + timeoutInMinutes?: number | null | undefined; + /** + * Number of seconds the push operation must complete within before it times out. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + timeoutInSeconds?: number | null | undefined; + /** + * The current status of the push operation. + */ + status: PushOperationStatus; + /** + * A message about the error. + */ + errorMessage?: string | null | undefined; + /** + * A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + */ + validation?: Validation | undefined; + /** + * Push status code. + */ + statusCode: number; +}; + +/** @internal */ +export const UpdateBillCreditNoteResponseRecordReference$inboundSchema: + z.ZodType< + UpdateBillCreditNoteResponseRecordReference, + z.ZodTypeDef, + unknown + > = z.object({ + id: z.string().optional(), + dataType: z.string().optional(), + }); + +/** @internal */ +export type UpdateBillCreditNoteResponseRecordReference$Outbound = { + id?: string | undefined; + dataType?: string | undefined; +}; + +/** @internal */ +export const UpdateBillCreditNoteResponseRecordReference$outboundSchema: + z.ZodType< + UpdateBillCreditNoteResponseRecordReference$Outbound, + z.ZodTypeDef, + UpdateBillCreditNoteResponseRecordReference + > = z.object({ + id: z.string().optional(), + dataType: 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 UpdateBillCreditNoteResponseRecordReference$ { + /** @deprecated use `UpdateBillCreditNoteResponseRecordReference$inboundSchema` instead. */ + export const inboundSchema = + UpdateBillCreditNoteResponseRecordReference$inboundSchema; + /** @deprecated use `UpdateBillCreditNoteResponseRecordReference$outboundSchema` instead. */ + export const outboundSchema = + UpdateBillCreditNoteResponseRecordReference$outboundSchema; + /** @deprecated use `UpdateBillCreditNoteResponseRecordReference$Outbound` instead. */ + export type Outbound = UpdateBillCreditNoteResponseRecordReference$Outbound; +} + +/** @internal */ +export const UpdateBillCreditNoteResponseAccountingBillCreditNote$inboundSchema: + z.ZodType< + UpdateBillCreditNoteResponseAccountingBillCreditNote, + z.ZodTypeDef, + unknown + > = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + billCreditNoteNumber: z.nullable(z.string()).optional(), + supplierRef: SupplierRef$inboundSchema.optional(), + withholdingTax: z.nullable(z.array(Items$inboundSchema)).optional(), + totalAmount: z.number().transform(v => new Decimal$(v)), + totalDiscount: z.number().transform(v => new Decimal$(v)), + subTotal: z.number().transform(v => new Decimal$(v)), + totalTaxAmount: z.number().transform(v => new Decimal$(v)), + discountPercentage: z.number().transform(v => new Decimal$(v)), + remainingCredit: z.number().transform(v => new Decimal$(v)).optional(), + status: BillCreditNoteStatus$inboundSchema, + issueDate: z.string().optional(), + allocatedOnDate: z.string().optional(), + currency: z.string().optional(), + currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + lineItems: z.nullable(z.array(BillCreditNoteLineItem$inboundSchema)) + .optional(), + paymentAllocations: z.nullable( + z.array(PaymentAllocationItems$inboundSchema), + ).optional(), + createdFromRefs: z.nullable( + z.array(z.lazy(() => + UpdateBillCreditNoteResponseRecordReference$inboundSchema + )), + ).optional(), + note: z.nullable(z.string()).optional(), + supplementalData: SupplementalData$inboundSchema.optional(), + metadata: Metadata$inboundSchema.optional(), + }); + +/** @internal */ +export type UpdateBillCreditNoteResponseAccountingBillCreditNote$Outbound = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + id?: string | undefined; + billCreditNoteNumber?: string | null | undefined; + supplierRef?: SupplierRef$Outbound | undefined; + withholdingTax?: Array | null | undefined; + totalAmount: number; + totalDiscount: number; + subTotal: number; + totalTaxAmount: number; + discountPercentage: number; + remainingCredit?: number | undefined; + status: string; + issueDate?: string | undefined; + allocatedOnDate?: string | undefined; + currency?: string | undefined; + currencyRate?: number | null | undefined; + lineItems?: Array | null | undefined; + paymentAllocations?: + | Array + | null + | undefined; + createdFromRefs?: + | Array + | null + | undefined; + note?: string | null | undefined; + supplementalData?: SupplementalData$Outbound | undefined; + metadata?: Metadata$Outbound | undefined; +}; + +/** @internal */ +export const UpdateBillCreditNoteResponseAccountingBillCreditNote$outboundSchema: + z.ZodType< + UpdateBillCreditNoteResponseAccountingBillCreditNote$Outbound, + z.ZodTypeDef, + UpdateBillCreditNoteResponseAccountingBillCreditNote + > = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + billCreditNoteNumber: z.nullable(z.string()).optional(), + supplierRef: SupplierRef$outboundSchema.optional(), + withholdingTax: z.nullable(z.array(Items$outboundSchema)).optional(), + totalAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + totalDiscount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + subTotal: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + totalTaxAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + discountPercentage: z.union([z.instanceof(Decimal$), z.number()]).transform( + v => typeof v === "number" ? v : v.toNumber() + ), + remainingCredit: z.union([z.instanceof(Decimal$), z.number()]).transform( + v => typeof v === "number" ? v : v.toNumber() + ).optional(), + status: BillCreditNoteStatus$outboundSchema, + issueDate: z.string().optional(), + allocatedOnDate: z.string().optional(), + currency: z.string().optional(), + currencyRate: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + lineItems: z.nullable(z.array(BillCreditNoteLineItem$outboundSchema)) + .optional(), + paymentAllocations: z.nullable( + z.array(PaymentAllocationItems$outboundSchema), + ).optional(), + createdFromRefs: z.nullable( + z.array(z.lazy(() => + UpdateBillCreditNoteResponseRecordReference$outboundSchema + )), + ).optional(), + note: z.nullable(z.string()).optional(), + supplementalData: SupplementalData$outboundSchema.optional(), + metadata: Metadata$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 UpdateBillCreditNoteResponseAccountingBillCreditNote$ { + /** @deprecated use `UpdateBillCreditNoteResponseAccountingBillCreditNote$inboundSchema` instead. */ + export const inboundSchema = + UpdateBillCreditNoteResponseAccountingBillCreditNote$inboundSchema; + /** @deprecated use `UpdateBillCreditNoteResponseAccountingBillCreditNote$outboundSchema` instead. */ + export const outboundSchema = + UpdateBillCreditNoteResponseAccountingBillCreditNote$outboundSchema; + /** @deprecated use `UpdateBillCreditNoteResponseAccountingBillCreditNote$Outbound` instead. */ + export type Outbound = + UpdateBillCreditNoteResponseAccountingBillCreditNote$Outbound; +} + +/** @internal */ +export const UpdateBillCreditNoteResponse$inboundSchema: z.ZodType< + UpdateBillCreditNoteResponse, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable( + z.lazy(() => + UpdateBillCreditNoteResponseAccountingBillCreditNote$inboundSchema + ), + ).optional(), + changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), + dataType: PropertieDataType$inboundSchema.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$inboundSchema, + errorMessage: z.nullable(z.string()).optional(), + validation: Validation$inboundSchema.optional(), + statusCode: z.number().int(), +}); + +/** @internal */ +export type UpdateBillCreditNoteResponse$Outbound = { + data?: + | UpdateBillCreditNoteResponseAccountingBillCreditNote$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 UpdateBillCreditNoteResponse$outboundSchema: z.ZodType< + UpdateBillCreditNoteResponse$Outbound, + z.ZodTypeDef, + UpdateBillCreditNoteResponse +> = z.object({ + data: z.nullable( + z.lazy(() => + UpdateBillCreditNoteResponseAccountingBillCreditNote$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 UpdateBillCreditNoteResponse$ { + /** @deprecated use `UpdateBillCreditNoteResponse$inboundSchema` instead. */ + export const inboundSchema = UpdateBillCreditNoteResponse$inboundSchema; + /** @deprecated use `UpdateBillCreditNoteResponse$outboundSchema` instead. */ + export const outboundSchema = UpdateBillCreditNoteResponse$outboundSchema; + /** @deprecated use `UpdateBillCreditNoteResponse$Outbound` instead. */ + export type Outbound = UpdateBillCreditNoteResponse$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/updatebillresponse.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/updatebillresponse.ts new file mode 100644 index 000000000..1af933673 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/updatebillresponse.ts @@ -0,0 +1,797 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { Decimal as Decimal$ } from "../../types/decimal.js"; +import { + BillLineItem, + BillLineItem$inboundSchema, + BillLineItem$Outbound, + BillLineItem$outboundSchema, +} from "./billlineitem.js"; +import { + BillStatus, + BillStatus$inboundSchema, + BillStatus$outboundSchema, +} from "./billstatus.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} from "./metadata.js"; +import { + PaymentAllocationPayment, + PaymentAllocationPayment$inboundSchema, + PaymentAllocationPayment$Outbound, + PaymentAllocationPayment$outboundSchema, +} from "./paymentallocationpayment.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 { + SupplierRef, + SupplierRef$inboundSchema, + SupplierRef$Outbound, + SupplierRef$outboundSchema, +} from "./supplierref.js"; +import { + Validation, + Validation$inboundSchema, + Validation$Outbound, + Validation$outboundSchema, +} from "./validation.js"; + +export type UpdateBillResponsePurchaseOrderReference = { + /** + * Identifier for the purchase order, unique for the company in the accounting software. + */ + id?: string | undefined; + /** + * Friendly reference for the purchase order, commonly generated by the accounting software. + */ + purchaseOrderNumber?: string | null | undefined; +}; + +export type UpdateBillResponseWithholdingTax = { + /** + * Name assigned to withheld tax. + */ + name: string; + /** + * Amount of tax withheld. + */ + amount: Decimal$ | number; +}; + +export type UpdateBillResponseAllocation = { + /** + * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + * + * @remarks + * + * ## 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. + */ + currency?: string | undefined; + /** + * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. + * + * @remarks + * + * 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. | + */ + currencyRate?: Decimal$ | number | 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: + * + * @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. + */ + allocatedOnDate?: string | undefined; + /** + * The total amount that has been allocated. + */ + totalAmount?: Decimal$ | number | undefined; +}; + +export type UpdateBillResponseAccountingPaymentAllocation = { + payment: PaymentAllocationPayment; + allocation: UpdateBillResponseAllocation; +}; + +/** + * > **Invoices or bills?** + * + * @remarks + * > + * > We distinguish between invoices where the company *owes money* vs. *is owed money*. If the company has received an invoice, and owes money to someone else (accounts payable) we call this a Bill. + * > + * > See [Invoices](https://docs.codat.io/sync-for-payables-api#/schemas/Invoice) for the accounts receivable equivalent of bills. + * + * View the coverage for bills in the Data coverage explorer. + * + * ## Overview + * + * In Codat, a bill contains details of: + * * When the bill was recorded in the accounting system. + * * How much the bill is for and the currency of the amount. + * * Who the bill was received from — the *supplier*. + * * What the bill is for — the *line items*. + * + * Some accounting software give a separate name to purchases where the payment is made immediately, such as something bought with a credit card or online payment. One example of this would be QuickBooks Online's *expenses*. + * + * You can find these types of transactions in our [Direct costs](https://docs.codat.io/sync-for-payables-api#/schemas/DirectCost) data model. + * + * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + */ +export type UpdateBillResponseAccountingBill = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Identifier for the bill, unique for the company in the accounting software. + */ + id?: string | undefined; + /** + * User-friendly reference for the bill. + */ + reference?: string | null | undefined; + /** + * Reference to the supplier the record relates to. + */ + supplierRef?: SupplierRef | undefined; + purchaseOrderRefs?: + | Array + | null + | undefined; + issueDate: string; + dueDate?: string | undefined; + /** + * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. + * + * @remarks + * + * ## 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. + */ + currency?: string | undefined; + /** + * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. + * + * @remarks + * + * 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. | + */ + currencyRate?: Decimal$ | number | null | undefined; + /** + * Array of Bill line items. + */ + lineItems?: Array | null | undefined; + withholdingTax?: Array | null | undefined; + /** + * Current state of the bill. + */ + status: BillStatus; + /** + * Total amount of the bill, excluding any taxes. + */ + subTotal: Decimal$ | number; + /** + * Amount of tax on the bill. + */ + taxAmount: Decimal$ | number; + /** + * Amount of the bill, including tax. + */ + totalAmount: Decimal$ | number; + /** + * Amount outstanding on the bill. + */ + amountDue?: Decimal$ | number | null | undefined; + /** + * Any private, company notes about the bill, such as payment information. + */ + note?: string | null | undefined; + /** + * An array of payment allocations. + */ + paymentAllocations?: + | Array + | null + | undefined; + metadata?: Metadata | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; +}; + +export type UpdateBillResponse = { + data?: UpdateBillResponseAccountingBill | null | undefined; + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + */ + changes?: Array | null | undefined; + /** + * Available data types + */ + dataType?: PropertieDataType | undefined; + /** + * Unique identifier for your SMB in Codat. + */ + companyId: string; + /** + * 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. + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + */ + dataConnectionKey: string; + /** + * 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. + */ + requestedOnUtc: string; + /** + * 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. + */ + completedOnUtc?: string | undefined; + /** + * Number of minutes the push operation must complete within before it times out. + */ + timeoutInMinutes?: number | null | undefined; + /** + * Number of seconds the push operation must complete within before it times out. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + timeoutInSeconds?: number | null | undefined; + /** + * The current status of the push operation. + */ + status: PushOperationStatus; + /** + * A message about the error. + */ + errorMessage?: string | null | undefined; + /** + * A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + */ + validation?: Validation | undefined; + /** + * Push status code. + */ + statusCode: number; +}; + +/** @internal */ +export const UpdateBillResponsePurchaseOrderReference$inboundSchema: z.ZodType< + UpdateBillResponsePurchaseOrderReference, + z.ZodTypeDef, + unknown +> = z.object({ + id: z.string().optional(), + purchaseOrderNumber: z.nullable(z.string()).optional(), +}); + +/** @internal */ +export type UpdateBillResponsePurchaseOrderReference$Outbound = { + id?: string | undefined; + purchaseOrderNumber?: string | null | undefined; +}; + +/** @internal */ +export const UpdateBillResponsePurchaseOrderReference$outboundSchema: z.ZodType< + UpdateBillResponsePurchaseOrderReference$Outbound, + z.ZodTypeDef, + UpdateBillResponsePurchaseOrderReference +> = z.object({ + id: z.string().optional(), + purchaseOrderNumber: 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 UpdateBillResponsePurchaseOrderReference$ { + /** @deprecated use `UpdateBillResponsePurchaseOrderReference$inboundSchema` instead. */ + export const inboundSchema = + UpdateBillResponsePurchaseOrderReference$inboundSchema; + /** @deprecated use `UpdateBillResponsePurchaseOrderReference$outboundSchema` instead. */ + export const outboundSchema = + UpdateBillResponsePurchaseOrderReference$outboundSchema; + /** @deprecated use `UpdateBillResponsePurchaseOrderReference$Outbound` instead. */ + export type Outbound = UpdateBillResponsePurchaseOrderReference$Outbound; +} + +/** @internal */ +export const UpdateBillResponseWithholdingTax$inboundSchema: z.ZodType< + UpdateBillResponseWithholdingTax, + z.ZodTypeDef, + unknown +> = z.object({ + name: z.string(), + amount: z.number().transform(v => new Decimal$(v)), +}); + +/** @internal */ +export type UpdateBillResponseWithholdingTax$Outbound = { + name: string; + amount: number; +}; + +/** @internal */ +export const UpdateBillResponseWithholdingTax$outboundSchema: z.ZodType< + UpdateBillResponseWithholdingTax$Outbound, + z.ZodTypeDef, + UpdateBillResponseWithholdingTax +> = z.object({ + name: z.string(), + amount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateBillResponseWithholdingTax$ { + /** @deprecated use `UpdateBillResponseWithholdingTax$inboundSchema` instead. */ + export const inboundSchema = UpdateBillResponseWithholdingTax$inboundSchema; + /** @deprecated use `UpdateBillResponseWithholdingTax$outboundSchema` instead. */ + export const outboundSchema = UpdateBillResponseWithholdingTax$outboundSchema; + /** @deprecated use `UpdateBillResponseWithholdingTax$Outbound` instead. */ + export type Outbound = UpdateBillResponseWithholdingTax$Outbound; +} + +/** @internal */ +export const UpdateBillResponseAllocation$inboundSchema: z.ZodType< + UpdateBillResponseAllocation, + z.ZodTypeDef, + unknown +> = z.object({ + currency: z.string().optional(), + currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + allocatedOnDate: z.string().optional(), + totalAmount: z.number().transform(v => new Decimal$(v)).optional(), +}); + +/** @internal */ +export type UpdateBillResponseAllocation$Outbound = { + currency?: string | undefined; + currencyRate?: number | null | undefined; + allocatedOnDate?: string | undefined; + totalAmount?: number | undefined; +}; + +/** @internal */ +export const UpdateBillResponseAllocation$outboundSchema: z.ZodType< + UpdateBillResponseAllocation$Outbound, + z.ZodTypeDef, + UpdateBillResponseAllocation +> = z.object({ + currency: z.string().optional(), + currencyRate: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + allocatedOnDate: z.string().optional(), + totalAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ).optional(), +}); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateBillResponseAllocation$ { + /** @deprecated use `UpdateBillResponseAllocation$inboundSchema` instead. */ + export const inboundSchema = UpdateBillResponseAllocation$inboundSchema; + /** @deprecated use `UpdateBillResponseAllocation$outboundSchema` instead. */ + export const outboundSchema = UpdateBillResponseAllocation$outboundSchema; + /** @deprecated use `UpdateBillResponseAllocation$Outbound` instead. */ + export type Outbound = UpdateBillResponseAllocation$Outbound; +} + +/** @internal */ +export const UpdateBillResponseAccountingPaymentAllocation$inboundSchema: + z.ZodType< + UpdateBillResponseAccountingPaymentAllocation, + z.ZodTypeDef, + unknown + > = z.object({ + payment: PaymentAllocationPayment$inboundSchema, + allocation: z.lazy(() => UpdateBillResponseAllocation$inboundSchema), + }); + +/** @internal */ +export type UpdateBillResponseAccountingPaymentAllocation$Outbound = { + payment: PaymentAllocationPayment$Outbound; + allocation: UpdateBillResponseAllocation$Outbound; +}; + +/** @internal */ +export const UpdateBillResponseAccountingPaymentAllocation$outboundSchema: + z.ZodType< + UpdateBillResponseAccountingPaymentAllocation$Outbound, + z.ZodTypeDef, + UpdateBillResponseAccountingPaymentAllocation + > = z.object({ + payment: PaymentAllocationPayment$outboundSchema, + allocation: z.lazy(() => UpdateBillResponseAllocation$outboundSchema), + }); + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace UpdateBillResponseAccountingPaymentAllocation$ { + /** @deprecated use `UpdateBillResponseAccountingPaymentAllocation$inboundSchema` instead. */ + export const inboundSchema = + UpdateBillResponseAccountingPaymentAllocation$inboundSchema; + /** @deprecated use `UpdateBillResponseAccountingPaymentAllocation$outboundSchema` instead. */ + export const outboundSchema = + UpdateBillResponseAccountingPaymentAllocation$outboundSchema; + /** @deprecated use `UpdateBillResponseAccountingPaymentAllocation$Outbound` instead. */ + export type Outbound = UpdateBillResponseAccountingPaymentAllocation$Outbound; +} + +/** @internal */ +export const UpdateBillResponseAccountingBill$inboundSchema: z.ZodType< + UpdateBillResponseAccountingBill, + z.ZodTypeDef, + unknown +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + reference: z.nullable(z.string()).optional(), + supplierRef: SupplierRef$inboundSchema.optional(), + purchaseOrderRefs: z.nullable( + z.array( + z.lazy(() => UpdateBillResponsePurchaseOrderReference$inboundSchema), + ), + ).optional(), + issueDate: z.string(), + dueDate: z.string().optional(), + currency: z.string().optional(), + currencyRate: z.nullable(z.number().transform(v => new Decimal$(v))) + .optional(), + lineItems: z.nullable(z.array(BillLineItem$inboundSchema)).optional(), + withholdingTax: z.nullable( + z.array(z.lazy(() => UpdateBillResponseWithholdingTax$inboundSchema)), + ).optional(), + status: BillStatus$inboundSchema, + subTotal: z.number().transform(v => new Decimal$(v)), + taxAmount: z.number().transform(v => new Decimal$(v)), + totalAmount: z.number().transform(v => new Decimal$(v)), + amountDue: z.nullable(z.number().transform(v => new Decimal$(v))).optional(), + note: z.nullable(z.string()).optional(), + paymentAllocations: z.nullable( + z.array(z.lazy(() => + UpdateBillResponseAccountingPaymentAllocation$inboundSchema + )), + ).optional(), + metadata: Metadata$inboundSchema.optional(), + supplementalData: SupplementalData$inboundSchema.optional(), +}); + +/** @internal */ +export type UpdateBillResponseAccountingBill$Outbound = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + id?: string | undefined; + reference?: string | null | undefined; + supplierRef?: SupplierRef$Outbound | undefined; + purchaseOrderRefs?: + | Array + | null + | undefined; + issueDate: string; + dueDate?: string | undefined; + currency?: string | undefined; + currencyRate?: number | null | undefined; + lineItems?: Array | null | undefined; + withholdingTax?: + | Array + | null + | undefined; + status: string; + subTotal: number; + taxAmount: number; + totalAmount: number; + amountDue?: number | null | undefined; + note?: string | null | undefined; + paymentAllocations?: + | Array + | null + | undefined; + metadata?: Metadata$Outbound | undefined; + supplementalData?: SupplementalData$Outbound | undefined; +}; + +/** @internal */ +export const UpdateBillResponseAccountingBill$outboundSchema: z.ZodType< + UpdateBillResponseAccountingBill$Outbound, + z.ZodTypeDef, + UpdateBillResponseAccountingBill +> = z.object({ + modifiedDate: z.string().optional(), + sourceModifiedDate: z.string().optional(), + id: z.string().optional(), + reference: z.nullable(z.string()).optional(), + supplierRef: SupplierRef$outboundSchema.optional(), + purchaseOrderRefs: z.nullable( + z.array( + z.lazy(() => UpdateBillResponsePurchaseOrderReference$outboundSchema), + ), + ).optional(), + issueDate: z.string(), + dueDate: z.string().optional(), + currency: z.string().optional(), + currencyRate: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + lineItems: z.nullable(z.array(BillLineItem$outboundSchema)).optional(), + withholdingTax: z.nullable( + z.array(z.lazy(() => UpdateBillResponseWithholdingTax$outboundSchema)), + ).optional(), + status: BillStatus$outboundSchema, + subTotal: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + taxAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + totalAmount: z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + amountDue: z.nullable( + z.union([z.instanceof(Decimal$), z.number()]).transform(v => + typeof v === "number" ? v : v.toNumber() + ), + ).optional(), + note: z.nullable(z.string()).optional(), + paymentAllocations: z.nullable( + z.array(z.lazy(() => + UpdateBillResponseAccountingPaymentAllocation$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 UpdateBillResponseAccountingBill$ { + /** @deprecated use `UpdateBillResponseAccountingBill$inboundSchema` instead. */ + export const inboundSchema = UpdateBillResponseAccountingBill$inboundSchema; + /** @deprecated use `UpdateBillResponseAccountingBill$outboundSchema` instead. */ + export const outboundSchema = UpdateBillResponseAccountingBill$outboundSchema; + /** @deprecated use `UpdateBillResponseAccountingBill$Outbound` instead. */ + export type Outbound = UpdateBillResponseAccountingBill$Outbound; +} + +/** @internal */ +export const UpdateBillResponse$inboundSchema: z.ZodType< + UpdateBillResponse, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable(z.lazy(() => UpdateBillResponseAccountingBill$inboundSchema)) + .optional(), + changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), + dataType: PropertieDataType$inboundSchema.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$inboundSchema, + errorMessage: z.nullable(z.string()).optional(), + validation: Validation$inboundSchema.optional(), + statusCode: z.number().int(), +}); + +/** @internal */ +export type UpdateBillResponse$Outbound = { + data?: UpdateBillResponseAccountingBill$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 UpdateBillResponse$outboundSchema: z.ZodType< + UpdateBillResponse$Outbound, + z.ZodTypeDef, + UpdateBillResponse +> = z.object({ + data: z.nullable( + z.lazy(() => UpdateBillResponseAccountingBill$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 UpdateBillResponse$ { + /** @deprecated use `UpdateBillResponse$inboundSchema` instead. */ + export const inboundSchema = UpdateBillResponse$inboundSchema; + /** @deprecated use `UpdateBillResponse$outboundSchema` instead. */ + export const outboundSchema = UpdateBillResponse$outboundSchema; + /** @deprecated use `UpdateBillResponse$Outbound` instead. */ + export type Outbound = UpdateBillResponse$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/updatesupplierresponse.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/updatesupplierresponse.ts new file mode 100644 index 000000000..c212d712f --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/updatesupplierresponse.ts @@ -0,0 +1,365 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + Address, + Address$inboundSchema, + Address$Outbound, + Address$outboundSchema, +} from "./address.js"; +import { + Metadata, + Metadata$inboundSchema, + Metadata$Outbound, + Metadata$outboundSchema, +} 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"; + +/** + * > View the coverage for suppliers in the Data coverage explorer. + * + * @remarks + * + * ## Overview + * + * From the **Suppliers** endpoints, you can retrieve a list of [all the suppliers for a company](https://docs.codat.io/sync-for-payables-api#/operations/list-suppliers). Suppliers' data links to accounts payable [bills](https://docs.codat.io/sync-for-payables-api#/schemas/Bill). + * + * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible. + */ +export type UpdateSupplierResponseAccountingSupplier = { + modifiedDate?: string | undefined; + sourceModifiedDate?: string | undefined; + /** + * Identifier for the supplier, unique to the company in the accounting software. + */ + id?: string | undefined; + /** + * Name of the supplier as recorded in the accounting system, typically the company name. + */ + supplierName?: string | null | undefined; + /** + * Name of the main contact for the supplier. + */ + contactName?: string | null | undefined; + /** + * Email address that the supplier may be contacted on. + */ + emailAddress?: string | null | undefined; + /** + * Phone number that the supplier may be contacted on. + */ + phone?: string | null | undefined; + /** + * An array of Addresses. + */ + addresses?: Array
| null | undefined; + /** + * Company number of the supplier. In the UK, this is typically the company registration number issued by Companies House. + */ + registrationNumber?: string | null | undefined; + /** + * Supplier's company tax number. + */ + taxNumber?: string | null | undefined; + /** + * Status of the supplier. + */ + status: SupplierStatus; + /** + * Default currency the supplier's transactional data is recorded in. + */ + defaultCurrency?: string | null | undefined; + metadata?: Metadata | undefined; + /** + * Supplemental data is additional data you can include in our standard data types. + * + * @remarks + * + * 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. + */ + supplementalData?: SupplementalData | undefined; +}; + +export type UpdateSupplierResponse = { + data?: UpdateSupplierResponseAccountingSupplier | null | undefined; + /** + * Contains a single entry that communicates which record has changed and the manner in which it changed. + */ + changes?: Array | null | undefined; + /** + * Available data types + */ + dataType?: PropertieDataType | undefined; + /** + * Unique identifier for your SMB in Codat. + */ + companyId: string; + /** + * 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. + */ + pushOperationKey: string; + /** + * Unique identifier for a company's data connection. + */ + dataConnectionKey: string; + /** + * 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. + */ + requestedOnUtc: string; + /** + * 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. + */ + completedOnUtc?: string | undefined; + /** + * Number of minutes the push operation must complete within before it times out. + */ + timeoutInMinutes?: number | null | undefined; + /** + * Number of seconds the push operation must complete within before it times out. + * + * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. + */ + timeoutInSeconds?: number | null | undefined; + /** + * The current status of the push operation. + */ + status: PushOperationStatus; + /** + * A message about the error. + */ + errorMessage?: string | null | undefined; + /** + * A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + */ + validation?: Validation | undefined; + /** + * Push status code. + */ + statusCode: number; +}; + +/** @internal */ +export const UpdateSupplierResponseAccountingSupplier$inboundSchema: z.ZodType< + UpdateSupplierResponseAccountingSupplier, + z.ZodTypeDef, + unknown +> = 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(Address$inboundSchema)).optional(), + registrationNumber: z.nullable(z.string()).optional(), + taxNumber: z.nullable(z.string()).optional(), + status: SupplierStatus$inboundSchema, + defaultCurrency: z.nullable(z.string()).optional(), + metadata: Metadata$inboundSchema.optional(), + 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(Address$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; +} + +/** @internal */ +export const UpdateSupplierResponse$inboundSchema: z.ZodType< + UpdateSupplierResponse, + z.ZodTypeDef, + unknown +> = z.object({ + data: z.nullable( + z.lazy(() => UpdateSupplierResponseAccountingSupplier$inboundSchema), + ).optional(), + changes: z.nullable(z.array(PushOperationChange$inboundSchema)).optional(), + dataType: PropertieDataType$inboundSchema.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$inboundSchema, + errorMessage: z.nullable(z.string()).optional(), + validation: Validation$inboundSchema.optional(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/validation.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/validation.ts new file mode 100644 index 000000000..70d4dffc6 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/validation.ts @@ -0,0 +1,58 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { + ValidationItem, + ValidationItem$inboundSchema, + ValidationItem$Outbound, + ValidationItem$outboundSchema, +} from "./validationitem.js"; + +/** + * A human-readable object describing validation decisions Codat has made when pushing data into the platform. If a push has failed because of validation errors, they will be detailed here. + */ +export type Validation = { + errors?: Array | null | undefined; + warnings?: Array | null | undefined; +}; + +/** @internal */ +export const Validation$inboundSchema: z.ZodType< + Validation, + z.ZodTypeDef, + unknown +> = z.object({ + errors: z.nullable(z.array(ValidationItem$inboundSchema)).optional(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/validationitem.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/validationitem.ts new file mode 100644 index 000000000..827bb4bab --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/validationitem.ts @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export type ValidationItem = { + /** + * Unique identifier for a validation item. + */ + itemId?: string | null | undefined; + /** + * A message outlining validation item's issue. + */ + message?: string | null | undefined; + /** + * Name of validator. + */ + validatorName?: string | null | undefined; +}; + +/** @internal */ +export const ValidationItem$inboundSchema: z.ZodType< + ValidationItem, + z.ZodTypeDef, + unknown +> = z.object({ + itemId: z.nullable(z.string()).optional(), + message: z.nullable(z.string()).optional(), + 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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/validdatatypelinkitems.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/validdatatypelinkitems.ts new file mode 100644 index 000000000..187203560 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/validdatatypelinkitems.ts @@ -0,0 +1,97 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +/** + * 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. + * + * @remarks + * + * 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. + */ +export type ValidDatatypeLinkItems = { + /** + * The property from the account that can be linked. + */ + property?: string | null | undefined; + /** + * Supported `dataTypes` that the record can be linked to. + */ + links?: Array | null | undefined; +}; + +/** @internal */ +export const ValidDatatypeLinkItems$inboundSchema: z.ZodType< + ValidDatatypeLinkItems, + z.ZodTypeDef, + unknown +> = z.object({ + property: z.nullable(z.string()).optional(), + links: z.nullable(z.array(z.string())).optional(), +}); + +/** @internal */ +export type ValidDatatypeLinkItems$Outbound = { + property?: string | null | undefined; + links?: Array | null | undefined; +}; + +/** @internal */ +export const ValidDatatypeLinkItems$outboundSchema: z.ZodType< + ValidDatatypeLinkItems$Outbound, + z.ZodTypeDef, + ValidDatatypeLinkItems +> = 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 ValidDatatypeLinkItems$ { + /** @deprecated use `ValidDatatypeLinkItems$inboundSchema` instead. */ + export const inboundSchema = ValidDatatypeLinkItems$inboundSchema; + /** @deprecated use `ValidDatatypeLinkItems$outboundSchema` instead. */ + export const outboundSchema = ValidDatatypeLinkItems$outboundSchema; + /** @deprecated use `ValidDatatypeLinkItems$Outbound` instead. */ + export type Outbound = ValidDatatypeLinkItems$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/weblink.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/weblink.ts new file mode 100644 index 000000000..1b38f8f12 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/weblink.ts @@ -0,0 +1,89 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * The type of the weblink. + */ +export const Type = { + Website: "Website", + Social: "Social", + Unknown: "Unknown", +} as const; +/** + * The type of the weblink. + */ +export type Type = ClosedEnum; + +/** + * Weblink associated with the company. + */ +export type WebLink = { + /** + * The type of the weblink. + */ + type?: Type | undefined; + /** + * The full URL for the weblink. + */ + url?: string | undefined; +}; + +/** @internal */ +export const Type$inboundSchema: 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 WebLink$inboundSchema: z.ZodType = + z.object({ + type: Type$inboundSchema.optional(), + 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: Type$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; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/zero.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/zero.ts new file mode 100644 index 000000000..5da747ab7 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/models/shared/zero.ts @@ -0,0 +1,95 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; +import { ClosedEnum } from "../../types/enums.js"; + +/** + * Allowed name of the 'dataType'. + */ +export const ZeroDataType = { + PurchaseOrders: "purchaseOrders", + Bills: "bills", +} as const; +/** + * Allowed name of the 'dataType'. + */ +export type ZeroDataType = ClosedEnum; + +/** + * Links the current record line to the underlying record line that created it. + * + * @remarks + * + * For example, if a bill is generated from a purchase order, this property allows you to connect the bill line item to the purchase order line item in our data model. + */ +export type Zero = { + /** + * 'id' of the underlying record. + */ + id?: string | undefined; + /** + * Allowed name of the 'dataType'. + */ + dataType?: ZeroDataType | undefined; + /** + * Line number of the underlying record. + */ + lineNumber?: string | undefined; +}; + +/** @internal */ +export const ZeroDataType$inboundSchema: z.ZodNativeEnum = + z.nativeEnum(ZeroDataType); + +/** @internal */ +export const ZeroDataType$outboundSchema: z.ZodNativeEnum = + ZeroDataType$inboundSchema; + +/** + * @internal + * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. + */ +export namespace ZeroDataType$ { + /** @deprecated use `ZeroDataType$inboundSchema` instead. */ + export const inboundSchema = ZeroDataType$inboundSchema; + /** @deprecated use `ZeroDataType$outboundSchema` instead. */ + export const outboundSchema = ZeroDataType$outboundSchema; +} + +/** @internal */ +export const Zero$inboundSchema: z.ZodType = z + .object({ + id: z.string().optional(), + dataType: ZeroDataType$inboundSchema.optional(), + lineNumber: z.string().optional(), + }); + +/** @internal */ +export type Zero$Outbound = { + id?: string | undefined; + dataType?: string | undefined; + lineNumber?: string | undefined; +}; + +/** @internal */ +export const Zero$outboundSchema: z.ZodType = + z.object({ + id: z.string().optional(), + dataType: ZeroDataType$outboundSchema.optional(), + lineNumber: 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 Zero$ { + /** @deprecated use `Zero$inboundSchema` instead. */ + export const inboundSchema = Zero$inboundSchema; + /** @deprecated use `Zero$outboundSchema` instead. */ + export const outboundSchema = Zero$outboundSchema; + /** @deprecated use `Zero$Outbound` instead. */ + export type Outbound = Zero$Outbound; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/clientratelimitreached.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/clientratelimitreached.ts deleted file mode 100644 index 46150bb19..000000000 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/clientratelimitreached.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { AxiosResponse } from "axios"; - -export class ClientRateLimitReachedResponse extends SpeakeasyBase { - /** - * HTTP response content type for this operation - */ - @SpeakeasyMetadata() - contentType: string; - - /** - * HTTP response status code for this operation - */ - @SpeakeasyMetadata() - statusCode: number; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SpeakeasyMetadata() - rawResponse: AxiosResponse; -} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/clientratelimitreset.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/clientratelimitreset.ts deleted file mode 100644 index bbb9f9830..000000000 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/clientratelimitreset.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { AxiosResponse } from "axios"; - -export class ClientRateLimitResetResponse extends SpeakeasyBase { - /** - * HTTP response content type for this operation - */ - @SpeakeasyMetadata() - contentType: string; - - /** - * HTTP response status code for this operation - */ - @SpeakeasyMetadata() - statusCode: number; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SpeakeasyMetadata() - rawResponse: AxiosResponse; -} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/index.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/index.ts deleted file mode 100644 index 1f81aede0..000000000 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -export * from "./clientratelimitreached"; -export * from "./clientratelimitreset"; -export * from "./payablesbillcreated"; -export * from "./payablesbilldeleted"; -export * from "./payablesbillupdated"; diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/payablesbillcreated.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/payablesbillcreated.ts deleted file mode 100644 index b8a1a55fc..000000000 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/payablesbillcreated.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { AxiosResponse } from "axios"; - -export class PayablesBillCreatedResponse extends SpeakeasyBase { - /** - * HTTP response content type for this operation - */ - @SpeakeasyMetadata() - contentType: string; - - /** - * HTTP response status code for this operation - */ - @SpeakeasyMetadata() - statusCode: number; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SpeakeasyMetadata() - rawResponse: AxiosResponse; -} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/payablesbilldeleted.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/payablesbilldeleted.ts deleted file mode 100644 index a78d8e6d4..000000000 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/payablesbilldeleted.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { AxiosResponse } from "axios"; - -export class PayablesBillDeletedResponse extends SpeakeasyBase { - /** - * HTTP response content type for this operation - */ - @SpeakeasyMetadata() - contentType: string; - - /** - * HTTP response status code for this operation - */ - @SpeakeasyMetadata() - statusCode: number; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SpeakeasyMetadata() - rawResponse: AxiosResponse; -} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/payablesbillupdated.ts b/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/payablesbillupdated.ts deleted file mode 100644 index 49185b0ac..000000000 --- a/previous-versions/sync-for-payables-version-1/src/sdk/models/webhooks/payablesbillupdated.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. - */ - -import { SpeakeasyBase, SpeakeasyMetadata } from "../../../internal/utils"; -import { AxiosResponse } from "axios"; - -export class PayablesBillUpdatedResponse extends SpeakeasyBase { - /** - * HTTP response content type for this operation - */ - @SpeakeasyMetadata() - contentType: string; - - /** - * HTTP response status code for this operation - */ - @SpeakeasyMetadata() - statusCode: number; - - /** - * Raw HTTP response; suitable for custom response parsing - */ - @SpeakeasyMetadata() - rawResponse: AxiosResponse; -} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/paymentmethods.ts b/previous-versions/sync-for-payables-version-1/src/sdk/paymentmethods.ts new file mode 100644 index 000000000..967e05259 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/paymentmethods.ts @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { paymentMethodsGet } from "../funcs/paymentMethodsGet.js"; +import { paymentMethodsList } from "../funcs/paymentMethodsList.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class PaymentMethods extends ClientSDK { + /** + * List payment methods + * + * @remarks + * The *List payment methods* endpoint returns a list of [payment methods](https://docs.codat.io/sync-for-payables-api#/schemas/PaymentMethod) for a given company's connection. + * + * [Payment methods](https://docs.codat.io/sync-for-payables-api#/schemas/PaymentMethod) are used to pay a Bill. Payment Methods are referenced on [Bill Payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) and [Payments](https://docs.codat.io/sync-for-payables-api#/schemas/Payment). + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ + async list( + request: operations.ListPaymentMethodsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentMethodsList( + this, + request, + options, + )); + } + + /** + * Get payment method + * + * @remarks + * The *Get payment method* endpoint returns a single payment method for a given `paymentMethodId`. + * + * [Payment methods](https://docs.codat.io/sync-for-payables-api#/schemas/PaymentMethod) are used to pay a Bill. Payment Methods are referenced on [Bill Payments](https://docs.codat.io/sync-for-payables-api#/schemas/BillPayment) and [Payments](https://docs.codat.io/sync-for-payables-api#/schemas/Payment). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=paymentMethods) for integrations that support getting a specific payment method. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ + async get( + request: operations.GetPaymentMethodRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(paymentMethodsGet( + this, + request, + options, + )); + } +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/pushoperations.ts b/previous-versions/sync-for-payables-version-1/src/sdk/pushoperations.ts new file mode 100644 index 000000000..deb3ed6ae --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/pushoperations.ts @@ -0,0 +1,46 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { pushOperationsGet } from "../funcs/pushOperationsGet.js"; +import { pushOperationsList } from "../funcs/pushOperationsList.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class PushOperations extends ClientSDK { + /** + * List push operations + * + * @remarks + * List push operation records. + */ + async list( + request: operations.ListPushOperationsRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(pushOperationsList( + this, + request, + options, + )); + } + + /** + * Get push operation + * + * @remarks + * Retrieve push operation. + */ + async get( + request: operations.GetPushOperationRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(pushOperationsGet( + this, + request, + options, + )); + } +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/sdk.ts b/previous-versions/sync-for-payables-version-1/src/sdk/sdk.ts index 67e66379e..7e9d3222a 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/sdk.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/sdk.ts @@ -1,135 +1,103 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -import * as utils from "../internal/utils"; -import * as shared from "../sdk/models/shared"; -import { Bills } from "./bills"; -import { Companies } from "./companies"; -import { Connections } from "./connections"; -import axios from "axios"; -import { AxiosInstance } from "axios"; +import { ClientSDK } from "../lib/sdks.js"; +import { Accounts } from "./accounts.js"; +import { BankAccounts } from "./bankaccounts.js"; +import { BillCreditNotes } from "./billcreditnotes.js"; +import { BillPayments } from "./billpayments.js"; +import { Bills } from "./bills.js"; +import { Companies } from "./companies.js"; +import { CompanyInfo } from "./companyinfo.js"; +import { Connections } from "./connections.js"; +import { JournalEntries } from "./journalentries.js"; +import { Journals } from "./journals.js"; +import { ManageData } from "./managedata.js"; +import { PaymentMethods } from "./paymentmethods.js"; +import { PushOperations } from "./pushoperations.js"; +import { Suppliers } from "./suppliers.js"; +import { TaxRates } from "./taxrates.js"; +import { TrackingCategories } from "./trackingcategories.js"; -/** - * Contains the list of servers available to the SDK - */ -export const ServerList = [ - /** - * Production - */ - "https://api.codat.io", -] as const; - -/** - * The available configuration options for the SDK - */ -export type SDKProps = { - /** - * The security details required to authenticate the SDK - */ - security?: shared.Security | (() => Promise); - - /** - * Allows overriding the default axios client used by the SDK - */ - defaultClient?: AxiosInstance; - - /** - * Allows overriding the default server used by the SDK - */ - serverIdx?: number; - - /** - * Allows overriding the default server URL used by the SDK - */ - serverURL?: string; - /** - * Allows overriding the default retry config used by the SDK - */ - retryConfig?: utils.RetryConfig; -}; - -export class SDKConfiguration { - defaultClient: AxiosInstance; - security?: shared.Security | (() => Promise); - serverURL: string; - serverDefaults: any; - language = "typescript"; - openapiDocVersion = "3.0.0"; - sdkVersion = "2.2.0"; - genVersion = "2.253.0"; - userAgent = "speakeasy-sdk/typescript 2.2.0 2.253.0 3.0.0 @codat/sync-for-payables"; - retryConfig?: utils.RetryConfig; - public constructor(init?: Partial) { - Object.assign(this, init); - } -} +export class CodatSyncPayables extends ClientSDK { + private _companies?: Companies; + get companies(): Companies { + return (this._companies ??= new Companies(this.options$)); + } -/** - * Sync for Payables: The API for Sync for Payables. - * - * @remarks - * - * Sync for Payables is an API and a set of supporting tools built to help integrate with your customers' accounting software, and keep their supplier information, invoices, and payments in sync. - * - * [Explore product](https://docs.codat.io/payables/overview) | [See OpenAPI spec](https://github.com/codatio/oas) - * - * --- - * - * ## Endpoints - * - * | Endpoints | Description | - * |:---------------------|:-----------------------------------------------------------------------------------------------------------| - * | Companies | Create and manage your SMB users' companies. | - * | Connections | Create new and manage existing data connections for a company. | - * | Accounts | Get, create, and update Accounts | - * | Bills | Get, create, and update Bills | - * | Bill credit notes | Get, create, and update Bill credit notes | - * | Bill payments | Get, create, and update Bill payments | - * | Journals | Get, create, and update Journals | - * | Journal entries | Get, create, and update Journal entries | - * | Payment methods | Get, create, and update Payment methods | - * | Suppliers | Get, create, and update Suppliers | - * | Tax rates | Get, create, and update Tax rates | - * | Tracking categories | Get, create, and update Tracking categories | - * | Push operations | View historic push operations | - * | Company info | View company profile from the source platform. | - * | Manage data | Control how data is retrieved from an integration. | - */ -export class CodatSyncPayables { - /** - * Create and manage your Codat companies. - */ - public companies: Companies; - /** - * Bills - */ - public bills: Bills; - /** - * Manage your companies' data connections. - */ - public connections: Connections; - - private sdkConfiguration: SDKConfiguration; - - constructor(props?: SDKProps) { - let serverURL = props?.serverURL; - const serverIdx = props?.serverIdx ?? 0; - - if (!serverURL) { - serverURL = ServerList[serverIdx]; - } - - const defaultClient = props?.defaultClient ?? axios.create(); - this.sdkConfiguration = new SDKConfiguration({ - defaultClient: defaultClient, - security: props?.security, - serverURL: serverURL, - retryConfig: props?.retryConfig, - }); - - this.companies = new Companies(this.sdkConfiguration); - this.bills = new Bills(this.sdkConfiguration); - this.connections = new Connections(this.sdkConfiguration); - } + private _connections?: Connections; + get connections(): Connections { + return (this._connections ??= new Connections(this.options$)); + } + + private _manageData?: ManageData; + get manageData(): ManageData { + return (this._manageData ??= new ManageData(this.options$)); + } + + private _pushOperations?: PushOperations; + get pushOperations(): PushOperations { + return (this._pushOperations ??= new PushOperations(this.options$)); + } + + private _accounts?: Accounts; + get accounts(): Accounts { + return (this._accounts ??= new Accounts(this.options$)); + } + + private _bankAccounts?: BankAccounts; + get bankAccounts(): BankAccounts { + return (this._bankAccounts ??= new BankAccounts(this.options$)); + } + + private _billCreditNotes?: BillCreditNotes; + get billCreditNotes(): BillCreditNotes { + return (this._billCreditNotes ??= new BillCreditNotes(this.options$)); + } + + private _billPayments?: BillPayments; + get billPayments(): BillPayments { + return (this._billPayments ??= new BillPayments(this.options$)); + } + + private _bills?: Bills; + get bills(): Bills { + return (this._bills ??= new Bills(this.options$)); + } + + private _journalEntries?: JournalEntries; + get journalEntries(): JournalEntries { + return (this._journalEntries ??= new JournalEntries(this.options$)); + } + + private _journals?: Journals; + get journals(): Journals { + return (this._journals ??= new Journals(this.options$)); + } + + private _paymentMethods?: PaymentMethods; + get paymentMethods(): PaymentMethods { + return (this._paymentMethods ??= new PaymentMethods(this.options$)); + } + + private _suppliers?: Suppliers; + get suppliers(): Suppliers { + return (this._suppliers ??= new Suppliers(this.options$)); + } + + private _taxRates?: TaxRates; + get taxRates(): TaxRates { + return (this._taxRates ??= new TaxRates(this.options$)); + } + + private _trackingCategories?: TrackingCategories; + get trackingCategories(): TrackingCategories { + return (this._trackingCategories ??= new TrackingCategories(this.options$)); + } + + private _companyInfo?: CompanyInfo; + get companyInfo(): CompanyInfo { + return (this._companyInfo ??= new CompanyInfo(this.options$)); + } } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/suppliers.ts b/previous-versions/sync-for-payables-version-1/src/sdk/suppliers.ts new file mode 100644 index 000000000..1b6b590c7 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/suppliers.ts @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { suppliersCreate } from "../funcs/suppliersCreate.js"; +import { suppliersGet } from "../funcs/suppliersGet.js"; +import { suppliersGetCreateUpdateModel } from "../funcs/suppliersGetCreateUpdateModel.js"; +import { suppliersList } from "../funcs/suppliersList.js"; +import { suppliersUpdate } from "../funcs/suppliersUpdate.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class Suppliers extends ClientSDK { + /** + * List suppliers + * + * @remarks + * The *List suppliers* endpoint returns a list of [suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) for a given company's connection. + * + * [Suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + */ + async list( + request: operations.ListSuppliersRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(suppliersList( + this, + request, + options, + )); + } + + /** + * Get supplier + * + * @remarks + * The *Get supplier* endpoint returns a single supplier for a given `supplierId`. + * + * [Suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support getting a specific supplier. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ + async get( + request: operations.GetSupplierRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(suppliersGet( + this, + request, + options, + )); + } + + /** + * Get create/update supplier model + * + * @remarks + * The *Get create/update supplier model* endpoint returns the expected data for the request payload when creating and updating a [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) for a given company and integration. + * + * [Suppliers](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) are people or organizations that provide something, such as a product or service. + * + * **Integration-specific behaviour** + * + * See the *response examples* for integration-specific indicative models. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating and updating a supplier. + */ + async getCreateUpdateModel( + request: operations.GetCreateUpdateSupplierModelRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(suppliersGetCreateUpdateModel( + this, + request, + options, + )); + } + + /** + * Create supplier + * + * @remarks + * The *Create supplier* endpoint creates a new [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) for a given company's connection. + * + * [Suppliers](https://docs.codat.io/sync-for-payables-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-payables-api#/operations/get-create-update-suppliers-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating a supplier. + */ + async create( + request: operations.CreateSupplierRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(suppliersCreate( + this, + request, + options, + )); + } + + /** + * Update supplier + * + * @remarks + * The *Update supplier* endpoint updates an existing [supplier](https://docs.codat.io/sync-for-payables-api#/schemas/Supplier) for a given company's connection. + * + * [Suppliers](https://docs.codat.io/sync-for-payables-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-payables-api#/operations/get-create-update-suppliers-model). + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=suppliers) for integrations that support creating a supplier. + */ + async update( + request: operations.UpdateSupplierRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(suppliersUpdate( + this, + request, + options, + )); + } +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/taxrates.ts b/previous-versions/sync-for-payables-version-1/src/sdk/taxrates.ts new file mode 100644 index 000000000..1983453ae --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/taxrates.ts @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { taxRatesGet } from "../funcs/taxRatesGet.js"; +import { taxRatesList } from "../funcs/taxRatesList.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class TaxRates extends ClientSDK { + /** + * List all tax rates + * + * @remarks + * The *List tax rates* endpoint returns a list of [tax rates](https://docs.codat.io/sync-for-payables-api#/schemas/TaxRate) for a given company's connection. + * + * [Tax rates](https://docs.codat.io/sync-for-payables-api#/schemas/TaxRate) are a set of taxes and associated rates within the SMB's accounting software. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ + async list( + request: operations.ListTaxRatesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(taxRatesList( + this, + request, + options, + )); + } + + /** + * Get tax rate + * + * @remarks + * The *Get tax rate* endpoint returns a single tax rate for a given `taxRateId`. + * + * [Tax rates](https://docs.codat.io/sync-for-payables-api#/schemas/TaxRate) are a set of taxes and associated rates within the SMB's accounting software. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=taxRates) for integrations that support getting a specific tax rate. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ + async get( + request: operations.GetTaxRateRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(taxRatesGet( + this, + request, + options, + )); + } +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/trackingcategories.ts b/previous-versions/sync-for-payables-version-1/src/sdk/trackingcategories.ts new file mode 100644 index 000000000..86b937aec --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/trackingcategories.ts @@ -0,0 +1,56 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { trackingCategoriesGet } from "../funcs/trackingCategoriesGet.js"; +import { trackingCategoriesList } from "../funcs/trackingCategoriesList.js"; +import { ClientSDK, RequestOptions } from "../lib/sdks.js"; +import * as operations from "./models/operations/index.js"; +import * as shared from "./models/shared/index.js"; +import { unwrapAsync } from "./types/fp.js"; + +export class TrackingCategories extends ClientSDK { + /** + * List tracking categories + * + * @remarks + * The *List tracking categories* endpoint returns a list of [tracking categories](https://docs.codat.io/sync-for-payables-api#/schemas/TrackingCategory) for a given company's connection. + * + * [Tracking categories](https://docs.codat.io/sync-for-payables-api#/schemas/TrackingCategory) are used to monitor cost centres and control budgets that sit outside the standard set of accounts. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ + async list( + request: operations.ListTrackingCategoriesRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(trackingCategoriesList( + this, + request, + options, + )); + } + + /** + * Get tracking categories + * + * @remarks + * The *Get tracking category* endpoint returns a single tracking category for a given `trackingCategoryId`. + * + * [Tracking categories](https://docs.codat.io/sync-for-payables-api#/schemas/TrackingCategory) are used to monitor cost centres and control budgets that sit outside the standard set of accounts. + * + * Check out our [coverage explorer](https://knowledge.codat.io/supported-features/accounting?view=tab-by-data-type&dataType=trackingCategories) for integrations that support getting a specific tracking category. + * + * Before using this endpoint, you must have [retrieved data for the company](https://docs.codat.io/sync-for-payables-api#/operations/refresh-company-data). + */ + async get( + request: operations.GetTrackingCategoryRequest, + options?: RequestOptions, + ): Promise { + return unwrapAsync(trackingCategoriesGet( + this, + request, + options, + )); + } +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/types/blobs.ts b/previous-versions/sync-for-payables-version-1/src/sdk/types/blobs.ts new file mode 100644 index 000000000..4ce846023 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/types/blobs.ts @@ -0,0 +1,31 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export const blobLikeSchema: z.ZodType = + z.custom(isBlobLike, { + message: "expected a Blob, File or Blob-like object", + fatal: true, + }); + +export function isBlobLike(val: unknown): val is Blob { + if (val instanceof Blob) { + return true; + } + + if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) { + return false; + } + + const name = val[Symbol.toStringTag]; + if (typeof name !== "string") { + return false; + } + if (name !== "Blob" && name !== "File") { + return false; + } + + return "stream" in val && typeof val.stream === "function"; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/types/constdatetime.ts b/previous-versions/sync-for-payables-version-1/src/sdk/types/constdatetime.ts new file mode 100644 index 000000000..c0a4409c7 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/types/constdatetime.ts @@ -0,0 +1,15 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod"; + +export function constDateTime( + val: string, +): z.ZodType { + return z.custom((v) => { + return ( + typeof v === "string" && new Date(v).getTime() === new Date(val).getTime() + ); + }, `Value must be equivelant to ${val}`); +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/types/decimal.ts b/previous-versions/sync-for-payables-version-1/src/sdk/types/decimal.ts new file mode 100644 index 000000000..a7895d555 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/types/decimal.ts @@ -0,0 +1,5 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export * from "decimal.js"; diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/types/enums.ts b/previous-versions/sync-for-payables-version-1/src/sdk/types/enums.ts new file mode 100644 index 000000000..6fb6d9109 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/types/enums.ts @@ -0,0 +1,16 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +declare const __brand: unique symbol; +export type Unrecognized = T & { [__brand]: "unrecognized" }; + +export function catchUnrecognizedEnum(value: T): Unrecognized { + return value as Unrecognized; +} + +type Prettify = { [K in keyof T]: T[K] } & {}; +export type ClosedEnum = T[keyof T]; +export type OpenEnum = + | Prettify + | Unrecognized; diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/types/fp.ts b/previous-versions/sync-for-payables-version-1/src/sdk/types/fp.ts new file mode 100644 index 000000000..ccbe51eac --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/types/fp.ts @@ -0,0 +1,50 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +/** + * A monad that captures the result of a function call or an error if it was not + * successful. Railway programming, enabled by this type, can be a nicer + * alternative to traditional exception throwing because it allows functions to + * declare all _known_ errors with static types and then check for them + * exhaustively in application code. Thrown exception have a type of `unknown` + * and break out of regular control flow of programs making them harder to + * inspect and more verbose work with due to try-catch blocks. + */ +export type Result = + | { ok: true; value: T; error?: never } + | { ok: false; value?: never; error: E }; + +export function OK(value: V): Result { + return { ok: true, value }; +} + +export function ERR(error: E): Result { + return { ok: false, error }; +} + +/** + * unwrap is a convenience function for extracting a value from a result or + * throwing if there was an error. + */ +export function unwrap(r: Result): T { + if (!r.ok) { + throw r.error; + } + return r.value; +} + +/** + * unwrapAsync is a convenience function for resolving a value from a Promise + * of a result or rejecting if an error occurred. + */ +export async function unwrapAsync( + pr: Promise>, +): Promise { + const r = await pr; + if (!r.ok) { + throw r.error; + } + + return r.value; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/types/index.ts b/previous-versions/sync-for-payables-version-1/src/sdk/types/index.ts index de759a3a3..1af7eaa25 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/types/index.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/types/index.ts @@ -1,5 +1,12 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ -export * from "./rfcdate"; +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 { Result } from "./fp.js"; +export type { PageIterator, Paginator } from "./operations.js"; +export { createPageIterator } from "./operations.js"; +export { RFCDate } from "./rfcdate.js"; diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/types/operations.ts b/previous-versions/sync-for-payables-version-1/src/sdk/types/operations.ts new file mode 100644 index 000000000..0952f6f4d --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/types/operations.ts @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { Result } from "./fp.js"; + +export type Paginator = () => Promise }> | null; + +export type PageIterator = V & { + next: Paginator; + [Symbol.asyncIterator]: () => AsyncIterableIterator; +}; + +export function createPageIterator( + page: V & { next: Paginator }, + halt: (v: V) => boolean, +): { + [Symbol.asyncIterator]: () => AsyncIterableIterator; +} { + return { + [Symbol.asyncIterator]: async function* paginator() { + yield page; + if (halt(page)) { + return; + } + + let p: typeof page | null = page; + for (p = await p.next(); p != null; p = await p.next()) { + yield p; + if (halt(p)) { + return; + } + } + }, + }; +} + +/** + * This utility create a special iterator that yields a single value and + * terminates. It is useful in paginated SDK functions that have early return + * paths when things go wrong. + */ +export function haltIterator(v: V): PageIterator { + return { + ...v, + next: () => null, + [Symbol.asyncIterator]: async function* paginator() { + yield v; + }, + }; +} + +/** + * Converts an async iterator of `Result` into an async iterator of `V`. + * When error results occur, the underlying error value is thrown. + */ +export async function unwrapResultIterator( + iteratorPromise: Promise>>, +): Promise> { + const resultIter = await iteratorPromise; + + if (!resultIter.ok) { + throw resultIter.error; + } + + return { + ...resultIter.value, + next: unwrapPaginator(resultIter.next), + [Symbol.asyncIterator]: async function* paginator() { + for await (const page of resultIter) { + if (!page.ok) { + throw page.error; + } + yield page.value; + } + }, + }; +} + +function unwrapPaginator( + paginator: Paginator>, +): Paginator { + return () => { + const nextResult = paginator(); + if (nextResult == null) { + return null; + } + return nextResult.then((res) => { + if (!res.ok) { + throw res.error; + } + const out = { + ...res.value, + next: unwrapPaginator(res.next), + }; + return out; + }); + }; +} diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/types/rfcdate.ts b/previous-versions/sync-for-payables-version-1/src/sdk/types/rfcdate.ts index f423fd4a4..c79b3f53a 100644 --- a/previous-versions/sync-for-payables-version-1/src/sdk/types/rfcdate.ts +++ b/previous-versions/sync-for-payables-version-1/src/sdk/types/rfcdate.ts @@ -1,48 +1,54 @@ /* - * Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT. + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ +const dateRE = /^\d{4}-\d{2}-\d{2}$/; + export class RFCDate { - private date: Date; + private serialized: string; - constructor(date: Date | { date: string } | string | undefined) { - if (!date) { - this.date = new Date(); - return; - } + /** + * Creates a new RFCDate instance using today's date. + */ + static today(): RFCDate { + return new RFCDate(new Date()); + } - if (typeof date === "string") { - this.date = new Date(date); - return; - } - if (date instanceof Date) { - this.date = date as Date; - return; + /** + * Creates a new RFCDate instance using the provided input. + * If a string is used then in must be in the format YYYY-MM-DD. + * + * @param date A Date object or a date string in YYYY-MM-DD format + * @example + * new RFCDate("2022-01-01") + * @example + * new RFCDate(new Date()) + */ + constructor(date: Date | string) { + if (typeof date === "string" && !dateRE.test(date)) { + throw new RangeError( + "RFCDate: date strings must be in the format YYYY-MM-DD: " + date, + ); } - const anyDate = date as any; - if (date && !!anyDate.date) { - this.date = new Date(anyDate.date); + const value = new Date(date); + if (isNaN(+value)) { + throw new RangeError("RFCDate: invalid date provided: " + date); } - } - public getDate(): Date { - return this.date; + this.serialized = value.toISOString().slice(0, "YYYY-MM-DD".length); + if (!dateRE.test(this.serialized)) { + throw new TypeError( + `RFCDate: failed to build valid date with given value: ${date} serialized to ${this.serialized}`, + ); + } } - public toJSON(): string { + toJSON(): string { return this.toString(); } - public toString(): string { - const dateRegex = /^(\d{4})-(\d{2})-(\d{2})/; - - const matches = this.date.toISOString().match(dateRegex); - if (matches == null) { - throw new Error("Date format is not valid"); - } - - const [, year, month, day]: RegExpMatchArray = matches; - return `${year}-${month}-${day}`; + toString(): string { + return this.serialized; } } diff --git a/previous-versions/sync-for-payables-version-1/src/sdk/types/streams.ts b/previous-versions/sync-for-payables-version-1/src/sdk/types/streams.ts new file mode 100644 index 000000000..a0163e7a9 --- /dev/null +++ b/previous-versions/sync-for-payables-version-1/src/sdk/types/streams.ts @@ -0,0 +1,21 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +export function isReadableStream( + val: unknown, +): val is ReadableStream { + if (typeof val !== "object" || val === null) { + return false; + } + + // Check for the presence of methods specific to ReadableStream + const stream = val as ReadableStream; + + // ReadableStream has methods like getReader, cancel, and tee + return ( + typeof stream.getReader === "function" && + typeof stream.cancel === "function" && + typeof stream.tee === "function" + ); +} diff --git a/previous-versions/sync-for-payables-version-1/tsconfig.json b/previous-versions/sync-for-payables-version-1/tsconfig.json index 0e90e5e5d..7a86d2d98 100644 --- a/previous-versions/sync-for-payables-version-1/tsconfig.json +++ b/previous-versions/sync-for-payables-version-1/tsconfig.json @@ -1,27 +1,40 @@ { "compilerOptions": { - "target": "es5", - "lib": ["es2021"], - "baseUrl": "src", - "rootDir": "src", - "outDir": "dist", + "incremental": true, + "tsBuildInfoFile": ".tsbuildinfo", + "target": "ES2018", + "lib": ["ES2022", "DOM", "DOM.Iterable"], + + "module": "Node16", + "moduleResolution": "Node16", + "allowJs": true, - "downlevelIteration": true, - "skipLibCheck": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, + + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "outDir": ".", + + + // https://github.com/tsconfig/bases/blob/a1bf7c0fa2e094b068ca3e1448ca2ece4157977e/bases/strictest.json "strict": true, - "forceConsistentCasingInFileNames": true, + "allowUnusedLabels": false, + "allowUnreachableCode": false, + "exactOptionalPropertyTypes": true, + "useUnknownInCatchVariables": true, "noFallthroughCasesInSwitch": true, - "module": "commonjs", - "moduleResolution": "node", - "resolveJsonModule": true, + "noImplicitOverride": true, + "noImplicitReturns": true, + "noPropertyAccessFromIndexSignature": true, + "noUncheckedIndexedAccess": true, + "noUnusedLocals": true, + "noUnusedParameters": true, "isolatedModules": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "strictPropertyInitialization": false, - "declaration": true, - "types": ["reflect-metadata"] + "checkJs": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true }, - "include": ["src"] + "include": ["src"], + "exclude": ["node_modules"] }