@apideck/unify 0.42.0 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -1
- package/funcs/accountingAttachmentsList.d.ts.map +1 -1
- package/funcs/accountingAttachmentsList.js +1 -2
- package/funcs/accountingAttachmentsList.js.map +1 -1
- package/funcs/accountingBankAccountsList.d.ts.map +1 -1
- package/funcs/accountingBankAccountsList.js +1 -2
- package/funcs/accountingBankAccountsList.js.map +1 -1
- package/funcs/accountingBankFeedAccountsList.d.ts.map +1 -1
- package/funcs/accountingBankFeedAccountsList.js +1 -2
- package/funcs/accountingBankFeedAccountsList.js.map +1 -1
- package/funcs/accountingBankFeedStatementsList.d.ts.map +1 -1
- package/funcs/accountingBankFeedStatementsList.js +1 -2
- package/funcs/accountingBankFeedStatementsList.js.map +1 -1
- package/funcs/accountingBillPaymentsList.d.ts.map +1 -1
- package/funcs/accountingBillPaymentsList.js +1 -2
- package/funcs/accountingBillPaymentsList.js.map +1 -1
- package/funcs/accountingBillsList.d.ts.map +1 -1
- package/funcs/accountingBillsList.js +1 -2
- package/funcs/accountingBillsList.js.map +1 -1
- package/funcs/accountingCategoriesList.d.ts.map +1 -1
- package/funcs/accountingCategoriesList.js +1 -2
- package/funcs/accountingCategoriesList.js.map +1 -1
- package/funcs/accountingCompaniesList.d.ts.map +1 -1
- package/funcs/accountingCompaniesList.js +1 -2
- package/funcs/accountingCompaniesList.js.map +1 -1
- package/funcs/accountingCreditNotesList.d.ts.map +1 -1
- package/funcs/accountingCreditNotesList.js +1 -2
- package/funcs/accountingCreditNotesList.js.map +1 -1
- package/funcs/accountingCustomersList.d.ts.map +1 -1
- package/funcs/accountingCustomersList.js +1 -2
- package/funcs/accountingCustomersList.js.map +1 -1
- package/funcs/accountingDepartmentsList.d.ts.map +1 -1
- package/funcs/accountingDepartmentsList.js +1 -2
- package/funcs/accountingDepartmentsList.js.map +1 -1
- package/funcs/accountingEmployeesList.d.ts.map +1 -1
- package/funcs/accountingEmployeesList.js +1 -2
- package/funcs/accountingEmployeesList.js.map +1 -1
- package/funcs/accountingExpenseCategoriesList.d.ts.map +1 -1
- package/funcs/accountingExpenseCategoriesList.js +1 -2
- package/funcs/accountingExpenseCategoriesList.js.map +1 -1
- package/funcs/accountingExpenseReportsList.d.ts.map +1 -1
- package/funcs/accountingExpenseReportsList.js +1 -2
- package/funcs/accountingExpenseReportsList.js.map +1 -1
- package/funcs/accountingExpensesList.d.ts.map +1 -1
- package/funcs/accountingExpensesList.js +1 -2
- package/funcs/accountingExpensesList.js.map +1 -1
- package/funcs/accountingGeneralLedgerTransactionsGet.d.ts +18 -0
- package/funcs/accountingGeneralLedgerTransactionsGet.d.ts.map +1 -0
- package/funcs/accountingGeneralLedgerTransactionsGet.js +144 -0
- package/funcs/accountingGeneralLedgerTransactionsGet.js.map +1 -0
- package/funcs/accountingGeneralLedgerTransactionsList.d.ts +21 -0
- package/funcs/accountingGeneralLedgerTransactionsList.d.ts.map +1 -0
- package/funcs/accountingGeneralLedgerTransactionsList.js +168 -0
- package/funcs/accountingGeneralLedgerTransactionsList.js.map +1 -0
- package/funcs/accountingInvoiceItemsList.d.ts.map +1 -1
- package/funcs/accountingInvoiceItemsList.js +1 -2
- package/funcs/accountingInvoiceItemsList.js.map +1 -1
- package/funcs/accountingInvoicesList.d.ts.map +1 -1
- package/funcs/accountingInvoicesList.js +1 -2
- package/funcs/accountingInvoicesList.js.map +1 -1
- package/funcs/accountingJournalEntriesList.d.ts.map +1 -1
- package/funcs/accountingJournalEntriesList.js +1 -2
- package/funcs/accountingJournalEntriesList.js.map +1 -1
- package/funcs/accountingLedgerAccountsList.d.ts.map +1 -1
- package/funcs/accountingLedgerAccountsList.js +1 -2
- package/funcs/accountingLedgerAccountsList.js.map +1 -1
- package/funcs/accountingLocationsList.d.ts.map +1 -1
- package/funcs/accountingLocationsList.js +1 -2
- package/funcs/accountingLocationsList.js.map +1 -1
- package/funcs/accountingPaymentsList.d.ts.map +1 -1
- package/funcs/accountingPaymentsList.js +1 -2
- package/funcs/accountingPaymentsList.js.map +1 -1
- package/funcs/accountingProjectsList.d.ts.map +1 -1
- package/funcs/accountingProjectsList.js +1 -2
- package/funcs/accountingProjectsList.js.map +1 -1
- package/funcs/accountingPurchaseOrdersList.d.ts.map +1 -1
- package/funcs/accountingPurchaseOrdersList.js +1 -2
- package/funcs/accountingPurchaseOrdersList.js.map +1 -1
- package/funcs/accountingQuotesList.d.ts.map +1 -1
- package/funcs/accountingQuotesList.js +5 -4
- package/funcs/accountingQuotesList.js.map +1 -1
- package/funcs/accountingRefundsList.d.ts.map +1 -1
- package/funcs/accountingRefundsList.js +1 -2
- package/funcs/accountingRefundsList.js.map +1 -1
- package/funcs/accountingSubsidiariesList.d.ts.map +1 -1
- package/funcs/accountingSubsidiariesList.js +1 -2
- package/funcs/accountingSubsidiariesList.js.map +1 -1
- package/funcs/accountingSuppliersList.d.ts.map +1 -1
- package/funcs/accountingSuppliersList.js +1 -2
- package/funcs/accountingSuppliersList.js.map +1 -1
- package/funcs/accountingTaxRatesList.d.ts.map +1 -1
- package/funcs/accountingTaxRatesList.js +1 -2
- package/funcs/accountingTaxRatesList.js.map +1 -1
- package/funcs/accountingTrackingCategoriesList.d.ts.map +1 -1
- package/funcs/accountingTrackingCategoriesList.js +1 -2
- package/funcs/accountingTrackingCategoriesList.js.map +1 -1
- package/funcs/atsApplicantsList.d.ts.map +1 -1
- package/funcs/atsApplicantsList.js +1 -2
- package/funcs/atsApplicantsList.js.map +1 -1
- package/funcs/atsApplicationsList.d.ts.map +1 -1
- package/funcs/atsApplicationsList.js +1 -2
- package/funcs/atsApplicationsList.js.map +1 -1
- package/funcs/atsJobsList.d.ts.map +1 -1
- package/funcs/atsJobsList.js +1 -2
- package/funcs/atsJobsList.js.map +1 -1
- package/funcs/connectorApisList.d.ts.map +1 -1
- package/funcs/connectorApisList.js +1 -2
- package/funcs/connectorApisList.js.map +1 -1
- package/funcs/connectorConnectorsList.d.ts.map +1 -1
- package/funcs/connectorConnectorsList.js +1 -2
- package/funcs/connectorConnectorsList.js.map +1 -1
- package/funcs/crmActivitiesList.d.ts.map +1 -1
- package/funcs/crmActivitiesList.js +1 -2
- package/funcs/crmActivitiesList.js.map +1 -1
- package/funcs/crmCompaniesList.d.ts.map +1 -1
- package/funcs/crmCompaniesList.js +1 -2
- package/funcs/crmCompaniesList.js.map +1 -1
- package/funcs/crmContactsList.d.ts.map +1 -1
- package/funcs/crmContactsList.js +1 -2
- package/funcs/crmContactsList.js.map +1 -1
- package/funcs/crmCustomObjectSchemasList.d.ts.map +1 -1
- package/funcs/crmCustomObjectSchemasList.js +1 -2
- package/funcs/crmCustomObjectSchemasList.js.map +1 -1
- package/funcs/crmCustomObjectsList.d.ts.map +1 -1
- package/funcs/crmCustomObjectsList.js +1 -2
- package/funcs/crmCustomObjectsList.js.map +1 -1
- package/funcs/crmLeadsList.d.ts.map +1 -1
- package/funcs/crmLeadsList.js +1 -2
- package/funcs/crmLeadsList.js.map +1 -1
- package/funcs/crmNotesList.d.ts.map +1 -1
- package/funcs/crmNotesList.js +2 -2
- package/funcs/crmNotesList.js.map +1 -1
- package/funcs/crmOpportunitiesList.d.ts.map +1 -1
- package/funcs/crmOpportunitiesList.js +1 -2
- package/funcs/crmOpportunitiesList.js.map +1 -1
- package/funcs/crmPipelinesList.d.ts.map +1 -1
- package/funcs/crmPipelinesList.js +1 -2
- package/funcs/crmPipelinesList.js.map +1 -1
- package/funcs/crmUsersList.d.ts.map +1 -1
- package/funcs/crmUsersList.js +2 -2
- package/funcs/crmUsersList.js.map +1 -1
- package/funcs/ecommerceCustomersList.d.ts.map +1 -1
- package/funcs/ecommerceCustomersList.js +1 -2
- package/funcs/ecommerceCustomersList.js.map +1 -1
- package/funcs/ecommerceOrdersList.d.ts.map +1 -1
- package/funcs/ecommerceOrdersList.js +1 -2
- package/funcs/ecommerceOrdersList.js.map +1 -1
- package/funcs/ecommerceProductsList.d.ts.map +1 -1
- package/funcs/ecommerceProductsList.js +1 -2
- package/funcs/ecommerceProductsList.js.map +1 -1
- package/funcs/fileStorageDriveGroupsList.d.ts.map +1 -1
- package/funcs/fileStorageDriveGroupsList.js +1 -2
- package/funcs/fileStorageDriveGroupsList.js.map +1 -1
- package/funcs/fileStorageDrivesList.d.ts.map +1 -1
- package/funcs/fileStorageDrivesList.js +1 -2
- package/funcs/fileStorageDrivesList.js.map +1 -1
- package/funcs/fileStorageFilesList.d.ts.map +1 -1
- package/funcs/fileStorageFilesList.js +1 -2
- package/funcs/fileStorageFilesList.js.map +1 -1
- package/funcs/fileStorageSharedLinksList.d.ts.map +1 -1
- package/funcs/fileStorageSharedLinksList.js +1 -2
- package/funcs/fileStorageSharedLinksList.js.map +1 -1
- package/funcs/hrisCompaniesList.d.ts.map +1 -1
- package/funcs/hrisCompaniesList.js +1 -2
- package/funcs/hrisCompaniesList.js.map +1 -1
- package/funcs/hrisDepartmentsList.d.ts.map +1 -1
- package/funcs/hrisDepartmentsList.js +1 -2
- package/funcs/hrisDepartmentsList.js.map +1 -1
- package/funcs/hrisEmployeesList.d.ts.map +1 -1
- package/funcs/hrisEmployeesList.js +1 -2
- package/funcs/hrisEmployeesList.js.map +1 -1
- package/funcs/hrisTimeOffRequestsList.d.ts.map +1 -1
- package/funcs/hrisTimeOffRequestsList.js +1 -2
- package/funcs/hrisTimeOffRequestsList.js.map +1 -1
- package/funcs/issueTrackingCollectionTagsList.d.ts.map +1 -1
- package/funcs/issueTrackingCollectionTagsList.js +1 -2
- package/funcs/issueTrackingCollectionTagsList.js.map +1 -1
- package/funcs/issueTrackingCollectionTicketCommentsGet.d.ts.map +1 -1
- package/funcs/issueTrackingCollectionTicketCommentsGet.js +1 -2
- package/funcs/issueTrackingCollectionTicketCommentsGet.js.map +1 -1
- package/funcs/issueTrackingCollectionTicketCommentsList.d.ts.map +1 -1
- package/funcs/issueTrackingCollectionTicketCommentsList.js +1 -2
- package/funcs/issueTrackingCollectionTicketCommentsList.js.map +1 -1
- package/funcs/issueTrackingCollectionTicketsList.d.ts.map +1 -1
- package/funcs/issueTrackingCollectionTicketsList.js +1 -2
- package/funcs/issueTrackingCollectionTicketsList.js.map +1 -1
- package/funcs/issueTrackingCollectionUsersList.d.ts.map +1 -1
- package/funcs/issueTrackingCollectionUsersList.js +1 -2
- package/funcs/issueTrackingCollectionUsersList.js.map +1 -1
- package/funcs/issueTrackingCollectionsList.d.ts.map +1 -1
- package/funcs/issueTrackingCollectionsList.js +1 -2
- package/funcs/issueTrackingCollectionsList.js.map +1 -1
- package/funcs/smsMessagesList.d.ts.map +1 -1
- package/funcs/smsMessagesList.js +1 -2
- package/funcs/smsMessagesList.js.map +1 -1
- package/funcs/vaultConsumersList.d.ts.map +1 -1
- package/funcs/vaultConsumersList.js +1 -2
- package/funcs/vaultConsumersList.js.map +1 -1
- package/funcs/vaultLogsList.d.ts.map +1 -1
- package/funcs/vaultLogsList.js +1 -2
- package/funcs/vaultLogsList.js.map +1 -1
- package/funcs/webhookEventLogsList.d.ts.map +1 -1
- package/funcs/webhookEventLogsList.js +1 -2
- package/funcs/webhookEventLogsList.js.map +1 -1
- package/funcs/webhookWebhooksList.d.ts.map +1 -1
- package/funcs/webhookWebhooksList.js +1 -2
- package/funcs/webhookWebhooksList.js.map +1 -1
- package/hooks/types.d.ts +1 -0
- package/hooks/types.d.ts.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/encodings.js +12 -12
- package/lib/encodings.js.map +1 -1
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +3 -3
- package/lib/env.js.map +1 -1
- package/lib/matchers.js +2 -2
- package/lib/matchers.js.map +1 -1
- package/lib/primitives.d.ts +1 -0
- package/lib/primitives.d.ts.map +1 -1
- package/lib/primitives.js +18 -0
- package/lib/primitives.js.map +1 -1
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +50 -16
- package/lib/sdks.js.map +1 -1
- package/models/components/billsfilter.d.ts +5 -0
- package/models/components/billsfilter.d.ts.map +1 -1
- package/models/components/billsfilter.js +2 -0
- package/models/components/billsfilter.js.map +1 -1
- package/models/components/connection.d.ts +5 -0
- package/models/components/connection.d.ts.map +1 -1
- package/models/components/connection.js +3 -0
- package/models/components/connection.js.map +1 -1
- package/models/components/connectionhealth.d.ts +1 -0
- package/models/components/connectionhealth.d.ts.map +1 -1
- package/models/components/connectionhealth.js +1 -0
- package/models/components/connectionhealth.js.map +1 -1
- package/models/components/creditnotesfilter.d.ts +5 -0
- package/models/components/creditnotesfilter.d.ts.map +1 -1
- package/models/components/creditnotesfilter.js +2 -0
- package/models/components/creditnotesfilter.js.map +1 -1
- package/models/components/customersfilter.d.ts +5 -0
- package/models/components/customersfilter.d.ts.map +1 -1
- package/models/components/customersfilter.js +2 -0
- package/models/components/customersfilter.js.map +1 -1
- package/models/components/expensereportsfilter.d.ts +5 -0
- package/models/components/expensereportsfilter.d.ts.map +1 -1
- package/models/components/expensereportsfilter.js +2 -0
- package/models/components/expensereportsfilter.js.map +1 -1
- package/models/components/generalledgertransaction.d.ts +101 -0
- package/models/components/generalledgertransaction.d.ts.map +1 -0
- package/models/components/generalledgertransaction.js +104 -0
- package/models/components/generalledgertransaction.js.map +1 -0
- package/models/components/generalledgertransactionlineitem.d.ts +56 -0
- package/models/components/generalledgertransactionlineitem.d.ts.map +1 -0
- package/models/components/generalledgertransactionlineitem.js +82 -0
- package/models/components/generalledgertransactionlineitem.js.map +1 -0
- package/models/components/generalledgertransactionsfilter.d.ts +46 -0
- package/models/components/generalledgertransactionsfilter.d.ts.map +1 -0
- package/models/components/generalledgertransactionsfilter.js +75 -0
- package/models/components/generalledgertransactionsfilter.js.map +1 -0
- package/models/components/generalledgertransactionssort.d.ts +36 -0
- package/models/components/generalledgertransactionssort.d.ts.map +1 -0
- package/models/components/generalledgertransactionssort.js +62 -0
- package/models/components/generalledgertransactionssort.js.map +1 -0
- package/models/components/getgeneralledgertransactionresponse.d.ts +40 -0
- package/models/components/getgeneralledgertransactionresponse.d.ts.map +1 -0
- package/models/components/getgeneralledgertransactionresponse.js +64 -0
- package/models/components/getgeneralledgertransactionresponse.js.map +1 -0
- package/models/components/getgeneralledgertransactionsresponse.d.ts +50 -0
- package/models/components/getgeneralledgertransactionsresponse.d.ts.map +1 -0
- package/models/components/getgeneralledgertransactionsresponse.js +68 -0
- package/models/components/getgeneralledgertransactionsresponse.js.map +1 -0
- package/models/components/index.d.ts +9 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +9 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invoiceitemsfilter.d.ts +5 -0
- package/models/components/invoiceitemsfilter.d.ts.map +1 -1
- package/models/components/invoiceitemsfilter.js +2 -0
- package/models/components/invoiceitemsfilter.js.map +1 -1
- package/models/components/invoicesfilter.d.ts +5 -0
- package/models/components/invoicesfilter.d.ts.map +1 -1
- package/models/components/invoicesfilter.js +2 -0
- package/models/components/invoicesfilter.js.map +1 -1
- package/models/components/journalentriesfilter.d.ts +23 -0
- package/models/components/journalentriesfilter.d.ts.map +1 -1
- package/models/components/journalentriesfilter.js +13 -1
- package/models/components/journalentriesfilter.js.map +1 -1
- package/models/components/ledgeraccountsfilter.d.ts +5 -0
- package/models/components/ledgeraccountsfilter.d.ts.map +1 -1
- package/models/components/ledgeraccountsfilter.js +2 -0
- package/models/components/ledgeraccountsfilter.js.map +1 -1
- package/models/components/logsfilter.d.ts +49 -0
- package/models/components/logsfilter.d.ts.map +1 -1
- package/models/components/logsfilter.js +24 -1
- package/models/components/logsfilter.js.map +1 -1
- package/models/components/notesfilter.d.ts +24 -0
- package/models/components/notesfilter.d.ts.map +1 -0
- package/models/components/notesfilter.js +59 -0
- package/models/components/notesfilter.js.map +1 -0
- package/models/components/paymentsfilter.d.ts +5 -0
- package/models/components/paymentsfilter.d.ts.map +1 -1
- package/models/components/paymentsfilter.js +2 -0
- package/models/components/paymentsfilter.js.map +1 -1
- package/models/components/projectsfilter.d.ts +5 -0
- package/models/components/projectsfilter.d.ts.map +1 -1
- package/models/components/projectsfilter.js +2 -0
- package/models/components/projectsfilter.js.map +1 -1
- package/models/components/purchaseordersfilter.d.ts +5 -0
- package/models/components/purchaseordersfilter.d.ts.map +1 -1
- package/models/components/purchaseordersfilter.js +2 -0
- package/models/components/purchaseordersfilter.js.map +1 -1
- package/models/components/quotesfilter.d.ts +19 -0
- package/models/components/quotesfilter.d.ts.map +1 -0
- package/models/components/quotesfilter.js +57 -0
- package/models/components/quotesfilter.js.map +1 -0
- package/models/components/suppliersfilter.d.ts +5 -0
- package/models/components/suppliersfilter.d.ts.map +1 -1
- package/models/components/suppliersfilter.js +2 -0
- package/models/components/suppliersfilter.js.map +1 -1
- package/models/components/user.d.ts +4 -0
- package/models/components/user.d.ts.map +1 -1
- package/models/components/user.js +1 -0
- package/models/components/user.js.map +1 -1
- package/models/components/userinput.d.ts +5 -0
- package/models/components/userinput.d.ts.map +1 -1
- package/models/components/userinput.js +1 -0
- package/models/components/userinput.js.map +1 -1
- package/models/components/usersfilter.d.ts +20 -0
- package/models/components/usersfilter.d.ts.map +1 -0
- package/models/components/usersfilter.js +50 -0
- package/models/components/usersfilter.js.map +1 -0
- package/models/components/webhookeventtype.d.ts +2 -0
- package/models/components/webhookeventtype.d.ts.map +1 -1
- package/models/components/webhookeventtype.js +2 -0
- package/models/components/webhookeventtype.js.map +1 -1
- package/models/operations/accountinggeneralledgertransactionsall.d.ts +96 -0
- package/models/operations/accountinggeneralledgertransactionsall.d.ts.map +1 -0
- package/models/operations/accountinggeneralledgertransactionsall.js +84 -0
- package/models/operations/accountinggeneralledgertransactionsall.js.map +1 -0
- package/models/operations/accountinggeneralledgertransactionsone.d.ts +72 -0
- package/models/operations/accountinggeneralledgertransactionsone.d.ts.map +1 -0
- package/models/operations/accountinggeneralledgertransactionsone.js +75 -0
- package/models/operations/accountinggeneralledgertransactionsone.js.map +1 -0
- package/models/operations/accountingquotesall.d.ts +5 -0
- package/models/operations/accountingquotesall.d.ts.map +1 -1
- package/models/operations/accountingquotesall.js +1 -0
- package/models/operations/accountingquotesall.js.map +1 -1
- package/models/operations/crmnotesall.d.ts +5 -0
- package/models/operations/crmnotesall.d.ts.map +1 -1
- package/models/operations/crmnotesall.js +1 -0
- package/models/operations/crmnotesall.js.map +1 -1
- package/models/operations/crmusersall.d.ts +5 -0
- package/models/operations/crmusersall.d.ts.map +1 -1
- package/models/operations/crmusersall.js +1 -0
- package/models/operations/crmusersall.js.map +1 -1
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/accounting.d.ts +3 -0
- package/sdk/accounting.d.ts.map +1 -1
- package/sdk/accounting.js +4 -0
- package/sdk/accounting.js.map +1 -1
- package/sdk/generalledgertransactions.d.ts +22 -0
- package/sdk/generalledgertransactions.d.ts.map +1 -0
- package/sdk/generalledgertransactions.js +33 -0
- package/sdk/generalledgertransactions.js.map +1 -0
- package/src/__tests__/quotes.test.ts +5 -0
- package/src/funcs/accountingAttachmentsList.ts +5 -2
- package/src/funcs/accountingBankAccountsList.ts +5 -2
- package/src/funcs/accountingBankFeedAccountsList.ts +5 -2
- package/src/funcs/accountingBankFeedStatementsList.ts +5 -2
- package/src/funcs/accountingBillPaymentsList.ts +5 -2
- package/src/funcs/accountingBillsList.ts +5 -2
- package/src/funcs/accountingCategoriesList.ts +5 -2
- package/src/funcs/accountingCompaniesList.ts +5 -2
- package/src/funcs/accountingCreditNotesList.ts +5 -2
- package/src/funcs/accountingCustomersList.ts +5 -2
- package/src/funcs/accountingDepartmentsList.ts +5 -2
- package/src/funcs/accountingEmployeesList.ts +5 -2
- package/src/funcs/accountingExpenseCategoriesList.ts +5 -2
- package/src/funcs/accountingExpenseReportsList.ts +5 -2
- package/src/funcs/accountingExpensesList.ts +5 -2
- package/src/funcs/accountingGeneralLedgerTransactionsGet.ts +241 -0
- package/src/funcs/accountingGeneralLedgerTransactionsList.ts +316 -0
- package/src/funcs/accountingInvoiceItemsList.ts +5 -2
- package/src/funcs/accountingInvoicesList.ts +5 -2
- package/src/funcs/accountingJournalEntriesList.ts +5 -2
- package/src/funcs/accountingLedgerAccountsList.ts +5 -2
- package/src/funcs/accountingLocationsList.ts +5 -2
- package/src/funcs/accountingPaymentsList.ts +5 -2
- package/src/funcs/accountingProjectsList.ts +5 -2
- package/src/funcs/accountingPurchaseOrdersList.ts +5 -2
- package/src/funcs/accountingQuotesList.ts +21 -8
- package/src/funcs/accountingRefundsList.ts +5 -2
- package/src/funcs/accountingSubsidiariesList.ts +5 -2
- package/src/funcs/accountingSuppliersList.ts +5 -2
- package/src/funcs/accountingTaxRatesList.ts +5 -2
- package/src/funcs/accountingTrackingCategoriesList.ts +5 -2
- package/src/funcs/atsApplicantsList.ts +5 -2
- package/src/funcs/atsApplicationsList.ts +5 -2
- package/src/funcs/atsJobsList.ts +5 -2
- package/src/funcs/connectorApisList.ts +5 -2
- package/src/funcs/connectorConnectorsList.ts +5 -2
- package/src/funcs/crmActivitiesList.ts +5 -2
- package/src/funcs/crmCompaniesList.ts +5 -2
- package/src/funcs/crmContactsList.ts +5 -2
- package/src/funcs/crmCustomObjectSchemasList.ts +5 -2
- package/src/funcs/crmCustomObjectsList.ts +5 -2
- package/src/funcs/crmLeadsList.ts +5 -2
- package/src/funcs/crmNotesList.ts +6 -2
- package/src/funcs/crmOpportunitiesList.ts +5 -2
- package/src/funcs/crmPipelinesList.ts +5 -2
- package/src/funcs/crmUsersList.ts +6 -2
- package/src/funcs/ecommerceCustomersList.ts +5 -2
- package/src/funcs/ecommerceOrdersList.ts +5 -2
- package/src/funcs/ecommerceProductsList.ts +5 -2
- package/src/funcs/fileStorageDriveGroupsList.ts +5 -2
- package/src/funcs/fileStorageDrivesList.ts +5 -2
- package/src/funcs/fileStorageFilesList.ts +5 -2
- package/src/funcs/fileStorageSharedLinksList.ts +5 -2
- package/src/funcs/hrisCompaniesList.ts +5 -2
- package/src/funcs/hrisDepartmentsList.ts +5 -2
- package/src/funcs/hrisEmployeesList.ts +5 -2
- package/src/funcs/hrisTimeOffRequestsList.ts +5 -2
- package/src/funcs/issueTrackingCollectionTagsList.ts +5 -2
- package/src/funcs/issueTrackingCollectionTicketCommentsGet.ts +5 -2
- package/src/funcs/issueTrackingCollectionTicketCommentsList.ts +5 -2
- package/src/funcs/issueTrackingCollectionTicketsList.ts +5 -2
- package/src/funcs/issueTrackingCollectionUsersList.ts +5 -2
- package/src/funcs/issueTrackingCollectionsList.ts +5 -2
- package/src/funcs/smsMessagesList.ts +5 -2
- package/src/funcs/vaultConsumersList.ts +5 -2
- package/src/funcs/vaultLogsList.ts +5 -2
- package/src/funcs/webhookEventLogsList.ts +5 -2
- package/src/funcs/webhookWebhooksList.ts +5 -2
- package/src/hooks/types.ts +1 -0
- package/src/lib/config.ts +4 -4
- package/src/lib/encodings.ts +1 -1
- package/src/lib/env.ts +7 -3
- package/src/lib/matchers.ts +1 -1
- package/src/lib/primitives.ts +16 -0
- package/src/lib/sdks.ts +54 -17
- package/src/models/components/billsfilter.ts +7 -0
- package/src/models/components/connection.ts +7 -0
- package/src/models/components/connectionhealth.ts +1 -0
- package/src/models/components/creditnotesfilter.ts +7 -0
- package/src/models/components/customersfilter.ts +7 -0
- package/src/models/components/expensereportsfilter.ts +7 -0
- package/src/models/components/generalledgertransaction.ts +168 -0
- package/src/models/components/generalledgertransactionlineitem.ts +113 -0
- package/src/models/components/generalledgertransactionsfilter.ts +83 -0
- package/src/models/components/generalledgertransactionssort.ts +70 -0
- package/src/models/components/getgeneralledgertransactionresponse.ts +76 -0
- package/src/models/components/getgeneralledgertransactionsresponse.ts +88 -0
- package/src/models/components/index.ts +9 -0
- package/src/models/components/invoiceitemsfilter.ts +7 -0
- package/src/models/components/invoicesfilter.ts +7 -0
- package/src/models/components/journalentriesfilter.ts +34 -0
- package/src/models/components/ledgeraccountsfilter.ts +7 -0
- package/src/models/components/logsfilter.ts +67 -0
- package/src/models/components/notesfilter.ts +49 -0
- package/src/models/components/paymentsfilter.ts +7 -0
- package/src/models/components/projectsfilter.ts +7 -0
- package/src/models/components/purchaseordersfilter.ts +7 -0
- package/src/models/components/quotesfilter.ts +42 -0
- package/src/models/components/suppliersfilter.ts +7 -0
- package/src/models/components/user.ts +5 -0
- package/src/models/components/userinput.ts +6 -0
- package/src/models/components/usersfilter.ts +36 -0
- package/src/models/components/webhookeventtype.ts +2 -0
- package/src/models/operations/accountinggeneralledgertransactionsall.ts +173 -0
- package/src/models/operations/accountinggeneralledgertransactionsone.ts +144 -0
- package/src/models/operations/accountingquotesall.ts +6 -0
- package/src/models/operations/crmnotesall.ts +6 -0
- package/src/models/operations/crmusersall.ts +6 -0
- package/src/models/operations/index.ts +2 -0
- package/src/sdk/accounting.ts +8 -0
- package/src/sdk/generalledgertransactions.ts +51 -0
- package/lib/dlv.d.ts +0 -14
- package/lib/dlv.d.ts.map +0 -1
- package/lib/dlv.js +0 -49
- package/lib/dlv.js.map +0 -1
- package/lib/is-plain-object.d.ts +0 -2
- package/lib/is-plain-object.d.ts.map +0 -1
- package/lib/is-plain-object.js +0 -41
- package/lib/is-plain-object.js.map +0 -1
- package/src/lib/dlv.ts +0 -53
- package/src/lib/is-plain-object.ts +0 -43
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { ApideckCore } from "../core.js";
|
|
6
|
-
import { dlv } from "../lib/dlv.js";
|
|
7
6
|
import {
|
|
8
7
|
encodeDeepObjectQuery,
|
|
9
8
|
encodeFormQuery,
|
|
@@ -271,7 +270,11 @@ async function $do(
|
|
|
271
270
|
>;
|
|
272
271
|
"~next"?: { cursor: string };
|
|
273
272
|
} => {
|
|
274
|
-
const nextCursor =
|
|
273
|
+
const nextCursor =
|
|
274
|
+
(responseData as
|
|
275
|
+
| { meta?: { cursors?: { next?: unknown } } }
|
|
276
|
+
| null
|
|
277
|
+
| undefined)?.meta?.cursors?.next;
|
|
275
278
|
if (typeof nextCursor !== "string") {
|
|
276
279
|
return { next: () => null };
|
|
277
280
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { ApideckCore } from "../core.js";
|
|
6
|
-
import { dlv } from "../lib/dlv.js";
|
|
7
6
|
import {
|
|
8
7
|
encodeDeepObjectQuery,
|
|
9
8
|
encodeFormQuery,
|
|
@@ -277,7 +276,11 @@ async function $do(
|
|
|
277
276
|
>;
|
|
278
277
|
"~next"?: { cursor: string };
|
|
279
278
|
} => {
|
|
280
|
-
const nextCursor =
|
|
279
|
+
const nextCursor =
|
|
280
|
+
(responseData as
|
|
281
|
+
| { meta?: { cursors?: { next?: unknown } } }
|
|
282
|
+
| null
|
|
283
|
+
| undefined)?.meta?.cursors?.next;
|
|
281
284
|
if (typeof nextCursor !== "string") {
|
|
282
285
|
return { next: () => null };
|
|
283
286
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { ApideckCore } from "../core.js";
|
|
6
|
-
import { dlv } from "../lib/dlv.js";
|
|
7
6
|
import {
|
|
8
7
|
encodeDeepObjectQuery,
|
|
9
8
|
encodeFormQuery,
|
|
@@ -273,7 +272,11 @@ async function $do(
|
|
|
273
272
|
>;
|
|
274
273
|
"~next"?: { cursor: string };
|
|
275
274
|
} => {
|
|
276
|
-
const nextCursor =
|
|
275
|
+
const nextCursor =
|
|
276
|
+
(responseData as
|
|
277
|
+
| { meta?: { cursors?: { next?: unknown } } }
|
|
278
|
+
| null
|
|
279
|
+
| undefined)?.meta?.cursors?.next;
|
|
277
280
|
if (typeof nextCursor !== "string") {
|
|
278
281
|
return { next: () => null };
|
|
279
282
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { ApideckCore } from "../core.js";
|
|
6
|
-
import { dlv } from "../lib/dlv.js";
|
|
7
6
|
import {
|
|
8
7
|
encodeDeepObjectQuery,
|
|
9
8
|
encodeFormQuery,
|
|
@@ -275,7 +274,11 @@ async function $do(
|
|
|
275
274
|
>;
|
|
276
275
|
"~next"?: { cursor: string };
|
|
277
276
|
} => {
|
|
278
|
-
const nextCursor =
|
|
277
|
+
const nextCursor =
|
|
278
|
+
(responseData as
|
|
279
|
+
| { meta?: { cursors?: { next?: unknown } } }
|
|
280
|
+
| null
|
|
281
|
+
| undefined)?.meta?.cursors?.next;
|
|
279
282
|
if (typeof nextCursor !== "string") {
|
|
280
283
|
return { next: () => null };
|
|
281
284
|
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { ApideckCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.js";
|
|
14
|
+
import { ApideckError } from "../models/errors/apideckerror.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
+
import { Result } from "../types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Get General Ledger Transaction
|
|
31
|
+
*
|
|
32
|
+
* @remarks
|
|
33
|
+
* Get General Ledger Transaction
|
|
34
|
+
*/
|
|
35
|
+
export function accountingGeneralLedgerTransactionsGet(
|
|
36
|
+
client: ApideckCore,
|
|
37
|
+
request: operations.AccountingGeneralLedgerTransactionsOneRequest,
|
|
38
|
+
options?: RequestOptions,
|
|
39
|
+
): APIPromise<
|
|
40
|
+
Result<
|
|
41
|
+
operations.AccountingGeneralLedgerTransactionsOneResponse,
|
|
42
|
+
| errors.BadRequestResponse
|
|
43
|
+
| errors.UnauthorizedResponse
|
|
44
|
+
| errors.PaymentRequiredResponse
|
|
45
|
+
| errors.NotFoundResponse
|
|
46
|
+
| errors.UnprocessableResponse
|
|
47
|
+
| ApideckError
|
|
48
|
+
| ResponseValidationError
|
|
49
|
+
| ConnectionError
|
|
50
|
+
| RequestAbortedError
|
|
51
|
+
| RequestTimeoutError
|
|
52
|
+
| InvalidRequestError
|
|
53
|
+
| UnexpectedClientError
|
|
54
|
+
| SDKValidationError
|
|
55
|
+
>
|
|
56
|
+
> {
|
|
57
|
+
return new APIPromise($do(
|
|
58
|
+
client,
|
|
59
|
+
request,
|
|
60
|
+
options,
|
|
61
|
+
));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async function $do(
|
|
65
|
+
client: ApideckCore,
|
|
66
|
+
request: operations.AccountingGeneralLedgerTransactionsOneRequest,
|
|
67
|
+
options?: RequestOptions,
|
|
68
|
+
): Promise<
|
|
69
|
+
[
|
|
70
|
+
Result<
|
|
71
|
+
operations.AccountingGeneralLedgerTransactionsOneResponse,
|
|
72
|
+
| errors.BadRequestResponse
|
|
73
|
+
| errors.UnauthorizedResponse
|
|
74
|
+
| errors.PaymentRequiredResponse
|
|
75
|
+
| errors.NotFoundResponse
|
|
76
|
+
| errors.UnprocessableResponse
|
|
77
|
+
| ApideckError
|
|
78
|
+
| ResponseValidationError
|
|
79
|
+
| ConnectionError
|
|
80
|
+
| RequestAbortedError
|
|
81
|
+
| RequestTimeoutError
|
|
82
|
+
| InvalidRequestError
|
|
83
|
+
| UnexpectedClientError
|
|
84
|
+
| SDKValidationError
|
|
85
|
+
>,
|
|
86
|
+
APICall,
|
|
87
|
+
]
|
|
88
|
+
> {
|
|
89
|
+
const parsed = safeParse(
|
|
90
|
+
request,
|
|
91
|
+
(value) =>
|
|
92
|
+
operations.AccountingGeneralLedgerTransactionsOneRequest$outboundSchema
|
|
93
|
+
.parse(value),
|
|
94
|
+
"Input validation failed",
|
|
95
|
+
);
|
|
96
|
+
if (!parsed.ok) {
|
|
97
|
+
return [parsed, { status: "invalid" }];
|
|
98
|
+
}
|
|
99
|
+
const payload = parsed.value;
|
|
100
|
+
const body = null;
|
|
101
|
+
|
|
102
|
+
const pathParams = {
|
|
103
|
+
id: encodeSimple("id", payload.id, {
|
|
104
|
+
explode: false,
|
|
105
|
+
charEncoding: "percent",
|
|
106
|
+
}),
|
|
107
|
+
};
|
|
108
|
+
const path = pathToFunc("/accounting/general-ledger-transactions/{id}")(
|
|
109
|
+
pathParams,
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
const query = encodeFormQuery({
|
|
113
|
+
"fields": payload.fields,
|
|
114
|
+
"raw": payload.raw,
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
const headers = new Headers(compactMap({
|
|
118
|
+
Accept: "application/json",
|
|
119
|
+
"x-apideck-app-id": encodeSimple(
|
|
120
|
+
"x-apideck-app-id",
|
|
121
|
+
payload.appId ?? client._options.appId,
|
|
122
|
+
{ explode: false, charEncoding: "none" },
|
|
123
|
+
),
|
|
124
|
+
"x-apideck-company-id": encodeSimple(
|
|
125
|
+
"x-apideck-company-id",
|
|
126
|
+
payload.companyId,
|
|
127
|
+
{ explode: false, charEncoding: "none" },
|
|
128
|
+
),
|
|
129
|
+
"x-apideck-consumer-id": encodeSimple(
|
|
130
|
+
"x-apideck-consumer-id",
|
|
131
|
+
payload.consumerId ?? client._options.consumerId,
|
|
132
|
+
{ explode: false, charEncoding: "none" },
|
|
133
|
+
),
|
|
134
|
+
"x-apideck-service-id": encodeSimple(
|
|
135
|
+
"x-apideck-service-id",
|
|
136
|
+
payload.serviceId,
|
|
137
|
+
{ explode: false, charEncoding: "none" },
|
|
138
|
+
),
|
|
139
|
+
}));
|
|
140
|
+
|
|
141
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
142
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
143
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
144
|
+
|
|
145
|
+
const context = {
|
|
146
|
+
options: client._options,
|
|
147
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
148
|
+
operationID: "accounting.generalLedgerTransactionsOne",
|
|
149
|
+
oAuth2Scopes: null,
|
|
150
|
+
|
|
151
|
+
resolvedSecurity: requestSecurity,
|
|
152
|
+
|
|
153
|
+
securitySource: client._options.apiKey,
|
|
154
|
+
retryConfig: options?.retries
|
|
155
|
+
|| client._options.retryConfig
|
|
156
|
+
|| {
|
|
157
|
+
strategy: "backoff",
|
|
158
|
+
backoff: {
|
|
159
|
+
initialInterval: 500,
|
|
160
|
+
maxInterval: 60000,
|
|
161
|
+
exponent: 1.5,
|
|
162
|
+
maxElapsedTime: 900000,
|
|
163
|
+
},
|
|
164
|
+
retryConnectionErrors: true,
|
|
165
|
+
}
|
|
166
|
+
|| { strategy: "none" },
|
|
167
|
+
retryCodes: options?.retryCodes || ["408", "500", "502", "503", "504"],
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
const requestRes = client._createRequest(context, {
|
|
171
|
+
security: requestSecurity,
|
|
172
|
+
method: "GET",
|
|
173
|
+
baseURL: options?.serverURL,
|
|
174
|
+
path: path,
|
|
175
|
+
headers: headers,
|
|
176
|
+
query: query,
|
|
177
|
+
body: body,
|
|
178
|
+
userAgent: client._options.userAgent,
|
|
179
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
180
|
+
}, options);
|
|
181
|
+
if (!requestRes.ok) {
|
|
182
|
+
return [requestRes, { status: "invalid" }];
|
|
183
|
+
}
|
|
184
|
+
const req = requestRes.value;
|
|
185
|
+
|
|
186
|
+
const doResult = await client._do(req, {
|
|
187
|
+
context,
|
|
188
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
189
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
190
|
+
retryConfig: context.retryConfig,
|
|
191
|
+
retryCodes: context.retryCodes,
|
|
192
|
+
});
|
|
193
|
+
if (!doResult.ok) {
|
|
194
|
+
return [doResult, { status: "request-error", request: req }];
|
|
195
|
+
}
|
|
196
|
+
const response = doResult.value;
|
|
197
|
+
|
|
198
|
+
const responseFields = {
|
|
199
|
+
HttpMeta: { Response: response, Request: req },
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
const [result] = await M.match<
|
|
203
|
+
operations.AccountingGeneralLedgerTransactionsOneResponse,
|
|
204
|
+
| errors.BadRequestResponse
|
|
205
|
+
| errors.UnauthorizedResponse
|
|
206
|
+
| errors.PaymentRequiredResponse
|
|
207
|
+
| errors.NotFoundResponse
|
|
208
|
+
| errors.UnprocessableResponse
|
|
209
|
+
| ApideckError
|
|
210
|
+
| ResponseValidationError
|
|
211
|
+
| ConnectionError
|
|
212
|
+
| RequestAbortedError
|
|
213
|
+
| RequestTimeoutError
|
|
214
|
+
| InvalidRequestError
|
|
215
|
+
| UnexpectedClientError
|
|
216
|
+
| SDKValidationError
|
|
217
|
+
>(
|
|
218
|
+
M.json(
|
|
219
|
+
200,
|
|
220
|
+
operations.AccountingGeneralLedgerTransactionsOneResponse$inboundSchema,
|
|
221
|
+
{ key: "GetGeneralLedgerTransactionResponse" },
|
|
222
|
+
),
|
|
223
|
+
M.jsonErr(400, errors.BadRequestResponse$inboundSchema),
|
|
224
|
+
M.jsonErr(401, errors.UnauthorizedResponse$inboundSchema),
|
|
225
|
+
M.jsonErr(402, errors.PaymentRequiredResponse$inboundSchema),
|
|
226
|
+
M.jsonErr(404, errors.NotFoundResponse$inboundSchema),
|
|
227
|
+
M.jsonErr(422, errors.UnprocessableResponse$inboundSchema),
|
|
228
|
+
M.fail("4XX"),
|
|
229
|
+
M.fail("5XX"),
|
|
230
|
+
M.json(
|
|
231
|
+
"default",
|
|
232
|
+
operations.AccountingGeneralLedgerTransactionsOneResponse$inboundSchema,
|
|
233
|
+
{ key: "UnexpectedErrorResponse" },
|
|
234
|
+
),
|
|
235
|
+
)(response, req, { extraFields: responseFields });
|
|
236
|
+
if (!result.ok) {
|
|
237
|
+
return [result, { status: "complete", request: req, response }];
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
return [result, { status: "complete", request: req, response }];
|
|
241
|
+
}
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { ApideckCore } from "../core.js";
|
|
6
|
+
import {
|
|
7
|
+
encodeDeepObjectQuery,
|
|
8
|
+
encodeFormQuery,
|
|
9
|
+
encodeSimple,
|
|
10
|
+
queryJoin,
|
|
11
|
+
} from "../lib/encodings.js";
|
|
12
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
13
|
+
import * as M from "../lib/matchers.js";
|
|
14
|
+
import { compactMap } from "../lib/primitives.js";
|
|
15
|
+
import { safeParse } from "../lib/schemas.js";
|
|
16
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
17
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
18
|
+
import { pathToFunc } from "../lib/url.js";
|
|
19
|
+
import { ApideckError } from "../models/errors/apideckerror.js";
|
|
20
|
+
import {
|
|
21
|
+
ConnectionError,
|
|
22
|
+
InvalidRequestError,
|
|
23
|
+
RequestAbortedError,
|
|
24
|
+
RequestTimeoutError,
|
|
25
|
+
UnexpectedClientError,
|
|
26
|
+
} from "../models/errors/httpclienterrors.js";
|
|
27
|
+
import * as errors from "../models/errors/index.js";
|
|
28
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
29
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
30
|
+
import * as operations from "../models/operations/index.js";
|
|
31
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
32
|
+
import { Result } from "../types/fp.js";
|
|
33
|
+
import {
|
|
34
|
+
createPageIterator,
|
|
35
|
+
haltIterator,
|
|
36
|
+
PageIterator,
|
|
37
|
+
Paginator,
|
|
38
|
+
} from "../types/operations.js";
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* List General Ledger Transactions
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
* List General Ledger Transactions
|
|
45
|
+
*/
|
|
46
|
+
export function accountingGeneralLedgerTransactionsList(
|
|
47
|
+
client: ApideckCore,
|
|
48
|
+
request: operations.AccountingGeneralLedgerTransactionsAllRequest,
|
|
49
|
+
options?: RequestOptions,
|
|
50
|
+
): APIPromise<
|
|
51
|
+
PageIterator<
|
|
52
|
+
Result<
|
|
53
|
+
operations.AccountingGeneralLedgerTransactionsAllResponse,
|
|
54
|
+
| errors.BadRequestResponse
|
|
55
|
+
| errors.UnauthorizedResponse
|
|
56
|
+
| errors.PaymentRequiredResponse
|
|
57
|
+
| errors.NotFoundResponse
|
|
58
|
+
| errors.UnprocessableResponse
|
|
59
|
+
| ApideckError
|
|
60
|
+
| ResponseValidationError
|
|
61
|
+
| ConnectionError
|
|
62
|
+
| RequestAbortedError
|
|
63
|
+
| RequestTimeoutError
|
|
64
|
+
| InvalidRequestError
|
|
65
|
+
| UnexpectedClientError
|
|
66
|
+
| SDKValidationError
|
|
67
|
+
>,
|
|
68
|
+
{ cursor: string }
|
|
69
|
+
>
|
|
70
|
+
> {
|
|
71
|
+
return new APIPromise($do(
|
|
72
|
+
client,
|
|
73
|
+
request,
|
|
74
|
+
options,
|
|
75
|
+
));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
async function $do(
|
|
79
|
+
client: ApideckCore,
|
|
80
|
+
request: operations.AccountingGeneralLedgerTransactionsAllRequest,
|
|
81
|
+
options?: RequestOptions,
|
|
82
|
+
): Promise<
|
|
83
|
+
[
|
|
84
|
+
PageIterator<
|
|
85
|
+
Result<
|
|
86
|
+
operations.AccountingGeneralLedgerTransactionsAllResponse,
|
|
87
|
+
| errors.BadRequestResponse
|
|
88
|
+
| errors.UnauthorizedResponse
|
|
89
|
+
| errors.PaymentRequiredResponse
|
|
90
|
+
| errors.NotFoundResponse
|
|
91
|
+
| errors.UnprocessableResponse
|
|
92
|
+
| ApideckError
|
|
93
|
+
| ResponseValidationError
|
|
94
|
+
| ConnectionError
|
|
95
|
+
| RequestAbortedError
|
|
96
|
+
| RequestTimeoutError
|
|
97
|
+
| InvalidRequestError
|
|
98
|
+
| UnexpectedClientError
|
|
99
|
+
| SDKValidationError
|
|
100
|
+
>,
|
|
101
|
+
{ cursor: string }
|
|
102
|
+
>,
|
|
103
|
+
APICall,
|
|
104
|
+
]
|
|
105
|
+
> {
|
|
106
|
+
const parsed = safeParse(
|
|
107
|
+
request,
|
|
108
|
+
(value) =>
|
|
109
|
+
operations.AccountingGeneralLedgerTransactionsAllRequest$outboundSchema
|
|
110
|
+
.parse(value),
|
|
111
|
+
"Input validation failed",
|
|
112
|
+
);
|
|
113
|
+
if (!parsed.ok) {
|
|
114
|
+
return [haltIterator(parsed), { status: "invalid" }];
|
|
115
|
+
}
|
|
116
|
+
const payload = parsed.value;
|
|
117
|
+
const body = null;
|
|
118
|
+
|
|
119
|
+
const path = pathToFunc("/accounting/general-ledger-transactions")();
|
|
120
|
+
|
|
121
|
+
const query = queryJoin(
|
|
122
|
+
encodeDeepObjectQuery({
|
|
123
|
+
"filter": payload.filter,
|
|
124
|
+
"pass_through": payload.pass_through,
|
|
125
|
+
"sort": payload.sort,
|
|
126
|
+
}),
|
|
127
|
+
encodeFormQuery({
|
|
128
|
+
"cursor": payload.cursor,
|
|
129
|
+
"fields": payload.fields,
|
|
130
|
+
"limit": payload.limit,
|
|
131
|
+
"raw": payload.raw,
|
|
132
|
+
}),
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
const headers = new Headers(compactMap({
|
|
136
|
+
Accept: "application/json",
|
|
137
|
+
"x-apideck-app-id": encodeSimple(
|
|
138
|
+
"x-apideck-app-id",
|
|
139
|
+
payload.appId ?? client._options.appId,
|
|
140
|
+
{ explode: false, charEncoding: "none" },
|
|
141
|
+
),
|
|
142
|
+
"x-apideck-company-id": encodeSimple(
|
|
143
|
+
"x-apideck-company-id",
|
|
144
|
+
payload.companyId,
|
|
145
|
+
{ explode: false, charEncoding: "none" },
|
|
146
|
+
),
|
|
147
|
+
"x-apideck-consumer-id": encodeSimple(
|
|
148
|
+
"x-apideck-consumer-id",
|
|
149
|
+
payload.consumerId ?? client._options.consumerId,
|
|
150
|
+
{ explode: false, charEncoding: "none" },
|
|
151
|
+
),
|
|
152
|
+
"x-apideck-service-id": encodeSimple(
|
|
153
|
+
"x-apideck-service-id",
|
|
154
|
+
payload.serviceId,
|
|
155
|
+
{ explode: false, charEncoding: "none" },
|
|
156
|
+
),
|
|
157
|
+
}));
|
|
158
|
+
|
|
159
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
160
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
161
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
162
|
+
|
|
163
|
+
const context = {
|
|
164
|
+
options: client._options,
|
|
165
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
166
|
+
operationID: "accounting.generalLedgerTransactionsAll",
|
|
167
|
+
oAuth2Scopes: null,
|
|
168
|
+
|
|
169
|
+
resolvedSecurity: requestSecurity,
|
|
170
|
+
|
|
171
|
+
securitySource: client._options.apiKey,
|
|
172
|
+
retryConfig: options?.retries
|
|
173
|
+
|| client._options.retryConfig
|
|
174
|
+
|| {
|
|
175
|
+
strategy: "backoff",
|
|
176
|
+
backoff: {
|
|
177
|
+
initialInterval: 500,
|
|
178
|
+
maxInterval: 60000,
|
|
179
|
+
exponent: 1.5,
|
|
180
|
+
maxElapsedTime: 900000,
|
|
181
|
+
},
|
|
182
|
+
retryConnectionErrors: true,
|
|
183
|
+
}
|
|
184
|
+
|| { strategy: "none" },
|
|
185
|
+
retryCodes: options?.retryCodes || ["408", "500", "502", "503", "504"],
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
const requestRes = client._createRequest(context, {
|
|
189
|
+
security: requestSecurity,
|
|
190
|
+
method: "GET",
|
|
191
|
+
baseURL: options?.serverURL,
|
|
192
|
+
path: path,
|
|
193
|
+
headers: headers,
|
|
194
|
+
query: query,
|
|
195
|
+
body: body,
|
|
196
|
+
userAgent: client._options.userAgent,
|
|
197
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
198
|
+
}, options);
|
|
199
|
+
if (!requestRes.ok) {
|
|
200
|
+
return [haltIterator(requestRes), { status: "invalid" }];
|
|
201
|
+
}
|
|
202
|
+
const req = requestRes.value;
|
|
203
|
+
|
|
204
|
+
const doResult = await client._do(req, {
|
|
205
|
+
context,
|
|
206
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
207
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
208
|
+
retryConfig: context.retryConfig,
|
|
209
|
+
retryCodes: context.retryCodes,
|
|
210
|
+
});
|
|
211
|
+
if (!doResult.ok) {
|
|
212
|
+
return [haltIterator(doResult), { status: "request-error", request: req }];
|
|
213
|
+
}
|
|
214
|
+
const response = doResult.value;
|
|
215
|
+
|
|
216
|
+
const responseFields = {
|
|
217
|
+
HttpMeta: { Response: response, Request: req },
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
const [result, raw] = await M.match<
|
|
221
|
+
operations.AccountingGeneralLedgerTransactionsAllResponse,
|
|
222
|
+
| errors.BadRequestResponse
|
|
223
|
+
| errors.UnauthorizedResponse
|
|
224
|
+
| errors.PaymentRequiredResponse
|
|
225
|
+
| errors.NotFoundResponse
|
|
226
|
+
| errors.UnprocessableResponse
|
|
227
|
+
| ApideckError
|
|
228
|
+
| ResponseValidationError
|
|
229
|
+
| ConnectionError
|
|
230
|
+
| RequestAbortedError
|
|
231
|
+
| RequestTimeoutError
|
|
232
|
+
| InvalidRequestError
|
|
233
|
+
| UnexpectedClientError
|
|
234
|
+
| SDKValidationError
|
|
235
|
+
>(
|
|
236
|
+
M.json(
|
|
237
|
+
200,
|
|
238
|
+
operations.AccountingGeneralLedgerTransactionsAllResponse$inboundSchema,
|
|
239
|
+
{ key: "GetGeneralLedgerTransactionsResponse" },
|
|
240
|
+
),
|
|
241
|
+
M.jsonErr(400, errors.BadRequestResponse$inboundSchema),
|
|
242
|
+
M.jsonErr(401, errors.UnauthorizedResponse$inboundSchema),
|
|
243
|
+
M.jsonErr(402, errors.PaymentRequiredResponse$inboundSchema),
|
|
244
|
+
M.jsonErr(404, errors.NotFoundResponse$inboundSchema),
|
|
245
|
+
M.jsonErr(422, errors.UnprocessableResponse$inboundSchema),
|
|
246
|
+
M.fail("4XX"),
|
|
247
|
+
M.fail("5XX"),
|
|
248
|
+
M.json(
|
|
249
|
+
"default",
|
|
250
|
+
operations.AccountingGeneralLedgerTransactionsAllResponse$inboundSchema,
|
|
251
|
+
{ key: "UnexpectedErrorResponse" },
|
|
252
|
+
),
|
|
253
|
+
)(response, req, { extraFields: responseFields });
|
|
254
|
+
if (!result.ok) {
|
|
255
|
+
return [haltIterator(result), {
|
|
256
|
+
status: "complete",
|
|
257
|
+
request: req,
|
|
258
|
+
response,
|
|
259
|
+
}];
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
const nextFunc = (
|
|
263
|
+
responseData: unknown,
|
|
264
|
+
): {
|
|
265
|
+
next: Paginator<
|
|
266
|
+
Result<
|
|
267
|
+
operations.AccountingGeneralLedgerTransactionsAllResponse,
|
|
268
|
+
| errors.BadRequestResponse
|
|
269
|
+
| errors.UnauthorizedResponse
|
|
270
|
+
| errors.PaymentRequiredResponse
|
|
271
|
+
| errors.NotFoundResponse
|
|
272
|
+
| errors.UnprocessableResponse
|
|
273
|
+
| ApideckError
|
|
274
|
+
| ResponseValidationError
|
|
275
|
+
| ConnectionError
|
|
276
|
+
| RequestAbortedError
|
|
277
|
+
| RequestTimeoutError
|
|
278
|
+
| InvalidRequestError
|
|
279
|
+
| UnexpectedClientError
|
|
280
|
+
| SDKValidationError
|
|
281
|
+
>
|
|
282
|
+
>;
|
|
283
|
+
"~next"?: { cursor: string };
|
|
284
|
+
} => {
|
|
285
|
+
const nextCursor =
|
|
286
|
+
(responseData as
|
|
287
|
+
| { meta?: { cursors?: { next?: unknown } } }
|
|
288
|
+
| null
|
|
289
|
+
| undefined)?.meta?.cursors?.next;
|
|
290
|
+
if (typeof nextCursor !== "string") {
|
|
291
|
+
return { next: () => null };
|
|
292
|
+
}
|
|
293
|
+
if (nextCursor.trim() === "") {
|
|
294
|
+
return { next: () => null };
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
const nextVal = () =>
|
|
298
|
+
accountingGeneralLedgerTransactionsList(
|
|
299
|
+
client,
|
|
300
|
+
{
|
|
301
|
+
...request,
|
|
302
|
+
cursor: nextCursor,
|
|
303
|
+
},
|
|
304
|
+
options,
|
|
305
|
+
);
|
|
306
|
+
|
|
307
|
+
return { next: nextVal, "~next": { cursor: nextCursor } };
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
const page = { ...result, ...nextFunc(raw) };
|
|
311
|
+
return [{ ...page, ...createPageIterator(page, (v) => !v.ok) }, {
|
|
312
|
+
status: "complete",
|
|
313
|
+
request: req,
|
|
314
|
+
response,
|
|
315
|
+
}];
|
|
316
|
+
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { ApideckCore } from "../core.js";
|
|
6
|
-
import { dlv } from "../lib/dlv.js";
|
|
7
6
|
import {
|
|
8
7
|
encodeDeepObjectQuery,
|
|
9
8
|
encodeFormQuery,
|
|
@@ -280,7 +279,11 @@ async function $do(
|
|
|
280
279
|
>;
|
|
281
280
|
"~next"?: { cursor: string };
|
|
282
281
|
} => {
|
|
283
|
-
const nextCursor =
|
|
282
|
+
const nextCursor =
|
|
283
|
+
(responseData as
|
|
284
|
+
| { meta?: { cursors?: { next?: unknown } } }
|
|
285
|
+
| null
|
|
286
|
+
| undefined)?.meta?.cursors?.next;
|
|
284
287
|
if (typeof nextCursor !== "string") {
|
|
285
288
|
return { next: () => null };
|
|
286
289
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { ApideckCore } from "../core.js";
|
|
6
|
-
import { dlv } from "../lib/dlv.js";
|
|
7
6
|
import {
|
|
8
7
|
encodeDeepObjectQuery,
|
|
9
8
|
encodeFormQuery,
|
|
@@ -278,7 +277,11 @@ async function $do(
|
|
|
278
277
|
>;
|
|
279
278
|
"~next"?: { cursor: string };
|
|
280
279
|
} => {
|
|
281
|
-
const nextCursor =
|
|
280
|
+
const nextCursor =
|
|
281
|
+
(responseData as
|
|
282
|
+
| { meta?: { cursors?: { next?: unknown } } }
|
|
283
|
+
| null
|
|
284
|
+
| undefined)?.meta?.cursors?.next;
|
|
282
285
|
if (typeof nextCursor !== "string") {
|
|
283
286
|
return { next: () => null };
|
|
284
287
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { ApideckCore } from "../core.js";
|
|
6
|
-
import { dlv } from "../lib/dlv.js";
|
|
7
6
|
import {
|
|
8
7
|
encodeDeepObjectQuery,
|
|
9
8
|
encodeFormQuery,
|
|
@@ -280,7 +279,11 @@ async function $do(
|
|
|
280
279
|
>;
|
|
281
280
|
"~next"?: { cursor: string };
|
|
282
281
|
} => {
|
|
283
|
-
const nextCursor =
|
|
282
|
+
const nextCursor =
|
|
283
|
+
(responseData as
|
|
284
|
+
| { meta?: { cursors?: { next?: unknown } } }
|
|
285
|
+
| null
|
|
286
|
+
| undefined)?.meta?.cursors?.next;
|
|
284
287
|
if (typeof nextCursor !== "string") {
|
|
285
288
|
return { next: () => null };
|
|
286
289
|
}
|