@unified-api/typescript-sdk 0.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -741
- package/dist/sdk/account.d.ts +6 -6
- package/dist/sdk/account.js +78 -36
- package/dist/sdk/accounting.d.ts +32 -72
- package/dist/sdk/accounting.js +451 -809
- package/dist/sdk/activity.d.ts +6 -6
- package/dist/sdk/activity.js +78 -36
- package/dist/sdk/apicall.d.ts +2 -2
- package/dist/sdk/apicall.js +26 -12
- package/dist/sdk/application.d.ts +6 -6
- package/dist/sdk/application.js +78 -36
- package/dist/sdk/applicationstatus.d.ts +1 -1
- package/dist/sdk/applicationstatus.js +13 -6
- package/dist/sdk/ats.d.ts +45 -45
- package/dist/sdk/ats.js +585 -270
- package/dist/sdk/auth.js +29 -6
- package/dist/sdk/call.d.ts +1 -1
- package/dist/sdk/call.js +13 -6
- package/dist/sdk/candidate.d.ts +6 -6
- package/dist/sdk/candidate.js +78 -36
- package/dist/sdk/collection.d.ts +6 -6
- package/dist/sdk/collection.js +78 -36
- package/dist/sdk/commerce.d.ts +24 -24
- package/dist/sdk/commerce.js +312 -144
- package/dist/sdk/company.d.ts +9 -9
- package/dist/sdk/company.js +117 -54
- package/dist/sdk/connection.d.ts +6 -6
- package/dist/sdk/connection.js +78 -36
- package/dist/sdk/contact.d.ts +18 -18
- package/dist/sdk/contact.js +234 -108
- package/dist/sdk/crm.d.ts +36 -36
- package/dist/sdk/crm.js +468 -216
- package/dist/sdk/customer.d.ts +6 -6
- package/dist/sdk/customer.js +78 -36
- package/dist/sdk/deal.d.ts +6 -6
- package/dist/sdk/deal.js +78 -36
- package/dist/sdk/document.d.ts +6 -6
- package/dist/sdk/document.js +78 -36
- package/dist/sdk/employee.d.ts +6 -6
- package/dist/sdk/employee.js +78 -36
- package/dist/sdk/enrich.d.ts +2 -2
- package/dist/sdk/enrich.js +26 -12
- package/dist/sdk/event.d.ts +6 -6
- package/dist/sdk/event.js +78 -36
- package/dist/sdk/file.d.ts +6 -6
- package/dist/sdk/file.js +78 -36
- package/dist/sdk/group.d.ts +6 -6
- package/dist/sdk/group.js +78 -36
- package/dist/sdk/hris.d.ts +12 -12
- package/dist/sdk/hris.js +156 -72
- package/dist/sdk/integration.d.ts +1 -1
- package/dist/sdk/integration.js +41 -12
- package/dist/sdk/interview.d.ts +6 -6
- package/dist/sdk/interview.js +78 -36
- package/dist/sdk/inventory.d.ts +6 -6
- package/dist/sdk/inventory.js +78 -36
- package/dist/sdk/invoice.d.ts +6 -6
- package/dist/sdk/invoice.js +78 -36
- package/dist/sdk/issue.d.ts +1 -1
- package/dist/sdk/issue.js +13 -6
- package/dist/sdk/item.d.ts +6 -6
- package/dist/sdk/item.js +78 -36
- package/dist/sdk/job.d.ts +6 -6
- package/dist/sdk/job.js +78 -36
- package/dist/sdk/lead.d.ts +6 -6
- package/dist/sdk/lead.js +78 -36
- package/dist/sdk/link.d.ts +31 -0
- package/dist/sdk/link.js +503 -0
- package/dist/sdk/list.d.ts +6 -6
- package/dist/sdk/list.js +78 -36
- package/dist/sdk/location.d.ts +6 -6
- package/dist/sdk/location.js +78 -36
- package/dist/sdk/login.js +15 -3
- package/dist/sdk/martech.d.ts +12 -12
- package/dist/sdk/martech.js +156 -72
- package/dist/sdk/member.d.ts +6 -6
- package/dist/sdk/member.js +78 -36
- package/dist/sdk/models/operations/createaccountingaccount.d.ts +0 -3
- package/dist/sdk/models/operations/createaccountingaccount.js +1 -15
- package/dist/sdk/models/operations/createaccountingcontact.d.ts +0 -3
- package/dist/sdk/models/operations/createaccountingcontact.js +1 -15
- package/dist/sdk/models/operations/createaccountinginvoice.d.ts +0 -3
- package/dist/sdk/models/operations/createaccountinginvoice.js +1 -15
- package/dist/sdk/models/operations/createaccountingtaxrate.d.ts +0 -3
- package/dist/sdk/models/operations/createaccountingtaxrate.js +1 -15
- package/dist/sdk/models/operations/createaccountingtransaction.d.ts +0 -3
- package/dist/sdk/models/operations/createaccountingtransaction.js +1 -15
- package/dist/sdk/models/operations/createatsactivity.d.ts +0 -3
- package/dist/sdk/models/operations/createatsactivity.js +1 -15
- package/dist/sdk/models/operations/createatsapplication.d.ts +0 -3
- package/dist/sdk/models/operations/createatsapplication.js +1 -15
- package/dist/sdk/models/operations/createatscandidate.d.ts +0 -3
- package/dist/sdk/models/operations/createatscandidate.js +1 -15
- package/dist/sdk/models/operations/createatsdocument.d.ts +0 -3
- package/dist/sdk/models/operations/createatsdocument.js +1 -15
- package/dist/sdk/models/operations/createatsinterview.d.ts +0 -3
- package/dist/sdk/models/operations/createatsinterview.js +1 -15
- package/dist/sdk/models/operations/createatsjob.d.ts +0 -3
- package/dist/sdk/models/operations/createatsjob.js +1 -15
- package/dist/sdk/models/operations/createatsscorecard.d.ts +0 -3
- package/dist/sdk/models/operations/createatsscorecard.js +1 -15
- package/dist/sdk/models/operations/createcommercecollection.d.ts +0 -3
- package/dist/sdk/models/operations/createcommercecollection.js +1 -15
- package/dist/sdk/models/operations/createcommerceinventory.d.ts +0 -3
- package/dist/sdk/models/operations/createcommerceinventory.js +1 -15
- package/dist/sdk/models/operations/createcommerceitem.d.ts +0 -3
- package/dist/sdk/models/operations/createcommerceitem.js +1 -15
- package/dist/sdk/models/operations/createcommercelocation.d.ts +0 -3
- package/dist/sdk/models/operations/createcommercelocation.js +1 -15
- package/dist/sdk/models/operations/createcrmcompany.d.ts +0 -3
- package/dist/sdk/models/operations/createcrmcompany.js +1 -15
- package/dist/sdk/models/operations/createcrmcontact.d.ts +0 -3
- package/dist/sdk/models/operations/createcrmcontact.js +1 -15
- package/dist/sdk/models/operations/createcrmdeal.d.ts +0 -3
- package/dist/sdk/models/operations/createcrmdeal.js +1 -15
- package/dist/sdk/models/operations/createcrmevent.d.ts +0 -3
- package/dist/sdk/models/operations/createcrmevent.js +1 -15
- package/dist/sdk/models/operations/createcrmlead.d.ts +0 -3
- package/dist/sdk/models/operations/createcrmlead.js +1 -15
- package/dist/sdk/models/operations/createcrmpipeline.d.ts +0 -3
- package/dist/sdk/models/operations/createcrmpipeline.js +1 -15
- package/dist/sdk/models/operations/createhrisemployee.d.ts +0 -3
- package/dist/sdk/models/operations/createhrisemployee.js +1 -15
- package/dist/sdk/models/operations/createhrisgroup.d.ts +0 -3
- package/dist/sdk/models/operations/createhrisgroup.js +1 -15
- package/dist/sdk/models/operations/createmartechlist.d.ts +0 -3
- package/dist/sdk/models/operations/createmartechlist.js +1 -15
- package/dist/sdk/models/operations/createmartechmember.d.ts +0 -3
- package/dist/sdk/models/operations/createmartechmember.js +1 -15
- package/dist/sdk/models/operations/createpassthrough.d.ts +0 -3
- package/dist/sdk/models/operations/createpassthrough.js +1 -15
- package/dist/sdk/models/operations/{createaccountingpayment.d.ts → createpaymentlink.d.ts} +7 -10
- package/dist/sdk/models/operations/createpaymentlink.js +95 -0
- package/dist/sdk/models/operations/createpaymentpayment.d.ts +28 -0
- package/dist/sdk/models/operations/createpaymentpayment.js +95 -0
- package/dist/sdk/models/operations/createstoragefile.d.ts +0 -3
- package/dist/sdk/models/operations/createstoragefile.js +1 -15
- package/dist/sdk/models/operations/createticketingcustomer.d.ts +0 -3
- package/dist/sdk/models/operations/createticketingcustomer.js +1 -15
- package/dist/sdk/models/operations/createticketingnote.d.ts +0 -3
- package/dist/sdk/models/operations/createticketingnote.js +1 -15
- package/dist/sdk/models/operations/createticketingticket.d.ts +0 -3
- package/dist/sdk/models/operations/createticketingticket.js +1 -15
- package/dist/sdk/models/operations/createuccontact.d.ts +0 -3
- package/dist/sdk/models/operations/createuccontact.js +1 -15
- package/dist/sdk/models/operations/createunifiedconnection.d.ts +0 -3
- package/dist/sdk/models/operations/createunifiedconnection.js +1 -15
- package/dist/sdk/models/operations/createunifiedwebhook.d.ts +0 -3
- package/dist/sdk/models/operations/createunifiedwebhook.js +1 -15
- package/dist/sdk/models/operations/getaccountingaccount.d.ts +0 -3
- package/dist/sdk/models/operations/getaccountingaccount.js +1 -15
- package/dist/sdk/models/operations/getaccountingcontact.d.ts +0 -3
- package/dist/sdk/models/operations/getaccountingcontact.js +1 -15
- package/dist/sdk/models/operations/getaccountinginvoice.d.ts +0 -3
- package/dist/sdk/models/operations/getaccountinginvoice.js +1 -15
- package/dist/sdk/models/operations/getaccountingorganization.d.ts +0 -3
- package/dist/sdk/models/operations/getaccountingorganization.js +1 -15
- package/dist/sdk/models/operations/getaccountingtaxrate.d.ts +0 -3
- package/dist/sdk/models/operations/getaccountingtaxrate.js +1 -15
- package/dist/sdk/models/operations/getaccountingtransaction.d.ts +0 -3
- package/dist/sdk/models/operations/getaccountingtransaction.js +1 -15
- package/dist/sdk/models/operations/getatsactivity.d.ts +0 -3
- package/dist/sdk/models/operations/getatsactivity.js +1 -15
- package/dist/sdk/models/operations/getatsapplication.d.ts +0 -3
- package/dist/sdk/models/operations/getatsapplication.js +1 -15
- package/dist/sdk/models/operations/getatscandidate.d.ts +0 -3
- package/dist/sdk/models/operations/getatscandidate.js +1 -15
- package/dist/sdk/models/operations/getatscompany.d.ts +0 -3
- package/dist/sdk/models/operations/getatscompany.js +1 -15
- package/dist/sdk/models/operations/getatsdocument.d.ts +0 -3
- package/dist/sdk/models/operations/getatsdocument.js +1 -15
- package/dist/sdk/models/operations/getatsinterview.d.ts +0 -3
- package/dist/sdk/models/operations/getatsinterview.js +1 -15
- package/dist/sdk/models/operations/getatsjob.d.ts +0 -3
- package/dist/sdk/models/operations/getatsjob.js +1 -15
- package/dist/sdk/models/operations/getatsscorecard.d.ts +0 -3
- package/dist/sdk/models/operations/getatsscorecard.js +1 -15
- package/dist/sdk/models/operations/getcommercecollection.d.ts +0 -3
- package/dist/sdk/models/operations/getcommercecollection.js +1 -15
- package/dist/sdk/models/operations/getcommerceinventory.d.ts +0 -3
- package/dist/sdk/models/operations/getcommerceinventory.js +1 -15
- package/dist/sdk/models/operations/getcommerceitem.d.ts +0 -3
- package/dist/sdk/models/operations/getcommerceitem.js +1 -15
- package/dist/sdk/models/operations/getcommercelocation.d.ts +0 -3
- package/dist/sdk/models/operations/getcommercelocation.js +1 -15
- package/dist/sdk/models/operations/getcrmcompany.d.ts +0 -3
- package/dist/sdk/models/operations/getcrmcompany.js +1 -15
- package/dist/sdk/models/operations/getcrmcontact.d.ts +0 -3
- package/dist/sdk/models/operations/getcrmcontact.js +1 -15
- package/dist/sdk/models/operations/getcrmdeal.d.ts +0 -3
- package/dist/sdk/models/operations/getcrmdeal.js +1 -15
- package/dist/sdk/models/operations/getcrmevent.d.ts +0 -3
- package/dist/sdk/models/operations/getcrmevent.js +1 -15
- package/dist/sdk/models/operations/getcrmlead.d.ts +0 -3
- package/dist/sdk/models/operations/getcrmlead.js +1 -15
- package/dist/sdk/models/operations/getcrmpipeline.d.ts +0 -3
- package/dist/sdk/models/operations/getcrmpipeline.js +1 -15
- package/dist/sdk/models/operations/gethrisemployee.d.ts +0 -3
- package/dist/sdk/models/operations/gethrisemployee.js +1 -15
- package/dist/sdk/models/operations/gethrisgroup.d.ts +0 -3
- package/dist/sdk/models/operations/gethrisgroup.js +1 -15
- package/dist/sdk/models/operations/getmartechlist.d.ts +0 -3
- package/dist/sdk/models/operations/getmartechlist.js +1 -15
- package/dist/sdk/models/operations/getmartechmember.d.ts +0 -3
- package/dist/sdk/models/operations/getmartechmember.js +1 -15
- package/dist/sdk/models/operations/getpaymentlink.d.ts +35 -0
- package/dist/sdk/models/operations/getpaymentlink.js +99 -0
- package/dist/sdk/models/operations/{getaccountingpayment.d.ts → getpaymentpayment.d.ts} +6 -9
- package/dist/sdk/models/operations/{getaccountingpayment.js → getpaymentpayment.js} +20 -34
- package/dist/sdk/models/operations/{getaccountingpayout.d.ts → getpaymentpayout.d.ts} +6 -9
- package/dist/sdk/models/operations/{getaccountingpayout.js → getpaymentpayout.js} +20 -34
- package/dist/sdk/models/operations/{getaccountingrefund.d.ts → getpaymentrefund.d.ts} +6 -9
- package/dist/sdk/models/operations/{getaccountingrefund.js → getpaymentrefund.js} +20 -34
- package/dist/sdk/models/operations/getstoragefile.d.ts +0 -3
- package/dist/sdk/models/operations/getstoragefile.js +1 -15
- package/dist/sdk/models/operations/getticketingcustomer.d.ts +0 -3
- package/dist/sdk/models/operations/getticketingcustomer.js +1 -15
- package/dist/sdk/models/operations/getticketingnote.d.ts +0 -3
- package/dist/sdk/models/operations/getticketingnote.js +1 -15
- package/dist/sdk/models/operations/getticketingticket.d.ts +0 -3
- package/dist/sdk/models/operations/getticketingticket.js +1 -15
- package/dist/sdk/models/operations/getuccontact.d.ts +0 -3
- package/dist/sdk/models/operations/getuccontact.js +1 -15
- package/dist/sdk/models/operations/getunifiedapicall.d.ts +0 -3
- package/dist/sdk/models/operations/getunifiedapicall.js +1 -15
- package/dist/sdk/models/operations/getunifiedconnection.d.ts +0 -3
- package/dist/sdk/models/operations/getunifiedconnection.js +1 -15
- package/dist/sdk/models/operations/getunifiedintegrationauth.d.ts +6 -4
- package/dist/sdk/models/operations/getunifiedintegrationauth.js +6 -4
- package/dist/sdk/models/operations/getunifiedwebhook.d.ts +0 -3
- package/dist/sdk/models/operations/getunifiedwebhook.js +1 -15
- package/dist/sdk/models/operations/index.d.ts +16 -10
- package/dist/sdk/models/operations/index.js +16 -10
- package/dist/sdk/models/operations/listaccountingaccounts.d.ts +0 -3
- package/dist/sdk/models/operations/listaccountingaccounts.js +1 -15
- package/dist/sdk/models/operations/listaccountingcontacts.d.ts +0 -3
- package/dist/sdk/models/operations/listaccountingcontacts.js +1 -15
- package/dist/sdk/models/operations/listaccountinginvoices.d.ts +0 -3
- package/dist/sdk/models/operations/listaccountinginvoices.js +1 -15
- package/dist/sdk/models/operations/listaccountingorganizations.d.ts +0 -3
- package/dist/sdk/models/operations/listaccountingorganizations.js +1 -15
- package/dist/sdk/models/operations/listaccountingtaxrates.d.ts +0 -3
- package/dist/sdk/models/operations/listaccountingtaxrates.js +1 -15
- package/dist/sdk/models/operations/listaccountingtransactions.d.ts +0 -3
- package/dist/sdk/models/operations/listaccountingtransactions.js +1 -15
- package/dist/sdk/models/operations/listatsactivities.d.ts +0 -3
- package/dist/sdk/models/operations/listatsactivities.js +1 -15
- package/dist/sdk/models/operations/listatsapplications.d.ts +0 -3
- package/dist/sdk/models/operations/listatsapplications.js +1 -15
- package/dist/sdk/models/operations/listatsapplicationstatuses.d.ts +0 -3
- package/dist/sdk/models/operations/listatsapplicationstatuses.js +1 -15
- package/dist/sdk/models/operations/listatscandidates.d.ts +0 -3
- package/dist/sdk/models/operations/listatscandidates.js +1 -15
- package/dist/sdk/models/operations/listatscompanies.d.ts +0 -3
- package/dist/sdk/models/operations/listatscompanies.js +1 -15
- package/dist/sdk/models/operations/listatsdocuments.d.ts +0 -3
- package/dist/sdk/models/operations/listatsdocuments.js +1 -15
- package/dist/sdk/models/operations/listatsinterviews.d.ts +0 -3
- package/dist/sdk/models/operations/listatsinterviews.js +1 -15
- package/dist/sdk/models/operations/listatsjobs.d.ts +0 -3
- package/dist/sdk/models/operations/listatsjobs.js +1 -15
- package/dist/sdk/models/operations/listatsscorecards.d.ts +0 -3
- package/dist/sdk/models/operations/listatsscorecards.js +1 -15
- package/dist/sdk/models/operations/listcommercecollections.d.ts +0 -3
- package/dist/sdk/models/operations/listcommercecollections.js +1 -15
- package/dist/sdk/models/operations/listcommerceinventories.d.ts +0 -3
- package/dist/sdk/models/operations/listcommerceinventories.js +1 -15
- package/dist/sdk/models/operations/listcommerceitems.d.ts +0 -3
- package/dist/sdk/models/operations/listcommerceitems.js +1 -15
- package/dist/sdk/models/operations/listcommercelocations.d.ts +0 -3
- package/dist/sdk/models/operations/listcommercelocations.js +1 -15
- package/dist/sdk/models/operations/listcrmcompanies.d.ts +0 -3
- package/dist/sdk/models/operations/listcrmcompanies.js +1 -15
- package/dist/sdk/models/operations/listcrmcontacts.d.ts +0 -3
- package/dist/sdk/models/operations/listcrmcontacts.js +1 -15
- package/dist/sdk/models/operations/listcrmdeals.d.ts +0 -3
- package/dist/sdk/models/operations/listcrmdeals.js +1 -15
- package/dist/sdk/models/operations/listcrmevents.d.ts +0 -3
- package/dist/sdk/models/operations/listcrmevents.js +1 -15
- package/dist/sdk/models/operations/listcrmleads.d.ts +0 -3
- package/dist/sdk/models/operations/listcrmleads.js +1 -15
- package/dist/sdk/models/operations/listcrmpipelines.d.ts +0 -3
- package/dist/sdk/models/operations/listcrmpipelines.js +1 -15
- package/dist/sdk/models/operations/listenrichcompanies.d.ts +0 -3
- package/dist/sdk/models/operations/listenrichcompanies.js +1 -15
- package/dist/sdk/models/operations/listenrichpeople.d.ts +0 -3
- package/dist/sdk/models/operations/listenrichpeople.js +1 -15
- package/dist/sdk/models/operations/listhrisemployees.d.ts +0 -3
- package/dist/sdk/models/operations/listhrisemployees.js +1 -15
- package/dist/sdk/models/operations/listhrisgroups.d.ts +0 -3
- package/dist/sdk/models/operations/listhrisgroups.js +1 -15
- package/dist/sdk/models/operations/listmartechlists.d.ts +0 -3
- package/dist/sdk/models/operations/listmartechlists.js +1 -15
- package/dist/sdk/models/operations/listmartechmembers.d.ts +0 -3
- package/dist/sdk/models/operations/listmartechmembers.js +1 -15
- package/dist/sdk/models/operations/listpassthroughs.d.ts +0 -3
- package/dist/sdk/models/operations/listpassthroughs.js +1 -15
- package/dist/sdk/models/operations/{listaccountingrefunds.d.ts → listpaymentlinks.d.ts} +10 -9
- package/dist/sdk/models/operations/{listaccountingrefunds.js → listpaymentlinks.js} +30 -40
- package/dist/sdk/models/operations/{listaccountingpayments.d.ts → listpaymentpayments.d.ts} +6 -9
- package/dist/sdk/models/operations/{listaccountingpayments.js → listpaymentpayments.js} +28 -42
- package/dist/sdk/models/operations/{listaccountingpayouts.d.ts → listpaymentpayouts.d.ts} +6 -9
- package/dist/sdk/models/operations/listpaymentpayouts.js +119 -0
- package/dist/sdk/models/operations/listpaymentrefunds.d.ts +47 -0
- package/dist/sdk/models/operations/{listaccountingpayouts.js → listpaymentrefunds.js} +30 -40
- package/dist/sdk/models/operations/liststoragefiles.d.ts +0 -3
- package/dist/sdk/models/operations/liststoragefiles.js +1 -15
- package/dist/sdk/models/operations/listticketingcustomers.d.ts +0 -3
- package/dist/sdk/models/operations/listticketingcustomers.js +1 -15
- package/dist/sdk/models/operations/listticketingnotes.d.ts +0 -3
- package/dist/sdk/models/operations/listticketingnotes.js +1 -15
- package/dist/sdk/models/operations/listticketingtickets.d.ts +0 -3
- package/dist/sdk/models/operations/listticketingtickets.js +1 -15
- package/dist/sdk/models/operations/listuccalls.d.ts +0 -3
- package/dist/sdk/models/operations/listuccalls.js +1 -15
- package/dist/sdk/models/operations/listuccontacts.d.ts +0 -3
- package/dist/sdk/models/operations/listuccontacts.js +1 -15
- package/dist/sdk/models/operations/listunifiedapicalls.d.ts +0 -3
- package/dist/sdk/models/operations/listunifiedapicalls.js +1 -15
- package/dist/sdk/models/operations/listunifiedconnections.d.ts +2 -4
- package/dist/sdk/models/operations/listunifiedconnections.js +2 -15
- package/dist/sdk/models/operations/listunifiedintegrations.d.ts +2 -4
- package/dist/sdk/models/operations/listunifiedintegrations.js +2 -15
- package/dist/sdk/models/operations/listunifiedintegrationworkspaces.d.ts +2 -1
- package/dist/sdk/models/operations/listunifiedintegrationworkspaces.js +1 -0
- package/dist/sdk/models/operations/listunifiedissues.d.ts +0 -3
- package/dist/sdk/models/operations/listunifiedissues.js +1 -15
- package/dist/sdk/models/operations/listunifiedwebhooks.d.ts +0 -3
- package/dist/sdk/models/operations/listunifiedwebhooks.js +1 -15
- package/dist/sdk/models/operations/patchaccountingaccount.d.ts +0 -3
- package/dist/sdk/models/operations/patchaccountingaccount.js +1 -15
- package/dist/sdk/models/operations/patchaccountingcontact.d.ts +0 -3
- package/dist/sdk/models/operations/patchaccountingcontact.js +1 -15
- package/dist/sdk/models/operations/patchaccountinginvoice.d.ts +0 -3
- package/dist/sdk/models/operations/patchaccountinginvoice.js +1 -15
- package/dist/sdk/models/operations/patchaccountingtaxrate.d.ts +0 -3
- package/dist/sdk/models/operations/patchaccountingtaxrate.js +1 -15
- package/dist/sdk/models/operations/patchaccountingtransaction.d.ts +0 -3
- package/dist/sdk/models/operations/patchaccountingtransaction.js +1 -15
- package/dist/sdk/models/operations/patchatsactivity.d.ts +0 -3
- package/dist/sdk/models/operations/patchatsactivity.js +1 -15
- package/dist/sdk/models/operations/patchatsapplication.d.ts +0 -3
- package/dist/sdk/models/operations/patchatsapplication.js +1 -15
- package/dist/sdk/models/operations/patchatscandidate.d.ts +0 -3
- package/dist/sdk/models/operations/patchatscandidate.js +1 -15
- package/dist/sdk/models/operations/patchatsdocument.d.ts +0 -3
- package/dist/sdk/models/operations/patchatsdocument.js +1 -15
- package/dist/sdk/models/operations/patchatsinterview.d.ts +0 -3
- package/dist/sdk/models/operations/patchatsinterview.js +1 -15
- package/dist/sdk/models/operations/patchatsjob.d.ts +0 -3
- package/dist/sdk/models/operations/patchatsjob.js +1 -15
- package/dist/sdk/models/operations/patchatsscorecard.d.ts +0 -3
- package/dist/sdk/models/operations/patchatsscorecard.js +1 -15
- package/dist/sdk/models/operations/patchcommercecollection.d.ts +0 -3
- package/dist/sdk/models/operations/patchcommercecollection.js +1 -15
- package/dist/sdk/models/operations/patchcommerceinventory.d.ts +0 -3
- package/dist/sdk/models/operations/patchcommerceinventory.js +1 -15
- package/dist/sdk/models/operations/patchcommerceitem.d.ts +0 -3
- package/dist/sdk/models/operations/patchcommerceitem.js +1 -15
- package/dist/sdk/models/operations/patchcommercelocation.d.ts +0 -3
- package/dist/sdk/models/operations/patchcommercelocation.js +1 -15
- package/dist/sdk/models/operations/patchcrmcompany.d.ts +0 -3
- package/dist/sdk/models/operations/patchcrmcompany.js +1 -15
- package/dist/sdk/models/operations/patchcrmcontact.d.ts +0 -3
- package/dist/sdk/models/operations/patchcrmcontact.js +1 -15
- package/dist/sdk/models/operations/patchcrmdeal.d.ts +0 -3
- package/dist/sdk/models/operations/patchcrmdeal.js +1 -15
- package/dist/sdk/models/operations/patchcrmevent.d.ts +0 -3
- package/dist/sdk/models/operations/patchcrmevent.js +1 -15
- package/dist/sdk/models/operations/patchcrmlead.d.ts +0 -3
- package/dist/sdk/models/operations/patchcrmlead.js +1 -15
- package/dist/sdk/models/operations/patchcrmpipeline.d.ts +0 -3
- package/dist/sdk/models/operations/patchcrmpipeline.js +1 -15
- package/dist/sdk/models/operations/patchhrisemployee.d.ts +0 -3
- package/dist/sdk/models/operations/patchhrisemployee.js +1 -15
- package/dist/sdk/models/operations/patchhrisgroup.d.ts +0 -3
- package/dist/sdk/models/operations/patchhrisgroup.js +1 -15
- package/dist/sdk/models/operations/patchmartechlist.d.ts +0 -3
- package/dist/sdk/models/operations/patchmartechlist.js +1 -15
- package/dist/sdk/models/operations/patchmartechmember.d.ts +0 -3
- package/dist/sdk/models/operations/patchmartechmember.js +1 -15
- package/dist/sdk/models/operations/patchpassthrough.d.ts +0 -3
- package/dist/sdk/models/operations/patchpassthrough.js +1 -15
- package/dist/sdk/models/operations/patchpaymentlink.d.ts +32 -0
- package/dist/sdk/models/operations/{updateaccountingpayment.js → patchpaymentlink.js} +21 -35
- package/dist/sdk/models/operations/{patchaccountingpayment.d.ts → patchpaymentpayment.d.ts} +7 -10
- package/dist/sdk/models/operations/{patchaccountingpayment.js → patchpaymentpayment.js} +21 -35
- package/dist/sdk/models/operations/patchstoragefile.d.ts +0 -3
- package/dist/sdk/models/operations/patchstoragefile.js +1 -15
- package/dist/sdk/models/operations/patchticketingcustomer.d.ts +0 -3
- package/dist/sdk/models/operations/patchticketingcustomer.js +1 -15
- package/dist/sdk/models/operations/patchticketingnote.d.ts +0 -3
- package/dist/sdk/models/operations/patchticketingnote.js +1 -15
- package/dist/sdk/models/operations/patchticketingticket.d.ts +0 -3
- package/dist/sdk/models/operations/patchticketingticket.js +1 -15
- package/dist/sdk/models/operations/patchuccontact.d.ts +0 -3
- package/dist/sdk/models/operations/patchuccontact.js +1 -15
- package/dist/sdk/models/operations/patchunifiedconnection.d.ts +0 -3
- package/dist/sdk/models/operations/patchunifiedconnection.js +1 -15
- package/dist/sdk/models/operations/patchunifiedwebhooktrigger.d.ts +0 -3
- package/dist/sdk/models/operations/patchunifiedwebhooktrigger.js +1 -15
- package/dist/sdk/models/operations/removeaccountingaccount.d.ts +0 -3
- package/dist/sdk/models/operations/removeaccountingaccount.js +1 -15
- package/dist/sdk/models/operations/removeaccountingcontact.d.ts +0 -3
- package/dist/sdk/models/operations/removeaccountingcontact.js +1 -15
- package/dist/sdk/models/operations/removeaccountinginvoice.d.ts +0 -3
- package/dist/sdk/models/operations/removeaccountinginvoice.js +1 -15
- package/dist/sdk/models/operations/removeaccountingtaxrate.d.ts +0 -3
- package/dist/sdk/models/operations/removeaccountingtaxrate.js +1 -15
- package/dist/sdk/models/operations/removeaccountingtransaction.d.ts +0 -3
- package/dist/sdk/models/operations/removeaccountingtransaction.js +1 -15
- package/dist/sdk/models/operations/removeatsactivity.d.ts +0 -3
- package/dist/sdk/models/operations/removeatsactivity.js +1 -15
- package/dist/sdk/models/operations/removeatsapplication.d.ts +0 -3
- package/dist/sdk/models/operations/removeatsapplication.js +1 -15
- package/dist/sdk/models/operations/removeatscandidate.d.ts +0 -3
- package/dist/sdk/models/operations/removeatscandidate.js +1 -15
- package/dist/sdk/models/operations/removeatsdocument.d.ts +0 -3
- package/dist/sdk/models/operations/removeatsdocument.js +1 -15
- package/dist/sdk/models/operations/removeatsinterview.d.ts +0 -3
- package/dist/sdk/models/operations/removeatsinterview.js +1 -15
- package/dist/sdk/models/operations/removeatsjob.d.ts +0 -3
- package/dist/sdk/models/operations/removeatsjob.js +1 -15
- package/dist/sdk/models/operations/removeatsscorecard.d.ts +0 -3
- package/dist/sdk/models/operations/removeatsscorecard.js +1 -15
- package/dist/sdk/models/operations/removecommercecollection.d.ts +0 -3
- package/dist/sdk/models/operations/removecommercecollection.js +1 -15
- package/dist/sdk/models/operations/removecommerceinventory.d.ts +0 -3
- package/dist/sdk/models/operations/removecommerceinventory.js +1 -15
- package/dist/sdk/models/operations/removecommerceitem.d.ts +0 -3
- package/dist/sdk/models/operations/removecommerceitem.js +1 -15
- package/dist/sdk/models/operations/removecommercelocation.d.ts +0 -3
- package/dist/sdk/models/operations/removecommercelocation.js +1 -15
- package/dist/sdk/models/operations/removecrmcompany.d.ts +0 -3
- package/dist/sdk/models/operations/removecrmcompany.js +1 -15
- package/dist/sdk/models/operations/removecrmcontact.d.ts +0 -3
- package/dist/sdk/models/operations/removecrmcontact.js +1 -15
- package/dist/sdk/models/operations/removecrmdeal.d.ts +0 -3
- package/dist/sdk/models/operations/removecrmdeal.js +1 -15
- package/dist/sdk/models/operations/removecrmevent.d.ts +0 -3
- package/dist/sdk/models/operations/removecrmevent.js +1 -15
- package/dist/sdk/models/operations/removecrmlead.d.ts +0 -3
- package/dist/sdk/models/operations/removecrmlead.js +1 -15
- package/dist/sdk/models/operations/removecrmpipeline.d.ts +0 -3
- package/dist/sdk/models/operations/removecrmpipeline.js +1 -15
- package/dist/sdk/models/operations/removehrisemployee.d.ts +0 -3
- package/dist/sdk/models/operations/removehrisemployee.js +1 -15
- package/dist/sdk/models/operations/removehrisgroup.d.ts +0 -3
- package/dist/sdk/models/operations/removehrisgroup.js +1 -15
- package/dist/sdk/models/operations/removemartechlist.d.ts +0 -3
- package/dist/sdk/models/operations/removemartechlist.js +1 -15
- package/dist/sdk/models/operations/removemartechmember.d.ts +0 -3
- package/dist/sdk/models/operations/removemartechmember.js +1 -15
- package/dist/sdk/models/operations/removepassthrough.d.ts +0 -3
- package/dist/sdk/models/operations/removepassthrough.js +1 -15
- package/dist/sdk/models/operations/removepaymentlink.d.ts +30 -0
- package/dist/sdk/models/operations/{removeaccountingpayment.js → removepaymentlink.js} +17 -31
- package/dist/sdk/models/operations/{removeaccountingpayment.d.ts → removepaymentpayment.d.ts} +2 -5
- package/dist/sdk/models/operations/removepaymentpayment.js +71 -0
- package/dist/sdk/models/operations/removestoragefile.d.ts +0 -3
- package/dist/sdk/models/operations/removestoragefile.js +1 -15
- package/dist/sdk/models/operations/removeticketingcustomer.d.ts +0 -3
- package/dist/sdk/models/operations/removeticketingcustomer.js +1 -15
- package/dist/sdk/models/operations/removeticketingnote.d.ts +0 -3
- package/dist/sdk/models/operations/removeticketingnote.js +1 -15
- package/dist/sdk/models/operations/removeticketingticket.d.ts +0 -3
- package/dist/sdk/models/operations/removeticketingticket.js +1 -15
- package/dist/sdk/models/operations/removeuccontact.d.ts +0 -3
- package/dist/sdk/models/operations/removeuccontact.js +1 -15
- package/dist/sdk/models/operations/removeunifiedconnection.d.ts +0 -3
- package/dist/sdk/models/operations/removeunifiedconnection.js +1 -15
- package/dist/sdk/models/operations/removeunifiedwebhook.d.ts +0 -3
- package/dist/sdk/models/operations/removeunifiedwebhook.js +1 -15
- package/dist/sdk/models/operations/updateaccountingaccount.d.ts +0 -3
- package/dist/sdk/models/operations/updateaccountingaccount.js +1 -15
- package/dist/sdk/models/operations/updateaccountingcontact.d.ts +0 -3
- package/dist/sdk/models/operations/updateaccountingcontact.js +1 -15
- package/dist/sdk/models/operations/updateaccountinginvoice.d.ts +0 -3
- package/dist/sdk/models/operations/updateaccountinginvoice.js +1 -15
- package/dist/sdk/models/operations/updateaccountingtaxrate.d.ts +0 -3
- package/dist/sdk/models/operations/updateaccountingtaxrate.js +1 -15
- package/dist/sdk/models/operations/updateaccountingtransaction.d.ts +0 -3
- package/dist/sdk/models/operations/updateaccountingtransaction.js +1 -15
- package/dist/sdk/models/operations/updateatsactivity.d.ts +0 -3
- package/dist/sdk/models/operations/updateatsactivity.js +1 -15
- package/dist/sdk/models/operations/updateatsapplication.d.ts +0 -3
- package/dist/sdk/models/operations/updateatsapplication.js +1 -15
- package/dist/sdk/models/operations/updateatscandidate.d.ts +0 -3
- package/dist/sdk/models/operations/updateatscandidate.js +1 -15
- package/dist/sdk/models/operations/updateatsdocument.d.ts +0 -3
- package/dist/sdk/models/operations/updateatsdocument.js +1 -15
- package/dist/sdk/models/operations/updateatsinterview.d.ts +0 -3
- package/dist/sdk/models/operations/updateatsinterview.js +1 -15
- package/dist/sdk/models/operations/updateatsjob.d.ts +0 -3
- package/dist/sdk/models/operations/updateatsjob.js +1 -15
- package/dist/sdk/models/operations/updateatsscorecard.d.ts +0 -3
- package/dist/sdk/models/operations/updateatsscorecard.js +1 -15
- package/dist/sdk/models/operations/updatecommercecollection.d.ts +0 -3
- package/dist/sdk/models/operations/updatecommercecollection.js +1 -15
- package/dist/sdk/models/operations/updatecommerceinventory.d.ts +0 -3
- package/dist/sdk/models/operations/updatecommerceinventory.js +1 -15
- package/dist/sdk/models/operations/updatecommerceitem.d.ts +0 -3
- package/dist/sdk/models/operations/updatecommerceitem.js +1 -15
- package/dist/sdk/models/operations/updatecommercelocation.d.ts +0 -3
- package/dist/sdk/models/operations/updatecommercelocation.js +1 -15
- package/dist/sdk/models/operations/updatecrmcompany.d.ts +0 -3
- package/dist/sdk/models/operations/updatecrmcompany.js +1 -15
- package/dist/sdk/models/operations/updatecrmcontact.d.ts +0 -3
- package/dist/sdk/models/operations/updatecrmcontact.js +1 -15
- package/dist/sdk/models/operations/updatecrmdeal.d.ts +0 -3
- package/dist/sdk/models/operations/updatecrmdeal.js +1 -15
- package/dist/sdk/models/operations/updatecrmevent.d.ts +0 -3
- package/dist/sdk/models/operations/updatecrmevent.js +1 -15
- package/dist/sdk/models/operations/updatecrmlead.d.ts +0 -3
- package/dist/sdk/models/operations/updatecrmlead.js +1 -15
- package/dist/sdk/models/operations/updatecrmpipeline.d.ts +0 -3
- package/dist/sdk/models/operations/updatecrmpipeline.js +1 -15
- package/dist/sdk/models/operations/updatehrisemployee.d.ts +0 -3
- package/dist/sdk/models/operations/updatehrisemployee.js +1 -15
- package/dist/sdk/models/operations/updatehrisgroup.d.ts +0 -3
- package/dist/sdk/models/operations/updatehrisgroup.js +1 -15
- package/dist/sdk/models/operations/updatemartechlist.d.ts +0 -3
- package/dist/sdk/models/operations/updatemartechlist.js +1 -15
- package/dist/sdk/models/operations/updatemartechmember.d.ts +0 -3
- package/dist/sdk/models/operations/updatemartechmember.js +1 -15
- package/dist/sdk/models/operations/updatepassthrough.d.ts +0 -3
- package/dist/sdk/models/operations/updatepassthrough.js +1 -15
- package/dist/sdk/models/operations/updatepaymentlink.d.ts +32 -0
- package/dist/sdk/models/operations/updatepaymentlink.js +99 -0
- package/dist/sdk/models/operations/{updateaccountingpayment.d.ts → updatepaymentpayment.d.ts} +7 -10
- package/dist/sdk/models/operations/{createaccountingpayment.js → updatepaymentpayment.js} +24 -34
- package/dist/sdk/models/operations/updatestoragefile.d.ts +0 -3
- package/dist/sdk/models/operations/updatestoragefile.js +1 -15
- package/dist/sdk/models/operations/updateticketingcustomer.d.ts +0 -3
- package/dist/sdk/models/operations/updateticketingcustomer.js +1 -15
- package/dist/sdk/models/operations/updateticketingnote.d.ts +0 -3
- package/dist/sdk/models/operations/updateticketingnote.js +1 -15
- package/dist/sdk/models/operations/updateticketingticket.d.ts +0 -3
- package/dist/sdk/models/operations/updateticketingticket.js +1 -15
- package/dist/sdk/models/operations/updateuccontact.d.ts +0 -3
- package/dist/sdk/models/operations/updateuccontact.js +1 -15
- package/dist/sdk/models/operations/updateunifiedconnection.d.ts +0 -3
- package/dist/sdk/models/operations/updateunifiedconnection.js +1 -15
- package/dist/sdk/models/operations/updateunifiedwebhooktrigger.d.ts +0 -3
- package/dist/sdk/models/operations/updateunifiedwebhooktrigger.js +1 -15
- package/dist/sdk/models/shared/index.d.ts +6 -3
- package/dist/sdk/models/shared/index.js +6 -3
- package/dist/sdk/models/shared/paymenntlinklineitem.d.ts +20 -0
- package/dist/sdk/models/shared/paymenntlinklineitem.js +137 -0
- package/dist/sdk/models/shared/paymentlink.d.ts +15 -0
- package/dist/sdk/models/shared/paymentlink.js +105 -0
- package/dist/sdk/models/shared/{accountingpayment.d.ts → paymentpayment.d.ts} +1 -1
- package/dist/sdk/models/shared/{accountingpayment.js → paymentpayment.js} +18 -18
- package/dist/sdk/models/shared/{accountingpayout.d.ts → paymentpayout.d.ts} +3 -3
- package/dist/sdk/models/shared/{accountingpayout.js → paymentpayout.js} +21 -21
- package/dist/sdk/models/shared/{accountingrefund.d.ts → paymentrefund.d.ts} +3 -3
- package/dist/sdk/models/shared/{accountingrefund.js → paymentrefund.js} +23 -23
- package/dist/sdk/models/shared/propertyconnectioncategories.d.ts +2 -1
- package/dist/sdk/models/shared/propertyconnectioncategories.js +1 -0
- package/dist/sdk/models/shared/propertyconnectionpermissions.d.ts +6 -4
- package/dist/sdk/models/shared/propertyconnectionpermissions.js +6 -4
- package/dist/sdk/models/shared/propertyintegrationcategories.d.ts +2 -1
- package/dist/sdk/models/shared/propertyintegrationcategories.js +1 -0
- package/dist/sdk/models/shared/security.d.ts +4 -0
- package/dist/sdk/models/shared/security.js +45 -0
- package/dist/sdk/models/shared/webhook.d.ts +4 -3
- package/dist/sdk/models/shared/webhook.js +4 -3
- package/dist/sdk/note.d.ts +6 -6
- package/dist/sdk/note.js +78 -36
- package/dist/sdk/organization.d.ts +2 -2
- package/dist/sdk/organization.js +26 -12
- package/dist/sdk/passthrough.d.ts +5 -5
- package/dist/sdk/passthrough.js +66 -30
- package/dist/sdk/payment.d.ts +46 -6
- package/dist/sdk/payment.js +755 -61
- package/dist/sdk/payout.d.ts +2 -2
- package/dist/sdk/payout.js +35 -21
- package/dist/sdk/person.d.ts +1 -1
- package/dist/sdk/person.js +13 -6
- package/dist/sdk/pipeline.d.ts +6 -6
- package/dist/sdk/pipeline.js +78 -36
- package/dist/sdk/refund.d.ts +2 -2
- package/dist/sdk/refund.js +35 -21
- package/dist/sdk/scorecard.d.ts +6 -6
- package/dist/sdk/scorecard.js +78 -36
- package/dist/sdk/sdk.d.ts +11 -3
- package/dist/sdk/sdk.js +9 -6
- package/dist/sdk/storage.d.ts +6 -6
- package/dist/sdk/storage.js +78 -36
- package/dist/sdk/taxrate.d.ts +6 -6
- package/dist/sdk/taxrate.js +78 -36
- package/dist/sdk/ticket.d.ts +6 -6
- package/dist/sdk/ticket.js +78 -36
- package/dist/sdk/ticketing.d.ts +18 -18
- package/dist/sdk/ticketing.js +234 -108
- package/dist/sdk/transaction.d.ts +6 -6
- package/dist/sdk/transaction.js +78 -36
- package/dist/sdk/uc.d.ts +7 -7
- package/dist/sdk/uc.js +91 -42
- package/dist/sdk/unified.d.ts +16 -16
- package/dist/sdk/unified.js +236 -102
- package/dist/sdk/webhook.d.ts +6 -6
- package/dist/sdk/webhook.js +78 -36
- package/docs/sdk/models/operations/categories.md +2 -1
- package/docs/sdk/models/operations/createpaymentlinkrequest.md +9 -0
- package/docs/sdk/models/operations/createpaymentlinkresponse.md +11 -0
- package/docs/sdk/models/operations/createpaymentpaymentrequest.md +9 -0
- package/docs/sdk/models/operations/createpaymentpaymentresponse.md +11 -0
- package/docs/sdk/models/operations/getpaymentlinkrequest.md +10 -0
- package/docs/sdk/models/operations/getpaymentlinkresponse.md +11 -0
- package/docs/sdk/models/operations/{getaccountingpaymentrequest.md → getpaymentpaymentrequest.md} +1 -1
- package/docs/sdk/models/operations/getpaymentpaymentresponse.md +11 -0
- package/docs/sdk/models/operations/{getaccountingpayoutrequest.md → getpaymentpayoutrequest.md} +1 -1
- package/docs/sdk/models/operations/getpaymentpayoutresponse.md +11 -0
- package/docs/sdk/models/operations/{getaccountingrefundrequest.md → getpaymentrefundrequest.md} +1 -1
- package/docs/sdk/models/operations/getpaymentrefundresponse.md +11 -0
- package/docs/sdk/models/operations/listpaymentlinksrequest.md +17 -0
- package/docs/sdk/models/operations/listpaymentlinksresponse.md +11 -0
- package/docs/sdk/models/operations/{listaccountingpaymentsrequest.md → listpaymentpaymentsrequest.md} +1 -1
- package/docs/sdk/models/operations/listpaymentpaymentsresponse.md +11 -0
- package/docs/sdk/models/operations/{listaccountingpayoutsrequest.md → listpaymentpayoutsrequest.md} +1 -1
- package/docs/sdk/models/operations/listpaymentpayoutsresponse.md +11 -0
- package/docs/sdk/models/operations/{listaccountingrefundsrequest.md → listpaymentrefundsrequest.md} +1 -1
- package/docs/sdk/models/operations/listpaymentrefundsresponse.md +11 -0
- package/docs/sdk/models/operations/listunifiedintegrationsqueryparamcategories.md +2 -1
- package/docs/sdk/models/operations/patchpaymentlinkrequest.md +10 -0
- package/docs/sdk/models/operations/patchpaymentlinkresponse.md +11 -0
- package/docs/sdk/models/operations/patchpaymentpaymentrequest.md +10 -0
- package/docs/sdk/models/operations/patchpaymentpaymentresponse.md +11 -0
- package/docs/sdk/models/operations/queryparamcategories.md +2 -1
- package/docs/sdk/models/operations/{removeaccountingpaymentrequest.md → removepaymentlinkrequest.md} +2 -2
- package/docs/sdk/models/operations/{removeaccountingpaymentresponse.md → removepaymentlinkresponse.md} +1 -1
- package/docs/sdk/models/operations/removepaymentpaymentrequest.md +9 -0
- package/docs/sdk/models/operations/removepaymentpaymentresponse.md +11 -0
- package/docs/sdk/models/operations/scopes.md +6 -4
- package/docs/sdk/models/operations/updatepaymentlinkrequest.md +10 -0
- package/docs/sdk/models/operations/updatepaymentlinkresponse.md +11 -0
- package/docs/sdk/models/operations/updatepaymentpaymentrequest.md +10 -0
- package/docs/sdk/models/operations/updatepaymentpaymentresponse.md +11 -0
- package/docs/sdk/models/shared/objecttype.md +4 -3
- package/docs/sdk/models/shared/paymenntlinklineitem.md +24 -0
- package/docs/sdk/models/shared/paymentlink.md +18 -0
- package/docs/sdk/models/shared/{accountingpayment.md → paymentpayment.md} +1 -1
- package/docs/sdk/models/shared/paymentpayout.md +15 -0
- package/docs/sdk/models/shared/{accountingrefundstatus.md → paymentpayoutstatus.md} +1 -1
- package/docs/sdk/models/shared/paymentrefund.md +17 -0
- package/docs/sdk/models/shared/{accountingpayoutstatus.md → paymentrefundstatus.md} +1 -1
- package/docs/sdk/models/shared/propertyconnectioncategories.md +2 -1
- package/docs/sdk/models/shared/propertyconnectionpermissions.md +6 -4
- package/docs/sdk/models/shared/propertyintegrationcategories.md +2 -1
- package/docs/sdk/models/{operations/getatsjobsecurity.md → shared/security.md} +2 -2
- package/package.json +1 -1
- package/docs/sdk/models/operations/createaccountingaccountsecurity.md +0 -8
- package/docs/sdk/models/operations/createaccountingcontactsecurity.md +0 -8
- package/docs/sdk/models/operations/createaccountinginvoicesecurity.md +0 -8
- package/docs/sdk/models/operations/createaccountingpaymentrequest.md +0 -9
- package/docs/sdk/models/operations/createaccountingpaymentresponse.md +0 -11
- package/docs/sdk/models/operations/createaccountingpaymentsecurity.md +0 -8
- package/docs/sdk/models/operations/createaccountingtaxratesecurity.md +0 -8
- package/docs/sdk/models/operations/createaccountingtransactionsecurity.md +0 -8
- package/docs/sdk/models/operations/createatsactivitysecurity.md +0 -8
- package/docs/sdk/models/operations/createatsapplicationsecurity.md +0 -8
- package/docs/sdk/models/operations/createatscandidatesecurity.md +0 -8
- package/docs/sdk/models/operations/createatsdocumentsecurity.md +0 -8
- package/docs/sdk/models/operations/createatsinterviewsecurity.md +0 -8
- package/docs/sdk/models/operations/createatsjobsecurity.md +0 -8
- package/docs/sdk/models/operations/createatsscorecardsecurity.md +0 -8
- package/docs/sdk/models/operations/createcommercecollectionsecurity.md +0 -8
- package/docs/sdk/models/operations/createcommerceinventorysecurity.md +0 -8
- package/docs/sdk/models/operations/createcommerceitemsecurity.md +0 -8
- package/docs/sdk/models/operations/createcommercelocationsecurity.md +0 -8
- package/docs/sdk/models/operations/createcrmcompanysecurity.md +0 -8
- package/docs/sdk/models/operations/createcrmcontactsecurity.md +0 -8
- package/docs/sdk/models/operations/createcrmdealsecurity.md +0 -8
- package/docs/sdk/models/operations/createcrmeventsecurity.md +0 -8
- package/docs/sdk/models/operations/createcrmleadsecurity.md +0 -8
- package/docs/sdk/models/operations/createcrmpipelinesecurity.md +0 -8
- package/docs/sdk/models/operations/createhrisemployeesecurity.md +0 -8
- package/docs/sdk/models/operations/createhrisgroupsecurity.md +0 -8
- package/docs/sdk/models/operations/createmartechlistsecurity.md +0 -8
- package/docs/sdk/models/operations/createmartechmembersecurity.md +0 -8
- package/docs/sdk/models/operations/createpassthroughsecurity.md +0 -8
- package/docs/sdk/models/operations/createstoragefilesecurity.md +0 -8
- package/docs/sdk/models/operations/createticketingcustomersecurity.md +0 -8
- package/docs/sdk/models/operations/createticketingnotesecurity.md +0 -8
- package/docs/sdk/models/operations/createticketingticketsecurity.md +0 -8
- package/docs/sdk/models/operations/createuccontactsecurity.md +0 -8
- package/docs/sdk/models/operations/createunifiedconnectionsecurity.md +0 -8
- package/docs/sdk/models/operations/createunifiedwebhooksecurity.md +0 -8
- package/docs/sdk/models/operations/getaccountingaccountsecurity.md +0 -8
- package/docs/sdk/models/operations/getaccountingcontactsecurity.md +0 -8
- package/docs/sdk/models/operations/getaccountinginvoicesecurity.md +0 -8
- package/docs/sdk/models/operations/getaccountingorganizationsecurity.md +0 -8
- package/docs/sdk/models/operations/getaccountingpaymentresponse.md +0 -11
- package/docs/sdk/models/operations/getaccountingpaymentsecurity.md +0 -8
- package/docs/sdk/models/operations/getaccountingpayoutresponse.md +0 -11
- package/docs/sdk/models/operations/getaccountingpayoutsecurity.md +0 -8
- package/docs/sdk/models/operations/getaccountingrefundresponse.md +0 -11
- package/docs/sdk/models/operations/getaccountingrefundsecurity.md +0 -8
- package/docs/sdk/models/operations/getaccountingtaxratesecurity.md +0 -8
- package/docs/sdk/models/operations/getaccountingtransactionsecurity.md +0 -8
- package/docs/sdk/models/operations/getatsactivitysecurity.md +0 -8
- package/docs/sdk/models/operations/getatsapplicationsecurity.md +0 -8
- package/docs/sdk/models/operations/getatscandidatesecurity.md +0 -8
- package/docs/sdk/models/operations/getatscompanysecurity.md +0 -8
- package/docs/sdk/models/operations/getatsdocumentsecurity.md +0 -8
- package/docs/sdk/models/operations/getatsinterviewsecurity.md +0 -8
- package/docs/sdk/models/operations/getatsscorecardsecurity.md +0 -8
- package/docs/sdk/models/operations/getcommercecollectionsecurity.md +0 -8
- package/docs/sdk/models/operations/getcommerceinventorysecurity.md +0 -8
- package/docs/sdk/models/operations/getcommerceitemsecurity.md +0 -8
- package/docs/sdk/models/operations/getcommercelocationsecurity.md +0 -8
- package/docs/sdk/models/operations/getcrmcompanysecurity.md +0 -8
- package/docs/sdk/models/operations/getcrmcontactsecurity.md +0 -8
- package/docs/sdk/models/operations/getcrmdealsecurity.md +0 -8
- package/docs/sdk/models/operations/getcrmeventsecurity.md +0 -8
- package/docs/sdk/models/operations/getcrmleadsecurity.md +0 -8
- package/docs/sdk/models/operations/getcrmpipelinesecurity.md +0 -8
- package/docs/sdk/models/operations/gethrisemployeesecurity.md +0 -8
- package/docs/sdk/models/operations/gethrisgroupsecurity.md +0 -8
- package/docs/sdk/models/operations/getmartechlistsecurity.md +0 -8
- package/docs/sdk/models/operations/getmartechmembersecurity.md +0 -8
- package/docs/sdk/models/operations/getstoragefilesecurity.md +0 -8
- package/docs/sdk/models/operations/getticketingcustomersecurity.md +0 -8
- package/docs/sdk/models/operations/getticketingnotesecurity.md +0 -8
- package/docs/sdk/models/operations/getticketingticketsecurity.md +0 -8
- package/docs/sdk/models/operations/getuccontactsecurity.md +0 -8
- package/docs/sdk/models/operations/getunifiedapicallsecurity.md +0 -8
- package/docs/sdk/models/operations/getunifiedconnectionsecurity.md +0 -8
- package/docs/sdk/models/operations/getunifiedwebhooksecurity.md +0 -8
- package/docs/sdk/models/operations/listaccountingaccountssecurity.md +0 -8
- package/docs/sdk/models/operations/listaccountingcontactssecurity.md +0 -8
- package/docs/sdk/models/operations/listaccountinginvoicessecurity.md +0 -8
- package/docs/sdk/models/operations/listaccountingorganizationssecurity.md +0 -8
- package/docs/sdk/models/operations/listaccountingpaymentsresponse.md +0 -11
- package/docs/sdk/models/operations/listaccountingpaymentssecurity.md +0 -8
- package/docs/sdk/models/operations/listaccountingpayoutsresponse.md +0 -11
- package/docs/sdk/models/operations/listaccountingpayoutssecurity.md +0 -8
- package/docs/sdk/models/operations/listaccountingrefundsresponse.md +0 -11
- package/docs/sdk/models/operations/listaccountingrefundssecurity.md +0 -8
- package/docs/sdk/models/operations/listaccountingtaxratessecurity.md +0 -8
- package/docs/sdk/models/operations/listaccountingtransactionssecurity.md +0 -8
- package/docs/sdk/models/operations/listatsactivitiessecurity.md +0 -8
- package/docs/sdk/models/operations/listatsapplicationssecurity.md +0 -8
- package/docs/sdk/models/operations/listatsapplicationstatusessecurity.md +0 -8
- package/docs/sdk/models/operations/listatscandidatessecurity.md +0 -8
- package/docs/sdk/models/operations/listatscompaniessecurity.md +0 -8
- package/docs/sdk/models/operations/listatsdocumentssecurity.md +0 -8
- package/docs/sdk/models/operations/listatsinterviewssecurity.md +0 -8
- package/docs/sdk/models/operations/listatsjobssecurity.md +0 -8
- package/docs/sdk/models/operations/listatsscorecardssecurity.md +0 -8
- package/docs/sdk/models/operations/listcommercecollectionssecurity.md +0 -8
- package/docs/sdk/models/operations/listcommerceinventoriessecurity.md +0 -8
- package/docs/sdk/models/operations/listcommerceitemssecurity.md +0 -8
- package/docs/sdk/models/operations/listcommercelocationssecurity.md +0 -8
- package/docs/sdk/models/operations/listcrmcompaniessecurity.md +0 -8
- package/docs/sdk/models/operations/listcrmcontactssecurity.md +0 -8
- package/docs/sdk/models/operations/listcrmdealssecurity.md +0 -8
- package/docs/sdk/models/operations/listcrmeventssecurity.md +0 -8
- package/docs/sdk/models/operations/listcrmleadssecurity.md +0 -8
- package/docs/sdk/models/operations/listcrmpipelinessecurity.md +0 -8
- package/docs/sdk/models/operations/listenrichcompaniessecurity.md +0 -8
- package/docs/sdk/models/operations/listenrichpeoplesecurity.md +0 -8
- package/docs/sdk/models/operations/listhrisemployeessecurity.md +0 -8
- package/docs/sdk/models/operations/listhrisgroupssecurity.md +0 -8
- package/docs/sdk/models/operations/listmartechlistssecurity.md +0 -8
- package/docs/sdk/models/operations/listmartechmemberssecurity.md +0 -8
- package/docs/sdk/models/operations/listpassthroughssecurity.md +0 -8
- package/docs/sdk/models/operations/liststoragefilessecurity.md +0 -8
- package/docs/sdk/models/operations/listticketingcustomerssecurity.md +0 -8
- package/docs/sdk/models/operations/listticketingnotessecurity.md +0 -8
- package/docs/sdk/models/operations/listticketingticketssecurity.md +0 -8
- package/docs/sdk/models/operations/listuccallssecurity.md +0 -8
- package/docs/sdk/models/operations/listuccontactssecurity.md +0 -8
- package/docs/sdk/models/operations/listunifiedapicallssecurity.md +0 -8
- package/docs/sdk/models/operations/listunifiedconnectionssecurity.md +0 -8
- package/docs/sdk/models/operations/listunifiedintegrationssecurity.md +0 -8
- package/docs/sdk/models/operations/listunifiedissuessecurity.md +0 -8
- package/docs/sdk/models/operations/listunifiedwebhookssecurity.md +0 -8
- package/docs/sdk/models/operations/patchaccountingaccountsecurity.md +0 -8
- package/docs/sdk/models/operations/patchaccountingcontactsecurity.md +0 -8
- package/docs/sdk/models/operations/patchaccountinginvoicesecurity.md +0 -8
- package/docs/sdk/models/operations/patchaccountingpaymentrequest.md +0 -10
- package/docs/sdk/models/operations/patchaccountingpaymentresponse.md +0 -11
- package/docs/sdk/models/operations/patchaccountingpaymentsecurity.md +0 -8
- package/docs/sdk/models/operations/patchaccountingtaxratesecurity.md +0 -8
- package/docs/sdk/models/operations/patchaccountingtransactionsecurity.md +0 -8
- package/docs/sdk/models/operations/patchatsactivitysecurity.md +0 -8
- package/docs/sdk/models/operations/patchatsapplicationsecurity.md +0 -8
- package/docs/sdk/models/operations/patchatscandidatesecurity.md +0 -8
- package/docs/sdk/models/operations/patchatsdocumentsecurity.md +0 -8
- package/docs/sdk/models/operations/patchatsinterviewsecurity.md +0 -8
- package/docs/sdk/models/operations/patchatsjobsecurity.md +0 -8
- package/docs/sdk/models/operations/patchatsscorecardsecurity.md +0 -8
- package/docs/sdk/models/operations/patchcommercecollectionsecurity.md +0 -8
- package/docs/sdk/models/operations/patchcommerceinventorysecurity.md +0 -8
- package/docs/sdk/models/operations/patchcommerceitemsecurity.md +0 -8
- package/docs/sdk/models/operations/patchcommercelocationsecurity.md +0 -8
- package/docs/sdk/models/operations/patchcrmcompanysecurity.md +0 -8
- package/docs/sdk/models/operations/patchcrmcontactsecurity.md +0 -8
- package/docs/sdk/models/operations/patchcrmdealsecurity.md +0 -8
- package/docs/sdk/models/operations/patchcrmeventsecurity.md +0 -8
- package/docs/sdk/models/operations/patchcrmleadsecurity.md +0 -8
- package/docs/sdk/models/operations/patchcrmpipelinesecurity.md +0 -8
- package/docs/sdk/models/operations/patchhrisemployeesecurity.md +0 -8
- package/docs/sdk/models/operations/patchhrisgroupsecurity.md +0 -8
- package/docs/sdk/models/operations/patchmartechlistsecurity.md +0 -8
- package/docs/sdk/models/operations/patchmartechmembersecurity.md +0 -8
- package/docs/sdk/models/operations/patchpassthroughsecurity.md +0 -8
- package/docs/sdk/models/operations/patchstoragefilesecurity.md +0 -8
- package/docs/sdk/models/operations/patchticketingcustomersecurity.md +0 -8
- package/docs/sdk/models/operations/patchticketingnotesecurity.md +0 -8
- package/docs/sdk/models/operations/patchticketingticketsecurity.md +0 -8
- package/docs/sdk/models/operations/patchuccontactsecurity.md +0 -8
- package/docs/sdk/models/operations/patchunifiedconnectionsecurity.md +0 -8
- package/docs/sdk/models/operations/patchunifiedwebhooktriggersecurity.md +0 -8
- package/docs/sdk/models/operations/removeaccountingaccountsecurity.md +0 -8
- package/docs/sdk/models/operations/removeaccountingcontactsecurity.md +0 -8
- package/docs/sdk/models/operations/removeaccountinginvoicesecurity.md +0 -8
- package/docs/sdk/models/operations/removeaccountingpaymentsecurity.md +0 -8
- package/docs/sdk/models/operations/removeaccountingtaxratesecurity.md +0 -8
- package/docs/sdk/models/operations/removeaccountingtransactionsecurity.md +0 -8
- package/docs/sdk/models/operations/removeatsactivitysecurity.md +0 -8
- package/docs/sdk/models/operations/removeatsapplicationsecurity.md +0 -8
- package/docs/sdk/models/operations/removeatscandidatesecurity.md +0 -8
- package/docs/sdk/models/operations/removeatsdocumentsecurity.md +0 -8
- package/docs/sdk/models/operations/removeatsinterviewsecurity.md +0 -8
- package/docs/sdk/models/operations/removeatsjobsecurity.md +0 -8
- package/docs/sdk/models/operations/removeatsscorecardsecurity.md +0 -8
- package/docs/sdk/models/operations/removecommercecollectionsecurity.md +0 -8
- package/docs/sdk/models/operations/removecommerceinventorysecurity.md +0 -8
- package/docs/sdk/models/operations/removecommerceitemsecurity.md +0 -8
- package/docs/sdk/models/operations/removecommercelocationsecurity.md +0 -8
- package/docs/sdk/models/operations/removecrmcompanysecurity.md +0 -8
- package/docs/sdk/models/operations/removecrmcontactsecurity.md +0 -8
- package/docs/sdk/models/operations/removecrmdealsecurity.md +0 -8
- package/docs/sdk/models/operations/removecrmeventsecurity.md +0 -8
- package/docs/sdk/models/operations/removecrmleadsecurity.md +0 -8
- package/docs/sdk/models/operations/removecrmpipelinesecurity.md +0 -8
- package/docs/sdk/models/operations/removehrisemployeesecurity.md +0 -8
- package/docs/sdk/models/operations/removehrisgroupsecurity.md +0 -8
- package/docs/sdk/models/operations/removemartechlistsecurity.md +0 -8
- package/docs/sdk/models/operations/removemartechmembersecurity.md +0 -8
- package/docs/sdk/models/operations/removepassthroughsecurity.md +0 -8
- package/docs/sdk/models/operations/removestoragefilesecurity.md +0 -8
- package/docs/sdk/models/operations/removeticketingcustomersecurity.md +0 -8
- package/docs/sdk/models/operations/removeticketingnotesecurity.md +0 -8
- package/docs/sdk/models/operations/removeticketingticketsecurity.md +0 -8
- package/docs/sdk/models/operations/removeuccontactsecurity.md +0 -8
- package/docs/sdk/models/operations/removeunifiedconnectionsecurity.md +0 -8
- package/docs/sdk/models/operations/removeunifiedwebhooksecurity.md +0 -8
- package/docs/sdk/models/operations/updateaccountingaccountsecurity.md +0 -8
- package/docs/sdk/models/operations/updateaccountingcontactsecurity.md +0 -8
- package/docs/sdk/models/operations/updateaccountinginvoicesecurity.md +0 -8
- package/docs/sdk/models/operations/updateaccountingpaymentrequest.md +0 -10
- package/docs/sdk/models/operations/updateaccountingpaymentresponse.md +0 -11
- package/docs/sdk/models/operations/updateaccountingpaymentsecurity.md +0 -8
- package/docs/sdk/models/operations/updateaccountingtaxratesecurity.md +0 -8
- package/docs/sdk/models/operations/updateaccountingtransactionsecurity.md +0 -8
- package/docs/sdk/models/operations/updateatsactivitysecurity.md +0 -8
- package/docs/sdk/models/operations/updateatsapplicationsecurity.md +0 -8
- package/docs/sdk/models/operations/updateatscandidatesecurity.md +0 -8
- package/docs/sdk/models/operations/updateatsdocumentsecurity.md +0 -8
- package/docs/sdk/models/operations/updateatsinterviewsecurity.md +0 -8
- package/docs/sdk/models/operations/updateatsjobsecurity.md +0 -8
- package/docs/sdk/models/operations/updateatsscorecardsecurity.md +0 -8
- package/docs/sdk/models/operations/updatecommercecollectionsecurity.md +0 -8
- package/docs/sdk/models/operations/updatecommerceinventorysecurity.md +0 -8
- package/docs/sdk/models/operations/updatecommerceitemsecurity.md +0 -8
- package/docs/sdk/models/operations/updatecommercelocationsecurity.md +0 -8
- package/docs/sdk/models/operations/updatecrmcompanysecurity.md +0 -8
- package/docs/sdk/models/operations/updatecrmcontactsecurity.md +0 -8
- package/docs/sdk/models/operations/updatecrmdealsecurity.md +0 -8
- package/docs/sdk/models/operations/updatecrmeventsecurity.md +0 -8
- package/docs/sdk/models/operations/updatecrmleadsecurity.md +0 -8
- package/docs/sdk/models/operations/updatecrmpipelinesecurity.md +0 -8
- package/docs/sdk/models/operations/updatehrisemployeesecurity.md +0 -8
- package/docs/sdk/models/operations/updatehrisgroupsecurity.md +0 -8
- package/docs/sdk/models/operations/updatemartechlistsecurity.md +0 -8
- package/docs/sdk/models/operations/updatemartechmembersecurity.md +0 -8
- package/docs/sdk/models/operations/updatepassthroughsecurity.md +0 -8
- package/docs/sdk/models/operations/updatestoragefilesecurity.md +0 -8
- package/docs/sdk/models/operations/updateticketingcustomersecurity.md +0 -8
- package/docs/sdk/models/operations/updateticketingnotesecurity.md +0 -8
- package/docs/sdk/models/operations/updateticketingticketsecurity.md +0 -8
- package/docs/sdk/models/operations/updateuccontactsecurity.md +0 -8
- package/docs/sdk/models/operations/updateunifiedconnectionsecurity.md +0 -8
- package/docs/sdk/models/operations/updateunifiedwebhooktriggersecurity.md +0 -8
- package/docs/sdk/models/shared/accountingpayout.md +0 -15
- package/docs/sdk/models/shared/accountingrefund.md +0 -17
- package/docs/sdks/account/README.md +0 -318
- package/docs/sdks/accounting/README.md +0 -2240
- package/docs/sdks/activity/README.md +0 -327
- package/docs/sdks/apicall/README.md +0 -97
- package/docs/sdks/application/README.md +0 -339
- package/docs/sdks/applicationstatus/README.md +0 -55
- package/docs/sdks/ats/README.md +0 -2533
- package/docs/sdks/auth/README.md +0 -95
- package/docs/sdks/call/README.md +0 -55
- package/docs/sdks/candidate/README.md +0 -375
- package/docs/sdks/collection/README.md +0 -354
- package/docs/sdks/commerce/README.md +0 -1395
- package/docs/sdks/company/README.md +0 -526
- package/docs/sdks/connection/README.md +0 -364
- package/docs/sdks/contact/README.md +0 -1046
- package/docs/sdks/crm/README.md +0 -2084
- package/docs/sdks/customer/README.md +0 -354
- package/docs/sdks/deal/README.md +0 -321
- package/docs/sdks/document/README.md +0 -315
- package/docs/sdks/employee/README.md +0 -369
- package/docs/sdks/enrich/README.md +0 -99
- package/docs/sdks/event/README.md +0 -396
- package/docs/sdks/file/README.md +0 -336
- package/docs/sdks/group/README.md +0 -333
- package/docs/sdks/hris/README.md +0 -697
- package/docs/sdks/integration/README.md +0 -147
- package/docs/sdks/interview/README.md +0 -324
- package/docs/sdks/inventory/README.md +0 -315
- package/docs/sdks/invoice/README.md +0 -330
- package/docs/sdks/issue/README.md +0 -50
- package/docs/sdks/item/README.md +0 -423
- package/docs/sdks/job/README.md +0 -402
- package/docs/sdks/lead/README.md +0 -342
- package/docs/sdks/list/README.md +0 -312
- package/docs/sdks/location/README.md +0 -318
- package/docs/sdks/login/README.md +0 -48
- package/docs/sdks/martech/README.md +0 -655
- package/docs/sdks/member/README.md +0 -348
- package/docs/sdks/note/README.md +0 -312
- package/docs/sdks/organization/README.md +0 -106
- package/docs/sdks/passthrough/README.md +0 -254
- package/docs/sdks/payment/README.md +0 -312
- package/docs/sdks/payout/README.md +0 -106
- package/docs/sdks/person/README.md +0 -52
- package/docs/sdks/pipeline/README.md +0 -312
- package/docs/sdks/refund/README.md +0 -106
- package/docs/sdks/scorecard/README.md +0 -330
- package/docs/sdks/storage/README.md +0 -336
- package/docs/sdks/taxrate/README.md +0 -318
- package/docs/sdks/ticket/README.md +0 -324
- package/docs/sdks/ticketing/README.md +0 -980
- package/docs/sdks/transaction/README.md +0 -333
- package/docs/sdks/uc/README.md +0 -395
- package/docs/sdks/unified/README.md +0 -935
- package/docs/sdks/unifiedto/README.md +0 -9
- package/docs/sdks/webhook/README.md +0 -297
package/dist/sdk/accounting.js
CHANGED
|
@@ -101,10 +101,10 @@ var Accounting = /** @class */ (function () {
|
|
|
101
101
|
/**
|
|
102
102
|
* Create an account
|
|
103
103
|
*/
|
|
104
|
-
Accounting.prototype.createAccountingAccount = function (req,
|
|
104
|
+
Accounting.prototype.createAccountingAccount = function (req, config) {
|
|
105
105
|
var _a, _b;
|
|
106
106
|
return __awaiter(this, void 0, void 0, function () {
|
|
107
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
107
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
108
108
|
var _d;
|
|
109
109
|
return __generator(this, function (_e) {
|
|
110
110
|
switch (_e.label) {
|
|
@@ -124,15 +124,22 @@ var Accounting = /** @class */ (function () {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
client = this.sdkConfiguration.defaultClient;
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
128
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
129
|
+
return [4 /*yield*/, globalSecurity()];
|
|
130
|
+
case 1:
|
|
131
|
+
globalSecurity = _e.sent();
|
|
132
|
+
_e.label = 2;
|
|
133
|
+
case 2:
|
|
134
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
135
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
129
136
|
}
|
|
130
|
-
properties = utils.parseSecurityProperties(
|
|
137
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
131
138
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
132
139
|
headers["Accept"] = "application/json";
|
|
133
140
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
134
141
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
135
|
-
case
|
|
142
|
+
case 3:
|
|
136
143
|
httpRes = _e.sent();
|
|
137
144
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
138
145
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -165,10 +172,10 @@ var Accounting = /** @class */ (function () {
|
|
|
165
172
|
/**
|
|
166
173
|
* Create a contact
|
|
167
174
|
*/
|
|
168
|
-
Accounting.prototype.createAccountingContact = function (req,
|
|
175
|
+
Accounting.prototype.createAccountingContact = function (req, config) {
|
|
169
176
|
var _a, _b;
|
|
170
177
|
return __awaiter(this, void 0, void 0, function () {
|
|
171
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
178
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
172
179
|
var _d;
|
|
173
180
|
return __generator(this, function (_e) {
|
|
174
181
|
switch (_e.label) {
|
|
@@ -188,15 +195,22 @@ var Accounting = /** @class */ (function () {
|
|
|
188
195
|
}
|
|
189
196
|
}
|
|
190
197
|
client = this.sdkConfiguration.defaultClient;
|
|
191
|
-
|
|
192
|
-
|
|
198
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
199
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
200
|
+
return [4 /*yield*/, globalSecurity()];
|
|
201
|
+
case 1:
|
|
202
|
+
globalSecurity = _e.sent();
|
|
203
|
+
_e.label = 2;
|
|
204
|
+
case 2:
|
|
205
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
206
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
193
207
|
}
|
|
194
|
-
properties = utils.parseSecurityProperties(
|
|
208
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
195
209
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
196
210
|
headers["Accept"] = "application/json";
|
|
197
211
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
198
212
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
199
|
-
case
|
|
213
|
+
case 3:
|
|
200
214
|
httpRes = _e.sent();
|
|
201
215
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
202
216
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -229,10 +243,10 @@ var Accounting = /** @class */ (function () {
|
|
|
229
243
|
/**
|
|
230
244
|
* Create a invoice
|
|
231
245
|
*/
|
|
232
|
-
Accounting.prototype.createAccountingInvoice = function (req,
|
|
246
|
+
Accounting.prototype.createAccountingInvoice = function (req, config) {
|
|
233
247
|
var _a, _b;
|
|
234
248
|
return __awaiter(this, void 0, void 0, function () {
|
|
235
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
249
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
236
250
|
var _d;
|
|
237
251
|
return __generator(this, function (_e) {
|
|
238
252
|
switch (_e.label) {
|
|
@@ -252,15 +266,22 @@ var Accounting = /** @class */ (function () {
|
|
|
252
266
|
}
|
|
253
267
|
}
|
|
254
268
|
client = this.sdkConfiguration.defaultClient;
|
|
255
|
-
|
|
256
|
-
|
|
269
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
270
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
271
|
+
return [4 /*yield*/, globalSecurity()];
|
|
272
|
+
case 1:
|
|
273
|
+
globalSecurity = _e.sent();
|
|
274
|
+
_e.label = 2;
|
|
275
|
+
case 2:
|
|
276
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
277
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
257
278
|
}
|
|
258
|
-
properties = utils.parseSecurityProperties(
|
|
279
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
259
280
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
260
281
|
headers["Accept"] = "application/json";
|
|
261
282
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
262
283
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
263
|
-
case
|
|
284
|
+
case 3:
|
|
264
285
|
httpRes = _e.sent();
|
|
265
286
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
266
287
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -290,77 +311,13 @@ var Accounting = /** @class */ (function () {
|
|
|
290
311
|
});
|
|
291
312
|
});
|
|
292
313
|
};
|
|
293
|
-
/**
|
|
294
|
-
* Create a payment
|
|
295
|
-
*/
|
|
296
|
-
Accounting.prototype.createAccountingPayment = function (req, security, config) {
|
|
297
|
-
var _a, _b;
|
|
298
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
299
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
300
|
-
var _d;
|
|
301
|
-
return __generator(this, function (_e) {
|
|
302
|
-
switch (_e.label) {
|
|
303
|
-
case 0:
|
|
304
|
-
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
305
|
-
req = new operations.CreateAccountingPaymentRequest(req);
|
|
306
|
-
}
|
|
307
|
-
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
308
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/payment", req);
|
|
309
|
-
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
|
|
310
|
-
try {
|
|
311
|
-
_d = __read(utils.serializeRequestBody(req, "accountingPayment", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
|
|
312
|
-
}
|
|
313
|
-
catch (e) {
|
|
314
|
-
if (e instanceof Error) {
|
|
315
|
-
throw new Error("Error serializing request body, cause: ".concat(e.message));
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
client = this.sdkConfiguration.defaultClient;
|
|
319
|
-
if (!(security instanceof utils.SpeakeasyBase)) {
|
|
320
|
-
security = new operations.CreateAccountingPaymentSecurity(security);
|
|
321
|
-
}
|
|
322
|
-
properties = utils.parseSecurityProperties(security);
|
|
323
|
-
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
324
|
-
headers["Accept"] = "application/json";
|
|
325
|
-
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
326
|
-
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
327
|
-
case 1:
|
|
328
|
-
httpRes = _e.sent();
|
|
329
|
-
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
330
|
-
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
331
|
-
throw new Error("status code not found in response: ".concat(httpRes));
|
|
332
|
-
}
|
|
333
|
-
res = new operations.CreateAccountingPaymentResponse({
|
|
334
|
-
statusCode: httpRes.status,
|
|
335
|
-
contentType: responseContentType,
|
|
336
|
-
rawResponse: httpRes,
|
|
337
|
-
});
|
|
338
|
-
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
339
|
-
switch (true) {
|
|
340
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
341
|
-
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
342
|
-
res.accountingPayment = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingPayment);
|
|
343
|
-
}
|
|
344
|
-
else {
|
|
345
|
-
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
346
|
-
}
|
|
347
|
-
break;
|
|
348
|
-
case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
349
|
-
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
350
|
-
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
351
|
-
}
|
|
352
|
-
return [2 /*return*/, res];
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
});
|
|
356
|
-
};
|
|
357
314
|
/**
|
|
358
315
|
* Create a taxrate
|
|
359
316
|
*/
|
|
360
|
-
Accounting.prototype.createAccountingTaxrate = function (req,
|
|
317
|
+
Accounting.prototype.createAccountingTaxrate = function (req, config) {
|
|
361
318
|
var _a, _b;
|
|
362
319
|
return __awaiter(this, void 0, void 0, function () {
|
|
363
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
320
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
364
321
|
var _d;
|
|
365
322
|
return __generator(this, function (_e) {
|
|
366
323
|
switch (_e.label) {
|
|
@@ -380,15 +337,22 @@ var Accounting = /** @class */ (function () {
|
|
|
380
337
|
}
|
|
381
338
|
}
|
|
382
339
|
client = this.sdkConfiguration.defaultClient;
|
|
383
|
-
|
|
384
|
-
|
|
340
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
341
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
342
|
+
return [4 /*yield*/, globalSecurity()];
|
|
343
|
+
case 1:
|
|
344
|
+
globalSecurity = _e.sent();
|
|
345
|
+
_e.label = 2;
|
|
346
|
+
case 2:
|
|
347
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
348
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
385
349
|
}
|
|
386
|
-
properties = utils.parseSecurityProperties(
|
|
350
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
387
351
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
388
352
|
headers["Accept"] = "application/json";
|
|
389
353
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
390
354
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
391
|
-
case
|
|
355
|
+
case 3:
|
|
392
356
|
httpRes = _e.sent();
|
|
393
357
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
394
358
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -421,10 +385,10 @@ var Accounting = /** @class */ (function () {
|
|
|
421
385
|
/**
|
|
422
386
|
* Create a transaction
|
|
423
387
|
*/
|
|
424
|
-
Accounting.prototype.createAccountingTransaction = function (req,
|
|
388
|
+
Accounting.prototype.createAccountingTransaction = function (req, config) {
|
|
425
389
|
var _a, _b;
|
|
426
390
|
return __awaiter(this, void 0, void 0, function () {
|
|
427
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
391
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
428
392
|
var _d;
|
|
429
393
|
return __generator(this, function (_e) {
|
|
430
394
|
switch (_e.label) {
|
|
@@ -444,15 +408,22 @@ var Accounting = /** @class */ (function () {
|
|
|
444
408
|
}
|
|
445
409
|
}
|
|
446
410
|
client = this.sdkConfiguration.defaultClient;
|
|
447
|
-
|
|
448
|
-
|
|
411
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
412
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
413
|
+
return [4 /*yield*/, globalSecurity()];
|
|
414
|
+
case 1:
|
|
415
|
+
globalSecurity = _e.sent();
|
|
416
|
+
_e.label = 2;
|
|
417
|
+
case 2:
|
|
418
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
419
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
449
420
|
}
|
|
450
|
-
properties = utils.parseSecurityProperties(
|
|
421
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
451
422
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
452
423
|
headers["Accept"] = "application/json";
|
|
453
424
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
454
425
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
455
|
-
case
|
|
426
|
+
case 3:
|
|
456
427
|
httpRes = _e.sent();
|
|
457
428
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
458
429
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -485,10 +456,10 @@ var Accounting = /** @class */ (function () {
|
|
|
485
456
|
/**
|
|
486
457
|
* Retrieve an account
|
|
487
458
|
*/
|
|
488
|
-
Accounting.prototype.getAccountingAccount = function (req,
|
|
459
|
+
Accounting.prototype.getAccountingAccount = function (req, config) {
|
|
489
460
|
var _a, _b;
|
|
490
461
|
return __awaiter(this, void 0, void 0, function () {
|
|
491
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
462
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
492
463
|
return __generator(this, function (_c) {
|
|
493
464
|
switch (_c.label) {
|
|
494
465
|
case 0:
|
|
@@ -498,16 +469,23 @@ var Accounting = /** @class */ (function () {
|
|
|
498
469
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
499
470
|
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/account/{id}", req);
|
|
500
471
|
client = this.sdkConfiguration.defaultClient;
|
|
501
|
-
|
|
502
|
-
|
|
472
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
473
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
474
|
+
return [4 /*yield*/, globalSecurity()];
|
|
475
|
+
case 1:
|
|
476
|
+
globalSecurity = _c.sent();
|
|
477
|
+
_c.label = 2;
|
|
478
|
+
case 2:
|
|
479
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
480
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
503
481
|
}
|
|
504
|
-
properties = utils.parseSecurityProperties(
|
|
482
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
505
483
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
506
484
|
queryParams = utils.serializeQueryParams(req);
|
|
507
485
|
headers["Accept"] = "application/json";
|
|
508
486
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
509
487
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
510
|
-
case
|
|
488
|
+
case 3:
|
|
511
489
|
httpRes = _c.sent();
|
|
512
490
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
513
491
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -540,10 +518,10 @@ var Accounting = /** @class */ (function () {
|
|
|
540
518
|
/**
|
|
541
519
|
* Retrieve a contact
|
|
542
520
|
*/
|
|
543
|
-
Accounting.prototype.getAccountingContact = function (req,
|
|
521
|
+
Accounting.prototype.getAccountingContact = function (req, config) {
|
|
544
522
|
var _a, _b;
|
|
545
523
|
return __awaiter(this, void 0, void 0, function () {
|
|
546
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
524
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
547
525
|
return __generator(this, function (_c) {
|
|
548
526
|
switch (_c.label) {
|
|
549
527
|
case 0:
|
|
@@ -553,16 +531,23 @@ var Accounting = /** @class */ (function () {
|
|
|
553
531
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
554
532
|
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/contact/{id}", req);
|
|
555
533
|
client = this.sdkConfiguration.defaultClient;
|
|
556
|
-
|
|
557
|
-
|
|
534
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
535
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
536
|
+
return [4 /*yield*/, globalSecurity()];
|
|
537
|
+
case 1:
|
|
538
|
+
globalSecurity = _c.sent();
|
|
539
|
+
_c.label = 2;
|
|
540
|
+
case 2:
|
|
541
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
542
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
558
543
|
}
|
|
559
|
-
properties = utils.parseSecurityProperties(
|
|
544
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
560
545
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
561
546
|
queryParams = utils.serializeQueryParams(req);
|
|
562
547
|
headers["Accept"] = "application/json";
|
|
563
548
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
564
549
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
565
|
-
case
|
|
550
|
+
case 3:
|
|
566
551
|
httpRes = _c.sent();
|
|
567
552
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
568
553
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -595,10 +580,10 @@ var Accounting = /** @class */ (function () {
|
|
|
595
580
|
/**
|
|
596
581
|
* Retrieve a invoice
|
|
597
582
|
*/
|
|
598
|
-
Accounting.prototype.getAccountingInvoice = function (req,
|
|
583
|
+
Accounting.prototype.getAccountingInvoice = function (req, config) {
|
|
599
584
|
var _a, _b;
|
|
600
585
|
return __awaiter(this, void 0, void 0, function () {
|
|
601
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
586
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
602
587
|
return __generator(this, function (_c) {
|
|
603
588
|
switch (_c.label) {
|
|
604
589
|
case 0:
|
|
@@ -608,16 +593,23 @@ var Accounting = /** @class */ (function () {
|
|
|
608
593
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
609
594
|
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/invoice/{id}", req);
|
|
610
595
|
client = this.sdkConfiguration.defaultClient;
|
|
611
|
-
|
|
612
|
-
|
|
596
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
597
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
598
|
+
return [4 /*yield*/, globalSecurity()];
|
|
599
|
+
case 1:
|
|
600
|
+
globalSecurity = _c.sent();
|
|
601
|
+
_c.label = 2;
|
|
602
|
+
case 2:
|
|
603
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
604
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
613
605
|
}
|
|
614
|
-
properties = utils.parseSecurityProperties(
|
|
606
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
615
607
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
616
608
|
queryParams = utils.serializeQueryParams(req);
|
|
617
609
|
headers["Accept"] = "application/json";
|
|
618
610
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
619
611
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
620
|
-
case
|
|
612
|
+
case 3:
|
|
621
613
|
httpRes = _c.sent();
|
|
622
614
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
623
615
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -650,10 +642,10 @@ var Accounting = /** @class */ (function () {
|
|
|
650
642
|
/**
|
|
651
643
|
* Retrieve an organization
|
|
652
644
|
*/
|
|
653
|
-
Accounting.prototype.getAccountingOrganization = function (req,
|
|
645
|
+
Accounting.prototype.getAccountingOrganization = function (req, config) {
|
|
654
646
|
var _a, _b;
|
|
655
647
|
return __awaiter(this, void 0, void 0, function () {
|
|
656
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
648
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
657
649
|
return __generator(this, function (_c) {
|
|
658
650
|
switch (_c.label) {
|
|
659
651
|
case 0:
|
|
@@ -663,352 +655,29 @@ var Accounting = /** @class */ (function () {
|
|
|
663
655
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
664
656
|
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/organization/{id}", req);
|
|
665
657
|
client = this.sdkConfiguration.defaultClient;
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
properties = utils.parseSecurityProperties(security);
|
|
670
|
-
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
671
|
-
queryParams = utils.serializeQueryParams(req);
|
|
672
|
-
headers["Accept"] = "application/json";
|
|
673
|
-
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
674
|
-
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
675
|
-
case 1:
|
|
676
|
-
httpRes = _c.sent();
|
|
677
|
-
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
678
|
-
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
679
|
-
throw new Error("status code not found in response: ".concat(httpRes));
|
|
680
|
-
}
|
|
681
|
-
res = new operations.GetAccountingOrganizationResponse({
|
|
682
|
-
statusCode: httpRes.status,
|
|
683
|
-
contentType: responseContentType,
|
|
684
|
-
rawResponse: httpRes,
|
|
685
|
-
});
|
|
686
|
-
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
687
|
-
switch (true) {
|
|
688
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
689
|
-
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
690
|
-
res.accountingOrganization = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingOrganization);
|
|
691
|
-
}
|
|
692
|
-
else {
|
|
693
|
-
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
694
|
-
}
|
|
695
|
-
break;
|
|
696
|
-
case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
697
|
-
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
698
|
-
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
699
|
-
}
|
|
700
|
-
return [2 /*return*/, res];
|
|
701
|
-
}
|
|
702
|
-
});
|
|
703
|
-
});
|
|
704
|
-
};
|
|
705
|
-
/**
|
|
706
|
-
* Retrieve a payment
|
|
707
|
-
*/
|
|
708
|
-
Accounting.prototype.getAccountingPayment = function (req, security, config) {
|
|
709
|
-
var _a, _b;
|
|
710
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
711
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
712
|
-
return __generator(this, function (_c) {
|
|
713
|
-
switch (_c.label) {
|
|
714
|
-
case 0:
|
|
715
|
-
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
716
|
-
req = new operations.GetAccountingPaymentRequest(req);
|
|
717
|
-
}
|
|
718
|
-
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
719
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/payment/{id}", req);
|
|
720
|
-
client = this.sdkConfiguration.defaultClient;
|
|
721
|
-
if (!(security instanceof utils.SpeakeasyBase)) {
|
|
722
|
-
security = new operations.GetAccountingPaymentSecurity(security);
|
|
723
|
-
}
|
|
724
|
-
properties = utils.parseSecurityProperties(security);
|
|
725
|
-
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
726
|
-
queryParams = utils.serializeQueryParams(req);
|
|
727
|
-
headers["Accept"] = "application/json";
|
|
728
|
-
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
729
|
-
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
658
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
659
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
660
|
+
return [4 /*yield*/, globalSecurity()];
|
|
730
661
|
case 1:
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
662
|
+
globalSecurity = _c.sent();
|
|
663
|
+
_c.label = 2;
|
|
664
|
+
case 2:
|
|
665
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
666
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
735
667
|
}
|
|
736
|
-
|
|
737
|
-
statusCode: httpRes.status,
|
|
738
|
-
contentType: responseContentType,
|
|
739
|
-
rawResponse: httpRes,
|
|
740
|
-
});
|
|
741
|
-
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
742
|
-
switch (true) {
|
|
743
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
744
|
-
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
745
|
-
res.accountingPayment = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingPayment);
|
|
746
|
-
}
|
|
747
|
-
else {
|
|
748
|
-
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
749
|
-
}
|
|
750
|
-
break;
|
|
751
|
-
case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
752
|
-
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
753
|
-
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
754
|
-
}
|
|
755
|
-
return [2 /*return*/, res];
|
|
756
|
-
}
|
|
757
|
-
});
|
|
758
|
-
});
|
|
759
|
-
};
|
|
760
|
-
/**
|
|
761
|
-
* Retrieve a payout
|
|
762
|
-
*/
|
|
763
|
-
Accounting.prototype.getAccountingPayout = function (req, security, config) {
|
|
764
|
-
var _a, _b;
|
|
765
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
766
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
767
|
-
return __generator(this, function (_c) {
|
|
768
|
-
switch (_c.label) {
|
|
769
|
-
case 0:
|
|
770
|
-
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
771
|
-
req = new operations.GetAccountingPayoutRequest(req);
|
|
772
|
-
}
|
|
773
|
-
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
774
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/payout/{id}", req);
|
|
775
|
-
client = this.sdkConfiguration.defaultClient;
|
|
776
|
-
if (!(security instanceof utils.SpeakeasyBase)) {
|
|
777
|
-
security = new operations.GetAccountingPayoutSecurity(security);
|
|
778
|
-
}
|
|
779
|
-
properties = utils.parseSecurityProperties(security);
|
|
668
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
780
669
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
781
670
|
queryParams = utils.serializeQueryParams(req);
|
|
782
671
|
headers["Accept"] = "application/json";
|
|
783
672
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
784
673
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
785
|
-
case
|
|
674
|
+
case 3:
|
|
786
675
|
httpRes = _c.sent();
|
|
787
676
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
788
677
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
789
678
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
790
679
|
}
|
|
791
|
-
res = new operations.
|
|
792
|
-
statusCode: httpRes.status,
|
|
793
|
-
contentType: responseContentType,
|
|
794
|
-
rawResponse: httpRes,
|
|
795
|
-
});
|
|
796
|
-
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
797
|
-
switch (true) {
|
|
798
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
799
|
-
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
800
|
-
res.accountingPayout = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingPayout);
|
|
801
|
-
}
|
|
802
|
-
else {
|
|
803
|
-
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
804
|
-
}
|
|
805
|
-
break;
|
|
806
|
-
case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
807
|
-
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
808
|
-
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
809
|
-
}
|
|
810
|
-
return [2 /*return*/, res];
|
|
811
|
-
}
|
|
812
|
-
});
|
|
813
|
-
});
|
|
814
|
-
};
|
|
815
|
-
/**
|
|
816
|
-
* Retrieve a refund
|
|
817
|
-
*/
|
|
818
|
-
Accounting.prototype.getAccountingRefund = function (req, security, config) {
|
|
819
|
-
var _a, _b;
|
|
820
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
821
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
822
|
-
return __generator(this, function (_c) {
|
|
823
|
-
switch (_c.label) {
|
|
824
|
-
case 0:
|
|
825
|
-
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
826
|
-
req = new operations.GetAccountingRefundRequest(req);
|
|
827
|
-
}
|
|
828
|
-
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
829
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/refund/{id}", req);
|
|
830
|
-
client = this.sdkConfiguration.defaultClient;
|
|
831
|
-
if (!(security instanceof utils.SpeakeasyBase)) {
|
|
832
|
-
security = new operations.GetAccountingRefundSecurity(security);
|
|
833
|
-
}
|
|
834
|
-
properties = utils.parseSecurityProperties(security);
|
|
835
|
-
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
836
|
-
queryParams = utils.serializeQueryParams(req);
|
|
837
|
-
headers["Accept"] = "application/json";
|
|
838
|
-
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
839
|
-
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
840
|
-
case 1:
|
|
841
|
-
httpRes = _c.sent();
|
|
842
|
-
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
843
|
-
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
844
|
-
throw new Error("status code not found in response: ".concat(httpRes));
|
|
845
|
-
}
|
|
846
|
-
res = new operations.GetAccountingRefundResponse({
|
|
847
|
-
statusCode: httpRes.status,
|
|
848
|
-
contentType: responseContentType,
|
|
849
|
-
rawResponse: httpRes,
|
|
850
|
-
});
|
|
851
|
-
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
852
|
-
switch (true) {
|
|
853
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
854
|
-
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
855
|
-
res.accountingRefund = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingRefund);
|
|
856
|
-
}
|
|
857
|
-
else {
|
|
858
|
-
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
859
|
-
}
|
|
860
|
-
break;
|
|
861
|
-
case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
862
|
-
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
863
|
-
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
864
|
-
}
|
|
865
|
-
return [2 /*return*/, res];
|
|
866
|
-
}
|
|
867
|
-
});
|
|
868
|
-
});
|
|
869
|
-
};
|
|
870
|
-
/**
|
|
871
|
-
* Retrieve a taxrate
|
|
872
|
-
*/
|
|
873
|
-
Accounting.prototype.getAccountingTaxrate = function (req, security, config) {
|
|
874
|
-
var _a, _b;
|
|
875
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
876
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
877
|
-
return __generator(this, function (_c) {
|
|
878
|
-
switch (_c.label) {
|
|
879
|
-
case 0:
|
|
880
|
-
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
881
|
-
req = new operations.GetAccountingTaxrateRequest(req);
|
|
882
|
-
}
|
|
883
|
-
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
884
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/taxrate/{id}", req);
|
|
885
|
-
client = this.sdkConfiguration.defaultClient;
|
|
886
|
-
if (!(security instanceof utils.SpeakeasyBase)) {
|
|
887
|
-
security = new operations.GetAccountingTaxrateSecurity(security);
|
|
888
|
-
}
|
|
889
|
-
properties = utils.parseSecurityProperties(security);
|
|
890
|
-
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
891
|
-
queryParams = utils.serializeQueryParams(req);
|
|
892
|
-
headers["Accept"] = "application/json";
|
|
893
|
-
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
894
|
-
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
895
|
-
case 1:
|
|
896
|
-
httpRes = _c.sent();
|
|
897
|
-
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
898
|
-
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
899
|
-
throw new Error("status code not found in response: ".concat(httpRes));
|
|
900
|
-
}
|
|
901
|
-
res = new operations.GetAccountingTaxrateResponse({
|
|
902
|
-
statusCode: httpRes.status,
|
|
903
|
-
contentType: responseContentType,
|
|
904
|
-
rawResponse: httpRes,
|
|
905
|
-
});
|
|
906
|
-
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
907
|
-
switch (true) {
|
|
908
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
909
|
-
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
910
|
-
res.accountingTaxrate = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingTaxrate);
|
|
911
|
-
}
|
|
912
|
-
else {
|
|
913
|
-
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
914
|
-
}
|
|
915
|
-
break;
|
|
916
|
-
case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
917
|
-
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
918
|
-
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
919
|
-
}
|
|
920
|
-
return [2 /*return*/, res];
|
|
921
|
-
}
|
|
922
|
-
});
|
|
923
|
-
});
|
|
924
|
-
};
|
|
925
|
-
/**
|
|
926
|
-
* Retrieve a transaction
|
|
927
|
-
*/
|
|
928
|
-
Accounting.prototype.getAccountingTransaction = function (req, security, config) {
|
|
929
|
-
var _a, _b;
|
|
930
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
931
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
932
|
-
return __generator(this, function (_c) {
|
|
933
|
-
switch (_c.label) {
|
|
934
|
-
case 0:
|
|
935
|
-
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
936
|
-
req = new operations.GetAccountingTransactionRequest(req);
|
|
937
|
-
}
|
|
938
|
-
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
939
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/transaction/{id}", req);
|
|
940
|
-
client = this.sdkConfiguration.defaultClient;
|
|
941
|
-
if (!(security instanceof utils.SpeakeasyBase)) {
|
|
942
|
-
security = new operations.GetAccountingTransactionSecurity(security);
|
|
943
|
-
}
|
|
944
|
-
properties = utils.parseSecurityProperties(security);
|
|
945
|
-
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
946
|
-
queryParams = utils.serializeQueryParams(req);
|
|
947
|
-
headers["Accept"] = "application/json";
|
|
948
|
-
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
949
|
-
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
950
|
-
case 1:
|
|
951
|
-
httpRes = _c.sent();
|
|
952
|
-
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
953
|
-
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
954
|
-
throw new Error("status code not found in response: ".concat(httpRes));
|
|
955
|
-
}
|
|
956
|
-
res = new operations.GetAccountingTransactionResponse({
|
|
957
|
-
statusCode: httpRes.status,
|
|
958
|
-
contentType: responseContentType,
|
|
959
|
-
rawResponse: httpRes,
|
|
960
|
-
});
|
|
961
|
-
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
962
|
-
switch (true) {
|
|
963
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
964
|
-
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
965
|
-
res.accountingTransaction = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingTransaction);
|
|
966
|
-
}
|
|
967
|
-
else {
|
|
968
|
-
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
969
|
-
}
|
|
970
|
-
break;
|
|
971
|
-
case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
972
|
-
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
973
|
-
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
974
|
-
}
|
|
975
|
-
return [2 /*return*/, res];
|
|
976
|
-
}
|
|
977
|
-
});
|
|
978
|
-
});
|
|
979
|
-
};
|
|
980
|
-
/**
|
|
981
|
-
* List all accounts
|
|
982
|
-
*/
|
|
983
|
-
Accounting.prototype.listAccountingAccounts = function (req, security, config) {
|
|
984
|
-
var _a, _b;
|
|
985
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
986
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
987
|
-
return __generator(this, function (_c) {
|
|
988
|
-
switch (_c.label) {
|
|
989
|
-
case 0:
|
|
990
|
-
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
991
|
-
req = new operations.ListAccountingAccountsRequest(req);
|
|
992
|
-
}
|
|
993
|
-
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
994
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/account", req);
|
|
995
|
-
client = this.sdkConfiguration.defaultClient;
|
|
996
|
-
if (!(security instanceof utils.SpeakeasyBase)) {
|
|
997
|
-
security = new operations.ListAccountingAccountsSecurity(security);
|
|
998
|
-
}
|
|
999
|
-
properties = utils.parseSecurityProperties(security);
|
|
1000
|
-
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
1001
|
-
queryParams = utils.serializeQueryParams(req);
|
|
1002
|
-
headers["Accept"] = "application/json";
|
|
1003
|
-
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
1004
|
-
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
1005
|
-
case 1:
|
|
1006
|
-
httpRes = _c.sent();
|
|
1007
|
-
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
1008
|
-
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
1009
|
-
throw new Error("status code not found in response: ".concat(httpRes));
|
|
1010
|
-
}
|
|
1011
|
-
res = new operations.ListAccountingAccountsResponse({
|
|
680
|
+
res = new operations.GetAccountingOrganizationResponse({
|
|
1012
681
|
statusCode: httpRes.status,
|
|
1013
682
|
contentType: responseContentType,
|
|
1014
683
|
rawResponse: httpRes,
|
|
@@ -1017,9 +686,7 @@ var Accounting = /** @class */ (function () {
|
|
|
1017
686
|
switch (true) {
|
|
1018
687
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
1019
688
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
1020
|
-
res.
|
|
1021
|
-
resFieldDepth = utils.getResFieldDepth(res);
|
|
1022
|
-
res.accountingAccounts = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingAccount, resFieldDepth);
|
|
689
|
+
res.accountingOrganization = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingOrganization);
|
|
1023
690
|
}
|
|
1024
691
|
else {
|
|
1025
692
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1035,37 +702,44 @@ var Accounting = /** @class */ (function () {
|
|
|
1035
702
|
});
|
|
1036
703
|
};
|
|
1037
704
|
/**
|
|
1038
|
-
*
|
|
705
|
+
* Retrieve a taxrate
|
|
1039
706
|
*/
|
|
1040
|
-
Accounting.prototype.
|
|
707
|
+
Accounting.prototype.getAccountingTaxrate = function (req, config) {
|
|
1041
708
|
var _a, _b;
|
|
1042
709
|
return __awaiter(this, void 0, void 0, function () {
|
|
1043
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes
|
|
710
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
1044
711
|
return __generator(this, function (_c) {
|
|
1045
712
|
switch (_c.label) {
|
|
1046
713
|
case 0:
|
|
1047
714
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
1048
|
-
req = new operations.
|
|
715
|
+
req = new operations.GetAccountingTaxrateRequest(req);
|
|
1049
716
|
}
|
|
1050
717
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1051
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
718
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/taxrate/{id}", req);
|
|
1052
719
|
client = this.sdkConfiguration.defaultClient;
|
|
1053
|
-
|
|
1054
|
-
|
|
720
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
721
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
722
|
+
return [4 /*yield*/, globalSecurity()];
|
|
723
|
+
case 1:
|
|
724
|
+
globalSecurity = _c.sent();
|
|
725
|
+
_c.label = 2;
|
|
726
|
+
case 2:
|
|
727
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
728
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1055
729
|
}
|
|
1056
|
-
properties = utils.parseSecurityProperties(
|
|
730
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1057
731
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
1058
732
|
queryParams = utils.serializeQueryParams(req);
|
|
1059
733
|
headers["Accept"] = "application/json";
|
|
1060
734
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
1061
735
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
1062
|
-
case
|
|
736
|
+
case 3:
|
|
1063
737
|
httpRes = _c.sent();
|
|
1064
738
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
1065
739
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
1066
740
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
1067
741
|
}
|
|
1068
|
-
res = new operations.
|
|
742
|
+
res = new operations.GetAccountingTaxrateResponse({
|
|
1069
743
|
statusCode: httpRes.status,
|
|
1070
744
|
contentType: responseContentType,
|
|
1071
745
|
rawResponse: httpRes,
|
|
@@ -1074,9 +748,7 @@ var Accounting = /** @class */ (function () {
|
|
|
1074
748
|
switch (true) {
|
|
1075
749
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
1076
750
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
1077
|
-
res.
|
|
1078
|
-
resFieldDepth = utils.getResFieldDepth(res);
|
|
1079
|
-
res.accountingContacts = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingContact, resFieldDepth);
|
|
751
|
+
res.accountingTaxrate = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingTaxrate);
|
|
1080
752
|
}
|
|
1081
753
|
else {
|
|
1082
754
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1092,37 +764,44 @@ var Accounting = /** @class */ (function () {
|
|
|
1092
764
|
});
|
|
1093
765
|
};
|
|
1094
766
|
/**
|
|
1095
|
-
*
|
|
767
|
+
* Retrieve a transaction
|
|
1096
768
|
*/
|
|
1097
|
-
Accounting.prototype.
|
|
769
|
+
Accounting.prototype.getAccountingTransaction = function (req, config) {
|
|
1098
770
|
var _a, _b;
|
|
1099
771
|
return __awaiter(this, void 0, void 0, function () {
|
|
1100
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes
|
|
772
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes;
|
|
1101
773
|
return __generator(this, function (_c) {
|
|
1102
774
|
switch (_c.label) {
|
|
1103
775
|
case 0:
|
|
1104
776
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
1105
|
-
req = new operations.
|
|
777
|
+
req = new operations.GetAccountingTransactionRequest(req);
|
|
1106
778
|
}
|
|
1107
779
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1108
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
780
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/transaction/{id}", req);
|
|
1109
781
|
client = this.sdkConfiguration.defaultClient;
|
|
1110
|
-
|
|
1111
|
-
|
|
782
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
783
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
784
|
+
return [4 /*yield*/, globalSecurity()];
|
|
785
|
+
case 1:
|
|
786
|
+
globalSecurity = _c.sent();
|
|
787
|
+
_c.label = 2;
|
|
788
|
+
case 2:
|
|
789
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
790
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1112
791
|
}
|
|
1113
|
-
properties = utils.parseSecurityProperties(
|
|
792
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1114
793
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
1115
794
|
queryParams = utils.serializeQueryParams(req);
|
|
1116
795
|
headers["Accept"] = "application/json";
|
|
1117
796
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
1118
797
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
1119
|
-
case
|
|
798
|
+
case 3:
|
|
1120
799
|
httpRes = _c.sent();
|
|
1121
800
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
1122
801
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
1123
802
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
1124
803
|
}
|
|
1125
|
-
res = new operations.
|
|
804
|
+
res = new operations.GetAccountingTransactionResponse({
|
|
1126
805
|
statusCode: httpRes.status,
|
|
1127
806
|
contentType: responseContentType,
|
|
1128
807
|
rawResponse: httpRes,
|
|
@@ -1131,9 +810,7 @@ var Accounting = /** @class */ (function () {
|
|
|
1131
810
|
switch (true) {
|
|
1132
811
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
1133
812
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
1134
|
-
res.
|
|
1135
|
-
resFieldDepth = utils.getResFieldDepth(res);
|
|
1136
|
-
res.accountingInvoices = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingInvoice, resFieldDepth);
|
|
813
|
+
res.accountingTransaction = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingTransaction);
|
|
1137
814
|
}
|
|
1138
815
|
else {
|
|
1139
816
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1149,37 +826,44 @@ var Accounting = /** @class */ (function () {
|
|
|
1149
826
|
});
|
|
1150
827
|
};
|
|
1151
828
|
/**
|
|
1152
|
-
* List all
|
|
829
|
+
* List all accounts
|
|
1153
830
|
*/
|
|
1154
|
-
Accounting.prototype.
|
|
831
|
+
Accounting.prototype.listAccountingAccounts = function (req, config) {
|
|
1155
832
|
var _a, _b;
|
|
1156
833
|
return __awaiter(this, void 0, void 0, function () {
|
|
1157
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
834
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
1158
835
|
return __generator(this, function (_c) {
|
|
1159
836
|
switch (_c.label) {
|
|
1160
837
|
case 0:
|
|
1161
838
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
1162
|
-
req = new operations.
|
|
839
|
+
req = new operations.ListAccountingAccountsRequest(req);
|
|
1163
840
|
}
|
|
1164
841
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1165
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
842
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/account", req);
|
|
1166
843
|
client = this.sdkConfiguration.defaultClient;
|
|
1167
|
-
|
|
1168
|
-
|
|
844
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
845
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
846
|
+
return [4 /*yield*/, globalSecurity()];
|
|
847
|
+
case 1:
|
|
848
|
+
globalSecurity = _c.sent();
|
|
849
|
+
_c.label = 2;
|
|
850
|
+
case 2:
|
|
851
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
852
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1169
853
|
}
|
|
1170
|
-
properties = utils.parseSecurityProperties(
|
|
854
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1171
855
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
1172
856
|
queryParams = utils.serializeQueryParams(req);
|
|
1173
857
|
headers["Accept"] = "application/json";
|
|
1174
858
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
1175
859
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
1176
|
-
case
|
|
860
|
+
case 3:
|
|
1177
861
|
httpRes = _c.sent();
|
|
1178
862
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
1179
863
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
1180
864
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
1181
865
|
}
|
|
1182
|
-
res = new operations.
|
|
866
|
+
res = new operations.ListAccountingAccountsResponse({
|
|
1183
867
|
statusCode: httpRes.status,
|
|
1184
868
|
contentType: responseContentType,
|
|
1185
869
|
rawResponse: httpRes,
|
|
@@ -1188,9 +872,9 @@ var Accounting = /** @class */ (function () {
|
|
|
1188
872
|
switch (true) {
|
|
1189
873
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
1190
874
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
1191
|
-
res.
|
|
875
|
+
res.accountingAccounts = [];
|
|
1192
876
|
resFieldDepth = utils.getResFieldDepth(res);
|
|
1193
|
-
res.
|
|
877
|
+
res.accountingAccounts = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingAccount, resFieldDepth);
|
|
1194
878
|
}
|
|
1195
879
|
else {
|
|
1196
880
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1206,37 +890,44 @@ var Accounting = /** @class */ (function () {
|
|
|
1206
890
|
});
|
|
1207
891
|
};
|
|
1208
892
|
/**
|
|
1209
|
-
* List all
|
|
893
|
+
* List all contacts
|
|
1210
894
|
*/
|
|
1211
|
-
Accounting.prototype.
|
|
895
|
+
Accounting.prototype.listAccountingContacts = function (req, config) {
|
|
1212
896
|
var _a, _b;
|
|
1213
897
|
return __awaiter(this, void 0, void 0, function () {
|
|
1214
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
898
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
1215
899
|
return __generator(this, function (_c) {
|
|
1216
900
|
switch (_c.label) {
|
|
1217
901
|
case 0:
|
|
1218
902
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
1219
|
-
req = new operations.
|
|
903
|
+
req = new operations.ListAccountingContactsRequest(req);
|
|
1220
904
|
}
|
|
1221
905
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1222
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
906
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/contact", req);
|
|
1223
907
|
client = this.sdkConfiguration.defaultClient;
|
|
1224
|
-
|
|
1225
|
-
|
|
908
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
909
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
910
|
+
return [4 /*yield*/, globalSecurity()];
|
|
911
|
+
case 1:
|
|
912
|
+
globalSecurity = _c.sent();
|
|
913
|
+
_c.label = 2;
|
|
914
|
+
case 2:
|
|
915
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
916
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1226
917
|
}
|
|
1227
|
-
properties = utils.parseSecurityProperties(
|
|
918
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1228
919
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
1229
920
|
queryParams = utils.serializeQueryParams(req);
|
|
1230
921
|
headers["Accept"] = "application/json";
|
|
1231
922
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
1232
923
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
1233
|
-
case
|
|
924
|
+
case 3:
|
|
1234
925
|
httpRes = _c.sent();
|
|
1235
926
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
1236
927
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
1237
928
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
1238
929
|
}
|
|
1239
|
-
res = new operations.
|
|
930
|
+
res = new operations.ListAccountingContactsResponse({
|
|
1240
931
|
statusCode: httpRes.status,
|
|
1241
932
|
contentType: responseContentType,
|
|
1242
933
|
rawResponse: httpRes,
|
|
@@ -1245,9 +936,9 @@ var Accounting = /** @class */ (function () {
|
|
|
1245
936
|
switch (true) {
|
|
1246
937
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
1247
938
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
1248
|
-
res.
|
|
939
|
+
res.accountingContacts = [];
|
|
1249
940
|
resFieldDepth = utils.getResFieldDepth(res);
|
|
1250
|
-
res.
|
|
941
|
+
res.accountingContacts = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingContact, resFieldDepth);
|
|
1251
942
|
}
|
|
1252
943
|
else {
|
|
1253
944
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1263,37 +954,44 @@ var Accounting = /** @class */ (function () {
|
|
|
1263
954
|
});
|
|
1264
955
|
};
|
|
1265
956
|
/**
|
|
1266
|
-
* List all
|
|
957
|
+
* List all invoices
|
|
1267
958
|
*/
|
|
1268
|
-
Accounting.prototype.
|
|
959
|
+
Accounting.prototype.listAccountingInvoices = function (req, config) {
|
|
1269
960
|
var _a, _b;
|
|
1270
961
|
return __awaiter(this, void 0, void 0, function () {
|
|
1271
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
962
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
1272
963
|
return __generator(this, function (_c) {
|
|
1273
964
|
switch (_c.label) {
|
|
1274
965
|
case 0:
|
|
1275
966
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
1276
|
-
req = new operations.
|
|
967
|
+
req = new operations.ListAccountingInvoicesRequest(req);
|
|
1277
968
|
}
|
|
1278
969
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1279
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
970
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/invoice", req);
|
|
1280
971
|
client = this.sdkConfiguration.defaultClient;
|
|
1281
|
-
|
|
1282
|
-
|
|
972
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
973
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
974
|
+
return [4 /*yield*/, globalSecurity()];
|
|
975
|
+
case 1:
|
|
976
|
+
globalSecurity = _c.sent();
|
|
977
|
+
_c.label = 2;
|
|
978
|
+
case 2:
|
|
979
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
980
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1283
981
|
}
|
|
1284
|
-
properties = utils.parseSecurityProperties(
|
|
982
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1285
983
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
1286
984
|
queryParams = utils.serializeQueryParams(req);
|
|
1287
985
|
headers["Accept"] = "application/json";
|
|
1288
986
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
1289
987
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
1290
|
-
case
|
|
988
|
+
case 3:
|
|
1291
989
|
httpRes = _c.sent();
|
|
1292
990
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
1293
991
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
1294
992
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
1295
993
|
}
|
|
1296
|
-
res = new operations.
|
|
994
|
+
res = new operations.ListAccountingInvoicesResponse({
|
|
1297
995
|
statusCode: httpRes.status,
|
|
1298
996
|
contentType: responseContentType,
|
|
1299
997
|
rawResponse: httpRes,
|
|
@@ -1302,9 +1000,9 @@ var Accounting = /** @class */ (function () {
|
|
|
1302
1000
|
switch (true) {
|
|
1303
1001
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
1304
1002
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
1305
|
-
res.
|
|
1003
|
+
res.accountingInvoices = [];
|
|
1306
1004
|
resFieldDepth = utils.getResFieldDepth(res);
|
|
1307
|
-
res.
|
|
1005
|
+
res.accountingInvoices = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingInvoice, resFieldDepth);
|
|
1308
1006
|
}
|
|
1309
1007
|
else {
|
|
1310
1008
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1320,37 +1018,44 @@ var Accounting = /** @class */ (function () {
|
|
|
1320
1018
|
});
|
|
1321
1019
|
};
|
|
1322
1020
|
/**
|
|
1323
|
-
* List all
|
|
1021
|
+
* List all organizations
|
|
1324
1022
|
*/
|
|
1325
|
-
Accounting.prototype.
|
|
1023
|
+
Accounting.prototype.listAccountingOrganizations = function (req, config) {
|
|
1326
1024
|
var _a, _b;
|
|
1327
1025
|
return __awaiter(this, void 0, void 0, function () {
|
|
1328
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
1026
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
1329
1027
|
return __generator(this, function (_c) {
|
|
1330
1028
|
switch (_c.label) {
|
|
1331
1029
|
case 0:
|
|
1332
1030
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
1333
|
-
req = new operations.
|
|
1031
|
+
req = new operations.ListAccountingOrganizationsRequest(req);
|
|
1334
1032
|
}
|
|
1335
1033
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1336
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/
|
|
1034
|
+
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/organization", req);
|
|
1337
1035
|
client = this.sdkConfiguration.defaultClient;
|
|
1338
|
-
|
|
1339
|
-
|
|
1036
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1037
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1038
|
+
return [4 /*yield*/, globalSecurity()];
|
|
1039
|
+
case 1:
|
|
1040
|
+
globalSecurity = _c.sent();
|
|
1041
|
+
_c.label = 2;
|
|
1042
|
+
case 2:
|
|
1043
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1044
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1340
1045
|
}
|
|
1341
|
-
properties = utils.parseSecurityProperties(
|
|
1046
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1342
1047
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
1343
1048
|
queryParams = utils.serializeQueryParams(req);
|
|
1344
1049
|
headers["Accept"] = "application/json";
|
|
1345
1050
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
1346
1051
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
1347
|
-
case
|
|
1052
|
+
case 3:
|
|
1348
1053
|
httpRes = _c.sent();
|
|
1349
1054
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
1350
1055
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
1351
1056
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
1352
1057
|
}
|
|
1353
|
-
res = new operations.
|
|
1058
|
+
res = new operations.ListAccountingOrganizationsResponse({
|
|
1354
1059
|
statusCode: httpRes.status,
|
|
1355
1060
|
contentType: responseContentType,
|
|
1356
1061
|
rawResponse: httpRes,
|
|
@@ -1359,9 +1064,9 @@ var Accounting = /** @class */ (function () {
|
|
|
1359
1064
|
switch (true) {
|
|
1360
1065
|
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
1361
1066
|
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
1362
|
-
res.
|
|
1067
|
+
res.accountingOrganizations = [];
|
|
1363
1068
|
resFieldDepth = utils.getResFieldDepth(res);
|
|
1364
|
-
res.
|
|
1069
|
+
res.accountingOrganizations = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingOrganization, resFieldDepth);
|
|
1365
1070
|
}
|
|
1366
1071
|
else {
|
|
1367
1072
|
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
@@ -1379,10 +1084,10 @@ var Accounting = /** @class */ (function () {
|
|
|
1379
1084
|
/**
|
|
1380
1085
|
* List all taxrates
|
|
1381
1086
|
*/
|
|
1382
|
-
Accounting.prototype.listAccountingTaxrates = function (req,
|
|
1087
|
+
Accounting.prototype.listAccountingTaxrates = function (req, config) {
|
|
1383
1088
|
var _a, _b;
|
|
1384
1089
|
return __awaiter(this, void 0, void 0, function () {
|
|
1385
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
1090
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
1386
1091
|
return __generator(this, function (_c) {
|
|
1387
1092
|
switch (_c.label) {
|
|
1388
1093
|
case 0:
|
|
@@ -1392,16 +1097,23 @@ var Accounting = /** @class */ (function () {
|
|
|
1392
1097
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1393
1098
|
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/taxrate", req);
|
|
1394
1099
|
client = this.sdkConfiguration.defaultClient;
|
|
1395
|
-
|
|
1396
|
-
|
|
1100
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1101
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1102
|
+
return [4 /*yield*/, globalSecurity()];
|
|
1103
|
+
case 1:
|
|
1104
|
+
globalSecurity = _c.sent();
|
|
1105
|
+
_c.label = 2;
|
|
1106
|
+
case 2:
|
|
1107
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1108
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1397
1109
|
}
|
|
1398
|
-
properties = utils.parseSecurityProperties(
|
|
1110
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1399
1111
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
1400
1112
|
queryParams = utils.serializeQueryParams(req);
|
|
1401
1113
|
headers["Accept"] = "application/json";
|
|
1402
1114
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
1403
1115
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
1404
|
-
case
|
|
1116
|
+
case 3:
|
|
1405
1117
|
httpRes = _c.sent();
|
|
1406
1118
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
1407
1119
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -1436,10 +1148,10 @@ var Accounting = /** @class */ (function () {
|
|
|
1436
1148
|
/**
|
|
1437
1149
|
* List all transactions
|
|
1438
1150
|
*/
|
|
1439
|
-
Accounting.prototype.listAccountingTransactions = function (req,
|
|
1151
|
+
Accounting.prototype.listAccountingTransactions = function (req, config) {
|
|
1440
1152
|
var _a, _b;
|
|
1441
1153
|
return __awaiter(this, void 0, void 0, function () {
|
|
1442
|
-
var baseURL, operationUrl, client, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
1154
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, queryParams, httpRes, responseContentType, res, decodedRes, resFieldDepth;
|
|
1443
1155
|
return __generator(this, function (_c) {
|
|
1444
1156
|
switch (_c.label) {
|
|
1445
1157
|
case 0:
|
|
@@ -1449,16 +1161,23 @@ var Accounting = /** @class */ (function () {
|
|
|
1449
1161
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1450
1162
|
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/transaction", req);
|
|
1451
1163
|
client = this.sdkConfiguration.defaultClient;
|
|
1452
|
-
|
|
1453
|
-
|
|
1164
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1165
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1166
|
+
return [4 /*yield*/, globalSecurity()];
|
|
1167
|
+
case 1:
|
|
1168
|
+
globalSecurity = _c.sent();
|
|
1169
|
+
_c.label = 2;
|
|
1170
|
+
case 2:
|
|
1171
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1172
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1454
1173
|
}
|
|
1455
|
-
properties = utils.parseSecurityProperties(
|
|
1174
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1456
1175
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
1457
1176
|
queryParams = utils.serializeQueryParams(req);
|
|
1458
1177
|
headers["Accept"] = "application/json";
|
|
1459
1178
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
1460
1179
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
1461
|
-
case
|
|
1180
|
+
case 3:
|
|
1462
1181
|
httpRes = _c.sent();
|
|
1463
1182
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
1464
1183
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -1493,10 +1212,10 @@ var Accounting = /** @class */ (function () {
|
|
|
1493
1212
|
/**
|
|
1494
1213
|
* Update an account
|
|
1495
1214
|
*/
|
|
1496
|
-
Accounting.prototype.patchAccountingAccount = function (req,
|
|
1215
|
+
Accounting.prototype.patchAccountingAccount = function (req, config) {
|
|
1497
1216
|
var _a, _b;
|
|
1498
1217
|
return __awaiter(this, void 0, void 0, function () {
|
|
1499
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1218
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1500
1219
|
var _d;
|
|
1501
1220
|
return __generator(this, function (_e) {
|
|
1502
1221
|
switch (_e.label) {
|
|
@@ -1516,15 +1235,22 @@ var Accounting = /** @class */ (function () {
|
|
|
1516
1235
|
}
|
|
1517
1236
|
}
|
|
1518
1237
|
client = this.sdkConfiguration.defaultClient;
|
|
1519
|
-
|
|
1520
|
-
|
|
1238
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1239
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1240
|
+
return [4 /*yield*/, globalSecurity()];
|
|
1241
|
+
case 1:
|
|
1242
|
+
globalSecurity = _e.sent();
|
|
1243
|
+
_e.label = 2;
|
|
1244
|
+
case 2:
|
|
1245
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1246
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1521
1247
|
}
|
|
1522
|
-
properties = utils.parseSecurityProperties(
|
|
1248
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1523
1249
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
1524
1250
|
headers["Accept"] = "application/json";
|
|
1525
1251
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
1526
1252
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "patch", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
1527
|
-
case
|
|
1253
|
+
case 3:
|
|
1528
1254
|
httpRes = _e.sent();
|
|
1529
1255
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
1530
1256
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -1557,10 +1283,10 @@ var Accounting = /** @class */ (function () {
|
|
|
1557
1283
|
/**
|
|
1558
1284
|
* Update a contact
|
|
1559
1285
|
*/
|
|
1560
|
-
Accounting.prototype.patchAccountingContact = function (req,
|
|
1286
|
+
Accounting.prototype.patchAccountingContact = function (req, config) {
|
|
1561
1287
|
var _a, _b;
|
|
1562
1288
|
return __awaiter(this, void 0, void 0, function () {
|
|
1563
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1289
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1564
1290
|
var _d;
|
|
1565
1291
|
return __generator(this, function (_e) {
|
|
1566
1292
|
switch (_e.label) {
|
|
@@ -1580,15 +1306,22 @@ var Accounting = /** @class */ (function () {
|
|
|
1580
1306
|
}
|
|
1581
1307
|
}
|
|
1582
1308
|
client = this.sdkConfiguration.defaultClient;
|
|
1583
|
-
|
|
1584
|
-
|
|
1309
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1310
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1311
|
+
return [4 /*yield*/, globalSecurity()];
|
|
1312
|
+
case 1:
|
|
1313
|
+
globalSecurity = _e.sent();
|
|
1314
|
+
_e.label = 2;
|
|
1315
|
+
case 2:
|
|
1316
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1317
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1585
1318
|
}
|
|
1586
|
-
properties = utils.parseSecurityProperties(
|
|
1319
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1587
1320
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
1588
1321
|
headers["Accept"] = "application/json";
|
|
1589
1322
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
1590
1323
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "patch", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
1591
|
-
case
|
|
1324
|
+
case 3:
|
|
1592
1325
|
httpRes = _e.sent();
|
|
1593
1326
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
1594
1327
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -1621,10 +1354,10 @@ var Accounting = /** @class */ (function () {
|
|
|
1621
1354
|
/**
|
|
1622
1355
|
* Update a invoice
|
|
1623
1356
|
*/
|
|
1624
|
-
Accounting.prototype.patchAccountingInvoice = function (req,
|
|
1357
|
+
Accounting.prototype.patchAccountingInvoice = function (req, config) {
|
|
1625
1358
|
var _a, _b;
|
|
1626
1359
|
return __awaiter(this, void 0, void 0, function () {
|
|
1627
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1360
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1628
1361
|
var _d;
|
|
1629
1362
|
return __generator(this, function (_e) {
|
|
1630
1363
|
switch (_e.label) {
|
|
@@ -1644,15 +1377,22 @@ var Accounting = /** @class */ (function () {
|
|
|
1644
1377
|
}
|
|
1645
1378
|
}
|
|
1646
1379
|
client = this.sdkConfiguration.defaultClient;
|
|
1647
|
-
|
|
1648
|
-
|
|
1380
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1381
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1382
|
+
return [4 /*yield*/, globalSecurity()];
|
|
1383
|
+
case 1:
|
|
1384
|
+
globalSecurity = _e.sent();
|
|
1385
|
+
_e.label = 2;
|
|
1386
|
+
case 2:
|
|
1387
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1388
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1649
1389
|
}
|
|
1650
|
-
properties = utils.parseSecurityProperties(
|
|
1390
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1651
1391
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
1652
1392
|
headers["Accept"] = "application/json";
|
|
1653
1393
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
1654
1394
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "patch", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
1655
|
-
case
|
|
1395
|
+
case 3:
|
|
1656
1396
|
httpRes = _e.sent();
|
|
1657
1397
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
1658
1398
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -1682,77 +1422,13 @@ var Accounting = /** @class */ (function () {
|
|
|
1682
1422
|
});
|
|
1683
1423
|
});
|
|
1684
1424
|
};
|
|
1685
|
-
/**
|
|
1686
|
-
* Update a payment
|
|
1687
|
-
*/
|
|
1688
|
-
Accounting.prototype.patchAccountingPayment = function (req, security, config) {
|
|
1689
|
-
var _a, _b;
|
|
1690
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1691
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1692
|
-
var _d;
|
|
1693
|
-
return __generator(this, function (_e) {
|
|
1694
|
-
switch (_e.label) {
|
|
1695
|
-
case 0:
|
|
1696
|
-
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
1697
|
-
req = new operations.PatchAccountingPaymentRequest(req);
|
|
1698
|
-
}
|
|
1699
|
-
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1700
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/payment/{id}", req);
|
|
1701
|
-
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
|
|
1702
|
-
try {
|
|
1703
|
-
_d = __read(utils.serializeRequestBody(req, "accountingPayment", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
|
|
1704
|
-
}
|
|
1705
|
-
catch (e) {
|
|
1706
|
-
if (e instanceof Error) {
|
|
1707
|
-
throw new Error("Error serializing request body, cause: ".concat(e.message));
|
|
1708
|
-
}
|
|
1709
|
-
}
|
|
1710
|
-
client = this.sdkConfiguration.defaultClient;
|
|
1711
|
-
if (!(security instanceof utils.SpeakeasyBase)) {
|
|
1712
|
-
security = new operations.PatchAccountingPaymentSecurity(security);
|
|
1713
|
-
}
|
|
1714
|
-
properties = utils.parseSecurityProperties(security);
|
|
1715
|
-
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
1716
|
-
headers["Accept"] = "application/json";
|
|
1717
|
-
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
1718
|
-
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "patch", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
1719
|
-
case 1:
|
|
1720
|
-
httpRes = _e.sent();
|
|
1721
|
-
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
1722
|
-
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
1723
|
-
throw new Error("status code not found in response: ".concat(httpRes));
|
|
1724
|
-
}
|
|
1725
|
-
res = new operations.PatchAccountingPaymentResponse({
|
|
1726
|
-
statusCode: httpRes.status,
|
|
1727
|
-
contentType: responseContentType,
|
|
1728
|
-
rawResponse: httpRes,
|
|
1729
|
-
});
|
|
1730
|
-
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
1731
|
-
switch (true) {
|
|
1732
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
1733
|
-
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
1734
|
-
res.accountingPayment = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingPayment);
|
|
1735
|
-
}
|
|
1736
|
-
else {
|
|
1737
|
-
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
1738
|
-
}
|
|
1739
|
-
break;
|
|
1740
|
-
case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
1741
|
-
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
1742
|
-
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
1743
|
-
}
|
|
1744
|
-
return [2 /*return*/, res];
|
|
1745
|
-
}
|
|
1746
|
-
});
|
|
1747
|
-
});
|
|
1748
|
-
};
|
|
1749
1425
|
/**
|
|
1750
1426
|
* Update a taxrate
|
|
1751
1427
|
*/
|
|
1752
|
-
Accounting.prototype.patchAccountingTaxrate = function (req,
|
|
1428
|
+
Accounting.prototype.patchAccountingTaxrate = function (req, config) {
|
|
1753
1429
|
var _a, _b;
|
|
1754
1430
|
return __awaiter(this, void 0, void 0, function () {
|
|
1755
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1431
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1756
1432
|
var _d;
|
|
1757
1433
|
return __generator(this, function (_e) {
|
|
1758
1434
|
switch (_e.label) {
|
|
@@ -1772,15 +1448,22 @@ var Accounting = /** @class */ (function () {
|
|
|
1772
1448
|
}
|
|
1773
1449
|
}
|
|
1774
1450
|
client = this.sdkConfiguration.defaultClient;
|
|
1775
|
-
|
|
1776
|
-
|
|
1451
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1452
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1453
|
+
return [4 /*yield*/, globalSecurity()];
|
|
1454
|
+
case 1:
|
|
1455
|
+
globalSecurity = _e.sent();
|
|
1456
|
+
_e.label = 2;
|
|
1457
|
+
case 2:
|
|
1458
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1459
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1777
1460
|
}
|
|
1778
|
-
properties = utils.parseSecurityProperties(
|
|
1461
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1779
1462
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
1780
1463
|
headers["Accept"] = "application/json";
|
|
1781
1464
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
1782
1465
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "patch", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
1783
|
-
case
|
|
1466
|
+
case 3:
|
|
1784
1467
|
httpRes = _e.sent();
|
|
1785
1468
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
1786
1469
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -1813,10 +1496,10 @@ var Accounting = /** @class */ (function () {
|
|
|
1813
1496
|
/**
|
|
1814
1497
|
* Update a transaction
|
|
1815
1498
|
*/
|
|
1816
|
-
Accounting.prototype.patchAccountingTransaction = function (req,
|
|
1499
|
+
Accounting.prototype.patchAccountingTransaction = function (req, config) {
|
|
1817
1500
|
var _a, _b;
|
|
1818
1501
|
return __awaiter(this, void 0, void 0, function () {
|
|
1819
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1502
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1820
1503
|
var _d;
|
|
1821
1504
|
return __generator(this, function (_e) {
|
|
1822
1505
|
switch (_e.label) {
|
|
@@ -1836,15 +1519,22 @@ var Accounting = /** @class */ (function () {
|
|
|
1836
1519
|
}
|
|
1837
1520
|
}
|
|
1838
1521
|
client = this.sdkConfiguration.defaultClient;
|
|
1839
|
-
|
|
1840
|
-
|
|
1522
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1523
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1524
|
+
return [4 /*yield*/, globalSecurity()];
|
|
1525
|
+
case 1:
|
|
1526
|
+
globalSecurity = _e.sent();
|
|
1527
|
+
_e.label = 2;
|
|
1528
|
+
case 2:
|
|
1529
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1530
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1841
1531
|
}
|
|
1842
|
-
properties = utils.parseSecurityProperties(
|
|
1532
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1843
1533
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
1844
1534
|
headers["Accept"] = "application/json";
|
|
1845
1535
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
1846
1536
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "patch", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
1847
|
-
case
|
|
1537
|
+
case 3:
|
|
1848
1538
|
httpRes = _e.sent();
|
|
1849
1539
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
1850
1540
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -1877,10 +1567,10 @@ var Accounting = /** @class */ (function () {
|
|
|
1877
1567
|
/**
|
|
1878
1568
|
* Remove an account
|
|
1879
1569
|
*/
|
|
1880
|
-
Accounting.prototype.removeAccountingAccount = function (req,
|
|
1570
|
+
Accounting.prototype.removeAccountingAccount = function (req, config) {
|
|
1881
1571
|
var _a, _b;
|
|
1882
1572
|
return __awaiter(this, void 0, void 0, function () {
|
|
1883
|
-
var baseURL, operationUrl, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1573
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1884
1574
|
return __generator(this, function (_c) {
|
|
1885
1575
|
switch (_c.label) {
|
|
1886
1576
|
case 0:
|
|
@@ -1890,15 +1580,22 @@ var Accounting = /** @class */ (function () {
|
|
|
1890
1580
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1891
1581
|
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/account/{id}", req);
|
|
1892
1582
|
client = this.sdkConfiguration.defaultClient;
|
|
1893
|
-
|
|
1894
|
-
|
|
1583
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1584
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1585
|
+
return [4 /*yield*/, globalSecurity()];
|
|
1586
|
+
case 1:
|
|
1587
|
+
globalSecurity = _c.sent();
|
|
1588
|
+
_c.label = 2;
|
|
1589
|
+
case 2:
|
|
1590
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1591
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1895
1592
|
}
|
|
1896
|
-
properties = utils.parseSecurityProperties(
|
|
1593
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1897
1594
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
1898
1595
|
headers["Accept"] = "application/json";
|
|
1899
1596
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
1900
1597
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "delete", headers: headers, responseType: "arraybuffer" }, config))];
|
|
1901
|
-
case
|
|
1598
|
+
case 3:
|
|
1902
1599
|
httpRes = _c.sent();
|
|
1903
1600
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
1904
1601
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -1931,10 +1628,10 @@ var Accounting = /** @class */ (function () {
|
|
|
1931
1628
|
/**
|
|
1932
1629
|
* Remove a contact
|
|
1933
1630
|
*/
|
|
1934
|
-
Accounting.prototype.removeAccountingContact = function (req,
|
|
1631
|
+
Accounting.prototype.removeAccountingContact = function (req, config) {
|
|
1935
1632
|
var _a, _b;
|
|
1936
1633
|
return __awaiter(this, void 0, void 0, function () {
|
|
1937
|
-
var baseURL, operationUrl, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1634
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1938
1635
|
return __generator(this, function (_c) {
|
|
1939
1636
|
switch (_c.label) {
|
|
1940
1637
|
case 0:
|
|
@@ -1944,15 +1641,22 @@ var Accounting = /** @class */ (function () {
|
|
|
1944
1641
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1945
1642
|
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/contact/{id}", req);
|
|
1946
1643
|
client = this.sdkConfiguration.defaultClient;
|
|
1947
|
-
|
|
1948
|
-
|
|
1644
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1645
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1646
|
+
return [4 /*yield*/, globalSecurity()];
|
|
1647
|
+
case 1:
|
|
1648
|
+
globalSecurity = _c.sent();
|
|
1649
|
+
_c.label = 2;
|
|
1650
|
+
case 2:
|
|
1651
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1652
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
1949
1653
|
}
|
|
1950
|
-
properties = utils.parseSecurityProperties(
|
|
1654
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
1951
1655
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
1952
1656
|
headers["Accept"] = "application/json";
|
|
1953
1657
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
1954
1658
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "delete", headers: headers, responseType: "arraybuffer" }, config))];
|
|
1955
|
-
case
|
|
1659
|
+
case 3:
|
|
1956
1660
|
httpRes = _c.sent();
|
|
1957
1661
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
1958
1662
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -1985,10 +1689,10 @@ var Accounting = /** @class */ (function () {
|
|
|
1985
1689
|
/**
|
|
1986
1690
|
* Remove a invoice
|
|
1987
1691
|
*/
|
|
1988
|
-
Accounting.prototype.removeAccountingInvoice = function (req,
|
|
1692
|
+
Accounting.prototype.removeAccountingInvoice = function (req, config) {
|
|
1989
1693
|
var _a, _b;
|
|
1990
1694
|
return __awaiter(this, void 0, void 0, function () {
|
|
1991
|
-
var baseURL, operationUrl, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1695
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1992
1696
|
return __generator(this, function (_c) {
|
|
1993
1697
|
switch (_c.label) {
|
|
1994
1698
|
case 0:
|
|
@@ -1998,75 +1702,28 @@ var Accounting = /** @class */ (function () {
|
|
|
1998
1702
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
1999
1703
|
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/invoice/{id}", req);
|
|
2000
1704
|
client = this.sdkConfiguration.defaultClient;
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
properties = utils.parseSecurityProperties(security);
|
|
2005
|
-
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
2006
|
-
headers["Accept"] = "application/json";
|
|
2007
|
-
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
2008
|
-
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "delete", headers: headers, responseType: "arraybuffer" }, config))];
|
|
1705
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1706
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1707
|
+
return [4 /*yield*/, globalSecurity()];
|
|
2009
1708
|
case 1:
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
res = new operations.RemoveAccountingInvoiceResponse({
|
|
2016
|
-
statusCode: httpRes.status,
|
|
2017
|
-
contentType: responseContentType,
|
|
2018
|
-
rawResponse: httpRes,
|
|
2019
|
-
});
|
|
2020
|
-
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
2021
|
-
switch (true) {
|
|
2022
|
-
case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
2023
|
-
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
2024
|
-
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
2025
|
-
default:
|
|
2026
|
-
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
2027
|
-
res.res = decodedRes;
|
|
2028
|
-
}
|
|
2029
|
-
else {
|
|
2030
|
-
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
2031
|
-
}
|
|
2032
|
-
break;
|
|
2033
|
-
}
|
|
2034
|
-
return [2 /*return*/, res];
|
|
2035
|
-
}
|
|
2036
|
-
});
|
|
2037
|
-
});
|
|
2038
|
-
};
|
|
2039
|
-
/**
|
|
2040
|
-
* Remove a payment
|
|
2041
|
-
*/
|
|
2042
|
-
Accounting.prototype.removeAccountingPayment = function (req, security, config) {
|
|
2043
|
-
var _a, _b;
|
|
2044
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2045
|
-
var baseURL, operationUrl, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
2046
|
-
return __generator(this, function (_c) {
|
|
2047
|
-
switch (_c.label) {
|
|
2048
|
-
case 0:
|
|
2049
|
-
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
2050
|
-
req = new operations.RemoveAccountingPaymentRequest(req);
|
|
1709
|
+
globalSecurity = _c.sent();
|
|
1710
|
+
_c.label = 2;
|
|
1711
|
+
case 2:
|
|
1712
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1713
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
2051
1714
|
}
|
|
2052
|
-
|
|
2053
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/payment/{id}", req);
|
|
2054
|
-
client = this.sdkConfiguration.defaultClient;
|
|
2055
|
-
if (!(security instanceof utils.SpeakeasyBase)) {
|
|
2056
|
-
security = new operations.RemoveAccountingPaymentSecurity(security);
|
|
2057
|
-
}
|
|
2058
|
-
properties = utils.parseSecurityProperties(security);
|
|
1715
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
2059
1716
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
2060
1717
|
headers["Accept"] = "application/json";
|
|
2061
1718
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
2062
1719
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "delete", headers: headers, responseType: "arraybuffer" }, config))];
|
|
2063
|
-
case
|
|
1720
|
+
case 3:
|
|
2064
1721
|
httpRes = _c.sent();
|
|
2065
1722
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
2066
1723
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
2067
1724
|
throw new Error("status code not found in response: ".concat(httpRes));
|
|
2068
1725
|
}
|
|
2069
|
-
res = new operations.
|
|
1726
|
+
res = new operations.RemoveAccountingInvoiceResponse({
|
|
2070
1727
|
statusCode: httpRes.status,
|
|
2071
1728
|
contentType: responseContentType,
|
|
2072
1729
|
rawResponse: httpRes,
|
|
@@ -2093,10 +1750,10 @@ var Accounting = /** @class */ (function () {
|
|
|
2093
1750
|
/**
|
|
2094
1751
|
* Remove a taxrate
|
|
2095
1752
|
*/
|
|
2096
|
-
Accounting.prototype.removeAccountingTaxrate = function (req,
|
|
1753
|
+
Accounting.prototype.removeAccountingTaxrate = function (req, config) {
|
|
2097
1754
|
var _a, _b;
|
|
2098
1755
|
return __awaiter(this, void 0, void 0, function () {
|
|
2099
|
-
var baseURL, operationUrl, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1756
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
2100
1757
|
return __generator(this, function (_c) {
|
|
2101
1758
|
switch (_c.label) {
|
|
2102
1759
|
case 0:
|
|
@@ -2106,15 +1763,22 @@ var Accounting = /** @class */ (function () {
|
|
|
2106
1763
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
2107
1764
|
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/taxrate/{id}", req);
|
|
2108
1765
|
client = this.sdkConfiguration.defaultClient;
|
|
2109
|
-
|
|
2110
|
-
|
|
1766
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1767
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1768
|
+
return [4 /*yield*/, globalSecurity()];
|
|
1769
|
+
case 1:
|
|
1770
|
+
globalSecurity = _c.sent();
|
|
1771
|
+
_c.label = 2;
|
|
1772
|
+
case 2:
|
|
1773
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1774
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
2111
1775
|
}
|
|
2112
|
-
properties = utils.parseSecurityProperties(
|
|
1776
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
2113
1777
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
2114
1778
|
headers["Accept"] = "application/json";
|
|
2115
1779
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
2116
1780
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "delete", headers: headers, responseType: "arraybuffer" }, config))];
|
|
2117
|
-
case
|
|
1781
|
+
case 3:
|
|
2118
1782
|
httpRes = _c.sent();
|
|
2119
1783
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
2120
1784
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -2147,10 +1811,10 @@ var Accounting = /** @class */ (function () {
|
|
|
2147
1811
|
/**
|
|
2148
1812
|
* Remove a transaction
|
|
2149
1813
|
*/
|
|
2150
|
-
Accounting.prototype.removeAccountingTransaction = function (req,
|
|
1814
|
+
Accounting.prototype.removeAccountingTransaction = function (req, config) {
|
|
2151
1815
|
var _a, _b;
|
|
2152
1816
|
return __awaiter(this, void 0, void 0, function () {
|
|
2153
|
-
var baseURL, operationUrl, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1817
|
+
var baseURL, operationUrl, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
2154
1818
|
return __generator(this, function (_c) {
|
|
2155
1819
|
switch (_c.label) {
|
|
2156
1820
|
case 0:
|
|
@@ -2160,15 +1824,22 @@ var Accounting = /** @class */ (function () {
|
|
|
2160
1824
|
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
2161
1825
|
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/transaction/{id}", req);
|
|
2162
1826
|
client = this.sdkConfiguration.defaultClient;
|
|
2163
|
-
|
|
2164
|
-
|
|
1827
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1828
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1829
|
+
return [4 /*yield*/, globalSecurity()];
|
|
1830
|
+
case 1:
|
|
1831
|
+
globalSecurity = _c.sent();
|
|
1832
|
+
_c.label = 2;
|
|
1833
|
+
case 2:
|
|
1834
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1835
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
2165
1836
|
}
|
|
2166
|
-
properties = utils.parseSecurityProperties(
|
|
1837
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
2167
1838
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
2168
1839
|
headers["Accept"] = "application/json";
|
|
2169
1840
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
2170
1841
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "delete", headers: headers, responseType: "arraybuffer" }, config))];
|
|
2171
|
-
case
|
|
1842
|
+
case 3:
|
|
2172
1843
|
httpRes = _c.sent();
|
|
2173
1844
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
2174
1845
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -2201,10 +1872,10 @@ var Accounting = /** @class */ (function () {
|
|
|
2201
1872
|
/**
|
|
2202
1873
|
* Update an account
|
|
2203
1874
|
*/
|
|
2204
|
-
Accounting.prototype.updateAccountingAccount = function (req,
|
|
1875
|
+
Accounting.prototype.updateAccountingAccount = function (req, config) {
|
|
2205
1876
|
var _a, _b;
|
|
2206
1877
|
return __awaiter(this, void 0, void 0, function () {
|
|
2207
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1878
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
2208
1879
|
var _d;
|
|
2209
1880
|
return __generator(this, function (_e) {
|
|
2210
1881
|
switch (_e.label) {
|
|
@@ -2224,15 +1895,22 @@ var Accounting = /** @class */ (function () {
|
|
|
2224
1895
|
}
|
|
2225
1896
|
}
|
|
2226
1897
|
client = this.sdkConfiguration.defaultClient;
|
|
2227
|
-
|
|
2228
|
-
|
|
1898
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1899
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1900
|
+
return [4 /*yield*/, globalSecurity()];
|
|
1901
|
+
case 1:
|
|
1902
|
+
globalSecurity = _e.sent();
|
|
1903
|
+
_e.label = 2;
|
|
1904
|
+
case 2:
|
|
1905
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1906
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
2229
1907
|
}
|
|
2230
|
-
properties = utils.parseSecurityProperties(
|
|
1908
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
2231
1909
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
2232
1910
|
headers["Accept"] = "application/json";
|
|
2233
1911
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
2234
1912
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "put", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
2235
|
-
case
|
|
1913
|
+
case 3:
|
|
2236
1914
|
httpRes = _e.sent();
|
|
2237
1915
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
2238
1916
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -2265,10 +1943,10 @@ var Accounting = /** @class */ (function () {
|
|
|
2265
1943
|
/**
|
|
2266
1944
|
* Update a contact
|
|
2267
1945
|
*/
|
|
2268
|
-
Accounting.prototype.updateAccountingContact = function (req,
|
|
1946
|
+
Accounting.prototype.updateAccountingContact = function (req, config) {
|
|
2269
1947
|
var _a, _b;
|
|
2270
1948
|
return __awaiter(this, void 0, void 0, function () {
|
|
2271
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
1949
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
2272
1950
|
var _d;
|
|
2273
1951
|
return __generator(this, function (_e) {
|
|
2274
1952
|
switch (_e.label) {
|
|
@@ -2288,15 +1966,22 @@ var Accounting = /** @class */ (function () {
|
|
|
2288
1966
|
}
|
|
2289
1967
|
}
|
|
2290
1968
|
client = this.sdkConfiguration.defaultClient;
|
|
2291
|
-
|
|
2292
|
-
|
|
1969
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
1970
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
1971
|
+
return [4 /*yield*/, globalSecurity()];
|
|
1972
|
+
case 1:
|
|
1973
|
+
globalSecurity = _e.sent();
|
|
1974
|
+
_e.label = 2;
|
|
1975
|
+
case 2:
|
|
1976
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
1977
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
2293
1978
|
}
|
|
2294
|
-
properties = utils.parseSecurityProperties(
|
|
1979
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
2295
1980
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
2296
1981
|
headers["Accept"] = "application/json";
|
|
2297
1982
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
2298
1983
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "put", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
2299
|
-
case
|
|
1984
|
+
case 3:
|
|
2300
1985
|
httpRes = _e.sent();
|
|
2301
1986
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
2302
1987
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -2329,10 +2014,10 @@ var Accounting = /** @class */ (function () {
|
|
|
2329
2014
|
/**
|
|
2330
2015
|
* Update a invoice
|
|
2331
2016
|
*/
|
|
2332
|
-
Accounting.prototype.updateAccountingInvoice = function (req,
|
|
2017
|
+
Accounting.prototype.updateAccountingInvoice = function (req, config) {
|
|
2333
2018
|
var _a, _b;
|
|
2334
2019
|
return __awaiter(this, void 0, void 0, function () {
|
|
2335
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
2020
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
2336
2021
|
var _d;
|
|
2337
2022
|
return __generator(this, function (_e) {
|
|
2338
2023
|
switch (_e.label) {
|
|
@@ -2352,15 +2037,22 @@ var Accounting = /** @class */ (function () {
|
|
|
2352
2037
|
}
|
|
2353
2038
|
}
|
|
2354
2039
|
client = this.sdkConfiguration.defaultClient;
|
|
2355
|
-
|
|
2356
|
-
|
|
2040
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
2041
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
2042
|
+
return [4 /*yield*/, globalSecurity()];
|
|
2043
|
+
case 1:
|
|
2044
|
+
globalSecurity = _e.sent();
|
|
2045
|
+
_e.label = 2;
|
|
2046
|
+
case 2:
|
|
2047
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
2048
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
2357
2049
|
}
|
|
2358
|
-
properties = utils.parseSecurityProperties(
|
|
2050
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
2359
2051
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
2360
2052
|
headers["Accept"] = "application/json";
|
|
2361
2053
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
2362
2054
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "put", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
2363
|
-
case
|
|
2055
|
+
case 3:
|
|
2364
2056
|
httpRes = _e.sent();
|
|
2365
2057
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
2366
2058
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -2390,77 +2082,13 @@ var Accounting = /** @class */ (function () {
|
|
|
2390
2082
|
});
|
|
2391
2083
|
});
|
|
2392
2084
|
};
|
|
2393
|
-
/**
|
|
2394
|
-
* Update a payment
|
|
2395
|
-
*/
|
|
2396
|
-
Accounting.prototype.updateAccountingPayment = function (req, security, config) {
|
|
2397
|
-
var _a, _b;
|
|
2398
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2399
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
2400
|
-
var _d;
|
|
2401
|
-
return __generator(this, function (_e) {
|
|
2402
|
-
switch (_e.label) {
|
|
2403
|
-
case 0:
|
|
2404
|
-
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
2405
|
-
req = new operations.UpdateAccountingPaymentRequest(req);
|
|
2406
|
-
}
|
|
2407
|
-
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
2408
|
-
operationUrl = utils.generateURL(baseURL, "/accounting/{connection_id}/payment/{id}", req);
|
|
2409
|
-
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
|
|
2410
|
-
try {
|
|
2411
|
-
_d = __read(utils.serializeRequestBody(req, "accountingPayment", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
|
|
2412
|
-
}
|
|
2413
|
-
catch (e) {
|
|
2414
|
-
if (e instanceof Error) {
|
|
2415
|
-
throw new Error("Error serializing request body, cause: ".concat(e.message));
|
|
2416
|
-
}
|
|
2417
|
-
}
|
|
2418
|
-
client = this.sdkConfiguration.defaultClient;
|
|
2419
|
-
if (!(security instanceof utils.SpeakeasyBase)) {
|
|
2420
|
-
security = new operations.UpdateAccountingPaymentSecurity(security);
|
|
2421
|
-
}
|
|
2422
|
-
properties = utils.parseSecurityProperties(security);
|
|
2423
|
-
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
2424
|
-
headers["Accept"] = "application/json";
|
|
2425
|
-
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
2426
|
-
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "put", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
2427
|
-
case 1:
|
|
2428
|
-
httpRes = _e.sent();
|
|
2429
|
-
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
2430
|
-
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
2431
|
-
throw new Error("status code not found in response: ".concat(httpRes));
|
|
2432
|
-
}
|
|
2433
|
-
res = new operations.UpdateAccountingPaymentResponse({
|
|
2434
|
-
statusCode: httpRes.status,
|
|
2435
|
-
contentType: responseContentType,
|
|
2436
|
-
rawResponse: httpRes,
|
|
2437
|
-
});
|
|
2438
|
-
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
2439
|
-
switch (true) {
|
|
2440
|
-
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
2441
|
-
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
2442
|
-
res.accountingPayment = utils.objectToClass(JSON.parse(decodedRes), shared.AccountingPayment);
|
|
2443
|
-
}
|
|
2444
|
-
else {
|
|
2445
|
-
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
2446
|
-
}
|
|
2447
|
-
break;
|
|
2448
|
-
case ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 400 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 500) ||
|
|
2449
|
-
((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) >= 500 && (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) < 600):
|
|
2450
|
-
throw new errors.SDKError("API error occurred", httpRes.status, decodedRes, httpRes);
|
|
2451
|
-
}
|
|
2452
|
-
return [2 /*return*/, res];
|
|
2453
|
-
}
|
|
2454
|
-
});
|
|
2455
|
-
});
|
|
2456
|
-
};
|
|
2457
2085
|
/**
|
|
2458
2086
|
* Update a taxrate
|
|
2459
2087
|
*/
|
|
2460
|
-
Accounting.prototype.updateAccountingTaxrate = function (req,
|
|
2088
|
+
Accounting.prototype.updateAccountingTaxrate = function (req, config) {
|
|
2461
2089
|
var _a, _b;
|
|
2462
2090
|
return __awaiter(this, void 0, void 0, function () {
|
|
2463
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
2091
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
2464
2092
|
var _d;
|
|
2465
2093
|
return __generator(this, function (_e) {
|
|
2466
2094
|
switch (_e.label) {
|
|
@@ -2480,15 +2108,22 @@ var Accounting = /** @class */ (function () {
|
|
|
2480
2108
|
}
|
|
2481
2109
|
}
|
|
2482
2110
|
client = this.sdkConfiguration.defaultClient;
|
|
2483
|
-
|
|
2484
|
-
|
|
2111
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
2112
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
2113
|
+
return [4 /*yield*/, globalSecurity()];
|
|
2114
|
+
case 1:
|
|
2115
|
+
globalSecurity = _e.sent();
|
|
2116
|
+
_e.label = 2;
|
|
2117
|
+
case 2:
|
|
2118
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
2119
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
2485
2120
|
}
|
|
2486
|
-
properties = utils.parseSecurityProperties(
|
|
2121
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
2487
2122
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
2488
2123
|
headers["Accept"] = "application/json";
|
|
2489
2124
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
2490
2125
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "put", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
2491
|
-
case
|
|
2126
|
+
case 3:
|
|
2492
2127
|
httpRes = _e.sent();
|
|
2493
2128
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
2494
2129
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
@@ -2521,10 +2156,10 @@ var Accounting = /** @class */ (function () {
|
|
|
2521
2156
|
/**
|
|
2522
2157
|
* Update a transaction
|
|
2523
2158
|
*/
|
|
2524
|
-
Accounting.prototype.updateAccountingTransaction = function (req,
|
|
2159
|
+
Accounting.prototype.updateAccountingTransaction = function (req, config) {
|
|
2525
2160
|
var _a, _b;
|
|
2526
2161
|
return __awaiter(this, void 0, void 0, function () {
|
|
2527
|
-
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
2162
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
2528
2163
|
var _d;
|
|
2529
2164
|
return __generator(this, function (_e) {
|
|
2530
2165
|
switch (_e.label) {
|
|
@@ -2544,15 +2179,22 @@ var Accounting = /** @class */ (function () {
|
|
|
2544
2179
|
}
|
|
2545
2180
|
}
|
|
2546
2181
|
client = this.sdkConfiguration.defaultClient;
|
|
2547
|
-
|
|
2548
|
-
|
|
2182
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
2183
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
2184
|
+
return [4 /*yield*/, globalSecurity()];
|
|
2185
|
+
case 1:
|
|
2186
|
+
globalSecurity = _e.sent();
|
|
2187
|
+
_e.label = 2;
|
|
2188
|
+
case 2:
|
|
2189
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
2190
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
2549
2191
|
}
|
|
2550
|
-
properties = utils.parseSecurityProperties(
|
|
2192
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
2551
2193
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
2552
2194
|
headers["Accept"] = "application/json";
|
|
2553
2195
|
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
2554
2196
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "put", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
2555
|
-
case
|
|
2197
|
+
case 3:
|
|
2556
2198
|
httpRes = _e.sent();
|
|
2557
2199
|
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
2558
2200
|
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|