conductor-node 11.10.0 → 12.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/LICENSE +201 -21
- package/README.md +330 -63
- package/_shims/MultipartBody.d.ts +9 -0
- package/_shims/MultipartBody.d.ts.map +1 -0
- package/_shims/MultipartBody.js +16 -0
- package/_shims/MultipartBody.js.map +1 -0
- package/_shims/MultipartBody.mjs +12 -0
- package/_shims/MultipartBody.mjs.map +1 -0
- package/_shims/README.md +46 -0
- package/_shims/auto/runtime-bun.d.ts +5 -0
- package/_shims/auto/runtime-bun.d.ts.map +1 -0
- package/_shims/auto/runtime-bun.js +21 -0
- package/_shims/auto/runtime-bun.js.map +1 -0
- package/_shims/auto/runtime-bun.mjs +2 -0
- package/_shims/auto/runtime-bun.mjs.map +1 -0
- package/_shims/auto/runtime-node.d.ts +5 -0
- package/_shims/auto/runtime-node.d.ts.map +1 -0
- package/_shims/auto/runtime-node.js +21 -0
- package/_shims/auto/runtime-node.js.map +1 -0
- package/_shims/auto/runtime-node.mjs +2 -0
- package/_shims/auto/runtime-node.mjs.map +1 -0
- package/_shims/auto/runtime.d.ts +5 -0
- package/_shims/auto/runtime.d.ts.map +1 -0
- package/_shims/auto/runtime.js +21 -0
- package/_shims/auto/runtime.js.map +1 -0
- package/_shims/auto/runtime.mjs +2 -0
- package/_shims/auto/runtime.mjs.map +1 -0
- package/_shims/auto/types-node.d.ts +5 -0
- package/_shims/auto/types-node.d.ts.map +1 -0
- package/_shims/auto/types-node.js +21 -0
- package/_shims/auto/types-node.js.map +1 -0
- package/_shims/auto/types-node.mjs +2 -0
- package/_shims/auto/types-node.mjs.map +1 -0
- package/_shims/auto/types.d.ts +101 -0
- package/_shims/auto/types.js +3 -0
- package/_shims/auto/types.mjs +3 -0
- package/_shims/bun-runtime.d.ts +6 -0
- package/_shims/bun-runtime.d.ts.map +1 -0
- package/_shims/bun-runtime.js +14 -0
- package/_shims/bun-runtime.js.map +1 -0
- package/_shims/bun-runtime.mjs +10 -0
- package/_shims/bun-runtime.mjs.map +1 -0
- package/_shims/index.d.ts +81 -0
- package/_shims/index.js +13 -0
- package/_shims/index.mjs +7 -0
- package/_shims/manual-types.d.ts +12 -0
- package/_shims/manual-types.js +3 -0
- package/_shims/manual-types.mjs +3 -0
- package/_shims/node-runtime.d.ts +3 -0
- package/_shims/node-runtime.d.ts.map +1 -0
- package/_shims/node-runtime.js +89 -0
- package/_shims/node-runtime.js.map +1 -0
- package/_shims/node-runtime.mjs +56 -0
- package/_shims/node-runtime.mjs.map +1 -0
- package/_shims/node-types.d.ts +42 -0
- package/_shims/node-types.js +3 -0
- package/_shims/node-types.mjs +3 -0
- package/_shims/registry.d.ts +37 -0
- package/_shims/registry.d.ts.map +1 -0
- package/_shims/registry.js +41 -0
- package/_shims/registry.js.map +1 -0
- package/_shims/registry.mjs +37 -0
- package/_shims/registry.mjs.map +1 -0
- package/_shims/web-runtime.d.ts +5 -0
- package/_shims/web-runtime.d.ts.map +1 -0
- package/_shims/web-runtime.js +78 -0
- package/_shims/web-runtime.js.map +1 -0
- package/_shims/web-runtime.mjs +71 -0
- package/_shims/web-runtime.mjs.map +1 -0
- package/_shims/web-types.d.ts +83 -0
- package/_shims/web-types.js +3 -0
- package/_shims/web-types.mjs +3 -0
- package/core.d.ts +241 -0
- package/core.d.ts.map +1 -0
- package/core.js +914 -0
- package/core.js.map +1 -0
- package/core.mjs +882 -0
- package/core.mjs.map +1 -0
- package/error.d.ts +47 -0
- package/error.d.ts.map +1 -0
- package/error.js +113 -0
- package/error.js.map +1 -0
- package/error.mjs +97 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +121 -0
- package/index.d.ts +121 -0
- package/index.d.ts.map +1 -0
- package/index.js +133 -0
- package/index.js.map +1 -0
- package/index.mjs +90 -0
- package/index.mjs.map +1 -0
- package/internal/qs/formats.d.ts +6 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +11 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +8 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +280 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +276 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/{dist/src/resources → internal/qs}/types.js +1 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.ts +14 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +229 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/package.json +111 -35
- package/pagination.d.ts +18 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +40 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +36 -0
- package/pagination.mjs.map +1 -0
- package/resource.d.ts +6 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +11 -0
- package/resource.js.map +1 -0
- package/resource.mjs +7 -0
- package/resource.mjs.map +1 -0
- package/resources/auth-sessions.d.ts +79 -0
- package/resources/auth-sessions.d.ts.map +1 -0
- package/resources/auth-sessions.js +23 -0
- package/resources/auth-sessions.js.map +1 -0
- package/resources/auth-sessions.mjs +19 -0
- package/resources/auth-sessions.mjs.map +1 -0
- package/resources/end-users.d.ts +154 -0
- package/resources/end-users.d.ts.map +1 -0
- package/resources/end-users.js +48 -0
- package/resources/end-users.js.map +1 -0
- package/resources/end-users.mjs +44 -0
- package/resources/end-users.mjs.map +1 -0
- package/resources/index.d.ts +4 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +11 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +5 -0
- package/resources/index.mjs.map +1 -0
- package/resources/qbd/accounts.d.ts +579 -0
- package/resources/qbd/accounts.d.ts.map +1 -0
- package/resources/qbd/accounts.js +54 -0
- package/resources/qbd/accounts.js.map +1 -0
- package/resources/qbd/accounts.mjs +50 -0
- package/resources/qbd/accounts.mjs.map +1 -0
- package/resources/qbd/bill-check-payments.d.ts +831 -0
- package/resources/qbd/bill-check-payments.d.ts.map +1 -0
- package/resources/qbd/bill-check-payments.js +70 -0
- package/resources/qbd/bill-check-payments.js.map +1 -0
- package/resources/qbd/bill-check-payments.mjs +65 -0
- package/resources/qbd/bill-check-payments.mjs.map +1 -0
- package/resources/qbd/bill-credit-card-payments.d.ts +641 -0
- package/resources/qbd/bill-credit-card-payments.d.ts.map +1 -0
- package/resources/qbd/bill-credit-card-payments.js +55 -0
- package/resources/qbd/bill-credit-card-payments.js.map +1 -0
- package/resources/qbd/bill-credit-card-payments.mjs +50 -0
- package/resources/qbd/bill-credit-card-payments.mjs.map +1 -0
- package/resources/qbd/bills.d.ts +2561 -0
- package/resources/qbd/bills.d.ts.map +1 -0
- package/resources/qbd/bills.js +69 -0
- package/resources/qbd/bills.js.map +1 -0
- package/resources/qbd/bills.mjs +64 -0
- package/resources/qbd/bills.mjs.map +1 -0
- package/resources/qbd/checks.d.ts +2528 -0
- package/resources/qbd/checks.d.ts.map +1 -0
- package/resources/qbd/checks.js +69 -0
- package/resources/qbd/checks.js.map +1 -0
- package/resources/qbd/checks.mjs +64 -0
- package/resources/qbd/checks.mjs.map +1 -0
- package/resources/qbd/classes.d.ts +289 -0
- package/resources/qbd/classes.d.ts.map +1 -0
- package/resources/qbd/classes.js +54 -0
- package/resources/qbd/classes.js.map +1 -0
- package/resources/qbd/classes.mjs +50 -0
- package/resources/qbd/classes.mjs.map +1 -0
- package/resources/qbd/credit-card-charges.d.ts +2236 -0
- package/resources/qbd/credit-card-charges.d.ts.map +1 -0
- package/resources/qbd/credit-card-charges.js +69 -0
- package/resources/qbd/credit-card-charges.js.map +1 -0
- package/resources/qbd/credit-card-charges.mjs +64 -0
- package/resources/qbd/credit-card-charges.mjs.map +1 -0
- package/resources/qbd/credit-card-credits.d.ts +2233 -0
- package/resources/qbd/credit-card-credits.d.ts.map +1 -0
- package/resources/qbd/credit-card-credits.js +69 -0
- package/resources/qbd/credit-card-credits.js.map +1 -0
- package/resources/qbd/credit-card-credits.mjs +64 -0
- package/resources/qbd/credit-card-credits.mjs.map +1 -0
- package/resources/qbd/credit-memos.d.ts +2649 -0
- package/resources/qbd/credit-memos.d.ts.map +1 -0
- package/resources/qbd/credit-memos.js +69 -0
- package/resources/qbd/credit-memos.js.map +1 -0
- package/resources/qbd/credit-memos.mjs +64 -0
- package/resources/qbd/credit-memos.mjs.map +1 -0
- package/resources/qbd/customers.d.ts +2106 -0
- package/resources/qbd/customers.d.ts.map +1 -0
- package/resources/qbd/customers.js +58 -0
- package/resources/qbd/customers.js.map +1 -0
- package/resources/qbd/customers.mjs +53 -0
- package/resources/qbd/customers.mjs.map +1 -0
- package/resources/qbd/date-driven-terms.d.ts +242 -0
- package/resources/qbd/date-driven-terms.d.ts.map +1 -0
- package/resources/qbd/date-driven-terms.js +43 -0
- package/resources/qbd/date-driven-terms.js.map +1 -0
- package/resources/qbd/date-driven-terms.mjs +39 -0
- package/resources/qbd/date-driven-terms.mjs.map +1 -0
- package/resources/qbd/discount-items.d.ts +576 -0
- package/resources/qbd/discount-items.d.ts.map +1 -0
- package/resources/qbd/discount-items.js +58 -0
- package/resources/qbd/discount-items.js.map +1 -0
- package/resources/qbd/discount-items.mjs +53 -0
- package/resources/qbd/discount-items.mjs.map +1 -0
- package/resources/qbd/employees.d.ts +1669 -0
- package/resources/qbd/employees.d.ts.map +1 -0
- package/resources/qbd/employees.js +58 -0
- package/resources/qbd/employees.js.map +1 -0
- package/resources/qbd/employees.mjs +53 -0
- package/resources/qbd/employees.mjs.map +1 -0
- package/resources/qbd/estimates.d.ts +2493 -0
- package/resources/qbd/estimates.d.ts.map +1 -0
- package/resources/qbd/estimates.js +69 -0
- package/resources/qbd/estimates.js.map +1 -0
- package/resources/qbd/estimates.mjs +64 -0
- package/resources/qbd/estimates.mjs.map +1 -0
- package/resources/qbd/index.d.ts +37 -0
- package/resources/qbd/index.d.ts.map +1 -0
- package/resources/qbd/index.js +105 -0
- package/resources/qbd/index.js.map +1 -0
- package/resources/qbd/index.mjs +38 -0
- package/resources/qbd/index.mjs.map +1 -0
- package/resources/qbd/inventory-adjustments.d.ts +814 -0
- package/resources/qbd/inventory-adjustments.d.ts.map +1 -0
- package/resources/qbd/inventory-adjustments.js +66 -0
- package/resources/qbd/inventory-adjustments.js.map +1 -0
- package/resources/qbd/inventory-adjustments.mjs +62 -0
- package/resources/qbd/inventory-adjustments.mjs.map +1 -0
- package/resources/qbd/inventory-assembly-items.d.ts +931 -0
- package/resources/qbd/inventory-assembly-items.d.ts.map +1 -0
- package/resources/qbd/inventory-assembly-items.js +54 -0
- package/resources/qbd/inventory-assembly-items.js.map +1 -0
- package/resources/qbd/inventory-assembly-items.mjs +49 -0
- package/resources/qbd/inventory-assembly-items.mjs.map +1 -0
- package/resources/qbd/inventory-items.d.ts +844 -0
- package/resources/qbd/inventory-items.d.ts.map +1 -0
- package/resources/qbd/inventory-items.js +58 -0
- package/resources/qbd/inventory-items.js.map +1 -0
- package/resources/qbd/inventory-items.mjs +53 -0
- package/resources/qbd/inventory-items.mjs.map +1 -0
- package/resources/qbd/inventory-sites.d.ts +477 -0
- package/resources/qbd/inventory-sites.d.ts.map +1 -0
- package/resources/qbd/inventory-sites.js +54 -0
- package/resources/qbd/inventory-sites.js.map +1 -0
- package/resources/qbd/inventory-sites.mjs +50 -0
- package/resources/qbd/inventory-sites.mjs.map +1 -0
- package/resources/qbd/invoices.d.ts +2873 -0
- package/resources/qbd/invoices.d.ts.map +1 -0
- package/resources/qbd/invoices.js +69 -0
- package/resources/qbd/invoices.js.map +1 -0
- package/resources/qbd/invoices.mjs +64 -0
- package/resources/qbd/invoices.mjs.map +1 -0
- package/resources/qbd/journal-entries.d.ts +856 -0
- package/resources/qbd/journal-entries.d.ts.map +1 -0
- package/resources/qbd/journal-entries.js +69 -0
- package/resources/qbd/journal-entries.js.map +1 -0
- package/resources/qbd/journal-entries.mjs +64 -0
- package/resources/qbd/journal-entries.mjs.map +1 -0
- package/resources/qbd/non-inventory-items.d.ts +950 -0
- package/resources/qbd/non-inventory-items.d.ts.map +1 -0
- package/resources/qbd/non-inventory-items.js +58 -0
- package/resources/qbd/non-inventory-items.js.map +1 -0
- package/resources/qbd/non-inventory-items.mjs +53 -0
- package/resources/qbd/non-inventory-items.mjs.map +1 -0
- package/resources/qbd/payroll-wage-items.d.ts +215 -0
- package/resources/qbd/payroll-wage-items.d.ts.map +1 -0
- package/resources/qbd/payroll-wage-items.js +47 -0
- package/resources/qbd/payroll-wage-items.js.map +1 -0
- package/resources/qbd/payroll-wage-items.mjs +42 -0
- package/resources/qbd/payroll-wage-items.mjs.map +1 -0
- package/resources/qbd/purchase-orders.d.ts +2554 -0
- package/resources/qbd/purchase-orders.d.ts.map +1 -0
- package/resources/qbd/purchase-orders.js +69 -0
- package/resources/qbd/purchase-orders.js.map +1 -0
- package/resources/qbd/purchase-orders.mjs +64 -0
- package/resources/qbd/purchase-orders.mjs.map +1 -0
- package/resources/qbd/qbd.d.ts +146 -0
- package/resources/qbd/qbd.d.ts.map +1 -0
- package/resources/qbd/qbd.js +202 -0
- package/resources/qbd/qbd.js.map +1 -0
- package/resources/qbd/qbd.mjs +175 -0
- package/resources/qbd/qbd.mjs.map +1 -0
- package/resources/qbd/receive-payments.d.ts +1282 -0
- package/resources/qbd/receive-payments.d.ts.map +1 -0
- package/resources/qbd/receive-payments.js +70 -0
- package/resources/qbd/receive-payments.js.map +1 -0
- package/resources/qbd/receive-payments.mjs +65 -0
- package/resources/qbd/receive-payments.mjs.map +1 -0
- package/resources/qbd/sales-orders.d.ts +2628 -0
- package/resources/qbd/sales-orders.d.ts.map +1 -0
- package/resources/qbd/sales-orders.js +69 -0
- package/resources/qbd/sales-orders.js.map +1 -0
- package/resources/qbd/sales-orders.mjs +64 -0
- package/resources/qbd/sales-orders.mjs.map +1 -0
- package/resources/qbd/sales-receipts.d.ts +3373 -0
- package/resources/qbd/sales-receipts.d.ts.map +1 -0
- package/resources/qbd/sales-receipts.js +69 -0
- package/resources/qbd/sales-receipts.js.map +1 -0
- package/resources/qbd/sales-receipts.mjs +64 -0
- package/resources/qbd/sales-receipts.mjs.map +1 -0
- package/resources/qbd/sales-representatives.d.ts +251 -0
- package/resources/qbd/sales-representatives.d.ts.map +1 -0
- package/resources/qbd/sales-representatives.js +54 -0
- package/resources/qbd/sales-representatives.js.map +1 -0
- package/resources/qbd/sales-representatives.mjs +50 -0
- package/resources/qbd/sales-representatives.mjs.map +1 -0
- package/resources/qbd/sales-tax-codes.d.ts +306 -0
- package/resources/qbd/sales-tax-codes.d.ts.map +1 -0
- package/resources/qbd/sales-tax-codes.js +54 -0
- package/resources/qbd/sales-tax-codes.js.map +1 -0
- package/resources/qbd/sales-tax-codes.mjs +50 -0
- package/resources/qbd/sales-tax-codes.mjs.map +1 -0
- package/resources/qbd/sales-tax-items.d.ts +458 -0
- package/resources/qbd/sales-tax-items.d.ts.map +1 -0
- package/resources/qbd/sales-tax-items.js +58 -0
- package/resources/qbd/sales-tax-items.js.map +1 -0
- package/resources/qbd/sales-tax-items.mjs +53 -0
- package/resources/qbd/sales-tax-items.mjs.map +1 -0
- package/resources/qbd/service-items.d.ts +923 -0
- package/resources/qbd/service-items.d.ts.map +1 -0
- package/resources/qbd/service-items.js +58 -0
- package/resources/qbd/service-items.js.map +1 -0
- package/resources/qbd/service-items.mjs +53 -0
- package/resources/qbd/service-items.mjs.map +1 -0
- package/resources/qbd/standard-terms.d.ts +225 -0
- package/resources/qbd/standard-terms.d.ts.map +1 -0
- package/resources/qbd/standard-terms.js +43 -0
- package/resources/qbd/standard-terms.js.map +1 -0
- package/resources/qbd/standard-terms.mjs +39 -0
- package/resources/qbd/standard-terms.mjs.map +1 -0
- package/resources/qbd/subtotal-items.d.ts +323 -0
- package/resources/qbd/subtotal-items.d.ts.map +1 -0
- package/resources/qbd/subtotal-items.js +58 -0
- package/resources/qbd/subtotal-items.js.map +1 -0
- package/resources/qbd/subtotal-items.mjs +53 -0
- package/resources/qbd/subtotal-items.mjs.map +1 -0
- package/resources/qbd/transfers.d.ts +269 -0
- package/resources/qbd/transfers.d.ts.map +1 -0
- package/resources/qbd/transfers.js +58 -0
- package/resources/qbd/transfers.js.map +1 -0
- package/resources/qbd/transfers.mjs +53 -0
- package/resources/qbd/transfers.mjs.map +1 -0
- package/resources/qbd/vendor-credits.d.ts +2298 -0
- package/resources/qbd/vendor-credits.d.ts.map +1 -0
- package/resources/qbd/vendor-credits.js +69 -0
- package/resources/qbd/vendor-credits.js.map +1 -0
- package/resources/qbd/vendor-credits.mjs +64 -0
- package/resources/qbd/vendor-credits.mjs.map +1 -0
- package/resources/qbd/vendors.d.ts +1677 -0
- package/resources/qbd/vendors.d.ts.map +1 -0
- package/resources/qbd/vendors.js +58 -0
- package/resources/qbd/vendors.js.map +1 -0
- package/resources/qbd/vendors.mjs +53 -0
- package/resources/qbd/vendors.mjs.map +1 -0
- package/shims/node.d.ts +30 -0
- package/shims/node.d.ts.map +1 -0
- package/shims/node.js +31 -0
- package/shims/node.js.map +1 -0
- package/shims/node.mjs +5 -0
- package/shims/node.mjs.map +1 -0
- package/shims/web.d.ts +26 -0
- package/shims/web.d.ts.map +1 -0
- package/shims/web.js +31 -0
- package/shims/web.js.map +1 -0
- package/shims/web.mjs +5 -0
- package/shims/web.mjs.map +1 -0
- package/src/_shims/MultipartBody.ts +9 -0
- package/src/_shims/README.md +46 -0
- package/src/_shims/auto/runtime-bun.ts +4 -0
- package/src/_shims/auto/runtime-node.ts +4 -0
- package/src/_shims/auto/runtime.ts +4 -0
- package/src/_shims/auto/types-node.ts +4 -0
- package/src/_shims/auto/types.d.ts +101 -0
- package/src/_shims/auto/types.js +3 -0
- package/src/_shims/auto/types.mjs +3 -0
- package/src/_shims/bun-runtime.ts +14 -0
- package/src/_shims/index.d.ts +81 -0
- package/src/_shims/index.js +13 -0
- package/src/_shims/index.mjs +7 -0
- package/src/_shims/manual-types.d.ts +12 -0
- package/src/_shims/manual-types.js +3 -0
- package/src/_shims/manual-types.mjs +3 -0
- package/src/_shims/node-runtime.ts +81 -0
- package/src/_shims/node-types.d.ts +42 -0
- package/src/_shims/node-types.js +3 -0
- package/src/_shims/node-types.mjs +3 -0
- package/src/_shims/registry.ts +67 -0
- package/src/_shims/web-runtime.ts +103 -0
- package/src/_shims/web-types.d.ts +83 -0
- package/src/_shims/web-types.js +3 -0
- package/src/_shims/web-types.mjs +3 -0
- package/src/core.ts +1208 -0
- package/src/error.ts +130 -0
- package/src/index.ts +227 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +9 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +388 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/lib/.keep +4 -0
- package/src/pagination.ts +60 -0
- package/src/resource.ts +11 -0
- package/src/resources/auth-sessions.ts +99 -0
- package/src/resources/end-users.ts +216 -0
- package/src/resources/index.ts +14 -0
- package/src/resources/qbd/accounts.ts +797 -0
- package/src/resources/qbd/bill-check-payments.ts +1086 -0
- package/src/resources/qbd/bill-credit-card-payments.ts +851 -0
- package/src/resources/qbd/bills.ts +3039 -0
- package/src/resources/qbd/checks.ts +3003 -0
- package/src/resources/qbd/classes.ts +366 -0
- package/src/resources/qbd/credit-card-charges.ts +2646 -0
- package/src/resources/qbd/credit-card-credits.ts +2643 -0
- package/src/resources/qbd/credit-memos.ts +3157 -0
- package/src/resources/qbd/customers.ts +2518 -0
- package/src/resources/qbd/date-driven-terms.ts +314 -0
- package/src/resources/qbd/discount-items.ts +712 -0
- package/src/resources/qbd/employees.ts +2266 -0
- package/src/resources/qbd/estimates.ts +2975 -0
- package/src/resources/qbd/index.ts +346 -0
- package/src/resources/qbd/inventory-adjustments.ts +1008 -0
- package/src/resources/qbd/inventory-assembly-items.ts +1126 -0
- package/src/resources/qbd/inventory-items.ts +1026 -0
- package/src/resources/qbd/inventory-sites.ts +605 -0
- package/src/resources/qbd/invoices.ts +3398 -0
- package/src/resources/qbd/journal-entries.ts +1051 -0
- package/src/resources/qbd/non-inventory-items.ts +1138 -0
- package/src/resources/qbd/payroll-wage-items.ts +304 -0
- package/src/resources/qbd/purchase-orders.ts +3045 -0
- package/src/resources/qbd/qbd.ts +876 -0
- package/src/resources/qbd/receive-payments.ts +1609 -0
- package/src/resources/qbd/sales-orders.ts +3141 -0
- package/src/resources/qbd/sales-receipts.ts +3977 -0
- package/src/resources/qbd/sales-representatives.ts +340 -0
- package/src/resources/qbd/sales-tax-codes.ts +398 -0
- package/src/resources/qbd/sales-tax-items.ts +583 -0
- package/src/resources/qbd/service-items.ts +1105 -0
- package/src/resources/qbd/standard-terms.ts +295 -0
- package/src/resources/qbd/subtotal-items.ts +430 -0
- package/src/resources/qbd/transfers.ts +359 -0
- package/src/resources/qbd/vendor-credits.ts +2742 -0
- package/src/resources/qbd/vendors.ts +2017 -0
- package/src/shims/node.ts +50 -0
- package/src/shims/web.ts +50 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +255 -0
- package/src/version.ts +1 -0
- package/uploads.d.ts +75 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +171 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +158 -0
- package/uploads.mjs.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
- package/dist/package.json +0 -48
- package/dist/src/Client.d.ts +0 -21
- package/dist/src/Client.js +0 -54
- package/dist/src/index.d.ts +0 -11
- package/dist/src/index.js +0 -59
- package/dist/src/integrations/BaseIntegration.d.ts +0 -9
- package/dist/src/integrations/BaseIntegration.js +0 -14
- package/dist/src/integrations/qbd/QbdIntegration.d.ts +0 -3120
- package/dist/src/integrations/qbd/QbdIntegration.js +0 -3147
- package/dist/src/integrations/qbd/qbdTypes.d.ts +0 -14076
- package/dist/src/integrations/qbd/qbdTypes.js +0 -2
- package/dist/src/interceptors/errorHandling.d.ts +0 -2
- package/dist/src/interceptors/errorHandling.js +0 -53
- package/dist/src/interceptors/logging.d.ts +0 -18
- package/dist/src/interceptors/logging.js +0 -70
- package/dist/src/resources/AuthSessionsResource.d.ts +0 -77
- package/dist/src/resources/AuthSessionsResource.js +0 -26
- package/dist/src/resources/BaseResource.d.ts +0 -6
- package/dist/src/resources/BaseResource.js +0 -9
- package/dist/src/resources/EndUsersResource.d.ts +0 -84
- package/dist/src/resources/EndUsersResource.js +0 -57
- package/dist/src/resources/types.d.ts +0 -40
- package/dist/src/utils/checkForUpdates.d.ts +0 -2
- package/dist/src/utils/checkForUpdates.js +0 -62
- package/dist/src/utils/env.d.ts +0 -1
- package/dist/src/utils/env.js +0 -15
- package/dist/src/utils/error.d.ts +0 -184
- package/dist/src/utils/error.js +0 -254
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
export declare const DEFAULT_USER_FACING_MESSAGE = "An internal server error occurred. Please try again later.";
|
|
2
|
-
export interface ConductorErrorOptions {
|
|
3
|
-
readonly message: string;
|
|
4
|
-
readonly userFacingMessage?: string;
|
|
5
|
-
readonly type: string;
|
|
6
|
-
readonly code: string;
|
|
7
|
-
readonly httpStatusCode?: number | undefined;
|
|
8
|
-
readonly integrationCode?: string | undefined;
|
|
9
|
-
readonly requestId?: string | undefined;
|
|
10
|
-
readonly headers?: Record<string, string>;
|
|
11
|
-
readonly raw?: unknown;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* The raw REST error response that Conductor's API returns.
|
|
15
|
-
*/
|
|
16
|
-
export interface ConductorServerError {
|
|
17
|
-
readonly error: {
|
|
18
|
-
readonly message: string;
|
|
19
|
-
readonly userFacingMessage: string;
|
|
20
|
-
readonly type: string;
|
|
21
|
-
readonly code: string;
|
|
22
|
-
readonly httpStatusCode: number;
|
|
23
|
-
readonly integrationCode?: string;
|
|
24
|
-
readonly requestId: string;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export declare function isWellFormedConductorServerError(error: unknown): error is ConductorServerError;
|
|
28
|
-
/**
|
|
29
|
-
* The base error from which all other more specific Conductor errors derive.
|
|
30
|
-
* Specifically for errors that Conductor's API returned.
|
|
31
|
-
*/
|
|
32
|
-
export declare abstract class ConductorError extends Error {
|
|
33
|
-
/**
|
|
34
|
-
* The developer error message for your logs.
|
|
35
|
-
*/
|
|
36
|
-
readonly message: string;
|
|
37
|
-
/**
|
|
38
|
-
* The user-friendly error message, written specifically for displaying to
|
|
39
|
-
* your end-users in your app's UI.
|
|
40
|
-
*
|
|
41
|
-
* This value exists for *every* error. E.g., for a QBD connection error, it
|
|
42
|
-
* might recommend the end-user to confirm their QuickBooks Desktop is open
|
|
43
|
-
* and that they're logged in. But if a Conductor API key is expired, e.g.,
|
|
44
|
-
* this message will just say "An internal server error occurred. Please try
|
|
45
|
-
* again later.".
|
|
46
|
-
*/
|
|
47
|
-
readonly userFacingMessage: string;
|
|
48
|
-
/**
|
|
49
|
-
* Categorizes the error.
|
|
50
|
-
*
|
|
51
|
-
* This value is the same as the subclass name. E.g.,
|
|
52
|
-
* `"ConductorIntegrationError"` or `"ConductorInvalidRequestError"`.
|
|
53
|
-
*/
|
|
54
|
-
readonly type: string;
|
|
55
|
-
/**
|
|
56
|
-
* The unique error code from Conductor, which is useful for adding special
|
|
57
|
-
* handling for specific errors. E.g., `"RESOURCE_MISSING"`,
|
|
58
|
-
* `"API_KEY_INVALID"`, or `"QBD_REQUEST_ERROR"`.
|
|
59
|
-
*
|
|
60
|
-
* In contrast, `type` is more general and categorizes the error.
|
|
61
|
-
*/
|
|
62
|
-
readonly code: string;
|
|
63
|
-
/**
|
|
64
|
-
* The HTTP status code of the response that included the error.
|
|
65
|
-
*/
|
|
66
|
-
readonly httpStatusCode: number | undefined;
|
|
67
|
-
/**
|
|
68
|
-
* The unique error code supplied by the third-party integration for errors
|
|
69
|
-
* returned by the integration (i.e., `ConductorIntegrationError`) or
|
|
70
|
-
* integration connector (i.e., `ConductorIntegrationConnectorError`). This is
|
|
71
|
-
* useful for adding special handling for specific errors from the third-party
|
|
72
|
-
* integration or connector.
|
|
73
|
-
*
|
|
74
|
-
* The integration's corresponding error message for this code is in
|
|
75
|
-
* `error.message`.
|
|
76
|
-
*
|
|
77
|
-
* The third-party integrations' error codes are not standardized, so you
|
|
78
|
-
* should not rely on this code to be the same across integrations.
|
|
79
|
-
*/
|
|
80
|
-
readonly integrationCode: string | undefined;
|
|
81
|
-
/**
|
|
82
|
-
* The unique request identifier of the API request that caused the error.
|
|
83
|
-
*
|
|
84
|
-
* If you need to contact us about a specific request, providing the request
|
|
85
|
-
* identifier will ensure the fastest possible resolution.
|
|
86
|
-
*/
|
|
87
|
-
readonly requestId: string | undefined;
|
|
88
|
-
/**
|
|
89
|
-
* The HTTP headers of the response that included the error.
|
|
90
|
-
*/
|
|
91
|
-
readonly headers: Record<string, string> | undefined;
|
|
92
|
-
/**
|
|
93
|
-
* The raw REST error response that Conductor's API returned.
|
|
94
|
-
*/
|
|
95
|
-
protected readonly raw: unknown;
|
|
96
|
-
/**
|
|
97
|
-
* Conductor's internal representation of `type` for debugging.
|
|
98
|
-
*/
|
|
99
|
-
protected readonly rawType: string;
|
|
100
|
-
constructor(options: ConductorErrorOptions);
|
|
101
|
-
}
|
|
102
|
-
type ConductorErrorOptionsWithoutType = Omit<ConductorErrorOptions, "type">;
|
|
103
|
-
/**
|
|
104
|
-
* Raised when the third-party integration encounters an error while processing
|
|
105
|
-
* the end-user's request. This often results from an issue with the request or
|
|
106
|
-
* data handling that requires your attention to resolve.
|
|
107
|
-
*
|
|
108
|
-
* E.g., a `ListID` you provided was not found in QuickBooks Desktop, or an
|
|
109
|
-
* accounting value you supplied did not adhere to the integration's accounting
|
|
110
|
-
* rules.
|
|
111
|
-
*
|
|
112
|
-
* Refer to `error.integrationCode` for the error code returned by the
|
|
113
|
-
* integration, if available.
|
|
114
|
-
*/
|
|
115
|
-
export declare class ConductorIntegrationError extends ConductorError {
|
|
116
|
-
static readonly rawType = "INTEGRATION_ERROR";
|
|
117
|
-
constructor(options: ConductorErrorOptionsWithoutType);
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Raised when a connection error occurs with the third-party integration on the
|
|
121
|
-
* end-user's side. This typically indicates an issue with the end-user's
|
|
122
|
-
* IntegrationConnection or configuration, which they must resolve. In other
|
|
123
|
-
* words, you cannot take action to fix these errors.
|
|
124
|
-
*
|
|
125
|
-
* E.g., QuickBooks Web Connector (QBWC) failed to connect to QuickBooks Desktop
|
|
126
|
-
* on the end-user's computer.
|
|
127
|
-
*
|
|
128
|
-
* Refer to `error.integrationCode` for the error code returned by the
|
|
129
|
-
* integration connector, if available.
|
|
130
|
-
*
|
|
131
|
-
* ❗ We recommend _not_ triggering alerts for these errors because only the
|
|
132
|
-
* end-user can fix them.
|
|
133
|
-
*/
|
|
134
|
-
export declare class ConductorIntegrationConnectionError extends ConductorError {
|
|
135
|
-
static readonly rawType = "INTEGRATION_CONNECTION_ERROR";
|
|
136
|
-
constructor(options: ConductorErrorOptionsWithoutType);
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Raised when you make an API call with the wrong parameters, in the wrong
|
|
140
|
-
* state, or in an invalid way.
|
|
141
|
-
*/
|
|
142
|
-
export declare class ConductorInvalidRequestError extends ConductorError {
|
|
143
|
-
static readonly rawType = "INVALID_REQUEST_ERROR";
|
|
144
|
-
constructor(options: ConductorErrorOptionsWithoutType);
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* Raised when Conductor cannot authenticate you with the credentials you
|
|
148
|
-
* provided. E.g., an incorrect API key.
|
|
149
|
-
*/
|
|
150
|
-
export declare class ConductorAuthenticationError extends ConductorError {
|
|
151
|
-
static readonly rawType = "AUTHENTICATION_ERROR";
|
|
152
|
-
constructor(options: ConductorErrorOptionsWithoutType);
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Raised when you attempt to access a resource that is not allowed.
|
|
156
|
-
*/
|
|
157
|
-
export declare class ConductorPermissionError extends ConductorError {
|
|
158
|
-
static readonly rawType = "PERMISSION_ERROR";
|
|
159
|
-
constructor(options: ConductorErrorOptionsWithoutType);
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Raised when there was a network problem between the client (on your server)
|
|
163
|
-
* and Conductor's servers. E.g., a downed network or a bad TLS certificate.
|
|
164
|
-
*/
|
|
165
|
-
export declare class ConductorConnectionError extends ConductorError {
|
|
166
|
-
static readonly rawType = "CONNECTION_ERROR";
|
|
167
|
-
constructor(options: ConductorErrorOptionsWithoutType);
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Raised when something went wrong on Conductor's end. (These are rare.)
|
|
171
|
-
*/
|
|
172
|
-
export declare class ConductorInternalError extends ConductorError {
|
|
173
|
-
static readonly rawType = "INTERNAL_ERROR";
|
|
174
|
-
constructor(options: ConductorErrorOptionsWithoutType);
|
|
175
|
-
}
|
|
176
|
-
/**
|
|
177
|
-
* Raised as a fallback for any other error from Conductor that no other error
|
|
178
|
-
* type captures.
|
|
179
|
-
*/
|
|
180
|
-
export declare class ConductorUnknownError extends ConductorError {
|
|
181
|
-
constructor(options: ConductorErrorOptions);
|
|
182
|
-
}
|
|
183
|
-
export declare function generateConductorErrorFromType(options: ConductorErrorOptions): ConductorError;
|
|
184
|
-
export {};
|
package/dist/src/utils/error.js
DELETED
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable max-classes-per-file -- Use one module for all error classes. */
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.ConductorUnknownError = exports.ConductorInternalError = exports.ConductorConnectionError = exports.ConductorPermissionError = exports.ConductorAuthenticationError = exports.ConductorInvalidRequestError = exports.ConductorIntegrationConnectionError = exports.ConductorIntegrationError = exports.ConductorError = exports.DEFAULT_USER_FACING_MESSAGE = void 0;
|
|
5
|
-
exports.isWellFormedConductorServerError = isWellFormedConductorServerError;
|
|
6
|
-
exports.generateConductorErrorFromType = generateConductorErrorFromType;
|
|
7
|
-
// Matches server-side value.
|
|
8
|
-
exports.DEFAULT_USER_FACING_MESSAGE = "An internal server error occurred. Please try again later.";
|
|
9
|
-
function isWellFormedConductorServerError(error) {
|
|
10
|
-
return (error instanceof Object &&
|
|
11
|
-
typeof error.error === "object" &&
|
|
12
|
-
typeof error.error.message === "string" &&
|
|
13
|
-
typeof error.error.userFacingMessage ===
|
|
14
|
-
"string" &&
|
|
15
|
-
typeof error.error.type === "string" &&
|
|
16
|
-
typeof error.error.code === "string" &&
|
|
17
|
-
typeof error.error.httpStatusCode === "number");
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* The base error from which all other more specific Conductor errors derive.
|
|
21
|
-
* Specifically for errors that Conductor's API returned.
|
|
22
|
-
*/
|
|
23
|
-
class ConductorError extends Error {
|
|
24
|
-
/**
|
|
25
|
-
* The developer error message for your logs.
|
|
26
|
-
*/
|
|
27
|
-
message;
|
|
28
|
-
/**
|
|
29
|
-
* The user-friendly error message, written specifically for displaying to
|
|
30
|
-
* your end-users in your app's UI.
|
|
31
|
-
*
|
|
32
|
-
* This value exists for *every* error. E.g., for a QBD connection error, it
|
|
33
|
-
* might recommend the end-user to confirm their QuickBooks Desktop is open
|
|
34
|
-
* and that they're logged in. But if a Conductor API key is expired, e.g.,
|
|
35
|
-
* this message will just say "An internal server error occurred. Please try
|
|
36
|
-
* again later.".
|
|
37
|
-
*/
|
|
38
|
-
userFacingMessage;
|
|
39
|
-
/**
|
|
40
|
-
* Categorizes the error.
|
|
41
|
-
*
|
|
42
|
-
* This value is the same as the subclass name. E.g.,
|
|
43
|
-
* `"ConductorIntegrationError"` or `"ConductorInvalidRequestError"`.
|
|
44
|
-
*/
|
|
45
|
-
type;
|
|
46
|
-
/**
|
|
47
|
-
* The unique error code from Conductor, which is useful for adding special
|
|
48
|
-
* handling for specific errors. E.g., `"RESOURCE_MISSING"`,
|
|
49
|
-
* `"API_KEY_INVALID"`, or `"QBD_REQUEST_ERROR"`.
|
|
50
|
-
*
|
|
51
|
-
* In contrast, `type` is more general and categorizes the error.
|
|
52
|
-
*/
|
|
53
|
-
code;
|
|
54
|
-
/**
|
|
55
|
-
* The HTTP status code of the response that included the error.
|
|
56
|
-
*/
|
|
57
|
-
httpStatusCode;
|
|
58
|
-
/**
|
|
59
|
-
* The unique error code supplied by the third-party integration for errors
|
|
60
|
-
* returned by the integration (i.e., `ConductorIntegrationError`) or
|
|
61
|
-
* integration connector (i.e., `ConductorIntegrationConnectorError`). This is
|
|
62
|
-
* useful for adding special handling for specific errors from the third-party
|
|
63
|
-
* integration or connector.
|
|
64
|
-
*
|
|
65
|
-
* The integration's corresponding error message for this code is in
|
|
66
|
-
* `error.message`.
|
|
67
|
-
*
|
|
68
|
-
* The third-party integrations' error codes are not standardized, so you
|
|
69
|
-
* should not rely on this code to be the same across integrations.
|
|
70
|
-
*/
|
|
71
|
-
integrationCode;
|
|
72
|
-
/**
|
|
73
|
-
* The unique request identifier of the API request that caused the error.
|
|
74
|
-
*
|
|
75
|
-
* If you need to contact us about a specific request, providing the request
|
|
76
|
-
* identifier will ensure the fastest possible resolution.
|
|
77
|
-
*/
|
|
78
|
-
requestId;
|
|
79
|
-
/**
|
|
80
|
-
* The HTTP headers of the response that included the error.
|
|
81
|
-
*/
|
|
82
|
-
headers;
|
|
83
|
-
/**
|
|
84
|
-
* The raw REST error response that Conductor's API returned.
|
|
85
|
-
*/
|
|
86
|
-
raw;
|
|
87
|
-
/**
|
|
88
|
-
* Conductor's internal representation of `type` for debugging.
|
|
89
|
-
*/
|
|
90
|
-
rawType;
|
|
91
|
-
constructor(options) {
|
|
92
|
-
// Do not pass `options.message` to the superclass `Error` constructor to
|
|
93
|
-
// avoid this bug: https://twitter.com/DannyNemer/status/1639513810141687810
|
|
94
|
-
super();
|
|
95
|
-
// Set `name` to the constructor name so that the error appears in logs as
|
|
96
|
-
// `[ConductorError: foo]` instead of `[Error: foo]`.
|
|
97
|
-
this.name = this.constructor.name;
|
|
98
|
-
// 1. Set `type`, even though it's redundant with `name`, because `name`
|
|
99
|
-
// does not appear when doing `console.log(error)` unlike all other
|
|
100
|
-
// properties we set.
|
|
101
|
-
// 2. Set `type` to the constructor name to ensure that subclasses of
|
|
102
|
-
// `ConductorError` always have the correct `type` even if they are
|
|
103
|
-
// instantiated with the wrong options.
|
|
104
|
-
this.type = this.constructor.name;
|
|
105
|
-
this.message = options.message;
|
|
106
|
-
this.userFacingMessage =
|
|
107
|
-
options.userFacingMessage ?? exports.DEFAULT_USER_FACING_MESSAGE;
|
|
108
|
-
this.code = options.code;
|
|
109
|
-
this.httpStatusCode = options.httpStatusCode;
|
|
110
|
-
this.integrationCode = options.integrationCode;
|
|
111
|
-
this.requestId = options.requestId;
|
|
112
|
-
this.headers = options.headers;
|
|
113
|
-
// Only set `raw` if provided instead of always setting it to `options`
|
|
114
|
-
// because the latter is usually a near duplicate of `this`, which we don't
|
|
115
|
-
// want to log unless necessary.
|
|
116
|
-
this.raw = options.raw;
|
|
117
|
-
this.rawType = options.type;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
exports.ConductorError = ConductorError;
|
|
121
|
-
/**
|
|
122
|
-
* Raised when the third-party integration encounters an error while processing
|
|
123
|
-
* the end-user's request. This often results from an issue with the request or
|
|
124
|
-
* data handling that requires your attention to resolve.
|
|
125
|
-
*
|
|
126
|
-
* E.g., a `ListID` you provided was not found in QuickBooks Desktop, or an
|
|
127
|
-
* accounting value you supplied did not adhere to the integration's accounting
|
|
128
|
-
* rules.
|
|
129
|
-
*
|
|
130
|
-
* Refer to `error.integrationCode` for the error code returned by the
|
|
131
|
-
* integration, if available.
|
|
132
|
-
*/
|
|
133
|
-
class ConductorIntegrationError extends ConductorError {
|
|
134
|
-
static rawType = "INTEGRATION_ERROR";
|
|
135
|
-
constructor(options) {
|
|
136
|
-
super({ ...options, type: ConductorIntegrationError.rawType });
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
exports.ConductorIntegrationError = ConductorIntegrationError;
|
|
140
|
-
/**
|
|
141
|
-
* Raised when a connection error occurs with the third-party integration on the
|
|
142
|
-
* end-user's side. This typically indicates an issue with the end-user's
|
|
143
|
-
* IntegrationConnection or configuration, which they must resolve. In other
|
|
144
|
-
* words, you cannot take action to fix these errors.
|
|
145
|
-
*
|
|
146
|
-
* E.g., QuickBooks Web Connector (QBWC) failed to connect to QuickBooks Desktop
|
|
147
|
-
* on the end-user's computer.
|
|
148
|
-
*
|
|
149
|
-
* Refer to `error.integrationCode` for the error code returned by the
|
|
150
|
-
* integration connector, if available.
|
|
151
|
-
*
|
|
152
|
-
* ❗ We recommend _not_ triggering alerts for these errors because only the
|
|
153
|
-
* end-user can fix them.
|
|
154
|
-
*/
|
|
155
|
-
class ConductorIntegrationConnectionError extends ConductorError {
|
|
156
|
-
static rawType = "INTEGRATION_CONNECTION_ERROR";
|
|
157
|
-
constructor(options) {
|
|
158
|
-
super({ ...options, type: ConductorIntegrationConnectionError.rawType });
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
exports.ConductorIntegrationConnectionError = ConductorIntegrationConnectionError;
|
|
162
|
-
/**
|
|
163
|
-
* Raised when you make an API call with the wrong parameters, in the wrong
|
|
164
|
-
* state, or in an invalid way.
|
|
165
|
-
*/
|
|
166
|
-
class ConductorInvalidRequestError extends ConductorError {
|
|
167
|
-
static rawType = "INVALID_REQUEST_ERROR";
|
|
168
|
-
constructor(options) {
|
|
169
|
-
super({ ...options, type: ConductorInvalidRequestError.rawType });
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
exports.ConductorInvalidRequestError = ConductorInvalidRequestError;
|
|
173
|
-
/**
|
|
174
|
-
* Raised when Conductor cannot authenticate you with the credentials you
|
|
175
|
-
* provided. E.g., an incorrect API key.
|
|
176
|
-
*/
|
|
177
|
-
class ConductorAuthenticationError extends ConductorError {
|
|
178
|
-
static rawType = "AUTHENTICATION_ERROR";
|
|
179
|
-
constructor(options) {
|
|
180
|
-
super({ ...options, type: ConductorAuthenticationError.rawType });
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
exports.ConductorAuthenticationError = ConductorAuthenticationError;
|
|
184
|
-
/**
|
|
185
|
-
* Raised when you attempt to access a resource that is not allowed.
|
|
186
|
-
*/
|
|
187
|
-
class ConductorPermissionError extends ConductorError {
|
|
188
|
-
static rawType = "PERMISSION_ERROR";
|
|
189
|
-
constructor(options) {
|
|
190
|
-
super({ ...options, type: ConductorPermissionError.rawType });
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
exports.ConductorPermissionError = ConductorPermissionError;
|
|
194
|
-
/**
|
|
195
|
-
* Raised when there was a network problem between the client (on your server)
|
|
196
|
-
* and Conductor's servers. E.g., a downed network or a bad TLS certificate.
|
|
197
|
-
*/
|
|
198
|
-
class ConductorConnectionError extends ConductorError {
|
|
199
|
-
static rawType = "CONNECTION_ERROR";
|
|
200
|
-
constructor(options) {
|
|
201
|
-
super({ ...options, type: ConductorConnectionError.rawType });
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
exports.ConductorConnectionError = ConductorConnectionError;
|
|
205
|
-
/**
|
|
206
|
-
* Raised when something went wrong on Conductor's end. (These are rare.)
|
|
207
|
-
*/
|
|
208
|
-
class ConductorInternalError extends ConductorError {
|
|
209
|
-
static rawType = "INTERNAL_ERROR";
|
|
210
|
-
constructor(options) {
|
|
211
|
-
super({ ...options, type: ConductorInternalError.rawType });
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
exports.ConductorInternalError = ConductorInternalError;
|
|
215
|
-
/**
|
|
216
|
-
* Raised as a fallback for any other error from Conductor that no other error
|
|
217
|
-
* type captures.
|
|
218
|
-
*/
|
|
219
|
-
class ConductorUnknownError extends ConductorError {
|
|
220
|
-
// Override the `protected` constructor in the base class even though we are
|
|
221
|
-
// not overriding `rawType`.
|
|
222
|
-
constructor(options) {
|
|
223
|
-
super(options);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
exports.ConductorUnknownError = ConductorUnknownError;
|
|
227
|
-
function generateConductorErrorFromType(options) {
|
|
228
|
-
switch (options.type) {
|
|
229
|
-
case ConductorIntegrationError.rawType: {
|
|
230
|
-
return new ConductorIntegrationError(options);
|
|
231
|
-
}
|
|
232
|
-
case ConductorIntegrationConnectionError.rawType: {
|
|
233
|
-
return new ConductorIntegrationConnectionError(options);
|
|
234
|
-
}
|
|
235
|
-
case ConductorInvalidRequestError.rawType: {
|
|
236
|
-
return new ConductorInvalidRequestError(options);
|
|
237
|
-
}
|
|
238
|
-
case ConductorAuthenticationError.rawType: {
|
|
239
|
-
return new ConductorAuthenticationError(options);
|
|
240
|
-
}
|
|
241
|
-
case ConductorPermissionError.rawType: {
|
|
242
|
-
return new ConductorPermissionError(options);
|
|
243
|
-
}
|
|
244
|
-
case ConductorConnectionError.rawType: {
|
|
245
|
-
return new ConductorConnectionError(options);
|
|
246
|
-
}
|
|
247
|
-
case ConductorInternalError.rawType: {
|
|
248
|
-
return new ConductorInternalError(options);
|
|
249
|
-
}
|
|
250
|
-
default: {
|
|
251
|
-
return new ConductorUnknownError(options);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|