conductor-node 11.10.1 → 12.0.0-beta.10
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 +135 -0
- package/LICENSE +201 -21
- package/README.md +336 -64
- 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 +75 -0
- package/resources/auth-sessions.d.ts.map +1 -0
- package/resources/auth-sessions.js +17 -0
- package/resources/auth-sessions.js.map +1 -0
- package/resources/auth-sessions.mjs +13 -0
- package/resources/auth-sessions.mjs.map +1 -0
- package/resources/end-users.d.ts +142 -0
- package/resources/end-users.d.ts.map +1 -0
- package/resources/end-users.js +40 -0
- package/resources/end-users.js.map +1 -0
- package/resources/end-users.mjs +36 -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 +1711 -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 +38 -0
- package/resources/qbd/index.d.ts.map +1 -0
- package/resources/qbd/index.js +108 -0
- package/resources/qbd/index.js.map +1 -0
- package/resources/qbd/index.mjs +39 -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 +178 -0
- package/resources/qbd/qbd.d.ts.map +1 -0
- package/resources/qbd/qbd.js +222 -0
- package/resources/qbd/qbd.js.map +1 -0
- package/resources/qbd/qbd.mjs +195 -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/time-tracking-activities.d.ts +485 -0
- package/resources/qbd/time-tracking-activities.d.ts.map +1 -0
- package/resources/qbd/time-tracking-activities.js +66 -0
- package/resources/qbd/time-tracking-activities.js.map +1 -0
- package/resources/qbd/time-tracking-activities.mjs +61 -0
- package/resources/qbd/time-tracking-activities.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 +229 -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 +92 -0
- package/src/resources/end-users.ts +195 -0
- package/src/resources/index.ts +13 -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 +2308 -0
- package/src/resources/qbd/estimates.ts +2975 -0
- package/src/resources/qbd/index.ts +357 -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 +949 -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/time-tracking-activities.ts +615 -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 -65
- 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,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addErrorHandlingInterceptors = addErrorHandlingInterceptors;
|
|
4
|
-
const error_1 = require("../utils/error");
|
|
5
|
-
const axios_1 = require("axios");
|
|
6
|
-
function addErrorHandlingInterceptors(httpClient) {
|
|
7
|
-
httpClient.interceptors.response.use((response) => response, (error) => {
|
|
8
|
-
// The request was made and the server responded with a status code that
|
|
9
|
-
// falls out of the range of 2xx.
|
|
10
|
-
if (error.response) {
|
|
11
|
-
const headers = { ...error.response.headers };
|
|
12
|
-
const errorData = error.response.data;
|
|
13
|
-
if ((0, error_1.isWellFormedConductorServerError)(errorData)) {
|
|
14
|
-
throw (0, error_1.generateConductorErrorFromType)({
|
|
15
|
-
// The request ID is already in the response body, so no need to
|
|
16
|
-
// copy it from the headers.
|
|
17
|
-
...errorData.error,
|
|
18
|
-
httpStatusCode: error.response.status,
|
|
19
|
-
headers,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
throw new error_1.ConductorInternalError({
|
|
23
|
-
message: "Invalid JSON received from the Conductor API.",
|
|
24
|
-
code: "INVALID_JSON_RESPONSE",
|
|
25
|
-
httpStatusCode: error.status ?? axios_1.HttpStatusCode.InternalServerError,
|
|
26
|
-
// @ts-expect-error -- `error.response.headers` always exists as an `AxiosHeaders` instance.
|
|
27
|
-
requestId: error.response.headers.get("Conductor-Request-Id"),
|
|
28
|
-
headers,
|
|
29
|
-
// Help debug if `isWellFormedConductorServerError()` fails.
|
|
30
|
-
raw: errorData,
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
if (error.code === axios_1.AxiosError.ECONNABORTED) {
|
|
34
|
-
let message = "Request aborted due to timeout being reached";
|
|
35
|
-
if (error.config?.timeout !== undefined) {
|
|
36
|
-
message += ` (${error.config.timeout}ms)`;
|
|
37
|
-
}
|
|
38
|
-
throw new error_1.ConductorConnectionError({
|
|
39
|
-
message,
|
|
40
|
-
code: error.code,
|
|
41
|
-
httpStatusCode: error.status ?? axios_1.HttpStatusCode.RequestTimeout,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
// Either the request was made but no response was received (e.g.,
|
|
45
|
-
// Conductor API is offline) or an error ocurred when setting up the
|
|
46
|
-
// request (e.g., no network connection).
|
|
47
|
-
throw new error_1.ConductorConnectionError({
|
|
48
|
-
message: `An error occurred with our connection to Conductor: ${error.message === "" ? error.code : error.message}`,
|
|
49
|
-
code: error.code ?? "NETWORK_ERROR",
|
|
50
|
-
httpStatusCode: error.status,
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { AxiosInstance, AxiosRequestConfig } from "axios";
|
|
2
|
-
export interface RequestConfigWithStartTime extends AxiosRequestConfig {
|
|
3
|
-
startTime: number;
|
|
4
|
-
}
|
|
5
|
-
export declare function addLoggingInterceptors(httpClient: AxiosInstance, verbose: boolean): void;
|
|
6
|
-
interface RequestLogObject {
|
|
7
|
-
method?: string;
|
|
8
|
-
url?: string;
|
|
9
|
-
headers?: {
|
|
10
|
-
"Content-Type"?: string;
|
|
11
|
-
Authorization?: string;
|
|
12
|
-
};
|
|
13
|
-
body?: Record<string, unknown>;
|
|
14
|
-
}
|
|
15
|
-
export declare function createRequestLogObject(config: AxiosRequestConfig): RequestLogObject;
|
|
16
|
-
export declare function getDurationStringFromConfig(config: RequestConfigWithStartTime): string;
|
|
17
|
-
export declare function stringifyForLogs(object: unknown): string;
|
|
18
|
-
export {};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addLoggingInterceptors = addLoggingInterceptors;
|
|
4
|
-
exports.createRequestLogObject = createRequestLogObject;
|
|
5
|
-
exports.getDurationStringFromConfig = getDurationStringFromConfig;
|
|
6
|
-
exports.stringifyForLogs = stringifyForLogs;
|
|
7
|
-
function addLoggingInterceptors(httpClient, verbose) {
|
|
8
|
-
httpClient.interceptors.request.use((config) => {
|
|
9
|
-
if (verbose) {
|
|
10
|
-
config.startTime = Date.now();
|
|
11
|
-
console.log("Conductor request:", stringifyForLogs(createRequestLogObject(config)));
|
|
12
|
-
}
|
|
13
|
-
return config;
|
|
14
|
-
});
|
|
15
|
-
httpClient.interceptors.response.use((response) => {
|
|
16
|
-
if (verbose) {
|
|
17
|
-
console.log("Conductor response:", stringifyForLogs(createResponseLogObject(response)));
|
|
18
|
-
}
|
|
19
|
-
return response;
|
|
20
|
-
}, (error) => {
|
|
21
|
-
// Log after the other interceptor wraps the response error in a
|
|
22
|
-
// `ConductorError`.
|
|
23
|
-
// NOTE: We cannot include duration because we lack access to
|
|
24
|
-
// `AxiosError#config` because we already wrapped the error.
|
|
25
|
-
if (verbose) {
|
|
26
|
-
// No prefix "Conductor error:" because the error already includes a
|
|
27
|
-
// prefix (e.g., `ConductorConnectionError`).
|
|
28
|
-
console.log(stringifyForLogs(error));
|
|
29
|
-
}
|
|
30
|
-
throw error;
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
function createRequestLogObject(config) {
|
|
34
|
-
const requestInfo = {};
|
|
35
|
-
if (config.method !== undefined) {
|
|
36
|
-
requestInfo.method = config.method.toUpperCase();
|
|
37
|
-
}
|
|
38
|
-
if (config.baseURL !== undefined || config.url !== undefined) {
|
|
39
|
-
requestInfo.url = (config.baseURL ?? "") + (config.url ?? "");
|
|
40
|
-
}
|
|
41
|
-
if (config.data !== undefined) {
|
|
42
|
-
requestInfo.body = config.data;
|
|
43
|
-
}
|
|
44
|
-
if (config.headers !== undefined) {
|
|
45
|
-
requestInfo.headers = {};
|
|
46
|
-
if (config.headers["Content-Type"] !== undefined) {
|
|
47
|
-
requestInfo.headers["Content-Type"] = config.headers["Content-Type"];
|
|
48
|
-
}
|
|
49
|
-
if (config.headers.Authorization !== undefined) {
|
|
50
|
-
requestInfo.headers.Authorization = "BEARER sk_live_************";
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
return requestInfo;
|
|
54
|
-
}
|
|
55
|
-
function createResponseLogObject(response) {
|
|
56
|
-
return {
|
|
57
|
-
duration: getDurationStringFromConfig(response.config),
|
|
58
|
-
status: response.status,
|
|
59
|
-
data: response.data,
|
|
60
|
-
request: createRequestLogObject(response.config),
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
function getDurationStringFromConfig(config) {
|
|
64
|
-
const duration = Date.now() - config.startTime;
|
|
65
|
-
return `${Math.round(duration / 10) / 100}s`;
|
|
66
|
-
}
|
|
67
|
-
function stringifyForLogs(object) {
|
|
68
|
-
// Output raw JSON for easy copy-pasting for REST API development.
|
|
69
|
-
return JSON.stringify(object, undefined, 2);
|
|
70
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import BaseResource from "../resources/BaseResource";
|
|
2
|
-
export interface AuthSession {
|
|
3
|
-
/**
|
|
4
|
-
* The unique identifier for the object.
|
|
5
|
-
*/
|
|
6
|
-
readonly id: string;
|
|
7
|
-
/**
|
|
8
|
-
* The object's type. This will always be "auth_session".
|
|
9
|
-
*/
|
|
10
|
-
readonly objectType: "auth_session";
|
|
11
|
-
/**
|
|
12
|
-
* The date and time when this object was created.
|
|
13
|
-
*/
|
|
14
|
-
readonly createdAt: string;
|
|
15
|
-
/**
|
|
16
|
-
* The ID of the EndUser for whom to create an IntegrationConnection.
|
|
17
|
-
*/
|
|
18
|
-
readonly endUserId: string;
|
|
19
|
-
/**
|
|
20
|
-
* The secret used in `authFlowUrl` to securely access the authentication
|
|
21
|
-
* flow.
|
|
22
|
-
*/
|
|
23
|
-
readonly clientSecret: string;
|
|
24
|
-
/**
|
|
25
|
-
* The URL of the authentication flow that you will pass to your client for
|
|
26
|
-
* your end-user to set up their IntegrationConnection.
|
|
27
|
-
*/
|
|
28
|
-
readonly authFlowUrl: string;
|
|
29
|
-
/**
|
|
30
|
-
* The time at which the AuthSession expires. By default, this value is 30
|
|
31
|
-
* minutes from creation. You can extend this time by setting `linkExpiryMins`
|
|
32
|
-
* when creating the AuthSession.
|
|
33
|
-
*/
|
|
34
|
-
readonly expiresAt: string;
|
|
35
|
-
/**
|
|
36
|
-
* The URL to which Conductor will redirect the user to return to your app
|
|
37
|
-
* after they complete the authentication flow. If `undefined`, their browser
|
|
38
|
-
* tab will close instead.
|
|
39
|
-
*/
|
|
40
|
-
readonly redirectUrl: string | undefined;
|
|
41
|
-
}
|
|
42
|
-
export interface AuthSessionCreateInput {
|
|
43
|
-
/**
|
|
44
|
-
* Your Conductor publishable key, which we use to create the session's
|
|
45
|
-
* `authFlowUrl`.
|
|
46
|
-
*/
|
|
47
|
-
readonly publishableKey: string;
|
|
48
|
-
/**
|
|
49
|
-
* The ID of the EndUser for whom to create the IntegrationConnection.
|
|
50
|
-
*/
|
|
51
|
-
readonly endUserId: string;
|
|
52
|
-
/**
|
|
53
|
-
* The number of minutes after which the AuthSession will expire. Must be at
|
|
54
|
-
* least 15 minutes and no more than 7 days. If not provided, defaults to 30
|
|
55
|
-
* minutes.
|
|
56
|
-
*/
|
|
57
|
-
readonly linkExpiryMins?: number;
|
|
58
|
-
/**
|
|
59
|
-
* The URL to which Conductor will redirect the end-user to return to your app
|
|
60
|
-
* after they complete the authentication flow. If not provided, their browser
|
|
61
|
-
* tab will close instead.
|
|
62
|
-
*/
|
|
63
|
-
readonly redirectUrl?: string;
|
|
64
|
-
}
|
|
65
|
-
export default class AuthSessionsResource extends BaseResource {
|
|
66
|
-
protected readonly ROUTE = "/auth-sessions";
|
|
67
|
-
/**
|
|
68
|
-
* Creates an AuthSession. Pass the returned session’s `authFlowUrl` to the
|
|
69
|
-
* client for your end-user to launch the IntegrationConnection authentication
|
|
70
|
-
* flow.
|
|
71
|
-
*/
|
|
72
|
-
create(input: AuthSessionCreateInput): Promise<AuthSession>;
|
|
73
|
-
/**
|
|
74
|
-
* Retrieves the specified AuthSession.
|
|
75
|
-
*/
|
|
76
|
-
retrieve(id: AuthSession["id"]): Promise<AuthSession>;
|
|
77
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const BaseResource_1 = __importDefault(require("../resources/BaseResource"));
|
|
7
|
-
class AuthSessionsResource extends BaseResource_1.default {
|
|
8
|
-
ROUTE = "/auth-sessions";
|
|
9
|
-
/**
|
|
10
|
-
* Creates an AuthSession. Pass the returned session’s `authFlowUrl` to the
|
|
11
|
-
* client for your end-user to launch the IntegrationConnection authentication
|
|
12
|
-
* flow.
|
|
13
|
-
*/
|
|
14
|
-
async create(input) {
|
|
15
|
-
const { data } = await this.httpClient.post(this.ROUTE, input);
|
|
16
|
-
return data;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Retrieves the specified AuthSession.
|
|
20
|
-
*/
|
|
21
|
-
async retrieve(id) {
|
|
22
|
-
const { data } = await this.httpClient.get(`${this.ROUTE}/${id}`);
|
|
23
|
-
return data;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.default = AuthSessionsResource;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import BaseResource from "../resources/BaseResource";
|
|
2
|
-
import type { ApiListResponse, IntegrationConnection, IntegrationSlug } from "../resources/types";
|
|
3
|
-
export interface EndUser {
|
|
4
|
-
/**
|
|
5
|
-
* The unique identifier for this EndUser. You must save this value to your
|
|
6
|
-
* database because it is how you identify the target of your requests in the
|
|
7
|
-
* future.
|
|
8
|
-
*/
|
|
9
|
-
readonly id: string;
|
|
10
|
-
/**
|
|
11
|
-
* The object's type. This will always be "end_user".
|
|
12
|
-
*/
|
|
13
|
-
readonly objectType: "end_user";
|
|
14
|
-
/**
|
|
15
|
-
* The time at which the object was created.
|
|
16
|
-
*/
|
|
17
|
-
readonly createdAt: string;
|
|
18
|
-
/**
|
|
19
|
-
* The EndUser's company name that will be shown elsewhere in Conductor.
|
|
20
|
-
*/
|
|
21
|
-
readonly companyName: string;
|
|
22
|
-
/**
|
|
23
|
-
* The EndUser's unique identifier from your system. Maps users between your
|
|
24
|
-
* database and Conductor. Must be unique for each user. If you have only one
|
|
25
|
-
* user, you may use any string value.
|
|
26
|
-
*/
|
|
27
|
-
readonly sourceId: string;
|
|
28
|
-
/**
|
|
29
|
-
* The EndUser's email address for identification purposes. Setting this field
|
|
30
|
-
* will not cause any emails to be sent.
|
|
31
|
-
*/
|
|
32
|
-
readonly email: string;
|
|
33
|
-
/**
|
|
34
|
-
* The EndUser's IntegrationConnections.
|
|
35
|
-
*/
|
|
36
|
-
readonly integrationConnections: IntegrationConnection[];
|
|
37
|
-
}
|
|
38
|
-
export type EndUserCreateInput = Pick<EndUser, "companyName" | "email" | "sourceId">;
|
|
39
|
-
export interface EndUserDeleteOutput {
|
|
40
|
-
readonly id: EndUser["id"];
|
|
41
|
-
readonly objectType: EndUser["objectType"];
|
|
42
|
-
readonly deleted: boolean;
|
|
43
|
-
}
|
|
44
|
-
export interface EndUserPingOutput {
|
|
45
|
-
/**
|
|
46
|
-
* The time, in milliseconds, that it took to ping the connection.
|
|
47
|
-
*/
|
|
48
|
-
readonly duration: number;
|
|
49
|
-
}
|
|
50
|
-
export default class EndUsersResource extends BaseResource {
|
|
51
|
-
protected readonly ROUTE = "/end-users";
|
|
52
|
-
/**
|
|
53
|
-
* Returns a list of your EndUsers.
|
|
54
|
-
*/
|
|
55
|
-
list(): Promise<ApiListResponse<EndUser>>;
|
|
56
|
-
/**
|
|
57
|
-
* Creates a new EndUser.
|
|
58
|
-
*/
|
|
59
|
-
create(input: EndUserCreateInput): Promise<EndUser>;
|
|
60
|
-
/**
|
|
61
|
-
* Retrieves the specified EndUser.
|
|
62
|
-
*/
|
|
63
|
-
retrieve(id: EndUser["id"]): Promise<EndUser>;
|
|
64
|
-
/**
|
|
65
|
-
* Deletes the specified EndUser and all of its connections.
|
|
66
|
-
*/
|
|
67
|
-
delete(id: EndUser["id"]): Promise<EndUserDeleteOutput>;
|
|
68
|
-
/**
|
|
69
|
-
* Checks whether the specified IntegrationConnection can connect and process
|
|
70
|
-
* requests end-to-end.
|
|
71
|
-
*
|
|
72
|
-
* If the connection fails, the error we encountered will be thrown as a
|
|
73
|
-
* `ConductorError` (like any request). This information is useful for showing
|
|
74
|
-
* a "connection status" indicator in your app. If an error occurs, we
|
|
75
|
-
* strongly recommend displaying the property `error.userFacingMessage` to
|
|
76
|
-
* your end-user in your app's UI.
|
|
77
|
-
*
|
|
78
|
-
* @param id The ID of the end-user to ping.
|
|
79
|
-
* @param integrationSlug The integration identifier for the end-user's
|
|
80
|
-
* connection you want to ping (e.g. "quickbooks_desktop").
|
|
81
|
-
* @returns The ping result with the duration in milliseconds.
|
|
82
|
-
*/
|
|
83
|
-
ping(id: EndUser["id"], integrationSlug: IntegrationSlug): Promise<EndUserPingOutput>;
|
|
84
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const BaseResource_1 = __importDefault(require("../resources/BaseResource"));
|
|
7
|
-
class EndUsersResource extends BaseResource_1.default {
|
|
8
|
-
ROUTE = "/end-users";
|
|
9
|
-
/**
|
|
10
|
-
* Returns a list of your EndUsers.
|
|
11
|
-
*/
|
|
12
|
-
async list() {
|
|
13
|
-
const { data } = await this.httpClient.get(this.ROUTE);
|
|
14
|
-
return data;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Creates a new EndUser.
|
|
18
|
-
*/
|
|
19
|
-
async create(input) {
|
|
20
|
-
const { data } = await this.httpClient.post(this.ROUTE, input);
|
|
21
|
-
return data;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Retrieves the specified EndUser.
|
|
25
|
-
*/
|
|
26
|
-
async retrieve(id) {
|
|
27
|
-
const { data } = await this.httpClient.get(`${this.ROUTE}/${id}`);
|
|
28
|
-
return data;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Deletes the specified EndUser and all of its connections.
|
|
32
|
-
*/
|
|
33
|
-
async delete(id) {
|
|
34
|
-
const { data } = await this.httpClient.delete(`${this.ROUTE}/${id}`);
|
|
35
|
-
return data;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Checks whether the specified IntegrationConnection can connect and process
|
|
39
|
-
* requests end-to-end.
|
|
40
|
-
*
|
|
41
|
-
* If the connection fails, the error we encountered will be thrown as a
|
|
42
|
-
* `ConductorError` (like any request). This information is useful for showing
|
|
43
|
-
* a "connection status" indicator in your app. If an error occurs, we
|
|
44
|
-
* strongly recommend displaying the property `error.userFacingMessage` to
|
|
45
|
-
* your end-user in your app's UI.
|
|
46
|
-
*
|
|
47
|
-
* @param id The ID of the end-user to ping.
|
|
48
|
-
* @param integrationSlug The integration identifier for the end-user's
|
|
49
|
-
* connection you want to ping (e.g. "quickbooks_desktop").
|
|
50
|
-
* @returns The ping result with the duration in milliseconds.
|
|
51
|
-
*/
|
|
52
|
-
async ping(id, integrationSlug) {
|
|
53
|
-
const { data } = await this.httpClient.get(`${this.ROUTE}/${id}/ping/${integrationSlug}`);
|
|
54
|
-
return data;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
exports.default = EndUsersResource;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
export type IntegrationSlug = "quickbooks_desktop";
|
|
2
|
-
export interface IntegrationConnection {
|
|
3
|
-
/**
|
|
4
|
-
* The unique identifier for the object.
|
|
5
|
-
*/
|
|
6
|
-
readonly id: string;
|
|
7
|
-
/**
|
|
8
|
-
* The object's type. This will always be "integration_connection".
|
|
9
|
-
*/
|
|
10
|
-
readonly objectType: "integration_connection";
|
|
11
|
-
/**
|
|
12
|
-
* The time at which the object was created.
|
|
13
|
-
*/
|
|
14
|
-
readonly createdAt: string;
|
|
15
|
-
/**
|
|
16
|
-
* The ID of the EndUser who owns this IntegrationConnection.
|
|
17
|
-
*/
|
|
18
|
-
readonly endUserId: string;
|
|
19
|
-
/**
|
|
20
|
-
* The identifier of the third-party platform to integrate (e.g.,
|
|
21
|
-
* "quickbooks_desktop").
|
|
22
|
-
*/
|
|
23
|
-
readonly integrationSlug: IntegrationSlug;
|
|
24
|
-
/**
|
|
25
|
-
* The date and time of your last API request to this IntegrationConnection.
|
|
26
|
-
*/
|
|
27
|
-
readonly lastRequestAt: string | null;
|
|
28
|
-
/**
|
|
29
|
-
* The date and time of your last *successful* API request to this
|
|
30
|
-
* IntegrationConnection. This represents an end-to-end request that the
|
|
31
|
-
* integration fully processed and returned without any connection or business
|
|
32
|
-
* logic errors.
|
|
33
|
-
*/
|
|
34
|
-
readonly lastSuccessfulRequestAt: string | null;
|
|
35
|
-
}
|
|
36
|
-
export interface ApiListResponse<T> {
|
|
37
|
-
readonly url: string;
|
|
38
|
-
readonly objectType: "list";
|
|
39
|
-
readonly data: T[];
|
|
40
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.checkForUpdates = checkForUpdates;
|
|
7
|
-
exports.createFramedMessage = createFramedMessage;
|
|
8
|
-
const package_json_1 = __importDefault(require("../../package.json"));
|
|
9
|
-
const env_1 = require("../utils/env");
|
|
10
|
-
const axios_1 = __importDefault(require("axios"));
|
|
11
|
-
function checkForUpdates() {
|
|
12
|
-
// eslint-disable-next-line @typescript-eslint/dot-notation -- ESLint is incorrectly following the global type modification that `next` makes in other packages of this monorepo where it is a dependency. TypeScript correctly limits the scope of this `next` type modification to only the packages where `next` is a dependency. ESLint does not; hence, we disable this rule here.
|
|
13
|
-
if (process.env["NODE_ENV"] === "test") {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
// `CONDUCTOR_HIDE_UPDATE_MESSAGE` hides the update message that is logged
|
|
17
|
-
// when a newer version of `conductor-node` is available. It's a truthy value.
|
|
18
|
-
if ((0, env_1.isEnvironmentVariableTruthy)("CONDUCTOR_HIDE_UPDATE_MESSAGE")) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
const currentVersion = package_json_1.default.version;
|
|
22
|
-
const packageName = encodeURIComponent(package_json_1.default.name);
|
|
23
|
-
axios_1.default
|
|
24
|
-
.get(`https://registry.npmjs.org/-/package/${packageName}/dist-tags`)
|
|
25
|
-
.then((response) => {
|
|
26
|
-
const latestVersion = response.data.latest;
|
|
27
|
-
if (currentVersion !== latestVersion) {
|
|
28
|
-
console.warn(createFramedMessage([
|
|
29
|
-
"🚨 MAJOR UPDATE AVAILABLE! 🚨",
|
|
30
|
-
`${currentVersion} ➡️ ${latestVersion}`,
|
|
31
|
-
"",
|
|
32
|
-
"✨ This is an entirely new SDK with amazing improvements:",
|
|
33
|
-
"• 📄 Automatic pagination",
|
|
34
|
-
"• 🔄 Automatic retry",
|
|
35
|
-
"• 🎯 Significantly improved naming",
|
|
36
|
-
"• 🏗️ Simplified structure",
|
|
37
|
-
"",
|
|
38
|
-
"⚠️ While your current version will continue to work,",
|
|
39
|
-
"it will not receive any more updates.",
|
|
40
|
-
"",
|
|
41
|
-
"🔥 UPGRADE GUIDE 🔥",
|
|
42
|
-
"→ https://docs.conductor.is/qbd-api/upgrade-node ←",
|
|
43
|
-
]));
|
|
44
|
-
}
|
|
45
|
-
})
|
|
46
|
-
.catch((error) => {
|
|
47
|
-
console.debug("Failed to check for updates:", error);
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
function createFramedMessage(messageLines) {
|
|
51
|
-
const maxLength = Math.max(...messageLines.map((line) => line.length), 0);
|
|
52
|
-
const paddingHorizontalLength = 2;
|
|
53
|
-
return [
|
|
54
|
-
// Top border of the box.
|
|
55
|
-
`┌${"─".repeat(maxLength + paddingHorizontalLength * 2)}┐`,
|
|
56
|
-
// Print each line of the message, padded to fit the box.
|
|
57
|
-
...messageLines.map((line) => {
|
|
58
|
-
const paddingLine = " ".repeat(maxLength - line.length);
|
|
59
|
-
const paddingHorizontal = " ".repeat(paddingHorizontalLength);
|
|
60
|
-
return `│${paddingHorizontal}${line}${paddingLine}${paddingHorizontal}│`;
|
|
61
|
-
}),
|
|
62
|
-
// Bottom border of the box.
|
|
63
|
-
`└${"─".repeat(maxLength + paddingHorizontalLength * 2)}┘`,
|
|
64
|
-
].join("\n");
|
|
65
|
-
}
|
package/dist/src/utils/env.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isEnvironmentVariableTruthy(name: string): boolean;
|
package/dist/src/utils/env.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isEnvironmentVariableTruthy = isEnvironmentVariableTruthy;
|
|
4
|
-
const FALSY_VALUES = new Set([
|
|
5
|
-
undefined,
|
|
6
|
-
"",
|
|
7
|
-
"null",
|
|
8
|
-
"undefined",
|
|
9
|
-
"false",
|
|
10
|
-
"0",
|
|
11
|
-
]);
|
|
12
|
-
function isEnvironmentVariableTruthy(name) {
|
|
13
|
-
const value = process.env[name]?.toLowerCase();
|
|
14
|
-
return !FALSY_VALUES.has(value);
|
|
15
|
-
}
|