@unified-api/typescript-sdk 2.85.37 → 2.85.38
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 +12 -0
- package/dist/commonjs/funcs/accountingCreateAccountingPaymentterm.d.ts +15 -0
- package/dist/commonjs/funcs/accountingCreateAccountingPaymentterm.d.ts.map +1 -0
- package/dist/commonjs/funcs/accountingCreateAccountingPaymentterm.js +125 -0
- package/dist/commonjs/funcs/accountingCreateAccountingPaymentterm.js.map +1 -0
- package/dist/commonjs/funcs/accountingGetAccountingPaymentterm.d.ts +15 -0
- package/dist/commonjs/funcs/accountingGetAccountingPaymentterm.d.ts.map +1 -0
- package/dist/commonjs/funcs/accountingGetAccountingPaymentterm.js +126 -0
- package/dist/commonjs/funcs/accountingGetAccountingPaymentterm.js.map +1 -0
- package/dist/commonjs/funcs/accountingListAccountingPaymentterms.d.ts +15 -0
- package/dist/commonjs/funcs/accountingListAccountingPaymentterms.d.ts.map +1 -0
- package/dist/commonjs/funcs/accountingListAccountingPaymentterms.js +131 -0
- package/dist/commonjs/funcs/accountingListAccountingPaymentterms.js.map +1 -0
- package/dist/commonjs/funcs/accountingPatchAccountingPaymentterm.d.ts +15 -0
- package/dist/commonjs/funcs/accountingPatchAccountingPaymentterm.d.ts.map +1 -0
- package/dist/commonjs/funcs/accountingPatchAccountingPaymentterm.js +129 -0
- package/dist/commonjs/funcs/accountingPatchAccountingPaymentterm.js.map +1 -0
- package/dist/commonjs/funcs/accountingRemoveAccountingPaymentterm.d.ts +14 -0
- package/dist/commonjs/funcs/accountingRemoveAccountingPaymentterm.d.ts.map +1 -0
- package/dist/commonjs/funcs/accountingRemoveAccountingPaymentterm.js +123 -0
- package/dist/commonjs/funcs/accountingRemoveAccountingPaymentterm.js.map +1 -0
- package/dist/commonjs/funcs/accountingUpdateAccountingPaymentterm.d.ts +15 -0
- package/dist/commonjs/funcs/accountingUpdateAccountingPaymentterm.d.ts.map +1 -0
- package/dist/commonjs/funcs/accountingUpdateAccountingPaymentterm.js +129 -0
- package/dist/commonjs/funcs/accountingUpdateAccountingPaymentterm.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/sdk/accounting.d.ts +24 -0
- package/dist/commonjs/sdk/accounting.d.ts.map +1 -1
- package/dist/commonjs/sdk/accounting.js +42 -0
- package/dist/commonjs/sdk/accounting.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/createaccountingbill.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/createaccountingbill.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/createaccountingbill.js +1 -0
- package/dist/commonjs/sdk/models/operations/createaccountingbill.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/createaccountingcontact.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/createaccountingcontact.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/createaccountingcontact.js +1 -0
- package/dist/commonjs/sdk/models/operations/createaccountingcontact.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/createaccountinginvoice.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/createaccountinginvoice.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/createaccountinginvoice.js +1 -0
- package/dist/commonjs/sdk/models/operations/createaccountinginvoice.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/createaccountingpaymentterm.d.ts +51 -0
- package/dist/commonjs/sdk/models/operations/createaccountingpaymentterm.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/createaccountingpaymentterm.js +82 -0
- package/dist/commonjs/sdk/models/operations/createaccountingpaymentterm.js.map +1 -0
- package/dist/commonjs/sdk/models/operations/getaccountingbill.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/getaccountingbill.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/getaccountingbill.js +1 -0
- package/dist/commonjs/sdk/models/operations/getaccountingbill.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/getaccountingcontact.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/getaccountingcontact.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/getaccountingcontact.js +1 -0
- package/dist/commonjs/sdk/models/operations/getaccountingcontact.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/getaccountinginvoice.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/getaccountinginvoice.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/getaccountinginvoice.js +1 -0
- package/dist/commonjs/sdk/models/operations/getaccountinginvoice.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/getaccountingpaymentterm.d.ts +53 -0
- package/dist/commonjs/sdk/models/operations/getaccountingpaymentterm.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/getaccountingpaymentterm.js +80 -0
- package/dist/commonjs/sdk/models/operations/getaccountingpaymentterm.js.map +1 -0
- package/dist/commonjs/sdk/models/operations/index.d.ts +6 -0
- package/dist/commonjs/sdk/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/index.js +6 -0
- package/dist/commonjs/sdk/models/operations/index.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/listaccountingbills.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/listaccountingbills.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/listaccountingbills.js +1 -0
- package/dist/commonjs/sdk/models/operations/listaccountingbills.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/listaccountingcontacts.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/listaccountingcontacts.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/listaccountingcontacts.js +1 -0
- package/dist/commonjs/sdk/models/operations/listaccountingcontacts.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/listaccountinginvoices.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/listaccountinginvoices.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/listaccountinginvoices.js +1 -0
- package/dist/commonjs/sdk/models/operations/listaccountinginvoices.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/listaccountingpaymentterms.d.ts +73 -0
- package/dist/commonjs/sdk/models/operations/listaccountingpaymentterms.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/listaccountingpaymentterms.js +89 -0
- package/dist/commonjs/sdk/models/operations/listaccountingpaymentterms.js.map +1 -0
- package/dist/commonjs/sdk/models/operations/patchaccountingbill.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/patchaccountingbill.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/patchaccountingbill.js +1 -0
- package/dist/commonjs/sdk/models/operations/patchaccountingbill.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/patchaccountingcontact.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/patchaccountingcontact.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/patchaccountingcontact.js +1 -0
- package/dist/commonjs/sdk/models/operations/patchaccountingcontact.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/patchaccountinginvoice.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/patchaccountinginvoice.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/patchaccountinginvoice.js +1 -0
- package/dist/commonjs/sdk/models/operations/patchaccountinginvoice.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/patchaccountingpaymentterm.d.ts +56 -0
- package/dist/commonjs/sdk/models/operations/patchaccountingpaymentterm.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/patchaccountingpaymentterm.js +83 -0
- package/dist/commonjs/sdk/models/operations/patchaccountingpaymentterm.js.map +1 -0
- package/dist/commonjs/sdk/models/operations/removeaccountingpaymentterm.d.ts +30 -0
- package/dist/commonjs/sdk/models/operations/removeaccountingpaymentterm.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/removeaccountingpaymentterm.js +68 -0
- package/dist/commonjs/sdk/models/operations/removeaccountingpaymentterm.js.map +1 -0
- package/dist/commonjs/sdk/models/operations/updateaccountingbill.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/updateaccountingbill.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/updateaccountingbill.js +1 -0
- package/dist/commonjs/sdk/models/operations/updateaccountingbill.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/updateaccountingcontact.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/updateaccountingcontact.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/updateaccountingcontact.js +1 -0
- package/dist/commonjs/sdk/models/operations/updateaccountingcontact.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/updateaccountinginvoice.d.ts +1 -0
- package/dist/commonjs/sdk/models/operations/updateaccountinginvoice.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/operations/updateaccountinginvoice.js +1 -0
- package/dist/commonjs/sdk/models/operations/updateaccountinginvoice.js.map +1 -1
- package/dist/commonjs/sdk/models/operations/updateaccountingpaymentterm.d.ts +56 -0
- package/dist/commonjs/sdk/models/operations/updateaccountingpaymentterm.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/operations/updateaccountingpaymentterm.js +83 -0
- package/dist/commonjs/sdk/models/operations/updateaccountingpaymentterm.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/accountingbill.d.ts +2 -0
- package/dist/commonjs/sdk/models/shared/accountingbill.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/accountingbill.js +4 -0
- package/dist/commonjs/sdk/models/shared/accountingbill.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/accountingcontact.d.ts +2 -0
- package/dist/commonjs/sdk/models/shared/accountingcontact.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/accountingcontact.js +4 -0
- package/dist/commonjs/sdk/models/shared/accountingcontact.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/accountinginvoice.d.ts +2 -0
- package/dist/commonjs/sdk/models/shared/accountinginvoice.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/accountinginvoice.js +4 -0
- package/dist/commonjs/sdk/models/shared/accountinginvoice.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/accountingpaymentterm.d.ts +83 -0
- package/dist/commonjs/sdk/models/shared/accountingpaymentterm.d.ts.map +1 -0
- package/dist/commonjs/sdk/models/shared/accountingpaymentterm.js +147 -0
- package/dist/commonjs/sdk/models/shared/accountingpaymentterm.js.map +1 -0
- package/dist/commonjs/sdk/models/shared/index.d.ts +1 -0
- package/dist/commonjs/sdk/models/shared/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/index.js +1 -0
- package/dist/commonjs/sdk/models/shared/index.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/propertyconnectionpermissions.d.ts +2 -0
- package/dist/commonjs/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/propertyconnectionpermissions.js +2 -0
- package/dist/commonjs/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
- package/dist/commonjs/sdk/models/shared/webhook.d.ts +1 -0
- package/dist/commonjs/sdk/models/shared/webhook.d.ts.map +1 -1
- package/dist/commonjs/sdk/models/shared/webhook.js +1 -0
- package/dist/commonjs/sdk/models/shared/webhook.js.map +1 -1
- package/dist/commonjs/sdk/paymentterm.d.ts +30 -0
- package/dist/commonjs/sdk/paymentterm.d.ts.map +1 -0
- package/dist/commonjs/sdk/paymentterm.js +54 -0
- package/dist/commonjs/sdk/paymentterm.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/accountingCreateAccountingPaymentterm.d.ts +15 -0
- package/dist/esm/funcs/accountingCreateAccountingPaymentterm.d.ts.map +1 -0
- package/dist/esm/funcs/accountingCreateAccountingPaymentterm.js +89 -0
- package/dist/esm/funcs/accountingCreateAccountingPaymentterm.js.map +1 -0
- package/dist/esm/funcs/accountingGetAccountingPaymentterm.d.ts +15 -0
- package/dist/esm/funcs/accountingGetAccountingPaymentterm.d.ts.map +1 -0
- package/dist/esm/funcs/accountingGetAccountingPaymentterm.js +90 -0
- package/dist/esm/funcs/accountingGetAccountingPaymentterm.js.map +1 -0
- package/dist/esm/funcs/accountingListAccountingPaymentterms.d.ts +15 -0
- package/dist/esm/funcs/accountingListAccountingPaymentterms.d.ts.map +1 -0
- package/dist/esm/funcs/accountingListAccountingPaymentterms.js +95 -0
- package/dist/esm/funcs/accountingListAccountingPaymentterms.js.map +1 -0
- package/dist/esm/funcs/accountingPatchAccountingPaymentterm.d.ts +15 -0
- package/dist/esm/funcs/accountingPatchAccountingPaymentterm.d.ts.map +1 -0
- package/dist/esm/funcs/accountingPatchAccountingPaymentterm.js +93 -0
- package/dist/esm/funcs/accountingPatchAccountingPaymentterm.js.map +1 -0
- package/dist/esm/funcs/accountingRemoveAccountingPaymentterm.d.ts +14 -0
- package/dist/esm/funcs/accountingRemoveAccountingPaymentterm.d.ts.map +1 -0
- package/dist/esm/funcs/accountingRemoveAccountingPaymentterm.js +87 -0
- package/dist/esm/funcs/accountingRemoveAccountingPaymentterm.js.map +1 -0
- package/dist/esm/funcs/accountingUpdateAccountingPaymentterm.d.ts +15 -0
- package/dist/esm/funcs/accountingUpdateAccountingPaymentterm.d.ts.map +1 -0
- package/dist/esm/funcs/accountingUpdateAccountingPaymentterm.js +93 -0
- package/dist/esm/funcs/accountingUpdateAccountingPaymentterm.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/sdk/accounting.d.ts +24 -0
- package/dist/esm/sdk/accounting.d.ts.map +1 -1
- package/dist/esm/sdk/accounting.js +42 -0
- package/dist/esm/sdk/accounting.js.map +1 -1
- package/dist/esm/sdk/models/operations/createaccountingbill.d.ts +1 -0
- package/dist/esm/sdk/models/operations/createaccountingbill.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/createaccountingbill.js +1 -0
- package/dist/esm/sdk/models/operations/createaccountingbill.js.map +1 -1
- package/dist/esm/sdk/models/operations/createaccountingcontact.d.ts +1 -0
- package/dist/esm/sdk/models/operations/createaccountingcontact.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/createaccountingcontact.js +1 -0
- package/dist/esm/sdk/models/operations/createaccountingcontact.js.map +1 -1
- package/dist/esm/sdk/models/operations/createaccountinginvoice.d.ts +1 -0
- package/dist/esm/sdk/models/operations/createaccountinginvoice.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/createaccountinginvoice.js +1 -0
- package/dist/esm/sdk/models/operations/createaccountinginvoice.js.map +1 -1
- package/dist/esm/sdk/models/operations/createaccountingpaymentterm.d.ts +51 -0
- package/dist/esm/sdk/models/operations/createaccountingpaymentterm.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/createaccountingpaymentterm.js +45 -0
- package/dist/esm/sdk/models/operations/createaccountingpaymentterm.js.map +1 -0
- package/dist/esm/sdk/models/operations/getaccountingbill.d.ts +1 -0
- package/dist/esm/sdk/models/operations/getaccountingbill.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/getaccountingbill.js +1 -0
- package/dist/esm/sdk/models/operations/getaccountingbill.js.map +1 -1
- package/dist/esm/sdk/models/operations/getaccountingcontact.d.ts +1 -0
- package/dist/esm/sdk/models/operations/getaccountingcontact.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/getaccountingcontact.js +1 -0
- package/dist/esm/sdk/models/operations/getaccountingcontact.js.map +1 -1
- package/dist/esm/sdk/models/operations/getaccountinginvoice.d.ts +1 -0
- package/dist/esm/sdk/models/operations/getaccountinginvoice.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/getaccountinginvoice.js +1 -0
- package/dist/esm/sdk/models/operations/getaccountinginvoice.js.map +1 -1
- package/dist/esm/sdk/models/operations/getaccountingpaymentterm.d.ts +53 -0
- package/dist/esm/sdk/models/operations/getaccountingpaymentterm.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/getaccountingpaymentterm.js +43 -0
- package/dist/esm/sdk/models/operations/getaccountingpaymentterm.js.map +1 -0
- package/dist/esm/sdk/models/operations/index.d.ts +6 -0
- package/dist/esm/sdk/models/operations/index.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/index.js +6 -0
- package/dist/esm/sdk/models/operations/index.js.map +1 -1
- package/dist/esm/sdk/models/operations/listaccountingbills.d.ts +1 -0
- package/dist/esm/sdk/models/operations/listaccountingbills.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/listaccountingbills.js +1 -0
- package/dist/esm/sdk/models/operations/listaccountingbills.js.map +1 -1
- package/dist/esm/sdk/models/operations/listaccountingcontacts.d.ts +1 -0
- package/dist/esm/sdk/models/operations/listaccountingcontacts.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/listaccountingcontacts.js +1 -0
- package/dist/esm/sdk/models/operations/listaccountingcontacts.js.map +1 -1
- package/dist/esm/sdk/models/operations/listaccountinginvoices.d.ts +1 -0
- package/dist/esm/sdk/models/operations/listaccountinginvoices.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/listaccountinginvoices.js +1 -0
- package/dist/esm/sdk/models/operations/listaccountinginvoices.js.map +1 -1
- package/dist/esm/sdk/models/operations/listaccountingpaymentterms.d.ts +73 -0
- package/dist/esm/sdk/models/operations/listaccountingpaymentterms.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/listaccountingpaymentterms.js +52 -0
- package/dist/esm/sdk/models/operations/listaccountingpaymentterms.js.map +1 -0
- package/dist/esm/sdk/models/operations/patchaccountingbill.d.ts +1 -0
- package/dist/esm/sdk/models/operations/patchaccountingbill.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/patchaccountingbill.js +1 -0
- package/dist/esm/sdk/models/operations/patchaccountingbill.js.map +1 -1
- package/dist/esm/sdk/models/operations/patchaccountingcontact.d.ts +1 -0
- package/dist/esm/sdk/models/operations/patchaccountingcontact.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/patchaccountingcontact.js +1 -0
- package/dist/esm/sdk/models/operations/patchaccountingcontact.js.map +1 -1
- package/dist/esm/sdk/models/operations/patchaccountinginvoice.d.ts +1 -0
- package/dist/esm/sdk/models/operations/patchaccountinginvoice.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/patchaccountinginvoice.js +1 -0
- package/dist/esm/sdk/models/operations/patchaccountinginvoice.js.map +1 -1
- package/dist/esm/sdk/models/operations/patchaccountingpaymentterm.d.ts +56 -0
- package/dist/esm/sdk/models/operations/patchaccountingpaymentterm.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/patchaccountingpaymentterm.js +46 -0
- package/dist/esm/sdk/models/operations/patchaccountingpaymentterm.js.map +1 -0
- package/dist/esm/sdk/models/operations/removeaccountingpaymentterm.d.ts +30 -0
- package/dist/esm/sdk/models/operations/removeaccountingpaymentterm.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/removeaccountingpaymentterm.js +30 -0
- package/dist/esm/sdk/models/operations/removeaccountingpaymentterm.js.map +1 -0
- package/dist/esm/sdk/models/operations/updateaccountingbill.d.ts +1 -0
- package/dist/esm/sdk/models/operations/updateaccountingbill.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/updateaccountingbill.js +1 -0
- package/dist/esm/sdk/models/operations/updateaccountingbill.js.map +1 -1
- package/dist/esm/sdk/models/operations/updateaccountingcontact.d.ts +1 -0
- package/dist/esm/sdk/models/operations/updateaccountingcontact.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/updateaccountingcontact.js +1 -0
- package/dist/esm/sdk/models/operations/updateaccountingcontact.js.map +1 -1
- package/dist/esm/sdk/models/operations/updateaccountinginvoice.d.ts +1 -0
- package/dist/esm/sdk/models/operations/updateaccountinginvoice.d.ts.map +1 -1
- package/dist/esm/sdk/models/operations/updateaccountinginvoice.js +1 -0
- package/dist/esm/sdk/models/operations/updateaccountinginvoice.js.map +1 -1
- package/dist/esm/sdk/models/operations/updateaccountingpaymentterm.d.ts +56 -0
- package/dist/esm/sdk/models/operations/updateaccountingpaymentterm.d.ts.map +1 -0
- package/dist/esm/sdk/models/operations/updateaccountingpaymentterm.js +46 -0
- package/dist/esm/sdk/models/operations/updateaccountingpaymentterm.js.map +1 -0
- package/dist/esm/sdk/models/shared/accountingbill.d.ts +2 -0
- package/dist/esm/sdk/models/shared/accountingbill.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/accountingbill.js +4 -0
- package/dist/esm/sdk/models/shared/accountingbill.js.map +1 -1
- package/dist/esm/sdk/models/shared/accountingcontact.d.ts +2 -0
- package/dist/esm/sdk/models/shared/accountingcontact.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/accountingcontact.js +4 -0
- package/dist/esm/sdk/models/shared/accountingcontact.js.map +1 -1
- package/dist/esm/sdk/models/shared/accountinginvoice.d.ts +2 -0
- package/dist/esm/sdk/models/shared/accountinginvoice.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/accountinginvoice.js +4 -0
- package/dist/esm/sdk/models/shared/accountinginvoice.js.map +1 -1
- package/dist/esm/sdk/models/shared/accountingpaymentterm.d.ts +83 -0
- package/dist/esm/sdk/models/shared/accountingpaymentterm.d.ts.map +1 -0
- package/dist/esm/sdk/models/shared/accountingpaymentterm.js +109 -0
- package/dist/esm/sdk/models/shared/accountingpaymentterm.js.map +1 -0
- package/dist/esm/sdk/models/shared/index.d.ts +1 -0
- package/dist/esm/sdk/models/shared/index.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/index.js +1 -0
- package/dist/esm/sdk/models/shared/index.js.map +1 -1
- package/dist/esm/sdk/models/shared/propertyconnectionpermissions.d.ts +2 -0
- package/dist/esm/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/propertyconnectionpermissions.js +2 -0
- package/dist/esm/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
- package/dist/esm/sdk/models/shared/webhook.d.ts +1 -0
- package/dist/esm/sdk/models/shared/webhook.d.ts.map +1 -1
- package/dist/esm/sdk/models/shared/webhook.js +1 -0
- package/dist/esm/sdk/models/shared/webhook.js.map +1 -1
- package/dist/esm/sdk/paymentterm.d.ts +30 -0
- package/dist/esm/sdk/paymentterm.d.ts.map +1 -0
- package/dist/esm/sdk/paymentterm.js +50 -0
- package/dist/esm/sdk/paymentterm.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/accountingCreateAccountingPaymentterm.ts +176 -0
- package/src/funcs/accountingGetAccountingPaymentterm.ts +177 -0
- package/src/funcs/accountingListAccountingPaymentterms.ts +182 -0
- package/src/funcs/accountingPatchAccountingPaymentterm.ts +180 -0
- package/src/funcs/accountingRemoveAccountingPaymentterm.ts +182 -0
- package/src/funcs/accountingUpdateAccountingPaymentterm.ts +180 -0
- package/src/lib/config.ts +2 -2
- package/src/sdk/accounting.ts +90 -0
- package/src/sdk/models/operations/createaccountingbill.ts +1 -0
- package/src/sdk/models/operations/createaccountingcontact.ts +1 -0
- package/src/sdk/models/operations/createaccountinginvoice.ts +1 -0
- package/src/sdk/models/operations/createaccountingpaymentterm.ts +88 -0
- package/src/sdk/models/operations/getaccountingbill.ts +1 -0
- package/src/sdk/models/operations/getaccountingcontact.ts +1 -0
- package/src/sdk/models/operations/getaccountinginvoice.ts +1 -0
- package/src/sdk/models/operations/getaccountingpaymentterm.ts +89 -0
- package/src/sdk/models/operations/index.ts +6 -0
- package/src/sdk/models/operations/listaccountingbills.ts +1 -0
- package/src/sdk/models/operations/listaccountingcontacts.ts +1 -0
- package/src/sdk/models/operations/listaccountinginvoices.ts +1 -0
- package/src/sdk/models/operations/listaccountingpaymentterms.ts +118 -0
- package/src/sdk/models/operations/patchaccountingbill.ts +1 -0
- package/src/sdk/models/operations/patchaccountingcontact.ts +1 -0
- package/src/sdk/models/operations/patchaccountinginvoice.ts +1 -0
- package/src/sdk/models/operations/patchaccountingpaymentterm.ts +94 -0
- package/src/sdk/models/operations/removeaccountingpaymentterm.ts +78 -0
- package/src/sdk/models/operations/updateaccountingbill.ts +1 -0
- package/src/sdk/models/operations/updateaccountingcontact.ts +1 -0
- package/src/sdk/models/operations/updateaccountinginvoice.ts +1 -0
- package/src/sdk/models/operations/updateaccountingpaymentterm.ts +94 -0
- package/src/sdk/models/shared/accountingbill.ts +6 -0
- package/src/sdk/models/shared/accountingcontact.ts +6 -0
- package/src/sdk/models/shared/accountinginvoice.ts +6 -0
- package/src/sdk/models/shared/accountingpaymentterm.ts +202 -0
- package/src/sdk/models/shared/index.ts +1 -0
- package/src/sdk/models/shared/propertyconnectionpermissions.ts +2 -0
- package/src/sdk/models/shared/webhook.ts +1 -0
- package/src/sdk/paymentterm.ts +100 -0
- package/src/sdk/sdk.ts +6 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { UnifiedToCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeJSON, 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 {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
|
|
22
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
23
|
+
import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
|
|
24
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
25
|
+
import * as shared from "../sdk/models/shared/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../sdk/types/async.js";
|
|
27
|
+
import { Result } from "../sdk/types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Create a paymentterm
|
|
31
|
+
*/
|
|
32
|
+
export function accountingCreateAccountingPaymentterm(
|
|
33
|
+
client: UnifiedToCore,
|
|
34
|
+
request: operations.CreateAccountingPaymenttermRequest,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): APIPromise<
|
|
37
|
+
Result<
|
|
38
|
+
shared.AccountingPaymentterm,
|
|
39
|
+
| UnifiedToError
|
|
40
|
+
| ResponseValidationError
|
|
41
|
+
| ConnectionError
|
|
42
|
+
| RequestAbortedError
|
|
43
|
+
| RequestTimeoutError
|
|
44
|
+
| InvalidRequestError
|
|
45
|
+
| UnexpectedClientError
|
|
46
|
+
| SDKValidationError
|
|
47
|
+
>
|
|
48
|
+
> {
|
|
49
|
+
return new APIPromise($do(
|
|
50
|
+
client,
|
|
51
|
+
request,
|
|
52
|
+
options,
|
|
53
|
+
));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async function $do(
|
|
57
|
+
client: UnifiedToCore,
|
|
58
|
+
request: operations.CreateAccountingPaymenttermRequest,
|
|
59
|
+
options?: RequestOptions,
|
|
60
|
+
): Promise<
|
|
61
|
+
[
|
|
62
|
+
Result<
|
|
63
|
+
shared.AccountingPaymentterm,
|
|
64
|
+
| UnifiedToError
|
|
65
|
+
| ResponseValidationError
|
|
66
|
+
| ConnectionError
|
|
67
|
+
| RequestAbortedError
|
|
68
|
+
| RequestTimeoutError
|
|
69
|
+
| InvalidRequestError
|
|
70
|
+
| UnexpectedClientError
|
|
71
|
+
| SDKValidationError
|
|
72
|
+
>,
|
|
73
|
+
APICall,
|
|
74
|
+
]
|
|
75
|
+
> {
|
|
76
|
+
const parsed = safeParse(
|
|
77
|
+
request,
|
|
78
|
+
(value) =>
|
|
79
|
+
operations.CreateAccountingPaymenttermRequest$outboundSchema.parse(value),
|
|
80
|
+
"Input validation failed",
|
|
81
|
+
);
|
|
82
|
+
if (!parsed.ok) {
|
|
83
|
+
return [parsed, { status: "invalid" }];
|
|
84
|
+
}
|
|
85
|
+
const payload = parsed.value;
|
|
86
|
+
const body = encodeJSON("body", payload.AccountingPaymentterm, {
|
|
87
|
+
explode: true,
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
const pathParams = {
|
|
91
|
+
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
92
|
+
explode: false,
|
|
93
|
+
charEncoding: "percent",
|
|
94
|
+
}),
|
|
95
|
+
};
|
|
96
|
+
const path = pathToFunc("/accounting/{connection_id}/paymentterm")(
|
|
97
|
+
pathParams,
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
const query = encodeFormQuery({
|
|
101
|
+
"fields": payload.fields,
|
|
102
|
+
"raw": payload.raw,
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
const headers = new Headers(compactMap({
|
|
106
|
+
"Content-Type": "application/json",
|
|
107
|
+
Accept: "application/json",
|
|
108
|
+
}));
|
|
109
|
+
|
|
110
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
111
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
112
|
+
|
|
113
|
+
const context = {
|
|
114
|
+
options: client._options,
|
|
115
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
116
|
+
operationID: "createAccountingPaymentterm",
|
|
117
|
+
oAuth2Scopes: null,
|
|
118
|
+
|
|
119
|
+
resolvedSecurity: requestSecurity,
|
|
120
|
+
|
|
121
|
+
securitySource: client._options.security,
|
|
122
|
+
retryConfig: options?.retries
|
|
123
|
+
|| client._options.retryConfig
|
|
124
|
+
|| { strategy: "none" },
|
|
125
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const requestRes = client._createRequest(context, {
|
|
129
|
+
security: requestSecurity,
|
|
130
|
+
method: "POST",
|
|
131
|
+
baseURL: options?.serverURL,
|
|
132
|
+
path: path,
|
|
133
|
+
headers: headers,
|
|
134
|
+
query: query,
|
|
135
|
+
body: body,
|
|
136
|
+
userAgent: client._options.userAgent,
|
|
137
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
138
|
+
}, options);
|
|
139
|
+
if (!requestRes.ok) {
|
|
140
|
+
return [requestRes, { status: "invalid" }];
|
|
141
|
+
}
|
|
142
|
+
const req = requestRes.value;
|
|
143
|
+
|
|
144
|
+
const doResult = await client._do(req, {
|
|
145
|
+
context,
|
|
146
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
147
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
148
|
+
retryConfig: context.retryConfig,
|
|
149
|
+
retryCodes: context.retryCodes,
|
|
150
|
+
});
|
|
151
|
+
if (!doResult.ok) {
|
|
152
|
+
return [doResult, { status: "request-error", request: req }];
|
|
153
|
+
}
|
|
154
|
+
const response = doResult.value;
|
|
155
|
+
|
|
156
|
+
const [result] = await M.match<
|
|
157
|
+
shared.AccountingPaymentterm,
|
|
158
|
+
| UnifiedToError
|
|
159
|
+
| ResponseValidationError
|
|
160
|
+
| ConnectionError
|
|
161
|
+
| RequestAbortedError
|
|
162
|
+
| RequestTimeoutError
|
|
163
|
+
| InvalidRequestError
|
|
164
|
+
| UnexpectedClientError
|
|
165
|
+
| SDKValidationError
|
|
166
|
+
>(
|
|
167
|
+
M.json(200, shared.AccountingPaymentterm$inboundSchema),
|
|
168
|
+
M.fail("4XX"),
|
|
169
|
+
M.fail("5XX"),
|
|
170
|
+
)(response, req);
|
|
171
|
+
if (!result.ok) {
|
|
172
|
+
return [result, { status: "complete", request: req, response }];
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return [result, { status: "complete", request: req, response }];
|
|
176
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { UnifiedToCore } 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 {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
|
|
22
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
23
|
+
import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
|
|
24
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
25
|
+
import * as shared from "../sdk/models/shared/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../sdk/types/async.js";
|
|
27
|
+
import { Result } from "../sdk/types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Retrieve a paymentterm
|
|
31
|
+
*/
|
|
32
|
+
export function accountingGetAccountingPaymentterm(
|
|
33
|
+
client: UnifiedToCore,
|
|
34
|
+
request: operations.GetAccountingPaymenttermRequest,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): APIPromise<
|
|
37
|
+
Result<
|
|
38
|
+
shared.AccountingPaymentterm,
|
|
39
|
+
| UnifiedToError
|
|
40
|
+
| ResponseValidationError
|
|
41
|
+
| ConnectionError
|
|
42
|
+
| RequestAbortedError
|
|
43
|
+
| RequestTimeoutError
|
|
44
|
+
| InvalidRequestError
|
|
45
|
+
| UnexpectedClientError
|
|
46
|
+
| SDKValidationError
|
|
47
|
+
>
|
|
48
|
+
> {
|
|
49
|
+
return new APIPromise($do(
|
|
50
|
+
client,
|
|
51
|
+
request,
|
|
52
|
+
options,
|
|
53
|
+
));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async function $do(
|
|
57
|
+
client: UnifiedToCore,
|
|
58
|
+
request: operations.GetAccountingPaymenttermRequest,
|
|
59
|
+
options?: RequestOptions,
|
|
60
|
+
): Promise<
|
|
61
|
+
[
|
|
62
|
+
Result<
|
|
63
|
+
shared.AccountingPaymentterm,
|
|
64
|
+
| UnifiedToError
|
|
65
|
+
| ResponseValidationError
|
|
66
|
+
| ConnectionError
|
|
67
|
+
| RequestAbortedError
|
|
68
|
+
| RequestTimeoutError
|
|
69
|
+
| InvalidRequestError
|
|
70
|
+
| UnexpectedClientError
|
|
71
|
+
| SDKValidationError
|
|
72
|
+
>,
|
|
73
|
+
APICall,
|
|
74
|
+
]
|
|
75
|
+
> {
|
|
76
|
+
const parsed = safeParse(
|
|
77
|
+
request,
|
|
78
|
+
(value) =>
|
|
79
|
+
operations.GetAccountingPaymenttermRequest$outboundSchema.parse(value),
|
|
80
|
+
"Input validation failed",
|
|
81
|
+
);
|
|
82
|
+
if (!parsed.ok) {
|
|
83
|
+
return [parsed, { status: "invalid" }];
|
|
84
|
+
}
|
|
85
|
+
const payload = parsed.value;
|
|
86
|
+
const body = null;
|
|
87
|
+
|
|
88
|
+
const pathParams = {
|
|
89
|
+
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
90
|
+
explode: false,
|
|
91
|
+
charEncoding: "percent",
|
|
92
|
+
}),
|
|
93
|
+
id: encodeSimple("id", payload.id, {
|
|
94
|
+
explode: false,
|
|
95
|
+
charEncoding: "percent",
|
|
96
|
+
}),
|
|
97
|
+
};
|
|
98
|
+
const path = pathToFunc("/accounting/{connection_id}/paymentterm/{id}")(
|
|
99
|
+
pathParams,
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
const query = encodeFormQuery({
|
|
103
|
+
"fields": payload.fields,
|
|
104
|
+
"raw": payload.raw,
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
const headers = new Headers(compactMap({
|
|
108
|
+
Accept: "application/json",
|
|
109
|
+
}));
|
|
110
|
+
|
|
111
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
112
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
113
|
+
|
|
114
|
+
const context = {
|
|
115
|
+
options: client._options,
|
|
116
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
117
|
+
operationID: "getAccountingPaymentterm",
|
|
118
|
+
oAuth2Scopes: null,
|
|
119
|
+
|
|
120
|
+
resolvedSecurity: requestSecurity,
|
|
121
|
+
|
|
122
|
+
securitySource: client._options.security,
|
|
123
|
+
retryConfig: options?.retries
|
|
124
|
+
|| client._options.retryConfig
|
|
125
|
+
|| { strategy: "none" },
|
|
126
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const requestRes = client._createRequest(context, {
|
|
130
|
+
security: requestSecurity,
|
|
131
|
+
method: "GET",
|
|
132
|
+
baseURL: options?.serverURL,
|
|
133
|
+
path: path,
|
|
134
|
+
headers: headers,
|
|
135
|
+
query: query,
|
|
136
|
+
body: body,
|
|
137
|
+
userAgent: client._options.userAgent,
|
|
138
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
139
|
+
}, options);
|
|
140
|
+
if (!requestRes.ok) {
|
|
141
|
+
return [requestRes, { status: "invalid" }];
|
|
142
|
+
}
|
|
143
|
+
const req = requestRes.value;
|
|
144
|
+
|
|
145
|
+
const doResult = await client._do(req, {
|
|
146
|
+
context,
|
|
147
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
148
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
149
|
+
retryConfig: context.retryConfig,
|
|
150
|
+
retryCodes: context.retryCodes,
|
|
151
|
+
});
|
|
152
|
+
if (!doResult.ok) {
|
|
153
|
+
return [doResult, { status: "request-error", request: req }];
|
|
154
|
+
}
|
|
155
|
+
const response = doResult.value;
|
|
156
|
+
|
|
157
|
+
const [result] = await M.match<
|
|
158
|
+
shared.AccountingPaymentterm,
|
|
159
|
+
| UnifiedToError
|
|
160
|
+
| ResponseValidationError
|
|
161
|
+
| ConnectionError
|
|
162
|
+
| RequestAbortedError
|
|
163
|
+
| RequestTimeoutError
|
|
164
|
+
| InvalidRequestError
|
|
165
|
+
| UnexpectedClientError
|
|
166
|
+
| SDKValidationError
|
|
167
|
+
>(
|
|
168
|
+
M.json(200, shared.AccountingPaymentterm$inboundSchema),
|
|
169
|
+
M.fail("4XX"),
|
|
170
|
+
M.fail("5XX"),
|
|
171
|
+
)(response, req);
|
|
172
|
+
if (!result.ok) {
|
|
173
|
+
return [result, { status: "complete", request: req, response }];
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return [result, { status: "complete", request: req, response }];
|
|
177
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { UnifiedToCore } from "../core.js";
|
|
7
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
8
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
9
|
+
import * as M from "../lib/matchers.js";
|
|
10
|
+
import { compactMap } from "../lib/primitives.js";
|
|
11
|
+
import { safeParse } from "../lib/schemas.js";
|
|
12
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
13
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
14
|
+
import { pathToFunc } from "../lib/url.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
22
|
+
import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
24
|
+
import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
|
|
25
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
26
|
+
import * as shared from "../sdk/models/shared/index.js";
|
|
27
|
+
import { APICall, APIPromise } from "../sdk/types/async.js";
|
|
28
|
+
import { Result } from "../sdk/types/fp.js";
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* List all paymentterms
|
|
32
|
+
*/
|
|
33
|
+
export function accountingListAccountingPaymentterms(
|
|
34
|
+
client: UnifiedToCore,
|
|
35
|
+
request: operations.ListAccountingPaymenttermsRequest,
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): APIPromise<
|
|
38
|
+
Result<
|
|
39
|
+
Array<shared.AccountingPaymentterm>,
|
|
40
|
+
| UnifiedToError
|
|
41
|
+
| ResponseValidationError
|
|
42
|
+
| ConnectionError
|
|
43
|
+
| RequestAbortedError
|
|
44
|
+
| RequestTimeoutError
|
|
45
|
+
| InvalidRequestError
|
|
46
|
+
| UnexpectedClientError
|
|
47
|
+
| SDKValidationError
|
|
48
|
+
>
|
|
49
|
+
> {
|
|
50
|
+
return new APIPromise($do(
|
|
51
|
+
client,
|
|
52
|
+
request,
|
|
53
|
+
options,
|
|
54
|
+
));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function $do(
|
|
58
|
+
client: UnifiedToCore,
|
|
59
|
+
request: operations.ListAccountingPaymenttermsRequest,
|
|
60
|
+
options?: RequestOptions,
|
|
61
|
+
): Promise<
|
|
62
|
+
[
|
|
63
|
+
Result<
|
|
64
|
+
Array<shared.AccountingPaymentterm>,
|
|
65
|
+
| UnifiedToError
|
|
66
|
+
| ResponseValidationError
|
|
67
|
+
| ConnectionError
|
|
68
|
+
| RequestAbortedError
|
|
69
|
+
| RequestTimeoutError
|
|
70
|
+
| InvalidRequestError
|
|
71
|
+
| UnexpectedClientError
|
|
72
|
+
| SDKValidationError
|
|
73
|
+
>,
|
|
74
|
+
APICall,
|
|
75
|
+
]
|
|
76
|
+
> {
|
|
77
|
+
const parsed = safeParse(
|
|
78
|
+
request,
|
|
79
|
+
(value) =>
|
|
80
|
+
operations.ListAccountingPaymenttermsRequest$outboundSchema.parse(value),
|
|
81
|
+
"Input validation failed",
|
|
82
|
+
);
|
|
83
|
+
if (!parsed.ok) {
|
|
84
|
+
return [parsed, { status: "invalid" }];
|
|
85
|
+
}
|
|
86
|
+
const payload = parsed.value;
|
|
87
|
+
const body = null;
|
|
88
|
+
|
|
89
|
+
const pathParams = {
|
|
90
|
+
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
91
|
+
explode: false,
|
|
92
|
+
charEncoding: "percent",
|
|
93
|
+
}),
|
|
94
|
+
};
|
|
95
|
+
const path = pathToFunc("/accounting/{connection_id}/paymentterm")(
|
|
96
|
+
pathParams,
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
const query = encodeFormQuery({
|
|
100
|
+
"fields": payload.fields,
|
|
101
|
+
"limit": payload.limit,
|
|
102
|
+
"offset": payload.offset,
|
|
103
|
+
"order": payload.order,
|
|
104
|
+
"org_id": payload.org_id,
|
|
105
|
+
"query": payload.query,
|
|
106
|
+
"raw": payload.raw,
|
|
107
|
+
"sort": payload.sort,
|
|
108
|
+
"type": payload.type,
|
|
109
|
+
"updated_gte": payload.updated_gte,
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const headers = new Headers(compactMap({
|
|
113
|
+
Accept: "application/json",
|
|
114
|
+
}));
|
|
115
|
+
|
|
116
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
117
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
118
|
+
|
|
119
|
+
const context = {
|
|
120
|
+
options: client._options,
|
|
121
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
122
|
+
operationID: "listAccountingPaymentterms",
|
|
123
|
+
oAuth2Scopes: null,
|
|
124
|
+
|
|
125
|
+
resolvedSecurity: requestSecurity,
|
|
126
|
+
|
|
127
|
+
securitySource: client._options.security,
|
|
128
|
+
retryConfig: options?.retries
|
|
129
|
+
|| client._options.retryConfig
|
|
130
|
+
|| { strategy: "none" },
|
|
131
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const requestRes = client._createRequest(context, {
|
|
135
|
+
security: requestSecurity,
|
|
136
|
+
method: "GET",
|
|
137
|
+
baseURL: options?.serverURL,
|
|
138
|
+
path: path,
|
|
139
|
+
headers: headers,
|
|
140
|
+
query: query,
|
|
141
|
+
body: body,
|
|
142
|
+
userAgent: client._options.userAgent,
|
|
143
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
144
|
+
}, options);
|
|
145
|
+
if (!requestRes.ok) {
|
|
146
|
+
return [requestRes, { status: "invalid" }];
|
|
147
|
+
}
|
|
148
|
+
const req = requestRes.value;
|
|
149
|
+
|
|
150
|
+
const doResult = await client._do(req, {
|
|
151
|
+
context,
|
|
152
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
153
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
154
|
+
retryConfig: context.retryConfig,
|
|
155
|
+
retryCodes: context.retryCodes,
|
|
156
|
+
});
|
|
157
|
+
if (!doResult.ok) {
|
|
158
|
+
return [doResult, { status: "request-error", request: req }];
|
|
159
|
+
}
|
|
160
|
+
const response = doResult.value;
|
|
161
|
+
|
|
162
|
+
const [result] = await M.match<
|
|
163
|
+
Array<shared.AccountingPaymentterm>,
|
|
164
|
+
| UnifiedToError
|
|
165
|
+
| ResponseValidationError
|
|
166
|
+
| ConnectionError
|
|
167
|
+
| RequestAbortedError
|
|
168
|
+
| RequestTimeoutError
|
|
169
|
+
| InvalidRequestError
|
|
170
|
+
| UnexpectedClientError
|
|
171
|
+
| SDKValidationError
|
|
172
|
+
>(
|
|
173
|
+
M.json(200, z.array(shared.AccountingPaymentterm$inboundSchema)),
|
|
174
|
+
M.fail("4XX"),
|
|
175
|
+
M.fail("5XX"),
|
|
176
|
+
)(response, req);
|
|
177
|
+
if (!result.ok) {
|
|
178
|
+
return [result, { status: "complete", request: req, response }];
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
return [result, { status: "complete", request: req, response }];
|
|
182
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { UnifiedToCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeJSON, 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 {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../sdk/models/errors/responsevalidationerror.js";
|
|
22
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
23
|
+
import { UnifiedToError } from "../sdk/models/errors/unifiedtoerror.js";
|
|
24
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
25
|
+
import * as shared from "../sdk/models/shared/index.js";
|
|
26
|
+
import { APICall, APIPromise } from "../sdk/types/async.js";
|
|
27
|
+
import { Result } from "../sdk/types/fp.js";
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Update a paymentterm
|
|
31
|
+
*/
|
|
32
|
+
export function accountingPatchAccountingPaymentterm(
|
|
33
|
+
client: UnifiedToCore,
|
|
34
|
+
request: operations.PatchAccountingPaymenttermRequest,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): APIPromise<
|
|
37
|
+
Result<
|
|
38
|
+
shared.AccountingPaymentterm,
|
|
39
|
+
| UnifiedToError
|
|
40
|
+
| ResponseValidationError
|
|
41
|
+
| ConnectionError
|
|
42
|
+
| RequestAbortedError
|
|
43
|
+
| RequestTimeoutError
|
|
44
|
+
| InvalidRequestError
|
|
45
|
+
| UnexpectedClientError
|
|
46
|
+
| SDKValidationError
|
|
47
|
+
>
|
|
48
|
+
> {
|
|
49
|
+
return new APIPromise($do(
|
|
50
|
+
client,
|
|
51
|
+
request,
|
|
52
|
+
options,
|
|
53
|
+
));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
async function $do(
|
|
57
|
+
client: UnifiedToCore,
|
|
58
|
+
request: operations.PatchAccountingPaymenttermRequest,
|
|
59
|
+
options?: RequestOptions,
|
|
60
|
+
): Promise<
|
|
61
|
+
[
|
|
62
|
+
Result<
|
|
63
|
+
shared.AccountingPaymentterm,
|
|
64
|
+
| UnifiedToError
|
|
65
|
+
| ResponseValidationError
|
|
66
|
+
| ConnectionError
|
|
67
|
+
| RequestAbortedError
|
|
68
|
+
| RequestTimeoutError
|
|
69
|
+
| InvalidRequestError
|
|
70
|
+
| UnexpectedClientError
|
|
71
|
+
| SDKValidationError
|
|
72
|
+
>,
|
|
73
|
+
APICall,
|
|
74
|
+
]
|
|
75
|
+
> {
|
|
76
|
+
const parsed = safeParse(
|
|
77
|
+
request,
|
|
78
|
+
(value) =>
|
|
79
|
+
operations.PatchAccountingPaymenttermRequest$outboundSchema.parse(value),
|
|
80
|
+
"Input validation failed",
|
|
81
|
+
);
|
|
82
|
+
if (!parsed.ok) {
|
|
83
|
+
return [parsed, { status: "invalid" }];
|
|
84
|
+
}
|
|
85
|
+
const payload = parsed.value;
|
|
86
|
+
const body = encodeJSON("body", payload.AccountingPaymentterm, {
|
|
87
|
+
explode: true,
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
const pathParams = {
|
|
91
|
+
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
92
|
+
explode: false,
|
|
93
|
+
charEncoding: "percent",
|
|
94
|
+
}),
|
|
95
|
+
id: encodeSimple("id", payload.id, {
|
|
96
|
+
explode: false,
|
|
97
|
+
charEncoding: "percent",
|
|
98
|
+
}),
|
|
99
|
+
};
|
|
100
|
+
const path = pathToFunc("/accounting/{connection_id}/paymentterm/{id}")(
|
|
101
|
+
pathParams,
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
const query = encodeFormQuery({
|
|
105
|
+
"fields": payload.fields,
|
|
106
|
+
"raw": payload.raw,
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
const headers = new Headers(compactMap({
|
|
110
|
+
"Content-Type": "application/json",
|
|
111
|
+
Accept: "application/json",
|
|
112
|
+
}));
|
|
113
|
+
|
|
114
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
115
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
116
|
+
|
|
117
|
+
const context = {
|
|
118
|
+
options: client._options,
|
|
119
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
120
|
+
operationID: "patchAccountingPaymentterm",
|
|
121
|
+
oAuth2Scopes: null,
|
|
122
|
+
|
|
123
|
+
resolvedSecurity: requestSecurity,
|
|
124
|
+
|
|
125
|
+
securitySource: client._options.security,
|
|
126
|
+
retryConfig: options?.retries
|
|
127
|
+
|| client._options.retryConfig
|
|
128
|
+
|| { strategy: "none" },
|
|
129
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
const requestRes = client._createRequest(context, {
|
|
133
|
+
security: requestSecurity,
|
|
134
|
+
method: "PATCH",
|
|
135
|
+
baseURL: options?.serverURL,
|
|
136
|
+
path: path,
|
|
137
|
+
headers: headers,
|
|
138
|
+
query: query,
|
|
139
|
+
body: body,
|
|
140
|
+
userAgent: client._options.userAgent,
|
|
141
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
142
|
+
}, options);
|
|
143
|
+
if (!requestRes.ok) {
|
|
144
|
+
return [requestRes, { status: "invalid" }];
|
|
145
|
+
}
|
|
146
|
+
const req = requestRes.value;
|
|
147
|
+
|
|
148
|
+
const doResult = await client._do(req, {
|
|
149
|
+
context,
|
|
150
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
151
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
152
|
+
retryConfig: context.retryConfig,
|
|
153
|
+
retryCodes: context.retryCodes,
|
|
154
|
+
});
|
|
155
|
+
if (!doResult.ok) {
|
|
156
|
+
return [doResult, { status: "request-error", request: req }];
|
|
157
|
+
}
|
|
158
|
+
const response = doResult.value;
|
|
159
|
+
|
|
160
|
+
const [result] = await M.match<
|
|
161
|
+
shared.AccountingPaymentterm,
|
|
162
|
+
| UnifiedToError
|
|
163
|
+
| ResponseValidationError
|
|
164
|
+
| ConnectionError
|
|
165
|
+
| RequestAbortedError
|
|
166
|
+
| RequestTimeoutError
|
|
167
|
+
| InvalidRequestError
|
|
168
|
+
| UnexpectedClientError
|
|
169
|
+
| SDKValidationError
|
|
170
|
+
>(
|
|
171
|
+
M.json(200, shared.AccountingPaymentterm$inboundSchema),
|
|
172
|
+
M.fail("4XX"),
|
|
173
|
+
M.fail("5XX"),
|
|
174
|
+
)(response, req);
|
|
175
|
+
if (!result.ok) {
|
|
176
|
+
return [result, { status: "complete", request: req, response }];
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return [result, { status: "complete", request: req, response }];
|
|
180
|
+
}
|